diff --git a/includes/aptree/apytmenu.js b/includes/aptree/apytmenu.js deleted file mode 100644 index 792fb799..00000000 --- a/includes/aptree/apytmenu.js +++ /dev/null @@ -1,13 +0,0 @@ -//****************************************************************************** -// Apycom DHTML Tree Menu 1.34 -// www.dhtml-menu.com -// (c) Apycom Software, 2004 -// www.apycom.com -//****************************************************************************** - -////////////////////////////////////////////// -// Obfuscated by Javascript Obfuscator 2.19 // -// http://javascript-source.com // -////////////////////////////////////////////// - -var I1Il=0,l1II1=0,ll1l1=0,isNS4=0,Il1l=0,llll1=0,IIII1=0,I1I=0,I1lI1=0,lIlI1=0,I1l1=0,I1II1="",lI=0,llI1=0,l1=[],II11=false,Il1I1,lI1I1,I1ll,lIll,III1=false,Il11=[],lI1I=[],lll=false,l1l1=false,Ill1=0,l1ll=null,lI11="",l111l=1000,II1I=[],II1l=[],l11l;I1l1I();function I1l1I(){var l1II=navigator.userAgent,III1l=navigator.appName,IlI1l=navigator.appVersion;lIlI1=IlI1l.indexOf("Mac")>=0;I1lI1=document.getElementById?1:0;var l1l1l=(parseInt(navigator.productSub)>=20020000)&&(navigator.vendor.indexOf("Apple Computer")!=-1);if(l1l1l&&navigator.product=="Gecko"){ll1l1=1;I1I=6;return;};if(l1II.indexOf("Opera")>=0){Il1l=1;I1I=parseFloat(l1II.substring(l1II.indexOf("Opera")+6,l1II.length));}else if(III1l.toLowerCase()=="netscape"){if(l1II.indexOf("rv:")!=-1&&l1II.indexOf("Gecko")!=-1&&l1II.indexOf("Netscape")==-1){IIII1=1;I1I=parseFloat(l1II.substring(l1II.indexOf("rv:")+3,l1II.length));}else{ll1l1=1;if(l1II.indexOf("Gecko")!=-1&&l1II.indexOf("Netscape")>l1II.indexOf("Gecko")){if(l1II.indexOf("Netscape6")>-1)I1I=parseFloat(l1II.substring(l1II.indexOf("Netscape")+10,l1II.length));else if(l1II.indexOf("Netscape")>-1)I1I=parseFloat(l1II.substring(l1II.indexOf("Netscape")+9,l1II.length));}else I1I=parseFloat(IlI1l);};}else if(document.all?1:0){I1Il=1;I1I=parseFloat(l1II.substring(l1II.indexOf("MSIE ")+5,l1II.length));};isNS4=ll1l1&&I1I<6;l1II1=I1Il&&I1I>=5;llll1=Il1l&&I1I>=7;I1l1=I1Il||llll1;};function II1ll(){var lII1l=I1l1?l11l.scrollLeft:pageXOffset,llI1l=I1l1?l11l.scrollTop:pageYOffset;return[lII1l,llI1l]};function l1lll(l1lI1){with(l1lI1)return[(isNS4)?left:parseInt(style.left),(isNS4)?top:parseInt(style.top)];};function IlIll(l1lI1,Ill1l,I1l1l){with(l1lI1){if(isNS4){left=Ill1l;top=I1l1l;}else{style.left=Ill1l;style.top=I1l1l;};};};function IlI1I(){if(II11)return;for(var lII1=0;lII1-1&&IIIl<0)IIIl=-1;else if(IIIl>0&&IIIl<1)IIIl=1;if(IlII>-1&&IlII<0)IlII=-1;else if(IlII>0&&IlII<1)IlII=1;};IlIll(llII1,IlI[0]+((IlI[0]!=l1I1l)?IIIl:0),IlI[1]+((IlI[1]!=IIl1l)?IlII:0));};};};if(I1Il||Il1l){document.onselectstart=function(){return(II11?false:true);};};var oldResize=null;function lIl1I(){document.location.href=document.location.href;if(oldResize)oldResize();return true;};if(isNS4){if(typeof(onresize)!="undefined")oldResize=onresize;onresize=lIl1I;};var lIl1=null;function l1Ill(I1I1l){with(I1I1l)return[(I1Il||Il1l)?clientX:pageX,(I1Il||Il1l)?clientY:pageY];};function lll1I(event){if(II11&&Ill1){var IlI1=l1Ill(event),I1l=(I1l1?II1ll():[0,0]),IIIl1=IlI1[0]-Il1I1+I1l[0],IlIl1=IlI1[1]-lI1I1+I1l[1];I1ll.style.left=(IIIl1>=0)?IIIl1:0;I1ll.style.top=(IlIl1>=0)?IlIl1:0;};return true;};function lI1Il(){if(document.attachEvent)document.attachEvent("onmousemove",lll1I);else{lIl1=document.onmousemove;document.onmousemove=function(I1I1l){lll1I(I1I1l);if(lIl1)lIl1();return true;};};};function III1I(lI11l,lII11){if(isNS4||II11)return;I1ll=l11ll("apy_t"+lII11+"div");lIll=l1[lII11];var IlI1=l1Ill(lI11l),IlI=l1lll(I1ll),I1l=I1l1?II1ll():[0,0];Il1I1=IlI1[0]-IlI[0]+I1l[0];lI1I1=IlI1[1]-IlI[1]+I1l[1];II11=true;};function ll1lI(){var I1l=II1ll(),IlI=l1lll(I1ll);lIll.left=IlI[0]-I1l[0];lIll.top=IlI[1]-I1l[1];II11=false;};function apy_tload(){l11l=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;if(!(Il1l&&I1I<6))for(var lII1=0;lII1=0;l111--)with(ll[l111]){llll=Illll(Il,IIl,ll[l111+1].llll,ll[l111+1].Il);};};};};function apy_tmenuInit(){if(!lI)l1l1I();var lllI1;llIll();l1[lI]={ll:[],id:"apy_t"+lI,left:tleft,top:ttop,floating:tfloatable,moving:tmoveable,abspos:tabsolute,iterations:(tfloatIterations<=0)?6:tfloatIterations,width:tmenuWidth?tmenuWidth:"200px",height:tmenuHeight,Il11I:tmenuBorderWidth,lI11I:tmenuBorderStyle,l111I:tmenuBorderColor,IlIIl:tmenuBackColor,IllIl:tmenuBackImage,moveImage:tmoveImage,moveImageH:tmoveImageHeight,IIlIl:texpandBtnAlign,lIIIl:ticonAlign,XPStyle:tXPStyle,ll11:(II1l[lI]?II1l[lI]:""),Ill:(l1l1?II1I[lI]:[])};var I1II=l1[lI],I1,I111l="",llI11,IIl=0,lIlI,IllI,I1lI,ll1I1,l11I1,l1Il="",lIl11=[tfontStyle,tfontStyle],lll11=[tfontColor[0],ll1ll(tfontColor[1],"")],l1l11=[tfontDecoration[0],ll1ll(tfontDecoration[1],"")],IIlI1=[titemBackColor[0],ll1ll(titemBackColor[1],"")],IllI1=[texpandBtn[0],ll1ll(texpandBtn[1],""),ll1ll(texpandBtn[2],"")],l1I,l1I,lllIl,I1lIl,lIlIl,lII,itemVisible='visible',expnd;for(var l111=0;(l1110)tmenuItems[l111][0]=substring(llI11,length);};if(llI11>IIl)IIl=llI11;llI1=I1II.ll.length;lII=ll1ll(tmenuItems[l111][7],"");IIIIl=(lII)?parseInt(lII):-1;IllI=I11ll("tfontStyle",IIIIl,lIl11);lIlI=I11ll("tfontColor",IIIIl,lll11);I1lI=I11ll("tfontDecoration",IIIIl,l1l11);ll1I1=I11ll("titemBackColor",IIIIl,IIlI1);l11I1=I11ll("texpandBtn",IIIIl,IllI1);l1Il=ll1ll(tmenuItems[l111][6],"_self");if(l1Il=="_self"&&titemTarget)l1Il=titemTarget;if(tXPStyle){l1I=tXPExpandBtn;l1I=tXPExpandBtn;lllIl=tXPTitleBackColor;I1lIl=tXPTitleLeft;lIlIl=tXPTitleBackImg;var lII=ll1ll(tmenuItems[l111][8],"");if(lII){IIIIl=parseInt(lII);l1I=Il1ll('tXPExpandBtn',IIIIl,tXPExpandBtn);lllIl=Il1ll('tXPTitleBackColor',IIIIl,tXPTitleBackColor);I1lIl=Il1ll('tXPTitleLeft',IIIIl,tXPTitleLeft);lIlIl=Il1ll('tXPTitleBackImg',IIIIl,tXPTitleBackImg);};};I1II.ll[llI1]={Il:llI11,llll:"",id:I1II.id+"i"+llI1,IIIl:tlevelDX,hasChild:false,I1l11:ll1ll(tmenuItems[l111][0],""),l1I1:ll1ll(tmenuItems[l111][1],""),IIII:l1Il,lIII1:ll1ll(tmenuItems[l111][5],""),align:titemAlign,lll1l:"middle",cursor:titemCursor,lIIl:lIlI,font:IllI,llIl:I1lI,IlIIl:ll1I1,IllIl:[titemBackImage[0],ll1ll(titemBackImage[1],"")],ll11l:["",""],lIl:[ll1ll(tmenuItems[l111][2],""),ll1ll(tmenuItems[l111][3],""),ll1ll(tmenuItems[l111][4],"")],I1IIl:ticonWidth,I111I:ticonHeight,Il1:l11I1,I111:l1I,llIIl:lllIl,ll11I:I1lIl,l1IIl:lIlIl,visible:itemVisible};if(!I1II.ll[llI1].lIl[0])I1II.ll[llI1].lIl[0]=tblankImage;};with(l1[lI]){for(var l111=0;l111";else{lI11+="
";};lI11+="";if(moving){lI11+="";};lI11+="";else l1111+="";};return l1111;};function lllll(){var l1111="";l1111+=(l1[lI].IIlIl=="left")?IIIll():"";l1111+="";};return l1111;};function lI1ll(IIl11){return"";};function Il1Il(){var l1111="";with(I1){if(!I1l11)return;l1111+="";};return l1111;};var show=false;for(var I1I1=0;I1I1";lI11+="
";lI11+="
";};var I1,Illl,II1,llI,expnd,lll1=isNS4||(Il1l&&I1I<7),III=texpanded,II111="",IIll="";if(tpoints)I1Ill(IIl);function IIIll(){var l1111="";with(I1){for(var II11l=Il;II11l>=0;II11l--)if(tpoints&&II11l!=Il)l1111+=((llll.charAt(Il-II11l-1)=="1")?"":"")+"":tpointsImage+"' style='background-repeat: repeat-y'>"):">");if(expnd){l1111+="":" onMouseDown='IIlll(this,"+llI+",2)' onMouseOver='IIlll(this,"+llI+",1)' onMouseOut='IIlll(this,"+llI+",0)' onMouseUp='javascript:tcurBtn=true' >";}else l1111+="";var Il11l=((lll1&&lIl[2]&&expnd)||III)?(lIl[2]?lIl[2]:lIl[0]):lIl[0];l1111+="":"")+"";l1111+="";l1111+=((isNS4&&l1I1)?""+I1l11+"":I1l11)+"";}else{Illl=(I1.visible=="visible"&&(show||lll1||I1.Il<=1||III))?"":"none";if(!I1.Il){lI11+="
";lI11+="";lI11+="";};lI11+="";}else{lI11+="background-color:"+I1.IlIIl[0]+"' ";lI11+="onMouseOver='I11Il(this,"+llI+",1)' onMouseOut='I11Il(this,"+llI+",0)' onClick='lI1lI("+llI+")'>";};lI11+="";if(tXPStyle)with(l1[lI]){if(I1I1+1==ll.length||(I1.Il>0&&ll[I1I1+1].Il==0)){lI11+="
";};lI11+="";with(l1[lI])expnd=ll[I1I1].hasChild;if(!tXPStyle){with(l1[lI]){lI11+=(IIlIl=="left")?lllll()+lI1ll(1):"";lI11+=(lIIIl=="left")?lIlll()+lI1ll(0):"";lI11+=Il1Il();lI11+=(lIIIl=="right")?lI1ll(0)+lIlll():"";lI11+=(IIlIl=="right")?lI1ll(1)+lllll():"";lI11+=(I1.Il)?lI1ll(0):"";};}else{with(I1){IIll=(isNS4&&l1I1)?"":"";IIll+=""+I1l11+"";IIll+=(isNS4&&l1I1)?"":"";};if(!I1.Il){II111=(isNS4&&!tXPTitleTopBackColor)?"":"BGCOLOR="+tXPTitleTopBackColor;with(I1){if(I1.lIl[0]!=tblankImage){lI11+="";lI11+="";}else{lI11+="";lI11+="";lI11+="";};};}else with(l1[lI]){lI11+="";lI11+=lllll()+lI1ll()+lIlll()+lI1ll();lI11+="";};};lI11+="
";lI11+="";lI11+="";lI11+="";lI11+="
";lI11+=IIll;lI11+="
";lI11+=IIll;lI11+="
"+IIll;lI11+="
";lI11+="
";lI11+="
";};};};if(isNS4)lI11+="
";else lI11+="
";document.write(lI11);lI11="";var ttl=false;if(!texpanded||l1[lI].ll11){for(var l111=0;l111I11l1){var Il111=IlII1/tXPIterations;Il111=(Il111<1)?1:Il111;var I1111=IlII1-Il111;I1111=(I1111III11)?III11:I1111;I11.style.height=I1111;}else{window.clearInterval(Il11[l11]);Il11[l11]=null;};};function ll1Il(II,l11){var I1=l1[II].ll[l11],l1ll1=I1.id,Il1=l11ll(l1ll1+"btn"),I11=l11ll(l1ll1+"divXP"),ll111=l11ll(l1ll1+"titleXP"),Il1=l11ll(l1ll1+"btn");if(Il11[l11]>0)return;if(Il1.name){Il1.name="";I11.style.height=I11.offsetHeight;lI1I[l11]=I11.offsetHeight;I11.style.overflow="hidden";if(!lll){Il11[l11]=window.setInterval("I1I1I('"+I11.id+"',"+(ll111.offsetHeight+(37-tXPBtnHeight))+","+l11+")",5);if(Il1&&I1.I111[1])Il1.src=I1.I111[1];}else{I11.style.height=(ll111.offsetHeight+(37-tXPBtnHeight));if(Il1&&I1.I111[0])Il1.src=I1.I111[0];lll=false;};}else{Il1.name="1";Il11[l11]=window.setInterval("l11lI('"+I11.id+"',"+l11+")",10);if(I1.I111[3])Il1.src=I1.I111[3];};if(tsaveState)lIIll();};function I1lll(IIll1,lI1l1,ll1){with(IIll1){with(lI1l1){color=(lIIl[ll1])?lIIl[ll1]:color;font=(font[ll1])?font[ll1]:font;textDecoration=(llIl[ll1])?llIl[ll1]:textDecoration;};};};function lII1I(lllI,II,l11,ll1){var I1=l1[II].ll[l11],lIIl1=l11ll(lllI.id+"font"),IlI11=l11ll(lllI.id+"btn");with(I1){I1lll(I1,lIIl1.style,ll1);if(!IlI11.name){if(I111[ll1])IlI11.src=I111[ll1];}else if(I111[ll1+2])IlI11.src=I111[ll1+2];};};function lI1lI(II,l11){if(III1){III1=false;return;};var I1=l1[II].ll[l11];if(texpandItemClick&&I1.hasChild){IIlll(l11ll(I1.id+"btn"),II,l11,2);III1=false;};with(I1){if(l1I1){if(l1I1.toLowerCase().indexOf("javascript:")==0)eval(l1I1.substring(11,l1I1.length));else if(!IIII||IIII=="_self")location.href=l1I1;else open(l1I1,IIII);};};};function I11Il(lllI,II,l11,ll1){var I1=l1[II].ll[l11],lIIl1=l11ll(lllI.id+"font"),llIl1=l11ll(lllI.id+"td");with(I1){if(IlIIl[ll1])llIl1.style.backgroundColor=IlIIl[ll1];if(IllIl[ll1])llIl1.style.backgroundImage="url("+IllIl[ll1]+")";I1lll(I1,lIIl1.style,ll1);llII=l11ll(lllI.id+"icon");if(llII&&!llII.name)llII.src=(lIl[ll1])?lIl[ll1]:llII.src;};};function Ill1I(II,l11,Illl){III1=true;var I1=l1[II].ll[l11],IIlI,ll1I,l11I,Il1;if(l1[II].XPStyle){var I11;for(lII1=l11;!I11;lII1--)I11=l11ll("apy_t"+II+"i"+lII1+"divXP");I11.style.height=I11.offsetHeight;};if(l11+1==l1[II].ll.length)return;with(l1[II]){if(Illl!="none"){for(var lII1=l11+1;lII1=1;lII1++){ll1I=ll[lII1];Il1=l11ll("apy_t"+II+"i"+lII1+"btn");if(Il1){Il1.name="";Il1.src=(ll1I.Il1[0])?ll1I.Il1[0]:Il1.src;l11I=l11ll("apy_t"+II+"i"+lII1+"icon");if(l11I){l11I.name="";l11I.src=(ll1I.lIl[0])?ll1I.lIl[0]:l11I.src;};};if(XPStyle){IIlI=l11ll("apy_t"+II+"i"+lII1+"td");I11.style.height=I11.offsetHeight-IIlI.offsetHeight;};l11ll("apy_t"+II+"i"+lII1).style.display=Illl;};if(!lll)I11Il(l11ll("apy_t"+II+"i"+l11),II,l11,1);else lll=false;};};function IIlll(Il1,II,l11,ll1){var I1=l1[II].ll[l11];if(!Il1.name)Il1.src=(I1.Il1[ll1])?I1.Il1[ll1]:Il1.src;if(ll1==2){if(Il1.name)ll1=1;lIl=l11ll(I1.id+"icon");if(lIl){lIl.name=(!Il1.name)?"1":"";lIl.src=(I1.lIl[ll1])?I1.lIl[ll1]:lIl.src;};Il1.src=(I1.Il1[ll1])?I1.Il1[ll1]:Il1.src;Il1.name=(Il1.name)?"":"1";Ill1I(II,l11,(Il1.name?"":"none"));};if(tsaveState)lIIll();};function Il1ll(lI1l,I11I,ll1l){var l1l=[],lI111=tXPStyles[I11I];for(var lII1=0;lI111[lII1].indexOf(lI1l)<0&&lII1 3rd and 6th are hidden.", "", "img/icons/info.gif"], - ["|Item 1", "testlink.htm", "img/icons/support.gif"], - ["|Item 2", "testlink.htm", "img/icons/support.gif"], - ["#|Item 3", "testlink.htm", "img/icons/support.gif"], - ["|Item 4", "testlink.htm", "img/icons/support.gif"], - ["|Item 5", "testlink.htm", "img/icons/support.gif"], - ["#|Item 6", "testlink.htm", "img/icons/support.gif"], - ["|Item 7", "testlink.htm", "img/icons/support.gif"], - - ["#2nd submenu", "", "", "","","",,"1","0"], - ["|This is the second submenu.
Also you can hide even a submenu title like here."], - - ["3rd submenu", "", "img/xpicon_green.gif","","", "Main Page",,"0"], - ["|This submenu has 3 levels.
But 3rd level items are hidden.", "", "img/icons/info.gif"], - ["|1st level item", "testlink.htm", "img/icons/support.gif"], - ["||2nd level item", "testlink.htm", "img/icons/support.gif"], - ["#||| 3rd level item 1", "testlink.htm", "img/icons/support.gif"], - ["#||| 3rd level item 2", "testlink.htm", "img/icons/support.gif"], - ["|1st level item", "testlink.htm", "img/icons/support.gif"], - ["||2nd level item", "testlink.htm", "img/icons/support.gif"], - ["#||| 3rd level item 1", "testlink.htm", "img/icons/support.gif"], - ["#||| 3rd level item 2", "testlink.htm", "img/icons/support.gif"], - ["#||| 3rd level item 3", "testlink.htm", "img/icons/support.gif"], - ["#||| 3rd level item 4", "testlink.htm", "img/icons/support.gif"], -]; - -apy_tmenuInit(); diff --git a/includes/aptree/txpmenu1.js b/includes/aptree/txpmenu1.js deleted file mode 100644 index a6f346f5..00000000 --- a/includes/aptree/txpmenu1.js +++ /dev/null @@ -1,104 +0,0 @@ -var tabsolute = 1; -var tLeft = 10; -var tTop = 10; - -//****************************************************************************** -// ------ Apycom.com Tree-menu Data -------------------------------------------- -//****************************************************************************** -var tblankImage = "includes/aptree/img/blank.gif"; -var tmenuWidth = 230; -var tmenuHeight = 400; - -var tabsolute = 1; -var tleft = 20; -var ttop = 120; - -var tfloatable = 1; -var tfloatIterations = 6; -var tmoveable = 0; -var tmoveImage = "includes/aptree/img/movepic.gif"; -var tmoveImageHeight = 12; - -var tfontStyle = "normal 8pt Tahoma"; -var tfontColor = ["#215DC6","#428EFF"]; -var tfontDecoration = ["none","underline"]; - -var titemBackColor = ["#D6DFF7","#D6DFF7"]; -var titemAlign = "left"; -var titemBackImage = ["",""]; -var titemCursor = "hand"; -var titemHeight = 22; - -var titemTarget = "_blank"; -var ticonWidth = 16; -var ticonHeight = 16; -var ticonAlign = "left"; - -var tmenuBackImage = ""; -var tmenuBackColor = ""; -var tmenuBorderColor = "#FFFFFF"; -var tmenuBorderStyle = "solid"; -var tmenuBorderWidth = 0; - -var texpandBtn =["includes/aptree/img/expandbtn2.gif","includes/aptree/img/expandbtn2.gif","includes/aptree/img/collapsebtn2.gif"]; -var texpandBtnW = 9; -var texpandBtnH = 9; -var texpandBtnAlign = "left" - -var texpanded = 1; - -var tpoints = 0; -var tpointsImage = ""; -var tpointsVImage = ""; -var tpointsCImage = ""; - -// XP-Style Parameters -var tXPStyle = 1; -var tXPIterations = 5; // expand/collapse speed -var tXPTitleTopBackColor = ""; -var tXPTitleBackColor = "#265BCC"; -var tXPTitleLeft = "img/xptitleleft.gif"; -var tXPExpandBtn = ["img/xpexpand1.gif","img/xpexpand2.gif","img/xpcollapse1.gif","img/xpcollapse2.gif"]; -var tXPBtnHeight = 25; -var tXPTitleBackImg = "img/xptitle.gif"; - -var tstyles = -[ - ["tfontStyle=bold 8pt Tahoma","titemBackColor=#265BCC,#265BCC","tfontColor=#FFFFFF,#428EFF", "tfontDecoration=none,none"], - ["tfontStyle=bold 8pt Tahoma","titemBackColor=#265BCC,#265BCC","tfontColor=#215DC6,#428EFF", "tfontDecoration=none,none"], - ["tfontDecoration=none,none"], - ["tfontStyle=bold 8pt Tahoma","tfontColor=#444444,#5555FF"], -]; - -var tXPStyles = -[ - ["tXPTitleBackColor=#D0DAF8", "tXPExpandBtn=img/xpexpand3.gif,img/xpexpand4.gif,img/xpcollapse3.gif,img/xpcollapse4.gif", "tXPTitleBackImg=img/xptitle2.gif"] -]; - -var tmenuItems = -[ - ["XP-style Title with Icon", "", "img/xpicon1.gif","","", "Main Page",,"0"], - ["|Information", "testlink.htm", "img/icons/info.gif", "", "", "Information","_blank"], - ["|Support", "", "img/icons/support.gif", "", "", "Support",, "2"], - ["||Contacts", "mailto:support@apycom.com", "img/icons/contacts.gif", "", "", "Contacts"], - ["||E-mail", "mailto:support@apycom.com", "img/icons/email.gif", "", "", "E-mail"], - - ["|Help", "", "img/icons/help1.gif", "img/icons/help1.gif", "img/icons/help2.gif", "Help",,"2"], - ["||Glossary", "testlink.htm", "img/icons/paper.gif", "", "", "Glossary"], - ["||Index", "testlink.htm", "img/icons/paper.gif", "", "", "Index"], - ["|| ", - "", "img/icons/search.gif", "", "", "Search",,"2"], - - ["||Contents: ", - "", "img/icons/list.gif", "", "", "Contents",,"2"], - - ["XP-style Title without Icon", "", "", "","","Download software",,"1","0"], - ["|Item without icon", "testlink.htm", ,,, "Item 1 Hint"], - ["|Item with individual style", "", ,,, "Item 2 Hint",,"3"], - ["||SubItem 1", "testlink.htm", "img/icons/help1.gif", "","", "SubItem 1 Hint"], - ["||SubItem 2", "testlink.htm", "img/icons/help1.gif", "","", "SubItem 1 Hint"], - ["|||SubItem 2_1", "testlink.htm", ,,, "SubItem 1_2 Hint"], - -]; - -apy_tmenuInit(); diff --git a/includes/aptree/txpmenu3.js b/includes/aptree/txpmenu3.js deleted file mode 100644 index a976580a..00000000 --- a/includes/aptree/txpmenu3.js +++ /dev/null @@ -1,98 +0,0 @@ -//****************************************************************************** -// ------ Apycom.com Tree-menu Data -------------------------------------------- -//****************************************************************************** -var tblankImage = "img/blank.gif"; -var tfontStyle = "normal 8pt Tahoma"; -var tfontColor = ["#3F3D3D","#7E7C7C"]; -var tfontDecoration = ["none","underline"]; - -var titemBackColor = ["#F6F6EC","#F6F6EC"]; -var titemAlign = "left"; -var titemBackImage = ["",""]; -var titemCursor = "hand"; -var titemHeight = 22; - -var tmenuBackImage = ""; -var tmenuBackColor = ""; -var tmenuBorderColor = "#FFFFFF"; -var tmenuBorderStyle = "solid"; -var tmenuBorderWidth = 0; -var tmenuWidth = 230; -var tmenuHeight = 400; - -var titemTarget = "_blank"; -var ticonWidth = 16; -var ticonHeight = 16; -var ticonAlign = "left"; - -var texpandBtn =["img/expandbtn2.gif","img/expandbtn2.gif","img/collapsebtn2.gif"]; -var texpandBtnW = 9; -var texpandBtnH = 9; -var texpandBtnAlign = "left" - -var texpanded = 0; - -var tpoints = 0; -var tpointsImage = ""; -var tpointsVImage = ""; -var tpointsCImage = ""; - -var tabsolute = 1; -var tmoveable = 0; -var tmoveImage = "img/movepic.gif"; -var tleft = 20; -var ttop = 120; - -var tfloatable = 1; -var tfloatIterations = 6; - -// XP-Style Parameters -var tXPStyle = 1; -var tXPIterations = 10; // expand/collapse speed -var tXPTitleTopBackColor = ""; -var tXPTitleBackColor = "#94A664"; -var tXPTitleLeft = "img/xptitleleft_o.gif"; -var tXPExpandBtn = ["img/xpexpand1_o.gif","img/xpexpand2_o.gif","img/xpcollapse1_o.gif","img/xpcollapse2_o.gif"]; -var tXPBtnHeight = 23; -var tXPTitleBackImg = "img/xptitle_o.gif"; - -var tstyles = -[ - ["tfontStyle=bold 8pt Tahoma","tfontColor=#FFFFFF,#E0E7B8", - "tfontDecoration=none,none"], - ["tfontStyle=bold 8pt Tahoma","tfontColor=#56662D,#72921D", - "tfontDecoration=none,none"], - ["tfontDecoration=none,none"], - ["tfontStyle=bold 8pt Tahoma","tfontColor=#444444,#5555FF"], -]; - -var tXPStyles = -[ - ["tXPTitleBackColor=#E2E9BC", - "tXPExpandBtn=img/xpexpand3_o.gif,img/xpexpand4_o.gif,img/xpcollapse3_o.gif,img/xpcollapse4_o.gif", "tXPTitleBackImg=img/xptitle2_o.gif"] -]; - -var tmenuItems = -[ - ["+XP-style Title with Icon", "", "img/xpicon1_o.gif", "", "", "Main Page",,"0"], - ["|Information", "testlink.htm", "img/icons/info.gif", "", "", "Information","_blank"], - ["|Support", "", "img/icons/support.gif", "", "", "Support",, "2"], - ["||Contacts", "mailto:support@apycom.com", "img/icons/contacts.gif", "", "", "Contacts"], - ["||E-mail", "mailto:support@apycom.com", "img/icons/email.gif", "", "", "E-mail"], - - ["|Help", "", "img/icons/help1.gif", "img/icons/help1.gif", "img/icons/help2.gif", "Help",,"2"], - ["||Glossary", "testlink.htm", "img/icons/paper.gif", "", "", "Glossary"], - ["||Index", "testlink.htm", "img/icons/paper.gif", "", "", "Index"], - ["|| ", "", "img/icons/search.gif", "", "", "Search",,"2"], - - ["||Contents: ", "", "img/icons/list.gif", "", "", "Contents",,"2"], - - ["+XP-style Title without Icon", "", "", "", "", "Download software",,"1","0"], - ["|Item without icon", "testlink.htm", "", "", "", "Item 1 Hint"], - ["|Item with individual style", "", "", "", "", "Item 2 Hint",,"3"], - ["||SubItem 1", "testlink.htm", "img/icons/help1.gif", "", "", "SubItem 1 Hint"], - ["||SubItem 2", "testlink.htm", "img/icons/help1.gif", "", "", "SubItem 1 Hint"], - ["|||SubItem 2_1", "testlink.htm", "", "", "", "SubItem 1_2 Hint"], - -]; - diff --git a/includes/pear/Compat.php b/includes/pear/Compat.php deleted file mode 100644 index 23e26b5a..00000000 --- a/includes/pear/Compat.php +++ /dev/null @@ -1,133 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: Compat.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Provides missing functionality in the form of constants and functions - * for older versions of PHP - * - * Optionally, you may simply include the file. - * e.g. require_once 'PHP/Compat/Function/scandir.php'; - * - * @category PHP - * @package PHP_Compat - * @version $Revision: 1.1 $ - * @author Aidan Lister - * @static - */ -class PHP_Compat -{ - /** - * Load a function, or array of functions - * - * @param string|array $function The function or functions to load - * @return bool|array TRUE if loaded, FALSE if not - */ - function loadFunction($function) - { - // Recursiveness - if (is_array($function)) { - $res = array(); - foreach ($function as $singlefunc) { - $res[$singlefunc] = PHP_Compat::loadFunction($singlefunc); - } - - return $res; - } - - // Load function - if (!function_exists($function)) { - $file = sprintf('PHP/Compat/Function/%s.php', $function); - if ((@include_once $file) !== false) { - return true; - } - } - - return false; - } - - - /** - * Load a constant, or array of constants - * - * @param string|array $constant The constant or constants to load - * @return bool|array TRUE if loaded, FALSE if not - */ - function loadConstant($constant) - { - // Recursiveness - if (is_array($constant)) { - $res = array(); - foreach ($constant as $singleconst) { - $res[$singleconst] = PHP_Compat::loadConstant($singleconst); - } - - return $res; - } - - // Load constant - $file = sprintf('PHP/Compat/Constant/%s.php', $constant); - if ((@include_once $file) !== false) { - return true; - } - - return false; - } - - - /** - * Load components for a PHP version - * - * @param string $version PHP Version to load - * @return array An associative array of component names loaded - */ - function loadVersion($version = null) - { - // Include list of components - require 'PHP/Compat/Components.php'; - - // Include version_compare to work with older versions - PHP_Compat::loadFunction('version_compare'); - - // Init - $phpversion = phpversion(); - $methods = array( - 'function' => 'loadFunction', - 'constant' => 'loadConstant'); - $res = array(); - - // Iterate each component - foreach ($components as $type => $slice) { - foreach ($slice as $component => $compversion) { - if (($version === null && - 1 === version_compare($compversion, $phpversion)) || // C > PHP - (0 === version_compare($compversion, $version) || // C = S - 1 === version_compare($compversion, $phpversion))) { // C > PHP - - $res[$type][$component] = - call_user_func(array('PHP_Compat', $methods[$type]), $component); - } - } - } - - return $res; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Components.php b/includes/pear/Compat/Components.php deleted file mode 100644 index bb0814dc..00000000 --- a/includes/pear/Compat/Components.php +++ /dev/null @@ -1,71 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: Components.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -// Functions -$components['function']['array_combine'] = '5.0.0'; -$components['function']['array_diff_assoc'] = '4.3.0'; -$components['function']['array_diff_key'] = '5.0.2'; -$components['function']['array_diff_ukey'] = '5.0.2'; -$components['function']['array_intersect_assoc'] = '5.0.0'; -$components['function']['array_intersect_key'] = '5.0.2'; -$components['function']['array_intersect_uassoc'] = '5.0.0'; -$components['function']['array_intersect_ukey'] = '5.0.2'; -$components['function']['array_udiff'] = '5.0.0'; -$components['function']['array_udiff_assoc'] = '5.0.0'; -$components['function']['array_udiff_uassoc'] = '5.0.0'; -$components['function']['array_uintersect'] = '5.0.0'; -$components['function']['array_uintersect_assoc'] = '5.0.0'; -$components['function']['array_uintersect_uassoc'] = '5.0.0'; -$components['function']['array_walk_recursive'] = '5.0.0'; -$components['function']['clone'] = '5.0.0'; -$components['function']['convert_uudecode'] = '5.0.0'; -$components['function']['convert_uuencode'] = '5.0.0'; -$components['function']['debug_print_backtrace'] = '5.0.0'; -$components['function']['file_get_contents'] = '4.3.0'; -$components['function']['file_put_contents'] = '5.0.0'; -$components['function']['fprintf'] = '5.0.0'; -$components['function']['get_headers'] = '5.0.0'; -$components['function']['get_include_path'] = '4.3.0'; -$components['function']['html_entity_decode'] = '4.3.0'; -$components['function']['http_build_query'] = '5.0.0'; -$components['function']['image_type_to_mime_type'] = '4.3.0'; -$components['function']['ob_get_clean'] = '4.3.0'; -$components['function']['ob_get_flush'] = '4.3.0'; -$components['function']['php_strip_whitespace'] = '5.0.0'; -$components['function']['restore_include_path'] = '4.3.0'; -$components['function']['scandir'] = '5.0.0'; -$components['function']['set_include_path'] = '4.3.0'; -$components['function']['str_ireplace'] = '5.0.0'; -$components['function']['str_shuffle'] = '4.3.0'; -$components['function']['str_split'] = '5.0.0'; -$components['function']['str_word_count'] = '4.3.0'; -$components['function']['stripos'] = '5.0.0'; -$components['function']['strpbrk'] = '5.0.0'; -$components['function']['strripos'] = '5.0.0'; -$components['function']['substr_compare'] = '5.0.0'; - -// Constants -$components['constant']['E_STRICT'] = '5.0.0'; -$components['constant']['FILE'] = '4.3.0'; -$components['constant']['PHP_EOL'] = '5.0.1'; -$components['constant']['STD'] = '4.3.0'; -$components['constant']['T'] = '5.0.0'; -$components['constant']['UPLOAD_ERR'] = '4.3.0'; -?> \ No newline at end of file diff --git a/includes/pear/Compat/Constant/E_STRICT.php b/includes/pear/Compat/Constant/E_STRICT.php deleted file mode 100644 index 9f1d2693..00000000 --- a/includes/pear/Compat/Constant/E_STRICT.php +++ /dev/null @@ -1,35 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: E_STRICT.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace constant E_STRICT - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/ref.errorfunc - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - */ -if (!defined('E_STRICT')) { - define('E_STRICT', 2048); -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Constant/FILE.php b/includes/pear/Compat/Constant/FILE.php deleted file mode 100644 index e70a6210..00000000 --- a/includes/pear/Compat/Constant/FILE.php +++ /dev/null @@ -1,51 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: FILE.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace filesystem constants - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/ref.filesystem - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - */ -if (!defined('FILE_USE_INCLUDE_PATH')) { - define('FILE_USE_INCLUDE_PATH', 1); -} - -if (!defined('FILE_IGNORE_NEW_LINES')) { - define('FILE_IGNORE_NEW_LINES', 2); -} - -if (!defined('FILE_SKIP_EMPTY_LINES')) { - define('FILE_SKIP_EMPTY_LINES', 4); -} - -if (!defined('FILE_APPEND')) { - define('FILE_APPEND', 8); -} - -if (!defined('FILE_NO_DEFAULT_CONTEXT')) { - define('FILE_NO_DEFAULT_CONTEXT', 16); -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Constant/PHP_EOL.php b/includes/pear/Compat/Constant/PHP_EOL.php deleted file mode 100644 index 2d4d87f0..00000000 --- a/includes/pear/Compat/Constant/PHP_EOL.php +++ /dev/null @@ -1,49 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: PHP_EOL.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace PHP_EOL constant - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/reserved.constants.core - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5.0.2 - */ -if (!defined('PHP_EOL')) { - switch (strtoupper(substr(PHP_OS, 0, 3))) { - // Windows - case 'WIN': - define('PHP_EOL', "\r\n"); - break; - - // Mac - case 'DAR': - define('PHP_EOL', "\r"); - break; - - // Unix - default: - define('PHP_EOL', "\n"); - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Constant/STD.php b/includes/pear/Compat/Constant/STD.php deleted file mode 100644 index 3488b987..00000000 --- a/includes/pear/Compat/Constant/STD.php +++ /dev/null @@ -1,43 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: STD.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace commandline constants - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/features.commandline - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - */ -if (!defined('STDIN')) { - define('STDIN', fopen('php://stdin', 'r')); -} - -if (!defined('STDOUT')) { - define('STDOUT', fopen('php://stdout', 'w')); -} - -if (!defined('STDERR')) { - define('STDERR', fopen('php://stderr', 'w')); -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Constant/T.php b/includes/pear/Compat/Constant/T.php deleted file mode 100644 index 1c3143c6..00000000 --- a/includes/pear/Compat/Constant/T.php +++ /dev/null @@ -1,72 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: T.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace tokenizer constants - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/ref.tokenizer - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - */ -if (!defined('T_ML_COMMENT')) { - define('T_ML_COMMENT', T_COMMENT); -} -if (!defined('T_DOC_COMMENT')) { - define('T_DOC_COMMENT', T_ML_COMMENT); -} - -if (!defined('T_OLD_FUNCTION')) { - define('T_OLD_FUNCTION', -1); -} -if (!defined('T_ABSTRACT')) { - define('T_ABSTRACT', -1); -} -if (!defined('T_CATCH')) { - define('T_CATCH', -1); -} -if (!defined('T_FINAL')) { - define('T_FINAL', -1); -} -if (!defined('T_INSTANCEOF')) { - define('T_INSTANCEOF', -1); -} -if (!defined('T_PRIVATE')) { - define('T_PRIVATE', -1); -} -if (!defined('T_PROTECTED')) { - define('T_PROTECTED', -1); -} -if (!defined('T_PUBLIC')) { - define('T_PUBLIC', -1); -} -if (!defined('T_THROW')) { - define('T_THROW', -1); -} -if (!defined('T_TRY')) { - define('T_TRY', -1); -} -if (!defined('T_CLONE')) { - define('T_CLONE', -1); -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Constant/UPLOAD_ERR.php b/includes/pear/Compat/Constant/UPLOAD_ERR.php deleted file mode 100644 index 2bcb9469..00000000 --- a/includes/pear/Compat/Constant/UPLOAD_ERR.php +++ /dev/null @@ -1,51 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: UPLOAD_ERR.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace upload error constants - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/features.file-upload.errors - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - */ -if (!defined('UPLOAD_ERR_OK')) { - define('UPLOAD_ERR_OK', 0); -} - -if (!defined('UPLOAD_ERR_INI_SIZE')) { - define('UPLOAD_ERR_INI_SIZE', 1); -} - -if (!defined('UPLOAD_ERR_FORM_SIZE')) { - define('UPLOAD_ERR_FORM_SIZE', 2); -} - -if (!defined('UPLOAD_ERR_PARTIAL')) { - define('UPLOAD_ERR_PARTIAL', 3); -} - -if (!defined('UPLOAD_ERR_NO_FILE')) { - define('UPLOAD_ERR_NO_FILE', 4); -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_combine.php b/includes/pear/Compat/Function/array_combine.php deleted file mode 100644 index dc1d7227..00000000 --- a/includes/pear/Compat/Function/array_combine.php +++ /dev/null @@ -1,71 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_combine.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_combine() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_combine - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('array_combine')) { - function array_combine($keys, $values) - { - if (!is_array($keys)) { - user_error('array_combine() expects parameter 1 to be array, ' . - gettype($keys) . ' given', E_USER_WARNING); - return; - } - - if (!is_array($values)) { - user_error('array_combine() expects parameter 2 to be array, ' . - gettype($values) . ' given', E_USER_WARNING); - return; - } - - $key_count = count($keys); - $value_count = count($values); - if ($key_count !== $value_count) { - user_error('array_combine() Both parameters should have equal number of elements', E_USER_WARNING); - return false; - } - - if ($key_count === 0 || $value_count === 0) { - user_error('array_combine() Both parameters should have number of elements at least 0', E_USER_WARNING); - return false; - } - - $keys = array_values($keys); - $values = array_values($values); - - $combined = array(); - for ($i = 0; $i < $key_count; $i++) { - $combined[$keys[$i]] = $values[$i]; - } - - return $combined; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_diff_assoc.php b/includes/pear/Compat/Function/array_diff_assoc.php deleted file mode 100644 index f215b262..00000000 --- a/includes/pear/Compat/Function/array_diff_assoc.php +++ /dev/null @@ -1,75 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_diff_assoc.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_diff_assoc() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_diff_assoc - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('array_diff_assoc')) { - function array_diff_assoc() - { - // Check we have enough arguments - $args = func_get_args(); - $count = count($args); - if (count($args) < 2) { - user_error('Wrong parameter count for array_diff_assoc()', E_USER_WARNING); - return; - } - - // Check arrays - for ($i = 0; $i < $count; $i++) { - if (!is_array($args[$i])) { - user_error('array_diff_assoc() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Get the comparison array - $array_comp = array_shift($args); - --$count; - - // Traverse values of the first array - foreach ($array_comp as $key => $value) { - // Loop through the other arrays - for ($i = 0; $i < $count; $i++) { - // Loop through this arrays key/value pairs and compare - foreach ($args[$i] as $comp_key => $comp_value) { - if ((string)$key === (string)$comp_key && - (string)$value === (string)$comp_value) - { - - unset($array_comp[$key]); - } - } - } - } - - return $array_comp; - } -} -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_diff_key.php b/includes/pear/Compat/Function/array_diff_key.php deleted file mode 100644 index 1ed9a3fa..00000000 --- a/includes/pear/Compat/Function/array_diff_key.php +++ /dev/null @@ -1,66 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_diff_key.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_diff_key() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_diff_key - * @author Tom Buskens - * @version $Revision: 1.1 $ - * @since PHP 5.0.2 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('array_diff_key')) { - function array_diff_key() - { - $args = func_get_args(); - if (count($args) < 2) { - user_error('Wrong parameter count for array_diff_key()', E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i !== $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_diff_key() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - $result = $args[0]; - foreach ($args[0] as $key1 => $value1) { - for ($i = 1; $i !== $array_count; $i++) { - foreach ($args[$i] as $key2 => $value2) { - if ((string) $key1 === (string) $key2) { - unset($result[$key2]); - break 2; - } - } - } - } - return $result; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_diff_uassoc.php b/includes/pear/Compat/Function/array_diff_uassoc.php deleted file mode 100644 index 5904e3af..00000000 --- a/includes/pear/Compat/Function/array_diff_uassoc.php +++ /dev/null @@ -1,83 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_diff_uassoc.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_diff_uassoc() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_diff_uassoc - * @version $Revision: 1.1 $ - * @since PHP 5.0.0 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_diff_uassoc')) { - function array_diff_uassoc() - { - // Sanity check - $args = func_get_args(); - if (count($args) < 3) { - user_error('Wrong parameter count for array_diff_uassoc()', E_USER_WARNING); - return; - } - - // Get compare function - $compare_func = array_pop($args); - if (!is_callable($compare_func)) { - if (is_array($compare_func)) { - $compare_func = $compare_func[0] . '::' . $compare_func[1]; - } - user_error('array_diff_uassoc() Not a valid callback ' . - $compare_func, E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i !== $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_diff_uassoc() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Compare entries - $result = array(); - foreach ($args[0] as $k => $v) { - for ($i = 1; $i < $array_count; $i++) { - foreach ($args[$i] as $kk => $vv) { - if ($v == $vv) { - $compare = call_user_func_array($compare_func, array($k, $kk)); - if ($compare == 0) { - continue 3; - } - } - } - } - - $result[$k] = $v; - } - - return $result; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_diff_ukey.php b/includes/pear/Compat/Function/array_diff_ukey.php deleted file mode 100644 index 3272a26c..00000000 --- a/includes/pear/Compat/Function/array_diff_ukey.php +++ /dev/null @@ -1,79 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_diff_ukey.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_diff_ukey() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_diff_ukey - * @author Tom Buskens - * @version $Revision: 1.1 $ - * @since PHP 5.0.2 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_diff_ukey')) { - function array_diff_ukey() - { - $args = func_get_args(); - if (count($args) < 3) { - user_error('Wrong parameter count for array_diff_ukey()', E_USER_WARNING); - return; - } - - // Get compare function - $compare_func = array_pop($args); - if (!is_callable($compare_func)) { - if (is_array($compare_func)) { - $compare_func = $compare_func[0].'::'.$compare_func[1]; - } - user_error('array_diff_ukey() Not a valid callback ' . - $compare_func, E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i !== $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_diff_ukey() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Compare entries - $result = $args[0]; - foreach ($args[0] as $key1 => $value1) { - for ($i = 1; $i !== $array_count; $i++) { - foreach ($args[$i] as $key2 => $value2) { - if (!(call_user_func($compare_func, (string) $key1, (string) $key2))) { - unset($result[$key1]); - break 2; - } - } - } - } - - return $result; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_intersect_assoc.php b/includes/pear/Compat/Function/array_intersect_assoc.php deleted file mode 100644 index 20522485..00000000 --- a/includes/pear/Compat/Function/array_intersect_assoc.php +++ /dev/null @@ -1,69 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_intersect_assoc.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_intersect_assoc() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_intersect_assoc - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('array_intersect_assoc')) { - function array_intersect_assoc() - { - // Sanity check - $args = func_get_args(); - if (count($args) < 2) { - user_error('wrong parameter count for array_intersect_assoc()', E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i !== $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_intersect_assoc() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Compare entries - $intersect = array(); - foreach ($args[0] as $key => $value) { - $intersect[$key] = $value; - - for ($i = 1; $i < $array_count; $i++) { - if (!isset($args[$i][$key]) || $args[$i][$key] != $value) { - unset($intersect[$key]); - break; - } - } - } - - return $intersect; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_intersect_key.php b/includes/pear/Compat/Function/array_intersect_key.php deleted file mode 100644 index 84224c61..00000000 --- a/includes/pear/Compat/Function/array_intersect_key.php +++ /dev/null @@ -1,67 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_intersect_key.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_intersect_key() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_intersect_key - * @author Tom Buskens - * @version $Revision: 1.1 $ - * @since PHP 5.0.2 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('array_intersect_key')) { - function array_intersect_key() - { - $args = func_get_args(); - if (count($args) < 2) { - user_error('Wrong parameter count for array_intersect_key()', E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i !== $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_intersect_key() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Compare entries - $result = array(); - foreach ($args[0] as $key1 => $value1) { - for ($i = 1; $i !== $array_count; $i++) { - foreach ($args[$i] as $key2 => $value2) { - if ((string) $key1 === (string) $key2) { - $result[$key1] = $value1; - } - } - } - } - - return $result; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_intersect_uassoc.php b/includes/pear/Compat/Function/array_intersect_uassoc.php deleted file mode 100644 index 9540563f..00000000 --- a/includes/pear/Compat/Function/array_intersect_uassoc.php +++ /dev/null @@ -1,90 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_intersect_uassoc.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_intersect_assoc() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_intersect_uassoc - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_intersect_uassoc')) { - function array_intersect_uassoc() - { - // Sanity check - $args = func_get_args(); - if (count($args) < 3) { - user_error('Wrong parameter count for array_intersect_ukey()', E_USER_WARNING); - return; - } - - // Get compare function - $compare_func = array_pop($args); - if (!is_callable($compare_func)) { - if (is_array($compare_func)) { - $compare_func = $compare_func[0] . '::' . $compare_func[1]; - } - user_error('array_intersect_uassoc() Not a valid callback ' . - $compare_func, E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i !== $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_intersect_uassoc() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Compare entries - $result = array(); - foreach ($args[0] as $k => $v) { - for ($i = 0; $i < $array_count; $i++) { - $match = false; - foreach ($args[$i] as $kk => $vv) { - $compare = call_user_func_array($compare_func, array($k, $kk)); - if ($compare === 0 && $v == $vv) { - $match = true; - continue 2; - } - } - - if ($match === false) { - continue 2; - } - } - - if ($match === true) { - $result[$k] = $v; - } - } - - return $result; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_intersect_ukey.php b/includes/pear/Compat/Function/array_intersect_ukey.php deleted file mode 100644 index 17d1f01d..00000000 --- a/includes/pear/Compat/Function/array_intersect_ukey.php +++ /dev/null @@ -1,79 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_intersect_ukey.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_intersect_ukey() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_intersect_ukey - * @author Tom Buskens - * @version $Revision: 1.1 $ - * @since PHP 5.0.2 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_intersect_ukey')) { - function array_intersect_ukey() - { - $args = func_get_args(); - if (count($args) < 3) { - user_error('Wrong parameter count for array_intersect_ukey()', E_USER_WARNING); - return; - } - - // Get compare function - $compare_func = array_pop($args); - if (!is_callable($compare_func)) { - if (is_array($compare_func)) { - $compare_func = $compare_func[0].'::'.$compare_func[1]; - } - user_error('array_diff_ukey() Not a valid callback ' . - $compare_func, E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i !== $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_intersect_ukey() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Compare entries - $result = array(); - foreach ($args[0] as $key1 => $value1) { - for ($i = 1; $i !== $array_count; $i++) { - foreach ($args[$i] as $key2 => $value2) { - if (!(call_user_func($compare_func, (string) $key1, (string) $key2))) { - $result[$key1] = $value1; - break 2; - } - } - } - } - - return $result; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_udiff.php b/includes/pear/Compat/Function/array_udiff.php deleted file mode 100644 index db716bf4..00000000 --- a/includes/pear/Compat/Function/array_udiff.php +++ /dev/null @@ -1,83 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: array_udiff.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_udiff() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_udiff - * @author Stephan Schmidt - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_udiff')) { - function array_udiff() - { - $args = func_get_args(); - - if (count($args) < 3) { - user_error('Wrong parameter count for array_udiff()', E_USER_WARNING); - return; - } - - // Get compare function - $compare_func = array_pop($args); - if (!is_callable($compare_func)) { - if (is_array($compare_func)) { - $compare_func = $compare_func[0] . '::' . $compare_func[1]; - } - user_error('array_udiff() Not a valid callback ' . - $compare_func, E_USER_WARNING); - return; - } - - // Check arrays - $cnt = count($args); - for ($i = 0; $i < $cnt; $i++) { - if (!is_array($args[$i])) { - user_error('array_udiff() Argument #' . - ($i + 1). ' is not an array', E_USER_WARNING); - return; - } - } - - $diff = array (); - // Traverse values of the first array - foreach ($args[0] as $key => $value) { - // Check all arrays - for ($i = 1; $i < $cnt; $i++) { - foreach ($args[$i] as $cmp_value) { - $result = call_user_func($compare_func, $value, $cmp_value); - if ($result === 0) { - continue 3; - } - } - } - $diff[$key] = $value; - } - return $diff; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_udiff_assoc.php b/includes/pear/Compat/Function/array_udiff_assoc.php deleted file mode 100644 index ad62507c..00000000 --- a/includes/pear/Compat/Function/array_udiff_assoc.php +++ /dev/null @@ -1,85 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: array_udiff_assoc.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_udiff_assoc() - * - * @category PHP - * @package PHP_Compat - * @author Stephan Schmidt - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @link http://php.net/function.array-udiff-assoc - * @since PHP 5 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_udiff_assoc')) { - function array_udiff_assoc() - { - $args = func_get_args(); - if (count($args) < 3) { - user_error('Wrong parameter count for array_udiff_assoc()', E_USER_WARNING); - return; - } - - // Get compare function - $compare_func = array_pop($args); - if (!is_callable($compare_func)) { - if (is_array($compare_func)) { - $compare_func = $compare_func[0] . '::' . $compare_func[1]; - } - user_error('array_udiff_assoc() Not a valid callback ' . - $compare_func, E_USER_WARNING); - return; - } - - // Check arrays - $count = count($args); - for ($i = 0; $i < $count; $i++) { - if (!is_array($args[$i])) { - user_error('array_udiff_assoc() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - $diff = array (); - // Traverse values of the first array - foreach ($args[0] as $key => $value) { - // Check all arrays - for ($i = 1; $i < $count; $i++) { - if (!array_key_exists($key, $args[$i])) { - continue; - } - $result = call_user_func($compare_func, $value, $args[$i][$key]); - if ($result === 0) { - continue 2; - } - } - - $diff[$key] = $value; - } - - return $diff; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_udiff_uassoc.php b/includes/pear/Compat/Function/array_udiff_uassoc.php deleted file mode 100644 index 6cc8338d..00000000 --- a/includes/pear/Compat/Function/array_udiff_uassoc.php +++ /dev/null @@ -1,82 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_udiff_uassoc.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_udiff_uassoc() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_udiff_uassoc - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_udiff_uassoc')) { - function array_udiff_uassoc() - { - $args = func_get_args(); - if (count($args) < 3) { - user_error('Wrong parameter count for array_udiff_uassoc()', E_USER_WARNING); - return; - } - - // Get compare function - $compare_func = array_pop($args); - if (!is_callable($compare_func)) { - if (is_array($compare_func)) { - $compare_func = $compare_func[0] . '::' . $compare_func[1]; - } - user_error('array_udiff_uassoc() Not a valid callback ' . $compare_func, E_USER_WARNING); - return; - } - - // Check arrays - $count = count($args); - for ($i = 0; $i < $count; $i++) { - if (!is_array($args[$i])) { - user_error('array_udiff_uassoc() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Traverse values of the first array - $diff = array (); - foreach ($args[0] as $key => $value) { - // Check all arrays - for ($i = 1; $i < $count; $i++) { - if (!array_key_exists($key, $args[$i])) { - continue; - } - $result = call_user_func($compare_func, $value, $args[$i][$key]); - if ($result === 0) { - continue 2; - } - } - - $diff[$key] = $value; - } - - return $diff; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_uintersect.php b/includes/pear/Compat/Function/array_uintersect.php deleted file mode 100644 index baa079fd..00000000 --- a/includes/pear/Compat/Function/array_uintersect.php +++ /dev/null @@ -1,82 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: array_uintersect.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_uintersect() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_uintersect - * @author Tom Buskens - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_uintersect')) { - function array_uintersect() - { - $args = func_get_args(); - if (count($args) < 3) { - user_error('wrong parameter count for array_uintersect()', - E_USER_WARNING); - return; - } - - // Get compare function - $user_func = array_pop($args); - if (!is_callable($user_func)) { - if (is_array($user_func)) { - $user_func = $user_func[0] . '::' . $user_func[1]; - } - user_error('array_uintersect() Not a valid callback ' . - $user_func, E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i < $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_uintersect() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Compare entries - $output = array(); - foreach ($args[0] as $key => $item) { - for ($i = 1; $i !== $array_count; $i++) { - $array = $args[$i]; - foreach($array as $key0 => $item0) { - if (!call_user_func($user_func, $item, $item0)) { - $output[$key] = $item; - } - } - } - } - - return $output; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_uintersect_assoc.php b/includes/pear/Compat/Function/array_uintersect_assoc.php deleted file mode 100644 index 8f5f1a7b..00000000 --- a/includes/pear/Compat/Function/array_uintersect_assoc.php +++ /dev/null @@ -1,81 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: array_uintersect_assoc.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_uintersect_assoc() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_uintersect_assoc - * @author Tom Buskens - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_uintersect_assoc')) { - function array_uintersect_assoc() - { - $args = func_get_args(); - if (count($args) < 3) { - user_error('wrong parameter count for array_uintersect_assoc()', E_USER_WARNING); - return; - } - - // Get compare function - $user_func = array_pop($args); - if (!is_callable($user_func)) { - if (is_array($user_func)) { - $user_func = $user_func[0] . '::' . $user_func[1]; - } - user_error('array_uintersect_assoc() Not a valid callback ' . - $user_func, E_USER_WARNING); - return; - } - - // Check arrays - $array_count = count($args); - for ($i = 0; $i < $array_count; $i++) { - if (!is_array($args[$i])) { - user_error('array_uintersect_assoc() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Compare entries - $output = array(); - foreach ($args[0] as $key => $item) { - for ($i = 1; $i !== $array_count; $i++) { - if (array_key_exists($key, $args[$i])) { - $compare = call_user_func($user_func, $item, $args[$i][$key]); - if ($compare === 0) { - $output[$key] = $item; - } - } - } - } - - return $output; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_uintersect_uassoc.php b/includes/pear/Compat/Function/array_uintersect_uassoc.php deleted file mode 100644 index c3ec7faa..00000000 --- a/includes/pear/Compat/Function/array_uintersect_uassoc.php +++ /dev/null @@ -1,97 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: array_uintersect_uassoc.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_uintersect_uassoc() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_uintersect_uassoc - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_uintersect_uassoc')) { - function array_uintersect_uassoc() - { - $args = func_get_args(); - if (count($args) < 4) { - user_error('Wrong parameter count for array_uintersect_uassoc()', - E_USER_WARNING); - return; - } - - // Get key_compare_func - $key_compare_func = array_pop($args); - if (!is_callable($key_compare_func)) { - if (is_array($key_compare_func)) { - $key_compare_func = $key_compare_func[0] . '::' . $key_compare_func[1]; - } - user_error('array_uintersect_uassoc() Not a valid callback ' . - $key_compare_func, E_USER_WARNING); - return; - } - - // Get data_compare_func - $data_compare_func = array_pop($args); - if (!is_callable($data_compare_func)) { - if (is_array($data_compare_func)) { - $data_compare_func = $data_compare_func[0] . '::' . $data_compare_func[1]; - } - user_error('array_uintersect_uassoc() Not a valid callback ' - . $data_compare_func, E_USER_WARNING); - return; - } - - // Check arrays - $count = count($args); - for ($i = 0; $i !== $count; $i++) { - if (!is_array($args[$i])) { - user_error('array_uintersect_uassoc() Argument #' . - ($i + 1) . ' is not an array', E_USER_WARNING); - return; - } - } - - // Traverse values of the first array - $intersect = array (); - foreach ($args[0] as $key => $value) { - // Check against each array - for ($i = 1; $i < $count; $i++) { - // Traverse each element in current array - foreach ($args[$i] as $ckey => $cvalue) { - // Compare key and value - if (call_user_func($key_compare_func, $key, $ckey) === 0 && - call_user_func($data_compare_func, $value, $cvalue) === 0) - { - - $intersect[$key] = $value; - continue; - } - } - } - } - - return $intersect; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/array_walk_recursive.php b/includes/pear/Compat/Function/array_walk_recursive.php deleted file mode 100644 index b37c7d77..00000000 --- a/includes/pear/Compat/Function/array_walk_recursive.php +++ /dev/null @@ -1,68 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: array_walk_recursive.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace array_walk_recursive() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.array_walk_recursive - * @author Tom Buskens - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.6 (is_callable) - */ -if (!function_exists('array_walk_recursive')) { - function array_walk_recursive(&$input, $funcname) - { - if (!is_callable($funcname)) { - if (is_array($funcname)) { - $funcname = $funcname[0] . '::' . $funcname[1]; - } - user_error('array_walk_recursive() Not a valid callback ' . $user_func, - E_USER_WARNING); - return; - } - - if (!is_array($input)) { - user_error('array_walk_recursive() The argument should be an array', - E_USER_WARNING); - return; - } - - $args = func_get_args(); - - foreach ($input as $key => $item) { - if (is_array($item)) { - array_walk_recursive($item, $funcname, $args); - $input[$key] = $item; - } else { - $args[0] = &$item; - $args[1] = &$key; - call_user_func_array($funcname, $args); - $input[$key] = $item; - } - } - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/clone.php b/includes/pear/Compat/Function/clone.php deleted file mode 100644 index 84a4c11a..00000000 --- a/includes/pear/Compat/Function/clone.php +++ /dev/null @@ -1,56 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: clone.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace clone() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/language.oop5.cloning - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5.0.0 - * @require PHP 4.0.0 (user_error) - */ -if (version_compare(phpversion(), '5.0') === -1) { - // Needs to be wrapped in eval as clone is a keyword in PHP5 - eval(' - function clone($object) - { - // Sanity check - if (!is_object($object)) { - user_error(\'clone() __clone method called on non-object\', E_USER_WARNING); - return; - } - - // Use serialize/unserialize trick to deep copy the object - $object = unserialize(serialize($object)); - - // If there is a __clone method call it on the "new" class - if (method_exists($object, \'__clone\')) { - $object->__clone(); - } - - return $object; - } - '); -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/convert_uudecode.php b/includes/pear/Compat/Function/convert_uudecode.php deleted file mode 100644 index 0180f534..00000000 --- a/includes/pear/Compat/Function/convert_uudecode.php +++ /dev/null @@ -1,79 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: convert_uudecode.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace convert_uudecode() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.convert_uudecode - * @author Michael Wallner - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('convert_uudecode')) { - function convert_uudecode($string) - { - // Sanity check - if (!is_scalar($string)) { - user_error('convert_uuencode() expects parameter 1 to be string, ' . - gettype($string) . ' given', E_USER_WARNING); - return false; - } - - if (strlen($string) < 8) { - user_error('convert_uuencode() The given parameter is not a valid uuencoded string', E_USER_WARNING); - return false; - } - - $decoded = ''; - foreach (explode("\n", $string) as $line) { - - $c = count($bytes = unpack('c*', substr(trim($line), 1))); - - while ($c % 4) { - $bytes[++$c] = 0; - } - - foreach (array_chunk($bytes, 4) as $b) { - $b0 = $b[0] == 0x60 ? 0 : $b[0] - 0x20; - $b1 = $b[1] == 0x60 ? 0 : $b[1] - 0x20; - $b2 = $b[2] == 0x60 ? 0 : $b[2] - 0x20; - $b3 = $b[3] == 0x60 ? 0 : $b[3] - 0x20; - - $b0 <<= 2; - $b0 |= ($b1 >> 4) & 0x03; - $b1 <<= 4; - $b1 |= ($b2 >> 2) & 0x0F; - $b2 <<= 6; - $b2 |= $b3 & 0x3F; - - $decoded .= pack('c*', $b0, $b1, $b2); - } - } - - return rtrim($decoded, "\0"); - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/convert_uuencode.php b/includes/pear/Compat/Function/convert_uuencode.php deleted file mode 100644 index d1ec04b1..00000000 --- a/includes/pear/Compat/Function/convert_uuencode.php +++ /dev/null @@ -1,79 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: convert_uuencode.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace convert_uuencode() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.convert_uuencode - * @author Michael Wallner - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('convert_uuencode')) { - function convert_uuencode($string) - { - // Sanity check - if (!is_scalar($string)) { - user_error('convert_uuencode() expects parameter 1 to be string, ' . - gettype($string) . ' given', E_USER_WARNING); - return false; - } - - $u = 0; - $encoded = ''; - - while ($c = count($bytes = unpack('c*', substr($string, $u, 45)))) { - $u += 45; - $encoded .= pack('c', $c + 0x20); - - while ($c % 3) { - $bytes[++$c] = 0; - } - - foreach (array_chunk($bytes, 3) as $b) { - $b0 = ($b[0] & 0xFC) >> 2; - $b1 = (($b[0] & 0x03) << 4) + (($b[1] & 0xF0) >> 4); - $b2 = (($b[1] & 0x0F) << 2) + (($b[2] & 0xC0) >> 6); - $b3 = $b[2] & 0x3F; - - $b0 = $b0 ? $b0 + 0x20 : 0x60; - $b1 = $b1 ? $b1 + 0x20 : 0x60; - $b2 = $b2 ? $b2 + 0x20 : 0x60; - $b3 = $b3 ? $b3 + 0x20 : 0x60; - - $encoded .= pack('c*', $b0, $b1, $b2, $b3); - } - - $encoded .= "\n"; - } - - // Add termination characters - $encoded .= "\x60\n"; - - return $encoded; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/debug_print_backtrace.php b/includes/pear/Compat/Function/debug_print_backtrace.php deleted file mode 100644 index e6a157b5..00000000 --- a/includes/pear/Compat/Function/debug_print_backtrace.php +++ /dev/null @@ -1,67 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: debug_print_backtrace.php,v 1.1 2005/07/23 05:56:02 Tony Exp $ - - -/** - * Replace debug_print_backtrace() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.debug_print_backtrace - * @author Laurent Laville - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 - */ -if (!function_exists('debug_print_backtrace2')) { - function debug_print_backtrace2() - { - // Get backtrace - $backtrace = debug_backtrace(); - - // Unset call to debug_print_backtrace - array_shift($backtrace); - - // Iterate backtrace - $calls = array(); - foreach ($backtrace as $i => $call) { - $location = $call['file'] . ':' . $call['line']; - $function = (isset($call['class'])) ? - $call['class'] . '.' . $call['function'] : - $call['function']; - - $params = ''; - if (isset($call['args'])) { - $params = implode(', ', $call['args']); - } - - $calls[] = sprintf('#%d %s(%s) called at [%s]', - $i, - $function, - $params, - $location); - } - - echo implode("\n", $calls); - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/file_get_contents.php b/includes/pear/Compat/Function/file_get_contents.php deleted file mode 100644 index 770e44b2..00000000 --- a/includes/pear/Compat/Function/file_get_contents.php +++ /dev/null @@ -1,57 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: file_get_contents.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace file_get_contents() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.file_get_contents - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @internal resource_context is not supported - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('file_get_contents')) { - function file_get_contents($filename, $incpath = false, $resource_context = null) - { - if (false === $fh = fopen($filename, 'rb', $incpath)) { - user_error('file_get_contents() failed to open stream: No such file or directory', - E_USER_WARNING); - return false; - } - - clearstatcache(); - if ($fsize = @filesize($filename)) { - $data = fread($fh, $fsize); - } else { - $data = ''; - while (!feof($fh)) { - $data .= fread($fh, 8192); - } - } - - fclose($fh); - return $data; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/file_put_contents.php b/includes/pear/Compat/Function/file_put_contents.php deleted file mode 100644 index b3a369d0..00000000 --- a/includes/pear/Compat/Function/file_put_contents.php +++ /dev/null @@ -1,104 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: file_put_contents.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -if (!defined('FILE_USE_INCLUDE_PATH')) { - define('FILE_USE_INCLUDE_PATH', 1); -} - -if (!defined('FILE_APPEND')) { - define('FILE_APPEND', 8); -} - - -/** - * Replace file_put_contents() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.file_put_contents - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @internal resource_context is not supported - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('file_put_contents')) { - function file_put_contents($filename, $content, $flags = null, $resource_context = null) - { - // If $content is an array, convert it to a string - if (is_array($content)) { - $content = implode('', $content); - } - - // If we don't have a string, throw an error - if (!is_scalar($content)) { - user_error('file_put_contents() The 2nd parameter should be either a string or an array', - E_USER_WARNING); - return false; - } - - // Get the length of date to write - $length = strlen($content); - - // Check what mode we are using - $mode = ($flags & FILE_APPEND) ? - $mode = 'a' : - $mode = 'w'; - - // Check if we're using the include path - $use_inc_path = ($flags & FILE_USE_INCLUDE_PATH) ? - true : - false; - - // Open the file for writing - if (($fh = @fopen($filename, $mode, $use_inc_path)) === false) { - user_error('file_put_contents() failed to open stream: Permission denied', - E_USER_WARNING); - return false; - } - - // Write to the file - $bytes = 0; - if (($bytes = @fwrite($fh, $content)) === false) { - $errormsg = sprintf('file_put_contents() Failed to write %d bytes to %s', - $length, - $filename); - user_error($errormsg, E_USER_WARNING); - return false; - } - - // Close the handle - @fclose($fh); - - // Check all the data was written - if ($bytes != $length) { - $errormsg = sprintf('file_put_contents() Only %d of %d bytes written, possibly out of free disk space.', - $bytes, - $length); - user_error($errormsg, E_USER_WARNING); - return false; - } - - // Return length - return $bytes; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/fprintf.php b/includes/pear/Compat/Function/fprintf.php deleted file mode 100644 index 8af49713..00000000 --- a/includes/pear/Compat/Function/fprintf.php +++ /dev/null @@ -1,54 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: fprintf.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace fprintf() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.fprintf - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('fprintf')) { - function fprintf() { - $args = func_get_args(); - - if (count($args) < 2) { - user_error('Wrong parameter count for fprintf()', E_USER_WARNING); - return; - } - - $resource_handle = array_shift($args); - $format = array_shift($args); - - if (!is_resource($resource_handle)) { - user_error('fprintf() supplied argument is not a valid stream resource', - E_USER_WARNING); - return false; - } - - return fwrite($resource_handle, vsprintf($format, $args)); - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/get_headers.php b/includes/pear/Compat/Function/get_headers.php deleted file mode 100644 index 129a4f61..00000000 --- a/includes/pear/Compat/Function/get_headers.php +++ /dev/null @@ -1,77 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: get_headers.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace get_headers() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.get_headers - * @author Aeontech - * @author Cpurruc - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5.0.0 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('get_headers')) { - function get_headers($url, $format = 0) - { - // Init - $urlinfo = parse_url($url); - $port = isset($urlinfo['port']) ? $urlinfo['port'] : 80; - - // Connect - $fp = fsockopen($urlinfo['host'], $port, $errno, $errstr, 30); - if ($fp === false) { - return false; - } - - // Send request - $head = 'HEAD ' . $urlinfo['path'] . - (isset($urlinfo['query']) ? '?' . $urlinfo['query'] : '') . - ' HTTP/1.0' . "\r\n" . - 'Host: ' . $urlinfo['host'] . "\r\n\r\n"; - fputs($fp, $head); - - // Read - while (!feof($fp)) { - if ($header = trim(fgets($fp, 1024))) { - list($key) = explode(':', $header); - - if ($format === 1) { - // First element is the HTTP header type, such as HTTP 200 OK - // It doesn't have a separate name, so check for it - if ($key == $header) { - $headers[] = $header; - } else { - $headers[$key] = substr($header, strlen($key)+2); - } - } else { - $headers[] = $header; - } - } - } - - return $headers; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/get_include_path.php b/includes/pear/Compat/Function/get_include_path.php deleted file mode 100644 index ffa86c8b..00000000 --- a/includes/pear/Compat/Function/get_include_path.php +++ /dev/null @@ -1,39 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: get_include_path.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace get_include_path() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.get_include_path - * @author Stephan Schmidt - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @require PHP 4.0.0 - */ -if (!function_exists('get_include_path')) { - function get_include_path() - { - return ini_get('include_path'); - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/html_entity_decode.php b/includes/pear/Compat/Function/html_entity_decode.php deleted file mode 100644 index 2bdb0189..00000000 --- a/includes/pear/Compat/Function/html_entity_decode.php +++ /dev/null @@ -1,72 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: html_entity_decode.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -if (!defined('ENT_NOQUOTES')) { - define('ENT_NOQUOTES', 0); -} - -if (!defined('ENT_COMPAT')) { - define('ENT_COMPAT', 2); -} - -if (!defined('ENT_QUOTES')) { - define('ENT_QUOTES', 3); -} - - -/** - * Replace html_entity_decode() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.html_entity_decode - * @author David Irvine - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @internal Setting the charset will not do anything - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('html_entity_decode')) { - function html_entity_decode($string, $quote_style = ENT_COMPAT, $charset = null) - { - if (!is_int($quote_style)) { - user_error('html_entity_decode() expects parameter 2 to be long, ' . - gettype($quote_style) . ' given', E_USER_WARNING); - return; - } - - $trans_tbl = get_html_translation_table(HTML_ENTITIES); - $trans_tbl = array_flip($trans_tbl); - - // Add single quote to translation table; - $trans_tbl['''] = '\''; - - // Not translating double quotes - if ($quote_style & ENT_NOQUOTES) { - // Remove double quote from translation table - unset($trans_tbl['"']); - } - - return strtr($string, $trans_tbl); - } -} -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/http_build_query.php b/includes/pear/Compat/Function/http_build_query.php deleted file mode 100644 index 81a318f4..00000000 --- a/includes/pear/Compat/Function/http_build_query.php +++ /dev/null @@ -1,99 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: http_build_query.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace function http_build_query() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.http-build-query - * @author Stephan Schmidt - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('http_build_query')) { - function http_build_query($formdata, $numeric_prefix = null) - { - // If $formdata is an object, convert it to an array - if (is_object($formdata)) { - $formdata = get_object_vars($formdata); - } - - // Check we have an array to work with - if (!is_array($formdata)) { - user_error('http_build_query() Parameter 1 expected to be Array or Object. Incorrect value given.', - E_USER_WARNING); - return false; - } - - // If the array is empty, return null - if (empty($formdata)) { - return; - } - - // Argument seperator - $separator = ini_get('arg_separator.output'); - - // Start building the query - $tmp = array (); - foreach ($formdata as $key => $val) { - if (is_integer($key) && $numeric_prefix != null) { - $key = $numeric_prefix . $key; - } - - if (is_scalar($val)) { - array_push($tmp, urlencode($key).'='.urlencode($val)); - continue; - } - - // If the value is an array, recursively parse it - if (is_array($val)) { - array_push($tmp, __http_build_query($val, urlencode($key))); - continue; - } - } - - return implode($separator, $tmp); - } - - // Helper function - function __http_build_query ($array, $name) - { - $tmp = array (); - foreach ($array as $key => $value) { - if (is_array($value)) { - array_push($tmp, __http_build_query($value, sprintf('%s[%s]', $name, $key))); - } elseif (is_scalar($value)) { - array_push($tmp, sprintf('%s[%s]=%s', $name, urlencode($key), urlencode($value))); - } elseif (is_object($value)) { - array_push($tmp, __http_build_query(get_object_vars($value), sprintf('%s[%s]', $name, $key))); - } - } - - // Argument seperator - $separator = ini_get('arg_separator.output'); - - return implode($separator, $tmp); - } -} -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/image_type_to_mime_type.php b/includes/pear/Compat/Function/image_type_to_mime_type.php deleted file mode 100644 index 1f05c7d7..00000000 --- a/includes/pear/Compat/Function/image_type_to_mime_type.php +++ /dev/null @@ -1,147 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: image_type_to_mime_type.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -if (!defined('IMAGETYPE_GIF')) { - define('IMAGETYPE_GIF', 1); -} - -if (!defined('IMAGETYPE_JPEG')) { - define('IMAGETYPE_JPEG', 2); -} - -if (!defined('IMAGETYPE_PNG')) { - define('IMAGETYPE_PNG', 3); -} - -if (!defined('IMAGETYPE_SWF')) { - define('IMAGETYPE_SWF', 4); -} - -if (!defined('IMAGETYPE_PSD')) { - define('IMAGETYPE_PSD', 5); -} - -if (!defined('IMAGETYPE_BMP')) { - define('IMAGETYPE_BMP', 6); -} - -if (!defined('IMAGETYPE_TIFF_II')) { - define('IMAGETYPE_TIFF_II', 7); -} - -if (!defined('IMAGETYPE_TIFF_MM')) { - define('IMAGETYPE_TIFF_MM', 8); -} - -if (!defined('IMAGETYPE_JPC')) { - define('IMAGETYPE_JPC', 9); -} - -if (!defined('IMAGETYPE_JP2')) { - define('IMAGETYPE_JP2', 10); -} - -if (!defined('IMAGETYPE_JPX')) { - define('IMAGETYPE_JPX', 11); -} - -if (!defined('IMAGETYPE_JB2')) { - define('IMAGETYPE_JB2', 12); -} - -if (!defined('IMAGETYPE_SWC')) { - define('IMAGETYPE_SWC', 13); -} - -if (!defined('IMAGETYPE_IFF')) { - define('IMAGETYPE_IFF', 14); -} - -if (!defined('IMAGETYPE_WBMP')) { - define('IMAGETYPE_WBMP', 15); -} - -if (!defined('IMAGETYPE_XBM')) { - define('IMAGETYPE_XBM', 16); -} - - -/** - * Replace image_type_to_mime_type() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.image_type_to_mime_type - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('image_type_to_mime_type')) { - function image_type_to_mime_type($imagetype) - { - switch ($imagetype): - case IMAGETYPE_GIF: - return 'image/gif'; - break; - case IMAGETYPE_JPEG: - return 'image/jpeg'; - break; - case IMAGETYPE_PNG: - return 'image/png'; - break; - case IMAGETYPE_SWF: - case IMAGETYPE_SWC: - return 'application/x-shockwave-flash'; - break; - case IMAGETYPE_PSD: - return 'image/psd'; - break; - case IMAGETYPE_BMP: - return 'image/bmp'; - break; - case IMAGETYPE_TIFF_MM: - case IMAGETYPE_TIFF_II: - return 'image/tiff'; - break; - case IMAGETYPE_JP2: - return 'image/jp2'; - break; - case IMAGETYPE_IFF: - return 'image/iff'; - break; - case IMAGETYPE_WBMP: - return 'image/vnd.wap.wbmp'; - break; - case IMAGETYPE_XBM: - return 'image/xbm'; - break; - case IMAGETYPE_JPX: - case IMAGETYPE_JB2: - case IMAGETYPE_JPC: - default: - return 'application/octet-stream'; - break; - - endswitch; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/ob_get_clean.php b/includes/pear/Compat/Function/ob_get_clean.php deleted file mode 100644 index 130b0424..00000000 --- a/includes/pear/Compat/Function/ob_get_clean.php +++ /dev/null @@ -1,46 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: ob_get_clean.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace ob_get_clean() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.ob_get_clean - * @author Aidan Lister - * @author Thiemo Mättig (http://maettig.com/) - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('ob_get_clean')) { - function ob_get_clean() - { - $contents = ob_get_contents(); - - if ($contents !== false) { - ob_end_clean(); - } - - return $contents; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/ob_get_flush.php b/includes/pear/Compat/Function/ob_get_flush.php deleted file mode 100644 index 3d2ef77e..00000000 --- a/includes/pear/Compat/Function/ob_get_flush.php +++ /dev/null @@ -1,46 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: ob_get_flush.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace ob_get_flush() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.ob_get_flush - * @author Aidan Lister - * @author Thiemo Mättig (http://maettig.com/) - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('ob_get_flush')) { - function ob_get_flush() - { - $contents = ob_get_contents(); - - if ($contents !== false) { - ob_end_flush(); - } - - return $contents; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/php_strip_whitespace.php b/includes/pear/Compat/Function/php_strip_whitespace.php deleted file mode 100644 index 39824358..00000000 --- a/includes/pear/Compat/Function/php_strip_whitespace.php +++ /dev/null @@ -1,86 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: php_strip_whitespace.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace php_strip_whitespace() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.php_strip_whitespace - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) + Tokenizer extension - */ -if (!function_exists('php_strip_whitespace')) { - function php_strip_whitespace($file) - { - // Sanity check - if (!is_scalar($file)) { - user_error('php_strip_whitespace() expects parameter 1 to be string, ' . - gettype($file) . ' given', E_USER_WARNING); - return; - } - - // Load file / tokens - $source = implode('', file($file)); - $tokens = token_get_all($source); - - // Init - $source = ''; - $was_ws = false; - - // Process - foreach ($tokens as $token) { - if (is_string($token)) { - // Single character tokens - $source .= $token; - } else { - list($id, $text) = $token; - - switch ($id) { - // Skip all comments - case T_COMMENT: - case T_ML_COMMENT: - case T_DOC_COMMENT: - break; - - // Remove whitespace - case T_WHITESPACE: - // We don't want more than one whitespace in a row replaced - if ($was_ws !== true) { - $source .= ' '; - } - $was_ws = true; - break; - - default: - $was_ws = false; - $source .= $text; - break; - } - } - } - - return $source; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/restore_include_path.php b/includes/pear/Compat/Function/restore_include_path.php deleted file mode 100644 index 7da7fae7..00000000 --- a/includes/pear/Compat/Function/restore_include_path.php +++ /dev/null @@ -1,37 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: restore_include_path.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace restore_include_path() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.restore_include_path - * @author Stephan Schmidt - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - */ -if (!function_exists('restore_include_path')) { - function restore_include_path() - { - return ini_restore('include_path'); - } -} -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/scandir.php b/includes/pear/Compat/Function/scandir.php deleted file mode 100644 index e3fc5bcc..00000000 --- a/includes/pear/Compat/Function/scandir.php +++ /dev/null @@ -1,69 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: scandir.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace scandir() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.scandir - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('scandir')) { - function scandir($directory, $sorting_order = 0) - { - if (!is_string($directory)) { - user_error('scandir() expects parameter 1 to be string, ' . - gettype($directory) . ' given', E_USER_WARNING); - return; - } - - if (!is_int($sorting_order) && !is_bool($sorting_order)) { - user_error('scandir() expects parameter 2 to be long, ' . - gettype($sorting_order) . ' given', E_USER_WARNING); - return; - } - - if (!is_dir($directory) || (false === $fh = @opendir($directory))) { - user_error('scandir() failed to open dir: Invalid argument', E_USER_WARNING); - return false; - } - - $files = array (); - while (false !== ($filename = readdir($fh))) { - $files[] = $filename; - } - - closedir($fh); - - if ($sorting_order == 1) { - rsort($files); - } else { - sort($files); - } - - return $files; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/set_include_path.php b/includes/pear/Compat/Function/set_include_path.php deleted file mode 100644 index 11f24e1f..00000000 --- a/includes/pear/Compat/Function/set_include_path.php +++ /dev/null @@ -1,37 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: set_include_path.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace set_include_path() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.set_include_path - * @author Stephan Schmidt - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - */ -if (!function_exists('set_include_path')) { - function set_include_path($new_include_path) - { - return ini_set('include_path', $new_include_path); - } -} -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/str_ireplace.php b/includes/pear/Compat/Function/str_ireplace.php deleted file mode 100644 index fb7e40eb..00000000 --- a/includes/pear/Compat/Function/str_ireplace.php +++ /dev/null @@ -1,113 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: str_ireplace.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace str_ireplace() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.str_ireplace - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - * @note count not by returned by reference, to enable - * change '$count = null' to '&$count' - */ -if (!function_exists('str_ireplace')) { - function str_ireplace($search, $replace, $subject, $count = null) - { - // Sanity check - if (is_string($search) && is_array($replace)) { - user_error('Array to string conversion', E_USER_NOTICE); - $replace = (string) $replace; - } - - // If search isn't an array, make it one - if (!is_array($search)) { - $search = array ($search); - } - $search = array_values($search); - - // If replace isn't an array, make it one, and pad it to the length of search - if (!is_array($replace)) { - $replace_string = $replace; - - $replace = array (); - for ($i = 0, $c = count($search); $i < $c; $i++) { - $replace[$i] = $replace_string; - } - } - $replace = array_values($replace); - - // Check the replace array is padded to the correct length - $length_replace = count($replace); - $length_search = count($search); - if ($length_replace < $length_search) { - for ($i = $length_replace; $i < $length_search; $i++) { - $replace[$i] = ''; - } - } - - // If subject is not an array, make it one - $was_array = false; - if (!is_array($subject)) { - $was_array = true; - $subject = array ($subject); - } - - // Loop through each subject - $count = 0; - foreach ($subject as $subject_key => $subject_value) { - // Loop through each search - foreach ($search as $search_key => $search_value) { - // Split the array into segments, in between each part is our search - $segments = explode(strtolower($search_value), strtolower($subject_value)); - - // The number of replacements done is the number of segments minus the first - $count += count($segments) - 1; - $pos = 0; - - // Loop through each segment - foreach ($segments as $segment_key => $segment_value) { - // Replace the lowercase segments with the upper case versions - $segments[$segment_key] = substr($subject_value, $pos, strlen($segment_value)); - // Increase the position relative to the initial string - $pos += strlen($segment_value) + strlen($search_value); - } - - // Put our original string back together - $subject_value = implode($replace[$search_key], $segments); - } - - $result[$subject_key] = $subject_value; - } - - // Check if subject was initially a string and return it as a string - if ($was_array === true) { - return $result[0]; - } - - // Otherwise, just return the array - return $result; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/str_shuffle.php b/includes/pear/Compat/Function/str_shuffle.php deleted file mode 100644 index a4dc8bf7..00000000 --- a/includes/pear/Compat/Function/str_shuffle.php +++ /dev/null @@ -1,53 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: str_shuffle.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace str_shuffle() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.str_shuffle - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('str_shuffle')) { - function str_shuffle($str) - { - $newstr = ''; - $strlen = strlen($str); - $str = (string) $str; - - // Seed - list($usec, $sec) = explode(' ', microtime()); - $seed = (float) $sec + ((float) $usec * 100000); - mt_srand($seed); - - // Shuffle - for ($i = 0; $strlen > $i; $i++) { - $newstr .= $str[mt_rand(0, $strlen - 1)]; - } - - return $newstr; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/str_split.php b/includes/pear/Compat/Function/str_split.php deleted file mode 100644 index dd784a0a..00000000 --- a/includes/pear/Compat/Function/str_split.php +++ /dev/null @@ -1,52 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: str_split.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace str_split() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.str_split - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('str_split')) { - function str_split($string, $split_length = 1) - { - if (!is_scalar($split_length)) { - user_error('str_split() expects parameter 2 to be long, ' . - gettype($split_length) . ' given', E_USER_WARNING); - return false; - } - - $split_length = (int) $split_length; - if ($split_length < 1) { - user_error('str_split() The length of each segment must be greater than zero', E_USER_WARNING); - return false; - } - - preg_match_all('/.{1,' . $split_length . '}/s', $string, $matches); - return $matches[0]; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/str_word_count.php b/includes/pear/Compat/Function/str_word_count.php deleted file mode 100644 index d818b150..00000000 --- a/includes/pear/Compat/Function/str_word_count.php +++ /dev/null @@ -1,68 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: str_word_count.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace str_word_count() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.str_word_count - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 4.3.0 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('str_word_count')) { - function str_word_count($string, $format = null) - { - if ($format !== 1 && $format !== 2 && $format !== null) { - user_error('str_word_count() The specified format parameter, "' . $format . '" is invalid', - E_USER_WARNING); - return false; - } - - $word_string = preg_replace('/[0-9]+/', '', $string); - $word_array = preg_split('/[^A-Za-z0-9_\']+/', $word_string, -1, PREG_SPLIT_NO_EMPTY); - - switch ($format) { - case null: - $result = count($word_array); - break; - - case 1: - $result = $word_array; - break; - - case 2: - $lastmatch = 0; - $word_assoc = array(); - foreach ($word_array as $word) { - $word_assoc[$lastmatch = strpos($string, $word, $lastmatch)] = $word; - $lastmatch += strlen($word); - } - $result = $word_assoc; - break; - } - - return $result; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/stripos.php b/includes/pear/Compat/Function/stripos.php deleted file mode 100644 index e5543ef1..00000000 --- a/includes/pear/Compat/Function/stripos.php +++ /dev/null @@ -1,73 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: stripos.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace stripos() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.stripos - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('stripos')) { - function stripos($haystack, $needle, $offset = null) - { - if (!is_scalar($haystack)) { - user_error('stripos() expects parameter 1 to be string, ' . - gettype($haystack) . ' given', E_USER_WARNING); - return false; - } - - if (!is_scalar($needle)) { - user_error('stripos() needle is not a string or an integer.', E_USER_WARNING); - return false; - } - - if (!is_int($offset) && !is_bool($offset) && !is_null($offset)) { - user_error('stripos() expects parameter 3 to be long, ' . - gettype($offset) . ' given', E_USER_WARNING); - return false; - } - - // Manipulate the string if there is an offset - $fix = 0; - if (!is_null($offset)) { - if ($offset > 0) { - $haystack = substr($haystack, $offset, strlen($haystack) - $offset); - $fix = $offset; - } - } - - $segments = explode(strtolower($needle), strtolower($haystack), 2); - - // Check there was a match - if (count($segments) == 1) { - return false; - } - - $position = strlen($segments[0]) + $fix; - return $position; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/strpbrk.php b/includes/pear/Compat/Function/strpbrk.php deleted file mode 100644 index 46d292c2..00000000 --- a/includes/pear/Compat/Function/strpbrk.php +++ /dev/null @@ -1,63 +0,0 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: strpbrk.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace strpbrk() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.strpbrk - * @author Stephan Schmidt - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('strpbrk')) { - function strpbrk($haystack, $char_list) - { - if (!is_scalar($haystack)) { - user_error('strpbrk() expects parameter 1 to be string, ' . - gettype($haystack) . ' given', E_USER_WARNING); - return false; - } - - if (!is_scalar($char_list)) { - user_error('strpbrk() expects parameter 2 to be scalar, ' . - gettype($needle) . ' given', E_USER_WARNING); - return false; - } - - $haystack = (string) $haystack; - $char_list = (string) $char_list; - - $len = strlen($haystack); - for ($i = 0; $i < $len; $i++) { - $char = substr($haystack, $i, 1); - if (strpos($char_list, $char) === false) { - continue; - } - return substr($haystack, $i); - } - - return false; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/strripos.php b/includes/pear/Compat/Function/strripos.php deleted file mode 100644 index 48d359b3..00000000 --- a/includes/pear/Compat/Function/strripos.php +++ /dev/null @@ -1,82 +0,0 @@ - | -// | Stephan Schmidt | -// +----------------------------------------------------------------------+ -// -// $Id: strripos.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace strripos() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.strripos - * @author Aidan Lister - * @author Stephan Schmidt - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('strripos')) { - function strripos($haystack, $needle, $offset = null) - { - if (!is_scalar($haystack)) { - user_error('strripos() expects parameter 1 to be scalar, ' . - gettype($haystack) . ' given', E_USER_WARNING); - return false; - } - - if (!is_scalar($needle)) { - user_error('strripos() expects parameter 2 to be scalar, ' . - gettype($needle) . ' given', E_USER_WARNING); - return false; - } - - if (!is_int($offset) && !is_bool($offset) && !is_null($offset)) { - user_error('strripos() expects parameter 3 to be long, ' . - gettype($offset) . ' given', E_USER_WARNING); - return false; - } - - // Manipulate the string if there is an offset - $fix = 0; - if (!is_null($offset)) { - // If the offset is larger than the haystack, return - if (abs($offset) >= strlen($haystack)) { - return false; - } - - // Check whether offset is negative or positive - if ($offset > 0) { - $haystack = substr($haystack, $offset, strlen($haystack) - $offset); - // We need to add this to the position of the needle - $fix = $offset; - } else { - $haystack = substr($haystack, 0, strlen($haystack) + $offset); - } - } - - $segments = explode(strtolower($needle), strtolower($haystack)); - - $last_seg = count($segments) - 1; - $position = strlen($haystack) + $fix - strlen($segments[$last_seg]) - strlen($needle); - - return $position; - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Compat/Function/substr_compare.php b/includes/pear/Compat/Function/substr_compare.php deleted file mode 100644 index 45757256..00000000 --- a/includes/pear/Compat/Function/substr_compare.php +++ /dev/null @@ -1,74 +0,0 @@ - | -// | Aidan Lister | -// +----------------------------------------------------------------------+ -// -// $Id: substr_compare.php,v 1.1 2005/07/23 05:56:03 Tony Exp $ - - -/** - * Replace substr_compare() - * - * @category PHP - * @package PHP_Compat - * @link http://php.net/function.substr_compare - * @author Tom Buskens - * @author Aidan Lister - * @version $Revision: 1.1 $ - * @since PHP 5 - * @require PHP 4.0.0 (user_error) - */ -if (!function_exists('substr_compare')) { - function substr_compare($main_str, $str, $offset, $length = null, $case_insensitive = false) - { - if (!is_string($main_str)) { - user_error('substr_compare() expects parameter 1 to be string, ' . - gettype($main_str) . ' given', E_USER_WARNING); - return; - } - - if (!is_string($str)) { - user_error('substr_compare() expects parameter 2 to be string, ' . - gettype($str) . ' given', E_USER_WARNING); - return; - } - - if (!is_int($offset)) { - user_error('substr_compare() expects parameter 3 to be long, ' . - gettype($offset) . ' given', E_USER_WARNING); - return; - } - - if (is_null($length)) { - $length = strlen($main_str) - $offset; - } elseif ($offset >= strlen($main_str)) { - user_error('substr_compare() The start position cannot exceed initial string length', - E_USER_WARNING); - return false; - } - - $main_str = substr($main_str, $offset, $length); - $str = substr($str, 0, strlen($main_str)); - - if ($case_insensitive === false) { - return strcmp($main_str, $str); - } else { - return strcasecmp($main_str, $str); - } - } -} - -?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas.php b/includes/pear/Image/Canvas.php index 7be71264..25cb45e9 100644 --- a/includes/pear/Image/Canvas.php +++ b/includes/pear/Image/Canvas.php @@ -1,709 +1,733 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Canvas.php,v 1.5 2005/09/30 18:59:35 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * Specfies the path to the system location of font files. - * - * Remember trailing slash! - * - * This is set by default on Windows systems to %SystemRoot%\Fonts\ - */ -if (!defined('IMAGE_CANVAS_SYSTEM_FONT_PATH')) { - if (isset($_SERVER['SystemRoot'])) { - define('IMAGE_CANVAS_SYSTEM_FONT_PATH', $_SERVER['SystemRoot'] . '/Fonts/'); - } else { - /** - * @ignore - */ - define('IMAGE_CANVAS_SYSTEM_FONT_PATH', ''); - } -} - -/** - * Class for handling different output formats - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - * @abstract - */ -class Image_Canvas -{ - - /** - * The leftmost pixel of the element on the canvas - * @var int - * @access private - */ - var $_left = 0; - - /** - * The topmost pixel of the element on the canvas - * @var int - * @access private - */ - var $_top = 0; - - /** - * The width of the graph - * @var int - * @access private - */ - var $_width = 0; - - /** - * The height of the graph - * @var int - * @access private - */ - var $_height = 0; - - /** - * Polygon vertex placeholder - * @var array - * @access private - */ - var $_polygon = array(); - - /** - * The thickness of the line(s) - * @var int - * @access private - */ - var $_thickness = 1; - - /** - * The line style - * @var mixed - * @access private - */ - var $_lineStyle = 'transparent'; - - /** - * The fill style - * @var mixed - * @access private - */ - var $_fillStyle = 'transparent'; - - /** - * The font options - * @var array - * @access private - */ - var $_font = array(); - - /** - * The default font - * @var array - * @access private - */ - var $_defaultFont = array('name' => 'Courier New', 'color' => 'black', 'size' => 9); - - /** - * Create the canvas. - * - * Parameters available: - * - * 'width' The width of the graph on the canvas - * - * 'height' The height of the graph on the canvas - * - * 'left' The left offset of the graph on the canvas - * - * 'top' The top offset of the graph on the canvas - * - * @param array $params Parameter array - * @abstract - */ - function Image_Canvas($params) - { - if (isset($params['left'])) { - $this->_left = $params['left']; - } - - if (isset($params['top'])) { - $this->_top = $params['top']; - } - - if (isset($params['width'])) { - $this->_width = $params['width']; - } - - if (isset($params['height'])) { - $this->_height = $params['height']; - } - - $this->setDefaultFont($this->_defaultFont); - } - - /** - * Get the x-point from the relative to absolute coordinates - * - * @param float $x The relative x-coordinate (in percentage of total width) - * @return float The x-coordinate as applied to the canvas - * @access private - */ - function _getX($x) - { - return floor($this->_left + $x); - } - - /** - * Get the y-point from the relative to absolute coordinates - * - * @param float $y The relative y-coordinate (in percentage of total width) - * @return float The y-coordinate as applied to the canvas - * @access private - */ - function _getY($y) - { - return floor($this->_top + $y); - } - - /** - * Get the width of the canvas - * - * @return int The width - */ - function getWidth() - { - return $this->_width; - } - - /** - * Get the height of the canvas - * - * @return int The height - */ - function getHeight() - { - return $this->_height; - } - - /** - * Sets the thickness of the line(s) to be drawn - * - * @param int $thickness The actual thickness (in pixels) - */ - function setLineThickness($thickness) - { - $this->_thickness = $thickness; - } - - /** - * Sets the color of the line(s) to be drawn - * - * @param mixed $color The color of the line - */ - function setLineColor($color) - { - $this->_lineStyle = $color; - } - - /** - * Sets the style of the filling of drawn objects. - * - * This method gives simple access to setFillColor(), setFillImage() and - * setGradientFill() - * - * @param mixed $fill The fill style - */ - function setFill($fill) - { - if (is_array($fill)) { - $this->setGradientFill($fill); - } elseif (file_exists($fill)) { - $this->setFillImage($fill); - } else { - $this->setFillColor($fill); - } - } - - /** - * Sets the color of the filling of drawn objects - * - * @param mixed $color The fill color - */ - function setFillColor($color) - { - $this->_fillStyle = $color; - } - - /** - * Sets an image that should be used for filling - * - * @param string $filename The filename of the image to fill with - */ - function setFillImage($filename) - { - } - - /** - * Sets a gradient fill - * - * @param array $gradient Gradient fill options - */ - function setGradientFill($gradient) - { - $this->_fillStyle = $gradient; - } - - /** - * Sets the font options. - * - * The $font array may have the following entries: - * - * 'name' The name of the font. This name must either be supported - * natively by the canvas or mapped to a font using the font-mapping scheme - * - * 'size' Size in pixels - * - * 'angle' The angle with which to write the text - * - * @param array $fontOptions The font options. - */ - function setFont($fontOptions) - { - $this->_font = $fontOptions; - - if (!isset($this->_font['color'])) { - $this->_font['color'] = 'black'; - } - - if (!(isset($this->_font['angle'])) || ($this->_font['angle'] === false)) { - $this->_font['angle'] = 0; - } - - if (isset($this->_font['angle'])) { - if ((($this->_font['angle'] > 45) && ($this->_font['angle'] < 135)) || - (($this->_font['angle'] > 225) && ($this->_font['angle'] < 315)) - ) { - $this->_font['vertical'] = true; - } - } - - if ((!isset($this->_font['file'])) && (isset($this->_font['name']))) { - include_once 'Image/Canvas/Tool.php'; - $this->_font['file'] = Image_Canvas_Tool::fontMap($this->_font['name']); - } - } - - /** - * Sets the default font options. - * - * The $font array may have the following entries: - * - * 'name' The name of the font. This name must either be supported - * natively by the canvas or mapped to a font using the font-mapping scheme - * - * 'size' Size in pixels - * - * 'angle' The angle with which to write the text - * - * @param array $fontOptions The font options. - */ - function setDefaultFont($fontOptions) - { - $this->setFont($fontOptions); - $this->_defaultFont = $this->_font; - } - - /** - * Resets the canvas. - * - * Includes fillstyle, linestyle, thickness and polygon - * - * @access private - */ - function _reset() - { - $this->_lineStyle = false; - $this->_fillStyle = false; - $this->_thickness = 1; - $this->_polygon = array(); - $this->_font = $this->_defaultFont; - } - - /** - * Draw a line end - * - * Parameter array: - * 'x': int X point - * 'y': int Y point - * 'end': string The end type of the end - * 'angle': int [optional] The angle with which to draw the end - * @param array $params Parameter array - */ - function drawEnd($params) - { - } - - /** - * Draw a line - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'end0': string [optional] The end type of end0 (the start) - * 'end1': string [optional] The end type of end1 (the end) - * 'size0': int [optional] The size of end0 - * 'size1': int [optional] The size of end1 - * 'color': mixed [optional] The line color - * @param array $params Parameter array - */ - function line($params) - { - $x0 = $this->_getX($params['x0']); - $y0 = $this->_getY($params['y0']); - $x1 = $this->_getX($params['x1']); - $y1 = $this->_getY($params['y1']); - if (isset($params['end0'])) { - $angle = Image_Canvas_Tool::getAngle($x1, $y1, $x0, $y0); - $this->drawEnd( - array( - 'end' => $params['end0'], - 'x' => $params['x0'], - 'y' => $params['y0'], - 'angle' => $angle, - 'color' => (isset($params['color0']) ? $params['color0'] : false), - 'size' => $params['size0'] - ) - ); - } - if (isset($params['end1'])) { - $angle = Image_Canvas_Tool::getAngle($x0, $y0, $x1, $y1); - //print "
"; var_dump($params, $angle); print "
"; - $this->drawEnd( - array( - 'end' => $params['end1'], - 'x' => $params['x1'], - 'y' => $params['y1'], - 'angle' => $angle, - 'color' => (isset($params['color1']) ? $params['color1'] : false), - 'size' => $params['size1'] - ) - ); - } - $this->_reset(); - } - - /** - * Adds vertex to a polygon - * - * Parameter array: - * 'x': int X point - * 'y': int Y point - * 'url': string [optional] URL to link the vertex to (must be used with 'map_vertices' in polygon() on a canvas that support image maps) - * 'alt': string [optional] Alternative text to show in the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) - * 'target': string [optional] The link target on the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) - * 'mapsize': int [optional] The size of the "map", i.e. the size of the hot spot (must be used with 'map_vertices' in polygon() on a canvas that support image maps) - * @param array $params Parameter array - */ - function addVertex($params) - { - $params['X'] = $this->_getX($params['x']); - $params['Y'] = $this->_getY($params['y']); - $this->_polygon[] = $params; - } - - /** - * Adds "splined" vertex to a polygon - * - * Parameter array: - * 'x': int X point - * 'y': int Y point - * 'p1x': int X Control point 1 - * 'p1y': int Y Control point 1 - * 'p2x': int X Control point 2 - * 'p2y': int Y Control point 2 - * 'url': string [optional] URL to link the vertex to (must be used with 'map_vertices' in polygon() on a canvas that support image maps) - * 'alt': string [optional] Alternative text to show in the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) - * 'target': string [optional] The link target on the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) - * 'mapsize': int [optional] The size of the "map", i.e. the size of the hot spot (must be used with 'map_vertices' in polygon() on a canvas that support image maps) - * @param array $params Parameter array - */ - function addSpline($params) - { - $params['X'] = $this->_getX($params['x']); - $params['Y'] = $this->_getY($params['y']); - $params['P1X'] = $this->_getX($params['p1x']); - $params['P1Y'] = $this->_getY($params['p1y']); - $params['P2X'] = $this->_getX($params['p2x']); - $params['P2Y'] = $this->_getY($params['p2y']); - $this->_polygon[] = $params; - } - - /** - * Draws a polygon - * - * Parameter array: - * 'connect': bool [optional] Specifies whether the start point should be - * connected to the endpoint (closed polygon) or not (connected line) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function polygon($params) - { - $this->_reset(); - } - - /** - * Draw a rectangle - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function rectangle($params) - { - $this->_reset(); - } - - /** - * Draw an ellipse - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function ellipse($params) - { - $this->_reset(); - } - - /** - * Draw a pie slice - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'v1': int The starting angle (in degrees) - * 'v2': int The end angle (in degrees) - * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) - * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function pieslice($params) - { - $this->_reset(); - } - - /** - * Get the width of a text, - * - * @param string $text The text to get the width of - * @return int The width of the text - */ - function textWidth($text) - { - } - - /** - * Get the height of a text, - * - * @param string $text The text to get the height of - * @return int The height of the text - */ - function textHeight($text) - { - } - - /** - * Writes text - * - * Parameter array: - * 'x': int X-point of text - * 'y': int Y-point of text - * 'text': string The text to add - * 'alignment': array [optional] Alignment - * 'color': mixed [optional] The color of the text - */ - function addText($params) - { - $this->_reset(); - } - - /** - * Overlay image - * - * Parameter array: - * 'x': int X-point of overlayed image - * 'y': int Y-point of overlayed image - * 'filename': string The filename of the image to overlay - * 'width': int [optional] The width of the overlayed image (resizing if possible) - * 'height': int [optional] The height of the overlayed image (resizing if possible) - * 'alignment': array [optional] Alignment - */ - function image($params) - { - } - - /** - * Start a group. - * - * What this does, depends on the canvas/format. - * - * @param string $name The name of the group - */ - function startGroup($name = false) - { - } - - /** - * End the "current" group. - * - * What this does, depends on the canvas/format. - */ - function endGroup() - { - } - - /** - * Output the result of the canvas to the browser - * - * @param array $params Parameter array, the contents and meaning depends on the actual Canvas - * @abstract - */ - function show($params = false) - { - if ($params === false) { - header('Expires: Tue, 2 Jul 1974 17:41:00 GMT'); // Date in the past - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified - header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 - header('Pragma: no-cache'); - } - } - - /** - * Save the result of the canvas to a file - * - * Parameter array: - * 'filename': string The file to output to - * @param array $params Parameter array, the contents and meaning depends on the actual Canvas - * @abstract - */ - function save($params = false) - { - } - - /** - * Get a canvas specific HTML tag. - * - * This method implicitly saves the canvas to the filename in the - * filesystem path specified and parses it as URL specified by URL path - * - * Parameter array: - * 'filename': string - * 'filepath': string Path to the file on the file system. Remember the final slash - * 'urlpath': string Path to the file available through an URL. Remember the final slash - */ - function toHtml($params) - { - $this->save(array('filename' => $params['filepath'] . $params['filename'])); - } - - /** - * Canvas factory method. - * - * Supported canvass are: - * - * 'png': output in PNG format (using GD) - * - * 'jpg': output in JPEG format (using GD) - * - * 'pdf': output in PDF format (using PDFlib) - * - * 'svg': output in SVG format - * - * 'imagemap': output as a html image map - * - * An example of usage: - * - * - * 800, 'height' => 600, 'antialias' => 'native') - * ); - * ?> - * - * - * @param string $canvas The canvas type - * @param array $params The parameters for the canvas constructor - * @return Image_Canvas The newly created canvas - * @static - */ - function &factory($canvas, $params) - { - $canvas = strtoupper($canvas); - - if (($canvas == 'PNG') || ($canvas == 'GD')) { - $canvas = 'GD_PNG'; - } - if (($canvas == 'JPG') || ($canvas == 'JPEG')) { - $canvas = 'GD_JPG'; - } - - if ($canvas == 'IMAGEMAP') { - $canvas = 'ImageMap'; - } - - $class = 'Image_Canvas_'. $canvas; - include_once 'Image/Canvas/'. str_replace('_', '/', $canvas) . '.php'; - - $obj =& new $class($params); - return $obj; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Canvas.php,v 1.7 2006/02/28 22:46:25 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * Specfies the path to the system location of font files. + * + * Remember trailing slash! + * + * This is set by default on Windows systems to %SystemRoot%\Fonts\ + */ +if (!defined('IMAGE_CANVAS_SYSTEM_FONT_PATH')) { + if (isset($_SERVER['SystemRoot'])) { + define('IMAGE_CANVAS_SYSTEM_FONT_PATH', $_SERVER['SystemRoot'] . '/Fonts/'); + } else { + /** + * @ignore + */ + define('IMAGE_CANVAS_SYSTEM_FONT_PATH', ''); + } +} + +/** + * Class for handling different output formats + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + * @abstract + */ +class Image_Canvas +{ + + /** + * The leftmost pixel of the element on the canvas + * @var int + * @access private + */ + var $_left = 0; + + /** + * The topmost pixel of the element on the canvas + * @var int + * @access private + */ + var $_top = 0; + + /** + * The width of the graph + * @var int + * @access private + */ + var $_width = 0; + + /** + * The height of the graph + * @var int + * @access private + */ + var $_height = 0; + + /** + * Polygon vertex placeholder + * @var array + * @access private + */ + var $_polygon = array(); + + /** + * The thickness of the line(s) + * @var int + * @access private + */ + var $_thickness = 1; + + /** + * The line style + * @var mixed + * @access private + */ + var $_lineStyle = 'transparent'; + + /** + * The fill style + * @var mixed + * @access private + */ + var $_fillStyle = 'transparent'; + + /** + * The font options + * @var array + * @access private + */ + var $_font = array(); + + /** + * The default font + * @var array + * @access private + */ + var $_defaultFont = array('name' => 'Courier New', 'color' => 'black', 'size' => 9); + + /** + * Create the canvas. + * + * Parameters available: + * + * 'width' The width of the graph on the canvas + * + * 'height' The height of the graph on the canvas + * + * 'left' The left offset of the graph on the canvas + * + * 'top' The top offset of the graph on the canvas + * + * @param array $params Parameter array + * @abstract + */ + function Image_Canvas($params) + { + if (isset($params['left'])) { + $this->_left = $params['left']; + } + + if (isset($params['top'])) { + $this->_top = $params['top']; + } + + if (isset($params['width'])) { + $this->_width = $params['width']; + } + + if (isset($params['height'])) { + $this->_height = $params['height']; + } + + $this->setDefaultFont($this->_defaultFont); + } + + /** + * Get the x-point from the relative to absolute coordinates + * + * @param float $x The relative x-coordinate (in percentage of total width) + * @return float The x-coordinate as applied to the canvas + * @access private + */ + function _getX($x) + { + return floor($this->_left + $x); + } + + /** + * Get the y-point from the relative to absolute coordinates + * + * @param float $y The relative y-coordinate (in percentage of total width) + * @return float The y-coordinate as applied to the canvas + * @access private + */ + function _getY($y) + { + return floor($this->_top + $y); + } + + /** + * Get the width of the canvas + * + * @return int The width + */ + function getWidth() + { + return $this->_width; + } + + /** + * Get the height of the canvas + * + * @return int The height + */ + function getHeight() + { + return $this->_height; + } + + /** + * Sets the thickness of the line(s) to be drawn + * + * @param int $thickness The actual thickness (in pixels) + */ + function setLineThickness($thickness) + { + $this->_thickness = $thickness; + } + + /** + * Sets the color of the line(s) to be drawn + * + * @param mixed $color The color of the line + */ + function setLineColor($color) + { + $this->_lineStyle = $color; + } + + /** + * Sets the style of the filling of drawn objects. + * + * This method gives simple access to setFillColor(), setFillImage() and + * setGradientFill() + * + * @param mixed $fill The fill style + */ + function setFill($fill) + { + if (is_array($fill)) { + $this->setGradientFill($fill); + } elseif (file_exists($fill)) { + $this->setFillImage($fill); + } else { + $this->setFillColor($fill); + } + } + + /** + * Sets the color of the filling of drawn objects + * + * @param mixed $color The fill color + */ + function setFillColor($color) + { + $this->_fillStyle = $color; + } + + /** + * Sets an image that should be used for filling + * + * @param string $filename The filename of the image to fill with + */ + function setFillImage($filename) + { + } + + /** + * Sets a gradient fill + * + * @param array $gradient Gradient fill options + */ + function setGradientFill($gradient) + { + $this->_fillStyle = $gradient; + } + + /** + * Sets the font options. + * + * The $font array may have the following entries: + * + * 'name' The name of the font. This name must either be supported + * natively by the canvas or mapped to a font using the font-mapping scheme + * + * 'size' Size in pixels + * + * 'angle' The angle with which to write the text + * + * @param array $fontOptions The font options. + */ + function setFont($fontOptions) + { + $this->_font = $fontOptions; + + if (!isset($this->_font['color'])) { + $this->_font['color'] = 'black'; + } + + if (!(isset($this->_font['angle'])) || ($this->_font['angle'] === false)) { + $this->_font['angle'] = 0; + } + + if (isset($this->_font['angle'])) { + if ((($this->_font['angle'] > 45) && ($this->_font['angle'] < 135)) || + (($this->_font['angle'] > 225) && ($this->_font['angle'] < 315)) + ) { + $this->_font['vertical'] = true; + } + } + + if ((!isset($this->_font['file'])) && (isset($this->_font['name']))) { + include_once 'Image/Canvas/Tool.php'; + $this->_font['file'] = Image_Canvas_Tool::fontMap($this->_font['name']); + } + } + + /** + * Sets the default font options. + * + * The $font array may have the following entries: + * + * 'name' The name of the font. This name must either be supported + * natively by the canvas or mapped to a font using the font-mapping scheme + * + * 'size' Size in pixels + * + * 'angle' The angle with which to write the text + * + * @param array $fontOptions The font options. + */ + function setDefaultFont($fontOptions) + { + $this->setFont($fontOptions); + $this->_defaultFont = $this->_font; + } + + /** + * Resets the canvas. + * + * Includes fillstyle, linestyle, thickness and polygon + * + * @access private + */ + function _reset() + { + $this->_lineStyle = false; + $this->_fillStyle = false; + $this->_thickness = 1; + $this->_polygon = array(); + $this->_font = $this->_defaultFont; + } + + /** + * Reset the canvas. + * + * Includes fillstyle, linestyle, thickness and polygon + */ + function reset() + { + $this->_reset(); + } + + /** + * Draw a line end + * + * Parameter array: + * 'x': int X point + * 'y': int Y point + * 'end': string The end type of the end + * 'angle': int [optional] The angle with which to draw the end + * @param array $params Parameter array + */ + function drawEnd($params) + { + } + + /** + * Draw a line + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'end0': string [optional] The end type of end0 (the start) + * 'end1': string [optional] The end type of end1 (the end) + * 'size0': int [optional] The size of end0 + * 'size1': int [optional] The size of end1 + * 'color': mixed [optional] The line color + * @param array $params Parameter array + */ + function line($params) + { + $x0 = $this->_getX($params['x0']); + $y0 = $this->_getY($params['y0']); + $x1 = $this->_getX($params['x1']); + $y1 = $this->_getY($params['y1']); + if (isset($params['end0'])) { + $angle = Image_Canvas_Tool::getAngle($x1, $y1, $x0, $y0); + $this->drawEnd( + array( + 'end' => $params['end0'], + 'x' => $params['x0'], + 'y' => $params['y0'], + 'angle' => $angle, + 'color' => (isset($params['color0']) ? $params['color0'] : false), + 'size' => $params['size0'] + ) + ); + } + if (isset($params['end1'])) { + $angle = Image_Canvas_Tool::getAngle($x0, $y0, $x1, $y1); + //print "
"; var_dump($params, $angle); print "
"; + $this->drawEnd( + array( + 'end' => $params['end1'], + 'x' => $params['x1'], + 'y' => $params['y1'], + 'angle' => $angle, + 'color' => (isset($params['color1']) ? $params['color1'] : false), + 'size' => $params['size1'] + ) + ); + } + $this->_reset(); + } + + /** + * Adds vertex to a polygon + * + * Parameter array: + * 'x': int X point + * 'y': int Y point + * 'url': string [optional] URL to link the vertex to (must be used with 'map_vertices' in polygon() on a canvas that support image maps) + * 'alt': string [optional] Alternative text to show in the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) + * 'target': string [optional] The link target on the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) + * 'mapsize': int [optional] The size of the "map", i.e. the size of the hot spot (must be used with 'map_vertices' in polygon() on a canvas that support image maps) + * @param array $params Parameter array + */ + function addVertex($params) + { + $params['X'] = $this->_getX($params['x']); + $params['Y'] = $this->_getY($params['y']); + $this->_polygon[] = $params; + } + + /** + * Adds "splined" vertex to a polygon + * + * Parameter array: + * 'x': int X point + * 'y': int Y point + * 'p1x': int X Control point 1 + * 'p1y': int Y Control point 1 + * 'p2x': int X Control point 2 + * 'p2y': int Y Control point 2 + * 'url': string [optional] URL to link the vertex to (must be used with 'map_vertices' in polygon() on a canvas that support image maps) + * 'alt': string [optional] Alternative text to show in the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) + * 'target': string [optional] The link target on the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) + * 'mapsize': int [optional] The size of the "map", i.e. the size of the hot spot (must be used with 'map_vertices' in polygon() on a canvas that support image maps) + * @param array $params Parameter array + */ + function addSpline($params) + { + $params['X'] = $this->_getX($params['x']); + $params['Y'] = $this->_getY($params['y']); + $params['P1X'] = $this->_getX($params['p1x']); + $params['P1Y'] = $this->_getY($params['p1y']); + $params['P2X'] = $this->_getX($params['p2x']); + $params['P2Y'] = $this->_getY($params['p2y']); + $this->_polygon[] = $params; + } + + /** + * Draws a polygon + * + * Parameter array: + * 'connect': bool [optional] Specifies whether the start point should be + * connected to the endpoint (closed polygon) or not (connected line) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function polygon($params) + { + $this->_reset(); + } + + /** + * Draw a rectangle + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function rectangle($params) + { + $this->_reset(); + } + + /** + * Draw an ellipse + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function ellipse($params) + { + $this->_reset(); + } + + /** + * Draw a pie slice + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'v1': int The starting angle (in degrees) + * 'v2': int The end angle (in degrees) + * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) + * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function pieslice($params) + { + $this->_reset(); + } + + /** + * Get the width of a text, + * + * @param string $text The text to get the width of + * @return int The width of the text + */ + function textWidth($text) + { + } + + /** + * Get the height of a text, + * + * @param string $text The text to get the height of + * @return int The height of the text + */ + function textHeight($text) + { + } + + /** + * Writes text + * + * Parameter array: + * 'x': int X-point of text + * 'y': int Y-point of text + * 'text': string The text to add + * 'alignment': array [optional] Alignment + * 'color': mixed [optional] The color of the text + */ + function addText($params) + { + $this->_reset(); + } + + /** + * Overlay image + * + * Parameter array: + * 'x': int X-point of overlayed image + * 'y': int Y-point of overlayed image + * 'filename': string The filename of the image to overlay + * 'width': int [optional] The width of the overlayed image (resizing if possible) + * 'height': int [optional] The height of the overlayed image (resizing if possible) + * 'alignment': array [optional] Alignment + */ + function image($params) + { + } + + /** + * Set clipping to occur + * + * Parameter array: + * + * 'x0': int X point of Upper-left corner + * 'y0': int X point of Upper-left corner + * 'x1': int X point of lower-right corner + * 'y1': int Y point of lower-right corner + */ + function setClipping($params = false) + { + } + + /** + * Start a group. + * + * What this does, depends on the canvas/format. + * + * @param string $name The name of the group + */ + function startGroup($name = false) + { + } + + /** + * End the "current" group. + * + * What this does, depends on the canvas/format. + */ + function endGroup() + { + } + + /** + * Output the result of the canvas to the browser + * + * @param array $params Parameter array, the contents and meaning depends on the actual Canvas + * @abstract + */ + function show($params = false) + { + if ($params === false) { + header('Expires: Tue, 2 Jul 1974 17:41:00 GMT'); // Date in the past + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified + header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 + header('Pragma: no-cache'); + } + } + + /** + * Save the result of the canvas to a file + * + * Parameter array: + * 'filename': string The file to output to + * @param array $params Parameter array, the contents and meaning depends on the actual Canvas + * @abstract + */ + function save($params = false) + { + } + + /** + * Get a canvas specific HTML tag. + * + * This method implicitly saves the canvas to the filename in the + * filesystem path specified and parses it as URL specified by URL path + * + * Parameter array: + * 'filename': string + * 'filepath': string Path to the file on the file system. Remember the final slash + * 'urlpath': string Path to the file available through an URL. Remember the final slash + */ + function toHtml($params) + { + $this->save(array('filename' => $params['filepath'] . $params['filename'])); + } + + /** + * Canvas factory method. + * + * Supported canvass are: + * + * 'png': output in PNG format (using GD) + * + * 'jpg': output in JPEG format (using GD) + * + * 'pdf': output in PDF format (using PDFlib) + * + * 'svg': output in SVG format + * + * 'imagemap': output as a html image map + * + * An example of usage: + * + * + * 800, 'height' => 600, 'antialias' => 'native') + * ); + * ?> + * + * + * @param string $canvas The canvas type + * @param array $params The parameters for the canvas constructor + * @return Image_Canvas The newly created canvas + * @static + */ + function &factory($canvas, $params) + { + $canvas = strtoupper($canvas); + + if (($canvas == 'PNG') || ($canvas == 'GD')) { + $canvas = 'GD_PNG'; + } + if (($canvas == 'JPG') || ($canvas == 'JPEG')) { + $canvas = 'GD_JPG'; + } + + if ($canvas == 'IMAGEMAP') { + $canvas = 'ImageMap'; + } + + $class = 'Image_Canvas_'. $canvas; + include_once 'Image/Canvas/'. str_replace('_', '/', $canvas) . '.php'; + + $obj =& new $class($params); + return $obj; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/Color.php b/includes/pear/Image/Canvas/Color.php index 0e5bc2ec..c062451e 100644 --- a/includes/pear/Image/Canvas/Color.php +++ b/includes/pear/Image/Canvas/Color.php @@ -1,182 +1,182 @@ - | -// +----------------------------------------------------------------------+ -// -// $Id: Color.php,v 1.3 2005/09/14 17:25:46 nosey Exp $ - -/** -* Class for color-handling -* -* @author Stefan Neufeind -* @package Image_Canvas -* @category images -* @license The PHP License, version 2.02 -*/ - -/** -* Color class to be extended; from package PEAR::Image_Color -*/ -require_once 'Image/Color.php'; - -/** -* Class for color-handling -* -* This is used to extend the functionality of the current PEAR::Image_Color v0.4. -* I hope to be allowed to incorporate some of the improvements in a new Image_Color release. -* -* @author Stefan Neufeind -* @package Image_Canvas -* @access public -*/ -class Image_Canvas_Color extends Image_Color -{ - /** - * Allocates a color in the given image. - * - * Userdefined color specifications get translated into - * an array of rgb values. - * - * @param resource GD-resource - * @param mixed any color representation supported by color2RGB() - * @return resource Image color handle - * @see color2RGB() - * @access public - * @static - */ - function allocateColor(&$img, $color) - { - $color = Image_Canvas_Color::color2RGB($color); - - if (($color[3] == 255) || (!function_exists("imagecolorallocatealpha"))) { - return imagecolorallocate($img, $color[0], $color[1], $color[2]); - } else { - return imagecolorallocatealpha($img, $color[0], $color[1], $color[2], 127-round(($color[3]*127)/255)); - } - } - - /** - * Convert any color-representation into an array of 4 ints (RGBA). - * - * Userdefined color specifications get translated into - * an array of rgb values. - * - * @param mixed any color representation supported by Image_Canvas_Color::color2RGB() - * @return array Array of 4 ints (RGBA-representation) - * @access public - * @static - */ - function color2RGB($color) - { - if (is_array($color)) { - if (!is_numeric($color[0])) { - return null; // error - } - if (count($color) == 3) { // assume RGB-color - - // 255 = alpha-value; full opaque - return array((int) $color[0], - (int) $color[1], - (int) $color[2], - 255); - } - if (count($color) == 4) { // assume RGBA-color - - // 255 = alpha-value; full opaque - return array((int) $color[0], - (int) $color[1], - (int) $color[2], - (int) $color[3]); - } - return null; // error - } elseif (is_string($color)) { - $alphaPos = strpos($color, '@'); - if ($alphaPos === false) { - $alpha = 255; - } else { - $alphaFloat = (float) substr($color, $alphaPos+1); - // restrict to range 0..1 - $alphaFloat = max(min($alphaFloat, 1), 0); - $alpha = (int) round((float) 255 * $alphaFloat); - $color = substr($color, 0, $alphaPos); - } - if ($color[0] == '#') { // hex-color given, e.g. #FFB4B4 - $tempColor = parent::hex2rgb($color); - return array((int) $tempColor[0], - (int) $tempColor[1], - (int) $tempColor[2], - $alpha); - } - if (strpos($color,'%') !== false) { - $tempColor = parent::percentageColor2RGB($color); - return array((int) $tempColor[0], - (int) $tempColor[1], - (int) $tempColor[2], - $alpha); - } else { - $tempColor = parent::namedColor2RGB($color); - return array((int) $tempColor[0], - (int) $tempColor[1], - (int) $tempColor[2], - $alpha); - } - } else { - return null; // error - } - } - - /** - * getRange - * Given a degree, you can get the range of colors between one color and - * another color. - * - * @access public - * @param string How much each 'step' between the colors we should take. - * @return array Returns an array of all the colors, one element for each color. - */ - function getRange ($degrees) - { - $tempColors = parent::getRange($degrees); - - // now add alpha-channel information - $steps = count($tempColors); - for($counter=0;$counter<$steps;$counter++) { - $tempColors[$counter] = parent::hex2rgb($tempColors[$counter]); - unset($tempColors[$counter]['hex']); - $tempColors[$counter][3] = (int) round( - (((float) $this->color1[3]*($steps-$counter))+ - ((float) $this->color2[3]*($counter)) - ) / $steps - ); - } - - return $tempColors; - } - - /** - * Internal method to correctly set the colors. - * - * @param mixed color 1 - * @param mixed color 2 - * @access private - */ - function _setColors ( $col1, $col2 ) - { - $this->color1 = Image_Canvas_Color::color2RGB($col1); - $this->color2 = Image_Canvas_Color::color2RGB($col2); - } -} + | +// +----------------------------------------------------------------------+ +// +// $Id: Color.php,v 1.3 2005/09/14 17:25:46 nosey Exp $ + +/** +* Class for color-handling +* +* @author Stefan Neufeind +* @package Image_Canvas +* @category images +* @license The PHP License, version 2.02 +*/ + +/** +* Color class to be extended; from package PEAR::Image_Color +*/ +require_once 'Image/Color.php'; + +/** +* Class for color-handling +* +* This is used to extend the functionality of the current PEAR::Image_Color v0.4. +* I hope to be allowed to incorporate some of the improvements in a new Image_Color release. +* +* @author Stefan Neufeind +* @package Image_Canvas +* @access public +*/ +class Image_Canvas_Color extends Image_Color +{ + /** + * Allocates a color in the given image. + * + * Userdefined color specifications get translated into + * an array of rgb values. + * + * @param resource GD-resource + * @param mixed any color representation supported by color2RGB() + * @return resource Image color handle + * @see color2RGB() + * @access public + * @static + */ + function allocateColor(&$img, $color) + { + $color = Image_Canvas_Color::color2RGB($color); + + if (($color[3] == 255) || (!function_exists("imagecolorallocatealpha"))) { + return imagecolorallocate($img, $color[0], $color[1], $color[2]); + } else { + return imagecolorallocatealpha($img, $color[0], $color[1], $color[2], 127-round(($color[3]*127)/255)); + } + } + + /** + * Convert any color-representation into an array of 4 ints (RGBA). + * + * Userdefined color specifications get translated into + * an array of rgb values. + * + * @param mixed any color representation supported by Image_Canvas_Color::color2RGB() + * @return array Array of 4 ints (RGBA-representation) + * @access public + * @static + */ + function color2RGB($color) + { + if (is_array($color)) { + if (!is_numeric($color[0])) { + return null; // error + } + if (count($color) == 3) { // assume RGB-color + + // 255 = alpha-value; full opaque + return array((int) $color[0], + (int) $color[1], + (int) $color[2], + 255); + } + if (count($color) == 4) { // assume RGBA-color + + // 255 = alpha-value; full opaque + return array((int) $color[0], + (int) $color[1], + (int) $color[2], + (int) $color[3]); + } + return null; // error + } elseif (is_string($color)) { + $alphaPos = strpos($color, '@'); + if ($alphaPos === false) { + $alpha = 255; + } else { + $alphaFloat = (float) substr($color, $alphaPos+1); + // restrict to range 0..1 + $alphaFloat = max(min($alphaFloat, 1), 0); + $alpha = (int) round((float) 255 * $alphaFloat); + $color = substr($color, 0, $alphaPos); + } + if ($color[0] == '#') { // hex-color given, e.g. #FFB4B4 + $tempColor = parent::hex2rgb($color); + return array((int) $tempColor[0], + (int) $tempColor[1], + (int) $tempColor[2], + $alpha); + } + if (strpos($color,'%') !== false) { + $tempColor = parent::percentageColor2RGB($color); + return array((int) $tempColor[0], + (int) $tempColor[1], + (int) $tempColor[2], + $alpha); + } else { + $tempColor = parent::namedColor2RGB($color); + return array((int) $tempColor[0], + (int) $tempColor[1], + (int) $tempColor[2], + $alpha); + } + } else { + return null; // error + } + } + + /** + * getRange + * Given a degree, you can get the range of colors between one color and + * another color. + * + * @access public + * @param string How much each 'step' between the colors we should take. + * @return array Returns an array of all the colors, one element for each color. + */ + function getRange ($degrees) + { + $tempColors = parent::getRange($degrees); + + // now add alpha-channel information + $steps = count($tempColors); + for($counter=0;$counter<$steps;$counter++) { + $tempColors[$counter] = parent::hex2rgb($tempColors[$counter]); + unset($tempColors[$counter]['hex']); + $tempColors[$counter][3] = (int) round( + (((float) $this->color1[3]*($steps-$counter))+ + ((float) $this->color2[3]*($counter)) + ) / $steps + ); + } + + return $tempColors; + } + + /** + * Internal method to correctly set the colors. + * + * @param mixed color 1 + * @param mixed color 2 + * @access private + */ + function _setColors ( $col1, $col2 ) + { + $this->color1 = Image_Canvas_Color::color2RGB($col1); + $this->color2 = Image_Canvas_Color::color2RGB($col2); + } +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/Fonts/README b/includes/pear/Image/Canvas/Fonts/README index 0a836147..c84e5846 100644 --- a/includes/pear/Image/Canvas/Fonts/README +++ b/includes/pear/Image/Canvas/Fonts/README @@ -1,12 +1,12 @@ -This is where the font files are located. - -Font files can be found at: - -MS CoreFonts - http://corefonts.sourceforge.net/ - -Divide By Zero (most are cartoonish) - http://fonts.tom7.com/ - -MING FDB Fonts +This is where the font files are located. + +Font files can be found at: + +MS CoreFonts + http://corefonts.sourceforge.net/ + +Divide By Zero (most are cartoonish) + http://fonts.tom7.com/ + +MING FDB Fonts http://ming.sf.net/ \ No newline at end of file diff --git a/includes/pear/Image/Canvas/Fonts/fontmap.txt b/includes/pear/Image/Canvas/Fonts/fontmap.txt index ccec67dd..22b71fe7 100644 --- a/includes/pear/Image/Canvas/Fonts/fontmap.txt +++ b/includes/pear/Image/Canvas/Fonts/fontmap.txt @@ -1,25 +1,25 @@ -Arial,arial.ttf -Arial Bold,arialbd.ttf -Arial Bold Italic,arialbi.ttf -Arial Italic,ariali.ttf -Courier New,cour.ttf -Courier New Bold,courbd.ttf -Courier New Bold Italic,courbi.ttf -Courier New Italic,couri.ttf -Garamond,gara.ttf -Garamond Bold,garabd.ttf -Garamond Italic,garait.ttf -Gothic,gothic.ttf -Gothic Bold,gothicb.ttf -Gothic Bold Italic,gothicbi.ttf -Gothic Italic,gothici.ttf -Sans Serif,micross.ttf -Reference Sans Serif,refsan.ttf -Times New Roman,times.ttf -Times New Roman Bold,timesbd.ttf -Times New Roman Bold Italic,timesbi.ttf -Times New Roman Italic,timesi.ttf -Verdana,verdana.ttf -Verdana Bold,verdanab.ttf -Verdana Bold Italic,verdanaz.ttf +Arial,arial.ttf +Arial Bold,arialbd.ttf +Arial Bold Italic,arialbi.ttf +Arial Italic,ariali.ttf +Courier New,cour.ttf +Courier New Bold,courbd.ttf +Courier New Bold Italic,courbi.ttf +Courier New Italic,couri.ttf +Garamond,gara.ttf +Garamond Bold,garabd.ttf +Garamond Italic,garait.ttf +Gothic,gothic.ttf +Gothic Bold,gothicb.ttf +Gothic Bold Italic,gothicbi.ttf +Gothic Italic,gothici.ttf +Sans Serif,micross.ttf +Reference Sans Serif,refsan.ttf +Times New Roman,times.ttf +Times New Roman Bold,timesbd.ttf +Times New Roman Bold Italic,timesbi.ttf +Times New Roman Italic,timesi.ttf +Verdana,verdana.ttf +Verdana Bold,verdanab.ttf +Verdana Bold Italic,verdanaz.ttf Verdana Italic,verdanai.ttf \ No newline at end of file diff --git a/includes/pear/Image/Canvas/GD.php b/includes/pear/Image/Canvas/GD.php index 227c3305..cff04643 100644 --- a/includes/pear/Image/Canvas/GD.php +++ b/includes/pear/Image/Canvas/GD.php @@ -1,1632 +1,1793 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: GD.php,v 1.8 2005/09/25 07:41:43 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * Include file Image/Canvas.php - */ -require_once 'Image/Canvas/WithMap.php'; - -/** - * Include file Image/Canvas/Color.php - */ -require_once 'Image/Canvas/Color.php'; - -/** - * Canvas class to output using PHP GD support. - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - * @abstract - */ -class Image_Canvas_GD extends Image_Canvas_WithMap -{ - - /** - * The canvas of the graph - * @var resource - * @access private - */ - var $_canvas; - - /** - * The canvas to use for tiled filling - * @var resource - * @access private - */ - var $_tileImage = null; - - /** - * Is version GD2 installed? - * @var bool - * @access private - */ - var $_gd2 = true; - - /** - * Antialiasing? - * - * Possible values 'off', 'driver' and 'native' - * - * @var string - * @access private - */ - var $_antialias = 'off'; - - /** - * Create the GD canvas. - * - * Parameters available: - * - * 'width' The width of the graph on the canvas - * - * 'height' The height of the graph on the canvas - * - * 'left' The left offset of the graph on the canvas - * - * 'top' The top offset of the graph on the canvas - * - * 'antialias' = 'native' enables native GD antialiasing - this - * method has no severe impact on performance (approx +5%). Requires PHP - * 4.3.2 (with bundled GD2) - * - * 'antialias' = {true|'driver'} Image_Graph implemented method. This method - * has a severe impact on performance, drawing an antialiased line this - * way is about XX times slower, with an overall performance impact of - * about +40%. The justification for this method is that if native support - * is not available this can be used, it is also a future feature that this - * method for antialiasing will support line styles. - * - * Use antialiased for best results with a line/area chart having just a few - * datapoints. Native antialiasing does not provide a good appearance with - * short lines, as for example with smoothed charts. Antialiasing does not - * (currently) work with linestyles, neither native nor driver method! - * - * 'noalpha' = true If alpha blending is to be disabled - * - * 'filename' An image to open, on which the graph is created on - * - * 'gd' A GD resource to add the image to, use this option to continue - * working on an already existing GD resource. Make sure this is passed 'by- - * reference' (using &) - * - * 'usemap' Initialize an image map - * - * 'gd' and 'filename' are mutually exclusive with 'gd' as preference - * - * 'width' and 'height' are required unless 'filename' or 'gd' are - * specified, in which case the width and height are taken as the actual - * image width/height. If the latter is the case and 'left' and/or 'top' was - * also specified, the actual 'width'/'height' are altered so that the graph - * fits inside the canvas (i.e 'height' = actual height - top, etc.) - * - * @param array $param Parameter array - */ - function Image_Canvas_GD($param) - { - include_once 'Image/Canvas/Color.php'; - - parent::Image_Canvas_WithMap($param); - - $this->_gd2 = ($this->_version() == 2); - $this->_font = array('font' => 1, 'color' => 'black'); - - if ((isset($param['gd'])) && (is_resource($param['gd']))) { - $this->_canvas =& $param['gd']; - } elseif (isset($param['filename'])) { - $this->_canvas =& $this->_getGD($param['filename']); - } else { - if ($this->_gd2) { - $this->_canvas = ImageCreateTrueColor( - $this->_width, - $this->_height - ); - if ((!isset($param['noalpha'])) || ($param['noalpha'] !== true)) { - ImageAlphaBlending($this->_canvas, true); - } - } else { - $this->_canvas = ImageCreate($this->_width, $this->_height); - } - } - - if (isset($param['antialias'])) { - $this->_antialias = $param['antialias']; - } - - if ($this->_antialias === true) { - $this->_antialias = 'driver'; - } - - if (($this->_gd2) && ($this->_antialias === 'native')) { - ImageAntialias($this->_canvas, true); - } - } - - /** - * Get an GD image resource from a file - * - * @param string $filename - * @return mixed The GD image resource - * @access private - */ - function &_getGD($filename) - { - $info = getimagesize($filename); - - $result = null; - switch($info[2]) { - case IMG_PNG: - $result =& ImageCreateFromPNG($filename); - break; - - case IMG_JPG: - $result =& ImageCreateFromJPEG($filename); - break; - - case IMG_GIF: - $result =& ImageCreateFromGIF($filename); - break; - } - return $result; - } - - /** - * Get the color index for the RGB color - * - * @param int $color The color - * @return int The GD image index of the color - * @access private - */ - function _color($color = false) - { - if (($color === false) || ($color === 'opague') || ($color === 'transparent')) { - return ImageColorTransparent($this->_canvas); - } else { - return Image_Canvas_Color::allocateColor($this->_canvas, $color); - } - } - - /** - * Get the GD applicable linestyle - * - * @param mixed $lineStyle The line style to return, false if the one - * explicitly set - * @return mixed A GD compatible linestyle - * @access private - */ - function _getLineStyle($lineStyle = false) - { - if ($this->_gd2) { - ImageSetThickness($this->_canvas, $this->_thickness); - } - - if ($lineStyle == 'transparent') { - return false; - } elseif ($lineStyle === false) { - if (is_array($this->_lineStyle)) { - $colors = array(); - foreach ($this->_lineStyle as $color) { - if ($color === 'transparent') { - $color = false; - } - $colors[] = $this->_color($color); - } - ImageSetStyle($this->_canvas, $colors); - return IMG_COLOR_STYLED; - } else { - return $this->_color($this->_lineStyle); - } - } else { - return $this->_color($lineStyle); - } - } - - /** - * Get the GD applicable fillstyle - * - * @param mixed $fillStyle The fillstyle to return, false if the one - * explicitly set - * @return mixed A GD compatible fillstyle - * @access private - */ - function _getFillStyle($fillStyle = false, $x0 = 0, $y0 = 0, $x1 = 0, $y1 = 0) - { - if ($this->_tileImage != null) { - ImageDestroy($this->_tileImage); - $this->_tileImage = null; - } - if ($fillStyle == 'transparent') { - return false; - } elseif ($fillStyle === false) { - if (is_resource($this->_fillStyle)) { - $x = min($x0, $x1); - $y = min($y0, $y1); - $w = abs($x1 - $x0) + 1; - $h = abs($y1 - $y0) + 1; - if ($this->_gd2) { - $this->_tileImage = ImageCreateTrueColor( - $this->getWidth(), - $this->getHeight() - ); - - ImageCopyResampled( - $this->_tileImage, - $this->_fillStyle, - $x, - $y, - 0, - 0, - $w, - $h, - ImageSX($this->_fillStyle), - ImageSY($this->_fillStyle) - ); - } else { - $this->_tileImage = ImageCreate( - $this->getWidth(), - $this->getHeight() - ); - - ImageCopyResized( - $this->_tileImage, - $this->_fillStyle, - $x, - $y, - 0, - 0, - $w, - $h, - ImageSX($this->_fillStyle), - ImageSY($this->_fillStyle) - ); - } - ImageSetTile($this->_canvas, $this->_tileImage); - return IMG_COLOR_TILED; - } elseif ((is_array($this->_fillStyle)) && (isset($this->_fillStyle['direction']))) { - $width = abs($x1 - $x0) + 1; - $height = abs($y1 - $y0) + 1; - - switch ($this->_fillStyle['direction']) { - case 'horizontal': - $count = $width; - break; - - case 'vertical': - $count = $height; - break; - - case 'horizontal_mirror': - $count = $width / 2; - break; - - case 'vertical_mirror': - $count = $height / 2; - break; - - case 'diagonal_tl_br': - case 'diagonal_bl_tr': - $count = sqrt($width * $width + $height * $height); - break; - - case 'radial': - $count = max($width, $height, sqrt($width * $width + $height * $height)) + 1; - break; - - } - - $count = round($count); - - if ($this->_gd2) { - $this->_tileImage = ImageCreateTrueColor( - $this->getWidth(), - $this->getHeight() - ); - } else { - $this->_tileImage = ImageCreate( - $this->getWidth(), - $this->getHeight() - ); - } - - - $startColor = Image_Canvas_Color::color2RGB( - ($this->_fillStyle['direction'] == 'radial' ? - $this->_fillStyle['end'] : - $this->_fillStyle['start'] - ) - ); - $endColor = Image_Canvas_Color::color2RGB( - ($this->_fillStyle['direction'] == 'radial' ? - $this->_fillStyle['start'] : - $this->_fillStyle['end'] - ) - ); - - $redIncrement = ($endColor[0] - $startColor[0]) / $count; - $greenIncrement = ($endColor[1] - $startColor[1]) / $count; - $blueIncrement = ($endColor[2] - $startColor[2]) / $count; - - $color = false; - for ($i = 0; $i < $count; $i ++) { - unset($color); - if ($i == 0) { - $color = $startColor; - unset($color[3]); - } else { - $color[0] = round(($redIncrement * $i) + - $redIncrement + $startColor[0]); - $color[1] = round(($greenIncrement * $i) + - $greenIncrement + $startColor[1]); - $color[2] = round(($blueIncrement * $i) + - $blueIncrement + $startColor[2]); - } - $color = Image_Canvas_Color::allocateColor( - $this->_tileImage, - $color - ); - - switch ($this->_fillStyle['direction']) { - case 'horizontal': - ImageLine($this->_tileImage, - $x0 + $i, - $y0, - $x0 + $i, - $y1, $color); - break; - - case 'vertical': - ImageLine($this->_tileImage, - $x0, - $y1 - $i, - $x1, - $y1 - $i, $color); - break; - - case 'horizontal_mirror': - if (($x0 + $i) <= ($x1 - $i)) { - ImageLine($this->_tileImage, - $x0 + $i, - $y0, - $x0 + $i, - $y1, $color); - - ImageLine($this->_tileImage, - $x1 - $i, - $y0, - $x1 - $i, - $y1, $color); - } - break; - - case 'vertical_mirror': - if (($y0 + $i) <= ($y1 - $i)) { - ImageLine($this->_tileImage, - $x0, - $y0 + $i, - $x1, - $y0 + $i, $color); - ImageLine($this->_tileImage, - $x0, - $y1 - $i, - $x1, - $y1 - $i, $color); - } - break; - - case 'diagonal_tl_br': - if (($i > $width) && ($i > $height)) { - $polygon = array ( - $x1, $y0 + $i - $width - 1, - $x1, $y1, - $x0 + $i - $height - 1, $y1); - } elseif ($i > $width) { - $polygon = array ( - $x0, $y0 + $i, - $x0, $y1, - $x1, $y1, - $x1, $y0 + $i - $width - 1); - } elseif ($i > $height) { - $polygon = array ( - $x0 + $i - $height - 1, $y1, - $x1, $y1, - $x1, $y0, - $x0 + $i, $y0); - } else { - $polygon = array ( - $x0, $y0 + $i, - $x0, $y1, - $x1, $y1, - $x1, $y0, - $x0 + $i, $y0); - } - ImageFilledPolygon( - $this->_tileImage, - $polygon, - count($polygon) / 2, - $color - ); - break; - - case 'diagonal_bl_tr': - if (($i > $width) && ($i > $height)) { - $polygon = array ( - $x1, $y1 - $i + $width - 1, - $x1, $y0, - $x0 + $i - $height - 1, $y0); - } elseif ($i > $width) { - $polygon = array ( - $x0, $y1 - $i, - $x0, $y0, - $x1, $y0, - $x1, $y1 - $i + $width - 1); - } elseif ($i > $height) { - $polygon = array ( - $x0 + $i - $height - 1, $y0, - $x1, $y0, - $x1, $y1, - $x0 + $i, $y1); - } else { - $polygon = array ( - $x0, $y1 - $i, - $x0, $y0, - $x1, $y0, - $x1, $y1, - $x0 + $i, $y1); - } - ImageFilledPolygon( - $this->_tileImage, - $polygon, - count($polygon) / 2, - $color - ); - break; - - case 'radial': - if (($this->_gd2) && ($i < $count)) { - ImageFilledEllipse( - $this->_tileImage, - $x0 + $width / 2, - $y0 + $height / 2, - $count - $i, - $count - $i, - $color - ); - } - break; - } - } - ImageSetTile($this->_canvas, $this->_tileImage); - return IMG_COLOR_TILED; - } else { - return $this->_color($this->_fillStyle); - } - } else { - return $this->_color($fillStyle); - } - } - - /** - * Sets an image that should be used for filling - * - * @param string $filename The filename of the image to fill with - */ - function setFillImage($filename) - { - $this->_fillStyle =& $this->_getGD($filename); - } - - /** - * Sets the font options. - * - * The $font array may have the following entries: - * - * 'ttf' = the .ttf file (either the basename, filename or full path) - * If 'ttf' is specified, then the following can be specified - * - * 'size' = size in pixels - * - * 'angle' = the angle with which to write the text - * - * @param array $font The font options. - */ - function setFont($fontOptions) - { - parent::setFont($fontOptions); - - if (isset($this->_font['ttf'])) { - $this->_font['file'] = str_replace('\\', '/', $this->_mapFont($this->_font['ttf'])); - } elseif (!isset($this->_font['font'])) { - $this->_font['font'] = 1; - } - - if (!isset($this->_font['color'])) { - $this->_font['color'] = 'black'; - } - - if ((isset($this->_font['angle'])) && ($this->_font['angle'] === false)) { - $this->_font['angle'] = 0; - } - } - - /** - * Calculate pixels on a line - * - * @param int $x0 X start point - * @param int $y0 X start point - * @param int $x1 X end point - * @param int $y1 Y end point - * @return array An associated array of x,y points with all pixels on the - * line - * @access private - */ - function &_linePixels($x0, $y0, $x1, $y1) - { - $pixels = array(); - if (abs($x0 - $x1) > abs($y0 - $y1)) { - if ($x1 != $x0) { - $m = ($y1 - $y0) / ($x1 - $x0); - } else { - $m = 0; - } - $b = $y0 - $m * $x0; - $strx = min($x0, $x1); - $endx = max($x0, $x1); - for ($x = $strx; $x <= $endx; $x++) { - $pixels[] = array('X' => $x, 'Y' => ($m * $x + $b)); - } - } else { - if ($y1 != $y0) { - $m = ($x1 - $x0) / ($y1 - $y0); - } else { - $m = 0; - } - $b = $x0 - $m * $y0; - $stry = min($y0, $y1); - $endy = max($y0, $y1); - for ($y = $stry; $y <= $endy; $y++) { - $pixels[] = array('X' => ($m * $y + $b), 'Y' => $y); - } - } - return $pixels; - } - - /** - * Draws an antialiased line - * - * @param int $x0 X start point - * @param int $y0 X start point - * @param int $x1 X end point - * @param int $y1 Y end point - * @param mixed $color The line color, can be omitted - * @access private - */ - function _antialiasedLine($x0, $y0, $x1, $y1, $color = false) - { - if (($line = $this->_getLineStyle($color)) !== false) { - if ($line >= 0) { - $line = ImageColorsForIndex($this->_canvas, $line); - $pixels = &$this->_linePixels($x0, $y0, $x1, $y1); - foreach ($pixels as $point) { - $this->_antialiasedPixel($point['X'], $point['Y'], $line); - } - unset($pixels); - } - } - } - - - /** - * Draws an antialiased pixel - * - * @param int $x X point - * @param int $y Y point - * @param mixed $color The pixel color - * @access private - */ - function _antialiasedPixel($x, $y, $color) - { - $fx = floor($x); - $fy = floor($y); - $cx = ceil($x); - $cy = ceil($y); - $xa = $x - $fx; - $xb = $cx - $x; - $ya = $y - $fy; - $yb = $cy - $y; - if (($cx == $fx) && ($cy == $fy)) { - $this->_antialisedSubPixel($fx, $fy, 0.0, 1.0, $color); - } else { - $this->_antialisedSubPixel($fx, $fy, $xa + $ya, $xb + $yb, $color); - if ($cy != $fy) { - $this->_antialisedSubPixel($fx, $cy, $xa + $yb, $xb + $ya, $color); - } - if ($cx != $fx) { - $this->_antialisedSubPixel($cx, $fy, $xb + $ya, $xa + $yb, $color); - if ($cy != $fy) { - $this->_antialisedSubPixel($cx, $cy, $xb + $yb, $xa + $ya, $color); - } - } - } - } - - /** - * Antialias'es the pixel around x,y with weights a,b - * - * @param int $x X point - * @param int $y Y point - * @param int $a The weight of the current color - * @param int $b The weight of the applied/wanted color - * @param mixed $color The pixel color - * @access private - */ - function _antialisedSubPixel($x, $y, $a, $b, $color) - { - $x = $this->_getX($x); - $y = $this->_getX($y); - if (($x >=0 ) && ($y >= 0) && ($x < $this->getWidth()) && ($y < $this->getHeight())) { - $tempColor = ImageColorsForIndex($this->_canvas, ImageColorAt($this->_canvas, $x, $y)); - - $newColor[0] = min(255, round($tempColor['red'] * $a + $color['red'] * $b)); - $newColor[1] = min(255, round($tempColor['green'] * $a + $color['green'] * $b)); - $newColor[2] = min(255, round($tempColor['blue'] * $a + $color['blue'] * $b)); - //$newColor[3] = 0; - $color = '#'; - foreach ($newColor as $acolor) { - $color .= sprintf('%02s', dechex($acolor)); - } - $newColor = $this->_color($color);//,'rgb(' . $newColor[0] . ',' . $newColor[1] . ',' . $newColor[2] .')'; - - ImageSetPixel($this->_canvas, $x, $y, $newColor); - } - } - - - /** - * Draw a line end - * - * Parameter array: - * - * 'x': int X point - * - * 'y': int Y point - * - * 'end': string The end type of the end - * - * 'size': int The size of the end - * - * 'color': string The color of the end - * - * 'angle': int [optional] The angle with which to draw the end - * - * @param array $params Parameter array - */ - function drawEnd($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $size = $params['size']; - //var_dump($params); - $angle = deg2rad((isset($params['angle']) ? $params['angle'] : 0)); - $pi2 = pi() / 2; - switch ($params['end']) { - case 'lollipop': - case 'circle': - $this->ellipse( - array( - 'x' => $x, - 'y' => $y, - 'rx' => $size / 2, - 'ry' => $size / 2, - 'fill' => $params['color'], - 'line' => $params['color'] - ) - ); - break; - case 'diamond': - $x0 = round($params['x'] + cos($angle) * $size * 0.65); - $y0 = round($params['y'] - sin($angle) * $size * 0.65); - $shape = array( - $x0 + round(cos($angle) * $size * 0.65), - $y0 - round(sin($angle) * $size * 0.65), - $x0 + round(cos($angle + $pi2) * $size * 0.65), - $y0 - round(sin($angle + $pi2) * $size * 0.65), - $x0 + round(cos($angle + pi()) * $size * 0.65), - $y0 - round(sin($angle + pi()) * $size * 0.65), - $x0 + round(cos($angle + 3 * $pi2) * $size * 0.65), - $y0 - round(sin($angle + 3 * $pi2) * $size * 0.65) - ); - break; - case 'line': - $this->line( - array( - 'x0' => $x + round(cos($angle + $pi2) * $size / 2), - 'y0' => $y - round(sin($angle + $pi2) * $size / 2), - 'x1' => $x + round(cos($angle + 3 * $pi2) * $size / 2), - 'y1' => $y - round(sin($angle + 3 * $pi2) * $size / 2), - 'color' => $params['color'] - ) - ); - break; - case 'box': - case 'rectangle': - $x0 = round($params['x'] + cos($angle) * $size / 2); - $y0 = round($params['y'] - sin($angle) * $size / 2); - $pi4 = pi() / 4; - $shape = array( - $x0 + round(cos($angle + $pi4) * $size / 2), - $y0 - round(sin($angle + $pi4) * $size / 2), - $x0 + round(cos($angle + $pi2 + $pi4) * $size / 2), - $y0 - round(sin($angle + $pi2 + $pi4) * $size / 2), - $x0 + round(cos($angle + pi() + $pi4) * $size / 2), - $y0 - round(sin($angle + pi() + $pi4) * $size / 2), - $x0 + round(cos($angle + 3 * $pi2 + $pi4) * $size / 2), - $y0 - round(sin($angle + 3 * $pi2 + $pi4) * $size / 2) - ); - break; - case 'arrow': - $shape = array( - $x + cos($angle) * $size, - $y - sin($angle) * $size, - $x + cos($angle + $pi2) * $size * 0.4, - $y - sin($angle + $pi2) * $size * 0.4, - $x + cos($angle + 3 * $pi2) * $size * 0.4, - $y - sin($angle + 3 * $pi2) * $size * 0.4, - ); - break; - case 'arrow2': - $shape = array( - $x + round(cos($angle) * $size), - $y - round(sin($angle) * $size), - $x + round(cos($angle + $pi2 + deg2rad(45)) * $size), - $y - round(sin($angle + $pi2 + deg2rad(45)) * $size), - $x, - $y, - $x + round(cos($angle + 3 * $pi2 - deg2rad(45)) * $size), - $y - round(sin($angle + 3 * $pi2 - deg2rad(45)) * $size), - ); - break; - } - - if (isset($shape)) { - // output the shape - if (($fill = $this->_getFillStyle($params['color'])) !== false) { - ImageFilledPolygon($this->_canvas, $shape, count($shape)/2, $fill); - } - } - parent::drawEnd($params); - } - - /** - * Draw a line - * - * Parameter array: - * - * 'x0': int X start point - * - * 'y0': int Y start point - * - * 'x1': int X end point - * - * 'y1': int Y end point - * - * 'color': mixed [optional] The line color - * - * @param array $params Parameter array - */ - function line($params) - { - $x0 = $this->_getX($params['x0']); - $y0 = $this->_getY($params['y0']); - $x1 = $this->_getX($params['x1']); - $y1 = $this->_getY($params['y1']); - $color = (isset($params['color']) ? $params['color'] : false); - - $x0 = $this->_getX($x0); - $y0 = $this->_getY($y0); - $x1 = $this->_getX($x1); - $y1 = $this->_getY($y1); - if (($this->_antialias === 'driver') && ($x0 != $x1) && ($y0 != $y1)) { - $this->_antialiasedLine($x0, $y0, $x1, $y1, $color); - } elseif (($line = $this->_getLineStyle($color)) !== false) { - ImageLine($this->_canvas, $x0, $y0, $x1, $y1, $line); - } - parent::line($params); - } - - /** - * Parameter array: - * - * 'connect': bool [optional] Specifies whether the start point should be - * connected to the endpoint (closed polygon) or not (connected line) - * - * 'fill': mixed [optional] The fill color - * - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function polygon($params) - { - include_once 'Image/Canvas/Tool.php'; - - $connectEnds = (isset($params['connect']) ? $params['connect'] : false); - $fillColor = (isset($params['fill']) ? $params['fill'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - if (!$connectEnds) { - $fillColor = 'transparent'; - } - $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); - - $lastPoint = false; - foreach ($this->_polygon as $point) { - if (($lastPoint) && (isset($lastPoint['P1X'])) && - (isset($lastPoint['P1Y'])) && (isset($lastPoint['P2X'])) && - (isset($lastPoint['P2Y']))) - { - $dx = abs($point['X'] - $lastPoint['X']); - $dy = abs($point['Y'] - $lastPoint['Y']); - $d = sqrt($dx * $dx + $dy * $dy); - if ($d > 0) { - $interval = 1 / $d; - for ($t = 0; $t <= 1; $t = $t + $interval) { - $x = Image_Canvas_Tool::bezier( - $t, - $lastPoint['X'], - $lastPoint['P1X'], - $lastPoint['P2X'], - $point['X'] - ); - - $y = Image_Canvas_Tool::bezier( - $t, - $lastPoint['Y'], - $lastPoint['P1Y'], - $lastPoint['P2Y'], - $point['Y'] - ); - - if (!isset($low['X'])) { - $low['X'] = $x; - } else { - $low['X'] = min($x, $low['X']); - } - if (!isset($high['X'])) { - $high['X'] = $x; - } else { - $high['X'] = max($x, $high['X']); - } - if (!isset($low['Y'])) { - $low['Y'] = $y; - } else { - $low['Y'] = min($y, $low['Y']); - } - if (!isset($high['Y'])) { - $high['Y'] = $y; - } else { - $high['Y'] = max($y, $high['Y']); - } - $polygon[] = $x; - $polygon[] = $y; - } - if (($t - $interval) < 1) { - $x = Image_Canvas_Tool::bezier( - 1, - $lastPoint['X'], - $lastPoint['P1X'], - $lastPoint['P2X'], - $point['X'] - ); - - $y = Image_Canvas_Tool::bezier( - 1, - $lastPoint['Y'], - $lastPoint['P1Y'], - $lastPoint['P2Y'], - $point['Y'] - ); - - $polygon[] = $x; - $polygon[] = $y; - } - } - } else { - if (!isset($low['X'])) { - $low['X'] = $point['X']; - } else { - $low['X'] = min($point['X'], $low['X']); - } - if (!isset($high['X'])) { - $high['X'] = $point['X']; - } else { - $high['X'] = max($point['X'], $high['X']); - } - if (!isset($low['Y'])) { - $low['Y'] = $point['Y']; - } else { - $low['Y'] = min($point['Y'], $low['Y']); - } - if (!isset($high['Y'])) { - $high['Y'] = $point['Y']; - } else { - $high['Y'] = max($point['Y'], $high['Y']); - } - - $polygon[] = $point['X']; - $polygon[] = $point['Y']; - } - $lastPoint = $point; - } - - if ((isset($polygon)) && (is_array($polygon))) { - if ($connectEnds) { - if (($fill = $this->_getFillStyle($fillColor, $low['X'], $low['Y'], $high['X'], $high['Y'])) !== false) { - ImageFilledPolygon($this->_canvas, $polygon, count($polygon)/2, $fill); - } - if ($this->_antialias === 'driver') { - $pfirst = $p0 = false; - reset($polygon); - - while (list(, $x) = each($polygon)) { - list(, $y) = each($polygon); - if ($p0 !== false) { - $this->_antialiasedLine($p0['X'], $p0['Y'], $x, $y, $lineColor); - } - if ($pfirst === false) { - $pfirst = array('X' => $x, 'Y' => $y); - } - $p0 = array('X' => $x, 'Y' => $y);; - } - - $this->_antialiasedLine($p0['X'], $p0['Y'], $pfirst['X'], $pfirst['Y'], $lineColor); - } elseif (($line = $this->_getLineStyle($lineColor)) !== false) { - ImagePolygon($this->_canvas, $polygon, count($polygon)/2, $line); - } - } else { - $prev_point = false; - if ($this->_antialias === 'driver') { - reset($polygon); - while (list(, $x) = each($polygon)) { - list(, $y) = each($polygon); - if ($prev_point) { - $this->_antialiasedLine( - $prev_point['X'], - $prev_point['Y'], - $x, - $y, - $lineColor - ); - } - $prev_point = array('X' => $x, 'Y' => $y);; - } - } elseif (($line = $this->_getLineStyle($lineColor)) !== false) { - reset($polygon); - while (list(, $x) = each($polygon)) { - list(, $y) = each($polygon); - if ($prev_point) { - ImageLine( - $this->_canvas, - $prev_point['X'], - $prev_point['Y'], - $x, - $y, - $line - ); - } - $prev_point = array('X' => $x, 'Y' => $y);; - } - } - } - } - - parent::polygon($params); - } - - /** - * Draw a rectangle - * - * Parameter array: - * - * 'x0': int X start point - * - * 'y0': int Y start point - * - * 'x1': int X end point - * - * 'y1': int Y end point - * - * 'fill': mixed [optional] The fill color - * - * 'line': mixed [optional] The line color - * - * @param array $params Parameter array - */ - function rectangle($params) - { - $x0 = $this->_getX($params['x0']); - $y0 = $this->_getY($params['y0']); - $x1 = $this->_getX($params['x1']); - $y1 = $this->_getY($params['y1']); - $fillColor = (isset($params['fill']) ? $params['fill'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - if (($fill = $this->_getFillStyle($fillColor, $x0, $y0, $x1, $y1)) !== false) { - ImageFilledRectangle($this->_canvas, $x0, $y0, $x1, $y1, $fill); - } - - if (($line = $this->_getLineStyle($lineColor)) !== false) { - ImageRectangle($this->_canvas, $x0, $y0, $x1, $y1, $line); - } - - parent::rectangle($params); - } - - /** - * Draw an ellipse - * - * Parameter array: - * - * 'x': int X center point - * - * 'y': int Y center point - * - * 'rx': int X radius - * - * 'ry': int Y radius - * - * 'fill': mixed [optional] The fill color - * - * 'line': mixed [optional] The line color - * - * @param array $params Parameter array - */ - function ellipse($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $rx = $this->_getX($params['rx']); - $ry = $this->_getY($params['ry']); - $fillColor = (isset($params['fill']) ? $params['fill'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - if (($fill = $this->_getFillStyle($fillColor, $x - $rx, $y - $ry, $x + $rx, $y + $ry)) !== false) { - ImageFilledEllipse($this->_canvas, $x, $y, $rx * 2, $ry * 2, $fill); - } - - if (($line = $this->_getLineStyle($lineColor)) !== false) { - ImageEllipse($this->_canvas, $x, $y, $rx * 2, $ry * 2, $line); - } - parent::ellipse($params); - } - - /** - * Draw a pie slice - * - * Parameter array: - * - * 'x': int X center point - * - * 'y': int Y center point - * - * 'rx': int X radius - * - * 'ry': int Y radius - * - * 'v1': int The starting angle (in degrees) - * - * 'v2': int The end angle (in degrees) - * - * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) - * - * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) - * - * 'fill': mixed [optional] The fill color - * - * 'line': mixed [optional] The line color - * - * @param array $params Parameter array - */ - function pieslice($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $rx = $params['rx']; - $ry = $params['ry']; - $v1 = $params['v1']; - $v2 = $params['v2']; - $srx = (isset($params['srx']) ? $params['srx'] : 0); - $sry = (isset($params['sry']) ? $params['sry'] : 0); - $fillColor = (isset($params['fill']) ? $params['fill'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - $dA = 0.1; - - if (($srx !== false) && ($sry !== false)) { - $angle = max($v1, $v2); - while ($angle >= min($v1, $v2)) { - $polygon[] = ($x + $srx * cos(deg2rad($angle % 360))); - $polygon[] = ($y + $sry * sin(deg2rad($angle % 360))); - $angle -= $dA; - } - if (($angle + $dA) > min($v1, $v2)) { - $polygon[] = ($x + $srx * cos(deg2rad(min($v1, $v2) % 360))); - $polygon[] = ($y + $sry * sin(deg2rad(min($v1, $v2) % 360))); - } - } else { - $polygon[] = $x; - $polygon[] = $y; - } - - $angle = min($v1, $v2); - while ($angle <= max($v1, $v2)) { - $polygon[] = ($x + $rx * cos(deg2rad($angle % 360))); - $polygon[] = ($y + $ry * sin(deg2rad($angle % 360))); - $angle += $dA; - } - - if (($angle - $dA) < max($v1, $v2)) { - $polygon[] = ($x + $rx * cos(deg2rad(max($v1, $v2) % 360))); - $polygon[] = ($y + $ry * sin(deg2rad(max($v1, $v2) % 360))); - } - - if (($fill = $this->_getFillStyle($fillColor, $x - $rx - 1, $y - $ry - 1, $x + $rx + 1, $y + $ry + 1)) !== false) { - ImageFilledPolygon($this->_canvas, $polygon, count($polygon) / 2, $fill); - } - - if (($line = $this->_getLineStyle($lineColor)) !== false) { - ImagePolygon($this->_canvas, $polygon, count($polygon) / 2, $line); - } - - parent::pieSlice($params); - } - - /** - * Get the width of a text, - * - * @param string $text The text to get the width of - * @return int The width of the text - */ - function textWidth($text) - { - if (isset($this->_font['file'])) { - $angle = 0; - if (isset($this->_font['angle'])) { - $angle = $this->_font['angle']; - } - - $width = 0; - $lines = explode("\n", $text); - foreach ($lines as $line) { - $bounds = ImageTTFBBox( - $this->_font['size'], - $angle, - $this->_font['file'], - $text - ); - - $x0 = min($bounds[0], $bounds[2], $bounds[4], $bounds[6]); - $x1 = max($bounds[0], $bounds[2], $bounds[4], $bounds[6]); - $width = max(abs($x0 - $x1), $width); - } - return $width; - } else { - if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { - return ImageFontHeight($this->_font['font']) * (substr_count($text, "\n") + 1); - } else { - $width = 0; - $lines = explode("\n", $text); - foreach ($lines as $line) { - $width = max($width, ImageFontWidth($this->_font['font']) * strlen($line)); - } - return $width; - } - } - } - - /** - * Get the height of a text. - * - * Note! This method can give some peculiar results, since ImageTTFBBox() returns the total - * bounding box of a text, where ImageTTF() writes the text on the baseline of the text, that - * is 'g', 'p', 'q' and other letters that dig under the baseline will appear to have a larger - * height than they actually do. Have a look at the tests/text.php test case - the first two - * columns, 'left and 'center', both look alright, whereas the last column, 'right', appear - * with a larger space between the first text and the second. This is because the total height - * is actually smaller by exactly the number of pixels that the 'g' digs under the baseline. - * Remove the 'g' from the text and they appear correct. - * - * @param string $text The text to get the height of - * @param bool $force Force the method to calculate the size - * @return int The height of the text - */ - function textHeight($text, $force = false) - { - if (isset($this->_font['file'])) { - $angle = 0; - if (isset($this->_font['angle'])) { - $angle = $this->_font['angle']; - } - - $linebreaks = substr_count($text, "\n"); - if (($angle == 0) && ($linebreaks == 0) && ($force === false)) { - /* - * if the angle is 0 simply return the size, due to different - * heights for example for x-axis labels, making the labels - * _not_ appear as written on the same baseline - */ - return $this->_font['size'] + 2; - } - - $height = 0; - $lines = explode("\n", $text); - foreach ($lines as $line) { - $bounds = ImageTTFBBox( - $this->_font['size'], - $angle, - $this->_font['file'], - $line - ); - - $y0 = min($bounds[1], $bounds[3], $bounds[5], $bounds[7]); - $y1 = max($bounds[1], $bounds[3], $bounds[5], $bounds[7]); - $height += abs($y0 - $y1); - } - return $height + $linebreaks * 2; - } else { - if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { - $width = 0; - $lines = explode("\n", $text); - foreach ($lines as $line) { - $width = max($width, ImageFontWidth($this->_font['font']) * strlen($line)); - } - return $width; - } else { - return ImageFontHeight($this->_font['font']) * (substr_count($text, "\n") + 1); - } - } - } - - /** - * Writes text - * - * Parameter array: - * - * 'x': int X-point of text - * - * 'y': int Y-point of text - * - * 'text': string The text to add - * - * 'alignment': array [optional] Alignment - * - * 'color': mixed [optional] The color of the text - */ - function addText($params) - { - $x0 = $this->_getX($params['x']); - $y0 = $this->_getY($params['y']); - $text = $params['text']; - $color = (isset($params['color']) ? $params['color'] : false); - $alignment = (isset($params['alignment']) ? $params['alignment'] : false); - - $text = str_replace("\r", '', $text); - - if (!is_array($alignment)) { - $alignment = array('vertical' => 'top', 'horizontal' => 'left'); - } - - if (!isset($alignment['vertical'])) { - $alignment['vertical'] = 'top'; - } - - if (!isset($alignment['horizontal'])) { - $alignment['horizontal'] = 'left'; - } - - if ($alignment['vertical'] == 'bottom') { - $y0 = $y0 - $this->textHeight($text, true); - } elseif ($alignment['vertical'] == 'center') { - $y0 = $y0 - ($this->textHeight($text, true) / 2); - } - - $lines = explode("\n", $text); - foreach ($lines as $line) { - $textWidth = $this->textWidth($line); - $textHeight = $this->textHeight($line, true); - - $x = $x0; - $y = $y0; - - $y0 += $textHeight + 2; - - if ($alignment['horizontal'] == 'right') { - $x = $x - $textWidth; - } elseif ($alignment['horizontal'] == 'center') { - $x = $x - ($textWidth / 2); - } - - if (($color === false) && (isset($this->_font['color']))) { - $color = $this->_font['color']; - } - - if ($color != 'transparent') { - if (isset($this->_font['file'])) { - if (($this->_font['angle'] < 180) && ($this->_font['angle'] >= 0)) { - $y += $textHeight; - } - if (($this->_font['angle'] >= 90) && ($this->_font['angle'] < 270)) { - $x += $textWidth; - } - - ImageTTFText( - $this->_canvas, - $this->_font['size'], - $this->_font['angle'], - $x, - $y, - $this->_color($color), - $this->_font['file'], - $line - ); - - } else { - if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { - ImageStringUp( - $this->_canvas, - $this->_font['font'], - $x, - $y + $this->textHeight($text), - $line, - $this->_color($color) - ); - } else { - ImageString( - $this->_canvas, - $this->_font['font'], - $x, - $y, - $line, - $this->_color($color) - ); - } - } - } - } - parent::addText($params); - } - - /** - * Overlay image - * - * Parameter array: - * - * 'x': int X-point of overlayed image - * - * 'y': int Y-point of overlayed image - * - * 'filename': string The filename of the image to overlay - * - * 'width': int [optional] The width of the overlayed image (resizing if possible) - * - * 'height': int [optional] The height of the overlayed image (resizing if possible) - * - * 'alignment': array [optional] Alignment - */ - function image($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $filename = $params['filename']; - $width = (isset($params['width']) ? $params['width'] : false); - $height = (isset($params['height']) ? $params['height'] : false); - $alignment = (isset($params['alignment']) ? $params['alignment'] : false); - - if (!is_array($alignment)) { - $alignment = array('vertical' => 'top', 'horizontal' => 'left'); - } - - if (!isset($alignment['vertical'])) { - $alignment['vertical'] = 'top'; - } - - if (!isset($alignment['horizontal'])) { - $alignment['horizontal'] = 'left'; - } - - if (file_exists($filename)) { - if (strtolower(substr($filename, -4)) == '.png') { - $image = ImageCreateFromPNG($filename); - } elseif (strtolower(substr($filename, -4)) == '.gif') { - $image = ImageCreateFromGIF($filename); - } else { - $image = ImageCreateFromJPEG($filename); - } - - $imgWidth = ImageSX($image); - $imgHeight = ImageSY($image); - - $outputWidth = ($width !== false ? $width : $imgWidth); - $outputHeight = ($height !== false ? $height : $imgHeight); - - if ($alignment['horizontal'] == 'right') { - $x -= $outputWidth; - } elseif ($alignment['horizontal'] == 'center') { - $x -= $outputWidth / 2; - } - - if ($alignment['vertical'] == 'bottom') { - $y -= $outputHeight; - } elseif ($alignment['vertical'] == 'center') { - $y -= $outputHeight / 2; - } - - if ((($width !== false) && ($width != $imgWidth)) || - (($height !== false) && ($height != $imgHeight))) - { - if ($this->_gd2) { - ImageCopyResampled( - $this->_canvas, - $image, - $x, - $y, - 0, - 0, - $width, - $height, - $imgWidth, - $imgHeight - ); - } else { - ImageCopyResized( - $this->_canvas, - $image, - $x, - $y, - 0, - 0, - $width, - $height, - $imgWidth, - $imgHeight - ); - } - } else { - ImageCopy( - $this->_canvas, - $image, - $x, - $y, - 0, - 0, - $imgWidth, - $imgHeight - ); - } - ImageDestroy($image); - } - parent::image($params); - } - - /** - * Get a canvas specific HTML tag. - * - * This method implicitly saves the canvas to the filename in the - * filesystem path specified and parses it as URL specified by URL path - * - * Parameter array: - * - * 'filename' string - * - * 'filepath': string Path to the file on the file system. Remember the final slash - * - * 'urlpath': string Path to the file available through an URL. Remember the final slash - * - * 'alt': string [optional] Alternative text on image - * - * 'cssclass': string [optional] The CSS Stylesheet class - * - * 'border': int [optional] The border width on the image - */ - function toHtml($params) - { - parent::toHtml($params); - return '' . $params['alt'] . '_imageMap) ? ' usemap="#' . $params['filename'] . '"' : '') . '>' . - (isset($this->_imageMap) ? "\n" . $this->_imageMap->toHtml(array('name' => $params['filename'])) : ''); - } - - /** - * Resets the canvas. - * - * Include fillstyle, linestyle, thickness and polygon - * @access private - */ - function _reset() - { - if ($this->_gd2) { - ImageSetThickness($this->_canvas, 1); - } - if ($this->_tileImage != null) { - ImageDestroy($this->_tileImage); - $this->_tileImage = null; - } - parent::_reset(); - $this->_font = array('font' => 1, 'color' => 'black'); - } - - /** - * Check which version of GD is installed - * - * @return int 0 if GD isn't installed, 1 if GD 1.x is installed and 2 if GD - * 2.x is installed - * @access private - */ - function _version() - { - $result = false; - if (function_exists('gd_info')) { - $info = gd_info(); - $version = $info['GD Version']; - } else { - ob_start(); - phpinfo(8); - $php_info = ob_get_contents(); - ob_end_clean(); - - if (ereg("]*>GD Version *<\/td>]*>([^<]*)<\/td>", - $php_info, $result)) - { - $version = $result[1]; - } - } - - if (ereg('1\.[0-9]{1,2}', $version)) { - return 1; - } elseif (ereg('2\.[0-9]{1,2}', $version)) { - return 2; - } else { - return 0; - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: GD.php,v 1.16 2007/06/22 20:19:54 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * Include file Image/Canvas.php + */ +require_once 'Image/Canvas/WithMap.php'; + +/** + * Include file Image/Canvas/Color.php + */ +require_once 'Image/Canvas/Color.php'; + +/** + * Canvas class to output using PHP GD support. + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + * @abstract + */ +class Image_Canvas_GD extends Image_Canvas_WithMap +{ + + /** + * The canvas of the graph + * @var resource + * @access private + */ + var $_canvas; + + /** + * The canvas to use for tiled filling + * @var resource + * @access private + */ + var $_tileImage = null; + + /** + * Is version GD2 installed? + * @var bool + * @access private + */ + var $_gd2 = true; + + /** + * Antialiasing? + * + * Possible values 'off', 'driver' and 'native' + * + * @var string + * @access private + */ + var $_antialias = 'off'; + + var $_alpha = false; + + var $_clipping = array(); + + /** + * Create the GD canvas. + * + * Parameters available: + * + * 'width' The width of the graph on the canvas + * + * 'height' The height of the graph on the canvas + * + * 'left' The left offset of the graph on the canvas + * + * 'top' The top offset of the graph on the canvas + * + * 'antialias' = 'native' enables native GD antialiasing - this + * method has no severe impact on performance (approx +5%). Requires PHP + * 4.3.2 (with bundled GD2) + * + * 'antialias' = {true|'driver'} Image_Graph implemented method. This method + * has a severe impact on performance, drawing an antialiased line this + * way is about XX times slower, with an overall performance impact of + * about +40%. The justification for this method is that if native support + * is not available this can be used, it is also a future feature that this + * method for antialiasing will support line styles. + * + * Use antialiased for best results with a line/area chart having just a few + * datapoints. Native antialiasing does not provide a good appearance with + * short lines, as for example with smoothed charts. Antialiasing does not + * (currently) work with linestyles, neither native nor driver method! + * + * 'noalpha' = true If alpha blending is to be disabled + * + * 'filename' An image to open, on which the graph is created on + * + * 'gd' A GD resource to add the image to, use this option to continue + * working on an already existing GD resource. Make sure this is passed 'by- + * reference' (using &) + * + * 'usemap' Initialize an image map + * + * 'gd' and 'filename' are mutually exclusive with 'gd' as preference + * + * 'width' and 'height' are required unless 'filename' or 'gd' are + * specified, in which case the width and height are taken as the actual + * image width/height. If the latter is the case and 'left' and/or 'top' was + * also specified, the actual 'width'/'height' are altered so that the graph + * fits inside the canvas (i.e 'height' = actual height - top, etc.) + * + * @param array $param Parameter array + */ + function Image_Canvas_GD($param) + { + include_once 'Image/Canvas/Color.php'; + + parent::Image_Canvas_WithMap($param); + + $this->_gd2 = ($this->_version() == 2); + $this->_font = array('font' => 1, 'color' => 'black'); + + if ((isset($param['gd'])) && (is_resource($param['gd']))) { + $this->_canvas =& $param['gd']; + } elseif (isset($param['filename'])) { + $this->_canvas =& $this->_getGD($param['filename']); + } else { + if ($this->_gd2) { + $this->_canvas = ImageCreateTrueColor( + $this->_width, + $this->_height + ); + if ((!isset($param['noalpha'])) || ($param['noalpha'] !== true)) { + ImageAlphaBlending($this->_canvas, true); + $this->_alpha = true; + } + } else { + $this->_canvas = ImageCreate($this->_width, $this->_height); + } + } + + if (isset($param['antialias'])) { + $this->_antialias = $param['antialias']; + } + + if ($this->_antialias === true) { + $this->_antialias = 'driver'; + } + + if (($this->_gd2) && ($this->_antialias === 'native') && (function_exists('ImageAntialias'))) { + ImageAntialias($this->_canvas, true); + } + } + + /** + * Get an GD image resource from a file + * + * @param string $filename + * @return mixed The GD image resource + * @access private + */ + function &_getGD($filename) + { + $info = getimagesize($filename); + + $result = null; + switch($info[2]) { + case IMG_PNG: + $result =& ImageCreateFromPNG($filename); + break; + + case IMG_JPG: + $result =& ImageCreateFromJPEG($filename); + break; + + case IMG_GIF: + $result =& ImageCreateFromGIF($filename); + break; + } + return $result; + } + + /** + * Get the color index for the RGB color + * + * @param int $color The color + * @return int The GD image index of the color + * @access private + */ + function _color($color = false) + { + if (($color === false) || ($color === 'opague') || ($color === 'transparent')) { + return ImageColorTransparent($this->_canvas); + } else { + return Image_Canvas_Color::allocateColor($this->_canvas, $color); + } + } + + /** + * Get the GD applicable linestyle + * + * @param mixed $lineStyle The line style to return, false if the one + * explicitly set + * @return mixed A GD compatible linestyle + * @access private + */ + function _getLineStyle($lineStyle = false) + { + if ($this->_gd2) { + ImageSetThickness($this->_canvas, $this->_thickness); + } + + if ($lineStyle == 'transparent') { + return false; + } elseif ($lineStyle === false) { + if (is_array($this->_lineStyle)) { + $colors = array(); + foreach ($this->_lineStyle as $color) { + if ($color === 'transparent') { + $color = false; + } + $colors[] = $this->_color($color); + } + ImageSetStyle($this->_canvas, $colors); + return IMG_COLOR_STYLED; + } else { + return $this->_color($this->_lineStyle); + } + } else { + return $this->_color($lineStyle); + } + } + + /** + * Get the GD applicable fillstyle + * + * @param mixed $fillStyle The fillstyle to return, false if the one + * explicitly set + * @return mixed A GD compatible fillstyle + * @access private + */ + function _getFillStyle($fillStyle = false, $x0 = 0, $y0 = 0, $x1 = 0, $y1 = 0) + { + if ($this->_tileImage != null) { + ImageDestroy($this->_tileImage); + $this->_tileImage = null; + } + if ($fillStyle == 'transparent') { + return false; + } elseif ($fillStyle === false) { + if (is_resource($this->_fillStyle)) { + $x = min($x0, $x1); + $y = min($y0, $y1); + $w = abs($x1 - $x0) + 1; + $h = abs($y1 - $y0) + 1; + if ($this->_gd2) { + $this->_tileImage = ImageCreateTrueColor( + $this->getWidth(), + $this->getHeight() + ); + + ImageCopyResampled( + $this->_tileImage, + $this->_fillStyle, + $x, + $y, + 0, + 0, + $w, + $h, + ImageSX($this->_fillStyle), + ImageSY($this->_fillStyle) + ); + } else { + $this->_tileImage = ImageCreate( + $this->getWidth(), + $this->getHeight() + ); + + ImageCopyResized( + $this->_tileImage, + $this->_fillStyle, + $x, + $y, + 0, + 0, + $w, + $h, + ImageSX($this->_fillStyle), + ImageSY($this->_fillStyle) + ); + } + ImageSetTile($this->_canvas, $this->_tileImage); + return IMG_COLOR_TILED; + } elseif ((is_array($this->_fillStyle)) && (isset($this->_fillStyle['direction']))) { + $width = abs($x1 - $x0) + 1; + $height = abs($y1 - $y0) + 1; + + switch ($this->_fillStyle['direction']) { + case 'horizontal': + $count = $width; + break; + + case 'vertical': + $count = $height; + break; + + case 'horizontal_mirror': + $count = $width / 2; + break; + + case 'vertical_mirror': + $count = $height / 2; + break; + + case 'diagonal_tl_br': + case 'diagonal_bl_tr': + $count = sqrt($width * $width + $height * $height); + break; + + case 'radial': + $count = max($width, $height, sqrt($width * $width + $height * $height)) + 1; + break; + + } + + $count = round($count); + + if ($this->_gd2) { + $this->_tileImage = ImageCreateTrueColor( + $this->getWidth(), + $this->getHeight() + ); + } else { + $this->_tileImage = ImageCreate( + $this->getWidth(), + $this->getHeight() + ); + } + + + $startColor = Image_Canvas_Color::color2RGB( + ($this->_fillStyle['direction'] == 'radial' ? + $this->_fillStyle['end'] : + $this->_fillStyle['start'] + ) + ); + $endColor = Image_Canvas_Color::color2RGB( + ($this->_fillStyle['direction'] == 'radial' ? + $this->_fillStyle['start'] : + $this->_fillStyle['end'] + ) + ); + + $redIncrement = ($endColor[0] - $startColor[0]) / $count; + $greenIncrement = ($endColor[1] - $startColor[1]) / $count; + $blueIncrement = ($endColor[2] - $startColor[2]) / $count; + + $color = false; + for ($i = 0; $i < $count; $i ++) { + unset($color); + if ($i == 0) { + $color = $startColor; + unset($color[3]); + } else { + $color[0] = round(($redIncrement * $i) + + $redIncrement + $startColor[0]); + $color[1] = round(($greenIncrement * $i) + + $greenIncrement + $startColor[1]); + $color[2] = round(($blueIncrement * $i) + + $blueIncrement + $startColor[2]); + } + $color = Image_Canvas_Color::allocateColor( + $this->_tileImage, + $color + ); + + switch ($this->_fillStyle['direction']) { + case 'horizontal': + ImageLine($this->_tileImage, + $x0 + $i, + $y0, + $x0 + $i, + $y1, $color); + break; + + case 'vertical': + ImageLine($this->_tileImage, + $x0, + $y1 - $i, + $x1, + $y1 - $i, $color); + break; + + case 'horizontal_mirror': + if (($x0 + $i) <= ($x1 - $i)) { + ImageLine($this->_tileImage, + $x0 + $i, + $y0, + $x0 + $i, + $y1, $color); + + ImageLine($this->_tileImage, + $x1 - $i, + $y0, + $x1 - $i, + $y1, $color); + } + break; + + case 'vertical_mirror': + if (($y0 + $i) <= ($y1 - $i)) { + ImageLine($this->_tileImage, + $x0, + $y0 + $i, + $x1, + $y0 + $i, $color); + ImageLine($this->_tileImage, + $x0, + $y1 - $i, + $x1, + $y1 - $i, $color); + } + break; + + case 'diagonal_tl_br': + if (($i > $width) && ($i > $height)) { + $polygon = array ( + $x1, $y0 + $i - $width - 1, + $x1, $y1, + $x0 + $i - $height - 1, $y1); + } elseif ($i > $width) { + $polygon = array ( + $x0, $y0 + $i, + $x0, $y1, + $x1, $y1, + $x1, $y0 + $i - $width - 1); + } elseif ($i > $height) { + $polygon = array ( + $x0 + $i - $height - 1, $y1, + $x1, $y1, + $x1, $y0, + $x0 + $i, $y0); + } else { + $polygon = array ( + $x0, $y0 + $i, + $x0, $y1, + $x1, $y1, + $x1, $y0, + $x0 + $i, $y0); + } + ImageFilledPolygon( + $this->_tileImage, + $polygon, + count($polygon) / 2, + $color + ); + break; + + case 'diagonal_bl_tr': + if (($i > $width) && ($i > $height)) { + $polygon = array ( + $x1, $y1 - $i + $width - 1, + $x1, $y0, + $x0 + $i - $height - 1, $y0); + } elseif ($i > $width) { + $polygon = array ( + $x0, $y1 - $i, + $x0, $y0, + $x1, $y0, + $x1, $y1 - $i + $width - 1); + } elseif ($i > $height) { + $polygon = array ( + $x0 + $i - $height - 1, $y0, + $x1, $y0, + $x1, $y1, + $x0 + $i, $y1); + } else { + $polygon = array ( + $x0, $y1 - $i, + $x0, $y0, + $x1, $y0, + $x1, $y1, + $x0 + $i, $y1); + } + ImageFilledPolygon( + $this->_tileImage, + $polygon, + count($polygon) / 2, + $color + ); + break; + + case 'radial': + if (($this->_gd2) && ($i < $count)) { + ImageFilledEllipse( + $this->_tileImage, + $x0 + $width / 2, + $y0 + $height / 2, + $count - $i, + $count - $i, + $color + ); + } + break; + } + } + ImageSetTile($this->_canvas, $this->_tileImage); + return IMG_COLOR_TILED; + } else { + return $this->_color($this->_fillStyle); + } + } else { + return $this->_color($fillStyle); + } + } + + /** + * Sets an image that should be used for filling + * + * @param string $filename The filename of the image to fill with + */ + function setFillImage($filename) + { + $this->_fillStyle =& $this->_getGD($filename); + } + + /** + * Sets the font options. + * + * The $font array may have the following entries: + * + * 'ttf' = the .ttf file (either the basename, filename or full path) + * If 'ttf' is specified, then the following can be specified + * + * 'size' = size in pixels + * + * 'angle' = the angle with which to write the text + * + * @param array $font The font options. + */ + function setFont($fontOptions) + { + parent::setFont($fontOptions); + + if (isset($this->_font['ttf'])) { + $this->_font['file'] = str_replace('\\', '/', Image_Canvas_Tool::fontMap($this->_font['ttf'])); + } elseif (!isset($this->_font['font'])) { + $this->_font['font'] = 1; + } + + if (!isset($this->_font['color'])) { + $this->_font['color'] = 'black'; + } + + if ((isset($this->_font['angle'])) && ($this->_font['angle'] === false)) { + $this->_font['angle'] = 0; + } + } + + /** + * Calculate pixels on a line + * + * @param int $x0 X start point + * @param int $y0 X start point + * @param int $x1 X end point + * @param int $y1 Y end point + * @return array An associated array of x,y points with all pixels on the + * line + * @access private + */ + function &_linePixels($x0, $y0, $x1, $y1) + { + $pixels = array(); + if (abs($x0 - $x1) > abs($y0 - $y1)) { + if ($x1 != $x0) { + $m = ($y1 - $y0) / ($x1 - $x0); + } else { + $m = 0; + } + $b = $y0 - $m * $x0; + $strx = min($x0, $x1); + $endx = max($x0, $x1); + for ($x = $strx; $x <= $endx; $x++) { + $pixels[] = array('X' => $x, 'Y' => ($m * $x + $b)); + } + } else { + if ($y1 != $y0) { + $m = ($x1 - $x0) / ($y1 - $y0); + } else { + $m = 0; + } + $b = $x0 - $m * $y0; + $stry = min($y0, $y1); + $endy = max($y0, $y1); + for ($y = $stry; $y <= $endy; $y++) { + $pixels[] = array('X' => ($m * $y + $b), 'Y' => $y); + } + } + return $pixels; + } + + /** + * Draws an antialiased line + * + * @param int $x0 X start point + * @param int $y0 X start point + * @param int $x1 X end point + * @param int $y1 Y end point + * @param mixed $color The line color, can be omitted + * @access private + */ + function _antialiasedLine($x0, $y0, $x1, $y1, $color = false) + { + if (($line = $this->_getLineStyle($color)) !== false) { + if ($line >= 0) { + $line = ImageColorsForIndex($this->_canvas, $line); + $pixels = &$this->_linePixels($x0, $y0, $x1, $y1); + foreach ($pixels as $point) { + $this->_antialiasedPixel($point['X'], $point['Y'], $line); + } + unset($pixels); + } + } + } + + + /** + * Draws an antialiased pixel + * + * @param int $x X point + * @param int $y Y point + * @param mixed $color The pixel color + * @access private + */ + function _antialiasedPixel($x, $y, $color) + { + $fx = floor($x); + $fy = floor($y); + $cx = ceil($x); + $cy = ceil($y); + $xa = $x - $fx; + $xb = $cx - $x; + $ya = $y - $fy; + $yb = $cy - $y; + if (($cx == $fx) && ($cy == $fy)) { + $this->_antialisedSubPixel($fx, $fy, 0.0, 1.0, $color); + } else { + $this->_antialisedSubPixel($fx, $fy, $xa + $ya, $xb + $yb, $color); + if ($cy != $fy) { + $this->_antialisedSubPixel($fx, $cy, $xa + $yb, $xb + $ya, $color); + } + if ($cx != $fx) { + $this->_antialisedSubPixel($cx, $fy, $xb + $ya, $xa + $yb, $color); + if ($cy != $fy) { + $this->_antialisedSubPixel($cx, $cy, $xb + $yb, $xa + $ya, $color); + } + } + } + } + + /** + * Antialias'es the pixel around x,y with weights a,b + * + * @param int $x X point + * @param int $y Y point + * @param int $a The weight of the current color + * @param int $b The weight of the applied/wanted color + * @param mixed $color The pixel color + * @access private + */ + function _antialisedSubPixel($x, $y, $a, $b, $color) + { + $x = $this->_getX($x); + $y = $this->_getX($y); + if (($x >=0 ) && ($y >= 0) && ($x < $this->getWidth()) && ($y < $this->getHeight())) { + $tempColor = ImageColorsForIndex($this->_canvas, ImageColorAt($this->_canvas, $x, $y)); + + $newColor[0] = min(255, round($tempColor['red'] * $a + $color['red'] * $b)); + $newColor[1] = min(255, round($tempColor['green'] * $a + $color['green'] * $b)); + $newColor[2] = min(255, round($tempColor['blue'] * $a + $color['blue'] * $b)); + //$newColor[3] = 0; + $color = '#'; + foreach ($newColor as $acolor) { + $color .= sprintf('%02s', dechex($acolor)); + } + $newColor = $this->_color($color);//,'rgb(' . $newColor[0] . ',' . $newColor[1] . ',' . $newColor[2] .')'; + + ImageSetPixel($this->_canvas, $x, $y, $newColor); + } + } + + + /** + * Draw a line end + * + * Parameter array: + * + * 'x': int X point + * + * 'y': int Y point + * + * 'end': string The end type of the end + * + * 'size': int The size of the end + * + * 'color': string The color of the end + * + * 'angle': int [optional] The angle with which to draw the end + * + * @param array $params Parameter array + */ + function drawEnd($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $size = $params['size']; + //var_dump($params); + $angle = deg2rad((isset($params['angle']) ? $params['angle'] : 0)); + $pi2 = pi() / 2; + switch ($params['end']) { + case 'lollipop': + case 'circle': + $this->ellipse( + array( + 'x' => $x, + 'y' => $y, + 'rx' => $size / 2, + 'ry' => $size / 2, + 'fill' => $params['color'], + 'line' => $params['color'] + ) + ); + break; + case 'diamond': + $x0 = round($params['x'] + cos($angle) * $size * 0.65); + $y0 = round($params['y'] - sin($angle) * $size * 0.65); + $shape = array( + $x0 + round(cos($angle) * $size * 0.65), + $y0 - round(sin($angle) * $size * 0.65), + $x0 + round(cos($angle + $pi2) * $size * 0.65), + $y0 - round(sin($angle + $pi2) * $size * 0.65), + $x0 + round(cos($angle + pi()) * $size * 0.65), + $y0 - round(sin($angle + pi()) * $size * 0.65), + $x0 + round(cos($angle + 3 * $pi2) * $size * 0.65), + $y0 - round(sin($angle + 3 * $pi2) * $size * 0.65) + ); + break; + case 'line': + $this->line( + array( + 'x0' => $x + round(cos($angle + $pi2) * $size / 2), + 'y0' => $y - round(sin($angle + $pi2) * $size / 2), + 'x1' => $x + round(cos($angle + 3 * $pi2) * $size / 2), + 'y1' => $y - round(sin($angle + 3 * $pi2) * $size / 2), + 'color' => $params['color'] + ) + ); + break; + case 'box': + case 'rectangle': + $x0 = round($params['x'] + cos($angle) * $size / 2); + $y0 = round($params['y'] - sin($angle) * $size / 2); + $pi4 = pi() / 4; + $shape = array( + $x0 + round(cos($angle + $pi4) * $size / 2), + $y0 - round(sin($angle + $pi4) * $size / 2), + $x0 + round(cos($angle + $pi2 + $pi4) * $size / 2), + $y0 - round(sin($angle + $pi2 + $pi4) * $size / 2), + $x0 + round(cos($angle + pi() + $pi4) * $size / 2), + $y0 - round(sin($angle + pi() + $pi4) * $size / 2), + $x0 + round(cos($angle + 3 * $pi2 + $pi4) * $size / 2), + $y0 - round(sin($angle + 3 * $pi2 + $pi4) * $size / 2) + ); + break; + case 'arrow': + $shape = array( + $x + cos($angle) * $size, + $y - sin($angle) * $size, + $x + cos($angle + $pi2) * $size * 0.4, + $y - sin($angle + $pi2) * $size * 0.4, + $x + cos($angle + 3 * $pi2) * $size * 0.4, + $y - sin($angle + 3 * $pi2) * $size * 0.4, + ); + break; + case 'arrow2': + $shape = array( + $x + round(cos($angle) * $size), + $y - round(sin($angle) * $size), + $x + round(cos($angle + $pi2 + deg2rad(45)) * $size), + $y - round(sin($angle + $pi2 + deg2rad(45)) * $size), + $x, + $y, + $x + round(cos($angle + 3 * $pi2 - deg2rad(45)) * $size), + $y - round(sin($angle + 3 * $pi2 - deg2rad(45)) * $size), + ); + break; + } + + if (isset($shape)) { + // output the shape + if (($fill = $this->_getFillStyle($params['color'])) !== false) { + ImageFilledPolygon($this->_canvas, $shape, count($shape)/2, $fill); + } + } + parent::drawEnd($params); + } + + /** + * Draw a line + * + * Parameter array: + * + * 'x0': int X start point + * + * 'y0': int Y start point + * + * 'x1': int X end point + * + * 'y1': int Y end point + * + * 'color': mixed [optional] The line color + * + * @param array $params Parameter array + */ + function line($params) + { + $x0 = $this->_getX($params['x0']); + $y0 = $this->_getY($params['y0']); + $x1 = $this->_getX($params['x1']); + $y1 = $this->_getY($params['y1']); + $color = (isset($params['color']) ? $params['color'] : false); + + $x0 = $this->_getX($x0); + $y0 = $this->_getY($y0); + $x1 = $this->_getX($x1); + $y1 = $this->_getY($y1); + if (($this->_antialias === 'driver') && ($x0 != $x1) && ($y0 != $y1)) { + $this->_antialiasedLine($x0, $y0, $x1, $y1, $color); + } elseif (($line = $this->_getLineStyle($color)) !== false) { + ImageLine($this->_canvas, $x0, $y0, $x1, $y1, $line); + } + parent::line($params); + } + + /** + * Parameter array: + * + * 'connect': bool [optional] Specifies whether the start point should be + * connected to the endpoint (closed polygon) or not (connected line) + * + * 'fill': mixed [optional] The fill color + * + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function polygon($params) + { + include_once 'Image/Canvas/Tool.php'; + + $connectEnds = (isset($params['connect']) ? $params['connect'] : false); + $fillColor = (isset($params['fill']) ? $params['fill'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + if (!$connectEnds) { + $fillColor = 'transparent'; + } + $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); + + $lastPoint = false; + foreach ($this->_polygon as $point) { + if (($lastPoint) && (isset($lastPoint['P1X'])) && + (isset($lastPoint['P1Y'])) && (isset($lastPoint['P2X'])) && + (isset($lastPoint['P2Y']))) + { + $dx = abs($point['X'] - $lastPoint['X']); + $dy = abs($point['Y'] - $lastPoint['Y']); + $d = sqrt($dx * $dx + $dy * $dy); + if ($d > 0) { + $interval = 1 / $d; + for ($t = 0; $t <= 1; $t = $t + $interval) { + $x = Image_Canvas_Tool::bezier( + $t, + $lastPoint['X'], + $lastPoint['P1X'], + $lastPoint['P2X'], + $point['X'] + ); + + $y = Image_Canvas_Tool::bezier( + $t, + $lastPoint['Y'], + $lastPoint['P1Y'], + $lastPoint['P2Y'], + $point['Y'] + ); + + if (!isset($low['X'])) { + $low['X'] = $x; + } else { + $low['X'] = min($x, $low['X']); + } + if (!isset($high['X'])) { + $high['X'] = $x; + } else { + $high['X'] = max($x, $high['X']); + } + if (!isset($low['Y'])) { + $low['Y'] = $y; + } else { + $low['Y'] = min($y, $low['Y']); + } + if (!isset($high['Y'])) { + $high['Y'] = $y; + } else { + $high['Y'] = max($y, $high['Y']); + } + $polygon[] = $x; + $polygon[] = $y; + } + if (($t - $interval) < 1) { + $x = Image_Canvas_Tool::bezier( + 1, + $lastPoint['X'], + $lastPoint['P1X'], + $lastPoint['P2X'], + $point['X'] + ); + + $y = Image_Canvas_Tool::bezier( + 1, + $lastPoint['Y'], + $lastPoint['P1Y'], + $lastPoint['P2Y'], + $point['Y'] + ); + + $polygon[] = $x; + $polygon[] = $y; + } + } + } else { + if (!isset($low['X'])) { + $low['X'] = $point['X']; + } else { + $low['X'] = min($point['X'], $low['X']); + } + if (!isset($high['X'])) { + $high['X'] = $point['X']; + } else { + $high['X'] = max($point['X'], $high['X']); + } + if (!isset($low['Y'])) { + $low['Y'] = $point['Y']; + } else { + $low['Y'] = min($point['Y'], $low['Y']); + } + if (!isset($high['Y'])) { + $high['Y'] = $point['Y']; + } else { + $high['Y'] = max($point['Y'], $high['Y']); + } + + $polygon[] = $point['X']; + $polygon[] = $point['Y']; + } + $lastPoint = $point; + } + + if ((isset($polygon)) && (is_array($polygon))) { + if ($connectEnds) { + if (($fill = $this->_getFillStyle($fillColor, $low['X'], $low['Y'], $high['X'], $high['Y'])) !== false) { + ImageFilledPolygon($this->_canvas, $polygon, count($polygon)/2, $fill); + } + if ($this->_antialias === 'driver') { + $pfirst = $p0 = false; + reset($polygon); + + while (list(, $x) = each($polygon)) { + list(, $y) = each($polygon); + if ($p0 !== false) { + $this->_antialiasedLine($p0['X'], $p0['Y'], $x, $y, $lineColor); + } + if ($pfirst === false) { + $pfirst = array('X' => $x, 'Y' => $y); + } + $p0 = array('X' => $x, 'Y' => $y);; + } + + $this->_antialiasedLine($p0['X'], $p0['Y'], $pfirst['X'], $pfirst['Y'], $lineColor); + } elseif (($line = $this->_getLineStyle($lineColor)) !== false) { + ImagePolygon($this->_canvas, $polygon, count($polygon)/2, $line); + } + } else { + $prev_point = false; + if ($this->_antialias === 'driver') { + reset($polygon); + while (list(, $x) = each($polygon)) { + list(, $y) = each($polygon); + if ($prev_point) { + $this->_antialiasedLine( + $prev_point['X'], + $prev_point['Y'], + $x, + $y, + $lineColor + ); + } + $prev_point = array('X' => $x, 'Y' => $y);; + } + } elseif (($line = $this->_getLineStyle($lineColor)) !== false) { + reset($polygon); + while (list(, $x) = each($polygon)) { + list(, $y) = each($polygon); + if ($prev_point) { + ImageLine( + $this->_canvas, + $prev_point['X'], + $prev_point['Y'], + $x, + $y, + $line + ); + } + $prev_point = array('X' => $x, 'Y' => $y);; + } + } + } + } + + parent::polygon($params); + } + + /** + * Draw a rectangle + * + * Parameter array: + * + * 'x0': int X start point + * + * 'y0': int Y start point + * + * 'x1': int X end point + * + * 'y1': int Y end point + * + * 'fill': mixed [optional] The fill color + * + * 'line': mixed [optional] The line color + * + * @param array $params Parameter array + */ + function rectangle($params) + { + $x0 = $this->_getX($params['x0']); + $y0 = $this->_getY($params['y0']); + $x1 = $this->_getX($params['x1']); + $y1 = $this->_getY($params['y1']); + $fillColor = (isset($params['fill']) ? $params['fill'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + if (($fill = $this->_getFillStyle($fillColor, $x0, $y0, $x1, $y1)) !== false) { + ImageFilledRectangle($this->_canvas, $x0, $y0, $x1, $y1, $fill); + } + + if (($line = $this->_getLineStyle($lineColor)) !== false) { + ImageRectangle($this->_canvas, $x0, $y0, $x1, $y1, $line); + } + + parent::rectangle($params); + } + + /** + * Draw an ellipse + * + * Parameter array: + * + * 'x': int X center point + * + * 'y': int Y center point + * + * 'rx': int X radius + * + * 'ry': int Y radius + * + * 'fill': mixed [optional] The fill color + * + * 'line': mixed [optional] The line color + * + * @param array $params Parameter array + */ + function ellipse($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $rx = $this->_getX($params['rx']); + $ry = $this->_getY($params['ry']); + $fillColor = (isset($params['fill']) ? $params['fill'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + if (($fill = $this->_getFillStyle($fillColor, $x - $rx, $y - $ry, $x + $rx, $y + $ry)) !== false) { + ImageFilledEllipse($this->_canvas, $x, $y, $rx * 2, $ry * 2, $fill); + } + + if (($line = $this->_getLineStyle($lineColor)) !== false) { + ImageEllipse($this->_canvas, $x, $y, $rx * 2, $ry * 2, $line); + } + parent::ellipse($params); + } + + /** + * Draw a pie slice + * + * Parameter array: + * + * 'x': int X center point + * + * 'y': int Y center point + * + * 'rx': int X radius + * + * 'ry': int Y radius + * + * 'v1': int The starting angle (in degrees) + * + * 'v2': int The end angle (in degrees) + * + * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) + * + * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) + * + * 'fill': mixed [optional] The fill color + * + * 'line': mixed [optional] The line color + * + * @param array $params Parameter array + */ + function pieslice($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $rx = $params['rx']; + $ry = $params['ry']; + $v1 = $params['v1']; + $v2 = $params['v2']; + $srx = (isset($params['srx']) ? $params['srx'] : 0); + $sry = (isset($params['sry']) ? $params['sry'] : 0); + $fillColor = (isset($params['fill']) ? $params['fill'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + $dA = 0.1; + + if (($srx !== false) && ($sry !== false)) { + $angle = max($v1, $v2); + while ($angle >= min($v1, $v2)) { + $polygon[] = ($x + $srx * cos(deg2rad($angle % 360))); + $polygon[] = ($y + $sry * sin(deg2rad($angle % 360))); + $angle -= $dA; + } + if (($angle + $dA) > min($v1, $v2)) { + $polygon[] = ($x + $srx * cos(deg2rad(min($v1, $v2) % 360))); + $polygon[] = ($y + $sry * sin(deg2rad(min($v1, $v2) % 360))); + } + } else { + $polygon[] = $x; + $polygon[] = $y; + } + + $angle = min($v1, $v2); + while ($angle <= max($v1, $v2)) { + $polygon[] = ($x + $rx * cos(deg2rad($angle % 360))); + $polygon[] = ($y + $ry * sin(deg2rad($angle % 360))); + $angle += $dA; + } + + if (($angle - $dA) < max($v1, $v2)) { + $polygon[] = ($x + $rx * cos(deg2rad(max($v1, $v2) % 360))); + $polygon[] = ($y + $ry * sin(deg2rad(max($v1, $v2) % 360))); + } + + if ((($fill = $this->_getFillStyle($fillColor, $x - $rx - 1, $y - $ry - 1, $x + $rx + 1, $y + $ry + 1)) !== false) && (count($polygon) > 2)) { + ImageFilledPolygon($this->_canvas, $polygon, count($polygon) / 2, $fill); + } + + if (($line = $this->_getLineStyle($lineColor)) !== false) { + ImagePolygon($this->_canvas, $polygon, count($polygon) / 2, $line); + } + + parent::pieSlice($params); + } + + /** + * Get the width of a text, + * + * @param string $text The text to get the width of + * @return int The width of the text + */ + function textWidth($text) + { + if (isset($this->_font['file'])) { + $angle = 0; + if (isset($this->_font['angle'])) { + $angle = $this->_font['angle']; + } + + $width = 0; + $lines = explode("\n", $text); + foreach ($lines as $line) { + $bounds = ImageTTFBBox( + $this->_font['size'], + $angle, + $this->_font['file'], + $text + ); + + $x0 = min($bounds[0], $bounds[2], $bounds[4], $bounds[6]); + $x1 = max($bounds[0], $bounds[2], $bounds[4], $bounds[6]); + $width = max(abs($x0 - $x1), $width); + } + return $width; + } else { + if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { + return ImageFontHeight($this->_font['font']) * (substr_count($text, "\n") + 1); + } else { + $width = 0; + $lines = explode("\n", $text); + foreach ($lines as $line) { + $width = max($width, ImageFontWidth($this->_font['font']) * strlen($line)); + } + return $width; + } + } + } + + /** + * Get the height of a text. + * + * Note! This method can give some peculiar results, since ImageTTFBBox() returns the total + * bounding box of a text, where ImageTTF() writes the text on the baseline of the text, that + * is 'g', 'p', 'q' and other letters that dig under the baseline will appear to have a larger + * height than they actually do. Have a look at the tests/text.php test case - the first two + * columns, 'left and 'center', both look alright, whereas the last column, 'right', appear + * with a larger space between the first text and the second. This is because the total height + * is actually smaller by exactly the number of pixels that the 'g' digs under the baseline. + * Remove the 'g' from the text and they appear correct. + * + * @param string $text The text to get the height of + * @param bool $force Force the method to calculate the size + * @return int The height of the text + */ + function textHeight($text, $force = false) + { + if (isset($this->_font['file'])) { + $angle = 0; + if (isset($this->_font['angle'])) { + $angle = $this->_font['angle']; + } + + $linebreaks = substr_count($text, "\n"); + if (($angle == 0) && ($force === false)) { + /* + * if the angle is 0 simply return the size, due to different + * heights for example for x-axis labels, making the labels + * _not_ appear as written on the same baseline + */ + return $this->_font['size'] + ($this->_font['size'] + 2) * $linebreaks; + } + + $height = 0; + $lines = explode("\n", $text); + foreach ($lines as $line) { + $bounds = ImageTTFBBox( + $this->_font['size'], + $angle, + $this->_font['file'], + $line + ); + + $y0 = min($bounds[1], $bounds[3], $bounds[5], $bounds[7]); + $y1 = max($bounds[1], $bounds[3], $bounds[5], $bounds[7]); + $height += abs($y0 - $y1); + } + return $height + $linebreaks * 2; + } else { + if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { + $width = 0; + $lines = explode("\n", $text); + foreach ($lines as $line) { + $width = max($width, ImageFontWidth($this->_font['font']) * strlen($line)); + } + return $width; + } else { + return ImageFontHeight($this->_font['font']) * (substr_count($text, "\n") + 1); + } + } + } + + /** + * Calculated the absolute bottom-left position of the text, by simulating + * the calculation of the baseline drop. + * @param int $x The relative x position to write the text + * @param int $y The relative y position to write the text + * @param string $text The text to write + * @param array $align The alignment of the text relative to (x, y) + * @returns array An array containing the absolute x and y positions + * @access private + */ + function _getAbsolutePosition($x, $y, $text, $align) + { + if ($this->_font['angle'] > 0) { + $w0 = $this->textWidth($text); + $h0 = $this->textHeight($text); + + if ($align['vertical'] == 'bottom') { + $dy = $y - $h0; + } + else if ($align['vertical'] == 'center') { + $dy = $y - $h0 / 2; + } + else if ($align['vertical'] == 'top') { + $dy = $y; + } + + if ($align['horizontal'] == 'right') { + $dx = $x - $w0; + } + else if ($align['horizontal'] == 'center') { + $dx = $x - $w0 / 2; + } + else if ($align['horizontal'] == 'left') { + $dx = $x; + } + + if (($this->_font['angle'] < 180) && ($this->_font['angle'] >= 0)) { + $dy += $h0; + } + if (($this->_font['angle'] >= 90) && ($this->_font['angle'] < 270)) { + $dx += $w0; + } + } + else { + // get the maximum size of normal text above base line - sampled by 'Al' + $size1 = imagettfbbox($this->_font['size'], 0, $this->_font['file'], 'Al'); + $height1 = abs($size1[7] - $size1[1]); + + // get the maximum size of all text above base and below line - sampled by 'AlgjpqyQ' + $size2 = imagettfbbox($this->_font['size'], 0, $this->_font['file'], 'AlgjpqyQ'); + $height2 = abs($size2[7] - $size2[1]); + + // get the size of the text, simulating height above baseline beinh max, by sampling using 'Al' + $size = imagettfbbox($this->_font['size'], 0, $this->_font['file'], 'Al' . $text); + $height = abs($size[7] - $size[1]); + + // if all text is above baseline, i.e. height of text compares to max height above (within 10%) + if (abs($height - $height1)/$height1 < 0.1) { + $dHeight = 0; + } + else { + $dHeight = abs($height2 - $height1); + } + + // specifies the bottom-left corner! + $dx = $x + sin(deg2rad($this->_font['angle'])) * $dHeight; + $dy = $y - cos(deg2rad($this->_font['angle'])) * $dHeight; + + if ($align['vertical'] == 'top') { + $dy += $height; + } + else if ($align['vertical'] == 'center') { + $dy += ($height + $dHeight) / 2; + } + else if ($align['vertical'] == 'bottom') { + $dy += $dHeight; + } + + if ($align['horizontal'] == 'center') { + $factor = 0.5; + } + else if ($align['horizontal'] == 'right') { + $factor = 1; + } + else { + $factor = 0; + } + + if ($factor != 0) { + $size = imagettfbbox($this->_font['size'], 0, $this->_font['file'], $text); + $w0 = abs($size[2] - $size[0]); + $dx -= cos(deg2rad($this->_font['angle'])) * $w0 * $factor; + $dy += sin(deg2rad($this->_font['angle'])) * $w0 * $factor; + } + } + + return array('x' => $dx, 'y' => $dy); + } + + /** + * Writes text + * + * Parameter array: + * + * 'x': int X-point of text + * + * 'y': int Y-point of text + * + * 'text': string The text to add + * + * 'alignment': array [optional] Alignment + * + * 'color': mixed [optional] The color of the text + */ + function addText($params) + { + $x0 = $this->_getX($params['x']); + $y0 = $this->_getY($params['y']); + $text = $params['text']; + $color = (isset($params['color']) ? $params['color'] : false); + $alignment = (isset($params['alignment']) ? $params['alignment'] : false); + + $text = str_replace("\r", '', $text); + + if (!is_array($alignment)) { + $alignment = array('vertical' => 'top', 'horizontal' => 'left'); + } + + if (!isset($alignment['vertical'])) { + $alignment['vertical'] = 'top'; + } + + if (!isset($alignment['horizontal'])) { + $alignment['horizontal'] = 'left'; + } + + if (isset($this->_font['size'])) { + $textHeight = $this->_font['size'] + 2; + } + else { + $textHeight = $this->textHeight('A'); + } + $lines = explode("\n", $text); + foreach ($lines as $line) { + $x = $x0; + $y = $y0; + + $y0 += $textHeight + 2; + + if (($color === false) && (isset($this->_font['color']))) { + $color = $this->_font['color']; + } + + if ($color != 'transparent') { + if (isset($this->_font['file'])) { + $result = $this->_getAbsolutePosition($x, $y, $line, $alignment); + ImageTTFText( + $this->_canvas, + $this->_font['size'], + $this->_font['angle'], + $result['x'], + $result['y'], + $this->_color($color), + $this->_font['file'], + $line + ); + + } else { + $width = $this->textWidth($line); + $height = $this->textHeight($line); + if ($alignment['horizontal'] == 'right') { + $x -= $width; + } + else if ($alignment['horizontal'] == 'center') { + $x -= $width / 2; + } + if ($alignment['vertical'] == 'bottom') { + $y -= $height; + } + else if ($alignment['vertical'] == 'center') { + $y -= $height / 2; + } + if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { + ImageStringUp( + $this->_canvas, + $this->_font['font'], + $x, + $y + $this->textHeight($text), + $line, + $this->_color($color) + ); + } else { + ImageString( + $this->_canvas, + $this->_font['font'], + $x, + $y, + $line, + $this->_color($color) + ); + } + } + } + } + parent::addText($params); + } + + /** + * Overlay image + * + * Parameter array: + * + * 'x': int X-point of overlayed image + * + * 'y': int Y-point of overlayed image + * + * 'filename': string The filename of the image to overlay + * + * 'width': int [optional] The width of the overlayed image (resizing if possible) + * + * 'height': int [optional] The height of the overlayed image (resizing if possible) + * + * 'alignment': array [optional] Alignment + */ + function image($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $filename = $params['filename']; + $width = (isset($params['width']) ? $params['width'] : false); + $height = (isset($params['height']) ? $params['height'] : false); + $alignment = (isset($params['alignment']) ? $params['alignment'] : false); + + if (!is_array($alignment)) { + $alignment = array('vertical' => 'top', 'horizontal' => 'left'); + } + + if (!isset($alignment['vertical'])) { + $alignment['vertical'] = 'top'; + } + + if (!isset($alignment['horizontal'])) { + $alignment['horizontal'] = 'left'; + } + + if (file_exists($filename)) { + if (strtolower(substr($filename, -4)) == '.png') { + $image = ImageCreateFromPNG($filename); + } elseif (strtolower(substr($filename, -4)) == '.gif') { + $image = ImageCreateFromGIF($filename); + } else { + $image = ImageCreateFromJPEG($filename); + } + + $imgWidth = ImageSX($image); + $imgHeight = ImageSY($image); + + $outputWidth = ($width !== false ? $width : $imgWidth); + $outputHeight = ($height !== false ? $height : $imgHeight); + + if ($alignment['horizontal'] == 'right') { + $x -= $outputWidth; + } elseif ($alignment['horizontal'] == 'center') { + $x -= $outputWidth / 2; + } + + if ($alignment['vertical'] == 'bottom') { + $y -= $outputHeight; + } elseif ($alignment['vertical'] == 'center') { + $y -= $outputHeight / 2; + } + + if ((($width !== false) && ($width != $imgWidth)) || + (($height !== false) && ($height != $imgHeight))) + { + if ($this->_gd2) { + ImageCopyResampled( + $this->_canvas, + $image, + $x, + $y, + 0, + 0, + $width, + $height, + $imgWidth, + $imgHeight + ); + } else { + ImageCopyResized( + $this->_canvas, + $image, + $x, + $y, + 0, + 0, + $width, + $height, + $imgWidth, + $imgHeight + ); + } + } else { + ImageCopy( + $this->_canvas, + $image, + $x, + $y, + 0, + 0, + $imgWidth, + $imgHeight + ); + } + ImageDestroy($image); + } + parent::image($params); + } + + /** + * Set clipping to occur + * + * Parameter array: + * + * 'x0': int X point of Upper-left corner + * 'y0': int X point of Upper-left corner + * 'x1': int X point of lower-right corner + * 'y1': int Y point of lower-right corner + */ + function setClipping($params = false) + { + if ($params === false) { + $index = count($this->_clipping) - 1; + if (isset($this->_clipping[$index])) { + $params = $this->_clipping[$index]; + $canvas = $params['canvas']; + ImageCopy( + $canvas, + $this->_canvas, + min($params['x0'], $params['x1']), + min($params['y0'], $params['y1']), + min($params['x0'], $params['x1']), + min($params['y0'], $params['y1']), + abs($params['x1'] - $params['x0'] + 1), + abs($params['y1'] - $params['y0'] + 1) + ); + $this->_canvas = $canvas; + unset($this->_clipping[$index]); + } + } + else { + $params['canvas'] = $this->_canvas; + + if ($this->_gd2) { + $this->_canvas = ImageCreateTrueColor( + $this->_width, + $this->_height + ); + if ($this->_alpha) { + ImageAlphaBlending($this->_canvas, true); + } + } else { + $this->_canvas = ImageCreate($this->_width, $this->_height); + } + + if (($this->_gd2) && ($this->_antialias === 'native')) { + ImageAntialias($this->_canvas, true); + } + + ImageCopy($this->_canvas, $params['canvas'], 0, 0, 0, 0, $this->_width, $this->_height); + + $this->_clipping[count($this->_clipping)] = $params; + } + } + + /** + * Get a canvas specific HTML tag. + * + * This method implicitly saves the canvas to the filename in the + * filesystem path specified and parses it as URL specified by URL path + * + * Parameter array: + * + * 'filename' string + * + * 'filepath': string Path to the file on the file system. Remember the final slash + * + * 'urlpath': string Path to the file available through an URL. Remember the final slash + * + * 'alt': string [optional] Alternative text on image + * + * 'cssclass': string [optional] The CSS Stylesheet class + * + * 'border': int [optional] The border width on the image + */ + function toHtml($params) + { + parent::toHtml($params); + return '' . $params['alt'] . '_imageMap) ? ' usemap="#' . $params['filename'] . '"' : '') . '>' . + (isset($this->_imageMap) ? "\n" . $this->_imageMap->toHtml(array('name' => $params['filename'])) : ''); + } + + /** + * Resets the canvas. + * + * Include fillstyle, linestyle, thickness and polygon + * @access private + */ + function _reset() + { + if ($this->_gd2) { + ImageSetThickness($this->_canvas, 1); + } + if ($this->_tileImage != null) { + ImageDestroy($this->_tileImage); + $this->_tileImage = null; + } + parent::_reset(); + $this->_font = array('font' => 1, 'color' => 'black'); + } + + /** + * Check which version of GD is installed + * + * @return int 0 if GD isn't installed, 1 if GD 1.x is installed and 2 if GD + * 2.x is installed + * @access private + */ + function _version() + { + $result = false; + if (function_exists('gd_info')) { + $info = gd_info(); + $version = $info['GD Version']; + } else { + ob_start(); + phpinfo(8); + $php_info = ob_get_contents(); + ob_end_clean(); + + if (ereg("]*>GD Version *<\/td>]*>([^<]*)<\/td>", + $php_info, $result)) + { + $version = $result[1]; + } else { + $version = null; + } + } + + if (ereg('1\.[0-9]{1,2}', $version)) { + return 1; + } elseif (ereg('2\.[0-9]{1,2}', $version)) { + return 2; + } else { + return 0; + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/GD/JPG.php b/includes/pear/Image/Canvas/GD/JPG.php index 392fd6bd..f8c6f7b4 100644 --- a/includes/pear/Image/Canvas/GD/JPG.php +++ b/includes/pear/Image/Canvas/GD/JPG.php @@ -1,119 +1,119 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: JPG.php,v 1.2 2005/08/24 20:37:34 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * Include file Image/Canvas/GD.php - */ -require_once 'Image/Canvas/GD.php'; - -/** - * JPEG Canvas class. - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ -class Image_Canvas_GD_JPG extends Image_Canvas_GD -{ - - /** - * The JPEG quality - * @var int - * @access private - */ - var $_quality = 75; - - /** - * Create the JPEG canvas - * - * Additional parameters other than those available for common {@link - * Image_Graph_Canvas_GD} class are: - * - * 'quality' The JPEG quality in as a percentage value from 0 (lowest - * quality, smallest file) to 100 (highest quality, biggest file) - * - * @param array $param Parameter array - */ - function Image_Canvas_GD_JPG($param) - { - parent::Image_Canvas_GD($param); - - if (isset($param['quality'])) { - $this->_quality = max(0, min(100, $param['quality'])); - } - - $this->rectangle( - array( - 'x0' => $this->_left, - 'y0' => $this->_top, - 'x1' => $this->_left + $this->_width - 1, - 'y1' => $this->_top + $this->_height - 1, - 'fill' => 'white', - 'line' => 'transparent' - ) - ); - } - - /** - * Output the result of the canvas - * - * @param array $param Parameter array - * @abstract - */ - function show($param = false) - { - parent::show($param); - header('Content-type: image/jpg'); - header('Content-Disposition: inline; filename = \"'. basename($_SERVER['PHP_SELF'], '.php') . '.jpg\"'); - ImageJPEG($this->_canvas, '', $this->_quality); - ImageDestroy($this->_canvas); - } - - /** - * Output the result of the canvas - * - * @param array $param Parameter array - * @abstract - */ - function save($param = false) - { - parent::save($param); - ImageJPEG($this->_canvas, $param['filename'], $this->_quality); - ImageDestroy($this->_canvas); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: JPG.php,v 1.2 2005/08/24 20:37:34 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * Include file Image/Canvas/GD.php + */ +require_once 'Image/Canvas/GD.php'; + +/** + * JPEG Canvas class. + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ +class Image_Canvas_GD_JPG extends Image_Canvas_GD +{ + + /** + * The JPEG quality + * @var int + * @access private + */ + var $_quality = 75; + + /** + * Create the JPEG canvas + * + * Additional parameters other than those available for common {@link + * Image_Graph_Canvas_GD} class are: + * + * 'quality' The JPEG quality in as a percentage value from 0 (lowest + * quality, smallest file) to 100 (highest quality, biggest file) + * + * @param array $param Parameter array + */ + function Image_Canvas_GD_JPG($param) + { + parent::Image_Canvas_GD($param); + + if (isset($param['quality'])) { + $this->_quality = max(0, min(100, $param['quality'])); + } + + $this->rectangle( + array( + 'x0' => $this->_left, + 'y0' => $this->_top, + 'x1' => $this->_left + $this->_width - 1, + 'y1' => $this->_top + $this->_height - 1, + 'fill' => 'white', + 'line' => 'transparent' + ) + ); + } + + /** + * Output the result of the canvas + * + * @param array $param Parameter array + * @abstract + */ + function show($param = false) + { + parent::show($param); + header('Content-type: image/jpg'); + header('Content-Disposition: inline; filename = \"'. basename($_SERVER['PHP_SELF'], '.php') . '.jpg\"'); + ImageJPEG($this->_canvas, '', $this->_quality); + ImageDestroy($this->_canvas); + } + + /** + * Output the result of the canvas + * + * @param array $param Parameter array + * @abstract + */ + function save($param = false) + { + parent::save($param); + ImageJPEG($this->_canvas, $param['filename'], $this->_quality); + ImageDestroy($this->_canvas); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/GD/PNG.php b/includes/pear/Image/Canvas/GD/PNG.php index 5659d8b2..45d9f81f 100644 --- a/includes/pear/Image/Canvas/GD/PNG.php +++ b/includes/pear/Image/Canvas/GD/PNG.php @@ -1,125 +1,125 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: PNG.php,v 1.3 2005/08/24 20:37:34 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * Include file Image/Canvas/GD.php - */ -require_once 'Image/Canvas/GD.php'; - -/** - * PNG Canvas class. - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ -class Image_Canvas_GD_PNG extends Image_Canvas_GD -{ - - /** - * Create the PNG canvas - * - * @param array $param Parameter array - */ - function Image_Canvas_GD_PNG($param) - { - parent::Image_Canvas_GD($param); - - if ((isset($param['transparent'])) && ($param['transparent']) && - ($this->_gd2) - ) { - if ($param['transparent'] === true) { - $transparent = '#123ABD'; - } else { - $transparent = $param['transparent']; - } - $color = $this->_color($transparent); - $trans = ImageColorTransparent($this->_canvas, $color); - - $this->rectangle( - array( - 'x0' => $this->_left, - 'y0' => $this->_top, - 'x1' => $this->_left + $this->_width - 1, - 'y1' => $this->_top + $this->_height - 1, - 'fill' => 'opague', - 'line' => 'transparent' - ) - ); - } else { - $this->rectangle( - array( - 'x0' => $this->_left, - 'y0' => $this->_top, - 'x1' => $this->_left + $this->_width - 1, - 'y1' => $this->_top + $this->_height - 1, - 'fill' => 'white', - 'line' => 'transparent' - ) - ); - } - } - - /** - * Output the result of the canvas - * - * @param array $param Parameter array - * @abstract - */ - function show($param = false) - { - parent::show($param); - header('Content-type: image/png'); - header('Content-Disposition: inline; filename = \"'. basename($_SERVER['PHP_SELF'], '.php') . '.png\"'); - ImagePNG($this->_canvas); - ImageDestroy($this->_canvas); - } - - /** - * Output the result of the canvas - * - * @param array $param Parameter array - * @abstract - */ - function save($param = false) - { - parent::save($param); - ImagePNG($this->_canvas, $param['filename']); - ImageDestroy($this->_canvas); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: PNG.php,v 1.3 2005/08/24 20:37:34 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * Include file Image/Canvas/GD.php + */ +require_once 'Image/Canvas/GD.php'; + +/** + * PNG Canvas class. + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ +class Image_Canvas_GD_PNG extends Image_Canvas_GD +{ + + /** + * Create the PNG canvas + * + * @param array $param Parameter array + */ + function Image_Canvas_GD_PNG($param) + { + parent::Image_Canvas_GD($param); + + if ((isset($param['transparent'])) && ($param['transparent']) && + ($this->_gd2) + ) { + if ($param['transparent'] === true) { + $transparent = '#123ABD'; + } else { + $transparent = $param['transparent']; + } + $color = $this->_color($transparent); + $trans = ImageColorTransparent($this->_canvas, $color); + + $this->rectangle( + array( + 'x0' => $this->_left, + 'y0' => $this->_top, + 'x1' => $this->_left + $this->_width - 1, + 'y1' => $this->_top + $this->_height - 1, + 'fill' => 'opague', + 'line' => 'transparent' + ) + ); + } else { + $this->rectangle( + array( + 'x0' => $this->_left, + 'y0' => $this->_top, + 'x1' => $this->_left + $this->_width - 1, + 'y1' => $this->_top + $this->_height - 1, + 'fill' => 'white', + 'line' => 'transparent' + ) + ); + } + } + + /** + * Output the result of the canvas + * + * @param array $param Parameter array + * @abstract + */ + function show($param = false) + { + parent::show($param); + header('Content-type: image/png'); + header('Content-Disposition: inline; filename = \"'. basename($_SERVER['PHP_SELF'], '.php') . '.png\"'); + ImagePNG($this->_canvas); + ImageDestroy($this->_canvas); + } + + /** + * Output the result of the canvas + * + * @param array $param Parameter array + * @abstract + */ + function save($param = false) + { + parent::save($param); + ImagePNG($this->_canvas, $param['filename']); + ImageDestroy($this->_canvas); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/ImageMap.php b/includes/pear/Image/Canvas/ImageMap.php index 925de9fb..811fe41c 100644 --- a/includes/pear/Image/Canvas/ImageMap.php +++ b/includes/pear/Image/Canvas/ImageMap.php @@ -1,354 +1,354 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: ImageMap.php,v 1.6 2005/08/17 17:59:11 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * Class for handling output as a HTML imagemap - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - * @since version 0.2.0 - */ -class Image_Canvas_ImageMap extends Image_Canvas -{ - - /** - * The image map (if any) - * @var array - * @access private - */ - var $_map = array(); - - /** - * Add a map tag - * @param string $shape The shape, either rect, circle or polygon - * @param string $coords The list of coordinates for the shape - * @param array $params Parameter array - */ - function _addMapTag($shape, $coords, $params) - { - if (isset($params['url'])) { - $url = $params['url']; - $target = (isset($params['target']) ? $params['target'] : false); - $alt = (isset($params['alt']) ? $params['alt'] : false); - - $tags = ''; - if (isset($params['htmltags'])) { - foreach ($params['htmltags'] as $key => $value) { - $tags .= ' '; - if (strpos($value, '"') >= 0) { - $tags .= $key . '=\'' . $value . '\''; - } else { - $tags .= $key . '="' . $value . '"'; - } - } - } - - $this->_map[] = - '' . $alt . ''; - } - } - - /** - * Draw a line - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'color': mixed [optional] The line color - * 'mapsize': int [optional] The size of the image map (surrounding the line) - * @param array $params Parameter array - */ - function line($params) - { - if (isset($params['url'])) { - $mapsize = (isset($params['mapsize']) ? $params['mapsize'] : 2); - $this->_addMapTag( - 'polygon', - $this->_getX($params['x0'] - $mapsize) . ',' . - $this->_getY($params['y0'] - $mapsize) . ',' . - $this->_getX($params['x1'] + $mapsize) . ',' . - $this->_getY($params['y1'] - $mapsize) . ',' . - - $this->_getX($params['x1'] + $mapsize) . ',' . - $this->_getY($params['y1'] + $mapsize) . ',' . - $this->_getX($params['x0'] - $mapsize) . ',' . - $this->_getY($params['y0'] + $mapsize), - $params - ); - } - parent::line($params); - } - - /** - * Draws a polygon - * - * Parameter array: - * 'connect': bool [optional] Specifies whether the start point should be - * connected to the endpoint (closed polygon) or not (connected line) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * 'map_vertices': bool [optional] Specifies whether the image map should map the vertices instead of the polygon as a whole - * 'url': string [optional] URL to link the polygon as a whole to (also used for default in case 'map_vertices' is used) - * 'alt': string [optional] Alternative text to show in the image map (also used for default in case 'map_vertices' is used) - * 'target': string [optional] The link target on the image map (also used for default in case 'map_vertices' is used) - * @param array $params Parameter array - */ - function polygon($params) - { - if ((isset($params['map_vertices'])) && ($params['map_vertices'] === true)) { - $mapsize = (isset($params['mapsize']) ? $params['mapsize'] : 2); - foreach ($this->_polygon as $point) { - $vertex_param = $params; - if (isset($point['url'])) { - $vertex_param['url'] = $point['url']; - } - if (isset($point['target'])) { - $vertex_param['target'] = $point['target']; - } - if (isset($point['alt'])) { - $vertex_param['alt'] = $point['alt']; - } - $vertex_mapsize = $mapsize; - if (isset($point['mapsize'])) { - $vertex_mapsize = $point['mapsize']; - } - if (isset($point['htmltags'])) { - $vertex_param['htmltags'] = $point['htmltags']; - } - $this->_addMapTag( - 'circle', - $this->_getX($point['X']) . ',' . - $this->_getY($point['Y']) . ',' . - $mapsize, - $vertex_param - ); - } - } - else if (isset($params['url'])) { - $points = ''; - foreach ($this->_polygon as $point) { - if ($points != '') { - $points .= ','; - } - $points .= $this->_getX($point['X']) . ',' . $this->_getY($point['Y']); - } - $this->_addMapTag('polygon', $points, $params); - } - parent::polygon($params); - } - - /** - * Draw a rectangle - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function rectangle($params) - { - if (isset($params['url'])) { - $this->_addMapTag( - 'rect', - $this->_getX($params['x0']) . ',' . - $this->_getY($params['y0']) . ',' . - $this->_getX($params['x1']) . ',' . - $this->_getY($params['y1']), - $params - ); - } - parent::rectangle($params); - } - - /** - * Draw an ellipse - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function ellipse($params) - { - if (isset($params['url'])) { - if ($params['rx'] == $params['ry']) { - $this->_addMapTag( - 'circle', - $this->_getX($params['x']) . ',' . - $this->_getY($params['y']) . ',' . - $this->_getX($params['rx']), - $params - ); - } else { - $points = ''; - for ($v = 0; $v <= 360; $v += 30) { - if ($points != '') { - $points .= ','; - } - $points .= - round($this->_getX($params['x']) + $this->_getX($params['rx']) * cos(deg2rad($v % 360))) . ',' . - round($this->_getY($params['y']) + $this->_getX($params['ry']) * sin(deg2rad($v % 360))); - } - $this->_addMapTag( - 'polygon', - $points, - $params - ); - } - } - parent::ellipse($params); - } - - /** - * Draw a pie slice - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'v1': int The starting angle (in degrees) - * 'v2': int The end angle (in degrees) - * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) - * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function pieslice($params) - { - if (isset($params['url'])) { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $rx = $params['rx']; - $ry = $params['ry']; - $v1a = $params['v1']; - $v2a = $params['v2']; - $v1 = min($v1a, $v2a); - $v2 = max($v1a, $v2a); - $srx = (isset($params['srx']) ? $params['srx'] : 0); - $sry = (isset($params['sry']) ? $params['sry'] : 0); - - $points = - round(($x + $srx * cos(deg2rad($v1 % 360)))) . ',' . - round(($y + $sry * sin(deg2rad($v1 % 360)))) . ','; - - for ($v = $v1; $v < $v2; $v += 30) { - $points .= - round(($x + $rx * cos(deg2rad($v % 360)))) . ',' . - round(($y + $ry * sin(deg2rad($v % 360)))) . ','; - } - - $points .= - round(($x + $rx * cos(deg2rad($v2 % 360)))) . ',' . - round(($y + $ry * sin(deg2rad($v2 % 360)))); - - if (($srx != 0) || ($sry != 0)) { - $points .= ','; - for ($v = $v2; $v > $v1; $v -= 30) { - $points .= - round(($x + $srx * cos(deg2rad($v % 360)))) . ',' . - round(($y + $sry * sin(deg2rad($v % 360)))) . ','; - } - - } - - $this->_addMapTag('polygon', $points, $params); - } - parent::pieslice($params); - } - - /** - * Output the result of the canvas to the browser - * - * @param array $params Parameter array, the contents and meaning depends on the actual Canvas - * @abstract - */ - function show($params = false) - { - parent::show($params); - if (count($this->_map) > 0) { - print $this->toHtml($params); - } - } - - /** - * Save the result of the canvas to a file - * - * Parameter array: - * 'filename': string The file to output to - * @param array $params Parameter array, the contents and meaning depends on the actual Canvas - * @abstract - */ - function save($params = false) - { - parent::save($params); - $file = fopen($param['filename'], 'w+'); - fwrite($file, $this->toHtml($params)); - fclose($file); - } - - /** - * Get a canvas specific HTML tag. - * - * Parameter array: - * 'name': string The name of the image map - */ - function toHtml($params) - { - if (count($this->_map) > 0) { - return '' . "\n\t" . implode($this->_map, "\n\t") . "\n"; - } - return ''; - } -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: ImageMap.php,v 1.8 2006/10/24 18:58:16 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * Class for handling output as a HTML imagemap + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + * @since version 0.2.0 + */ +class Image_Canvas_ImageMap extends Image_Canvas +{ + + /** + * The image map (if any) + * @var array + * @access private + */ + var $_map = array(); + + /** + * Add a map tag + * @param string $shape The shape, either rect, circle or polygon + * @param string $coords The list of coordinates for the shape + * @param array $params Parameter array + */ + function _addMapTag($shape, $coords, $params) + { + if (isset($params['url'])) { + $url = $params['url']; + $target = (isset($params['target']) ? $params['target'] : false); + $alt = (isset($params['alt']) ? $params['alt'] : false); + + $tags = ''; + if (isset($params['htmltags'])) { + foreach ($params['htmltags'] as $key => $value) { + $tags .= ' '; + if (strpos($value, '"') !== false) { + $tags .= $key . '=\'' . $value . '\''; + } else { + $tags .= $key . '="' . $value . '"'; + } + } + } + + $this->_map[] = + '' . $alt . ''; + } + } + + /** + * Draw a line + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'color': mixed [optional] The line color + * 'mapsize': int [optional] The size of the image map (surrounding the line) + * @param array $params Parameter array + */ + function line($params) + { + if (isset($params['url'])) { + $mapsize = (isset($params['mapsize']) ? $params['mapsize'] : 2); + $this->_addMapTag( + 'polygon', + $this->_getX($params['x0'] - $mapsize) . ',' . + $this->_getY($params['y0'] - $mapsize) . ',' . + $this->_getX($params['x1'] + $mapsize) . ',' . + $this->_getY($params['y1'] - $mapsize) . ',' . + + $this->_getX($params['x1'] + $mapsize) . ',' . + $this->_getY($params['y1'] + $mapsize) . ',' . + $this->_getX($params['x0'] - $mapsize) . ',' . + $this->_getY($params['y0'] + $mapsize), + $params + ); + } + parent::line($params); + } + + /** + * Draws a polygon + * + * Parameter array: + * 'connect': bool [optional] Specifies whether the start point should be + * connected to the endpoint (closed polygon) or not (connected line) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * 'map_vertices': bool [optional] Specifies whether the image map should map the vertices instead of the polygon as a whole + * 'url': string [optional] URL to link the polygon as a whole to (also used for default in case 'map_vertices' is used) + * 'alt': string [optional] Alternative text to show in the image map (also used for default in case 'map_vertices' is used) + * 'target': string [optional] The link target on the image map (also used for default in case 'map_vertices' is used) + * @param array $params Parameter array + */ + function polygon($params) + { + if ((isset($params['map_vertices'])) && ($params['map_vertices'] === true)) { + $mapsize = (isset($params['mapsize']) ? $params['mapsize'] : 2); + foreach ($this->_polygon as $point) { + $vertex_param = $params; + if (isset($point['url'])) { + $vertex_param['url'] = $point['url']; + } + if (isset($point['target'])) { + $vertex_param['target'] = $point['target']; + } + if (isset($point['alt'])) { + $vertex_param['alt'] = $point['alt']; + } + $vertex_mapsize = $mapsize; + if (isset($point['mapsize'])) { + $vertex_mapsize = $point['mapsize']; + } + if (isset($point['htmltags'])) { + $vertex_param['htmltags'] = $point['htmltags']; + } + $this->_addMapTag( + 'circle', + $this->_getX($point['X']) . ',' . + $this->_getY($point['Y']) . ',' . + $mapsize, + $vertex_param + ); + } + } + else if (isset($params['url'])) { + $points = ''; + foreach ($this->_polygon as $point) { + if ($points != '') { + $points .= ','; + } + $points .= $this->_getX($point['X']) . ',' . $this->_getY($point['Y']); + } + $this->_addMapTag('polygon', $points, $params); + } + parent::polygon($params); + } + + /** + * Draw a rectangle + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function rectangle($params) + { + if (isset($params['url'])) { + $this->_addMapTag( + 'rect', + $this->_getX($params['x0']) . ',' . + $this->_getY($params['y0']) . ',' . + $this->_getX($params['x1']) . ',' . + $this->_getY($params['y1']), + $params + ); + } + parent::rectangle($params); + } + + /** + * Draw an ellipse + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function ellipse($params) + { + if (isset($params['url'])) { + if ($params['rx'] == $params['ry']) { + $this->_addMapTag( + 'circle', + $this->_getX($params['x']) . ',' . + $this->_getY($params['y']) . ',' . + $this->_getX($params['rx']), + $params + ); + } else { + $points = ''; + for ($v = 0; $v <= 360; $v += 30) { + if ($points != '') { + $points .= ','; + } + $points .= + round($this->_getX($params['x']) + $this->_getX($params['rx']) * cos(deg2rad($v % 360))) . ',' . + round($this->_getY($params['y']) + $this->_getX($params['ry']) * sin(deg2rad($v % 360))); + } + $this->_addMapTag( + 'polygon', + $points, + $params + ); + } + } + parent::ellipse($params); + } + + /** + * Draw a pie slice + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'v1': int The starting angle (in degrees) + * 'v2': int The end angle (in degrees) + * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) + * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function pieslice($params) + { + if (isset($params['url'])) { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $rx = $params['rx']; + $ry = $params['ry']; + $v1a = $params['v1']; + $v2a = $params['v2']; + $v1 = min($v1a, $v2a); + $v2 = max($v1a, $v2a); + $srx = (isset($params['srx']) ? $params['srx'] : 0); + $sry = (isset($params['sry']) ? $params['sry'] : 0); + + $points = + round(($x + $srx * cos(deg2rad($v1 % 360)))) . ',' . + round(($y + $sry * sin(deg2rad($v1 % 360)))) . ','; + + for ($v = $v1; $v < $v2; $v += 30) { + $points .= + round(($x + $rx * cos(deg2rad($v % 360)))) . ',' . + round(($y + $ry * sin(deg2rad($v % 360)))) . ','; + } + + $points .= + round(($x + $rx * cos(deg2rad($v2 % 360)))) . ',' . + round(($y + $ry * sin(deg2rad($v2 % 360)))); + + if (($srx != 0) || ($sry != 0)) { + $points .= ','; + for ($v = $v2; $v > $v1; $v -= 30) { + $points .= + round(($x + $srx * cos(deg2rad($v % 360)))) . ',' . + round(($y + $sry * sin(deg2rad($v % 360)))) . ','; + } + + } + + $this->_addMapTag('polygon', $points, $params); + } + parent::pieslice($params); + } + + /** + * Output the result of the canvas to the browser + * + * @param array $params Parameter array, the contents and meaning depends on the actual Canvas + * @abstract + */ + function show($params = false) + { + parent::show($params); + if (count($this->_map) > 0) { + print $this->toHtml($params); + } + } + + /** + * Save the result of the canvas to a file + * + * Parameter array: + * 'filename': string The file to output to + * @param array $params Parameter array, the contents and meaning depends on the actual Canvas + * @abstract + */ + function save($params = false) + { + parent::save($params); + $file = fopen($params['filename'], 'w+'); + fwrite($file, $this->toHtml($params)); + fclose($file); + } + + /** + * Get a canvas specific HTML tag. + * + * Parameter array: + * 'name': string The name of the image map + */ + function toHtml($params) + { + if (count($this->_map) > 0) { + return '' . "\n\t" . implode($this->_map, "\n\t") . "\n"; + } + return ''; + } +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/PDF.php b/includes/pear/Image/Canvas/PDF.php index b8fc9040..f5cc34a4 100644 --- a/includes/pear/Image/Canvas/PDF.php +++ b/includes/pear/Image/Canvas/PDF.php @@ -1,1007 +1,1012 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: PDF.php,v 1.5 2005/10/28 09:54:40 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * Include file Image/Canvas.php - */ -require_once 'Image/Canvas.php'; - -/** - * Include file Image/Canvas/Color.php - */ -require_once 'Image/Canvas/Color.php'; - -/** - * PDF Canvas class. - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ -class Image_Canvas_PDF extends Image_Canvas -{ - - /** - * The PDF document - * @var resource - * @access private - */ - var $_pdf; - - /** - * The major version of PDFlib - * @var int - * @access private - */ - var $_pdflib; - - /** - * The font - * @var mixed - * @access private - */ - var $_pdfFont = false; - - /** - * The width of the page - * @var int - * @access private - */ - var $_pageWidth; - - /** - * The height of the page - * @var int - * @access private - */ - var $_pageHeight; - - /** - * Create the PDF canvas. - * - * Parameters available: - * - * 'page' Specify the page/paper format for the graph's page, available - * formats are: A0, A1, A2, A3, A4, A5, A6, B5, letter, legal, ledger, - * 11x17, cd_front, inlay, inlay_nosides - * - * 'align' Alignment of the graph on the page, available options are: - * topleft, topcenter, topright, leftcenter, center, rightcenter, - * leftbottom, centerbottom, rightbottom - * - * 'orientation' Specifies the paper orientation, default is 'portrait' and - * 'landscape' is also supported. - * - * 'creator' The creator tag of the PDF/graph - * - * 'author' The author tag of the PDF/graph - * - * 'title' The title tag of the PDF/graph - * - * 'width' The width of the graph on the page - * - * 'height' The height of the graph on the page - * - * 'left' The left offset of the graph on the page - * - * 'top' The top offset of the graph on the page - * - * 'filename' The PDF file to open/add page to, using 'filename' requires - * the commercial version of PDFlib (http://www.pdflib.com/), this has for - * obvious ($ 450) reasons not been tested - * - * 'pdf' An existing PDFlib PDF document to add the page to - * - * 'add_page' (true/false) Used together with 'pdf', to specify whether the - * canvas should add a new graph page (true) or create the graph on the - * current page (false), default is 'true' - * - * The 'page' and 'width' & 'height' can be mutually omitted, if 'page' is - * omitted the page is created using dimensions of width x height, and if - * width and height are omitted the page dimensions are used for the graph. - * - * If 'pdf' is specified, 'filename', 'creator', 'author' and 'title' has no - * effect. - * - * 'left' and 'top' are overridden by 'align' - * - * It is required either to specify 'width' & 'height' or 'page'. - * - * The PDF format/PDFlib has some limitations on the capabilities, which - * means some functionality available using other canvass (fx. alpha - * blending and gradient fills) are not supported with PDF (see Canvas.txt - * in the docs/ folder for further details) - * - * @param array $param Parameter array - */ - function Image_Canvas_PDF($param) - { - if (isset($param['page'])) { - switch (strtoupper($param['page'])) { - case 'A0': - $this->_pageWidth = 2380; - $this->_pageHeight = 3368; - break; - - case 'A1': - $this->_pageWidth = 1684; - $this->_pageHeight = 2380; - break; - - case 'A2': - $this->_pageWidth = 1190; - $this->_pageHeight = 1684; - break; - - case 'A3': - $this->_pageWidth = 842; - $this->_pageHeight = 1190; - break; - - case 'A4': - $this->_pageWidth = 595; - $this->_pageHeight = 842; - break; - - case 'A5': - $this->_pageWidth = 421; - $this->_pageHeight = 595; - break; - - case 'A6': - $this->_pageWidth = 297; - $this->_pageHeight = 421; - break; - - case 'B5': - $this->_pageWidth = 501; - $this->_pageHeight = 709; - break; - - case 'LETTER': - $this->_pageWidth = 612; - $this->_pageHeight = 792; - break; - - case 'LEGAL': - $this->_pageWidth = 612; - $this->_pageHeight = 1008; - break; - - case 'LEDGER': - $this->_pageWidth = 1224; - $this->_pageHeight = 792; - break; - - case '11X17': - $this->_pageWidth = 792; - $this->_pageHeight = 1224; - break; - - case 'CD_FRONT': - $this->_pageWidth = 337; - $this->_pageHeight = 337; - break; - - case 'INLAY': - $this->_pageWidth = 425; - $this->_pageHeight = 332; - break; - - case 'INLAY_NOSIDES': - $this->_pageWidth = 390; - $this->_pageHeight = 332; - break; - } - } - - if ((isset($param['orientation'])) && (strtoupper($param['orientation']) == 'LANDSCAPE')) { - $w = $this->_pageWidth; - $this->_pageWidth = $this->_pageHeight; - $this->_pageHeight = $w; - } - - parent::Image_Canvas($param); - - if (!$this->_pageWidth) { - $this->_pageWidth = $this->_width; - } elseif (!$this->_width) { - $this->_width = $this->_pageWidth; - } - - if (!$this->_pageHeight) { - $this->_pageHeight = $this->_height; - } elseif (!$this->_height) { - $this->_height = $this->_pageHeight; - } - - $this->_width = min($this->_width, $this->_pageWidth); - $this->_height = min($this->_height, $this->_pageHeight); - - if ((isset($param['align'])) && - (($this->_width != $this->_pageWidth) || ($this->_height != $this->_pageHeight)) - ) { - switch (strtoupper($param['align'])) { - case 'TOPLEFT': - $this->_top = 0; - $this->_left = 0; - break; - - case 'TOPCENTER': - $this->_top = 0; - $this->_left = ($this->_pageWidth - $this->_width) / 2; - break; - - case 'TOPRIGHT': - $this->_top = 0; - $this->_left = $this->_pageWidth - $this->_width; - break; - - case 'LEFTCENTER': - $this->_top = ($this->_pageHeight - $this->_height) / 2; - $this->_left = 0; - break; - - case 'CENTER': - $this->_top = ($this->_pageHeight - $this->_height) / 2; - $this->_left = ($this->_pageWidth - $this->_width) / 2; - break; - - case 'RIGHTCENTER': - $this->_top = ($this->_pageHeight - $this->_height) / 2; - $this->_left = $this->_pageWidth - $this->_width; - break; - - case 'LEFTBOTTOM': - $this->_top = $this->_pageHeight - $this->_height; - $this->_left = 0; - break; - - case 'CENTERBOTTOM': - $this->_top = $this->_pageHeight - $this->_height; - $this->_left = ($this->_pageWidth - $this->_width) / 2; - break; - - case 'RIGHTBOTTOM': - $this->_top = $this->_pageHeight - $this->_height; - $this->_left = $this->_pageWidth - $this->_width; - break; - } - } - - $this->_pdflib = $this->_version(); - - $addPage = true; - if ((isset($param['pdf'])) && (is_resource($param['pdf']))) { - $this->_pdf =& $param['pdf']; - if ((isset($param['add_page'])) && ($param['add_page'] === false)) { - $addPage = false; - } - } else { - $this->_pdf = pdf_new(); - - if (isset($param['filename'])) { - pdf_open_file($this->_pdf, $param['filename']); - } else { - pdf_open_file($this->_pdf, ''); - } - - pdf_set_parameter($this->_pdf, 'warning', 'true'); - - pdf_set_info($this->_pdf, 'Creator', (isset($param['creator']) ? $param['creator'] : 'PEAR::Image_Canvas')); - pdf_set_info($this->_pdf, 'Author', (isset($param['author']) ? $param['author'] : 'Jesper Veggerby')); - pdf_set_info($this->_pdf, 'Title', (isset($param['title']) ? $param['title'] : 'Image_Canvas')); - } - - if ($addPage) { - pdf_begin_page($this->_pdf, $this->_pageWidth, $this->_pageHeight); - } - $this->_reset(); - } - - /** - * Get the x-point from the relative to absolute coordinates - * - * @param float $x The relative x-coordinate (in percentage of total width) - * @return float The x-coordinate as applied to the canvas - * @access private - */ - function _getX($x) - { - return $this->_left + $x; - } - - /** - * Get the y-point from the relative to absolute coordinates - * - * @param float $y The relative y-coordinate (in percentage of total width) - * @return float The y-coordinate as applied to the canvas - * @access private - */ - function _getY($y) - { - return $this->_pageHeight - ($this->_top + $y); - } - - /** - * Get the color index for the RGB color - * - * @param int $color The color - * @return int The GD image index of the color - * @access private - */ - function _color($color = false) - { - if (($color === false) || ($color === 'opague') || ($color === 'transparent')) { - return false; - } else { - $color = Image_Canvas_Color::color2RGB($color); - $color[0] = $color[0]/255; - $color[1] = $color[1]/255; - $color[2] = $color[2]/255; - return $color; - } - } - - /** - * Get the PDF linestyle - * - * @param mixed $lineStyle The line style to return, false if the one - * explicitly set - * @return bool True if set (so that a line should be drawn) - * @access private - */ - function _setLineStyle($lineStyle = false) - { - if ($lineStyle === false) { - $lineStyle = $this->_lineStyle; - } - - if (($lineStyle == 'transparent') || ($lineStyle === false)) { - return false; - } - - if (is_array($lineStyle)) { - // TODO Implement linestyles in PDFlib (using pdf_setcolor(.., 'pattern'...); ? - reset($lineStyle); - $lineStyle = current($lineStyle); - } - - $color = $this->_color($lineStyle); - - pdf_setlinewidth($this->_pdf, $this->_thickness); - if ($this->_pdflib < 4) { - pdf_setrgbcolor_stroke($this->_pdf, $color[0]/255, $color[1]/255, $color[2]/255); - } else { - pdf_setcolor($this->_pdf, 'stroke', 'rgb', $color[0], $color[1], $color[2], 0); - } - return true; - } - - /** - * Set the PDF fill style - * - * @param mixed $fillStyle The fillstyle to return, false if the one - * explicitly set - * @return bool True if set (so that a line should be drawn) - * @access private - */ - function _setFillStyle($fillStyle = false) - { - if ($fillStyle === false) { - $fillStyle = $this->_fillStyle; - } - - if (($fillStyle == 'transparent') || ($fillStyle === false)) { - return false; - } - - $color = $this->_color($fillStyle); - - if ($this->_pdflib < 4) { - pdf_setrgbcolor_fill($this->_pdf, $color[0]/255, $color[1]/255, $color[2]/255); - } else { - pdf_setcolor($this->_pdf, 'fill', 'rgb', $color[0], $color[1], $color[2], 0); - } - return true; - } - - /** - * Set the PDF font - * - * @access private - */ - function _setFont() - { - $this->_pdfFont = false; - if (isset($this->_font['name'])) { - pdf_set_parameter($this->_pdf, 'FontOutline', $this->_font['name'] . '=' . $this->_font['file']); - $this->_pdfFont = pdf_findfont($this->_pdf, $this->_font['name'], $this->_font['encoding'], 1); - - if ($this->_pdfFont) { - pdf_setfont($this->_pdf, $this->_pdfFont, $this->_font['size']); - $this->_setFillStyle($this->_font['color']); - } - } else { - $this->_setFillStyle('black'); - } - } - - /** - * Sets an image that should be used for filling. - * - * Image filling is not supported with PDF, filling 'transparent' - * - * @param string $filename The filename of the image to fill with - */ - function setFillImage($filename) - { - $this->_fillStyle = 'transparent'; - } - - /** - * Sets a gradient fill - * - * Gradient filling is not supported with PDF, end color used as solid fill. - * - * @param array $gradient Gradient fill options - */ - function setGradientFill($gradient) - { - $this->_fillStyle = $gradient['end']; - } - - /** - * Sets the font options. - * - * The $font array may have the following entries: - * - * 'ttf' = the .ttf file (either the basename, filename or full path) - * If 'ttf' is specified, then the following can be specified - * - * 'size' = size in pixels - * - * 'angle' = the angle with which to write the text - * - * @param array $font The font options. - */ - function setFont($fontOptions) - { - parent::setFont($fontOptions); - - if (!isset($this->_font['size'])) { - $this->_font['size'] = 12; - } - - if (!isset($this->_font['encoding'])) { - $this->_font['encoding'] = 'winansi'; - } - - if (!isset($this->_font['color'])) { - $this->_font['color'] = 'black'; - } - } - - /** - * Resets the canvas. - * - * Includes fillstyle, linestyle, thickness and polygon - * - * @access private - */ - function _reset() - { - pdf_initgraphics($this->_pdf); - parent::_reset(); - } - - /** - * Draw a line - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'color': mixed [optional] The line color - * @param array $params Parameter array - */ - function line($params) - { - $color = (isset($params['color']) ? $params['color'] : false); - if ($this->_setLineStyle($color)) { - pdf_moveto($this->_pdf, $this->_getX($params['x0']), $this->_getY($params['y0'])); - pdf_lineto($this->_pdf, $this->_getX($params['x1']), $this->_getY($params['x1'])); - pdf_stroke($this->_pdf); - } - parent::line($params); - } - - /** - * Parameter array: - * 'connect': bool [optional] Specifies whether the start point should be - * connected to the endpoint (closed polygon) or not (connected line) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function polygon($params = array()) - { - $connectEnds = (isset($params['connect']) ? $params['connect'] : false); - $fillColor = (isset($params['fill']) ? $params['line'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - $line = $this->_setLineStyle($lineColor); - $fill = false; - if ($connectEnds) { - $fill = $this->_setFillStyle($fillColor); - } - - $first = true; - foreach ($this->_polygon as $point) { - if ($first === true) { - pdf_moveto($this->_pdf, $point['X'], $point['Y']); - $first = $point; - } else { - if (isset($last['P1X'])) { - pdf_curveto($this->_pdf, - $last['P1X'], - $last['P1Y'], - $last['P2X'], - $last['P2Y'], - $point['X'], - $point['Y'] - ); - } else { - pdf_lineto($this->_pdf, - $point['X'], - $point['Y'] - ); - } - } - $last = $point; - } - - if ($connectEnds) { - if (isset($last['P1X'])) { - pdf_curveto($this->_pdf, - $last['P1X'], - $last['P1Y'], - $last['P2X'], - $last['P2Y'], - $first['X'], - $first['Y'] - ); - } else { - pdf_lineto($this->_pdf, - $first['X'], - $first['Y'] - ); - } - } - - if (($line) && ($fill)) { - pdf_fill_stroke($this->_pdf); - } elseif ($line) { - pdf_stroke($this->_pdf); - } elseif ($fill) { - pdf_fill($this->_pdf); - } - parent::polygon($params); - } - - /** - * Draw a rectangle - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function rectangle($params) - { - $x0 = $this->_getX($params['x0']); - $y0 = $this->_getY($params['y0']); - $x1 = $this->_getX($params['x1']); - $y1 = $this->_getY($params['y1']); - $fillColor = (isset($params['fill']) ? $params['line'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - $line = $this->_setLineStyle($lineColor); - $fill = $this->_setFillStyle($fillColor); - if (($line) || ($fill)) { - pdf_rect($this->_pdf, $this->_getX(min($x0, $x1)), $this->_getY(max($y0, $y1)), abs($x1 - $x0), abs($y1 - $y0)); - if (($line) && ($fill)) { - pdf_fill_stroke($this->_pdf); - } elseif ($line) { - pdf_stroke($this->_pdf); - } elseif ($fill) { - pdf_fill($this->_pdf); - } - } - parent::rectangle($params); - } - - /** - * Draw an ellipse - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function ellipse($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $rx = $this->_getX($params['rx']); - $ry = $this->_getY($params['ry']); - $fillColor = (isset($params['fill']) ? $params['line'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - $line = $this->_setLineStyle($lineColor); - $fill = $this->_setFillStyle($fillColor); - if (($line) || ($fill)) { - if ($rx == $ry) { - pdf_circle($this->_pdf, $this->_getX($x), $this->_getY($y), $rx); - } else { - pdf_moveto($this->_pdf, $this->_getX($x - $rx), $this->_getY($y)); - pdf_curveto($this->_pdf, - $this->_getX($x - $rx), $this->_getY($y), - $this->_getX($x - $rx), $this->_getY($y - $ry), - $this->_getX($x), $this->_getY($y - $ry) - ); - pdf_curveto($this->_pdf, - $this->_getX($x), $this->_getY($y - $ry), - $this->_getX($x + $rx), $this->_getY($y - $ry), - $this->_getX($x + $rx), $this->_getY($y) - ); - pdf_curveto($this->_pdf, - $this->_getX($x + $rx), $this->_getY($y), - $this->_getX($x + $rx), $this->_getY($y + $ry), - $this->_getX($x), $this->_getY($y + $ry) - ); - pdf_curveto($this->_pdf, - $this->_getX($x), $this->_getY($y + $ry), - $this->_getX($x - $rx), $this->_getY($y + $ry), - $this->_getX($x - $rx), $this->_getY($y) - ); - } - - if (($line) && ($fill)) { - pdf_fill_stroke($this->_pdf); - } elseif ($line) { - pdf_stroke($this->_pdf); - } elseif ($fill) { - pdf_fill($this->_pdf); - } - } - parent::ellipse($params); - } - - /** - * Draw a pie slice - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'v1': int The starting angle (in degrees) - * 'v2': int The end angle (in degrees) - * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) - * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function pieslice($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $rx = $this->_getX($params['rx']); - $ry = $this->_getY($params['ry']); - $v1 = $this->_getX($params['v1']); - $v2 = $this->_getY($params['v2']); - $srx = $this->_getX($params['srx']); - $sry = $this->_getY($params['sry']); - $fillColor = (isset($params['fill']) ? $params['line'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - // TODO Implement PDFLIB::pieSlice() - parent::pieslice($params); - } - - /** - * Get the width of a text, - * - * @param string $text The text to get the width of - * @return int The width of the text - */ - function textWidth($text) - { - if ($this->_pdfFont === false) { - return $this->_font['size'] * 0.7 * strlen($text); - } else { - return pdf_stringwidth($this->_pdf, $text, $this->_pdfFont, $this->_font['size']); - } - } - - /** - * Get the height of a text, - * - * @param string $text The text to get the height of - * @return int The height of the text - */ - function textHeight($text) - { - if (isset($this->_font['size'])) { - return $this->_font['size']; - } else { - return 12; - } - } - - /** - * Writes text - * - * Parameter array: - * 'x': int X-point of text - * 'y': int Y-point of text - * 'text': string The text to add - * 'alignment': array [optional] Alignment - * 'color': mixed [optional] The color of the text - */ - function addText($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $text = $params['text']; - $color = (isset($params['color']) ? $params['color'] : false); - $alignment = (isset($params['alignment']) ? $params['alignment'] : false); - - $this->_setFont(); - - $textWidth = $this->textWidth($text); - $textHeight = $this->textHeight($text); - - if (!is_array($alignment)) { - $alignment = array('vertical' => 'top', 'horizontal' => 'left'); - } - - if (!isset($alignment['vertical'])) { - $alignment['vertical'] = 'top'; - } - - if (!isset($alignment['horizontal'])) { - $alignment['horizontal'] = 'left'; - } - - if ($alignment['horizontal'] == 'right') { - $x = $x - $textWidth; - } elseif ($alignment['horizontal'] == 'center') { - $x = $x - ($textWidth / 2); - } - - if ($alignment['vertical'] == 'top') { - $y = $y + $textHeight; - } elseif ($alignment['vertical'] == 'center') { - $y = $y + ($textHeight / 2); - } - - if (($color === false) && (isset($this->_font['color']))) { - $color = $this->_font['color']; - } - - pdf_show_xy($this->_pdf, $text, $this->_getX($x), $this->_getY($y)); - - parent::addText($params); - } - - /** - * Overlay image - * - * Parameter array: - * 'x': int X-point of overlayed image - * 'y': int Y-point of overlayed image - * 'filename': string The filename of the image to overlay - * 'width': int [optional] The width of the overlayed image (resizing if possible) - * 'height': int [optional] The height of the overlayed image (resizing if possible) - * 'alignment': array [optional] Alignment - */ - function image($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $filename = $params['filename']; - $width = (isset($params['width']) ? $params['width'] : false); - $height = (isset($params['height']) ? $params['height'] : false); - $alignment = (isset($params['alignment']) ? $params['alignment'] : false); - - if (substr($filename, -4) == '.png') { - $type = 'png'; - } elseif (substr($filename, -4) == '.jpg') { - $type = 'jpeg'; - } - - $image = pdf_load_image($this->_pdf, $type, realpath($filename), ''); - $width_ = pdf_get_value($this->_pdf, 'imagewidth', $image); - $height_ = pdf_get_value($this->_pdf, 'imageheight', $image); - - $outputWidth = ($width !== false ? $width : $width_); - $outputHeight = ($height !== false ? $height : $height_); - - if (!is_array($alignment)) { - $alignment = array('vertical' => 'top', 'horizontal' => 'left'); - } - - if (!isset($alignment['vertical'])) { - $alignment['vertical'] = 'top'; - } - - if (!isset($alignment['horizontal'])) { - $alignment['horizontal'] = 'left'; - } - - if ($alignment['horizontal'] == 'right') { - $x -= $outputWidth; - } elseif ($alignment['horizontal'] == 'center') { - $x -= $outputWidth / 2; - } - - if ($alignment['vertical'] == 'top') { - $y += $outputHeight; - } elseif ($alignment['vertical'] == 'center') { - $y += $outputHeight / 2; - } - - if (($width === false) && ($height === false)) { - $scale = 1; - } else { - $scale = max(($height/$height_), ($width/$width_)); - } - - pdf_place_image($this->_pdf, $image, $this->_getX($x), $this->_getY($y), $scale); - pdf_close_image($this->_pdf, $image); - - parent::image($params); - } - - /** - * Output the result of the canvas - * - * @param array $param Parameter array - * @abstract - */ - function show($param = false) - { - parent::show($param); - pdf_end_page($this->_pdf); - pdf_close($this->_pdf); - - $buf = pdf_get_buffer($this->_pdf); - $len = strlen($buf); - - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=image_graph.pdf'); - print $buf; - - pdf_delete($this->_pdf); - } - - /** - * Output the result of the canvas - * - * @param array $param Parameter array - * @abstract - */ - function save($param = false) - { - parent::save($param); - pdf_end_page($this->_pdf); - pdf_close($this->_pdf); - - $buf = pdf_get_buffer($this->_pdf); - $len = strlen($buf); - - $fp = @fopen($param['filename'], 'wb'); - if ($fp) { - fwrite($fp, $buf, strlen($buf)); - fclose($fp); - } - pdf_delete($this->_pdf); - } - - /** - * Get a canvas specific HTML tag. - * - * This method implicitly saves the canvas to the filename in the - * filesystem path specified and parses it as URL specified by URL path - * - * Parameter array: - * 'filename': string - * 'filepath': string Path to the file on the file system. Remember the final slash - * 'urlpath': string Path to the file available through an URL. Remember the final slash - * 'title': string The url title - */ - function toHtml($params) - { - parent::toHtml($params); - return '' . $params['title'] . ''; - } - - /** - * Check which major version of PDFlib is installed - * - * @return int The mahor version number of PDFlib - * @access private - */ - function _version() - { - $result = false; - if (function_exists('pdf_get_majorversion')) { - $version = pdf_get_majorversion(); - } else { - ob_start(); - phpinfo(8); - $php_info = ob_get_contents(); - ob_end_clean(); - - if (ereg("]*>PDFlib GmbH Version *<\/td>]*>([^<]*)<\/td>", - $php_info, $result)) - { - $version = $result[1]; - } - } - - if (ereg('([0-9]{1,2})\.[0-9]{1,2}(\.[0-9]{1,2})?', trim($version), $result)) { - return $result[1]; - } else { - return 0; - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: PDF.php,v 1.6 2006/04/11 21:12:41 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * Include file Image/Canvas.php + */ +require_once 'Image/Canvas.php'; + +/** + * Include file Image/Canvas/Color.php + */ +require_once 'Image/Canvas/Color.php'; + +/** + * PDF Canvas class. + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ +class Image_Canvas_PDF extends Image_Canvas +{ + + /** + * The PDF document + * @var resource + * @access private + */ + var $_pdf; + + /** + * The major version of PDFlib + * @var int + * @access private + */ + var $_pdflib; + + /** + * The font + * @var mixed + * @access private + */ + var $_pdfFont = false; + + /** + * The width of the page + * @var int + * @access private + */ + var $_pageWidth; + + /** + * The height of the page + * @var int + * @access private + */ + var $_pageHeight; + + /** + * Create the PDF canvas. + * + * Parameters available: + * + * 'page' Specify the page/paper format for the graph's page, available + * formats are: A0, A1, A2, A3, A4, A5, A6, B5, letter, legal, ledger, + * 11x17, cd_front, inlay, inlay_nosides + * + * 'align' Alignment of the graph on the page, available options are: + * topleft, topcenter, topright, leftcenter, center, rightcenter, + * leftbottom, centerbottom, rightbottom + * + * 'orientation' Specifies the paper orientation, default is 'portrait' and + * 'landscape' is also supported. + * + * 'creator' The creator tag of the PDF/graph + * + * 'author' The author tag of the PDF/graph + * + * 'title' The title tag of the PDF/graph + * + * 'width' The width of the graph on the page + * + * 'height' The height of the graph on the page + * + * 'left' The left offset of the graph on the page + * + * 'top' The top offset of the graph on the page + * + * 'filename' The PDF file to open/add page to, using 'filename' requires + * the commercial version of PDFlib (http://www.pdflib.com/), this has for + * obvious ($ 450) reasons not been tested + * + * 'pdf' An existing PDFlib PDF document to add the page to + * + * 'add_page' (true/false) Used together with 'pdf', to specify whether the + * canvas should add a new graph page (true) or create the graph on the + * current page (false), default is 'true' + * + * The 'page' and 'width' & 'height' can be mutually omitted, if 'page' is + * omitted the page is created using dimensions of width x height, and if + * width and height are omitted the page dimensions are used for the graph. + * + * If 'pdf' is specified, 'filename', 'creator', 'author' and 'title' has no + * effect. + * + * 'left' and 'top' are overridden by 'align' + * + * It is required either to specify 'width' & 'height' or 'page'. + * + * The PDF format/PDFlib has some limitations on the capabilities, which + * means some functionality available using other canvass (fx. alpha + * blending and gradient fills) are not supported with PDF (see Canvas.txt + * in the docs/ folder for further details) + * + * @param array $param Parameter array + */ + function Image_Canvas_PDF($param) + { + if (isset($param['page'])) { + switch (strtoupper($param['page'])) { + case 'A0': + $this->_pageWidth = 2380; + $this->_pageHeight = 3368; + break; + + case 'A1': + $this->_pageWidth = 1684; + $this->_pageHeight = 2380; + break; + + case 'A2': + $this->_pageWidth = 1190; + $this->_pageHeight = 1684; + break; + + case 'A3': + $this->_pageWidth = 842; + $this->_pageHeight = 1190; + break; + + case 'A4': + $this->_pageWidth = 595; + $this->_pageHeight = 842; + break; + + case 'A5': + $this->_pageWidth = 421; + $this->_pageHeight = 595; + break; + + case 'A6': + $this->_pageWidth = 297; + $this->_pageHeight = 421; + break; + + case 'B5': + $this->_pageWidth = 501; + $this->_pageHeight = 709; + break; + + case 'LETTER': + $this->_pageWidth = 612; + $this->_pageHeight = 792; + break; + + case 'LEGAL': + $this->_pageWidth = 612; + $this->_pageHeight = 1008; + break; + + case 'LEDGER': + $this->_pageWidth = 1224; + $this->_pageHeight = 792; + break; + + case '11X17': + $this->_pageWidth = 792; + $this->_pageHeight = 1224; + break; + + case 'CD_FRONT': + $this->_pageWidth = 337; + $this->_pageHeight = 337; + break; + + case 'INLAY': + $this->_pageWidth = 425; + $this->_pageHeight = 332; + break; + + case 'INLAY_NOSIDES': + $this->_pageWidth = 390; + $this->_pageHeight = 332; + break; + } + } + + if ((isset($param['orientation'])) && (strtoupper($param['orientation']) == 'LANDSCAPE')) { + $w = $this->_pageWidth; + $this->_pageWidth = $this->_pageHeight; + $this->_pageHeight = $w; + } + + parent::Image_Canvas($param); + + if (!$this->_pageWidth) { + $this->_pageWidth = $this->_width; + } elseif (!$this->_width) { + $this->_width = $this->_pageWidth; + } + + if (!$this->_pageHeight) { + $this->_pageHeight = $this->_height; + } elseif (!$this->_height) { + $this->_height = $this->_pageHeight; + } + + $this->_width = min($this->_width, $this->_pageWidth); + $this->_height = min($this->_height, $this->_pageHeight); + + if ((isset($param['align'])) && + (($this->_width != $this->_pageWidth) || ($this->_height != $this->_pageHeight)) + ) { + switch (strtoupper($param['align'])) { + case 'TOPLEFT': + $this->_top = 0; + $this->_left = 0; + break; + + case 'TOPCENTER': + $this->_top = 0; + $this->_left = ($this->_pageWidth - $this->_width) / 2; + break; + + case 'TOPRIGHT': + $this->_top = 0; + $this->_left = $this->_pageWidth - $this->_width; + break; + + case 'LEFTCENTER': + $this->_top = ($this->_pageHeight - $this->_height) / 2; + $this->_left = 0; + break; + + case 'CENTER': + $this->_top = ($this->_pageHeight - $this->_height) / 2; + $this->_left = ($this->_pageWidth - $this->_width) / 2; + break; + + case 'RIGHTCENTER': + $this->_top = ($this->_pageHeight - $this->_height) / 2; + $this->_left = $this->_pageWidth - $this->_width; + break; + + case 'LEFTBOTTOM': + $this->_top = $this->_pageHeight - $this->_height; + $this->_left = 0; + break; + + case 'CENTERBOTTOM': + $this->_top = $this->_pageHeight - $this->_height; + $this->_left = ($this->_pageWidth - $this->_width) / 2; + break; + + case 'RIGHTBOTTOM': + $this->_top = $this->_pageHeight - $this->_height; + $this->_left = $this->_pageWidth - $this->_width; + break; + } + } + + $addPage = true; + if ((isset($param['pdf'])) && (is_resource($param['pdf']))) { + $this->_pdf =& $param['pdf']; + if ((isset($param['add_page'])) && ($param['add_page'] === false)) { + $addPage = false; + } + } else { + $this->_pdf = pdf_new(); + + if (isset($param['filename'])) { + pdf_open_file($this->_pdf, $param['filename']); + } else { + pdf_open_file($this->_pdf, ''); + } + + pdf_set_parameter($this->_pdf, 'warning', 'true'); + + pdf_set_info($this->_pdf, 'Creator', (isset($param['creator']) ? $param['creator'] : 'PEAR::Image_Canvas')); + pdf_set_info($this->_pdf, 'Author', (isset($param['author']) ? $param['author'] : 'Jesper Veggerby')); + pdf_set_info($this->_pdf, 'Title', (isset($param['title']) ? $param['title'] : 'Image_Canvas')); + } + + if ($addPage) { + pdf_begin_page($this->_pdf, $this->_pageWidth, $this->_pageHeight); + } + $this->_reset(); + + $this->_pdflib = $this->_version(); + } + + /** + * Get the x-point from the relative to absolute coordinates + * + * @param float $x The relative x-coordinate (in percentage of total width) + * @return float The x-coordinate as applied to the canvas + * @access private + */ + function _getX($x) + { + return $this->_left + $x; + } + + /** + * Get the y-point from the relative to absolute coordinates + * + * @param float $y The relative y-coordinate (in percentage of total width) + * @return float The y-coordinate as applied to the canvas + * @access private + */ + function _getY($y) + { + return $this->_pageHeight - ($this->_top + $y); + } + + /** + * Get the color index for the RGB color + * + * @param int $color The color + * @return int The GD image index of the color + * @access private + */ + function _color($color = false) + { + if (($color === false) || ($color === 'opague') || ($color === 'transparent')) { + return false; + } else { + $color = Image_Canvas_Color::color2RGB($color); + $color[0] = $color[0]/255; + $color[1] = $color[1]/255; + $color[2] = $color[2]/255; + return $color; + } + } + + /** + * Get the PDF linestyle + * + * @param mixed $lineStyle The line style to return, false if the one + * explicitly set + * @return bool True if set (so that a line should be drawn) + * @access private + */ + function _setLineStyle($lineStyle = false) + { + if ($lineStyle === false) { + $lineStyle = $this->_lineStyle; + } + + if (($lineStyle == 'transparent') || ($lineStyle === false)) { + return false; + } + + if (is_array($lineStyle)) { + // TODO Implement linestyles in PDFlib (using pdf_setcolor(.., 'pattern'...); ? + reset($lineStyle); + $lineStyle = current($lineStyle); + } + + $color = $this->_color($lineStyle); + + pdf_setlinewidth($this->_pdf, $this->_thickness); + if ($this->_pdflib < 4) { + pdf_setrgbcolor_stroke($this->_pdf, $color[0]/255, $color[1]/255, $color[2]/255); + } else { + pdf_setcolor($this->_pdf, 'stroke', 'rgb', $color[0], $color[1], $color[2], 0); + } + return true; + } + + /** + * Set the PDF fill style + * + * @param mixed $fillStyle The fillstyle to return, false if the one + * explicitly set + * @return bool True if set (so that a line should be drawn) + * @access private + */ + function _setFillStyle($fillStyle = false) + { + if ($fillStyle === false) { + $fillStyle = $this->_fillStyle; + } + + if (($fillStyle == 'transparent') || ($fillStyle === false)) { + return false; + } + + $color = $this->_color($fillStyle); + + if ($this->_pdflib < 4) { + pdf_setrgbcolor_fill($this->_pdf, $color[0]/255, $color[1]/255, $color[2]/255); + } else { + pdf_setcolor($this->_pdf, 'fill', 'rgb', $color[0], $color[1], $color[2], 0); + } + return true; + } + + /** + * Set the PDF font + * + * @access private + */ + function _setFont() + { + $this->_pdfFont = false; + if (isset($this->_font['name'])) { + pdf_set_parameter($this->_pdf, 'FontOutline', $this->_font['name'] . '=' . $this->_font['file']); + $this->_pdfFont = pdf_findfont($this->_pdf, $this->_font['name'], $this->_font['encoding'], 1); + + if ($this->_pdfFont) { + pdf_setfont($this->_pdf, $this->_pdfFont, $this->_font['size']); + $this->_setFillStyle($this->_font['color']); + } + } else { + $this->_setFillStyle('black'); + } + } + + /** + * Sets an image that should be used for filling. + * + * Image filling is not supported with PDF, filling 'transparent' + * + * @param string $filename The filename of the image to fill with + */ + function setFillImage($filename) + { + $this->_fillStyle = 'transparent'; + } + + /** + * Sets a gradient fill + * + * Gradient filling is not supported with PDF, end color used as solid fill. + * + * @param array $gradient Gradient fill options + */ + function setGradientFill($gradient) + { + $this->_fillStyle = $gradient['end']; + } + + /** + * Sets the font options. + * + * The $font array may have the following entries: + * + * 'ttf' = the .ttf file (either the basename, filename or full path) + * If 'ttf' is specified, then the following can be specified + * + * 'size' = size in pixels + * + * 'angle' = the angle with which to write the text + * + * @param array $font The font options. + */ + function setFont($fontOptions) + { + parent::setFont($fontOptions); + + if (!isset($this->_font['size'])) { + $this->_font['size'] = 12; + } + + if (!isset($this->_font['encoding'])) { + $this->_font['encoding'] = 'winansi'; + } + + if (!isset($this->_font['color'])) { + $this->_font['color'] = 'black'; + } + } + + /** + * Resets the canvas. + * + * Includes fillstyle, linestyle, thickness and polygon + * + * @access private + */ + function _reset() + { + pdf_initgraphics($this->_pdf); + parent::_reset(); + } + + /** + * Draw a line + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'color': mixed [optional] The line color + * @param array $params Parameter array + */ + function line($params) + { + $color = (isset($params['color']) ? $params['color'] : false); + if ($this->_setLineStyle($color)) { + pdf_moveto($this->_pdf, $this->_getX($params['x0']), $this->_getY($params['y0'])); + pdf_lineto($this->_pdf, $this->_getX($params['x1']), $this->_getY($params['y1'])); + pdf_stroke($this->_pdf); + } + parent::line($params); + } + + /** + * Parameter array: + * 'connect': bool [optional] Specifies whether the start point should be + * connected to the endpoint (closed polygon) or not (connected line) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function polygon($params = array()) + { + $connectEnds = (isset($params['connect']) ? $params['connect'] : false); + $fillColor = (isset($params['fill']) ? $params['line'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + $line = $this->_setLineStyle($lineColor); + $fill = false; + if ($connectEnds) { + $fill = $this->_setFillStyle($fillColor); + } + + $first = true; + foreach ($this->_polygon as $point) { + if ($first === true) { + pdf_moveto($this->_pdf, $point['X'], $point['Y']); + $first = $point; + } else { + if (isset($last['P1X'])) { + pdf_curveto($this->_pdf, + $last['P1X'], + $last['P1Y'], + $last['P2X'], + $last['P2Y'], + $point['X'], + $point['Y'] + ); + } else { + pdf_lineto($this->_pdf, + $point['X'], + $point['Y'] + ); + } + } + $last = $point; + } + + if ($connectEnds) { + if (isset($last['P1X'])) { + pdf_curveto($this->_pdf, + $last['P1X'], + $last['P1Y'], + $last['P2X'], + $last['P2Y'], + $first['X'], + $first['Y'] + ); + } else { + pdf_lineto($this->_pdf, + $first['X'], + $first['Y'] + ); + } + } + + if (($line) && ($fill)) { + pdf_fill_stroke($this->_pdf); + } elseif ($line) { + pdf_stroke($this->_pdf); + } elseif ($fill) { + pdf_fill($this->_pdf); + } + parent::polygon($params); + } + + /** + * Draw a rectangle + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function rectangle($params) + { + $x0 = $this->_getX($params['x0']); + $y0 = $this->_getY($params['y0']); + $x1 = $this->_getX($params['x1']); + $y1 = $this->_getY($params['y1']); + $fillColor = (isset($params['fill']) ? $params['line'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + $line = $this->_setLineStyle($lineColor); + $fill = $this->_setFillStyle($fillColor); + if (($line) || ($fill)) { + pdf_rect($this->_pdf, min($x0, $x1), min($y0, $y1), abs($x1 - $x0), abs($y1 - $y0)); + if (($line) && ($fill)) { + pdf_fill_stroke($this->_pdf); + } elseif ($line) { + pdf_stroke($this->_pdf); + } elseif ($fill) { + pdf_fill($this->_pdf); + } + } + parent::rectangle($params); + } + + /** + * Draw an ellipse + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function ellipse($params) + { + $x = $params['x']; + $y = $params['y']; + $rx = $params['rx']; + $ry = $params['ry']; + $fillColor = (isset($params['fill']) ? $params['line'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + $line = $this->_setLineStyle($lineColor); + $fill = $this->_setFillStyle($fillColor); + if (($line) || ($fill)) { + if ($rx == $ry) { + pdf_circle($this->_pdf, $this->_getX($x), $this->_getY($y), $rx); + } else { + pdf_moveto($this->_pdf, $this->_getX($x - $rx), $this->_getY($y)); + pdf_curveto($this->_pdf, + $this->_getX($x - $rx), $this->_getY($y), + $this->_getX($x - $rx), $this->_getY($y - $ry), + $this->_getX($x), $this->_getY($y - $ry) + ); + pdf_curveto($this->_pdf, + $this->_getX($x), $this->_getY($y - $ry), + $this->_getX($x + $rx), $this->_getY($y - $ry), + $this->_getX($x + $rx), $this->_getY($y) + ); + pdf_curveto($this->_pdf, + $this->_getX($x + $rx), $this->_getY($y), + $this->_getX($x + $rx), $this->_getY($y + $ry), + $this->_getX($x), $this->_getY($y + $ry) + ); + pdf_curveto($this->_pdf, + $this->_getX($x), $this->_getY($y + $ry), + $this->_getX($x - $rx), $this->_getY($y + $ry), + $this->_getX($x - $rx), $this->_getY($y) + ); + } + + if (($line) && ($fill)) { + pdf_fill_stroke($this->_pdf); + } elseif ($line) { + pdf_stroke($this->_pdf); + } elseif ($fill) { + pdf_fill($this->_pdf); + } + } + parent::ellipse($params); + } + + /** + * Draw a pie slice + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'v1': int The starting angle (in degrees) + * 'v2': int The end angle (in degrees) + * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) + * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function pieslice($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $rx = $this->_getX($params['rx']); + $ry = $this->_getY($params['ry']); + $v1 = $this->_getX($params['v1']); + $v2 = $this->_getY($params['v2']); + $srx = $this->_getX($params['srx']); + $sry = $this->_getY($params['sry']); + $fillColor = (isset($params['fill']) ? $params['line'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + // TODO Implement PDFLIB::pieSlice() + parent::pieslice($params); + } + + /** + * Get the width of a text, + * + * @param string $text The text to get the width of + * @return int The width of the text + */ + function textWidth($text) + { + if ($this->_pdfFont === false) { + return $this->_font['size'] * 0.7 * strlen($text); + } else { + return pdf_stringwidth($this->_pdf, $text, $this->_pdfFont, $this->_font['size']); + } + } + + /** + * Get the height of a text, + * + * @param string $text The text to get the height of + * @return int The height of the text + */ + function textHeight($text) + { + if (isset($this->_font['size'])) { + return $this->_font['size']; + } else { + return 12; + } + } + + /** + * Writes text + * + * Parameter array: + * 'x': int X-point of text + * 'y': int Y-point of text + * 'text': string The text to add + * 'alignment': array [optional] Alignment + * 'color': mixed [optional] The color of the text + */ + function addText($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $text = $params['text']; + $color = (isset($params['color']) ? $params['color'] : false); + $alignment = (isset($params['alignment']) ? $params['alignment'] : false); + + $this->_setFont(); + + $textWidth = $this->textWidth($text); + $textHeight = $this->textHeight($text); + + if (!is_array($alignment)) { + $alignment = array('vertical' => 'top', 'horizontal' => 'left'); + } + + if (!isset($alignment['vertical'])) { + $alignment['vertical'] = 'top'; + } + + if (!isset($alignment['horizontal'])) { + $alignment['horizontal'] = 'left'; + } + + if ($alignment['horizontal'] == 'right') { + $x = $x - $textWidth; + } elseif ($alignment['horizontal'] == 'center') { + $x = $x - ($textWidth / 2); + } + + $y -= $textHeight; + + if ($alignment['vertical'] == 'bottom') { + $y = $y + $textHeight; + } elseif ($alignment['vertical'] == 'center') { + $y = $y + ($textHeight / 2); + } + + if (($color === false) && (isset($this->_font['color']))) { + $color = $this->_font['color']; + } + + pdf_show_xy($this->_pdf, $text, $x, $y); + + parent::addText($params); + } + + /** + * Overlay image + * + * Parameter array: + * 'x': int X-point of overlayed image + * 'y': int Y-point of overlayed image + * 'filename': string The filename of the image to overlay + * 'width': int [optional] The width of the overlayed image (resizing if possible) + * 'height': int [optional] The height of the overlayed image (resizing if possible) + * 'alignment': array [optional] Alignment + */ + function image($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $filename = $params['filename']; + $width = (isset($params['width']) ? $params['width'] : false); + $height = (isset($params['height']) ? $params['height'] : false); + $alignment = (isset($params['alignment']) ? $params['alignment'] : false); + + if (substr($filename, -4) == '.png') { + $type = 'png'; + } elseif (substr($filename, -4) == '.jpg') { + $type = 'jpeg'; + } + + $image = pdf_load_image($this->_pdf, $type, realpath($filename), ''); + $width_ = pdf_get_value($this->_pdf, 'imagewidth', $image); + $height_ = pdf_get_value($this->_pdf, 'imageheight', $image); + + $outputWidth = ($width !== false ? $width : $width_); + $outputHeight = ($height !== false ? $height : $height_); + + if (!is_array($alignment)) { + $alignment = array('vertical' => 'top', 'horizontal' => 'left'); + } + + if (!isset($alignment['vertical'])) { + $alignment['vertical'] = 'top'; + } + + if (!isset($alignment['horizontal'])) { + $alignment['horizontal'] = 'left'; + } + + if ($alignment['horizontal'] == 'right') { + $x -= $outputWidth; + } elseif ($alignment['horizontal'] == 'center') { + $x -= $outputWidth / 2; + } + + if ($alignment['vertical'] == 'top') { + $y += $outputHeight; + } elseif ($alignment['vertical'] == 'center') { + $y += $outputHeight / 2; + } + + if (($width === false) && ($height === false)) { + $scale = 1; + } else { + $scale = max(($height/$height_), ($width/$width_)); + } + + pdf_place_image($this->_pdf, $image, $x, $y, $scale); + pdf_close_image($this->_pdf, $image); + + parent::image($params); + } + + /** + * Output the result of the canvas + * + * @param array $param Parameter array + * @abstract + */ + function show($param = false) + { + parent::show($param); + pdf_end_page($this->_pdf); + pdf_close($this->_pdf); + + $buf = pdf_get_buffer($this->_pdf); + $len = strlen($buf); + + header('Content-type: application/pdf'); + header('Content-Length: ' . $len); + header('Content-Disposition: inline; filename=image_graph.pdf'); + print $buf; + + pdf_delete($this->_pdf); + } + + /** + * Output the result of the canvas + * + * @param array $param Parameter array + * @abstract + */ + function save($param = false) + { + parent::save($param); + pdf_end_page($this->_pdf); + pdf_close($this->_pdf); + + $buf = pdf_get_buffer($this->_pdf); + $len = strlen($buf); + + $fp = @fopen($param['filename'], 'wb'); + if ($fp) { + fwrite($fp, $buf, strlen($buf)); + fclose($fp); + } + pdf_delete($this->_pdf); + } + + /** + * Get a canvas specific HTML tag. + * + * This method implicitly saves the canvas to the filename in the + * filesystem path specified and parses it as URL specified by URL path + * + * Parameter array: + * 'filename': string + * 'filepath': string Path to the file on the file system. Remember the final slash + * 'urlpath': string Path to the file available through an URL. Remember the final slash + * 'title': string The url title + */ + function toHtml($params) + { + parent::toHtml($params); + return '' . $params['title'] . ''; + } + + /** + * Check which major version of PDFlib is installed + * + * @return int The mahor version number of PDFlib + * @access private + */ + function _version() + { + $result = false; + $version = ''; + if (function_exists('pdf_get_majorversion')) { + $version = pdf_get_majorversion(); + } else if (function_exists('pdf_get_value')) { + $version = pdf_get_value($this->_pdf, 'major', 0); + } else { + ob_start(); + phpinfo(8); + $php_info = ob_get_contents(); + ob_end_clean(); + + if (ereg("]*>PDFlib GmbH Version *<\/td>]*>([^<]*)<\/td>", + $php_info, $result)) + { + $version = $result[1]; + } + } + + if (ereg('([0-9]{1,2})\.[0-9]{1,2}(\.[0-9]{1,2})?', trim($version), $result)) { + return $result[1]; + } else { + return $version; + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/SVG.php b/includes/pear/Image/Canvas/SVG.php index d5f06845..f1c928a1 100644 --- a/includes/pear/Image/Canvas/SVG.php +++ b/includes/pear/Image/Canvas/SVG.php @@ -1,885 +1,979 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: SVG.php,v 1.9 2005/11/08 19:00:35 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * Include file Image/Canvas.php - */ -require_once 'Image/Canvas.php'; - -/** - * Include file Image/Canvas/Color.php - */ -require_once 'Image/Canvas/Color.php'; - -/** - * SVG Canvas class. - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ -class Image_Canvas_SVG extends Image_Canvas -{ - - /** - * The SVG elements - * @var string - * @access private - */ - var $_elements = ''; - - /** - * The SVG defines - * @var string - * @access private - */ - var $_defs = ''; - - /** - * The current indention level - * @var string - * @access private - */ - var $_indent = ' '; - - /** - * A unieuq id counter - * @var int - * @access private - */ - var $_id = 1; - - /** - * The current group ids - * @var array - * @access private - */ - var $_groupIDs = array(); - - /** - * Create the SVG canvas. - * - * Parameters available: - * - * 'width' The width of the graph - * - * 'height' The height of the graph - * - * @param array $param Parameter array - */ - function Image_Canvas_SVG($param) - { - parent::Image_Canvas($param); - $this->_reset(); - } - - /** - * Add a SVG "element" to the output - * - * @param string $element The element - * @access private - */ - function _addElement($element, $params = array()) { - $elementdata = $this->_indent . $element . "\n"; - - if (isset($params['url'])) { - $url = $params['url']; - $target = (isset($params['target']) ? $params['target'] : false); - $alt = (isset($params['alt']) ? $params['alt'] : false); - - $tags = ''; - if (isset($params['htmltags'])) { - foreach ($params['htmltags'] as $key => $value) { - $tags .= ' '; - if (strpos($value, '"') >= 0) { - $tags .= $key . '=\'' . $value . '\''; - } else { - $tags .= $key . '="' . $value . '"'; - } - } - } - - $elementdata = - $this->_indent . '' . "\n" . - ' ' . $elementdata . - $this->_indent . '' . "\n"; - } - - - $this->_elements .= $elementdata; - } - - /** - * Add a SVG "define" to the output - * - * @param string $def The define - * @access private - */ - function _addDefine($def) { - $this->_defs .= ' ' . $def . "\n"; - } - - /** - * Get the color index for the RGB color - * - * @param int $color The color - * @return int A SVG compatible color - * @access private - */ - function _color($color = false) - { - if ($color === false) { - return 'transparent'; - } else { - $color = Image_Canvas_Color::color2RGB($color); - return 'rgb(' . $color[0] . ',' . $color[1] . ',' . $color[2] . ')'; - } - } - - /** - * Get the opacity for the RGB color - * - * @param int $color The color - * @return int A SVG compatible opacity value - * @access private - */ - function _opacity($color = false) - { - if ($color === false) { - return false; - } else { - $color = Image_Canvas_Color::color2RGB($color); - if ($color[3] != 255) { - return sprintf('%0.1f', $color[3]/255); - } else { - return false; - } - } - } - - /** - * Get the SVG applicable linestyle - * - * @param mixed $lineStyle The line style to return, false if the one - * explicitly set - * @return mixed A SVG compatible linestyle - * @access private - */ - function _getLineStyle($lineStyle = false) - { - $result = ''; - if ($lineStyle === false) { - $lineStyle = $this->_lineStyle; - } - - // TODO Linestyles (i.e. fx. dotted) does not work - - if (($lineStyle != 'transparent') && ($lineStyle !== false)) { - $result = 'stroke-width:' . $this->_thickness . ';'; - $result .= 'stroke:' .$this->_color($lineStyle) . ';'; - if ($opacity = $this->_opacity($lineStyle)) { - $result .= 'stroke-opacity:' . $opacity . ';'; - } - } - return $result; - } - - /** - * Get the SVG applicable fillstyle - * - * @param mixed $fillStyle The fillstyle to return, false if the one - * explicitly set - * @return mixed A SVG compatible fillstyle - * @access private - */ - function _getFillStyle($fillStyle = false) - { - $result = ''; - if ($fillStyle === false) { - $fillStyle = $this->_fillStyle; - } - - if (is_array($fillStyle)) { - if ($fillStyle['type'] == 'gradient') { - $id = 'gradient_' . ($this->_id++); - $startColor = $this->_color($fillStyle['start']); - $endColor = $this->_color($fillStyle['end']); - $startOpacity = $this->_opacity($fillStyle['start']); - $endOpacity = $this->_opacity($fillStyle['end']); - - switch ($fillStyle['direction']) { - case 'horizontal': - case 'horizontal_mirror': - $x1 = '0%'; - $y1 = '0%'; - $x2 = '100%'; - $y2 = '0%'; - break; - - case 'vertical': - case 'vertical_mirror': - $x1 = '0%'; - $y1 = '100%'; - $x2 = '0%'; - $y2 = '0%'; - break; - - case 'diagonal_tl_br': - $x1 = '0%'; - $y1 = '0%'; - $x2 = '100%'; - $y2 = '100%'; - break; - - case 'diagonal_bl_tr': - $x1 = '0%'; - $y1 = '100%'; - $x2 = '100%'; - $y2 = '0%'; - break; - - case 'radial': - $cx = '50%'; - $cy = '50%'; - $r = '100%'; - $fx = '50%'; - $fy = '50%'; - break; - - } - - if ($fillStyle['direction'] == 'radial') { - $this->_addDefine( - '' - ); - $this->_addDefine( - ' ' - ); - $this->_addDefine( - ' ' - ); - $this->_addDefine( - '' - ); - } elseif (($fillStyle['direction'] == 'vertical_mirror') || - ($fillStyle['direction'] == 'horizontal_mirror')) - { - $this->_addDefine( - '' - ); - $this->_addDefine( - ' ' - ); - $this->_addDefine( - ' ' - ); - $this->_addDefine( - ' ' - ); - $this->_addDefine( - '' - ); - } else { - $this->_addDefine( - '' - ); - $this->_addDefine( - ' ' - ); - $this->_addDefine( - ' ' - ); - $this->_addDefine( - '' - ); - } - - return 'fill:url(#' . $id . ');'; - } - } elseif (($fillStyle != 'transparent') && ($fillStyle !== false)) { - $result = 'fill:' . $this->_color($fillStyle) . ';'; - if ($opacity = $this->_opacity($fillStyle)) { - $result .= 'fill-opacity:' . $opacity . ';'; - } - return $result; - } else { - return 'fill:none;'; - } - } - - /** - * Sets an image that should be used for filling - * - * @param string $filename The filename of the image to fill with - */ - function setFillImage($filename) - { - } - - /** - * Sets a gradient fill - * - * @param array $gradient Gradient fill options - */ - function setGradientFill($gradient) - { - $this->_fillStyle = $gradient; - $this->_fillStyle['type'] = 'gradient'; - } - - /** - * Sets the font options. - * - * The $font array may have the following entries: - * 'type' = 'ttf' (TrueType) or omitted for default
- * If 'type' = 'ttf' then the following can be specified
- * 'size' = size in pixels
- * 'angle' = the angle with which to write the text - * 'file' = the .ttf file (either the basename, filename or full path) - * - * @param array $font The font options. - */ - function setFont($fontOptions) - { - parent::setFont($fontOptions); - if (!isset($this->_font['size'])) { - $this->_font['size'] = 10; - } - } - - /** - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'color': mixed [optional] The line color - * @param array $params Parameter array - */ - function line($params) - { - $x0 = $this->_getX($params['x0']); - $y0 = $this->_getY($params['y0']); - $x1 = $this->_getX($params['x1']); - $y1 = $this->_getY($params['y1']); - $color = (isset($params['color']) ? $params['color'] : false); - - $style = $this->_getLineStyle($color) . $this->_getFillStyle('transparent'); - if ($style != '') { - $this->_addElement( - '', - $params - ); - } - parent::line($params); - } - - /** - * Parameter array: - * 'connect': bool [optional] Specifies whether the start point should be - * connected to the endpoint (closed polygon) or not (connected line) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function polygon($params = array()) - { - $connectEnds = (isset($params['connect']) ? $params['connect'] : false); - $fillColor = (isset($params['fill']) ? $params['line'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - if (!$connectEnds) { - $fillColor = 'transparent'; - } - $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); - - $first = true; - $spline = false; - $lastpoint = false; - foreach($this->_polygon as $point) { - if ($first) { - $points = 'M'; - } elseif (!$spline) { - $points .= ' L'; - } - - if (($spline) && ($lastpoint !== false)) { - $points .= ' ' .round($lastpoint['P1X']) . ',' . round($lastpoint['P1Y']) . ' ' . - round($lastpoint['P2X']) . ',' . round($lastpoint['P2Y']); - } - - $points .= ' ' . round($point['X']) . ',' . round($point['Y']); - - if ((isset($point['P1X'])) && (isset($point['P1Y'])) && - (isset($point['P2X'])) && (isset($point['P2Y']))) - { - if (($first) || (!$spline)) { - $points .= ' C'; - } - $lastpoint = $point; - $spline = true; - } else { - $spline = false; - } - $first = false; - } - if ($connectEnds) { - $point .= ' Z'; - } - $this->_addElement( - '', - $params - ); - - parent::polygon($params); - } - - /** - * Draw a rectangle - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function rectangle($params) - { - $x0 = min($this->_getX($params['x0']), $this->_getX($params['x1'])); - $y0 = min($this->_getY($params['y0']), $this->_getY($params['y1'])); - $x1 = max($this->_getX($params['x0']), $this->_getX($params['x1'])); - $y1 = max($this->_getY($params['y0']), $this->_getY($params['y1'])); - $fillColor = (isset($params['fill']) ? $params['line'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); - if ($style != '') { - $this->_addElement( - '', - $params - ); - } - parent::rectangle($params); - } - - /** - * Draw an ellipse - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function ellipse($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $rx = $this->_getX($params['rx']); - $ry = $this->_getY($params['ry']); - $fillColor = (isset($params['fill']) ? $params['line'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); - if ($style != '') { - $this->_addElement( - '', - $params - ); - } - parent::ellipse($params); - } - - /** - * Draw a pie slice - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'v1': int The starting angle (in degrees) - * 'v2': int The end angle (in degrees) - * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) - * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function pieslice($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $rx = $this->_getX($params['rx']); - $ry = $this->_getY($params['ry']); - $v1 = $this->_getX($params['v1']); - $v2 = $this->_getY($params['v2']); - $srx = (isset($params['srx']) ? $this->_getX($params['srx']) : false); - $sry = (isset($params['sry']) ? $this->_getX($params['sry']) : false); - $fillColor = (isset($params['fill']) ? $params['line'] : false); - $lineColor = (isset($params['line']) ? $params['line'] : false); - - $dv = max($v2, $v1) - min($v2, $v1); - if ($dv >= 360) { - $this->ellipse($params); - } - else { - $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); - if ($style != '') { - $x1 = ($x + $rx * cos(deg2rad(min($v1, $v2) % 360))); - $y1 = ($y + $ry * sin(deg2rad(min($v1, $v2) % 360))); - $x2 = ($x + $rx * cos(deg2rad(max($v1, $v2) % 360))); - $y2 = ($y + $ry * sin(deg2rad(max($v1, $v2) % 360))); - $this->_addElement( - '', - $params - ); - } - - parent::pieslice($params); - } - } - - /** - * Get the width of a text, - * - * @param string $text The text to get the width of - * @return int The width of the text - */ - function textWidth($text) - { - if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { - return $this->_font['size']; - } else { - return round($this->_font['size'] * 0.7 * strlen($text)); - } - } - - /** - * Get the height of a text, - * - * @param string $text The text to get the height of - * @return int The height of the text - */ - function textHeight($text) - { - if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { - return round($this->_font['size'] * 0.7 * strlen($text)); - } else { - return $this->_font['size']; - } - } - - /** - * Writes text - * - * Parameter array: - * 'x': int X-point of text - * 'y': int Y-point of text - * 'text': string The text to add - * 'alignment': array [optional] Alignment - * 'color': mixed [optional] The color of the text - */ - function addText($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $text = $params['text']; - $color = (isset($params['color']) ? $params['color'] : false); - $alignment = (isset($params['alignment']) ? $params['alignment'] : false); - - $textHeight = $this->textHeight($text); - - if (!is_array($alignment)) { - $alignment = array('vertical' => 'top', 'horizontal' => 'left'); - } - - if (!isset($alignment['vertical'])) { - $alignment['vertical'] = 'top'; - } - - if (!isset($alignment['horizontal'])) { - $alignment['horizontal'] = 'left'; - } - - $align = ''; - - if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { - $align .= 'writing-mode: tb-rl;'; - - if ($alignment['vertical'] == 'bottom') { - $align .= 'text-anchor:end;'; - //$y = $y + $textHeight; - } elseif ($alignment['vertical'] == 'center') { - //$y = $y + ($textHeight / 2); - $align .= 'text-anchor:middle;'; - } - } else { - if ($alignment['horizontal'] == 'right') { - $align .= 'text-anchor:end;'; - } elseif ($alignment['horizontal'] == 'center') { - $align .= 'text-anchor:middle;'; - } - - if ($alignment['vertical'] == 'top') { - $y = $y + $textHeight; - } elseif ($alignment['vertical'] == 'center') { - $y = $y + ($textHeight / 2); - } - } - - if (($color === false) && (isset($this->_font['color']))) { - $color = $this->_font['color']; - } - - $textColor = $this->_color($color); - $textOpacity = $this->_opacity($color); - - $this->_addElement( - '_font['angle']) && ($this->_font['angle'] > 0) ? - 'rotate="' . $this->_font['angle'] . '" ' : - '' - ) .*/ - 'style="' . - (isset($this->_font['name']) ? - 'font-family:' . $this->_font['name'] . ';' : '') . - 'font-size:' . $this->_font['size'] . 'px;fill=' . - $textColor . ($textOpacity ? ';fill-opacity:' . - $textOpacity : - '' - ) . ';' . $align . '">' . - htmlspecialchars($text) . - '', - $params - ); - parent::addText($params); - } - - /** - * Overlay image - * - * Parameter array: - * 'x': int X-point of overlayed image - * 'y': int Y-point of overlayed image - * 'filename': string The filename of the image to overlay - * 'width': int [optional] The width of the overlayed image (resizing if possible) - * 'height': int [optional] The height of the overlayed image (resizing if possible) - * 'alignment': array [optional] Alignment - */ - function image($params) - { - $x = $this->_getX($params['x']); - $y = $this->_getY($params['y']); - $filename = $params['filename']; - - list($width, $height, $type, $attr) = getimagesize($filename); - $width = (isset($params['width']) ? $params['width'] : $width); - $height = (isset($params['height']) ? $params['height'] : $height); - $alignment = (isset($params['alignment']) ? $params['alignment'] : false); - - $file = fopen($filename, 'rb'); - $filedata = fread($file, filesize($filename)); - fclose($file); - - $data = 'data:' . image_type_to_mime_type($type) . ';base64,' . base64_encode($filedata); - $this->_addElement( - '', - $params - ); - parent::image($params); - } - - /** - * Start a group. - * - * What this does, depends on the canvas/format. - * - * @param string $name The name of the group - */ - function startGroup($name = false) - { - $name = strtolower(str_replace(' ', '_', $name)); - if (in_array($name, $this->_groupIDs)) { - $name .= $this->_id; - $this->_id++; - } - $this->_groupIDs[] = $name; - $this->_addElement(''); - $this->_indent .= ' '; - } - - /** - * End the "current" group. - * - * What this does, depends on the canvas/format. - */ - function endGroup() - { - $this->_indent = substr($this->_indent, 0, -4); - $this->_addElement(''); - } - - /** - * Output the result of the canvas - * - * @param array $param Parameter array - */ - function show($param = false) - { - parent::show($param); - $output = '' . "\n" . - '' . "\n" . - '' . "\n" . - ($this->_defs ? - ' ' . "\n" . - $this->_defs . - ' ' . "\n" : - '' - ) . - $this->_elements . - ''; - - header('Content-Type: image/svg+xml'); - header('Content-Disposition: inline; filename = "' . basename($_SERVER['PHP_SELF'], '.php') . '.svg"'); - print $output; - } - - /** - * Output the result of the canvas - * - * @param array $param Parameter array - */ - function save($param = false) - { - parent::save($param); - $output = '' . "\n" . - '' . "\n" . - '' . "\n" . - ($this->_defs ? - ' ' . "\n" . - $this->_defs . - ' ' . "\n" : - '' - ) . - $this->_elements . - ''; - - $file = fopen($param['filename'], 'w+'); - fwrite($file, $output); - fclose($file); - } - - /** - * Get a canvas specific HTML tag. - * - * This method implicitly saves the canvas to the filename in the - * filesystem path specified and parses it as URL specified by URL path - * - * Parameter array: - * 'filename': string - * 'filepath': string Path to the file on the file system. Remember the final slash - * 'urlpath': string Path to the file available through an URL. Remember the final slash - * 'width': int The width in pixels - * 'height': int The height in pixels - */ - function toHtml($params) - { - parent::toHtml($params); - return ''; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: SVG.php,v 1.17 2007/06/22 20:15:35 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * Include file Image/Canvas.php + */ +require_once 'Image/Canvas.php'; + +/** + * Include file Image/Canvas/Color.php + */ +require_once 'Image/Canvas/Color.php'; + +/** + * SVG Canvas class. + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ +class Image_Canvas_SVG extends Image_Canvas +{ + + /** + * The SVG elements + * @var string + * @access private + */ + var $_elements = ''; + + /** + * The SVG defines + * @var string + * @access private + */ + var $_defs = ''; + + /** + * The current indention level + * @var string + * @access private + */ + var $_indent = ' '; + + /** + * A unieuq id counter + * @var int + * @access private + */ + var $_id = 1; + + /** + * The current group ids + * @var array + * @access private + */ + var $_groupIDs = array(); + + /** + * The XML encoding (default iso-8859-1) + * @var string + * @access private + */ + var $_encoding = 'iso-8859-1'; + + /** + * Create the SVG canvas. + * + * Parameters available: + * + * 'width' The width of the graph + * + * 'height' The height of the graph + * + * 'encoding' The encoding of the SVG document + * + * @param array $param Parameter array + */ + function Image_Canvas_SVG($params) + { + parent::Image_Canvas($params); + $this->_reset(); + + if (isset($params['encoding'])) { + $this->_encoding = $params['encoding']; + } + } + + /** + * Add a SVG "element" to the output + * + * @param string $element The element + * @access private + */ + function _addElement($element, $params = array()) { + $elementdata = $this->_indent . $element . "\n"; + + if (isset($params['url'])) { + $url = $params['url']; + $target = (isset($params['target']) ? $params['target'] : false); + $alt = (isset($params['alt']) ? $params['alt'] : false); + + $tags = ''; + if (isset($params['htmltags'])) { + foreach ($params['htmltags'] as $key => $value) { + $tags .= ' '; + if (strpos($value, '"') >= 0) { + $tags .= $key . '=\'' . $value . '\''; + } else { + $tags .= $key . '="' . $value . '"'; + } + } + } + + $elementdata = + $this->_indent . '' . "\n" . + ' ' . $elementdata . + $this->_indent . '' . "\n"; + } + + + $this->_elements .= $elementdata; + } + + /** + * Add a SVG "define" to the output + * + * @param string $def The define + * @access private + */ + function _addDefine($def) { + $this->_defs .= ' ' . $def . "\n"; + } + + /** + * Get the color index for the RGB color + * + * @param int $color The color + * @return int A SVG compatible color + * @access private + */ + function _color($color = false) + { + if ($color === false) { + return 'transparent'; + } else { + $color = Image_Canvas_Color::color2RGB($color); + return 'rgb(' . $color[0] . ',' . $color[1] . ',' . $color[2] . ')'; + } + } + + /** + * Get the opacity for the RGB color + * + * @param int $color The color + * @return int A SVG compatible opacity value + * @access private + */ + function _opacity($color = false) + { + if ($color === false) { + return false; + } else { + $color = Image_Canvas_Color::color2RGB($color); + if ($color[3] != 255) { + return sprintf('%0.1f', $color[3]/255); + } else { + return false; + } + } + } + + /** + * Get the SVG applicable linestyle + * + * @param mixed $lineStyle The line style to return, false if the one + * explicitly set + * @return mixed A SVG compatible linestyle + * @access private + */ + function _getLineStyle($lineStyle = false) + { + $result = ''; + if ($lineStyle === false) { + $lineStyle = $this->_lineStyle; + } + + // TODO Linestyles (i.e. fx. dotted) does not work + + if (($lineStyle != 'transparent') && ($lineStyle !== false)) { + $result = 'stroke-width:' . $this->_thickness . ';'; + $result .= 'stroke:' .$this->_color($lineStyle) . ';'; + if ($opacity = $this->_opacity($lineStyle)) { + $result .= 'stroke-opacity:' . $opacity . ';'; + } + } + return $result; + } + + /** + * Get the SVG applicable fillstyle + * + * @param mixed $fillStyle The fillstyle to return, false if the one + * explicitly set + * @return mixed A SVG compatible fillstyle + * @access private + */ + function _getFillStyle($fillStyle = false) + { + $result = ''; + if ($fillStyle === false) { + $fillStyle = $this->_fillStyle; + } + + if (is_array($fillStyle)) { + if ($fillStyle['type'] == 'gradient') { + $id = 'gradient_' . ($this->_id++); + $startColor = $this->_color($fillStyle['start']); + $endColor = $this->_color($fillStyle['end']); + $startOpacity = $this->_opacity($fillStyle['start']); + $endOpacity = $this->_opacity($fillStyle['end']); + + switch ($fillStyle['direction']) { + case 'horizontal': + case 'horizontal_mirror': + $x1 = '0%'; + $y1 = '0%'; + $x2 = '100%'; + $y2 = '0%'; + break; + + case 'vertical': + case 'vertical_mirror': + $x1 = '0%'; + $y1 = '100%'; + $x2 = '0%'; + $y2 = '0%'; + break; + + case 'diagonal_tl_br': + $x1 = '0%'; + $y1 = '0%'; + $x2 = '100%'; + $y2 = '100%'; + break; + + case 'diagonal_bl_tr': + $x1 = '0%'; + $y1 = '100%'; + $x2 = '100%'; + $y2 = '0%'; + break; + + case 'radial': + $cx = '50%'; + $cy = '50%'; + $r = '100%'; + $fx = '50%'; + $fy = '50%'; + break; + + } + + if ($fillStyle['direction'] == 'radial') { + $this->_addDefine( + '' + ); + $this->_addDefine( + ' ' + ); + $this->_addDefine( + ' ' + ); + $this->_addDefine( + '' + ); + } elseif (($fillStyle['direction'] == 'vertical_mirror') || + ($fillStyle['direction'] == 'horizontal_mirror')) + { + $this->_addDefine( + '' + ); + $this->_addDefine( + ' ' + ); + $this->_addDefine( + ' ' + ); + $this->_addDefine( + ' ' + ); + $this->_addDefine( + '' + ); + } else { + $this->_addDefine( + '' + ); + $this->_addDefine( + ' ' + ); + $this->_addDefine( + ' ' + ); + $this->_addDefine( + '' + ); + } + + return 'fill:url(#' . $id . ');'; + } + } elseif (($fillStyle != 'transparent') && ($fillStyle !== false)) { + $result = 'fill:' . $this->_color($fillStyle) . ';'; + if ($opacity = $this->_opacity($fillStyle)) { + $result .= 'fill-opacity:' . $opacity . ';'; + } + return $result; + } else { + return 'fill:none;'; + } + } + + /** + * Sets an image that should be used for filling + * + * @param string $filename The filename of the image to fill with + */ + function setFillImage($filename) + { + } + + /** + * Sets a gradient fill + * + * @param array $gradient Gradient fill options + */ + function setGradientFill($gradient) + { + $this->_fillStyle = $gradient; + $this->_fillStyle['type'] = 'gradient'; + } + + /** + * Sets the font options. + * + * The $font array may have the following entries: + * 'type' = 'ttf' (TrueType) or omitted for default
+ * If 'type' = 'ttf' then the following can be specified
+ * 'size' = size in pixels
+ * 'angle' = the angle with which to write the text + * 'file' = the .ttf file (either the basename, filename or full path) + * + * @param array $font The font options. + */ + function setFont($fontOptions) + { + parent::setFont($fontOptions); + if (!isset($this->_font['size'])) { + $this->_font['size'] = 10; + } + } + + /** + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'color': mixed [optional] The line color + * @param array $params Parameter array + */ + function line($params) + { + $x0 = $this->_getX($params['x0']); + $y0 = $this->_getY($params['y0']); + $x1 = $this->_getX($params['x1']); + $y1 = $this->_getY($params['y1']); + $color = (isset($params['color']) ? $params['color'] : false); + + $attrs = (isset($params['attrs']) && is_array($params['attrs'])) ? $this->_getAttributes($params['attrs']) : null; + + $style = $this->_getLineStyle($color) . $this->_getFillStyle('transparent'); + if ($style != '') { + $this->_addElement( + '', + $params + ); + } + parent::line($params); + } + + /** + * Parameter array: + * 'connect': bool [optional] Specifies whether the start point should be + * connected to the endpoint (closed polygon) or not (connected line) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function polygon($params = array()) + { + $connectEnds = (isset($params['connect']) ? $params['connect'] : false); + $fillColor = (isset($params['fill']) ? $params['line'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + if (!$connectEnds) { + $fillColor = 'transparent'; + } + $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); + + $attrs = (isset($params['attrs']) && is_array($params['attrs'])) ? $this->_getAttributes($params['attrs']) : null; + + $first = true; + $spline = false; + $lastpoint = false; + foreach($this->_polygon as $point) { + if ($first) { + $points = 'M'; + } elseif (!$spline) { + $points .= ' L'; + } + + if (($spline) && ($lastpoint !== false)) { + $points .= ' ' .round($lastpoint['P1X']) . ',' . round($lastpoint['P1Y']) . ' ' . + round($lastpoint['P2X']) . ',' . round($lastpoint['P2Y']); + } + + $points .= ' ' . round($point['X']) . ',' . round($point['Y']); + + if ((isset($point['P1X'])) && (isset($point['P1Y'])) && + (isset($point['P2X'])) && (isset($point['P2Y']))) + { + if (($first) || (!$spline)) { + $points .= ' C'; + } + $lastpoint = $point; + $spline = true; + } else { + $spline = false; + } + $first = false; + } + if ($connectEnds) { + $points .= ' Z'; + } + $this->_addElement( + '', + $params + ); + + parent::polygon($params); + } + + /** + * Draw a rectangle + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function rectangle($params) + { + $x0 = min($this->_getX($params['x0']), $this->_getX($params['x1'])); + $y0 = min($this->_getY($params['y0']), $this->_getY($params['y1'])); + $x1 = max($this->_getX($params['x0']), $this->_getX($params['x1'])); + $y1 = max($this->_getY($params['y0']), $this->_getY($params['y1'])); + $fillColor = (isset($params['fill']) ? $params['line'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + $attrs = (isset($params['attrs']) && is_array($params['attrs'])) ? $this->_getAttributes($params['attrs']) : null; + + $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); + if ($style != '') { + $this->_addElement( + '', + $params + ); + } + parent::rectangle($params); + } + + /** + * Draw an ellipse + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function ellipse($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $rx = $this->_getX($params['rx']); + $ry = $this->_getY($params['ry']); + $fillColor = (isset($params['fill']) ? $params['line'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + $attrs = (isset($params['attrs']) && is_array($params['attrs'])) ? $this->_getAttributes($params['attrs']) : null; + + $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); + if ($style != '') { + $this->_addElement( + '', + $params + ); + } + parent::ellipse($params); + } + + /** + * Draw a pie slice + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'v1': int The starting angle (in degrees) + * 'v2': int The end angle (in degrees) + * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) + * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function pieslice($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $rx = $this->_getX($params['rx']); + $ry = $this->_getY($params['ry']); + $v1 = $this->_getX($params['v1']); + $v2 = $this->_getY($params['v2']); + $srx = (isset($params['srx']) ? $this->_getX($params['srx']) : false); + $sry = (isset($params['sry']) ? $this->_getX($params['sry']) : false); + $fillColor = (isset($params['fill']) ? $params['line'] : false); + $lineColor = (isset($params['line']) ? $params['line'] : false); + + $attrs = (isset($params['attrs']) && is_array($params['attrs'])) ? $this->_getAttributes($params['attrs']) : null; + + $dv = max($v2, $v1) - min($v2, $v1); + if ($dv >= 360) { + $this->ellipse($params); + } + else { + $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor); + if ($style != '') { + $x1 = ($x + $rx * cos(deg2rad(min($v1, $v2) % 360))); + $y1 = ($y + $ry * sin(deg2rad(min($v1, $v2) % 360))); + $x2 = ($x + $rx * cos(deg2rad(max($v1, $v2) % 360))); + $y2 = ($y + $ry * sin(deg2rad(max($v1, $v2) % 360))); + $this->_addElement( + '', + $params + ); + } + + parent::pieslice($params); + } + } + + /** + * Get the width of a text, + * + * @param string $text The text to get the width of + * @return int The width of the text + */ + function textWidth($text) + { + if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { + return $this->_font['size']; + } else { + return round($this->_font['size'] * 0.7 * strlen($text)); + } + } + + /** + * Get the height of a text, + * + * @param string $text The text to get the height of + * @return int The height of the text + */ + function textHeight($text) + { + if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { + return round($this->_font['size'] * 0.7 * strlen($text)); + } else { + return $this->_font['size']; + } + } + + /** + * Writes text + * + * Parameter array: + * 'x': int X-point of text + * 'y': int Y-point of text + * 'text': string The text to add + * 'alignment': array [optional] Alignment + * 'color': mixed [optional] The color of the text + */ + function addText($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $text = $params['text']; + $color = (isset($params['color']) ? $params['color'] : false); + $alignment = (isset($params['alignment']) ? $params['alignment'] : false); + + $attrs = (isset($params['attrs']) && is_array($params['attrs'])) ? $this->_getAttributes($params['attrs']) : null; + + $textHeight = $this->textHeight($text); + + if (!is_array($alignment)) { + $alignment = array('vertical' => 'top', 'horizontal' => 'left'); + } + + if (!isset($alignment['vertical'])) { + $alignment['vertical'] = 'top'; + } + + if (!isset($alignment['horizontal'])) { + $alignment['horizontal'] = 'left'; + } + + $align = ''; + + if ((isset($this->_font['vertical'])) && ($this->_font['vertical'])) { +// $align .= 'writing-mode: tb-rl;'; + + if ($alignment['vertical'] == 'bottom') { + $align .= 'text-anchor:end;'; + //$y = $y + $textHeight; + } elseif ($alignment['vertical'] == 'center') { + //$y = $y + ($textHeight / 2); + $align .= 'text-anchor:middle;'; + } + } else { + if ($alignment['horizontal'] == 'right') { + $align .= 'text-anchor:end;'; + } elseif ($alignment['horizontal'] == 'center') { + $align .= 'text-anchor:middle;'; + } + + if ($alignment['vertical'] == 'top') { + $y = $y + $textHeight; + } elseif ($alignment['vertical'] == 'center') { + $y = $y + ($textHeight / 2); + } + } + + if (($color === false) && (isset($this->_font['color']))) { + $color = $this->_font['color']; + } + + $textColor = $this->_color($color); + $textOpacity = $this->_opacity($color); + + $this->_addElement( + '' . "\n" . + $this->_indent . ' _font['angle']) && ($this->_font['angle'] > 0) ? + 'transform="rotate(' . (($this->_font['angle'] + 180) % 360) . ')" ' : + '' + ) . + 'style="' . + (isset($this->_font['name']) ? + 'font-family:' . $this->_font['name'] . ';' : '') . + 'font-size:' . $this->_font['size'] . 'px;fill:' . + $textColor . ($textOpacity ? ';fill-opacity:' . + $textOpacity : + '' + ) . ';' . $align . '"' . + ($attrs ? ' ' . $attrs : '') . + '>' . + htmlspecialchars($text) . + '' . "\n" . + $this->_indent . '', + $params + ); + parent::addText($params); + } + + /** + * Overlay image + * + * Parameter array: + * 'x': int X-point of overlayed image + * 'y': int Y-point of overlayed image + * 'filename': string The filename of the image to overlay + * 'width': int [optional] The width of the overlayed image (resizing if possible) + * 'height': int [optional] The height of the overlayed image (resizing if possible) + * 'alignment': array [optional] Alignment + */ + function image($params) + { + $x = $this->_getX($params['x']); + $y = $this->_getY($params['y']); + $filename = $params['filename']; + + $attrs = (isset($params['attrs']) && is_array($params['attrs'])) ? $this->_getAttributes($params['attrs']) : null; + + list($width, $height, $type, $attr) = getimagesize($filename); + $width = (isset($params['width']) ? $params['width'] : $width); + $height = (isset($params['height']) ? $params['height'] : $height); + $alignment = (isset($params['alignment']) ? $params['alignment'] : false); + + $file = fopen($filename, 'rb'); + $filedata = fread($file, filesize($filename)); + fclose($file); + + $data = 'data:' . image_type_to_mime_type($type) . ';base64,' . base64_encode($filedata); + + $this->_addElement( + '', + $params + ); + parent::image($params); + } + + /** + * Start a group. + * + * What this does, depends on the canvas/format. + * + * @param string $name The name of the group + */ + function startGroup($name = false) + { + $name = strtolower(str_replace(' ', '_', $name)); + if (in_array($name, $this->_groupIDs)) { + $name .= $this->_id; + $this->_id++; + } + $this->_groupIDs[] = $name; + $this->_addElement(''); + $this->_indent .= ' '; + } + + /** + * End the "current" group. + * + * What this does, depends on the canvas/format. + */ + function endGroup() + { + $this->_indent = substr($this->_indent, 0, -4); + $this->_addElement(''); + } + + /** + * Output the result of the canvas + * + * @param array $param Parameter array + */ + function show($param = false) + { + parent::show($param); + + $attrs = (isset($param['attrs']) && is_array($param['attrs'])) ? $this->_getAttributes($param['attrs']) : null; + + $output = $this->getData($param); + + header('Content-Type: image/svg+xml'); + header('Content-Disposition: inline; filename = "' . basename($_SERVER['PHP_SELF'], '.php') . '.svg"'); + print $output; + } + + /** + * Output the result of the canvas + * + * @param array $param Parameter array + */ + function save($param = false) + { + parent::save($param); + + $output = $this->getData($param); + + $file = fopen($param['filename'], 'w+'); + fwrite($file, $output); + fclose($file); + } + + + /** + * Get SVG data + * + * @param array $param Parameter array + * + * @return string + */ + function getData($param = false) + { + $attrs = (isset($param['attrs']) && is_array($param['attrs'])) ? $this->_getAttributes($param['attrs']) : null; + + return '_encoding . '"?>' . "\n" . + '' . "\n" . + '' . "\n" . + ($this->_defs ? + ' ' . "\n" . + $this->_defs . + ' ' . "\n" : + '' + ) . + $this->_elements . + ''; + } + + /** + * Set clipping to occur + * + * Parameter array: + * + * 'x0': int X point of Upper-left corner + * 'y0': int X point of Upper-left corner + * 'x1': int X point of lower-right corner + * 'y1': int Y point of lower-right corner + */ + function setClipping($params = false) + { + if ($params === false) { + $this->_addElement(''); + } + else { + $group = "clipping_" . $this->_id; + $this->_id++; + $this->_addElement(''); + + $this->_addDefine(''); + $this->_addDefine(' '); + $this->_addDefine(''); + } + } + + /** + * Get a canvas specific HTML tag. + * + * This method implicitly saves the canvas to the filename in the + * filesystem path specified and parses it as URL specified by URL path + * + * Parameter array: + * 'filename': string + * 'filepath': string Path to the file on the file system. Remember the final slash + * 'urlpath': string Path to the file available through an URL. Remember the final slash + * 'width': int The width in pixels + * 'height': int The height in pixels + */ + function toHtml($params) + { + parent::toHtml($params); + return ''; + } + + /** + * Converts array of attributes to string + * + * @param array $attrs Attributes array + * @return array + */ + function _getAttributes($attrs) + { + $string = ''; + + foreach ($attrs as $key => $value) { + $string .= ' ' . $key . '="' . $value . '"'; + } + + return $string; + } +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/Tool.php b/includes/pear/Image/Canvas/Tool.php index 7252f478..fb1393a9 100644 --- a/includes/pear/Image/Canvas/Tool.php +++ b/includes/pear/Image/Canvas/Tool.php @@ -1,217 +1,217 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Tool.php,v 1.3 2005/08/22 20:52:11 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * This class contains a set of tool-functions. - * - * These functions are all to be called statically - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - * @abstract - */ -class Image_Canvas_Tool -{ - - /** - * Maps a font name to an actual font file (fx. a .ttf file) - * - * Used to translate names (i.e. 'Courier New' to 'cour.ttf' or - * '/Windows/Fonts/Cour.ttf') - * - * Font names are translated using the tab-separated file - * Image/Canvas/Tool/fontmap.txt. - * - * The translated font-name (or the original if no translation) exists is - * then returned if it is an existing file, otherwise the file is searched - * first in the path specified by IMAGE_CANVAS_SYSTEM_FONT_PATH defined in - * Image/Canvas.php, then in the Image/Canvas/Fonts folder. If a font is - * still not found and the name is not beginning with a '/' the search is - * left to the library, otherwise the font is deemed non-existing. - * - * @param string $name The name of the font - * @param string $type The needed file type of the font - * @return string The filename of the font - * @static - */ - function fontMap($name, $type = '.ttf') - { - static $_fontMap; - - if (!is_array($_fontMap)) { - if (file_exists($fontmap = (dirname(__FILE__) . '/Fonts/fontmap.txt'))) { - $file = file($fontmap); - foreach($file as $fontmapping) { - list($fontname, $filenames) = explode(',', $fontmapping, 2); - $fontname = trim($fontname); - $filenames = trim($filenames); - $filenames = explode(',', $filenames); - foreach ($filenames as $filename) { - $type_pos = strrpos($filename, '.'); - $type = substr($filename, $type_pos); - $_fontMap[$fontname][$type] = $filename; - } - } - } - } - - $type = strtolower($type); - - if ((isset($_fontMap[$name])) && (isset($_fontMap[$name][$type]))) { - $filename = $_fontMap[$name][$type]; - } else { - $filename = $name; - } - - if (substr($filename, -strlen($type)) !== $type) { - $filename .= $type; - } - - $result = false; - if (file_exists($filename)) { - $result = $filename; - } elseif (file_exists($file = (IMAGE_CANVAS_SYSTEM_FONT_PATH . $filename))) { - $result = $file; - } elseif (file_exists($file = (dirname(__FILE__) . '/Fonts/' . $filename))) { - $result = $file; - } elseif (substr($name, 0, 1) !== '/') { - // leave it to the library to find the font - $result = $name; - } - - return str_replace('\\', '/', $result); - } - - /** - * Return the average of 2 points - * - * @param double P1 1st point - * @param double P2 2nd point - * @return double The average of P1 and P2 - * @static - */ - function mid($p1, $p2) - { - return ($p1 + $p2) / 2; - } - - /** - * Mirrors P1 in P2 by a amount of Factor - * - * @param double $p1 1st point, point to mirror - * @param double $o2 2nd point, mirror point - * @param double $factor Mirror factor, 0 returns $p2, 1 returns a pure - * mirror, ie $p1 on the exact other side of $p2 - * @return double $p1 mirrored in $p2 by Factor - * @static - */ - function mirror($p1, $p2, $factor = 1) - { - return $p2 + $factor * ($p2 - $p1); - } - - /** - * Calculates a Bezier control point, this function must be called for BOTH - * X and Y coordinates (will it work for 3D coordinates!?) - * - * @param double $p1 1st point - * @param double $p2 Point to - * @param double $factor Mirror factor, 0 returns P2, 1 returns a pure - * mirror, i.e. P1 on the exact other side of P2 - * @return double P1 mirrored in P2 by Factor - * @static - */ - function controlPoint($p1, $p2, $factor, $smoothFactor = 0.75) - { - $sa = Image_Canvas_Tool::mirror($p1, $p2, $smoothFactor); - $sb = Image_Canvas_Tool::mid($p2, $sa); - - $m = Image_Canvas_Tool::mid($p2, $factor); - - $pC = Image_Canvas_Tool::mid($sb, $m); - - return $pC; - } - - /** - * Calculates a Bezier point, this function must be called for BOTH X and Y - * coordinates (will it work for 3D coordinates!?) - * - * @param double $t A position between $p2 and $p3, value between 0 and 1 - * @param double $p1 Point to use for calculating control points - * @param double $p2 Point 1 to calculate bezier curve between - * @param double $p3 Point 2 to calculate bezier curve between - * @param double $p4 Point to use for calculating control points - * @return double The bezier value of the point t between $p2 and $p3 using - * $p1 and $p4 to calculate control points - * @static - */ - function bezier($t, $p1, $p2, $p3, $p4) - { - // (1-t)^3*p1 + 3*(1-t)^2*t*p2 + 3*(1-t)*t^2*p3 + t^3*p4 - return pow(1 - $t, 3) * $p1 + - 3 * pow(1 - $t, 2) * $t * $p2 + - 3 * (1 - $t) * pow($t, 2) * $p3 + - pow($t, 3) * $p4; - } - - /** - * Gets the angle / slope of a line relative to horizontal (left -> right) - * - * @param double $x0 The starting x point - * @param double $y0 The starting y point - * @param double $x1 The ending x point - * @param double $y1 The ending y point - * @param double The angle in degrees of the line - * @static - */ - function getAngle($x0, $y0, $x1, $y1) - { - - $dx = ($x1 - $x0); - $dy = ($y1 - $y0); - $l = sqrt($dx * $dx + $dy * $dy); - $v = rad2deg(asin(($y0 - $y1) / $l)); - if ($dx < 0) { - $v = 180 - $v; - } - return $v; - - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Tool.php,v 1.3 2005/08/22 20:52:11 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * This class contains a set of tool-functions. + * + * These functions are all to be called statically + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + * @abstract + */ +class Image_Canvas_Tool +{ + + /** + * Maps a font name to an actual font file (fx. a .ttf file) + * + * Used to translate names (i.e. 'Courier New' to 'cour.ttf' or + * '/Windows/Fonts/Cour.ttf') + * + * Font names are translated using the tab-separated file + * Image/Canvas/Tool/fontmap.txt. + * + * The translated font-name (or the original if no translation) exists is + * then returned if it is an existing file, otherwise the file is searched + * first in the path specified by IMAGE_CANVAS_SYSTEM_FONT_PATH defined in + * Image/Canvas.php, then in the Image/Canvas/Fonts folder. If a font is + * still not found and the name is not beginning with a '/' the search is + * left to the library, otherwise the font is deemed non-existing. + * + * @param string $name The name of the font + * @param string $type The needed file type of the font + * @return string The filename of the font + * @static + */ + function fontMap($name, $type = '.ttf') + { + static $_fontMap; + + if (!is_array($_fontMap)) { + if (file_exists($fontmap = (dirname(__FILE__) . '/Fonts/fontmap.txt'))) { + $file = file($fontmap); + foreach($file as $fontmapping) { + list($fontname, $filenames) = explode(',', $fontmapping, 2); + $fontname = trim($fontname); + $filenames = trim($filenames); + $filenames = explode(',', $filenames); + foreach ($filenames as $filename) { + $type_pos = strrpos($filename, '.'); + $type = substr($filename, $type_pos); + $_fontMap[$fontname][$type] = $filename; + } + } + } + } + + $type = strtolower($type); + + if ((isset($_fontMap[$name])) && (isset($_fontMap[$name][$type]))) { + $filename = $_fontMap[$name][$type]; + } else { + $filename = $name; + } + + if (substr($filename, -strlen($type)) !== $type) { + $filename .= $type; + } + + $result = false; + if (file_exists($filename)) { + $result = $filename; + } elseif (file_exists($file = (IMAGE_CANVAS_SYSTEM_FONT_PATH . $filename))) { + $result = $file; + } elseif (file_exists($file = (dirname(__FILE__) . '/Fonts/' . $filename))) { + $result = $file; + } elseif (substr($name, 0, 1) !== '/') { + // leave it to the library to find the font + $result = $name; + } + + return str_replace('\\', '/', $result); + } + + /** + * Return the average of 2 points + * + * @param double P1 1st point + * @param double P2 2nd point + * @return double The average of P1 and P2 + * @static + */ + function mid($p1, $p2) + { + return ($p1 + $p2) / 2; + } + + /** + * Mirrors P1 in P2 by a amount of Factor + * + * @param double $p1 1st point, point to mirror + * @param double $o2 2nd point, mirror point + * @param double $factor Mirror factor, 0 returns $p2, 1 returns a pure + * mirror, ie $p1 on the exact other side of $p2 + * @return double $p1 mirrored in $p2 by Factor + * @static + */ + function mirror($p1, $p2, $factor = 1) + { + return $p2 + $factor * ($p2 - $p1); + } + + /** + * Calculates a Bezier control point, this function must be called for BOTH + * X and Y coordinates (will it work for 3D coordinates!?) + * + * @param double $p1 1st point + * @param double $p2 Point to + * @param double $factor Mirror factor, 0 returns P2, 1 returns a pure + * mirror, i.e. P1 on the exact other side of P2 + * @return double P1 mirrored in P2 by Factor + * @static + */ + function controlPoint($p1, $p2, $factor, $smoothFactor = 0.75) + { + $sa = Image_Canvas_Tool::mirror($p1, $p2, $smoothFactor); + $sb = Image_Canvas_Tool::mid($p2, $sa); + + $m = Image_Canvas_Tool::mid($p2, $factor); + + $pC = Image_Canvas_Tool::mid($sb, $m); + + return $pC; + } + + /** + * Calculates a Bezier point, this function must be called for BOTH X and Y + * coordinates (will it work for 3D coordinates!?) + * + * @param double $t A position between $p2 and $p3, value between 0 and 1 + * @param double $p1 Point to use for calculating control points + * @param double $p2 Point 1 to calculate bezier curve between + * @param double $p3 Point 2 to calculate bezier curve between + * @param double $p4 Point to use for calculating control points + * @return double The bezier value of the point t between $p2 and $p3 using + * $p1 and $p4 to calculate control points + * @static + */ + function bezier($t, $p1, $p2, $p3, $p4) + { + // (1-t)^3*p1 + 3*(1-t)^2*t*p2 + 3*(1-t)*t^2*p3 + t^3*p4 + return pow(1 - $t, 3) * $p1 + + 3 * pow(1 - $t, 2) * $t * $p2 + + 3 * (1 - $t) * pow($t, 2) * $p3 + + pow($t, 3) * $p4; + } + + /** + * Gets the angle / slope of a line relative to horizontal (left -> right) + * + * @param double $x0 The starting x point + * @param double $y0 The starting y point + * @param double $x1 The ending x point + * @param double $y1 The ending y point + * @param double The angle in degrees of the line + * @static + */ + function getAngle($x0, $y0, $x1, $y1) + { + + $dx = ($x1 - $x0); + $dy = ($y1 - $y0); + $l = sqrt($dx * $dx + $dy * $dy); + $v = rad2deg(asin(($y0 - $y1) / $l)); + if ($dx < 0) { + $v = 180 - $v; + } + return $v; + + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Canvas/WithMap.php b/includes/pear/Image/Canvas/WithMap.php index 3206af4b..b9689757 100644 --- a/includes/pear/Image/Canvas/WithMap.php +++ b/includes/pear/Image/Canvas/WithMap.php @@ -1,278 +1,278 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: WithMap.php,v 1.3 2005/08/24 20:37:35 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -/** - * Class for handling different output formats including a HTML image map - * - * @category Images - * @package Image_Canvas - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - * @since version 0.2.0 - * @abstract - */ -class Image_Canvas_WithMap extends Image_Canvas -{ - - /** - * The image map - * @var Image_Canvas_ImageMap - * @access private - */ - var $_imageMap = null; - - /** - * Create the canvas. - * - * Parameters available: - * - * 'width' The width of the graph on the canvas - * - * 'height' The height of the graph on the canvas - * - * 'left' The left offset of the graph on the canvas - * - * 'top' The top offset of the graph on the canvas - * - * 'usemap' Initialize an image map - * - * @param array $params Parameter array - * @abstract - */ - function Image_Canvas_WithMap($params) - { - parent::Image_Canvas($params); - - if ((isset($params['usemap'])) && ($params['usemap'] === true)) { - $this->_imageMap =& Image_Canvas::factory( - 'ImageMap', - array( - 'left' => $this->_left, - 'top' => $this->_top, - 'width' => $this->_width, - 'height' => $this->_height - ) - ); - } - } - /** - * Draw a line - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'color': mixed [optional] The line color - * @param array $params Parameter array - */ - function line($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->line($params); - } - parent::line($params); - } - - /** - * Adds vertex to a polygon - * - * Parameter array: - * 'x': int X point - * 'y': int Y point - * @param array $params Parameter array - */ - function addVertex($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->addVertex($params); - } - parent::addVertex($params); - } - - /** - * Adds "splined" vertex to a polygon - * - * Parameter array: - * 'x': int X point - * 'y': int Y point - * 'p1x': X Control point 1 - * 'p1y': Y Control point 1 - * 'p2x': X Control point 2 - * 'p2y': Y Control point 2 - * @param array $params Parameter array - */ - function addSpline($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->addSpline($params); - } - parent::addSpline($params); - } - - /** - * Draws a polygon - * - * Parameter array: - * 'connect': bool [optional] Specifies whether the start point should be - * connected to the endpoint (closed polygon) or not (connected line) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function polygon($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->polygon($params); - } - parent::polygon($params); - } - - /** - * Draw a rectangle - * - * Parameter array: - * 'x0': int X start point - * 'y0': int Y start point - * 'x1': int X end point - * 'y1': int Y end point - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function rectangle($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->rectangle($params); - } - parent::rectangle($params); - } - - /** - * Draw an ellipse - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function ellipse($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->ellipse($params); - } - parent::ellipse($params); - } - - /** - * Draw a pie slice - * - * Parameter array: - * 'x': int X center point - * 'y': int Y center point - * 'rx': int X radius - * 'ry': int Y radius - * 'v1': int The starting angle (in degrees) - * 'v2': int The end angle (in degrees) - * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) - * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) - * 'fill': mixed [optional] The fill color - * 'line': mixed [optional] The line color - * @param array $params Parameter array - */ - function pieslice($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->pieslice($params); - } - parent::pieslice($params); - } - - /** - * Writes text - * - * Parameter array: - * 'x': int X-point of text - * 'y': int Y-point of text - * 'text': string The text to add - * 'alignment': array [optional] Alignment - * 'color': mixed [optional] The color of the text - */ - function addText($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->addText($params); - } - parent::addText($params); - } - - /** - * Overlay image - * - * Parameter array: - * 'x': int X-point of overlayed image - * 'y': int Y-point of overlayed image - * 'filename': string The filename of the image to overlay - * 'width': int [optional] The width of the overlayed image (resizing if possible) - * 'height': int [optional] The height of the overlayed image (resizing if possible) - * 'alignment': array [optional] Alignment - */ - function image($params) - { - if (isset($this->_imageMap)) { - $this->_imageMap->image($params); - } - parent::image($params); - } - - /** - * Get the imagemap - * @return Image_Graph_ImageMap The image map (or false if none) - */ - function &getImageMap() - { - $result = null; - if (isset($this->_imageMap)) { - $result =& $this->_imageMap; - } - return $result; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: WithMap.php,v 1.3 2005/08/24 20:37:35 nosey Exp $ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + */ + +/** + * Class for handling different output formats including a HTML image map + * + * @category Images + * @package Image_Canvas + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 + * @since version 0.2.0 + * @abstract + */ +class Image_Canvas_WithMap extends Image_Canvas +{ + + /** + * The image map + * @var Image_Canvas_ImageMap + * @access private + */ + var $_imageMap = null; + + /** + * Create the canvas. + * + * Parameters available: + * + * 'width' The width of the graph on the canvas + * + * 'height' The height of the graph on the canvas + * + * 'left' The left offset of the graph on the canvas + * + * 'top' The top offset of the graph on the canvas + * + * 'usemap' Initialize an image map + * + * @param array $params Parameter array + * @abstract + */ + function Image_Canvas_WithMap($params) + { + parent::Image_Canvas($params); + + if ((isset($params['usemap'])) && ($params['usemap'] === true)) { + $this->_imageMap =& Image_Canvas::factory( + 'ImageMap', + array( + 'left' => $this->_left, + 'top' => $this->_top, + 'width' => $this->_width, + 'height' => $this->_height + ) + ); + } + } + /** + * Draw a line + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'color': mixed [optional] The line color + * @param array $params Parameter array + */ + function line($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->line($params); + } + parent::line($params); + } + + /** + * Adds vertex to a polygon + * + * Parameter array: + * 'x': int X point + * 'y': int Y point + * @param array $params Parameter array + */ + function addVertex($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->addVertex($params); + } + parent::addVertex($params); + } + + /** + * Adds "splined" vertex to a polygon + * + * Parameter array: + * 'x': int X point + * 'y': int Y point + * 'p1x': X Control point 1 + * 'p1y': Y Control point 1 + * 'p2x': X Control point 2 + * 'p2y': Y Control point 2 + * @param array $params Parameter array + */ + function addSpline($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->addSpline($params); + } + parent::addSpline($params); + } + + /** + * Draws a polygon + * + * Parameter array: + * 'connect': bool [optional] Specifies whether the start point should be + * connected to the endpoint (closed polygon) or not (connected line) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function polygon($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->polygon($params); + } + parent::polygon($params); + } + + /** + * Draw a rectangle + * + * Parameter array: + * 'x0': int X start point + * 'y0': int Y start point + * 'x1': int X end point + * 'y1': int Y end point + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function rectangle($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->rectangle($params); + } + parent::rectangle($params); + } + + /** + * Draw an ellipse + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function ellipse($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->ellipse($params); + } + parent::ellipse($params); + } + + /** + * Draw a pie slice + * + * Parameter array: + * 'x': int X center point + * 'y': int Y center point + * 'rx': int X radius + * 'ry': int Y radius + * 'v1': int The starting angle (in degrees) + * 'v2': int The end angle (in degrees) + * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) + * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) + * 'fill': mixed [optional] The fill color + * 'line': mixed [optional] The line color + * @param array $params Parameter array + */ + function pieslice($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->pieslice($params); + } + parent::pieslice($params); + } + + /** + * Writes text + * + * Parameter array: + * 'x': int X-point of text + * 'y': int Y-point of text + * 'text': string The text to add + * 'alignment': array [optional] Alignment + * 'color': mixed [optional] The color of the text + */ + function addText($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->addText($params); + } + parent::addText($params); + } + + /** + * Overlay image + * + * Parameter array: + * 'x': int X-point of overlayed image + * 'y': int Y-point of overlayed image + * 'filename': string The filename of the image to overlay + * 'width': int [optional] The width of the overlayed image (resizing if possible) + * 'height': int [optional] The height of the overlayed image (resizing if possible) + * 'alignment': array [optional] Alignment + */ + function image($params) + { + if (isset($this->_imageMap)) { + $this->_imageMap->image($params); + } + parent::image($params); + } + + /** + * Get the imagemap + * @return Image_Graph_ImageMap The image map (or false if none) + */ + function &getImageMap() + { + $result = null; + if (isset($this->_imageMap)) { + $result =& $this->_imageMap; + } + return $result; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Color.php b/includes/pear/Image/Color.php index 471f6f24..bf658362 100644 --- a/includes/pear/Image/Color.php +++ b/includes/pear/Image/Color.php @@ -1,719 +1,723 @@ - - * @author Andrew Morton - * @copyright 2003-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Color.php,v 1.15 2005/09/12 19:12:02 drewish Exp $ - * @link http://pear.php.net/package/Image_Color - */ - -/** - * Image_Color handles color conversion and mixing. - * - * The class is quick, simple to use, and does its job fairly well but it's got - * some code smells: - * - Call setColors() for some functions but not others. - * - Different functions expect different color formats. setColors() only - * accepts hex while allocateColor() will accept named or hex (provided the - * hex ones start with the # character). - * - Some conversions go in only one direction, ie HSV->RGB but no RGB->HSV. - * I'm going to try to straighten out some of this but I'll be hard to do so - * without breaking backwards compatibility. - * - * @category Image - * @package Image_Color - * @author Jason Lotito - * @author Andrew Morton - * @copyright 2003-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 0.1.2 - * @link http://pear.php.net/package/Image_Color - */ -class Image_Color -{ - /** - * First color that the class handles for ranges and mixes. - * @var array - * @access public - * @see setColors() - */ - var $color1 = array(); - - /** - * Second color that the class handles for ranges and mixes. - * @var array - * @access public - * @see setColors() - */ - var $color2 = array(); - - /** - * Boolean value for determining whether colors outputted should be limited - * to the web safe pallet or not. - * - * @var boolean - * @access private - * @see setWebSafe() - */ - var $_websafeb = false; - - /** - * Mix two colors together by finding their average. If the colors are not - * passed as parameters, the class's colors will be mixed instead. - * - * @param string $col1 The first color you want to mix - * @param string $col2 The second color you want to mix - * @return string The mixed color. - * @access public - * @author Jason Lotito - * @uses _setColors() to assign the colors if any are passed to the - * class. - */ - function mixColors($col1 = false, $col2 = false) - { - if ($col1) { - $this->_setColors($col1, $col2); - } - - // after finding the average, it will be a float. add 0.5 and then - // cast to an integer to properly round it to an integer. - $color3[0] = (int) ((($this->color1[0] + $this->color2[0]) / 2) + 0.5); - $color3[1] = (int) ((($this->color1[1] + $this->color2[1]) / 2) + 0.5); - $color3[2] = (int) ((($this->color1[2] + $this->color2[2]) / 2) + 0.5); - - if ($this->_websafeb) { - array_walk($color3, '_makeWebSafe'); - } - - return Image_Color::rgb2hex($color3); - } - - /** - * Determines whether colors the returned by this class will be rounded to - * the nearest web safe value. - * - * @param boolean $bool Indicates if colors should be limited to the - * websafe pallet. - * @return void - * @access public - * @author Jason Lotito - */ - function setWebSafe($bool = true) - { - $this->_websafeb = (boolean) $bool; - } - - /** - * Set the two colors this class uses for mixing and ranges. - * - * @param string $col1 The first color in hex format - * @param string $col2 The second color in hex format - * @return void - * @access public - * @author Jason Lotito - */ - function setColors($col1, $col2) - { - $this->_setColors($col1, $col2); - } - - /** - * Get the range of colors between the class's two colors, given a degree. - * - * @param integer $degrees How large a 'step' we should take between the - * colors. - * @return array Returns an array of hex strings, one element for each - * color. - * @access public - * @author Jason Lotito - * @todo Allow for degrees for individual parts of the colors. - */ - function getRange($degrees = 2) - { - if ($degrees == 0) { - $degrees = 1; - } - - // The degrees give us how much we should advance each color at each - // phase of the loop. This way, the advance is equal throughout all - // the colors. - - $red_steps = ($this->color2[0] - $this->color1[0]) / $degrees; - $green_steps = ($this->color2[1] - $this->color1[1]) / $degrees; - $blue_steps = ($this->color2[2] - $this->color1[2]) / $degrees; - - $allcolors = array(); - - /** - * The loop stops once any color has gone beyond the end color. - */ - - // Loop through all the degrees between the colors - for ($x = 0; $x < $degrees; $x++) { - $col[0] = $red_steps * $x; - $col[1] = $green_steps * $x; - $col[2] = $blue_steps * $x; - - // Loop through each R, G, and B - for ($i = 0; $i < 3; $i++) { - $partcolor = $this->color1[$i] + $col[$i]; - // If the color is less than 256 - if ($partcolor < 256) { - // Makes sure the colors is not less than 0 - if ($partcolor > -1) { - $newcolor[$i] = $partcolor; - } else { - $newcolor[$i] = 0; - } - // Color was greater than 255 - } else { - $newcolor[$i] = 255; - } - } - - if ($this->_websafeb) { - array_walk($newcolor, '_makeWebSafe'); - } - - $allcolors[] = Image_Color::rgb2hex($newcolor); - } - - return $allcolors; - } - - /** - * Change the lightness of the class's two colors. - * - * @param integer $degree The degree of the change. Positive values - * lighten the color while negative values will darken it. - * @return void - * @access public - * @author Jason Lotito - * @uses Image_Color::$color1 as an input and return value. - * @uses Image_Color::$color2 as an input and return value. - */ - function changeLightness($degree = 10) - { - $color1 =& $this->color1; - $color2 =& $this->color2; - + + * @author Andrew Morton + * @copyright 2003-2005 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: Color.php,v 1.17 2008/10/26 18:27:10 clockwerx Exp $ + * @link http://pear.php.net/package/Image_Color + */ + +/** + * Image_Color handles color conversion and mixing. + * + * The class is quick, simple to use, and does its job fairly well but it's got + * some code smells: + * - Call setColors() for some functions but not others. + * - Different functions expect different color formats. setColors() only + * accepts hex while allocateColor() will accept named or hex (provided the + * hex ones start with the # character). + * - Some conversions go in only one direction, ie HSV->RGB but no RGB->HSV. + * I'm going to try to straighten out some of this but I'll be hard to do so + * without breaking backwards compatibility. + * + * @category Image + * @package Image_Color + * @author Jason Lotito + * @author Andrew Morton + * @copyright 2003-2005 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: 0.1.2 + * @link http://pear.php.net/package/Image_Color + */ +class Image_Color +{ + /** + * First color that the class handles for ranges and mixes. + * @var array + * @access public + * @see setColors() + */ + var $color1 = array(); + + /** + * Second color that the class handles for ranges and mixes. + * @var array + * @access public + * @see setColors() + */ + var $color2 = array(); + + /** + * Boolean value for determining whether colors outputted should be limited + * to the web safe pallet or not. + * + * @var boolean + * @access private + * @see setWebSafe() + */ + var $_websafeb = false; + + /** + * Mix two colors together by finding their average. If the colors are not + * passed as parameters, the class's colors will be mixed instead. + * + * @param string $col1 The first color you want to mix + * @param string $col2 The second color you want to mix + * @return string The mixed color. + * @access public + * @author Jason Lotito + * @uses _setColors() to assign the colors if any are passed to the + * class. + */ + function mixColors($col1 = false, $col2 = false) + { + if ($col1) { + $this->_setColors($col1, $col2); + } + + // after finding the average, it will be a float. add 0.5 and then + // cast to an integer to properly round it to an integer. + $color3[0] = (int) ((($this->color1[0] + $this->color2[0]) / 2) + 0.5); + $color3[1] = (int) ((($this->color1[1] + $this->color2[1]) / 2) + 0.5); + $color3[2] = (int) ((($this->color1[2] + $this->color2[2]) / 2) + 0.5); + + if ($this->_websafeb) { + array_walk($color3, '_makeWebSafe'); + } + + return Image_Color::rgb2hex($color3); + } + + /** + * Determines whether colors the returned by this class will be rounded to + * the nearest web safe value. + * + * @param boolean $bool Indicates if colors should be limited to the + * websafe pallet. + * @return void + * @access public + * @author Jason Lotito + */ + function setWebSafe($bool = true) + { + $this->_websafeb = (boolean) $bool; + } + + /** + * Set the two colors this class uses for mixing and ranges. + * + * @param string $col1 The first color in hex format + * @param string $col2 The second color in hex format + * @return void + * @access public + * @author Jason Lotito + */ + function setColors($col1, $col2) + { + $this->_setColors($col1, $col2); + } + + /** + * Get the range of colors between the class's two colors, given a degree. + * + * @param integer $degrees How large a 'step' we should take between the + * colors. + * @return array Returns an array of hex strings, one element for each + * color. + * @access public + * @author Jason Lotito + * @todo Allow for degrees for individual parts of the colors. + */ + function getRange($degrees = 2) + { + if ($degrees == 0) { + $degrees = 1; + } + + // The degrees give us how much we should advance each color at each + // phase of the loop. This way, the advance is equal throughout all + // the colors. + + $red_steps = ($this->color2[0] - $this->color1[0]) / $degrees; + $green_steps = ($this->color2[1] - $this->color1[1]) / $degrees; + $blue_steps = ($this->color2[2] - $this->color1[2]) / $degrees; + + $allcolors = array(); + + /** + * The loop stops once any color has gone beyond the end color. + */ + + // Loop through all the degrees between the colors + for ($x = 0; $x < $degrees; $x++) { + $col[0] = $red_steps * $x; + $col[1] = $green_steps * $x; + $col[2] = $blue_steps * $x; + + // Loop through each R, G, and B + for ($i = 0; $i < 3; $i++) { + $partcolor = $this->color1[$i] + $col[$i]; + // If the color is less than 256 + if ($partcolor < 256) { + // Makes sure the colors is not less than 0 + if ($partcolor > -1) { + $newcolor[$i] = $partcolor; + } else { + $newcolor[$i] = 0; + } + // Color was greater than 255 + } else { + $newcolor[$i] = 255; + } + } + + if ($this->_websafeb) { + array_walk($newcolor, '_makeWebSafe'); + } + + $allcolors[] = Image_Color::rgb2hex($newcolor); + } + + return $allcolors; + } + + /** + * Change the lightness of the class's two colors. + * + * @param integer $degree The degree of the change. Positive values + * lighten the color while negative values will darken it. + * @return void + * @access public + * @author Jason Lotito + * @uses Image_Color::$color1 as an input and return value. + * @uses Image_Color::$color2 as an input and return value. + */ + function changeLightness($degree = 10) + { + $color1 =& $this->color1; + $color2 =& $this->color2; + for ($x = 0; $x < 3; $x++) { - if (($color1[$x] + $degree) < 256) { - if (($color1[$x] + $degree) > -1) { - $color1[$x] += $degree; - } else { - $color1[$x] = 0; + if (isset($color1[$x])) { + if (($color1[$x] + $degree) < 256) { + if (($color1[$x] + $degree) > -1) { + $color1[$x] += $degree; + } else { + $color1[$x] = 0; + } + } else { + $color1[$x] = 255; } - } else { - $color1[$x] = 255; - } + } - if (($color2[$x] + $degree) < 256) { - if (($color2[$x] + $degree) > -1) { - $color2[$x] += $degree; - } else { - $color2[$x] = 0; + if (isset($color2[$x])) { + if (($color2[$x] + $degree) < 256) { + if (($color2[$x] + $degree) > -1) { + $color2[$x] += $degree; + } else { + $color2[$x] = 0; + } + } else { + $color2[$x] = 255; } - } else { - $color2[$x] = 255; - } - } - } - - /** - * Determine if a light or dark text color would be more readable on a - * background of a given color. This is determined by the G(reen) value of - * RGB. You can change the dark and the light colors from their default - * black and white. - * - * @param string $color The hex color to analyze - * @param string $light The light color value to return if we should - * have light text. - * @param string $dark The dark color value to return if we should have - * dark text. - * @return string The light or dark value which would make the text most - * readable. - * @access public - * @static - * @author Jason Lotito - */ - function getTextColor($color, $light = '#FFFFFF', $dark = '#000000') - { - $color = Image_Color::_splitColor($color); - if ($color[1] > hexdec('66')) { - return $dark; - } else { - return $light; - } - } - - - /** - * Internal method to set the colors. - * - * @param string $col1 First color, either a name or hex value - * @param string $col2 Second color, either a name or hex value - * @return void - * @access private - * @author Jason Lotito - */ - function _setColors($col1, $col2) - { - if ($col1) { - $this->color1 = Image_Color::_splitColor($col1); - } - if ($col2) { - $this->color2 = Image_Color::_splitColor($col2); - } - } - - /** - * Given a color, properly split it up into a 3 element RGB array. - * - * @param string $color The color. - * @return array A three element RGB array. - * @access private - * @static - * @author Jason Lotito - */ - function _splitColor($color) - { - $color = str_replace('#', '', $color); - $c[] = hexdec(substr($color, 0, 2)); - $c[] = hexdec(substr($color, 2, 2)); - $c[] = hexdec(substr($color, 4, 2)); - return $c; - } - - /** - * This is deprecated. Use rgb2hex() instead. - * @access private - * @deprecated Function deprecated after 1.0.1 - * @see rgb2hex(). - */ - function _returnColor ( $color ) - { - return Image_Color::rgb2hex($color); - } - - /** - * Convert an RGB array to a hex string. - * - * @param array $color 3 element RGB array. - * @return string Hex color string. - * @access public - * @static - * @author Jason Lotito - * @see hex2rgb() - */ - function rgb2hex($color) - { - return sprintf('%02X%02X%02X',$color[0],$color[1],$color[2]); - } - - /** - * Convert a hex color string into an RGB array. An extra fourth element - * will be returned with the original hex value. - * - * @param string $hex Hex color string. - * @return array RGB color array with an extra 'hex' element containing - * the original hex string. - * @access public - * @static - * @author Jason Lotito - * @see rgb2hex() - */ - function hex2rgb($hex) - { - $return = Image_Color::_splitColor($hex); - $return['hex'] = $hex; - return $return; - } - - /** - * Convert an HSV (Hue, Saturation, Brightness) value to RGB. - * - * @param integer $h Hue - * @param integer $s Saturation - * @param integer $v Brightness - * @return array RGB array. - * @access public - * @static - * @author Jason Lotito - * @uses hsv2hex() to convert the HSV value to Hex. - * @uses hex2rgb() to convert the Hex value to RGB. - */ - function hsv2rgb($h, $s, $v) - { - return Image_Color::hex2rgb(Image_Color::hsv2hex($h, $s, $v)); - } - - /** - * Convert HSV (Hue, Saturation, Brightness) to a hex color string. - * - * Originally written by Jurgen Schwietering. Integrated into the class by - * Jason Lotito. - * - * @param integer $h Hue - * @param integer $s Saturation - * @param integer $v Brightness - * @return string The hex string. - * @access public - * @static - * @author Jurgen Schwietering - * @uses rgb2hex() to convert the return value to a hex string. - */ - function hsv2hex($h, $s, $v) - { - $s /= 256.0; - $v /= 256.0; - if ($s == 0.0) { - $r = $g = $b = $v; - return ''; - } else { - $h = $h / 256.0 * 6.0; - $i = floor($h); - $f = $h - $i; - - $v *= 256.0; - $p = (integer)($v * (1.0 - $s)); - $q = (integer)($v * (1.0 - $s * $f)); - $t = (integer)($v * (1.0 - $s * (1.0 - $f))); - switch($i) { - case 0: - $r = $v; - $g = $t; - $b = $p; - break; - - case 1: - $r = $q; - $g = $v; - $b = $p; - break; - - case 2: - $r = $p; - $g = $v; - $b = $t; - break; - - case 3: - $r = $p; - $g = $q; - $b = $v; - break; - - case 4: - $r = $t; - $g = $p; - $b = $v; - break; - - default: - $r = $v; - $g = $p; - $b = $q; - break; - } - } - return $this->rgb2hex(array($r, $g, $b)); - } - - /** - * Allocates a color in the given image. - * - * User defined color specifications get translated into an array of RGB - * values. - * - * @param resource $img Image handle - * @param string|array $color Name or hex string or an RGB array. - * @return resource Image color handle. - * @access public - * @static - * @uses ImageColorAllocate() to allocate the color. - * @uses color2RGB() to parse the color into RGB values. - */ - function allocateColor(&$img, $color) { - $color = Image_Color::color2RGB($color); - - return ImageColorAllocate($img, $color[0], $color[1], $color[2]); - } - - /** - * Convert a named or hex color string to an RGB array. If the color begins - * with the # character it will be treated as a hex value. Everything else - * will be treated as a named color. If the named color is not known, black - * will be returned. - * - * @param string $color - * @return array RGB color - * @access public - * @static - * @author Laurent Laville - * @uses hex2rgb() to convert colors begining with the # character. - * @uses namedColor2RGB() to convert everything not starting with a #. - */ - function color2RGB($color) - { - $c = array(); - - if ($color{0} == '#') { - $c = Image_Color::hex2rgb($color); - } else { - $c = Image_Color::namedColor2RGB($color); - } - - return $c; - } - - /** - * Convert a named color to an RGB array. If the color is unknown black - * is returned. - * - * @param string $color Case insensitive color name. - * @return array RGB color array. If the color was unknown, the result - * will be black. - * @access public - * @static - * @author Sebastian Bergmann - */ - function namedColor2RGB($color) - { - static $colornames; - - if (!isset($colornames)) { - $colornames = array( - 'aliceblue' => array(240, 248, 255), - 'antiquewhite' => array(250, 235, 215), - 'aqua' => array( 0, 255, 255), - 'aquamarine' => array(127, 255, 212), - 'azure' => array(240, 255, 255), - 'beige' => array(245, 245, 220), - 'bisque' => array(255, 228, 196), - 'black' => array( 0, 0, 0), - 'blanchedalmond' => array(255, 235, 205), - 'blue' => array( 0, 0, 255), - 'blueviolet' => array(138, 43, 226), - 'brown' => array(165, 42, 42), - 'burlywood' => array(222, 184, 135), - 'cadetblue' => array( 95, 158, 160), - 'chartreuse' => array(127, 255, 0), - 'chocolate' => array(210, 105, 30), - 'coral' => array(255, 127, 80), - 'cornflowerblue' => array(100, 149, 237), - 'cornsilk' => array(255, 248, 220), - 'crimson' => array(220, 20, 60), - 'cyan' => array( 0, 255, 255), - 'darkblue' => array( 0, 0, 13), - 'darkcyan' => array( 0, 139, 139), - 'darkgoldenrod' => array(184, 134, 11), - 'darkgray' => array(169, 169, 169), - 'darkgreen' => array( 0, 100, 0), - 'darkkhaki' => array(189, 183, 107), - 'darkmagenta' => array(139, 0, 139), - 'darkolivegreen' => array( 85, 107, 47), - 'darkorange' => array(255, 140, 0), - 'darkorchid' => array(153, 50, 204), - 'darkred' => array(139, 0, 0), - 'darksalmon' => array(233, 150, 122), - 'darkseagreen' => array(143, 188, 143), - 'darkslateblue' => array( 72, 61, 139), - 'darkslategray' => array( 47, 79, 79), - 'darkturquoise' => array( 0, 206, 209), - 'darkviolet' => array(148, 0, 211), - 'deeppink' => array(255, 20, 147), - 'deepskyblue' => array( 0, 191, 255), - 'dimgray' => array(105, 105, 105), - 'dodgerblue' => array( 30, 144, 255), - 'firebrick' => array(178, 34, 34), - 'floralwhite' => array(255, 250, 240), - 'forestgreen' => array( 34, 139, 34), - 'fuchsia' => array(255, 0, 255), - 'gainsboro' => array(220, 220, 220), - 'ghostwhite' => array(248, 248, 255), - 'gold' => array(255, 215, 0), - 'goldenrod' => array(218, 165, 32), - 'gray' => array(128, 128, 128), - 'green' => array( 0, 128, 0), - 'greenyellow' => array(173, 255, 47), - 'honeydew' => array(240, 255, 240), - 'hotpink' => array(255, 105, 180), - 'indianred' => array(205, 92, 92), - 'indigo' => array(75, 0, 130), - 'ivory' => array(255, 255, 240), - 'khaki' => array(240, 230, 140), - 'lavender' => array(230, 230, 250), - 'lavenderblush' => array(255, 240, 245), - 'lawngreen' => array(124, 252, 0), - 'lemonchiffon' => array(255, 250, 205), - 'lightblue' => array(173, 216, 230), - 'lightcoral' => array(240, 128, 128), - 'lightcyan' => array(224, 255, 255), - 'lightgoldenrodyellow' => array(250, 250, 210), - 'lightgreen' => array(144, 238, 144), - 'lightgrey' => array(211, 211, 211), - 'lightpink' => array(255, 182, 193), - 'lightsalmon' => array(255, 160, 122), - 'lightseagreen' => array( 32, 178, 170), - 'lightskyblue' => array(135, 206, 250), - 'lightslategray' => array(119, 136, 153), - 'lightsteelblue' => array(176, 196, 222), - 'lightyellow' => array(255, 255, 224), - 'lime' => array( 0, 255, 0), - 'limegreen' => array( 50, 205, 50), - 'linen' => array(250, 240, 230), - 'magenta' => array(255, 0, 255), - 'maroon' => array(128, 0, 0), - 'mediumaquamarine' => array(102, 205, 170), - 'mediumblue' => array( 0, 0, 205), - 'mediumorchid' => array(186, 85, 211), - 'mediumpurple' => array(147, 112, 219), - 'mediumseagreen' => array( 60, 179, 113), - 'mediumslateblue' => array(123, 104, 238), - 'mediumspringgreen' => array( 0, 250, 154), - 'mediumturquoise' => array(72, 209, 204), - 'mediumvioletred' => array(199, 21, 133), - 'midnightblue' => array( 25, 25, 112), - 'mintcream' => array(245, 255, 250), - 'mistyrose' => array(255, 228, 225), - 'moccasin' => array(255, 228, 181), - 'navajowhite' => array(255, 222, 173), - 'navy' => array( 0, 0, 128), - 'oldlace' => array(253, 245, 230), - 'olive' => array(128, 128, 0), - 'olivedrab' => array(107, 142, 35), - 'orange' => array(255, 165, 0), - 'orangered' => array(255, 69, 0), - 'orchid' => array(218, 112, 214), - 'palegoldenrod' => array(238, 232, 170), - 'palegreen' => array(152, 251, 152), - 'paleturquoise' => array(175, 238, 238), - 'palevioletred' => array(219, 112, 147), - 'papayawhip' => array(255, 239, 213), - 'peachpuff' => array(255, 218, 185), - 'peru' => array(205, 133, 63), - 'pink' => array(255, 192, 203), - 'plum' => array(221, 160, 221), - 'powderblue' => array(176, 224, 230), - 'purple' => array(128, 0, 128), - 'red' => array(255, 0, 0), - 'rosybrown' => array(188, 143, 143), - 'royalblue' => array( 65, 105, 225), - 'saddlebrown' => array(139, 69, 19), - 'salmon' => array(250, 128, 114), - 'sandybrown' => array(244, 164, 96), - 'seagreen' => array( 46, 139, 87), - 'seashell' => array(255, 245, 238), - 'sienna' => array(160, 82, 45), - 'silver' => array(192, 192, 192), - 'skyblue' => array(135, 206, 235), - 'slateblue' => array(106, 90, 205), - 'slategray' => array(112, 128, 144), - 'snow' => array(255, 250, 250), - 'springgreen' => array( 0, 255, 127), - 'steelblue' => array( 70, 130, 180), - 'tan' => array(210, 180, 140), - 'teal' => array( 0, 128, 128), - 'thistle' => array(216, 191, 216), - 'tomato' => array(255, 99, 71), - 'turquoise' => array( 64, 224, 208), - 'violet' => array(238, 130, 238), - 'wheat' => array(245, 222, 179), - 'white' => array(255, 255, 255), - 'whitesmoke' => array(245, 245, 245), - 'yellow' => array(255, 255, 0), - 'yellowgreen' => array(154, 205, 50) - ); - } - - $color = strtolower($color); - - if (isset($colornames[$color])) { - return $colornames[$color]; - } else { - return array(0, 0, 0); - } - } - - /** - * Convert an RGB percentage string into an RGB array. - * - * @param string $color Percentage color string like "50%,20%,100%". - * @return array RGB color array. - * @access public - * @static - */ - function percentageColor2RGB($color) - { - // remove spaces - $color = str_replace(' ', '', $color); - // remove the percent signs - $color = str_replace('%', '', $color); - // split the string by commas - $color = explode(',', $color); - - $ret = array(); - foreach ($color as $k => $v) { - // range checks - if ($v <= 0) { - $ret[$k] = 0; - } else if ($v <= 100) { - // add 0.5 then cast to an integer to round the value. - $ret[$k] = (integer) ((2.55 * $v) + 0.5); - } else { - $ret[$k] = 255; - } - } - - return $ret; - } -} - -// For Array Walk -// {{{ -/** - * Function for array_walk() to round colors to the closest web safe value. - * - * @param integer $color One channel of an RGB color. - * @return integer The websafe equivalent of the color channel. - * @author Jason Lotito - * @author Andrew Morton - * @access private - * @static - */ -function _makeWebSafe(&$color) -{ - if ($color < 0x1a) { - $color = 0x00; - } else if ($color < 0x4d) { - $color = 0x33; - } else if ($color < 0x80) { - $color = 0x66; - } else if ($color < 0xB3) { - $color = 0x99; - } else if ($color < 0xE6) { - $color = 0xCC; - } else { - $color = 0xFF; - } - return $color; -} -// }}} - -?> + } + } + } + + /** + * Determine if a light or dark text color would be more readable on a + * background of a given color. This is determined by the G(reen) value of + * RGB. You can change the dark and the light colors from their default + * black and white. + * + * @param string $color The hex color to analyze + * @param string $light The light color value to return if we should + * have light text. + * @param string $dark The dark color value to return if we should have + * dark text. + * @return string The light or dark value which would make the text most + * readable. + * @access public + * @static + * @author Jason Lotito + */ + function getTextColor($color, $light = '#FFFFFF', $dark = '#000000') + { + $color = Image_Color::_splitColor($color); + if ($color[1] > hexdec('66')) { + return $dark; + } else { + return $light; + } + } + + + /** + * Internal method to set the colors. + * + * @param string $col1 First color, either a name or hex value + * @param string $col2 Second color, either a name or hex value + * @return void + * @access private + * @author Jason Lotito + */ + function _setColors($col1, $col2) + { + if ($col1) { + $this->color1 = Image_Color::_splitColor($col1); + } + if ($col2) { + $this->color2 = Image_Color::_splitColor($col2); + } + } + + /** + * Given a color, properly split it up into a 3 element RGB array. + * + * @param string $color The color. + * @return array A three element RGB array. + * @access private + * @static + * @author Jason Lotito + */ + function _splitColor($color) + { + $color = str_replace('#', '', $color); + $c[] = hexdec(substr($color, 0, 2)); + $c[] = hexdec(substr($color, 2, 2)); + $c[] = hexdec(substr($color, 4, 2)); + return $c; + } + + /** + * This is deprecated. Use rgb2hex() instead. + * @access private + * @deprecated Function deprecated after 1.0.1 + * @see rgb2hex(). + */ + function _returnColor ( $color ) + { + return Image_Color::rgb2hex($color); + } + + /** + * Convert an RGB array to a hex string. + * + * @param array $color 3 element RGB array. + * @return string Hex color string. + * @access public + * @static + * @author Jason Lotito + * @see hex2rgb() + */ + function rgb2hex($color) + { + return sprintf('%02X%02X%02X',$color[0],$color[1],$color[2]); + } + + /** + * Convert a hex color string into an RGB array. An extra fourth element + * will be returned with the original hex value. + * + * @param string $hex Hex color string. + * @return array RGB color array with an extra 'hex' element containing + * the original hex string. + * @access public + * @static + * @author Jason Lotito + * @see rgb2hex() + */ + function hex2rgb($hex) + { + $return = Image_Color::_splitColor($hex); + $return['hex'] = $hex; + return $return; + } + + /** + * Convert an HSV (Hue, Saturation, Brightness) value to RGB. + * + * @param integer $h Hue + * @param integer $s Saturation + * @param integer $v Brightness + * @return array RGB array. + * @access public + * @static + * @author Jason Lotito + * @uses hsv2hex() to convert the HSV value to Hex. + * @uses hex2rgb() to convert the Hex value to RGB. + */ + function hsv2rgb($h, $s, $v) + { + return Image_Color::hex2rgb(Image_Color::hsv2hex($h, $s, $v)); + } + + /** + * Convert HSV (Hue, Saturation, Brightness) to a hex color string. + * + * Originally written by Jurgen Schwietering. Integrated into the class by + * Jason Lotito. + * + * @param integer $h Hue + * @param integer $s Saturation + * @param integer $v Brightness + * @return string The hex string. + * @access public + * @static + * @author Jurgen Schwietering + * @uses rgb2hex() to convert the return value to a hex string. + */ + function hsv2hex($h, $s, $v) + { + $s /= 256.0; + $v /= 256.0; + if ($s == 0.0) { + $r = $g = $b = $v; + return ''; + } else { + $h = $h / 256.0 * 6.0; + $i = floor($h); + $f = $h - $i; + + $v *= 256.0; + $p = (integer)($v * (1.0 - $s)); + $q = (integer)($v * (1.0 - $s * $f)); + $t = (integer)($v * (1.0 - $s * (1.0 - $f))); + switch($i) { + case 0: + $r = $v; + $g = $t; + $b = $p; + break; + + case 1: + $r = $q; + $g = $v; + $b = $p; + break; + + case 2: + $r = $p; + $g = $v; + $b = $t; + break; + + case 3: + $r = $p; + $g = $q; + $b = $v; + break; + + case 4: + $r = $t; + $g = $p; + $b = $v; + break; + + default: + $r = $v; + $g = $p; + $b = $q; + break; + } + } + return Image_Color::rgb2hex(array($r, $g, $b)); + } + + /** + * Allocates a color in the given image. + * + * User defined color specifications get translated into an array of RGB + * values. + * + * @param resource $img Image handle + * @param string|array $color Name or hex string or an RGB array. + * @return resource Image color handle. + * @access public + * @static + * @uses ImageColorAllocate() to allocate the color. + * @uses color2RGB() to parse the color into RGB values. + */ + function allocateColor(&$img, $color) { + $color = Image_Color::color2RGB($color); + + return ImageColorAllocate($img, $color[0], $color[1], $color[2]); + } + + /** + * Convert a named or hex color string to an RGB array. If the color begins + * with the # character it will be treated as a hex value. Everything else + * will be treated as a named color. If the named color is not known, black + * will be returned. + * + * @param string $color + * @return array RGB color + * @access public + * @static + * @author Laurent Laville + * @uses hex2rgb() to convert colors begining with the # character. + * @uses namedColor2RGB() to convert everything not starting with a #. + */ + function color2RGB($color) + { + $c = array(); + + if ($color{0} == '#') { + $c = Image_Color::hex2rgb($color); + } else { + $c = Image_Color::namedColor2RGB($color); + } + + return $c; + } + + /** + * Convert a named color to an RGB array. If the color is unknown black + * is returned. + * + * @param string $color Case insensitive color name. + * @return array RGB color array. If the color was unknown, the result + * will be black. + * @access public + * @static + * @author Sebastian Bergmann + */ + function namedColor2RGB($color) + { + static $colornames; + + if (!isset($colornames)) { + $colornames = array( + 'aliceblue' => array(240, 248, 255), + 'antiquewhite' => array(250, 235, 215), + 'aqua' => array( 0, 255, 255), + 'aquamarine' => array(127, 255, 212), + 'azure' => array(240, 255, 255), + 'beige' => array(245, 245, 220), + 'bisque' => array(255, 228, 196), + 'black' => array( 0, 0, 0), + 'blanchedalmond' => array(255, 235, 205), + 'blue' => array( 0, 0, 255), + 'blueviolet' => array(138, 43, 226), + 'brown' => array(165, 42, 42), + 'burlywood' => array(222, 184, 135), + 'cadetblue' => array( 95, 158, 160), + 'chartreuse' => array(127, 255, 0), + 'chocolate' => array(210, 105, 30), + 'coral' => array(255, 127, 80), + 'cornflowerblue' => array(100, 149, 237), + 'cornsilk' => array(255, 248, 220), + 'crimson' => array(220, 20, 60), + 'cyan' => array( 0, 255, 255), + 'darkblue' => array( 0, 0, 13), + 'darkcyan' => array( 0, 139, 139), + 'darkgoldenrod' => array(184, 134, 11), + 'darkgray' => array(169, 169, 169), + 'darkgreen' => array( 0, 100, 0), + 'darkkhaki' => array(189, 183, 107), + 'darkmagenta' => array(139, 0, 139), + 'darkolivegreen' => array( 85, 107, 47), + 'darkorange' => array(255, 140, 0), + 'darkorchid' => array(153, 50, 204), + 'darkred' => array(139, 0, 0), + 'darksalmon' => array(233, 150, 122), + 'darkseagreen' => array(143, 188, 143), + 'darkslateblue' => array( 72, 61, 139), + 'darkslategray' => array( 47, 79, 79), + 'darkturquoise' => array( 0, 206, 209), + 'darkviolet' => array(148, 0, 211), + 'deeppink' => array(255, 20, 147), + 'deepskyblue' => array( 0, 191, 255), + 'dimgray' => array(105, 105, 105), + 'dodgerblue' => array( 30, 144, 255), + 'firebrick' => array(178, 34, 34), + 'floralwhite' => array(255, 250, 240), + 'forestgreen' => array( 34, 139, 34), + 'fuchsia' => array(255, 0, 255), + 'gainsboro' => array(220, 220, 220), + 'ghostwhite' => array(248, 248, 255), + 'gold' => array(255, 215, 0), + 'goldenrod' => array(218, 165, 32), + 'gray' => array(128, 128, 128), + 'green' => array( 0, 128, 0), + 'greenyellow' => array(173, 255, 47), + 'honeydew' => array(240, 255, 240), + 'hotpink' => array(255, 105, 180), + 'indianred' => array(205, 92, 92), + 'indigo' => array(75, 0, 130), + 'ivory' => array(255, 255, 240), + 'khaki' => array(240, 230, 140), + 'lavender' => array(230, 230, 250), + 'lavenderblush' => array(255, 240, 245), + 'lawngreen' => array(124, 252, 0), + 'lemonchiffon' => array(255, 250, 205), + 'lightblue' => array(173, 216, 230), + 'lightcoral' => array(240, 128, 128), + 'lightcyan' => array(224, 255, 255), + 'lightgoldenrodyellow' => array(250, 250, 210), + 'lightgreen' => array(144, 238, 144), + 'lightgrey' => array(211, 211, 211), + 'lightpink' => array(255, 182, 193), + 'lightsalmon' => array(255, 160, 122), + 'lightseagreen' => array( 32, 178, 170), + 'lightskyblue' => array(135, 206, 250), + 'lightslategray' => array(119, 136, 153), + 'lightsteelblue' => array(176, 196, 222), + 'lightyellow' => array(255, 255, 224), + 'lime' => array( 0, 255, 0), + 'limegreen' => array( 50, 205, 50), + 'linen' => array(250, 240, 230), + 'magenta' => array(255, 0, 255), + 'maroon' => array(128, 0, 0), + 'mediumaquamarine' => array(102, 205, 170), + 'mediumblue' => array( 0, 0, 205), + 'mediumorchid' => array(186, 85, 211), + 'mediumpurple' => array(147, 112, 219), + 'mediumseagreen' => array( 60, 179, 113), + 'mediumslateblue' => array(123, 104, 238), + 'mediumspringgreen' => array( 0, 250, 154), + 'mediumturquoise' => array(72, 209, 204), + 'mediumvioletred' => array(199, 21, 133), + 'midnightblue' => array( 25, 25, 112), + 'mintcream' => array(245, 255, 250), + 'mistyrose' => array(255, 228, 225), + 'moccasin' => array(255, 228, 181), + 'navajowhite' => array(255, 222, 173), + 'navy' => array( 0, 0, 128), + 'oldlace' => array(253, 245, 230), + 'olive' => array(128, 128, 0), + 'olivedrab' => array(107, 142, 35), + 'orange' => array(255, 165, 0), + 'orangered' => array(255, 69, 0), + 'orchid' => array(218, 112, 214), + 'palegoldenrod' => array(238, 232, 170), + 'palegreen' => array(152, 251, 152), + 'paleturquoise' => array(175, 238, 238), + 'palevioletred' => array(219, 112, 147), + 'papayawhip' => array(255, 239, 213), + 'peachpuff' => array(255, 218, 185), + 'peru' => array(205, 133, 63), + 'pink' => array(255, 192, 203), + 'plum' => array(221, 160, 221), + 'powderblue' => array(176, 224, 230), + 'purple' => array(128, 0, 128), + 'red' => array(255, 0, 0), + 'rosybrown' => array(188, 143, 143), + 'royalblue' => array( 65, 105, 225), + 'saddlebrown' => array(139, 69, 19), + 'salmon' => array(250, 128, 114), + 'sandybrown' => array(244, 164, 96), + 'seagreen' => array( 46, 139, 87), + 'seashell' => array(255, 245, 238), + 'sienna' => array(160, 82, 45), + 'silver' => array(192, 192, 192), + 'skyblue' => array(135, 206, 235), + 'slateblue' => array(106, 90, 205), + 'slategray' => array(112, 128, 144), + 'snow' => array(255, 250, 250), + 'springgreen' => array( 0, 255, 127), + 'steelblue' => array( 70, 130, 180), + 'tan' => array(210, 180, 140), + 'teal' => array( 0, 128, 128), + 'thistle' => array(216, 191, 216), + 'tomato' => array(255, 99, 71), + 'turquoise' => array( 64, 224, 208), + 'violet' => array(238, 130, 238), + 'wheat' => array(245, 222, 179), + 'white' => array(255, 255, 255), + 'whitesmoke' => array(245, 245, 245), + 'yellow' => array(255, 255, 0), + 'yellowgreen' => array(154, 205, 50) + ); + } + + $color = strtolower($color); + + if (isset($colornames[$color])) { + return $colornames[$color]; + } else { + return array(0, 0, 0); + } + } + + /** + * Convert an RGB percentage string into an RGB array. + * + * @param string $color Percentage color string like "50%,20%,100%". + * @return array RGB color array. + * @access public + * @static + */ + function percentageColor2RGB($color) + { + // remove spaces + $color = str_replace(' ', '', $color); + // remove the percent signs + $color = str_replace('%', '', $color); + // split the string by commas + $color = explode(',', $color); + + $ret = array(); + foreach ($color as $k => $v) { + // range checks + if ($v <= 0) { + $ret[$k] = 0; + } else if ($v <= 100) { + // add 0.5 then cast to an integer to round the value. + $ret[$k] = (integer) ((2.55 * $v) + 0.5); + } else { + $ret[$k] = 255; + } + } + + return $ret; + } +} + +// For Array Walk +// {{{ +/** + * Function for array_walk() to round colors to the closest web safe value. + * + * @param integer $color One channel of an RGB color. + * @return integer The websafe equivalent of the color channel. + * @author Jason Lotito + * @author Andrew Morton + * @access private + * @static + */ +function _makeWebSafe(&$color) +{ + if ($color < 0x1a) { + $color = 0x00; + } else if ($color < 0x4d) { + $color = 0x33; + } else if ($color < 0x80) { + $color = 0x66; + } else if ($color < 0xB3) { + $color = 0x99; + } else if ($color < 0xE6) { + $color = 0xCC; + } else { + $color = 0xFF; + } + return $color; +} +// }}} + +?> diff --git a/includes/pear/Image/Graph.php b/includes/pear/Image/Graph.php index d352382a..7fbdd695 100644 --- a/includes/pear/Image/Graph.php +++ b/includes/pear/Image/Graph.php @@ -1,853 +1,851 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Graph.php,v 1.57 2005/10/05 20:51:22 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - - -/** - * Include PEAR.php - */ -require_once 'PEAR.php'; - -/** - * Include file Image/Graph/Element.php - */ -require_once 'Image/Graph/Element.php'; - -/** - * Include file Image/Graph/Constants.php - */ -require_once 'Image/Graph/Constants.php'; - -/** - * Main class for the graph creation. - * - * This is the main class, it manages the canvas and performs the final output - * by sequentialy making the elements output their results. The final output is - * handled using the {@link Image_Canvas} classes which makes it possible - * to use different engines (fx GD, PDFlib, libswf, etc) for output to several - * formats with a non-intersecting API. - * - * This class also handles coordinates and the correct managment of setting the - * correct coordinates on child elements. - * - * @category Images - * @package Image_Graph - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph extends Image_Graph_Element -{ - - /** - * Show generation time on graph - * @var bool - * @access private - */ - var $_showTime = false; - - /** - * Display errors on the canvas - * @var boolean - * @access private - */ - var $_displayErrors = false; - - /** - * Image_Graph [Constructor]. - * - * If passing the 3 parameters they are defined as follows:' - * - * Fx.: - * - * $Graph =& new Image_Graph(400, 300); - * - * or using the factory method: - * - * $Graph =& Image_Graph::factory('graph', array(400, 300)); - * - * This causes a 'png' canvas to be created by default. - * - * Otherwise use a single parameter either as an associated array or passing - * the canvas along to the constructor: - * - * 1) Create a new canvas with the following parameters: - * - * 'canvas' - The canvas type, can be any of 'gd', 'jpg', 'png' or 'svg' - * (more to come) - if omitted the default is 'gd' - * - * 'width' - The width of the graph - * - * 'height' - The height of the graph - * - * An example of this usage: - * - * $Graph =& Image_Graph::factory('graph', array(array('width' => 400, - * 'height' => 300, 'canvas' => 'jpg'))); - * - * NB! In thïs case remember the "double" array (see {@link Image_Graph:: - * factory()}) - * - * 2) Use the canvas specified, pass a valid Image_Canvas as - * parameter. Remember to pass by reference, i. e. &$canvas, fx.: - * - * $Graph =& new Image_Graph($Canvas); - * - * or using the factory method: - * - * $Graph =& Image_Graph::factory('graph', $Canvas)); - * - * @param mixed $params The width of the graph, an indexed array - * describing a new canvas or a valid {@link Image_Canvas} object - * @param int $height The height of the graph in pixels - * @param bool $createTransparent Specifies whether the graph should be - * created with a transparent background (fx for PNG's - note: transparent - * PNG's is not supported by Internet Explorer!) - */ - function Image_Graph($params, $height = false, $createTransparent = false) - { - parent::Image_Graph_Element(); - - $this->setFont(Image_Graph::factory('Image_Graph_Font')); - - if (defined('IMAGE_GRAPH_DEFAULT_CANVAS_TYPE')) { - $canvasType = IMAGE_GRAPH_DEFAULT_CANVAS_TYPE; - } else { - $canvasType = 'png'; // use GD as default, if nothing else is specified - } - - if (is_array($params)) { - if (isset($params['canvas'])) { - $canvasType = $params['canvas']; - } - - $width = 0; - $height = 0; - - if (isset($params['width'])) { - $width = $params['width']; - } - - if (isset($params['height'])) { - $height = $params['height']; - } - } elseif (is_a($params, 'Image_Canvas')) { - $this->_canvas =& $params; - $width = $this->_canvas->getWidth(); - $height = $this->_canvas->getHeight(); - } - - if (is_int($params)) { - $width = $params; - } - - if ($this->_canvas == null) { - include_once 'Image/Canvas.php'; - $this->_canvas =& - Image_Canvas::factory( - $canvasType, - array('width' => $width, 'height' => $height) - ); - } - - $this->_setCoords(0, 0, $width - 1, $height - 1); - } - - /** - * Gets the canvas for this graph. - * - * The canvas is set by either passing it to the constructor {@link - * Image_Graph::ImageGraph()} or using the {@link Image_Graph::setCanvas()} - * method. - * - * @return Image_Canvas The canvas used by this graph - * @access private - * @since 0.3.0dev2 - */ - function &_getCanvas() - { - return $this->_canvas; - } - - /** - * Sets the canvas for this graph. - * - * Calling this method makes this graph use the newly specified canvas for - * handling output. This method should be called whenever multiple - * 'outputs' are required. Invoke this method after calls to {@link - * Image_Graph:: done()} has been performed, to switch canvass. - * - * @param Image_Canvas $canvas The new canvas - * @return Image_Canvas The new canvas - * @since 0.3.0dev2 - */ - function &setCanvas(&$canvas) - { - if (!is_a($this->_canvas, 'Image_Canvas')) { - return $this->_error('The canvas introduced is not an Image_Canvas object'); - } - - $this->_canvas =& $canvas; - $this->_setCoords( - 0, - 0, - $this->_canvas->getWidth() - 1, - $this->_canvas->getHeight() - 1 - ); - return $this->_canvas; - } - - /** - * Gets a very precise timestamp - * - * @return The number of seconds to a lot of decimals - * @access private - */ - function _getMicroTime() - { - list($usec, $sec) = explode(' ', microtime()); - return ((float)$usec + (float)$sec); - } - - /** - * Gets the width of this graph. - * - * The width is returned as 'defined' by the canvas. - * - * @return int the width of this graph - */ - function width() - { - return $this->_canvas->getWidth(); - } - - /** - * Gets the height of this graph. - * - * The height is returned as 'defined' by the canvas. - * - * @return int the height of this graph - */ - function height() - { - return $this->_canvas->getHeight(); - } - - /** - * Enables displaying of errors on the output. - * - * Use this method to enforce errors to be displayed on the output. Calling - * this method makes PHP uses this graphs error handler as default {@link - * Image_Graph::_default_error_handler()}. - */ - function displayErrors() - { - $this->_displayErrors = true; - set_error_handler(array(&$this, '_default_error_handler')); - } - - /** - * Sets the log method for this graph. - * - * Use this method to enable logging. This causes any errors caught - * by either the error handler {@see Image_Graph::displayErrors()} - * or explicitly by calling {@link Image_Graph_Common::_error()} be - * logged using the specified logging method. - * - * If a filename is specified as log method, a Log object is created (using - * the 'file' handler), with a handle of 'Image_Graph Error Log'. - * - * Logging requires {@link Log}. - * - * @param mixed $log The log method, either a Log object or filename to log - * to - * @since 0.3.0dev2 - */ - function setLog($log) - { - } - - /** - * Factory method to create Image_Graph objects. - * - * Used for 'lazy including', i.e. loading only what is necessary, when it - * is necessary. If only one parameter is required for the constructor of - * the class simply pass this parameter as the $params parameter, unless the - * parameter is an array or a reference to a value, in that case you must - * 'enclose' the parameter in an array. Similar if the constructor takes - * more than one parameter specify the parameters in an array, i.e - * - * Image_Graph::factory('MyClass', array($param1, $param2, &$param3)); - * - * Variables that need to be passed by reference *must* have the & - * before the variable, i.e: - * - * Image_Graph::factory('line', &$Dataset); - * - * or - * - * Image_graph::factory('bar', array(array(&$Dataset1, &$Dataset2), - * 'stacked')); - * - * Class name can be either of the following: - * - * 1 The 'real' Image_Graph class name, i.e. Image_Graph_Plotarea or - * Image_Graph_Plot_Line - * - * 2 Short class name (leave out Image_Graph) and retain case, i.e. - * Plotarea, Plot_Line *not* plot_line - * - * 3 Class name 'alias', the following are supported: - * - * 'graph' = Image_Graph - * - * 'plotarea' = Image_Graph_Plotarea - * - * 'line' = Image_Graph_Plot_Line - * - * 'area' = Image_Graph_Plot_Area - * - * 'bar' = Image_Graph_Plot_Bar - * - * 'pie' = Image_Graph_Plot_Pie - * - * 'radar' = Image_Graph_Plot_Radar - * - * 'step' = Image_Graph_Plot_Step - * - * 'impulse' = Image_Graph_Plot_Impulse - * - * 'dot' or 'scatter' = Image_Graph_Plot_Dot - * - * 'smooth_line' = Image_Graph_Plot_Smoothed_Line - * - * 'smooth_area' = Image_Graph_Plot_Smoothed_Area - - * 'dataset' = Image_Graph_Dataset_Trivial - * - * 'random' = Image_Graph_Dataset_Random - * - * 'function' = Image_Graph_Dataset_Function - * - * 'vector' = Image_Graph_Dataset_VectorFunction - * - * 'category' = Image_Graph_Axis_Category - * - * 'axis' = Image_Graph_Axis - * - * 'axis_log' = Image_Graph_Axis_Logarithmic - * - * 'title' = Image_Graph_Title - * - * 'line_grid' = Image_Graph_Grid_Lines - * - * 'bar_grid' = Image_Graph_Grid_Bars - * - * 'polar_grid' = Image_Graph_Grid_Polar - * - * 'legend' = Image_Graph_Legend - * - * 'font' = Image_Graph_Font - * - * 'ttf_font' = Image_Graph_Font - * - * 'Image_Graph_Font_TTF' = Image_Graph_Font (to maintain BC with Image_Graph_Font_TTF) - * - * 'gradient' = Image_Graph_Fill_Gradient - * - * 'icon_marker' = Image_Graph_Marker_Icon - * - * 'value_marker' = Image_Graph_Marker_Value - * - * @param string $class The class for the new object - * @param mixed $params The paramaters to pass to the constructor - * @return object A new object for the class - * @static - */ - function &factory($class, $params = null) - { - static $Image_Graph_classAliases = array( - 'graph' => 'Image_Graph', - 'plotarea' => 'Image_Graph_Plotarea', - - 'line' => 'Image_Graph_Plot_Line', - 'area' => 'Image_Graph_Plot_Area', - 'bar' => 'Image_Graph_Plot_Bar', - 'smooth_line' => 'Image_Graph_Plot_Smoothed_Line', - 'smooth_area' => 'Image_Graph_Plot_Smoothed_Area', - 'pie' => 'Image_Graph_Plot_Pie', - 'radar' => 'Image_Graph_Plot_Radar', - 'step' => 'Image_Graph_Plot_Step', - 'impulse' => 'Image_Graph_Plot_Impulse', - 'dot' => 'Image_Graph_Plot_Dot', - 'scatter' => 'Image_Graph_Plot_Dot', - - 'dataset' => 'Image_Graph_Dataset_Trivial', - 'random' => 'Image_Graph_Dataset_Random', - 'function' => 'Image_Graph_Dataset_Function', - 'vector' => 'Image_Graph_Dataset_VectorFunction', - - 'category' => 'Image_Graph_Axis_Category', - 'axis' => 'Image_Graph_Axis', - 'axis_log' => 'Image_Graph_Axis_Logarithmic', - - 'title' => 'Image_Graph_Title', - - 'line_grid' => 'Image_Graph_Grid_Lines', - 'bar_grid' => 'Image_Graph_Grid_Bars', - 'polar_grid' => 'Image_Graph_Grid_Polar', - - 'legend' => 'Image_Graph_Legend', - 'font' => 'Image_Graph_Font', - 'ttf_font' => 'Image_Graph_Font', - 'Image_Graph_Font_TTF' => 'Image_Graph_Font', // BC with Image_Graph_Font_TTF - 'gradient' => 'Image_Graph_Fill_Gradient', - - 'icon_marker' => 'Image_Graph_Marker_Icon', - 'value_marker' => 'Image_Graph_Marker_Value' - ); - - if (substr($class, 0, 11) != 'Image_Graph') { - if (isset($Image_Graph_classAliases[$class])) { - $class = $Image_Graph_classAliases[$class]; - } else { - $class = 'Image_Graph_' . $class; - } - } - - include_once str_replace('_', '/', $class) . '.php'; - - $obj = null; - - if (is_array($params)) { - switch (count($params)) { - case 1: - $obj =& new $class( - $params[0] - ); - break; - - case 2: - $obj =& new $class( - $params[0], - $params[1] - ); - break; - - case 3: - $obj =& new $class( - $params[0], - $params[1], - $params[2] - ); - break; - - case 4: - $obj =& new $class( - $params[0], - $params[1], - $params[2], - $params[3] - ); - break; - - case 5: - $obj =& new $class( - $params[0], - $params[1], - $params[2], - $params[3], - $params[4] - ); - break; - - case 6: - $obj =& new $class( - $params[0], - $params[1], - $params[2], - $params[3], - $params[4], - $params[5] - ); - break; - - case 7: - $obj =& new $class( - $params[0], - $params[1], - $params[2], - $params[3], - $params[4], - $params[5], - $params[6] - ); - break; - - case 8: - $obj =& new $class( - $params[0], - $params[1], - $params[2], - $params[3], - $params[4], - $params[5], - $params[6], - $params[7] - ); - break; - - case 9: - $obj =& new $class( - $params[0], - $params[1], - $params[2], - $params[3], - $params[4], - $params[5], - $params[6], - $params[7], - $params[8] - ); - break; - - case 10: - $obj =& new $class( - $params[0], - $params[1], - $params[2], - $params[3], - $params[4], - $params[5], - $params[6], - $params[7], - $params[8], - $params[9] - ); - break; - - default: - $obj =& new $class(); - break; - - } - } else { - if ($params == null) { - $obj =& new $class(); - } else { - $obj =& new $class($params); - } - } - return $obj; - } - - /** - * Factory method to create layouts. - * - * This method is used for easy creation, since using {@link Image_Graph:: - * factory()} does not work with passing newly created objects from - * Image_Graph::factory() as reference, this is something that is - * fortunately fixed in PHP5. Also used for 'lazy including', i.e. loading - * only what is necessary, when it is necessary. - * - * Use {@link Image_Graph::horizontal()} or {@link Image_Graph::vertical()} - * instead for easier access. - * - * @param mixed $layout The type of layout, can be either 'Vertical' - * or 'Horizontal' (case sensitive) - * @param Image_Graph_Element $part1 The 1st part of the layout - * @param Image_Graph_Element $part2 The 2nd part of the layout - * @param int $percentage The percentage of the layout to split at - * @return Image_Graph_Layout The newly created layout object - * @static - */ - function &layoutFactory($layout, &$part1, &$part2, $percentage = 50) - { - if (($layout != 'Vertical') && ($layout != 'Horizontal')) { - return $this->_error('Layouts must be either \'Horizontal\' or \'Vertical\''); - } - - if (!(is_a($part1, 'Image_Graph_Element'))) { - return $this->_error('Part 1 is not a valid Image_Graph element'); - } - - if (!(is_a($part2, 'Image_Graph_Element'))) { - return $this->_error('Part 2 is not a valid Image_Graph element'); - } - - if ((!is_numeric($percentage)) || ($percentage < 0) || ($percentage > 100)) { - return $this->_error('Percentage has to be a number between 0 and 100'); - } - - include_once "Image/Graph/Layout/$layout.php"; - $class = "Image_Graph_Layout_$layout"; - $obj =& new $class($part1, $part2, $percentage); - return $obj; - } - - /** - * Factory method to create horizontal layout. - * - * See {@link Image_Graph::layoutFactory()} - * - * @param Image_Graph_Element $part1 The 1st (left) part of the layout - * @param Image_Graph_Element $part2 The 2nd (right) part of the layout - * @param int $percentage The percentage of the layout to split at - * (percentage of total height from the left side) - * @return Image_Graph_Layout The newly created layout object - * @static - */ - function &horizontal(&$part1, &$part2, $percentage = 50) - { - $obj =& Image_Graph::layoutFactory('Horizontal', $part1, $part2, $percentage); - return $obj; - } - - /** - * Factory method to create vertical layout. - * - * See {@link Image_Graph::layoutFactory()} - * - * @param Image_Graph_Element $part1 The 1st (top) part of the layout - * @param Image_Graph_Element $part2 The 2nd (bottom) part of the layout - * @param int $percentage The percentage of the layout to split at - * (percentage of total width from the top edge) - * @return Image_Graph_Layout The newly created layout object - * @static - */ - function &vertical(&$part1, &$part2, $percentage = 50) - { - $obj =& Image_Graph::layoutFactory('Vertical', $part1, $part2, $percentage); - return $obj; - } - - /** - * The error handling routine set by set_error_handler(). - * - * This method is used internaly by Image_Graph and PHP as a proxy for {@link - * Image_Graph::_error()}. - * - * @param string $error_type The type of error being handled. - * @param string $error_msg The error message being handled. - * @param string $error_file The file in which the error occurred. - * @param integer $error_line The line in which the error occurred. - * @param string $error_context The context in which the error occurred. - * @access private - */ - function _default_error_handler($error_type, $error_msg, $error_file, $error_line, $error_context) - { - switch( $error_type ) { - case E_ERROR: - $level = 'error'; - break; - - case E_USER_ERROR: - $level = 'user error'; - break; - - case E_WARNING: - $level = 'warning'; - break; - - case E_USER_WARNING: - $level = 'user warning'; - break; - - case E_NOTICE: - $level = 'notice'; - break; - - case E_USER_NOTICE: - $level = 'user notice'; - break; - - default: - $level = '(unknown)'; - break; - - } - - $this->_error("PHP $level: $error_msg", - array( - 'type' => $error_type, - 'file' => $error_file, - 'line' => $error_line, - 'context' => $error_context - ) - ); - } - - /** - * Displays the errors on the error stack. - * - * Invoking this method cause all errors on the error stack to be displayed - * on the graph-output, by calling the {@link Image_Graph::_displayError()} - * method. - * - * @access private - */ - function _displayErrors() - { - return true; - } - - /** - * Display an error from the error stack. - * - * This method writes error messages caught from the {@link Image_Graph:: - * _default_error_handler()} if {@Image_Graph::displayErrors()} was invoked, - * and the error explicitly set by the system using {@link - * Image_Graph_Common::_error()}. - * - * @param int $x The horizontal position of the error message - * @param int $y The vertical position of the error message - * @param array $error The error context - * - * @access private - */ - function _displayError($x, $y, $error) - { - } - - /** - * Outputs this graph using the canvas. - * - * This causes the graph to make all elements perform their output. Their - * result is 'written' to the output using the canvas, which also performs - * the actual output, fx. it being to a file or directly to the browser - * (in the latter case, the canvas will also make sure the correct HTTP - * headers are sent, making the browser handle the output correctly, if - * supported by it). - * - * Parameters are the ones supported by the canvas, common ones are: - * - * 'filename' To output to a file instead of browser - * - * 'tohtml' Return a HTML string that encompasses the current graph/canvas - this - * implies an implicit save using the following parameters: 'filename' The "temporary" - * filename of the graph, 'filepath' A path in the file system where Image_Graph can - * store the output (this file must be in DOCUMENT_ROOT scope), 'urlpath' The URL that the - * 'filepath' corresponds to (i.e. filepath + filename must be reachable from a browser using - * urlpath + filename) - * - * @param mixed $param The output parameters to pass to the canvas - * @return bool Was the output 'good' (true) or 'bad' (false). - */ - function done($param = false) - { - $result = $this->_reset(); - if (PEAR::isError($result)) { - return $result; - } - return $this->_done($param); - } - - /** - * Outputs this graph using the canvas. - * - * This causes the graph to make all elements perform their output. Their - * result is 'written' to the output using the canvas, which also performs - * the actual output, fx. it being to a file or directly to the browser - * (in the latter case, the canvas will also make sure the correct HTTP - * headers are sent, making the browser handle the output correctly, if - * supported by it). - * - * @param mixed $param The output parameters to pass to the canvas - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done($param = false) - { - $timeStart = $this->_getMicroTime(); - - if ($this->_shadow) { - $this->setPadding(20); - $this->_setCoords( - $this->_left, - $this->_top, - $this->_right - 10, - $this->_bottom - 10); - } - - $result = $this->_updateCoords(); - if (PEAR::isError($result)) { - return $result; - } - - if ($this->_getBackground()) { - $this->_canvas->rectangle( - array( - 'x0' => $this->_left, - 'y0' => $this->_top, - 'x1' => $this->_right, - 'y1' => $this->_bottom - ) - ); - } - - $result = parent::_done(); - if (PEAR::isError($result)) { - return $result; - } - - if ($this->_displayErrors) { - $this->_displayErrors(); - } - - $timeEnd = $this->_getMicroTime(); - - if (($this->_showTime) || - ((isset($param['showtime'])) && ($param['showtime'] === true)) - ) { - $text = 'Generated in ' . - sprintf('%0.3f', $timeEnd - $timeStart) . ' sec'; - $this->write( - $this->_right, - $this->_bottom, - $text, - IMAGE_GRAPH_ALIGN_RIGHT + IMAGE_GRAPH_ALIGN_BOTTOM, - array('color' => 'red') - ); - } - - if (isset($param['filename'])) { - if ((isset($param['tohtml'])) && ($param['tohtml'])) { - return $this->_canvas->toHtml($param); - } - else { - return $this->_canvas->save($param); - } - } else { - return $this->_canvas->show($param); - } - } -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Graph.php,v 1.58 2005/11/27 18:48:05 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + + +/** + * Include PEAR.php + */ +require_once 'PEAR.php'; + +/** + * Include file Image/Graph/Element.php + */ +require_once 'Image/Graph/Element.php'; + +/** + * Include file Image/Graph/Constants.php + */ +require_once 'Image/Graph/Constants.php'; + +/** + * Main class for the graph creation. + * + * This is the main class, it manages the canvas and performs the final output + * by sequentialy making the elements output their results. The final output is + * handled using the {@link Image_Canvas} classes which makes it possible + * to use different engines (fx GD, PDFlib, libswf, etc) for output to several + * formats with a non-intersecting API. + * + * This class also handles coordinates and the correct managment of setting the + * correct coordinates on child elements. + * + * @category Images + * @package Image_Graph + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph extends Image_Graph_Element +{ + + /** + * Show generation time on graph + * @var bool + * @access private + */ + var $_showTime = false; + + /** + * Display errors on the canvas + * @var boolean + * @access private + */ + var $_displayErrors = false; + + /** + * Image_Graph [Constructor]. + * + * If passing the 3 parameters they are defined as follows:' + * + * Fx.: + * + * $Graph =& new Image_Graph(400, 300); + * + * or using the factory method: + * + * $Graph =& Image_Graph::factory('graph', array(400, 300)); + * + * This causes a 'png' canvas to be created by default. + * + * Otherwise use a single parameter either as an associated array or passing + * the canvas along to the constructor: + * + * 1) Create a new canvas with the following parameters: + * + * 'canvas' - The canvas type, can be any of 'gd', 'jpg', 'png' or 'svg' + * (more to come) - if omitted the default is 'gd' + * + * 'width' - The width of the graph + * + * 'height' - The height of the graph + * + * An example of this usage: + * + * $Graph =& Image_Graph::factory('graph', array(array('width' => 400, + * 'height' => 300, 'canvas' => 'jpg'))); + * + * NB! In thïs case remember the "double" array (see {@link Image_Graph:: + * factory()}) + * + * 2) Use the canvas specified, pass a valid Image_Canvas as + * parameter. Remember to pass by reference, i. e. &$canvas, fx.: + * + * $Graph =& new Image_Graph($Canvas); + * + * or using the factory method: + * + * $Graph =& Image_Graph::factory('graph', $Canvas)); + * + * @param mixed $params The width of the graph, an indexed array + * describing a new canvas or a valid {@link Image_Canvas} object + * @param int $height The height of the graph in pixels + * @param bool $createTransparent Specifies whether the graph should be + * created with a transparent background (fx for PNG's - note: transparent + * PNG's is not supported by Internet Explorer!) + */ + function Image_Graph($params, $height = false, $createTransparent = false) + { + parent::Image_Graph_Element(); + + $this->setFont(Image_Graph::factory('Image_Graph_Font')); + + if (defined('IMAGE_GRAPH_DEFAULT_CANVAS_TYPE')) { + $canvasType = IMAGE_GRAPH_DEFAULT_CANVAS_TYPE; + } else { + $canvasType = 'png'; // use GD as default, if nothing else is specified + } + + if (is_array($params)) { + if (isset($params['canvas'])) { + $canvasType = $params['canvas']; + } + + $width = 0; + $height = 0; + + if (isset($params['width'])) { + $width = $params['width']; + } + + if (isset($params['height'])) { + $height = $params['height']; + } + } elseif (is_a($params, 'Image_Canvas')) { + $this->_canvas =& $params; + $width = $this->_canvas->getWidth(); + $height = $this->_canvas->getHeight(); + } elseif (is_numeric($params)) { + $width = $params; + } + + if ($this->_canvas == null) { + include_once 'Image/Canvas.php'; + $this->_canvas =& + Image_Canvas::factory( + $canvasType, + array('width' => $width, 'height' => $height) + ); + } + + $this->_setCoords(0, 0, $width - 1, $height - 1); + } + + /** + * Gets the canvas for this graph. + * + * The canvas is set by either passing it to the constructor {@link + * Image_Graph::ImageGraph()} or using the {@link Image_Graph::setCanvas()} + * method. + * + * @return Image_Canvas The canvas used by this graph + * @access private + * @since 0.3.0dev2 + */ + function &_getCanvas() + { + return $this->_canvas; + } + + /** + * Sets the canvas for this graph. + * + * Calling this method makes this graph use the newly specified canvas for + * handling output. This method should be called whenever multiple + * 'outputs' are required. Invoke this method after calls to {@link + * Image_Graph:: done()} has been performed, to switch canvass. + * + * @param Image_Canvas $canvas The new canvas + * @return Image_Canvas The new canvas + * @since 0.3.0dev2 + */ + function &setCanvas(&$canvas) + { + if (!is_a($this->_canvas, 'Image_Canvas')) { + return $this->_error('The canvas introduced is not an Image_Canvas object'); + } + + $this->_canvas =& $canvas; + $this->_setCoords( + 0, + 0, + $this->_canvas->getWidth() - 1, + $this->_canvas->getHeight() - 1 + ); + return $this->_canvas; + } + + /** + * Gets a very precise timestamp + * + * @return The number of seconds to a lot of decimals + * @access private + */ + function _getMicroTime() + { + list($usec, $sec) = explode(' ', microtime()); + return ((float)$usec + (float)$sec); + } + + /** + * Gets the width of this graph. + * + * The width is returned as 'defined' by the canvas. + * + * @return int the width of this graph + */ + function width() + { + return $this->_canvas->getWidth(); + } + + /** + * Gets the height of this graph. + * + * The height is returned as 'defined' by the canvas. + * + * @return int the height of this graph + */ + function height() + { + return $this->_canvas->getHeight(); + } + + /** + * Enables displaying of errors on the output. + * + * Use this method to enforce errors to be displayed on the output. Calling + * this method makes PHP uses this graphs error handler as default {@link + * Image_Graph::_default_error_handler()}. + */ + function displayErrors() + { + $this->_displayErrors = true; + set_error_handler(array(&$this, '_default_error_handler')); + } + + /** + * Sets the log method for this graph. + * + * Use this method to enable logging. This causes any errors caught + * by either the error handler {@see Image_Graph::displayErrors()} + * or explicitly by calling {@link Image_Graph_Common::_error()} be + * logged using the specified logging method. + * + * If a filename is specified as log method, a Log object is created (using + * the 'file' handler), with a handle of 'Image_Graph Error Log'. + * + * Logging requires {@link Log}. + * + * @param mixed $log The log method, either a Log object or filename to log + * to + * @since 0.3.0dev2 + */ + function setLog($log) + { + } + + /** + * Factory method to create Image_Graph objects. + * + * Used for 'lazy including', i.e. loading only what is necessary, when it + * is necessary. If only one parameter is required for the constructor of + * the class simply pass this parameter as the $params parameter, unless the + * parameter is an array or a reference to a value, in that case you must + * 'enclose' the parameter in an array. Similar if the constructor takes + * more than one parameter specify the parameters in an array, i.e + * + * Image_Graph::factory('MyClass', array($param1, $param2, &$param3)); + * + * Variables that need to be passed by reference *must* have the & + * before the variable, i.e: + * + * Image_Graph::factory('line', &$Dataset); + * + * or + * + * Image_graph::factory('bar', array(array(&$Dataset1, &$Dataset2), + * 'stacked')); + * + * Class name can be either of the following: + * + * 1 The 'real' Image_Graph class name, i.e. Image_Graph_Plotarea or + * Image_Graph_Plot_Line + * + * 2 Short class name (leave out Image_Graph) and retain case, i.e. + * Plotarea, Plot_Line *not* plot_line + * + * 3 Class name 'alias', the following are supported: + * + * 'graph' = Image_Graph + * + * 'plotarea' = Image_Graph_Plotarea + * + * 'line' = Image_Graph_Plot_Line + * + * 'area' = Image_Graph_Plot_Area + * + * 'bar' = Image_Graph_Plot_Bar + * + * 'pie' = Image_Graph_Plot_Pie + * + * 'radar' = Image_Graph_Plot_Radar + * + * 'step' = Image_Graph_Plot_Step + * + * 'impulse' = Image_Graph_Plot_Impulse + * + * 'dot' or 'scatter' = Image_Graph_Plot_Dot + * + * 'smooth_line' = Image_Graph_Plot_Smoothed_Line + * + * 'smooth_area' = Image_Graph_Plot_Smoothed_Area + + * 'dataset' = Image_Graph_Dataset_Trivial + * + * 'random' = Image_Graph_Dataset_Random + * + * 'function' = Image_Graph_Dataset_Function + * + * 'vector' = Image_Graph_Dataset_VectorFunction + * + * 'category' = Image_Graph_Axis_Category + * + * 'axis' = Image_Graph_Axis + * + * 'axis_log' = Image_Graph_Axis_Logarithmic + * + * 'title' = Image_Graph_Title + * + * 'line_grid' = Image_Graph_Grid_Lines + * + * 'bar_grid' = Image_Graph_Grid_Bars + * + * 'polar_grid' = Image_Graph_Grid_Polar + * + * 'legend' = Image_Graph_Legend + * + * 'font' = Image_Graph_Font + * + * 'ttf_font' = Image_Graph_Font + * + * 'Image_Graph_Font_TTF' = Image_Graph_Font (to maintain BC with Image_Graph_Font_TTF) + * + * 'gradient' = Image_Graph_Fill_Gradient + * + * 'icon_marker' = Image_Graph_Marker_Icon + * + * 'value_marker' = Image_Graph_Marker_Value + * + * @param string $class The class for the new object + * @param mixed $params The paramaters to pass to the constructor + * @return object A new object for the class + * @static + */ + function &factory($class, $params = null) + { + static $Image_Graph_classAliases = array( + 'graph' => 'Image_Graph', + 'plotarea' => 'Image_Graph_Plotarea', + + 'line' => 'Image_Graph_Plot_Line', + 'area' => 'Image_Graph_Plot_Area', + 'bar' => 'Image_Graph_Plot_Bar', + 'smooth_line' => 'Image_Graph_Plot_Smoothed_Line', + 'smooth_area' => 'Image_Graph_Plot_Smoothed_Area', + 'pie' => 'Image_Graph_Plot_Pie', + 'radar' => 'Image_Graph_Plot_Radar', + 'step' => 'Image_Graph_Plot_Step', + 'impulse' => 'Image_Graph_Plot_Impulse', + 'dot' => 'Image_Graph_Plot_Dot', + 'scatter' => 'Image_Graph_Plot_Dot', + + 'dataset' => 'Image_Graph_Dataset_Trivial', + 'random' => 'Image_Graph_Dataset_Random', + 'function' => 'Image_Graph_Dataset_Function', + 'vector' => 'Image_Graph_Dataset_VectorFunction', + + 'category' => 'Image_Graph_Axis_Category', + 'axis' => 'Image_Graph_Axis', + 'axis_log' => 'Image_Graph_Axis_Logarithmic', + + 'title' => 'Image_Graph_Title', + + 'line_grid' => 'Image_Graph_Grid_Lines', + 'bar_grid' => 'Image_Graph_Grid_Bars', + 'polar_grid' => 'Image_Graph_Grid_Polar', + + 'legend' => 'Image_Graph_Legend', + 'font' => 'Image_Graph_Font', + 'ttf_font' => 'Image_Graph_Font', + 'Image_Graph_Font_TTF' => 'Image_Graph_Font', // BC with Image_Graph_Font_TTF + 'gradient' => 'Image_Graph_Fill_Gradient', + + 'icon_marker' => 'Image_Graph_Marker_Icon', + 'value_marker' => 'Image_Graph_Marker_Value' + ); + + if (substr($class, 0, 11) != 'Image_Graph') { + if (isset($Image_Graph_classAliases[$class])) { + $class = $Image_Graph_classAliases[$class]; + } else { + $class = 'Image_Graph_' . $class; + } + } + + include_once str_replace('_', '/', $class) . '.php'; + + $obj = null; + + if (is_array($params)) { + switch (count($params)) { + case 1: + $obj =& new $class( + $params[0] + ); + break; + + case 2: + $obj =& new $class( + $params[0], + $params[1] + ); + break; + + case 3: + $obj =& new $class( + $params[0], + $params[1], + $params[2] + ); + break; + + case 4: + $obj =& new $class( + $params[0], + $params[1], + $params[2], + $params[3] + ); + break; + + case 5: + $obj =& new $class( + $params[0], + $params[1], + $params[2], + $params[3], + $params[4] + ); + break; + + case 6: + $obj =& new $class( + $params[0], + $params[1], + $params[2], + $params[3], + $params[4], + $params[5] + ); + break; + + case 7: + $obj =& new $class( + $params[0], + $params[1], + $params[2], + $params[3], + $params[4], + $params[5], + $params[6] + ); + break; + + case 8: + $obj =& new $class( + $params[0], + $params[1], + $params[2], + $params[3], + $params[4], + $params[5], + $params[6], + $params[7] + ); + break; + + case 9: + $obj =& new $class( + $params[0], + $params[1], + $params[2], + $params[3], + $params[4], + $params[5], + $params[6], + $params[7], + $params[8] + ); + break; + + case 10: + $obj =& new $class( + $params[0], + $params[1], + $params[2], + $params[3], + $params[4], + $params[5], + $params[6], + $params[7], + $params[8], + $params[9] + ); + break; + + default: + $obj =& new $class(); + break; + + } + } else { + if ($params == null) { + $obj =& new $class(); + } else { + $obj =& new $class($params); + } + } + return $obj; + } + + /** + * Factory method to create layouts. + * + * This method is used for easy creation, since using {@link Image_Graph:: + * factory()} does not work with passing newly created objects from + * Image_Graph::factory() as reference, this is something that is + * fortunately fixed in PHP5. Also used for 'lazy including', i.e. loading + * only what is necessary, when it is necessary. + * + * Use {@link Image_Graph::horizontal()} or {@link Image_Graph::vertical()} + * instead for easier access. + * + * @param mixed $layout The type of layout, can be either 'Vertical' + * or 'Horizontal' (case sensitive) + * @param Image_Graph_Element $part1 The 1st part of the layout + * @param Image_Graph_Element $part2 The 2nd part of the layout + * @param int $percentage The percentage of the layout to split at + * @return Image_Graph_Layout The newly created layout object + * @static + */ + function &layoutFactory($layout, &$part1, &$part2, $percentage = 50) + { + if (($layout != 'Vertical') && ($layout != 'Horizontal')) { + return $this->_error('Layouts must be either \'Horizontal\' or \'Vertical\''); + } + + if (!(is_a($part1, 'Image_Graph_Element'))) { + return $this->_error('Part 1 is not a valid Image_Graph element'); + } + + if (!(is_a($part2, 'Image_Graph_Element'))) { + return $this->_error('Part 2 is not a valid Image_Graph element'); + } + + if ((!is_numeric($percentage)) || ($percentage < 0) || ($percentage > 100)) { + return $this->_error('Percentage has to be a number between 0 and 100'); + } + + include_once "Image/Graph/Layout/$layout.php"; + $class = "Image_Graph_Layout_$layout"; + $obj =& new $class($part1, $part2, $percentage); + return $obj; + } + + /** + * Factory method to create horizontal layout. + * + * See {@link Image_Graph::layoutFactory()} + * + * @param Image_Graph_Element $part1 The 1st (left) part of the layout + * @param Image_Graph_Element $part2 The 2nd (right) part of the layout + * @param int $percentage The percentage of the layout to split at + * (percentage of total height from the left side) + * @return Image_Graph_Layout The newly created layout object + * @static + */ + function &horizontal(&$part1, &$part2, $percentage = 50) + { + $obj =& Image_Graph::layoutFactory('Horizontal', $part1, $part2, $percentage); + return $obj; + } + + /** + * Factory method to create vertical layout. + * + * See {@link Image_Graph::layoutFactory()} + * + * @param Image_Graph_Element $part1 The 1st (top) part of the layout + * @param Image_Graph_Element $part2 The 2nd (bottom) part of the layout + * @param int $percentage The percentage of the layout to split at + * (percentage of total width from the top edge) + * @return Image_Graph_Layout The newly created layout object + * @static + */ + function &vertical(&$part1, &$part2, $percentage = 50) + { + $obj =& Image_Graph::layoutFactory('Vertical', $part1, $part2, $percentage); + return $obj; + } + + /** + * The error handling routine set by set_error_handler(). + * + * This method is used internaly by Image_Graph and PHP as a proxy for {@link + * Image_Graph::_error()}. + * + * @param string $error_type The type of error being handled. + * @param string $error_msg The error message being handled. + * @param string $error_file The file in which the error occurred. + * @param integer $error_line The line in which the error occurred. + * @param string $error_context The context in which the error occurred. + * @access private + */ + function _default_error_handler($error_type, $error_msg, $error_file, $error_line, $error_context) + { + switch( $error_type ) { + case E_ERROR: + $level = 'error'; + break; + + case E_USER_ERROR: + $level = 'user error'; + break; + + case E_WARNING: + $level = 'warning'; + break; + + case E_USER_WARNING: + $level = 'user warning'; + break; + + case E_NOTICE: + $level = 'notice'; + break; + + case E_USER_NOTICE: + $level = 'user notice'; + break; + + default: + $level = '(unknown)'; + break; + + } + + $this->_error("PHP $level: $error_msg", + array( + 'type' => $error_type, + 'file' => $error_file, + 'line' => $error_line, + 'context' => $error_context + ) + ); + } + + /** + * Displays the errors on the error stack. + * + * Invoking this method cause all errors on the error stack to be displayed + * on the graph-output, by calling the {@link Image_Graph::_displayError()} + * method. + * + * @access private + */ + function _displayErrors() + { + return true; + } + + /** + * Display an error from the error stack. + * + * This method writes error messages caught from the {@link Image_Graph:: + * _default_error_handler()} if {@Image_Graph::displayErrors()} was invoked, + * and the error explicitly set by the system using {@link + * Image_Graph_Common::_error()}. + * + * @param int $x The horizontal position of the error message + * @param int $y The vertical position of the error message + * @param array $error The error context + * + * @access private + */ + function _displayError($x, $y, $error) + { + } + + /** + * Outputs this graph using the canvas. + * + * This causes the graph to make all elements perform their output. Their + * result is 'written' to the output using the canvas, which also performs + * the actual output, fx. it being to a file or directly to the browser + * (in the latter case, the canvas will also make sure the correct HTTP + * headers are sent, making the browser handle the output correctly, if + * supported by it). + * + * Parameters are the ones supported by the canvas, common ones are: + * + * 'filename' To output to a file instead of browser + * + * 'tohtml' Return a HTML string that encompasses the current graph/canvas - this + * implies an implicit save using the following parameters: 'filename' The "temporary" + * filename of the graph, 'filepath' A path in the file system where Image_Graph can + * store the output (this file must be in DOCUMENT_ROOT scope), 'urlpath' The URL that the + * 'filepath' corresponds to (i.e. filepath + filename must be reachable from a browser using + * urlpath + filename) + * + * @param mixed $param The output parameters to pass to the canvas + * @return bool Was the output 'good' (true) or 'bad' (false). + */ + function done($param = false) + { + $result = $this->_reset(); + if (PEAR::isError($result)) { + return $result; + } + return $this->_done($param); + } + + /** + * Outputs this graph using the canvas. + * + * This causes the graph to make all elements perform their output. Their + * result is 'written' to the output using the canvas, which also performs + * the actual output, fx. it being to a file or directly to the browser + * (in the latter case, the canvas will also make sure the correct HTTP + * headers are sent, making the browser handle the output correctly, if + * supported by it). + * + * @param mixed $param The output parameters to pass to the canvas + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done($param = false) + { + $timeStart = $this->_getMicroTime(); + + if ($this->_shadow) { + $this->setPadding(20); + $this->_setCoords( + $this->_left, + $this->_top, + $this->_right - 10, + $this->_bottom - 10); + } + + $result = $this->_updateCoords(); + if (PEAR::isError($result)) { + return $result; + } + + if ($this->_getBackground()) { + $this->_canvas->rectangle( + array( + 'x0' => $this->_left, + 'y0' => $this->_top, + 'x1' => $this->_right, + 'y1' => $this->_bottom + ) + ); + } + + $result = parent::_done(); + if (PEAR::isError($result)) { + return $result; + } + + if ($this->_displayErrors) { + $this->_displayErrors(); + } + + $timeEnd = $this->_getMicroTime(); + + if (($this->_showTime) || + ((isset($param['showtime'])) && ($param['showtime'] === true)) + ) { + $text = 'Generated in ' . + sprintf('%0.3f', $timeEnd - $timeStart) . ' sec'; + $this->write( + $this->_right, + $this->_bottom, + $text, + IMAGE_GRAPH_ALIGN_RIGHT + IMAGE_GRAPH_ALIGN_BOTTOM, + array('color' => 'red') + ); + } + + if (isset($param['filename'])) { + if ((isset($param['tohtml'])) && ($param['tohtml'])) { + return $this->_canvas->toHtml($param); + } + else { + return $this->_canvas->save($param); + } + } else { + return $this->_canvas->show($param); + } + } +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Axis.php b/includes/pear/Image/Graph/Axis.php index 70bd03dd..13544fc3 100644 --- a/includes/pear/Image/Graph/Axis.php +++ b/includes/pear/Image/Graph/Axis.php @@ -1,1643 +1,1690 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Axis.php,v 1.33 2005/10/05 20:51:22 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plotarea/Element.php - */ -require_once 'Image/Graph/Plotarea/Element.php'; - -/** - * Diplays a normal linear axis (either X- or Y-axis). - * - * @category Images - * @package Image_Graph - * @subpackage Axis - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ - class Image_Graph_Axis extends Image_Graph_Plotarea_Element -{ - - /** - * The type of the axis, possible values are: - *
    - *
  • IMAGE_GRAPH_AXIS_X / IMAGE_GRAPH_AXIS_HORIZONTAL - *
  • IMAGE_GRAPH_AXIS_Y / IMAGE_GRAPH_AXIS_VERTICAL / - * IMAGE_GRAPH_AXIS_Y_SECONDARY - *
- * @var int - * @access private - */ - var $_type; - - /** - * The minimum value the axis displays - * @var int - * @access private - */ - var $_minimum = false; - - /** - * The minimum value the axis has been explicitly set by the user - * @var bool - * @access private - */ - var $_minimumSet = false; - - /** - * The maximum value the axis displays - * @var int - * @access private - */ - var $_maximum = false; - - /** - * The maximum value the axis has been explicitly set by the user - * @var bool - * @access private - */ - var $_maximumSet = false; - - /** - * The value span of the axis. - * This is primarily included for performance reasons - * @var double - * @access private - */ - var $_axisSpan = false; - - /** - * The value span of the axis. - * This is primarily included for performance reasons - * @var double - * @access private - */ - var $_axisValueSpan = false; - - /** - * The axis padding. - * The index 'low' specifies the padding for the low axis values (when not - * inverted), i.e. to the left on an x-axis and on the bottom of an y-axis, - * vice versa for 'high'. - * - * Axis padding does not make sense on a normal linear y-axis with a 'y-min' - * of 0 since this corresponds to displaying a small part of the y-axis - * below 0! - * - * @var array - * @access private - */ - var $_axisPadding = array('low' => 0, 'high' => 0); - - /** - * The number of "pixels" representing 1 unit on the axis - * - * This is primarily included for performance reasons - * @var double - * @access private - */ - var $_delta = false; - - /** - * Specify if the axis should label the minimum value - * @var bool - * @access private - */ - var $_showLabelMinimum = true; - - /** - * Specify if the axis should label 0 (zero) - * @var bool - * @access private - */ - var $_showLabelZero = false; - - /** - * Specify if the axis should label the maximum value - * @var bool - * @access private - */ - var $_showLabelMaximum = true; - - /** - * Show arrow heads at the 'end' of the axis, default: false - * @var bool - * @access private - */ - var $_showArrow = false; - - /** - * Intersection data of axis - * @var array - * @access private - */ - var $_intersect = array('value' => 'default', 'axis' => 'default'); - - /** - * The fixed size of the axis (i.e. width for y-axis, height for x-axis) - * @var mixed - * @access private - */ - var $_fixedSize = false; - - /** - * The label options - * - * Should text be shows, preferences for ticks. The indexes start at level - * 1, which is chosen for readability - * @var array - * @access private - */ - var $_labelOptions = array( - 1 => array( - 'interval' => 1, - 'type' => 'auto', - 'tick' => array('start' => -2, 'end' => 2), - 'showtext' => true, - 'showoffset' => false, - 'font' => array(), - 'offset' => 0, - 'position' => 'outside' - ) - ); - - /** - * The labels that are shown. - * - * This is used to make values show only once... - * @access private - */ - var $_labelText = array(); - - /** - * A data preprocessor for formatting labels, fx showing dates as a standard - * date instead of Unix time stamp - * @var Image_Graph_DatePreProcessor - * @access private - * @see Image_Graph_DataPreProcessor - */ - var $_dataPreProcessor = null; - - /** - * Point marked in the axis - * @var array - * @access private - */ - var $_marks = array(); - - /** - * Specifies whether the values should be 'pushed' by 0.5 - * @var bool - * @access private - */ - var $_pushValues = false; - - /** - * The title of this axis - * @var string - * @access private - */ - var $_title = ''; - - /** - * The font used for the title of this axis - * @var Image_Graph_Font - * @access private - */ - var $_titleFont = false; - - /** - * Invert the axis (i.e. if an y-axis normally displays minimum values at - * the bottom, they are not displayed at the top - * @var bool - * @access private - * @since 0.3.0dev3 - */ - var $_invert = false; - - /** - * Transpose the axis (i.e. is a normal y-axis transposed, so thats it's not show - * vertically as normally expected, but instead horizontally) - * @var bool - * @access private - */ - var $_transpose = false; - - /** - * Image_Graph_Axis [Constructor]. - * Normally a manual creation should not be necessary, axis are created - * automatically by the {@link Image_Graph_Plotarea} constructor unless - * explicitly defined otherwise - * - * @param int $type The type (direction) of the Axis, use IMAGE_GRAPH_AXIS_X - * for an X-axis (default, may be omitted) and IMAGE_GRAPH_AXIS_Y for Y- - * axis) - */ - function Image_Graph_Axis($type = IMAGE_GRAPH_AXIS_X) - { - parent::Image_Graph_Element(); - $this->_type = $type; - $this->_fillStyle = 'black'; - } - - /** - * Push the values by 0.5 (for bar and step chart) - * - * @access private - */ - function _pushValues() - { - $this->_pushValues = true; - } - - /** - * Sets the axis padding for a given position ('low' or 'high') - * @param string $where The position - * @param int $value The number of pixels to "pad" - * @access private - */ - function _setAxisPadding($where, $value) - { - $this->_axisPadding[$where] = $value; - } - - /** - * Gets the font of the title. - * - * If not font has been set, the parent font is propagated through it's - * children. - * - * @return array An associated array used for canvas - * @access private - */ - function _getTitleFont() - { - if ($this->_titleFont === false) { - if ($this->_defaultFontOptions !== false) { - return $this->_defaultFontOptions; - } else { - return $this->_getFont(); - } - } else { - if (is_object($this->_titleFont)) { - return $this->_titleFont->_getFont(); - } elseif (is_array($this->_titleFont)) { - return $this->_getFont($this->_titleFont); - } elseif (is_int($this->_titleFont)) { - return $this->_getFont(array('size' => $this->_titleFont)); - } - } - return array(); - } - - /** - * Shows a label for the the specified values. - * - * Allowed values are combinations of: - *
    - *
  • IMAGE_GRAPH_LABEL_MINIMUM - *
  • IMAGE_GRAPH_LABEL_ZERO - *
  • IMAGE_GRAPH_LABEL_MAXIMUM - *
- * By default none of these are shows on the axis - * - * @param int $value The values to show labels for - */ - function showLabel($value) - { - $this->_showLabelMinimum = ($value & IMAGE_GRAPH_LABEL_MINIMUM); - $this->_showLabelZero = ($value & IMAGE_GRAPH_LABEL_ZERO); - $this->_showLabelMaximum = ($value & IMAGE_GRAPH_LABEL_MAXIMUM); - } - - /** - * Sets a data preprocessor for formatting the axis labels - * - * @param Image_Graph_DataPreprocessor $dataPreProcessor The data preprocessor - * @see Image_Graph_DataPreprocessor - */ - function setDataPreProcessor(& $dataPreProcessor) - { - $this->_dataPreProcessor =& $dataPreProcessor; - } - - /** - * Gets the minimum value the axis will show - * - * @return double The minumum value - * @access private - */ - function _getMinimum() - { - return $this->_minimum; - } - - /** - * Gets the maximum value the axis will show - * - * @return double The maximum value - * @access private - */ - function _getMaximum() - { - return $this->_maximum; - } - - /** - * Sets the minimum value the axis will show - * - * @param double $minimum The minumum value to use on the axis - * @access private - */ - function _setMinimum($minimum) - { - if ($this->_minimum === false) { - $this->forceMinimum($minimum, false); - } else { - $this->forceMinimum(min($this->_minimum, $minimum), false); - } - } - - /** - * Sets the maximum value the axis will show - * - * @param double $maximum The maximum value to use on the axis - * @access private - */ - function _setMaximum($maximum) - { - if ($this->_maximum === false) { - $this->forceMaximum($maximum, false); - } else { - $this->forceMaximum(max($this->_maximum, $maximum), false); - } - } - - /** - * Forces the minimum value of the axis - * - * @param double $minimum The minumum value to use on the axis - * @param bool $userEnforce This value should not be set, used internally - */ - function forceMinimum($minimum, $userEnforce = true) - { - if (($userEnforce) || (!$this->_minimumSet)) { - $this->_minimum = $minimum; - $this->_minimumSet = $userEnforce; - } - $this->_calcLabelInterval(); - } - - /** - * Forces the maximum value of the axis - * - * @param double $maximum The maximum value to use on the axis - * @param bool $userEnforce This value should not be set, used internally - */ - function forceMaximum($maximum, $userEnforce = true) - { - if (($userEnforce) || (!$this->_maximumSet)) { - $this->_maximum = $maximum; - $this->_maximumSet = $userEnforce; - } - $this->_calcLabelInterval(); - } - - /** - * Show an arrow head on the 'end' of the axis - */ - function showArrow() - { - $this->_showArrow = true; - } - - /** - * Do not show an arrow head on the 'end' of the axis (default) - */ - function hideArrow() - { - $this->_showArrow = false; - } - - /** - * Return the label distance. - * - * @param int $level The label level to return the distance of - * @return int The distance between 2 adjacent labels - * @access private - */ - function _labelDistance($level = 1) - { - $l1 = $this->_getNextLabel(false, $level); - $l2 = $this->_getNextLabel($l1, $level);; - return abs($this->_point($l2) - $this->_point($l1)); - } - - /** - * Sets an interval for when labels are shown on the axis. - * - * By default 'auto' is used, forcing the axis to calculate a approximate - * best label interval to be used. Specify an array to use user-defined - * values for labels. - * - * @param mixed $labelInterval The interval with which labels are shown - * @param int $level The label level to set the interval on - */ - function setLabelInterval($labelInterval = 'auto', $level = 1) - { - if (!isset($this->_labelOptions[$level])) { - $this->_labelOptions[$level] = array(); - } - - if ($labelInterval === 'auto') { - $this->_labelOptions[$level]['type'] = 'auto'; - $this->_calcLabelInterval(); - } else { - $this->_labelOptions[$level]['type'] = 'manual'; - $this->_labelOptions[$level]['interval'] = $labelInterval; - } - } - - /** - * Sets options for the label at a specific level. - * - * Possible options are: - * - * 'showtext' true or false whether label text should be shown or not - * - * 'showoffset' should the label be shown at an offset, i.e. should the - * label be shown at a position so that it does not overlap with prior - * levels. Only applies to multilevel labels with text - * - * 'font' The font options as an associated array - * - * 'position' The position at which the labels are written ('inside' or - * 'outside' the axis). NB! This relative position only applies to the - * default location of the axis, i.e. if an x-axis is inverted then - * 'outside' still refers to the "left" side of a normal y-axis (since this - * is normally 'outside') but the actual output will be labels on the - * "inside"! - * - * 'format' To format the label text according to a sprintf statement - * - * 'dateformat' To format the label as a date, fx. j. M Y = 29. Jun 2005 - * - * @param string $option The label option name (see detailed description - * for possible values) - * @param mixed $value The value for the option - * @param int $level The label level to set the interval on - */ - function setLabelOption($option, $value, $level = 1) - { - if (!isset($this->_labelOptions[$level])) { - $this->_labelOptions[$level] = array('type' => 'auto'); - } - - $this->_labelOptions[$level][$option] = $value; - } - - /** - * Sets options for the label at a specific level. - * - * The possible options are specified in {@link Image_Graph_Axis:: - * setLabelOption()}. - * - * @param array $options An assciated array with label options - * @param int $level The label level to set the interval on - */ - function setLabelOptions($options, $level = 1) - { - if (is_array($options)) { - if (isset($this->_labelOptions[$level])) { - $this->_labelOptions[$level] = array_merge($this->_labelOptions[$level], $options); - } else { - $this->_labelOptions[$level] = $options; - } - - } - } - - /** - * Sets the title of this axis. - * - * This is used as an alternative (maybe better) method, than using layout's - * for axis-title generation. - * - * To use the current propagated font, but just set it vertically, simply - * pass 'vertical' as second parameter for vertical alignment down-to-up or - * 'vertical2' for up-to-down alignment. - * - * @param string $title The title of this axis - * @param Image_Graph_Font $font The font used for the title - * @since 0.3.0dev2 - */ - function setTitle($title, $font = false) - { - $this->_title = $title; - if ($font === 'vertical') { - $this->_titleFont = array('vertical' => true, 'angle' => 90); - } elseif ($font === 'vertical2') { - $this->_titleFont = array('vertical' => true, 'angle' => 270); - } else { - $this->_titleFont =& $font; - } - } - - /** - * Sets a fixed "size" for the axis. - * - * If the axis is any type of y-axis the size relates to the width of the - * axis, if an x-axis is concerned the size is the height. - * - * @param int $size The fixed size of the axis - * @since 0.3.0dev5 - */ - function setFixedSize($size) - { - $this->_fixedSize = $size; - } - - /** - * Preprocessor for values, ie for using logarithmic axis - * - * @param double $value The value to preprocess - * @return double The preprocessed value - * @access private - */ - function _value($value) - { - return $value - $this->_getMinimum() + ($this->_pushValues ? 0.5 : 0); - } - - /** - * Apply the dataset to the axis - * - * @param Image_Graph_Dataset $dataset The dataset - * @access private - */ - function _applyDataset(&$dataset) - { - if ($this->_type == IMAGE_GRAPH_AXIS_X) { - $this->_setMinimum($dataset->minimumX()); - $this->_setMaximum($dataset->maximumX()); - } else { - $this->_setMinimum($dataset->minimumY()); - $this->_setMaximum($dataset->maximumY()); - } - } - - /** - * Get the pixel position represented by a value on the canvas - * - * @param double $value the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _point($value) - { - if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || - (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) - { - if ($this->_invert) { - return max($this->_left, $this->_right - $this->_axisPadding['high'] - $this->_delta * $this->_value($value)); - } else { - return min($this->_right, $this->_left + $this->_axisPadding['low'] + $this->_delta * $this->_value($value)); - } - } else { - if ($this->_invert) { - return min($this->_bottom, $this->_top + $this->_axisPadding['high'] + $this->_delta * $this->_value($value)); - } else { - return max($this->_top, $this->_bottom - $this->_axisPadding['low'] - $this->_delta * $this->_value($value)); - } - } - } - - - /** - * Get the axis intersection pixel position - * - * This is only to be called prior to output! I.e. between the user - * invokation of Image_Graph::done() and any actual output is performed. - * This is because it can change the axis range. - * - * @param double $value the intersection value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _intersectPoint($value) - { - - if (($value === 'min') || ($value < $this->_getMinimum())) { - if ($this->_type == IMAGE_GRAPH_AXIS_X) { - if ($this->_invert) { - return ($this->_transpose ? $this->_top : $this->_right); - } else { - return ($this->_transpose ? $this->_bottom : $this->_left); - } - } else { - if ($this->_invert) { - return ($this->_transpose ? $this->_right : $this->_top); - } else { - return ($this->_transpose ? $this->_left : $this->_bottom); - } - } - } elseif (($value === 'max') || ($value > $this->_getMaximum())) { - if ($this->_type == IMAGE_GRAPH_AXIS_X) { - if ($this->_invert) { - return ($this->_transpose ? $this->_bottom : $this->_left); - } else { - return ($this->_transpose ? $this->_top : $this->_right); - } - } else { - if ($this->_invert) { - return ($this->_transpose ? $this->_left : $this->_bottom); - } else { - return ($this->_transpose ? $this->_right : $this->_top); - } - } - } - - return $this->_point($value); - } - - /** - * Calculate the delta value (the number of pixels representing one unit - * on the axis) - * - * @return double The label interval - * @access private - */ - function _calcDelta() - { - if ($this->_axisValueSpan == 0) { - $this->_delta = false; - } elseif ($this->_type == IMAGE_GRAPH_AXIS_X) { - $this->_delta = (($this->_transpose ? $this->height() : $this->width()) - ($this->_axisPadding['low'] + $this->_axisPadding['high'])) / $this->_axisValueSpan; - } else { - $this->_delta = (($this->_transpose ? $this->width() : $this->height()) - ($this->_axisPadding['low'] + $this->_axisPadding['high'])) / $this->_axisValueSpan; - } - } - - /** - * Calculate the label interval - * - * If explicitly defined this will be calucated to an approximate best. - * - * @return double The label interval - * @access private - */ - function _calcLabelInterval() - { - $min = $this->_getMinimum(); - $max = $this->_getMaximum(); - - $this->_axisValueSpan = $this->_axisSpan = abs($max - $min); - - if ((!empty($min)) && (!empty($max)) && ($min > $max)) { - $this->_labelOptions[1]['interval'] = 1; - return true; - } - - $span = 0; - foreach($this->_labelOptions as $level => $labelOptions) { - if ((!isset($labelOptions['type'])) || ($labelOptions['type'] !== 'auto')) { - $span = false; - } elseif ($level == 1) { - $span = $this->_axisValueSpan; - } else { - $l1 = $this->_getNextLabel(false, $level - 1); - $l2 = $this->_getNextLabel($l1, $level - 1); - if ((!is_numeric($l1)) || (!is_numeric($l2))) { - $span == false; - } else { - $span = $l2 - $l1; - } - } - - if ($span !== false) { - $interval = pow(10, floor(log10($span))); - - if ($interval == 0) { - $interval = 1; - } - - if ((($span) / $interval) < 3) { - $interval = $interval / 4; - } elseif ((($span) / $interval) < 5) { - $interval = $interval / 2; - } elseif ((($span) / $interval) > 10) { - $interval = $interval * 2; - } - - if (($interval -floor($interval) == 0.5) && ($interval != 0.5)) { - $interval = floor($interval); - } - - // just to be 100% sure that an interval of 0 is not returned some - // additional checks are performed - if ($interval == 0) { - $interval = ($span) / 5; - } - - if ($interval == 0) { - $interval = 1; - } - - $this->_labelOptions[$level]['interval'] = $interval; - } - } - } - - /** - * Get next label point - * - * @param doubt $currentLabel The current label, if omitted or false, the - * first is returned - * @param int $level The label level to get the next label from - * @return double The next label point - * @access private - */ - function _getNextLabel($currentLabel = false, $level = 1) - { - if (!isset($this->_labelOptions[$level])) { - return false; - } - - if (is_array($this->_labelOptions[$level]['interval'])) { - if ($currentLabel === false) { - reset($this->_labelOptions[$level]['interval']); - } - - if (list(, $label) = each($this->_labelOptions[$level]['interval'])) { - return $label; - } else { - return false; - } - } else { - $li = $this->_labelInterval($level); - if (($this->_axisSpan == 0) || ($this->_axisValueSpan == 0) || - ($li == 0) - ) { - return false; - } - - $labelInterval = $this->_axisSpan / ($this->_axisValueSpan / $li); - - if ($labelInterval == 0) { - return false; - } - - if ($currentLabel === false) { - $label = ((int) ($this->_getMinimum() / $labelInterval)) * - $labelInterval - $labelInterval; - while ($label < $this->_getMinimum()) { - $label += $labelInterval; - } - return $label; - } else { - if ($currentLabel + $labelInterval > $this->_getMaximum()) { - return false; - } else { - return $currentLabel + $labelInterval; - } - } - } - } - - /** - * Get the interval with which labels are shown on the axis. - * - * If explicitly defined this will be calucated to an approximate best. - * - * @param int $level The label level to get the label interval for - * @return double The label interval - * @access private - */ - function _labelInterval($level = 1) - { - if ((!isset($this->_labelOptions[$level])) || - (!isset($this->_labelOptions[$level]['interval'])) - ) { - return 1; - } - - return (is_array($this->_labelOptions[$level]['interval']) - ? 1 - : $this->_labelOptions[$level]['interval'] - ); - } - - /** - * Get the size in pixels of the axis. - * - * For an x-axis this is the width of the axis including labels, and for an - * y-axis it is the corrresponding height - * - * @return int The size of the axis - * @access private - */ - function _size() - { - if (!$this->_visible) { - return 0; - } - - if ($this->_fixedSize !== false) { - return $this->_fixedSize; - } - - krsort($this->_labelOptions); - - $totalMaxSize = 0; - - foreach ($this->_labelOptions as $level => $labelOptions) { - if ((isset($labelOptions['showoffset'])) && ($labelOptions['showoffset'] === true)) { - $this->_labelOptions[$level]['offset'] += $totalMaxSize; - } elseif (!isset($this->_labelOptions[$level]['offset'])) { - $this->_labelOptions[$level]['offset'] = 0; - } - if ( - (isset($labelOptions['showtext'])) && - ($labelOptions['showtext'] === true) && - ( - (!isset($labelOptions['position'])) || - ($labelOptions['position'] == 'outside') - ) - ) { - if (isset($labelOptions['font'])) { - $font = $this->_getFont($labelOptions['font']); - } else { - if ($this->_defaultFontOptions !== false) { - $font = $this->_defaultFontOptions; - } else { - $font = $this->_getFont(); - } - } - $this->_canvas->setFont($font); - - $value = false; - $maxSize = 0; - while (($value = $this->_getNextLabel($value, $level)) !== false) { - if ((abs($value) > 0.0001) && ($value > $this->_getMinimum()) && - ($value < $this->_getMaximum())) - { - if (is_object($this->_dataPreProcessor)) { - $labelText = $this->_dataPreProcessor->_process($value); - } elseif (isset($labelOptions['format'])) { - $labelText = sprintf($labelOptions['format'], $value); - } elseif (isset($labelOptions['dateformat'])) { - $labelText = date($labelOptions['dateformat'], $value); - } else { - $labelText = $value; - } - - if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || - (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) - { - $maxSize = max($maxSize, $this->_canvas->textHeight($labelText)); - } else { - $maxSize = max($maxSize, $this->_canvas->textWidth($labelText)); - } - } - } - if ((isset($labelOptions['showoffset'])) && ($labelOptions['showoffset'] === true)) { - $totalMaxSize += $maxSize; - } else { - $totalMaxSize = max($totalMaxSize, $maxSize); - } - } - } - - if ($this->_title) { - $this->_canvas->setFont($this->_getTitleFont()); - - if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || - (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) - { - $totalMaxSize += $this->_canvas->textHeight($this->_title); - } else { - $totalMaxSize += $this->_canvas->textWidth($this->_title); - } - $totalMaxSize += 10; - } - - return $totalMaxSize + 3; - } - - /** - * Adds a mark to the axis at the specified value - * - * @param double $value The value - * @param double $value2 The second value (for a ranged mark) - */ - function addMark($value, $value2 = false, $text = false) - { - if ($value2 === false) { - $this->_marks[] = $value; - } else { - $this->_marks[] = array($value, $value2); - } - } - - /** - * Is the axis numeric or not? - * - * @return bool True if numeric, false if not - * @access private - */ - function _isNumeric() - { - return true; - } - - /** - * Set the major tick appearance. - * - * The positions are specified in pixels relative to the axis, meaning that - * a value of -1 for start will draw the major tick 'line' starting at 1 - * pixel outside (negative) value the axis (i.e. below an x-axis and to the - * left of a normal y-axis). - * - * @param int $start The start position relative to the axis - * @param int $end The end position relative to the axis - * @param int $level The label level to set the tick options for - * @since 0.3.0dev2 - */ - function setTickOptions($start, $end, $level = 1) - { - if (!isset($this->_labelOptions[$level])) { - $this->_labelOptions[$level] = array(); - } - - $this->_labelOptions[$level]['tick'] = array( - 'start' => $start, - 'end' => $end - ); - } - - /** - * Invert the axis direction - * - * If the minimum values are normally displayed fx. at the bottom setting - * axis inversion to true, will cause the minimum values to be displayed at - * the top and maximum at the bottom. - * - * @param bool $invert True if the axis is to be inverted, false if not - * @since 0.3.0dev3 - */ - function setInverted($invert) - { - $this->_invert = $invert; - } - - /** - * Set axis intersection. - * - * Sets the value at which the axis intersects other axis, fx. at which Y- - * value the x-axis intersects the y-axis (normally at 0). - * - * Possible values are 'default', 'min', 'max' or a number between axis min - * and max (the value will automatically be limited to this range). - * - * For a coordinate system with 2 y-axis, the x-axis can either intersect - * the primary or the secondary y-axis. To make the x-axis intersect the - * secondary y-axis at a given value pass IMAGE_GRAPH_AXIS_Y_SECONDARY as - * second parameter. - * - * @param mixed $intersection The value at which the axis intersect the - * 'other' axis - * @param mixed $axis The axis to intersect. Only applies to x-axis with - * both a primary and secondary y-axis available. - * @since 0.3.0dev2 - */ - function setAxisIntersection($intersection, $axis = 'default') - { - if ($axis == 'x') { - $axis = IMAGE_GRAPH_AXIS_X; - } elseif ($axis == 'y') { - $axis = IMAGE_GRAPH_AXIS_Y; - } elseif ($axis == 'ysec') { - $axis = IMAGE_GRAPH_AXIS_Y_SECONDARY; - } - $this->_intersect = array( - 'value' => $intersection, - 'axis' => $axis - ); - } - - /** - * Get axis intersection data. - * - * @return array An array with the axis intersection data. - * @since 0.3.0dev2 - * @access private - */ - function _getAxisIntersection() - { - $value = $this->_intersect['value']; - $axis = $this->_intersect['axis']; - if (($this->_type == IMAGE_GRAPH_AXIS_Y) - || ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) - ) { - $axis = IMAGE_GRAPH_AXIS_X; - } elseif ($axis == 'default') { - $axis = IMAGE_GRAPH_AXIS_Y; - } - - if ($value === 'default') { - switch ($this->_type) { - case IMAGE_GRAPH_AXIS_Y: - $value = 'min'; - break; - case IMAGE_GRAPH_AXIS_Y_SECONDARY: - $value = 'max'; - break; - case IMAGE_GRAPH_AXIS_X: - $value = 0; - break; - } - } - - return array('value' => $value, 'axis' => $axis); - } - - /** - * Resets the elements - * - * @access private - */ - function _reset() - { - parent::_reset(); - $this->_labelText = array(); - } - - /** - * Output an axis tick mark. - * - * @param int $value The value to output - * @param int $level The label level to draw the tick for - * @access private - */ - function _drawTick($value, $level = 1) - { - if (isset($this->_labelOptions[$level])) { - $labelOptions = $this->_labelOptions[$level]; - $labelPosition = $this->_point($value); - - if (isset($labelOptions['offset'])) { - $offset = $labelOptions['offset']; - } else { - $offset = 0; - } - - if ((isset($labelOptions['showtext'])) && ($labelOptions['showtext'] === true)) { - if (is_object($this->_dataPreProcessor)) { - $labelText = $this->_dataPreProcessor->_process($value); - } elseif (isset($labelOptions['format'])) { - $labelText = sprintf($labelOptions['format'], $value); - } elseif (isset($labelOptions['dateformat'])) { - $labelText = date($labelOptions['dateformat'], $value); - } else { - $labelText = $value; - } - - if (!in_array($labelText, $this->_labelText)) { - $this->_labelText[] = $labelText; - - if (isset($labelOptions['font'])) { - $font = $this->_getFont($labelOptions['font']); - } else { - if ($this->_defaultFontOptions !== false) { - $font = $this->_defaultFontOptions; - } else { - $font = $this->_getFont(); - } - } - $this->_canvas->setFont($font); - - if ( - (isset($labelOptions['position'])) && - ($labelOptions['position'] == 'inside') - ) { - $labelInside = true; - } else { - $labelInside = false; - } - - if ($this->_type == IMAGE_GRAPH_AXIS_Y) { - if ($this->_transpose) { - if ($labelInside) { - $this->write( - $labelPosition, - $this->_top - 3 - $offset, - $labelText, - IMAGE_GRAPH_ALIGN_BOTTOM | IMAGE_GRAPH_ALIGN_CENTER_X, - $font - ); - } else { - $this->write( - $labelPosition, - $this->_top + 3 + $offset, - $labelText, - IMAGE_GRAPH_ALIGN_TOP | IMAGE_GRAPH_ALIGN_CENTER_X, - $font - ); - } - } - else { - if ($labelInside) { - $this->write( - $this->_right + 3 + $offset, - $labelPosition, - $labelText, - IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, - $font - ); - } else { - $this->write( - $this->_right - 3 - $offset, - $labelPosition, - $labelText, - IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_RIGHT, - $font - ); - } - } - } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { - if ($this->_transpose) { - if ($labelInside) { - $this->write( - $labelPosition, - $this->_bottom + 3 + $offset, - $labelText, - IMAGE_GRAPH_ALIGN_TOP | IMAGE_GRAPH_ALIGN_CENTER_X, - $font - ); - } else { - $this->write( - $labelPosition, - $this->_bottom - 3 - $offset, - $labelText, - IMAGE_GRAPH_ALIGN_BOTTOM | IMAGE_GRAPH_ALIGN_CENTER_X, - $font - ); - } - } - else { - if ($labelInside) { - $this->write( - $this->_left - 3 - $offset, - $labelPosition, - $labelText, - IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_RIGHT, - $font - ); - } else { - $this->write( - $this->_left + 3 + $offset, - $labelPosition, - $labelText, - IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, - $font - ); - } - } - } else { - if ($this->_transpose) { - if ($labelInside) { - $this->write( - $this->_right + 3 + $offset, - $labelPosition, - $labelText, - IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, - $font - ); - } else { - $this->write( - $this->_right - 3 - $offset, - $labelPosition, - $labelText, - IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_RIGHT, - $font - ); - } - } - else { - if ($labelInside === true) { - $this->write( - $labelPosition, - $this->_top - 3 - $offset, - $labelText, - IMAGE_GRAPH_ALIGN_CENTER_X | IMAGE_GRAPH_ALIGN_BOTTOM, - $font - ); - } else { - $this->write( - $labelPosition, - $this->_top + 3 + $offset, - $labelText, - IMAGE_GRAPH_ALIGN_CENTER_X | IMAGE_GRAPH_ALIGN_TOP, - $font - ); - } - } - } - } - } - - if (isset($this->_labelOptions[$level]['tick'])) { - $tickStart = $this->_labelOptions[$level]['tick']['start']; - $tickEnd = $this->_labelOptions[$level]['tick']['end']; - } else { - $tickStart = -2; - $tickEnd = 2; - } - - $this->_getLineStyle(); - if ($this->_type == IMAGE_GRAPH_AXIS_Y) { - if ($tickStart === 'auto') { - $tickStart = -$offset; - } - if ($this->_transpose) { - $this->_canvas->line( - array( - 'x0' => $labelPosition, - 'y0' => $this->_top + $tickStart, - 'x1' => $labelPosition, - 'y1' => $this->_top + $tickEnd - ) - ); - } - else { - $this->_canvas->line( - array( - 'x0' => $this->_right + $tickStart, - 'y0' => $labelPosition, - 'x1' => $this->_right + $tickEnd, - 'y1' => $labelPosition - ) - ); - } - } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { - if ($tickStart === 'auto') { - $tickStart = $offset; - } - if ($this->_transpose) { - $this->_canvas->line( - array( - 'x0' => $labelPosition, - 'y0' => $this->_bottom - $tickStart, - 'x1' => $labelPosition, - 'y1' => $this->_bottom - $tickEnd - ) - ); - } - else { - $this->_canvas->line( - array( - 'x0' => $this->_left - $tickStart, - 'y0' => $labelPosition, - 'x1' => $this->_left - $tickEnd, - 'y1' => $labelPosition - ) - ); - } - } else { - if ($tickStart === 'auto') { - $tickStart = $offset; - } - if ($this->_transpose) { - $this->_canvas->line( - array( - 'x0' => $this->_right + $tickStart, - 'y0' => $labelPosition, - 'x1' => $this->_right + $tickEnd, - 'y1' => $labelPosition - ) - ); - } - else { - $this->_canvas->line( - array( - 'x0' => $labelPosition, - 'y0' => $this->_top - $tickStart, - 'x1' => $labelPosition, - 'y1' => $this->_top - $tickEnd - ) - ); - } - } - } - } - - /** - * Draws axis lines. - * - * @access private - */ - function _drawAxisLines() - { - if ($this->_type == IMAGE_GRAPH_AXIS_X) { - $this->_getLineStyle(); - $this->_getFillStyle(); - - if ($this->_transpose) { - $data = array( - 'x0' => $this->_right, - 'y0' => $this->_top, - 'x1' => $this->_right, - 'y1' => $this->_bottom - ); - } else { - $data = array( - 'x0' => $this->_left, - 'y0' => $this->_top, - 'x1' => $this->_right, - 'y1' => $this->_top - ); - } - - if ($this->_showArrow) { - $data['end1'] = 'arrow2'; - $data['size1'] = 7; - } - - $this->_canvas->line($data); - - if ($this->_title) { - if (!$this->_transpose) { - $y = $this->_bottom; - $x = $this->_left + $this->width() / 2; - $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_BOTTOM, $this->_getTitleFont()); - } - else { - $y = $this->_top + $this->height() / 2; - $x = $this->_left; - $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_LEFT + IMAGE_GRAPH_ALIGN_CENTER_Y, $this->_getTitleFont()); - } - } - } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { - $this->_getLineStyle(); - $this->_getFillStyle(); - - if ($this->_transpose) { - $data = array( - 'x0' => $this->_left, - 'y0' => $this->_bottom, - 'x1' => $this->_right, - 'y1' => $this->_bottom - ); - } else { - $data = array( - 'x0' => $this->_left, - 'y0' => $this->_bottom, - 'x1' => $this->_left, - 'y1' => $this->_top - ); - } - if ($this->_showArrow) { - $data['end1'] = 'arrow2'; - $data['size1'] = 7; - } - $this->_canvas->line($data); - - if ($this->_title) { - if ($this->_transpose) { - $y = $this->_top; - $x = $this->_left + $this->width() / 2; - $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_TOP, $this->_getTitleFont()); - } - else { - $y = $this->_top + $this->height() / 2; - $x = $this->_right; - $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_RIGHT + IMAGE_GRAPH_ALIGN_CENTER_Y, $this->_getTitleFont()); - } - } - } else { - $this->_getLineStyle(); - $this->_getFillStyle(); - - if ($this->_transpose) { - $data = array( - 'x0' => $this->_left, - 'y0' => $this->_top, - 'x1' => $this->_right, - 'y1' => $this->_top - ); - } else { - $data = array( - 'x0' => $this->_right, - 'y0' => $this->_bottom, - 'x1' => $this->_right, - 'y1' => $this->_top - ); - } - if ($this->_showArrow) { - $data['end1'] = 'arrow2'; - $data['size1'] = 7; - } - $this->_canvas->line($data); - - if ($this->_title) { - if ($this->_transpose) { - $y = $this->_bottom; - $x = $this->_left + $this->width() / 2; - $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_BOTTOM, $this->_getTitleFont()); - } - else { - $y = $this->_top + $this->height() / 2; - $x = $this->_left; - $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_LEFT + IMAGE_GRAPH_ALIGN_CENTER_Y, $this->_getTitleFont()); - } - } - } - } - - /** - * Causes the object to update all sub elements coordinates - * - * (Image_Graph_Common, does not itself have coordinates, this is basically - * an abstract method) - * - * @access private - */ - function _updateCoords() - { - parent::_updateCoords(); - $this->_calcDelta(); - } - - /** - * Output the axis - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - $this->_canvas->startGroup(get_class($this)); - - if (parent::_done() === false) { - return false; - } - - $this->_drawAxisLines(); - - $this->_canvas->startGroup(get_class($this) . '_ticks'); - ksort($this->_labelOptions); - foreach ($this->_labelOptions as $level => $labelOption) { - $value = false; - while (($value = $this->_getNextLabel($value, $level)) !== false) { - if ((((abs($value) > 0.0001) || ($this->_showLabelZero)) && - (($value > $this->_getMinimum()) || ($this->_showLabelMinimum)) && - (($value < $this->_getMaximum()) || ($this->_showLabelMaximum))) && - ($value >= $this->_getMinimum()) && ($value <= $this->_getMaximum()) - ) { - $this->_drawTick($value, $level); - } - } - } - $this->_canvas->endGroup(); - - $tickStart = -3; - $tickEnd = 2; - - foreach ($this->_marks as $mark) { - if (is_array($mark)) { - if ($this->_type == IMAGE_GRAPH_AXIS_X) { - if ($this->_transpose) { - $x0 = $this->_right + $tickStart; - $y0 = $this->_point($mark[1]); - $x1 = $this->_right + $tickEnd; - $y1 = $this->_point($mark[0]); - } - else { - $x0 = $this->_point($mark[0]); - $y0 = $this->_top + $tickStart; - $x1 = $this->_point($mark[1]); - $y1 = $this->_top + $tickEnd; - } - } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y) { - if ($this->_transpose) { - $x0 = $this->_point($mark[0]); - $y0 = $this->_top + $tickStart; - $x1 = $this->_point($mark[1]); - $y1 = $this->_top + $tickEnd; - } - else { - $x0 = $this->_right + $tickStart; - $y0 = $this->_point($mark[1]); - $x1 = $this->_right + $tickEnd; - $y1 = $this->_point($mark[0]); - } - } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { - if ($this->_transpose) { - $x0 = $this->_point($mark[0]); - $y0 = $this->_bottom + $tickStart; - $x1 = $this->_point($mark[1]); - $y1 = $this->_bottom + $tickEnd; - } - else { - $x0 = $this->_left + $tickStart; - $y0 = $this->_point($mark[1]); - $x1 = $this->_left + $tickEnd; - $y1 = $this->_point($mark[0]); - } - } - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->rectangle(array('x0' => $x0, 'y0' => $y0, 'x1' => $x1, 'y1' => $y1)); - } else { - if ($this->_type == IMAGE_GRAPH_AXIS_X) { - if ($this->_transpose) { - $x0 = $this->_right + 5; - $y0 = $this->_point($mark); - $x1 = $this->_right + 15; - $y1 = $y0; - } - else { - $x0 = $this->_point($mark); - $y0 = $this->_top - 5; - $x1 = $x0; - $y1 = $this->_top - 15; - } - } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y) { - if ($this->_transpose) { - $x0 = $this->_point($mark); - $y0 = $this->_top - 5; - $x1 = $x0; - $y1 = $this->_top - 15; - } - else { - $x0 = $this->_right + 5; - $y0 = $this->_point($mark); - $x1 = $this->_right + 15; - $y1 = $y0; - } - } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { - if ($this->_transpose) { - $x0 = $this->_point($mark); - $y0 = $this->_bottom + 5; - $x1 = $x0; - $y1 = $this->_bottom + 15; - } - else { - $x0 = $this->_left - 5; - $y0 = $this->_point($mark); - $x1 = $this->_left - 15; - $y1 = $y0; - } - } - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->line( - array( - 'x0' => $x0, - 'y0' => $y0, - 'x1' => $x1, - 'y1' => $y1, - 'end0' => 'arrow2', - 'size0' => 5 - ) - ); - } - } - $this->_canvas->endGroup(); - - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Axis.php,v 1.35 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plotarea/Element.php + */ +require_once 'Image/Graph/Plotarea/Element.php'; + +/** + * Diplays a normal linear axis (either X- or Y-axis). + * + * @category Images + * @package Image_Graph + * @subpackage Axis + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ + class Image_Graph_Axis extends Image_Graph_Plotarea_Element +{ + + /** + * The type of the axis, possible values are: + *
    + *
  • IMAGE_GRAPH_AXIS_X / IMAGE_GRAPH_AXIS_HORIZONTAL + *
  • IMAGE_GRAPH_AXIS_Y / IMAGE_GRAPH_AXIS_VERTICAL / + * IMAGE_GRAPH_AXIS_Y_SECONDARY + *
+ * @var int + * @access private + */ + var $_type; + + /** + * The minimum value the axis displays + * @var int + * @access private + */ + var $_minimum = false; + + /** + * The minimum value the axis has been explicitly set by the user + * @var bool + * @access private + */ + var $_minimumSet = false; + + /** + * The maximum value the axis displays + * @var int + * @access private + */ + var $_maximum = false; + + /** + * The maximum value the axis has been explicitly set by the user + * @var bool + * @access private + */ + var $_maximumSet = false; + + /** + * The value span of the axis. + * This is primarily included for performance reasons + * @var double + * @access private + */ + var $_axisSpan = false; + + /** + * The value span of the axis. + * This is primarily included for performance reasons + * @var double + * @access private + */ + var $_axisValueSpan = false; + + /** + * The axis padding. + * The index 'low' specifies the padding for the low axis values (when not + * inverted), i.e. to the left on an x-axis and on the bottom of an y-axis, + * vice versa for 'high'. + * + * Axis padding does not make sense on a normal linear y-axis with a 'y-min' + * of 0 since this corresponds to displaying a small part of the y-axis + * below 0! + * + * @var array + * @access private + */ + var $_axisPadding = array('low' => 0, 'high' => 0); + + /** + * The number of "pixels" representing 1 unit on the axis + * + * This is primarily included for performance reasons + * @var double + * @access private + */ + var $_delta = false; + + /** + * Specify if the axis should label the minimum value + * @var bool + * @access private + */ + var $_showLabelMinimum = true; + + /** + * Specify if the axis should label 0 (zero) + * @var bool + * @access private + */ + var $_showLabelZero = false; + + /** + * Specify if the axis should label the maximum value + * @var bool + * @access private + */ + var $_showLabelMaximum = true; + + /** + * Show arrow heads at the 'end' of the axis, default: false + * @var bool + * @access private + */ + var $_showArrow = false; + + /** + * Intersection data of axis + * @var array + * @access private + */ + var $_intersect = array('value' => 'default', 'axis' => 'default'); + + /** + * The fixed size of the axis (i.e. width for y-axis, height for x-axis) + * @var mixed + * @access private + */ + var $_fixedSize = false; + + /** + * The label options + * + * Should text be shows, preferences for ticks. The indexes start at level + * 1, which is chosen for readability + * @var array + * @access private + */ + var $_labelOptions = array( + 1 => array( + 'interval' => 1, + 'type' => 'auto', + 'tick' => array( + 'start' => -2, + 'end' => 2, + 'color' => false // default color + ), + 'showtext' => true, + 'showoffset' => false, + 'font' => array(), + 'offset' => 0, + 'position' => 'outside', + ) + ); + + /** + * The labels that are shown. + * + * This is used to make values show only once... + * @access private + */ + var $_labelText = array(); + + /** + * A data preprocessor for formatting labels, fx showing dates as a standard + * date instead of Unix time stamp + * @var Image_Graph_DatePreProcessor + * @access private + * @see Image_Graph_DataPreProcessor + */ + var $_dataPreProcessor = null; + + /** + * Point marked in the axis + * @var array + * @access private + */ + var $_marks = array(); + + /** + * Specifies whether the values should be 'pushed' by 0.5 + * @var bool + * @access private + */ + var $_pushValues = false; + + /** + * The title of this axis + * @var string + * @access private + */ + var $_title = ''; + + /** + * The font used for the title of this axis + * @var Image_Graph_Font + * @access private + */ + var $_titleFont = false; + + /** + * Invert the axis (i.e. if an y-axis normally displays minimum values at + * the bottom, they are not displayed at the top + * @var bool + * @access private + * @since 0.3.0dev3 + */ + var $_invert = false; + + /** + * Transpose the axis (i.e. is a normal y-axis transposed, so thats it's not show + * vertically as normally expected, but instead horizontally) + * @var bool + * @access private + */ + var $_transpose = false; + + /** + * Image_Graph_Axis [Constructor]. + * Normally a manual creation should not be necessary, axis are created + * automatically by the {@link Image_Graph_Plotarea} constructor unless + * explicitly defined otherwise + * + * @param int $type The type (direction) of the Axis, use IMAGE_GRAPH_AXIS_X + * for an X-axis (default, may be omitted) and IMAGE_GRAPH_AXIS_Y for Y- + * axis) + */ + function Image_Graph_Axis($type = IMAGE_GRAPH_AXIS_X) + { + parent::Image_Graph_Element(); + $this->_type = $type; + $this->_fillStyle = 'black'; + } + + /** + * Push the values by 0.5 (for bar and step chart) + * + * @access private + */ + function _pushValues() + { + $this->_pushValues = true; + } + + /** + * Sets the axis padding for a given position ('low' or 'high') + * @param string $where The position + * @param int $value The number of pixels to "pad" + * @access private + */ + function _setAxisPadding($where, $value) + { + $this->_axisPadding[$where] = $value; + } + + /** + * Gets the font of the title. + * + * If not font has been set, the parent font is propagated through it's + * children. + * + * @return array An associated array used for canvas + * @access private + */ + function _getTitleFont() + { + if ($this->_titleFont === false) { + if ($this->_defaultFontOptions !== false) { + return $this->_defaultFontOptions; + } else { + return $this->_getFont(); + } + } else { + if (is_object($this->_titleFont)) { + return $this->_titleFont->_getFont(); + } elseif (is_array($this->_titleFont)) { + return $this->_getFont($this->_titleFont); + } elseif (is_int($this->_titleFont)) { + return $this->_getFont(array('size' => $this->_titleFont)); + } + } + return array(); + } + + /** + * Shows a label for the the specified values. + * + * Allowed values are combinations of: + *
    + *
  • IMAGE_GRAPH_LABEL_MINIMUM + *
  • IMAGE_GRAPH_LABEL_ZERO + *
  • IMAGE_GRAPH_LABEL_MAXIMUM + *
+ * By default none of these are shows on the axis + * + * @param int $value The values to show labels for + */ + function showLabel($value) + { + $this->_showLabelMinimum = ($value & IMAGE_GRAPH_LABEL_MINIMUM); + $this->_showLabelZero = ($value & IMAGE_GRAPH_LABEL_ZERO); + $this->_showLabelMaximum = ($value & IMAGE_GRAPH_LABEL_MAXIMUM); + } + + /** + * Sets a data preprocessor for formatting the axis labels + * + * @param Image_Graph_DataPreprocessor $dataPreProcessor The data preprocessor + * @see Image_Graph_DataPreprocessor + */ + function setDataPreProcessor(& $dataPreProcessor) + { + $this->_dataPreProcessor =& $dataPreProcessor; + } + + /** + * Gets the minimum value the axis will show + * + * @return double The minumum value + * @access private + */ + function _getMinimum() + { + return $this->_minimum; + } + + /** + * Gets the maximum value the axis will show + * + * @return double The maximum value + * @access private + */ + function _getMaximum() + { + return $this->_maximum; + } + + /** + * Sets the minimum value the axis will show + * + * @param double $minimum The minumum value to use on the axis + * @access private + */ + function _setMinimum($minimum) + { + if ($this->_minimum === false) { + $this->forceMinimum($minimum, false); + } else { + $this->forceMinimum(min($this->_minimum, $minimum), false); + } + } + + /** + * Sets the maximum value the axis will show + * + * @param double $maximum The maximum value to use on the axis + * @access private + */ + function _setMaximum($maximum) + { + if ($this->_maximum === false) { + $this->forceMaximum($maximum, false); + } else { + $this->forceMaximum(max($this->_maximum, $maximum), false); + } + } + + /** + * Forces the minimum value of the axis + * + * @param double $minimum The minumum value to use on the axis + * @param bool $userEnforce This value should not be set, used internally + */ + function forceMinimum($minimum, $userEnforce = true) + { + if (($userEnforce) || (!$this->_minimumSet)) { + $this->_minimum = $minimum; + $this->_minimumSet = $userEnforce; + } + $this->_calcLabelInterval(); + } + + /** + * Forces the maximum value of the axis + * + * @param double $maximum The maximum value to use on the axis + * @param bool $userEnforce This value should not be set, used internally + */ + function forceMaximum($maximum, $userEnforce = true) + { + if (($userEnforce) || (!$this->_maximumSet)) { + $this->_maximum = $maximum; + $this->_maximumSet = $userEnforce; + } + $this->_calcLabelInterval(); + } + + /** + * Show an arrow head on the 'end' of the axis + */ + function showArrow() + { + $this->_showArrow = true; + } + + /** + * Do not show an arrow head on the 'end' of the axis (default) + */ + function hideArrow() + { + $this->_showArrow = false; + } + + /** + * Return the label distance. + * + * @param int $level The label level to return the distance of + * @return int The distance between 2 adjacent labels + * @access private + */ + function _labelDistance($level = 1) + { + $l1 = $this->_getNextLabel(false, $level); + $l2 = $this->_getNextLabel($l1, $level);; + return abs($this->_point($l2) - $this->_point($l1)); + } + + /** + * Sets an interval for when labels are shown on the axis. + * + * By default 'auto' is used, forcing the axis to calculate a approximate + * best label interval to be used. Specify an array to use user-defined + * values for labels. + * + * @param mixed $labelInterval The interval with which labels are shown + * @param int $level The label level to set the interval on + */ + function setLabelInterval($labelInterval = 'auto', $level = 1) + { + if (!isset($this->_labelOptions[$level])) { + $this->_labelOptions[$level] = array(); + } + + if ($labelInterval === 'auto') { + $this->_labelOptions[$level]['type'] = 'auto'; + $this->_calcLabelInterval(); + } else { + $this->_labelOptions[$level]['type'] = 'manual'; + $this->_labelOptions[$level]['interval'] = $labelInterval; + } + } + + /** + * Sets options for the label at a specific level. + * + * Possible options are: + * + * 'showtext' true or false whether label text should be shown or not + * + * 'showoffset' should the label be shown at an offset, i.e. should the + * label be shown at a position so that it does not overlap with prior + * levels. Only applies to multilevel labels with text + * + * 'font' The font options as an associated array + * + * 'position' The position at which the labels are written ('inside' or + * 'outside' the axis). NB! This relative position only applies to the + * default location of the axis, i.e. if an x-axis is inverted then + * 'outside' still refers to the "left" side of a normal y-axis (since this + * is normally 'outside') but the actual output will be labels on the + * "inside"! + * + * 'format' To format the label text according to a sprintf statement + * + * 'dateformat' To format the label as a date, fx. j. M Y = 29. Jun 2005 + * + * @param string $option The label option name (see detailed description + * for possible values) + * @param mixed $value The value for the option + * @param int $level The label level to set the interval on + */ + function setLabelOption($option, $value, $level = 1) + { + if (!isset($this->_labelOptions[$level])) { + $this->_labelOptions[$level] = array('type' => 'auto'); + } + + $this->_labelOptions[$level][$option] = $value; + } + + /** + * Sets options for the label at a specific level. + * + * The possible options are specified in {@link Image_Graph_Axis:: + * setLabelOption()}. + * + * @param array $options An assciated array with label options + * @param int $level The label level to set the interval on + */ + function setLabelOptions($options, $level = 1) + { + if (is_array($options)) { + if (isset($this->_labelOptions[$level])) { + $this->_labelOptions[$level] = array_merge($this->_labelOptions[$level], $options); + } else { + $this->_labelOptions[$level] = $options; + } + + } + } + + /** + * Sets the title of this axis. + * + * This is used as an alternative (maybe better) method, than using layout's + * for axis-title generation. + * + * To use the current propagated font, but just set it vertically, simply + * pass 'vertical' as second parameter for vertical alignment down-to-up or + * 'vertical2' for up-to-down alignment. + * + * @param string $title The title of this axis + * @param Image_Graph_Font $font The font used for the title + * @since 0.3.0dev2 + */ + function setTitle($title, $font = false) + { + $this->_title = $title; + if ($font === 'vertical') { + $this->_titleFont = array('vertical' => true, 'angle' => 90); + } elseif ($font === 'vertical2') { + $this->_titleFont = array('vertical' => true, 'angle' => 270); + } else { + $this->_titleFont =& $font; + } + } + + /** + * Sets a fixed "size" for the axis. + * + * If the axis is any type of y-axis the size relates to the width of the + * axis, if an x-axis is concerned the size is the height. + * + * @param int $size The fixed size of the axis + * @since 0.3.0dev5 + */ + function setFixedSize($size) + { + $this->_fixedSize = $size; + } + + /** + * Preprocessor for values, ie for using logarithmic axis + * + * @param double $value The value to preprocess + * @return double The preprocessed value + * @access private + */ + function _value($value) + { + return $value - $this->_getMinimum() + ($this->_pushValues ? 0.5 : 0); + } + + /** + * Apply the dataset to the axis + * + * @param Image_Graph_Dataset $dataset The dataset + * @access private + */ + function _applyDataset(&$dataset) + { + if ($this->_type == IMAGE_GRAPH_AXIS_X) { + $this->_setMinimum($dataset->minimumX()); + $this->_setMaximum($dataset->maximumX()); + } else { + $this->_setMinimum($dataset->minimumY()); + $this->_setMaximum($dataset->maximumY()); + } + } + + /** + * Get the pixel position represented by a value on the canvas + * + * @param double $value the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _point($value) + { + if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || + (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) + { + if ($this->_invert) { + return max($this->_left, $this->_right - $this->_axisPadding['high'] - $this->_delta * $this->_value($value)); + } else { + return min($this->_right, $this->_left + $this->_axisPadding['low'] + $this->_delta * $this->_value($value)); + } + } else { + if ($this->_invert) { + return min($this->_bottom, $this->_top + $this->_axisPadding['high'] + $this->_delta * $this->_value($value)); + } else { + return max($this->_top, $this->_bottom - $this->_axisPadding['low'] - $this->_delta * $this->_value($value)); + } + } + } + + + /** + * Get the axis intersection pixel position + * + * This is only to be called prior to output! I.e. between the user + * invokation of Image_Graph::done() and any actual output is performed. + * This is because it can change the axis range. + * + * @param double $value the intersection value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _intersectPoint($value) + { + + if (($value === 'min') || ($value < $this->_getMinimum())) { + if ($this->_type == IMAGE_GRAPH_AXIS_X) { + if ($this->_invert) { + return ($this->_transpose ? $this->_top : $this->_right); + } else { + return ($this->_transpose ? $this->_bottom : $this->_left); + } + } else { + if ($this->_invert) { + return ($this->_transpose ? $this->_right : $this->_top); + } else { + return ($this->_transpose ? $this->_left : $this->_bottom); + } + } + } elseif (($value === 'max') || ($value > $this->_getMaximum())) { + if ($this->_type == IMAGE_GRAPH_AXIS_X) { + if ($this->_invert) { + return ($this->_transpose ? $this->_bottom : $this->_left); + } else { + return ($this->_transpose ? $this->_top : $this->_right); + } + } else { + if ($this->_invert) { + return ($this->_transpose ? $this->_left : $this->_bottom); + } else { + return ($this->_transpose ? $this->_right : $this->_top); + } + } + } + + return $this->_point($value); + } + + /** + * Calculate the delta value (the number of pixels representing one unit + * on the axis) + * + * @return double The label interval + * @access private + */ + function _calcDelta() + { + if ($this->_axisValueSpan == 0) { + $this->_delta = false; + } elseif ($this->_type == IMAGE_GRAPH_AXIS_X) { + $this->_delta = (($this->_transpose ? $this->height() : $this->width()) - ($this->_axisPadding['low'] + $this->_axisPadding['high'])) / ($this->_axisValueSpan + ($this->_pushValues ? 1 : 0)); + } else { + $this->_delta = (($this->_transpose ? $this->width() : $this->height()) - ($this->_axisPadding['low'] + $this->_axisPadding['high'])) / ($this->_axisValueSpan + ($this->_pushValues ? 1 : 0)); + } + } + + /** + * Calculate the label interval + * + * If explicitly defined this will be calucated to an approximate best. + * + * @return double The label interval + * @access private + */ + function _calcLabelInterval() + { + $min = $this->_getMinimum(); + $max = $this->_getMaximum(); + + $this->_axisValueSpan = $this->_axisSpan = abs($max - $min); + + if ((!empty($min)) && (!empty($max)) && ($min > $max)) { + $this->_labelOptions[1]['interval'] = 1; + return true; + } + + $span = 0; + foreach($this->_labelOptions as $level => $labelOptions) { + if ((!isset($labelOptions['type'])) || ($labelOptions['type'] !== 'auto')) { + $span = false; + } elseif ($level == 1) { + $span = $this->_axisValueSpan; + } else { + $l1 = $this->_getNextLabel(false, $level - 1); + $l2 = $this->_getNextLabel($l1, $level - 1); + if ((!is_numeric($l1)) || (!is_numeric($l2))) { + $span == false; + } else { + $span = $l2 - $l1; + } + } + + if ($span !== false) { + $interval = pow(10, floor(log10($span))); + + if ($interval == 0) { + $interval = 1; + } + + if ((($span) / $interval) < 3) { + $interval = $interval / 4; + } elseif ((($span) / $interval) < 5) { + $interval = $interval / 2; + } elseif ((($span) / $interval) > 10) { + $interval = $interval * 2; + } + + if (($interval -floor($interval) == 0.5) && ($interval != 0.5)) { + $interval = floor($interval); + } + + // just to be 100% sure that an interval of 0 is not returned some + // additional checks are performed + if ($interval == 0) { + $interval = ($span) / 5; + } + + if ($interval == 0) { + $interval = 1; + } + + $this->_labelOptions[$level]['interval'] = $interval; + } + } + } + + /** + * Get next label point + * + * @param doubt $currentLabel The current label, if omitted or false, the + * first is returned + * @param int $level The label level to get the next label from + * @return double The next label point + * @access private + */ + function _getNextLabel($currentLabel = false, $level = 1) + { + if (!isset($this->_labelOptions[$level])) { + return false; + } + + if (is_array($this->_labelOptions[$level]['interval'])) { + if ($currentLabel === false) { + reset($this->_labelOptions[$level]['interval']); + } + + if (list(, $label) = each($this->_labelOptions[$level]['interval'])) { + return $label; + } else { + return false; + } + } else { + $li = $this->_labelInterval($level); + if (($this->_axisSpan == 0) || ($this->_axisValueSpan == 0) || + ($li == 0) + ) { + return false; + } + + $labelInterval = $this->_axisSpan / ($this->_axisValueSpan / $li); + + if ($labelInterval == 0) { + return false; + } + + if ($currentLabel === false) { + $label = ((int) ($this->_getMinimum() / $labelInterval)) * + $labelInterval - $labelInterval; + while ($label < $this->_getMinimum()) { + $label += $labelInterval; + } + return $label; + } else { + if ($currentLabel + $labelInterval > $this->_getMaximum()) { + return false; + } else { + return $currentLabel + $labelInterval; + } + } + } + } + + /** + * Get the interval with which labels are shown on the axis. + * + * If explicitly defined this will be calucated to an approximate best. + * + * @param int $level The label level to get the label interval for + * @return double The label interval + * @access private + */ + function _labelInterval($level = 1) + { + if ((!isset($this->_labelOptions[$level])) || + (!isset($this->_labelOptions[$level]['interval'])) + ) { + return 1; + } + + return (is_array($this->_labelOptions[$level]['interval']) + ? 1 + : $this->_labelOptions[$level]['interval'] + ); + } + + /** + * Get the size in pixels of the axis. + * + * For an x-axis this is the width of the axis including labels, and for an + * y-axis it is the corrresponding height + * + * @return int The size of the axis + * @access private + */ + function _size() + { + if (!$this->_visible) { + return 0; + } + + if ($this->_fixedSize !== false) { + return $this->_fixedSize; + } + + krsort($this->_labelOptions); + + $totalMaxSize = 0; + + foreach ($this->_labelOptions as $level => $labelOptions) { + if ((isset($labelOptions['showoffset'])) && ($labelOptions['showoffset'] === true)) { + $this->_labelOptions[$level]['offset'] += $totalMaxSize; + } elseif (!isset($this->_labelOptions[$level]['offset'])) { + $this->_labelOptions[$level]['offset'] = 0; + } + if ( + (isset($labelOptions['showtext'])) && + ($labelOptions['showtext'] === true) && + ( + (!isset($labelOptions['position'])) || + ($labelOptions['position'] == 'outside') + ) + ) { + if (isset($labelOptions['font'])) { + $font = $this->_getFont($labelOptions['font']); + } else { + if ($this->_defaultFontOptions !== false) { + $font = $this->_defaultFontOptions; + } else { + $font = $this->_getFont(); + } + } + $this->_canvas->setFont($font); + + $value = false; + $maxSize = 0; + while (($value = $this->_getNextLabel($value, $level)) !== false) { + if ((abs($value) > 0.0001) && ($value > $this->_getMinimum()) && + ($value < $this->_getMaximum())) + { + if (is_object($this->_dataPreProcessor)) { + $labelText = $this->_dataPreProcessor->_process($value); + } elseif (isset($labelOptions['format'])) { + $labelText = sprintf($labelOptions['format'], $value); + } elseif (isset($labelOptions['dateformat'])) { + $labelText = date($labelOptions['dateformat'], $value); + } else { + $labelText = $value; + } + + if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || + (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) + { + $maxSize = max($maxSize, $this->_canvas->textHeight($labelText)); + } else { + $maxSize = max($maxSize, $this->_canvas->textWidth($labelText)); + } + } + } + if ((isset($labelOptions['showoffset'])) && ($labelOptions['showoffset'] === true)) { + $totalMaxSize += $maxSize; + } else { + $totalMaxSize = max($totalMaxSize, $maxSize); + } + } + } + + if ($this->_title) { + $this->_canvas->setFont($this->_getTitleFont()); + + if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || + (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) + { + $totalMaxSize += $this->_canvas->textHeight($this->_title); + } else { + $totalMaxSize += $this->_canvas->textWidth($this->_title); + } + $totalMaxSize += 10; + } + + return $totalMaxSize + 3; + } + + /** + * Adds a mark to the axis at the specified value + * + * @param double $value The value + * @param double $value2 The second value (for a ranged mark) + */ + function addMark($value, $value2 = false, $text = false) + { + if ($value2 === false) { + $this->_marks[] = $value; + } else { + $this->_marks[] = array($value, $value2); + } + } + + /** + * Is the axis numeric or not? + * + * @return bool True if numeric, false if not + * @access private + */ + function _isNumeric() + { + return true; + } + + /** + * Set the major tick appearance. + * + * The positions are specified in pixels relative to the axis, meaning that + * a value of -1 for start will draw the major tick 'line' starting at 1 + * pixel outside (negative) value the axis (i.e. below an x-axis and to the + * left of a normal y-axis). + * + * @param int $start The start position relative to the axis + * @param int $end The end position relative to the axis + * @param int $level The label level to set the tick options for + * @since 0.3.0dev2 + */ + function setTickOptions($start, $end, $level = 1) + { + if (!isset($this->_labelOptions[$level])) { + $this->_labelOptions[$level] = array(); + } + + $this->_labelOptions[$level]['tick'] = array( + 'start' => $start, + 'end' => $end + ); + } + + /** + * Invert the axis direction + * + * If the minimum values are normally displayed fx. at the bottom setting + * axis inversion to true, will cause the minimum values to be displayed at + * the top and maximum at the bottom. + * + * @param bool $invert True if the axis is to be inverted, false if not + * @since 0.3.0dev3 + */ + function setInverted($invert) + { + $this->_invert = $invert; + } + + /** + * Set axis intersection. + * + * Sets the value at which the axis intersects other axis, fx. at which Y- + * value the x-axis intersects the y-axis (normally at 0). + * + * Possible values are 'default', 'min', 'max' or a number between axis min + * and max (the value will automatically be limited to this range). + * + * For a coordinate system with 2 y-axis, the x-axis can either intersect + * the primary or the secondary y-axis. To make the x-axis intersect the + * secondary y-axis at a given value pass IMAGE_GRAPH_AXIS_Y_SECONDARY as + * second parameter. + * + * @param mixed $intersection The value at which the axis intersect the + * 'other' axis + * @param mixed $axis The axis to intersect. Only applies to x-axis with + * both a primary and secondary y-axis available. + * @since 0.3.0dev2 + */ + function setAxisIntersection($intersection, $axis = 'default') + { + if ($axis == 'x') { + $axis = IMAGE_GRAPH_AXIS_X; + } elseif ($axis == 'y') { + $axis = IMAGE_GRAPH_AXIS_Y; + } elseif ($axis == 'ysec') { + $axis = IMAGE_GRAPH_AXIS_Y_SECONDARY; + } + $this->_intersect = array( + 'value' => $intersection, + 'axis' => $axis + ); + } + + /** + * Get axis intersection data. + * + * @return array An array with the axis intersection data. + * @since 0.3.0dev2 + * @access private + */ + function _getAxisIntersection() + { + $value = $this->_intersect['value']; + $axis = $this->_intersect['axis']; + if (($this->_type == IMAGE_GRAPH_AXIS_Y) + || ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) + ) { + $axis = IMAGE_GRAPH_AXIS_X; + } elseif ($axis == 'default') { + $axis = IMAGE_GRAPH_AXIS_Y; + } + + if ($value === 'default') { + switch ($this->_type) { + case IMAGE_GRAPH_AXIS_Y: + $value = 'min'; + break; + case IMAGE_GRAPH_AXIS_Y_SECONDARY: + $value = 'max'; + break; + case IMAGE_GRAPH_AXIS_X: + $value = 0; + break; + } + } + + return array('value' => $value, 'axis' => $axis); + } + + /** + * Resets the elements + * + * @access private + */ + function _reset() + { + parent::_reset(); + $this->_labelText = array(); + } + + /** + * Output an axis tick mark. + * + * @param int $value The value to output + * @param int $level The label level to draw the tick for + * @access private + */ + function _drawTick($value, $level = 1) + { + if (isset($this->_labelOptions[$level])) { + $labelOptions = $this->_labelOptions[$level]; + $labelPosition = $this->_point($value); + + if (isset($labelOptions['offset'])) { + $offset = $labelOptions['offset']; + } else { + $offset = 0; + } + + if ((isset($labelOptions['showtext'])) && ($labelOptions['showtext'] === true)) { + if (is_object($this->_dataPreProcessor)) { + $labelText = $this->_dataPreProcessor->_process($value); + } elseif (isset($labelOptions['format'])) { + $labelText = sprintf($labelOptions['format'], $value); + } elseif (isset($labelOptions['dateformat'])) { + $labelText = date($labelOptions['dateformat'], $value); + } else { + $labelText = $value; + } + + if (!in_array($labelText, $this->_labelText)) { + $this->_labelText[] = $labelText; + + if (isset($labelOptions['font'])) { + $font = $this->_getFont($labelOptions['font']); + } else { + if ($this->_defaultFontOptions !== false) { + $font = $this->_defaultFontOptions; + } else { + $font = $this->_getFont(); + } + } + $this->_canvas->setFont($font); + + if ( + (isset($labelOptions['position'])) && + ($labelOptions['position'] == 'inside') + ) { + $labelInside = true; + } else { + $labelInside = false; + } + + if ($this->_type == IMAGE_GRAPH_AXIS_Y) { + if ($this->_transpose) { + if ($labelInside) { + $this->write( + $labelPosition, + $this->_top - 3 - $offset, + $labelText, + IMAGE_GRAPH_ALIGN_BOTTOM | IMAGE_GRAPH_ALIGN_CENTER_X, + $font + ); + } else { + $this->write( + $labelPosition, + $this->_top + 6 + $offset + $font['size'] * (substr_count($labelText, "\n") + 1), + $labelText, + IMAGE_GRAPH_ALIGN_BOTTOM | IMAGE_GRAPH_ALIGN_CENTER_X, + $font + ); + } + } + else { + if ($labelInside) { + $this->write( + $this->_right + 3 + $offset, + $labelPosition, + $labelText, + IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, + $font + ); + } else { + $this->write( + $this->_right - 3 - $offset, + $labelPosition, + $labelText, + IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_RIGHT, + $font + ); + } + } + } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { + if ($this->_transpose) { + if ($labelInside) { + $this->write( + $labelPosition, + $this->_bottom + 6 + $offset + $font['size'] * (substr_count($labelText, "\n") + 1), + $labelText, + IMAGE_GRAPH_ALIGN_BOTTOM | IMAGE_GRAPH_ALIGN_CENTER_X, + $font + ); + } else { + $this->write( + $labelPosition, + $this->_bottom - 3 - $offset, + $labelText, + IMAGE_GRAPH_ALIGN_BOTTOM | IMAGE_GRAPH_ALIGN_CENTER_X, + $font + ); + } + } + else { + if ($labelInside) { + $this->write( + $this->_left - 3 - $offset, + $labelPosition, + $labelText, + IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_RIGHT, + $font + ); + } else { + $this->write( + $this->_left + 3 + $offset, + $labelPosition, + $labelText, + IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, + $font + ); + } + } + } else { + if ($this->_transpose) { + if ($labelInside) { + $this->write( + $this->_right + 3 + $offset, + $labelPosition, + $labelText, + IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, + $font + ); + } else { + $this->write( + $this->_right - 3 - $offset, + $labelPosition, + $labelText, + IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_RIGHT, + $font + ); + } + } + else { + if ($labelInside === true) { + $this->write( + $labelPosition, + $this->_top - 3 - $offset, + $labelText, + IMAGE_GRAPH_ALIGN_CENTER_X | IMAGE_GRAPH_ALIGN_BOTTOM, + $font + ); + } else { + $this->write( + $labelPosition, + $this->_top + 6 + $offset + $font['size'] * (substr_count($labelText, "\n") + 1), + $labelText, + IMAGE_GRAPH_ALIGN_CENTER_X | IMAGE_GRAPH_ALIGN_BOTTOM, + $font + ); + } + } + } + } + } + + $tickColor = false; + if (isset($this->_labelOptions[$level]['tick'])) { + if (isset($this->_labelOptions[$level]['tick']['start'])) { + $tickStart = $this->_labelOptions[$level]['tick']['start']; + } else { + $tickStart = false; + } + + if (isset($this->_labelOptions[$level]['tick']['end'])) { + $tickEnd = $this->_labelOptions[$level]['tick']['end']; + } else { + $tickEnd = false; + } + + if ((isset($this->_labelOptions[$level]['tick']['color'])) && ($this->_labelOptions[$level]['tick']['color'] !== false)) { + $tickColor = $this->_labelOptions[$level]['tick']['color']; + } + } + + if ($tickStart === false) { + $tickStart = -2; + } + + if ($tickEnd === false) { + $tickEnd = 2; + } + + if ($tickColor !== false) { + $this->_canvas->setLineColor($tickColor); + } + else { + $this->_getLineStyle(); + } + + if ($this->_type == IMAGE_GRAPH_AXIS_Y) { + if ($tickStart === 'auto') { + $tickStart = -$offset; + } + if ($this->_transpose) { + $this->_canvas->line( + array( + 'x0' => $labelPosition, + 'y0' => $this->_top + $tickStart, + 'x1' => $labelPosition, + 'y1' => $this->_top + $tickEnd + ) + ); + } + else { + $this->_canvas->line( + array( + 'x0' => $this->_right + $tickStart, + 'y0' => $labelPosition, + 'x1' => $this->_right + $tickEnd, + 'y1' => $labelPosition + ) + ); + } + } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { + if ($tickStart === 'auto') { + $tickStart = $offset; + } + if ($this->_transpose) { + $this->_canvas->line( + array( + 'x0' => $labelPosition, + 'y0' => $this->_bottom - $tickStart, + 'x1' => $labelPosition, + 'y1' => $this->_bottom - $tickEnd + ) + ); + } + else { + $this->_canvas->line( + array( + 'x0' => $this->_left - $tickStart, + 'y0' => $labelPosition, + 'x1' => $this->_left - $tickEnd, + 'y1' => $labelPosition + ) + ); + } + } else { + if ($tickStart === 'auto') { + $tickStart = $offset; + } + if ($this->_transpose) { + $this->_canvas->line( + array( + 'x0' => $this->_right + $tickStart, + 'y0' => $labelPosition, + 'x1' => $this->_right + $tickEnd, + 'y1' => $labelPosition + ) + ); + } + else { + $this->_canvas->line( + array( + 'x0' => $labelPosition, + 'y0' => $this->_top - $tickStart, + 'x1' => $labelPosition, + 'y1' => $this->_top - $tickEnd + ) + ); + } + } + } + } + + /** + * Draws axis lines. + * + * @access private + */ + function _drawAxisLines() + { + if ($this->_type == IMAGE_GRAPH_AXIS_X) { + $this->_getLineStyle(); + $this->_getFillStyle(); + + if ($this->_transpose) { + $data = array( + 'x0' => $this->_right, + 'y0' => $this->_top, + 'x1' => $this->_right, + 'y1' => $this->_bottom + ); + } else { + $data = array( + 'x0' => $this->_left, + 'y0' => $this->_top, + 'x1' => $this->_right, + 'y1' => $this->_top + ); + } + + if ($this->_showArrow) { + if ($this->_getMaximum() <= 0) { + $data['end0'] = 'arrow2'; + $data['size0'] = 7; + } + else { + $data['end1'] = 'arrow2'; + $data['size1'] = 7; + } + } + + $this->_canvas->line($data); + + if ($this->_title) { + if (!$this->_transpose) { + $y = $this->_bottom; + $x = $this->_left + $this->width() / 2; + $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_BOTTOM, $this->_getTitleFont()); + } + else { + $y = $this->_top + $this->height() / 2; + $x = $this->_left; + $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_LEFT + IMAGE_GRAPH_ALIGN_CENTER_Y, $this->_getTitleFont()); + } + } + } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { + $this->_getLineStyle(); + $this->_getFillStyle(); + + if ($this->_transpose) { + $data = array( + 'x0' => $this->_left, + 'y0' => $this->_bottom, + 'x1' => $this->_right, + 'y1' => $this->_bottom + ); + } else { + $data = array( + 'x0' => $this->_left, + 'y0' => $this->_bottom, + 'x1' => $this->_left, + 'y1' => $this->_top + ); + } + if ($this->_showArrow) { + if ($this->_getMaximum() <= 0) { + $data['end0'] = 'arrow2'; + $data['size0'] = 7; + } + else { + $data['end1'] = 'arrow2'; + $data['size1'] = 7; + } + } + $this->_canvas->line($data); + + if ($this->_title) { + if ($this->_transpose) { + $y = $this->_top; + $x = $this->_left + $this->width() / 2; + $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_TOP, $this->_getTitleFont()); + } + else { + $y = $this->_top + $this->height() / 2; + $x = $this->_right; + $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_RIGHT + IMAGE_GRAPH_ALIGN_CENTER_Y, $this->_getTitleFont()); + } + } + } else { + $this->_getLineStyle(); + $this->_getFillStyle(); + + if ($this->_transpose) { + $data = array( + 'x0' => $this->_left, + 'y0' => $this->_top, + 'x1' => $this->_right, + 'y1' => $this->_top + ); + } else { + $data = array( + 'x0' => $this->_right, + 'y0' => $this->_bottom, + 'x1' => $this->_right, + 'y1' => $this->_top + ); + } + if ($this->_showArrow) { + if ($this->_getMaximum() <= 0) { + $data['end0'] = 'arrow2'; + $data['size0'] = 7; + } + else { + $data['end1'] = 'arrow2'; + $data['size1'] = 7; + } + } + $this->_canvas->line($data); + + if ($this->_title) { + if ($this->_transpose) { + $y = $this->_bottom; + $x = $this->_left + $this->width() / 2; + $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_BOTTOM, $this->_getTitleFont()); + } + else { + $y = $this->_top + $this->height() / 2; + $x = $this->_left; + $this->write($x, $y, $this->_title, IMAGE_GRAPH_ALIGN_LEFT + IMAGE_GRAPH_ALIGN_CENTER_Y, $this->_getTitleFont()); + } + } + } + } + + /** + * Causes the object to update all sub elements coordinates + * + * (Image_Graph_Common, does not itself have coordinates, this is basically + * an abstract method) + * + * @access private + */ + function _updateCoords() + { + parent::_updateCoords(); + $this->_calcDelta(); + } + + /** + * Output the axis + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + $this->_canvas->startGroup(get_class($this)); + + if (parent::_done() === false) { + return false; + } + + $this->_drawAxisLines(); + + $this->_canvas->startGroup(get_class($this) . '_ticks'); + ksort($this->_labelOptions); + foreach ($this->_labelOptions as $level => $labelOption) { + $value = false; + while (($value = $this->_getNextLabel($value, $level)) !== false) { + if ((((abs($value) > 0.0001) || ($this->_showLabelZero)) && + (($value > $this->_getMinimum()) || ($this->_showLabelMinimum)) && + (($value < $this->_getMaximum()) || ($this->_showLabelMaximum))) && + ($value >= $this->_getMinimum()) && ($value <= $this->_getMaximum()) + ) { + $this->_drawTick($value, $level); + } + } + } + $this->_canvas->endGroup(); + + $tickStart = -3; + $tickEnd = 2; + + foreach ($this->_marks as $mark) { + if (is_array($mark)) { + if ($this->_type == IMAGE_GRAPH_AXIS_X) { + if ($this->_transpose) { + $x0 = $this->_right + $tickStart; + $y0 = $this->_point($mark[1]); + $x1 = $this->_right + $tickEnd; + $y1 = $this->_point($mark[0]); + } + else { + $x0 = $this->_point($mark[0]); + $y0 = $this->_top + $tickStart; + $x1 = $this->_point($mark[1]); + $y1 = $this->_top + $tickEnd; + } + } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y) { + if ($this->_transpose) { + $x0 = $this->_point($mark[0]); + $y0 = $this->_top + $tickStart; + $x1 = $this->_point($mark[1]); + $y1 = $this->_top + $tickEnd; + } + else { + $x0 = $this->_right + $tickStart; + $y0 = $this->_point($mark[1]); + $x1 = $this->_right + $tickEnd; + $y1 = $this->_point($mark[0]); + } + } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { + if ($this->_transpose) { + $x0 = $this->_point($mark[0]); + $y0 = $this->_bottom + $tickStart; + $x1 = $this->_point($mark[1]); + $y1 = $this->_bottom + $tickEnd; + } + else { + $x0 = $this->_left + $tickStart; + $y0 = $this->_point($mark[1]); + $x1 = $this->_left + $tickEnd; + $y1 = $this->_point($mark[0]); + } + } + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->rectangle(array('x0' => $x0, 'y0' => $y0, 'x1' => $x1, 'y1' => $y1)); + } else { + if ($this->_type == IMAGE_GRAPH_AXIS_X) { + if ($this->_transpose) { + $x0 = $this->_right + 5; + $y0 = $this->_point($mark); + $x1 = $this->_right + 15; + $y1 = $y0; + } + else { + $x0 = $this->_point($mark); + $y0 = $this->_top - 5; + $x1 = $x0; + $y1 = $this->_top - 15; + } + } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y) { + if ($this->_transpose) { + $x0 = $this->_point($mark); + $y0 = $this->_top - 5; + $x1 = $x0; + $y1 = $this->_top - 15; + } + else { + $x0 = $this->_right + 5; + $y0 = $this->_point($mark); + $x1 = $this->_right + 15; + $y1 = $y0; + } + } elseif ($this->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY) { + if ($this->_transpose) { + $x0 = $this->_point($mark); + $y0 = $this->_bottom + 5; + $x1 = $x0; + $y1 = $this->_bottom + 15; + } + else { + $x0 = $this->_left - 5; + $y0 = $this->_point($mark); + $x1 = $this->_left - 15; + $y1 = $y0; + } + } + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->line( + array( + 'x0' => $x0, + 'y0' => $y0, + 'x1' => $x1, + 'y1' => $y1, + 'end0' => 'arrow2', + 'size0' => 5 + ) + ); + } + } + $this->_canvas->endGroup(); + + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Axis/Category.php b/includes/pear/Image/Graph/Axis/Category.php index 98d80354..e92bab61 100644 --- a/includes/pear/Image/Graph/Axis/Category.php +++ b/includes/pear/Image/Graph/Axis/Category.php @@ -1,426 +1,437 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Category.php,v 1.17 2005/10/05 20:51:23 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Axis.php - */ -require_once 'Image/Graph/Axis.php'; - -/** - * A normal axis thats displays labels with a 'interval' of 1. - * This is basically a normal axis where the range is - * the number of labels defined, that is the range is explicitly defined - * when constructing the axis. - * - * @category Images - * @package Image_Graph - * @subpackage Axis - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Axis_Category extends Image_Graph_Axis -{ - - /** - * The labels shown on the axis - * @var array - * @access private - */ - var $_labels = false; - - /** - * Image_Graph_Axis_Category [Constructor]. - * - * @param int $type The type (direction) of the Axis - */ - function Image_Graph_Axis_Category($type = IMAGE_GRAPH_AXIS_X) - { - parent::Image_Graph_Axis($type); - $this->_labels = array(); - $this->setlabelInterval(1); - } - - /** - * Gets the minimum value the axis will show. - * - * This is always 0 - * - * @return double The minumum value - * @access private - */ - function _getMinimum() - { - return 0; - } - - /** - * Gets the maximum value the axis will show. - * - * This is always the number of labels passed to the constructor. - * - * @return double The maximum value - * @access private - */ - function _getMaximum() - { - return count($this->_labels) - ($this->_pushValues ? 0 : 1); - } - - /** - * Sets the minimum value the axis will show. - * - * A minimum cannot be set on a SequentialAxis, it is always 0. - * - * @param double Minimum The minumum value to use on the axis - * @access private - */ - function _setMinimum($minimum) - { - } - - /** - * Sets the maximum value the axis will show - * - * A maximum cannot be set on a SequentialAxis, it is always the number - * of labels passed to the constructor. - * - * @param double Maximum The maximum value to use on the axis - * @access private - */ - function _setMaximum($maximum) - { - } - - /** - * Forces the minimum value of the axis - * - * A minimum cannot be set on a SequentialAxis, it is always 0. - * - * @param double $minimum The minumum value to use on the axis - */ - function forceMinimum($minimum, $userEnforce = true) - { - } - - /** - * Forces the maximum value of the axis - * - * A maximum cannot be set on a SequentialAxis, it is always the number - * of labels passed to the constructor. - * - * @param double $maximum The maximum value to use on the axis - */ - function forceMaximum($maximum, $userEnforce = true) - { - } - - /** - * Sets an interval for where labels are shown on the axis. - * - * The label interval is rounded to nearest integer value - * - * @param double $labelInterval The interval with which labels are shown - */ - function setLabelInterval($labelInterval = 'auto', $level = 1) - { - if ($labelInterval == 'auto') { - parent::setLabelInterval(1); - } else { - parent::setLabelInterval(round($labelInterval)); - } - } - - /** - * Preprocessor for values, ie for using logarithmic axis - * - * @param double $value The value to preprocess - * @return double The preprocessed value - * @access private - */ - function _value($value) - { -// $the_value = array_search($value, $this->_labels); - if (isset($this->_labels[$value])) { - $the_value = $this->_labels[$value]; - if ($the_value !== false) { - return $the_value + ($this->_pushValues ? 0.5 : 0); - } else { - return 0; - } - } - } - - - /** - * Get the minor label interval with which axis label ticks are drawn. - * - * For a sequential axis this is always disabled (i.e false) - * - * @return double The minor label interval, always false - * @access private - */ - function _minorLabelInterval() - { - return false; - } - - /** - * Get the size in pixels of the axis. - * - * For an x-axis this is the width of the axis including labels, and for an - * y-axis it is the corrresponding height - * - * @return int The size of the axis - * @access private - */ - function _size() - { - if (!$this->_visible) { - return 0; - } - - $this->_canvas->setFont($this->_getFont()); - - $maxSize = 0; - foreach($this->_labels as $label => $id) { - $labelPosition = $this->_point($label); - - if (is_object($this->_dataPreProcessor)) { - $labelText = $this->_dataPreProcessor->_process($label); - } else { - $labelText = $label; - } - - if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || - (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) - { - $maxSize = max($maxSize, $this->_canvas->textHeight($labelText)); - } else { - $maxSize = max($maxSize, $this->_canvas->textWidth($labelText)); - } - } - - if ($this->_title) { - $this->_canvas->setFont($this->_getTitleFont()); - - if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || - (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) - { - $maxSize += $this->_canvas->textHeight($this->_title); - } else { - $maxSize += $this->_canvas->textWidth($this->_title); - } - $maxSize += 10; - } - return $maxSize +3; - } - - /** - * Apply the dataset to the axis. - * - * This calculates the order of the categories, which is very important - * for fx. line plots, so that the line does not "go backwards", consider - * these X-sets:

- * 1: (1, 2, 3, 4, 5, 6)
- * 2: (0, 1, 2, 3, 4, 5, 6, 7)

- * If they are not ordered, but simply appended, the categories on the axis - * would be:

- * X: (1, 2, 3, 4, 5, 6, 0, 7)

- * Which would render the a line for the second plot to show incorrectly. - * Instead this algorithm, uses and 'value- is- before' method to see that - * the 0 is before a 1 in the second set, and that it should also be before - * a 1 in the X set. Hence:

- * X: (0, 1, 2, 3, 4, 5, 6, 7) - * - * @param Image_Graph_Dataset $dataset The dataset - * @access private - */ - function _applyDataset(&$dataset) - { - $newLabels = array(); - $allLabels = array(); - - $dataset->_reset(); - $count = 0; - $count_new = 0; - while ($point = $dataset->_next()) { - if ($this->_type == IMAGE_GRAPH_AXIS_X) { - $data = $point['X']; - } else { - $data = $point['Y']; - } - if (!isset($this->_labels[$data])) { - $newLabels[$data] = $count_new++; - //$this->_labels[] = $data; - } - $allLabels[$data] = $count++; - } - - if (count($this->_labels) == 0) { - $this->_labels = $newLabels; - } elseif ((is_array($newLabels)) && (count($newLabels) > 0)) { - // get all intersecting labels - $intersect = array_intersect(array_keys($allLabels), array_keys($this->_labels)); - // traverse all new and find their relative position withing the - // intersec, fx value X0 is before X1 in the intersection, which - // means that X0 should be placed before X1 in the label array - foreach($newLabels as $newLabel => $id) { - $key = $allLabels[$newLabel]; - reset($intersect); - $this_value = false; - // intersect indexes are the same as in allLabels! - $first = true; - while ((list($id, $value) = each($intersect)) && - ($this_value === false)) - { - if (($first) && ($id > $key)) { - $this_value = $value; - } elseif ($id >= $key) { - $this_value = $value; - } - $first = false; - } - - if ($this_value === false) { - // the new label was not found before anything in the - // intersection -> append it - $this->_labels[$newLabel] = count($this->_labels); - } else { - // the new label was found before $this_value in the - // intersection, insert the label before this position in - // the label array -// $key = $this->_labels[$this_value]; - $keys = array_keys($this->_labels); - $key = array_search($this_value, $keys); - $pre = array_slice($keys, 0, $key); - $pre[] = $newLabel; - $post = array_slice($keys, $key); - $this->_labels = array_flip(array_merge($pre, $post)); - } - } - unset($keys); - } - - $labels = array_keys($this->_labels); - $i = 0; - foreach ($labels as $label) { - $this->_labels[$label] = $i++; - } - -// $this->_labels = array_values(array_unique($this->_labels)); - $this->_calcLabelInterval(); - } - - /** - * Return the label distance. - * - * @return int The distance between 2 adjacent labels - * @access private - */ - function _labelDistance($level = 1) - { - reset($this->_labels); - list($l1) = each($this->_labels); - list($l2) = each($this->_labels); - return abs($this->_point($l2) - $this->_point($l1)); - } - - /** - * Get next label point - * - * @param doubt $point The current point, if omitted or false, the first is - * returned - * @return double The next label point - * @access private - */ - function _getNextLabel($currentLabel = false, $level = 1) - { - if ($currentLabel === false) { - reset($this->_labels); - } - $result = false; - $count = ($currentLabel === false ? $this->_labelInterval() - 1 : 0); - while ($count < $this->_labelInterval()) { - $result = (list($label) = each($this->_labels)); - $count++; - } - if ($result) { - return $label; - } else { - return false; - } - } - - /** - * Is the axis numeric or not? - * - * @return bool True if numeric, false if not - * @access private - */ - function _isNumeric() - { - return false; - } - - /** - * Output the axis - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - $result = true; - if (Image_Graph_Element::_done() === false) { - $result = false; - } - - $this->_canvas->startGroup(get_class($this)); - - $this->_drawAxisLines(); - - $this->_canvas->startGroup(get_class($this) . '_ticks'); - $label = false; - while (($label = $this->_getNextLabel($label)) !== false) { - $this->_drawTick($label); - } - $this->_canvas->endGroup(); - - $this->_canvas->endGroup(); - - return $result; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Category.php,v 1.19 2006/03/02 12:15:17 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Axis.php + */ +require_once 'Image/Graph/Axis.php'; + +/** + * A normal axis thats displays labels with a 'interval' of 1. + * This is basically a normal axis where the range is + * the number of labels defined, that is the range is explicitly defined + * when constructing the axis. + * + * @category Images + * @package Image_Graph + * @subpackage Axis + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Axis_Category extends Image_Graph_Axis +{ + + /** + * The labels shown on the axis + * @var array + * @access private + */ + var $_labels = false; + + /** + * Image_Graph_Axis_Category [Constructor]. + * + * @param int $type The type (direction) of the Axis + */ + function Image_Graph_Axis_Category($type = IMAGE_GRAPH_AXIS_X) + { + parent::Image_Graph_Axis($type); + $this->_labels = array(); + $this->setlabelInterval(1); + } + + /** + * Gets the minimum value the axis will show. + * + * This is always 0 + * + * @return double The minumum value + * @access private + */ + function _getMinimum() + { + return 0; + } + + /** + * Gets the maximum value the axis will show. + * + * This is always the number of labels passed to the constructor. + * + * @return double The maximum value + * @access private + */ + function _getMaximum() + { + return count($this->_labels) - 1; + } + + /** + * Sets the minimum value the axis will show. + * + * A minimum cannot be set on a SequentialAxis, it is always 0. + * + * @param double Minimum The minumum value to use on the axis + * @access private + */ + function _setMinimum($minimum) + { + } + + /** + * Sets the maximum value the axis will show + * + * A maximum cannot be set on a SequentialAxis, it is always the number + * of labels passed to the constructor. + * + * @param double Maximum The maximum value to use on the axis + * @access private + */ + function _setMaximum($maximum) + { + } + + /** + * Forces the minimum value of the axis + * + * A minimum cannot be set on this type of axis + * + * To modify the labels which are displayed on the axis, instead use + * setLabelInterval($labels) where $labels is an array containing the + * values/labels the axis should display. Note! Only values in + * this array will then be displayed on the graph! + * + * @param double $minimum A minimum cannot be set on this type of axis + */ + function forceMinimum($minimum, $userEnforce = true) + { + } + + /** + * Forces the maximum value of the axis + * + * A maximum cannot be set on this type of axis + * + * To modify the labels which are displayed on the axis, instead use + * setLabelInterval($labels) where $labels is an array containing the + * values/labels the axis should display. Note! Only values in + * this array will then be displayed on the graph! + * + * @param double $maximum A maximum cannot be set on this type of axis + */ + function forceMaximum($maximum, $userEnforce = true) + { + } + + /** + * Sets an interval for where labels are shown on the axis. + * + * The label interval is rounded to nearest integer value. + * + * @param double $labelInterval The interval with which labels are shown + */ + function setLabelInterval($labelInterval = 'auto', $level = 1) + { + if (is_array($labelInterval)) { + parent::setLabelInterval($labelInterval); + } elseif ($labelInterval == 'auto') { + parent::setLabelInterval(1); + } else { + parent::setLabelInterval(round($labelInterval)); + } + } + + /** + * Preprocessor for values, ie for using logarithmic axis + * + * @param double $value The value to preprocess + * @return double The preprocessed value + * @access private + */ + function _value($value) + { +// $the_value = array_search($value, $this->_labels); + if (isset($this->_labels[$value])) { + $the_value = $this->_labels[$value]; + if ($the_value !== false) { + return $the_value + ($this->_pushValues ? 0.5 : 0); + } else { + return 0; + } + } + } + + + /** + * Get the minor label interval with which axis label ticks are drawn. + * + * For a sequential axis this is always disabled (i.e false) + * + * @return double The minor label interval, always false + * @access private + */ + function _minorLabelInterval() + { + return false; + } + + /** + * Get the size in pixels of the axis. + * + * For an x-axis this is the width of the axis including labels, and for an + * y-axis it is the corrresponding height + * + * @return int The size of the axis + * @access private + */ + function _size() + { + if (!$this->_visible) { + return 0; + } + + $this->_canvas->setFont($this->_getFont()); + + $maxSize = 0; + foreach($this->_labels as $label => $id) { + $labelPosition = $this->_point($label); + + if (is_object($this->_dataPreProcessor)) { + $labelText = $this->_dataPreProcessor->_process($label); + } else { + $labelText = $label; + } + + if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || + (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) + { + $maxSize = max($maxSize, $this->_canvas->textHeight($labelText)); + } else { + $maxSize = max($maxSize, $this->_canvas->textWidth($labelText)); + } + } + + if ($this->_title) { + $this->_canvas->setFont($this->_getTitleFont()); + + if ((($this->_type == IMAGE_GRAPH_AXIS_X) && (!$this->_transpose)) || + (($this->_type != IMAGE_GRAPH_AXIS_X) && ($this->_transpose))) + { + $maxSize += $this->_canvas->textHeight($this->_title); + } else { + $maxSize += $this->_canvas->textWidth($this->_title); + } + $maxSize += 10; + } + return $maxSize +3; + } + + /** + * Apply the dataset to the axis. + * + * This calculates the order of the categories, which is very important + * for fx. line plots, so that the line does not "go backwards", consider + * these X-sets:

+ * 1: (1, 2, 3, 4, 5, 6)
+ * 2: (0, 1, 2, 3, 4, 5, 6, 7)

+ * If they are not ordered, but simply appended, the categories on the axis + * would be:

+ * X: (1, 2, 3, 4, 5, 6, 0, 7)

+ * Which would render the a line for the second plot to show incorrectly. + * Instead this algorithm, uses and 'value- is- before' method to see that + * the 0 is before a 1 in the second set, and that it should also be before + * a 1 in the X set. Hence:

+ * X: (0, 1, 2, 3, 4, 5, 6, 7) + * + * @param Image_Graph_Dataset $dataset The dataset + * @access private + */ + function _applyDataset(&$dataset) + { + $newLabels = array(); + $allLabels = array(); + + $dataset->_reset(); + $count = 0; + $count_new = 0; + while ($point = $dataset->_next()) { + if ($this->_type == IMAGE_GRAPH_AXIS_X) { + $data = $point['X']; + } else { + $data = $point['Y']; + } + if (!isset($this->_labels[$data])) { + $newLabels[$data] = $count_new++; + //$this->_labels[] = $data; + } + $allLabels[$data] = $count++; + } + + if (count($this->_labels) == 0) { + $this->_labels = $newLabels; + } elseif ((is_array($newLabels)) && (count($newLabels) > 0)) { + // get all intersecting labels + $intersect = array_intersect(array_keys($allLabels), array_keys($this->_labels)); + // traverse all new and find their relative position withing the + // intersec, fx value X0 is before X1 in the intersection, which + // means that X0 should be placed before X1 in the label array + foreach($newLabels as $newLabel => $id) { + $key = $allLabels[$newLabel]; + reset($intersect); + $this_value = false; + // intersect indexes are the same as in allLabels! + $first = true; + while ((list($id, $value) = each($intersect)) && + ($this_value === false)) + { + if (($first) && ($id > $key)) { + $this_value = $value; + } elseif ($id >= $key) { + $this_value = $value; + } + $first = false; + } + + if ($this_value === false) { + // the new label was not found before anything in the + // intersection -> append it + $this->_labels[$newLabel] = count($this->_labels); + } else { + // the new label was found before $this_value in the + // intersection, insert the label before this position in + // the label array +// $key = $this->_labels[$this_value]; + $keys = array_keys($this->_labels); + $key = array_search($this_value, $keys); + $pre = array_slice($keys, 0, $key); + $pre[] = $newLabel; + $post = array_slice($keys, $key); + $this->_labels = array_flip(array_merge($pre, $post)); + } + } + unset($keys); + } + + $labels = array_keys($this->_labels); + $i = 0; + foreach ($labels as $label) { + $this->_labels[$label] = $i++; + } + +// $this->_labels = array_values(array_unique($this->_labels)); + $this->_calcLabelInterval(); + } + + /** + * Return the label distance. + * + * @return int The distance between 2 adjacent labels + * @access private + */ + function _labelDistance($level = 1) + { + reset($this->_labels); + list($l1) = each($this->_labels); + list($l2) = each($this->_labels); + return abs($this->_point($l2) - $this->_point($l1)); + } + + /** + * Get next label point + * + * @param doubt $point The current point, if omitted or false, the first is + * returned + * @return double The next label point + * @access private + */ + function _getNextLabel($currentLabel = false, $level = 1) + { + if ($currentLabel === false) { + reset($this->_labels); + } + $result = false; + $count = ($currentLabel === false ? $this->_labelInterval() - 1 : 0); + while ($count < $this->_labelInterval()) { + $result = (list($label) = each($this->_labels)); + $count++; + } + if ($result) { + return $label; + } else { + return false; + } + } + + /** + * Is the axis numeric or not? + * + * @return bool True if numeric, false if not + * @access private + */ + function _isNumeric() + { + return false; + } + + /** + * Output the axis + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + $result = true; + if (Image_Graph_Element::_done() === false) { + $result = false; + } + + $this->_canvas->startGroup(get_class($this)); + + $this->_drawAxisLines(); + + $this->_canvas->startGroup(get_class($this) . '_ticks'); + $label = false; + while (($label = $this->_getNextLabel($label)) !== false) { + $this->_drawTick($label); + } + $this->_canvas->endGroup(); + + $this->_canvas->endGroup(); + + return $result; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Axis/Logarithmic.php b/includes/pear/Image/Graph/Axis/Logarithmic.php index 8567a7e0..e6f1f964 100644 --- a/includes/pear/Image/Graph/Axis/Logarithmic.php +++ b/includes/pear/Image/Graph/Axis/Logarithmic.php @@ -1,175 +1,152 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Logarithmic.php,v 1.13 2005/09/25 17:52:17 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Axis.php - */ -require_once 'Image/Graph/Axis.php'; - -/** - * Diplays a logarithmic axis (either X- or Y-axis). - * - * @category Images - * @package Image_Graph - * @subpackage Axis - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Axis_Logarithmic extends Image_Graph_Axis -{ - - /** - * Image_Graph_AxisLogarithmic [Constructor]. - * - * Normally a manual creation should not be necessary, axis are - * created automatically by the {@link Image_Graph_Plotarea} constructor - * unless explicitly defined otherwise - * - * @param int $type The type (direction) of the Axis, use IMAGE_GRAPH_AXIS_X - * for an X-axis (default, may be omitted) and IMAGE_GRAPH_AXIS_Y for Y- - * axis) - */ - function Image_Graph_Axis_Logarithmic($type = IMAGE_GRAPH_AXIS_X) - { - parent::Image_Graph_Axis($type); - $this->showLabel(IMAGE_GRAPH_LABEL_MINIMUM + IMAGE_GRAPH_LABEL_MAXIMUM); - } - - /** - * Calculate the label interval - * - * If explicitly defined this will be calucated to an approximate best. - * - * @return double The label interval - * @access private - */ - function _calcLabelInterval() - { - $result = parent::_calcLabelInterval(); - $this->_axisValueSpan = $this->_value($this->_axisSpan); - return $result; - } - - /** - * Forces the minimum value of the axis. - * - * For an logarithimc axis this is always 0 - * - * @param double $minimum The minumum value to use on the axis - */ - function forceMinimum($minimum) - { - parent::forceMinimum(0); - } - - /** - * Gets the minimum value the axis will show. - * - * For an logarithimc axis this is always 0 - * - * @return double The minumum value - * @access private - */ - function _getMinimum() - { - return 0; - } - - /** - * Preprocessor for values, ie for using logarithmic axis - * - * @param double $value The value to preprocess - * @return double The preprocessed value - * @access private - */ - function _value($value) - { - return log10($value); - } - - /** - * Get next label point - * - * @param doubt $point The current point, if omitted or false, the first is - * returned - * @return double The next label point - * @access private - */ - function _getNextLabel($currentLabel = false, $level = 1) - { - if (is_array($this->_labelOptions[$level]['interval'])) { - return parent::_getNextLabel($currentLabel, $level); - } - - if ($currentLabel !== false) { - $value = log10($currentLabel); - $base = floor($value); - $frac = $value - $base; - for ($i = 2; $i < 10; $i++) { - if ($frac <= (log10($i)-0.01)) { - $label = pow(10, $base)*$i; - if ($label > $this->_getMaximum()) { - return false; - } else { - return $label; - } - } - } - return pow(10, $base+1); - } - - return 1; - } - - /** - * Get the axis intersection pixel position - * - * This is only to be called prior to output! I.e. between the user - * invokation of Image_Graph::done() and any actual output is performed. - * This is because it can change the axis range. - * - * @param double $value the intersection value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _intersectPoint($value) - { - if (($value <= 0) && ($value !== 'max') && ($value !== 'min')) { - $value = 1; - } - return parent::_intersectPoint($value); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Logarithmic.php,v 1.15 2006/03/02 12:35:57 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Axis.php + */ +require_once 'Image/Graph/Axis.php'; + +/** + * Diplays a logarithmic axis (either X- or Y-axis). + * + * @category Images + * @package Image_Graph + * @subpackage Axis + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Axis_Logarithmic extends Image_Graph_Axis +{ + + /** + * Image_Graph_AxisLogarithmic [Constructor]. + * + * Normally a manual creation should not be necessary, axis are + * created automatically by the {@link Image_Graph_Plotarea} constructor + * unless explicitly defined otherwise + * + * @param int $type The type (direction) of the Axis, use IMAGE_GRAPH_AXIS_X + * for an X-axis (default, may be omitted) and IMAGE_GRAPH_AXIS_Y for Y- + * axis) + */ + function Image_Graph_Axis_Logarithmic($type = IMAGE_GRAPH_AXIS_X) + { + parent::Image_Graph_Axis($type); + $this->showLabel(IMAGE_GRAPH_LABEL_MINIMUM + IMAGE_GRAPH_LABEL_MAXIMUM); + $this->_minimum = 1; + $this->_minimumSet = true; + } + + /** + * Calculate the label interval + * + * If explicitly defined this will be calucated to an approximate best. + * + * @return double The label interval + * @access private + */ + function _calcLabelInterval() + { + $result = parent::_calcLabelInterval(); + $this->_axisValueSpan = $this->_value($this->_axisSpan); + return $result; + } + + /** + * Preprocessor for values, ie for using logarithmic axis + * + * @param double $value The value to preprocess + * @return double The preprocessed value + * @access private + */ + function _value($value) + { + return log10($value) - log10($this->_minimum); + } + + /** + * Get next label point + * + * @param doubt $point The current point, if omitted or false, the first is + * returned + * @return double The next label point + * @access private + */ + function _getNextLabel($currentLabel = false, $level = 1) + { + if (is_array($this->_labelOptions[$level]['interval'])) { + return parent::_getNextLabel($currentLabel, $level); + } + + if ($currentLabel !== false) { + $value = log10($currentLabel); + $base = floor($value); + $frac = $value - $base; + for ($i = 2; $i < 10; $i++) { + if ($frac <= (log10($i)-0.01)) { + $label = pow(10, $base)*$i; + if ($label > $this->_getMaximum()) { + return false; + } else { + return $label; + } + } + } + return pow(10, $base+1); + } + + return max(1, $this->_minimum); + } + + /** + * Get the axis intersection pixel position + * + * This is only to be called prior to output! I.e. between the user + * invokation of Image_Graph::done() and any actual output is performed. + * This is because it can change the axis range. + * + * @param double $value the intersection value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _intersectPoint($value) + { + if (($value <= 0) && ($value !== 'max') && ($value !== 'min')) { + $value = 1; + } + return parent::_intersectPoint($value); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Axis/Marker/Area.php b/includes/pear/Image/Graph/Axis/Marker/Area.php index 30a31dee..4b688fdb 100644 --- a/includes/pear/Image/Graph/Axis/Marker/Area.php +++ b/includes/pear/Image/Graph/Axis/Marker/Area.php @@ -1,156 +1,156 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Area.php,v 1.11 2005/08/24 20:36:04 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Grid.php - */ -require_once 'Image/Graph/Grid.php'; - -/** - * Display a grid - * - * {@link Image_Graph_Grid} - * - * @category Images - * @package Image_Graph - * @subpackage Grid - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Axis_Marker_Area extends Image_Graph_Grid -{ - - /** - * The lower bound - * @var double - * @access private - */ - var $_lower = false; - - /** - * The upper bound - * @var double - * @access private - */ - var $_upper = false; - - /** - * [Constructor] - */ - function Image_Graph_Axis_Marker_Area() - { - parent::Image_Graph_Grid(); - $this->_lineStyle = false; - } - - /** - * Sets the lower bound of the area (value on the axis) - * - * @param double $lower the lower bound - */ - function setLowerBound($lower) - { - $this->_lower = $lower; - } - - /** - * Sets the upper bound of the area (value on the axis) - * - * @param double $upper the upper bound - */ - function setUpperBound($upper) - { - $this->_upper = $upper; - } - - /** - * Output the grid - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!$this->_primaryAxis) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $i = 0; - - $this->_lower = max($this->_primaryAxis->_getMinimum(), $this->_lower); - $this->_upper = min($this->_primaryAxis->_getMaximum(), $this->_upper); - - $secondaryPoints = $this->_getSecondaryAxisPoints(); - - reset($secondaryPoints); - list ($id, $previousSecondaryValue) = each($secondaryPoints); - while (list ($id, $secondaryValue) = each($secondaryPoints)) { - if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_X) { - $p1 = array ('Y' => $secondaryValue, 'X' => $this->_lower); - $p2 = array ('Y' => $previousSecondaryValue, 'X' => $this->_lower); - $p3 = array ('Y' => $previousSecondaryValue, 'X' => $this->_upper); - $p4 = array ('Y' => $secondaryValue, 'X' => $this->_upper); - } else { - $p1 = array ('X' => $secondaryValue, 'Y' => $this->_lower); - $p2 = array ('X' => $previousSecondaryValue, 'Y' => $this->_lower); - $p3 = array ('X' => $previousSecondaryValue, 'Y' => $this->_upper); - $p4 = array ('X' => $secondaryValue, 'Y' => $this->_upper); - } - - $this->_canvas->addVertex(array('x' => $this->_pointX($p1), 'y' => $this->_pointY($p1))); - $this->_canvas->addVertex(array('x' => $this->_pointX($p2), 'y' => $this->_pointY($p2))); - $this->_canvas->addVertex(array('x' => $this->_pointX($p3), 'y' => $this->_pointY($p3))); - $this->_canvas->addVertex(array('x' => $this->_pointX($p4), 'y' => $this->_pointY($p4))); - - $previousSecondaryValue = $secondaryValue; - - $this->_getLineStyle(); - $this->_getFillStyle(); - $this->_canvas->polygon(array('connect' => true)); - } - - $this->_canvas->endGroup(); - - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Area.php,v 1.11 2005/08/24 20:36:04 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Grid.php + */ +require_once 'Image/Graph/Grid.php'; + +/** + * Display a grid + * + * {@link Image_Graph_Grid} + * + * @category Images + * @package Image_Graph + * @subpackage Grid + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Axis_Marker_Area extends Image_Graph_Grid +{ + + /** + * The lower bound + * @var double + * @access private + */ + var $_lower = false; + + /** + * The upper bound + * @var double + * @access private + */ + var $_upper = false; + + /** + * [Constructor] + */ + function Image_Graph_Axis_Marker_Area() + { + parent::Image_Graph_Grid(); + $this->_lineStyle = false; + } + + /** + * Sets the lower bound of the area (value on the axis) + * + * @param double $lower the lower bound + */ + function setLowerBound($lower) + { + $this->_lower = $lower; + } + + /** + * Sets the upper bound of the area (value on the axis) + * + * @param double $upper the upper bound + */ + function setUpperBound($upper) + { + $this->_upper = $upper; + } + + /** + * Output the grid + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!$this->_primaryAxis) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $i = 0; + + $this->_lower = max($this->_primaryAxis->_getMinimum(), $this->_lower); + $this->_upper = min($this->_primaryAxis->_getMaximum(), $this->_upper); + + $secondaryPoints = $this->_getSecondaryAxisPoints(); + + reset($secondaryPoints); + list ($id, $previousSecondaryValue) = each($secondaryPoints); + while (list ($id, $secondaryValue) = each($secondaryPoints)) { + if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_X) { + $p1 = array ('Y' => $secondaryValue, 'X' => $this->_lower); + $p2 = array ('Y' => $previousSecondaryValue, 'X' => $this->_lower); + $p3 = array ('Y' => $previousSecondaryValue, 'X' => $this->_upper); + $p4 = array ('Y' => $secondaryValue, 'X' => $this->_upper); + } else { + $p1 = array ('X' => $secondaryValue, 'Y' => $this->_lower); + $p2 = array ('X' => $previousSecondaryValue, 'Y' => $this->_lower); + $p3 = array ('X' => $previousSecondaryValue, 'Y' => $this->_upper); + $p4 = array ('X' => $secondaryValue, 'Y' => $this->_upper); + } + + $this->_canvas->addVertex(array('x' => $this->_pointX($p1), 'y' => $this->_pointY($p1))); + $this->_canvas->addVertex(array('x' => $this->_pointX($p2), 'y' => $this->_pointY($p2))); + $this->_canvas->addVertex(array('x' => $this->_pointX($p3), 'y' => $this->_pointY($p3))); + $this->_canvas->addVertex(array('x' => $this->_pointX($p4), 'y' => $this->_pointY($p4))); + + $previousSecondaryValue = $secondaryValue; + + $this->_getLineStyle(); + $this->_getFillStyle(); + $this->_canvas->polygon(array('connect' => true)); + } + + $this->_canvas->endGroup(); + + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Axis/Marker/Line.php b/includes/pear/Image/Graph/Axis/Marker/Line.php index b1b5c6ee..be3b5bec 100644 --- a/includes/pear/Image/Graph/Axis/Marker/Line.php +++ b/includes/pear/Image/Graph/Axis/Marker/Line.php @@ -1,124 +1,124 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Line.php,v 1.11 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Grid.php - */ -require_once 'Image/Graph/Grid.php'; - -/** - * Display a grid - * - * {@link Image_Graph_Grid} - * - * @category Images - * @package Image_Graph - * @subpackage Grid - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Axis_Marker_Line extends Image_Graph_Grid -{ - - /** - * The value - * @var double - * @access private - */ - var $_value = false; - - /** - * Sets the value of the line marker (value on the axis) - * - * @param double $value the value - */ - function setValue($value) - { - $this->_value = $value; - } - - /** - * Output the grid - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!$this->_primaryAxis) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $i = 0; - - $this->_value = min($this->_primaryAxis->_getMaximum(), max($this->_primaryAxis->_getMinimum(), $this->_value)); - - $secondaryPoints = $this->_getSecondaryAxisPoints(); - - reset($secondaryPoints); - list ($id, $previousSecondaryValue) = each($secondaryPoints); - while (list ($id, $secondaryValue) = each($secondaryPoints)) { - if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_X) { - $p1 = array ('X' => $this->_value, 'Y' => $secondaryValue); - $p2 = array ('X' => $this->_value, 'Y' => $previousSecondaryValue); - } else { - $p1 = array ('X' => $secondaryValue, 'Y' => $this->_value); - $p2 = array ('X' => $previousSecondaryValue, 'Y' => $this->_value); - } - - $x1 = $this->_pointX($p1); - $y1 = $this->_pointY($p1); - $x2 = $this->_pointX($p2); - $y2 = $this->_pointY($p2); - - $previousSecondaryValue = $secondaryValue; - - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x1, 'y0' => $y1, 'x1' => $x2, 'y1' => $y2)); - } - - $this->_canvas->endGroup(); - - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Line.php,v 1.11 2005/08/03 21:21:58 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Grid.php + */ +require_once 'Image/Graph/Grid.php'; + +/** + * Display a grid + * + * {@link Image_Graph_Grid} + * + * @category Images + * @package Image_Graph + * @subpackage Grid + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Axis_Marker_Line extends Image_Graph_Grid +{ + + /** + * The value + * @var double + * @access private + */ + var $_value = false; + + /** + * Sets the value of the line marker (value on the axis) + * + * @param double $value the value + */ + function setValue($value) + { + $this->_value = $value; + } + + /** + * Output the grid + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!$this->_primaryAxis) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $i = 0; + + $this->_value = min($this->_primaryAxis->_getMaximum(), max($this->_primaryAxis->_getMinimum(), $this->_value)); + + $secondaryPoints = $this->_getSecondaryAxisPoints(); + + reset($secondaryPoints); + list ($id, $previousSecondaryValue) = each($secondaryPoints); + while (list ($id, $secondaryValue) = each($secondaryPoints)) { + if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_X) { + $p1 = array ('X' => $this->_value, 'Y' => $secondaryValue); + $p2 = array ('X' => $this->_value, 'Y' => $previousSecondaryValue); + } else { + $p1 = array ('X' => $secondaryValue, 'Y' => $this->_value); + $p2 = array ('X' => $previousSecondaryValue, 'Y' => $this->_value); + } + + $x1 = $this->_pointX($p1); + $y1 = $this->_pointY($p1); + $x2 = $this->_pointX($p2); + $y2 = $this->_pointY($p2); + + $previousSecondaryValue = $secondaryValue; + + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x1, 'y0' => $y1, 'x1' => $x2, 'y1' => $y2)); + } + + $this->_canvas->endGroup(); + + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Axis/Radar.php b/includes/pear/Image/Graph/Axis/Radar.php index 6a1b95c1..18d9f12f 100644 --- a/includes/pear/Image/Graph/Axis/Radar.php +++ b/includes/pear/Image/Graph/Axis/Radar.php @@ -1,204 +1,204 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Radar.php,v 1.6 2005/08/03 21:22:11 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Axis/Category.php - */ -require_once 'Image/Graph/Axis/Category.php'; - -/** - * Displays an 'X'-axis in a radar plot chart. - * - * This axis maps the number of elements in the dataset to a angle (from 0- - * 360 degrees). Displaying the axis consist of drawing a number of lines from - * center to the edge of the 'circle' than encloses the radar plot. The labels - * are drawn on the 'ends' of these radial lines. - * - * @category Images - * @package Image_Graph - * @subpackage Axis - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Axis_Radar extends Image_Graph_Axis_Category -{ - - /** - * Specifies the number of pixels, the labels is offsetted from the end of - * the axis - * - * @var int - * @access private - */ - var $_distanceFromEnd = 5; - - /** - * Gets the minimum value the axis will show. - * - * This is always 0 - * - * @return double The minumum value - * @access private - */ - function _getMinimum() - { - return 0; - } - - /** - * Gets the maximum value the axis will show. - * - * This is always the number of labels passed to the constructor. - * - * @return double The maximum value - * @access private - */ - function _getMaximum() - { - return count($this->_labels); - } - - /** - * Calculate the delta value (the number of pixels representing one unit - * on the axis) - * - * @return double The label interval - * @access private - */ - function _calcDelta() - { - if (abs($this->_getMaximum() - $this->_getMinimum()) == 0) { - $this->_delta = false; - } else { - $this->_delta = 360 / ($this->_getMaximum() - $this->_getMinimum()); - } - } - - /** - * Get the pixel position represented by a value on the canvas - * - * @param double $value the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _point($value) - { - return (90 + (int) ($this->_value($value) * $this->_delta)) % 360; - } - - /** - * Get the size in pixels of the axis. - * - * For a radar plot this is always 0 - * - * @return int The size of the axis - * @access private - */ - function _size() - { - return 0; - } - - /** - * Sets the distance from the end of the category lines to the label. - * - * @param int $distance The distance in pixels - */ - function setDistanceFromEnd($distance = 5) - { - $this->_distanceFromEnd = $distance; - } - - /** - * Draws axis lines. - * - * @access private - */ - function _drawAxisLines() - { - } - - /** - * Output an axis tick mark. - * - * @param int $value The value to output - * @access private - */ - function _drawTick($value, $level = 1) - { - $centerX = (int) (($this->_left + $this->_right) / 2); - $centerY = (int) (($this->_top + $this->_bottom) / 2); - - $radius = min($this->height(), $this->width()) / 2; - - $endPoint = array ('X' => $value, 'Y' => '#max#'); - $dX = $this->_pointX($endPoint); - $dY = $this->_pointY($endPoint); - - $offX = ($dX - $centerX); - $offY = ($dY - $centerY); - - $hyp = sqrt($offX*$offX + $offY*$offY); - if ($hyp != 0) { - $scale = $this->_distanceFromEnd / $hyp; - } else { - $scale = 1; - } - - $adX = $dX + $offX * $scale; - $adY = $dY + $offY * $scale; - - if (is_object($this->_dataPreProcessor)) { - $labelText = $this->_dataPreProcessor->_process($value); - } else { - $labelText = $value; - } - - if ((abs($dX - $centerX) < 1.5) && ($dY < $centerY)) { - $align = IMAGE_GRAPH_ALIGN_BOTTOM + IMAGE_GRAPH_ALIGN_CENTER_X; - } elseif ((abs($dX - $centerX) < 1.5) && ($dY > $centerY)) { - $align = IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_CENTER_X; - } elseif ($dX < $centerX) { - $align = IMAGE_GRAPH_ALIGN_RIGHT + IMAGE_GRAPH_ALIGN_CENTER_Y; - } else { - $align = IMAGE_GRAPH_ALIGN_LEFT + IMAGE_GRAPH_ALIGN_CENTER_Y; - } - $this->write($adX, $adY, $labelText, $align); - - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $centerX, 'y0' => $centerY, 'x1' => $dX, 'y1' => $dY)); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Radar.php,v 1.6 2005/08/03 21:22:11 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Axis/Category.php + */ +require_once 'Image/Graph/Axis/Category.php'; + +/** + * Displays an 'X'-axis in a radar plot chart. + * + * This axis maps the number of elements in the dataset to a angle (from 0- + * 360 degrees). Displaying the axis consist of drawing a number of lines from + * center to the edge of the 'circle' than encloses the radar plot. The labels + * are drawn on the 'ends' of these radial lines. + * + * @category Images + * @package Image_Graph + * @subpackage Axis + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Axis_Radar extends Image_Graph_Axis_Category +{ + + /** + * Specifies the number of pixels, the labels is offsetted from the end of + * the axis + * + * @var int + * @access private + */ + var $_distanceFromEnd = 5; + + /** + * Gets the minimum value the axis will show. + * + * This is always 0 + * + * @return double The minumum value + * @access private + */ + function _getMinimum() + { + return 0; + } + + /** + * Gets the maximum value the axis will show. + * + * This is always the number of labels passed to the constructor. + * + * @return double The maximum value + * @access private + */ + function _getMaximum() + { + return count($this->_labels); + } + + /** + * Calculate the delta value (the number of pixels representing one unit + * on the axis) + * + * @return double The label interval + * @access private + */ + function _calcDelta() + { + if (abs($this->_getMaximum() - $this->_getMinimum()) == 0) { + $this->_delta = false; + } else { + $this->_delta = 360 / ($this->_getMaximum() - $this->_getMinimum()); + } + } + + /** + * Get the pixel position represented by a value on the canvas + * + * @param double $value the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _point($value) + { + return (90 + (int) ($this->_value($value) * $this->_delta)) % 360; + } + + /** + * Get the size in pixels of the axis. + * + * For a radar plot this is always 0 + * + * @return int The size of the axis + * @access private + */ + function _size() + { + return 0; + } + + /** + * Sets the distance from the end of the category lines to the label. + * + * @param int $distance The distance in pixels + */ + function setDistanceFromEnd($distance = 5) + { + $this->_distanceFromEnd = $distance; + } + + /** + * Draws axis lines. + * + * @access private + */ + function _drawAxisLines() + { + } + + /** + * Output an axis tick mark. + * + * @param int $value The value to output + * @access private + */ + function _drawTick($value, $level = 1) + { + $centerX = (int) (($this->_left + $this->_right) / 2); + $centerY = (int) (($this->_top + $this->_bottom) / 2); + + $radius = min($this->height(), $this->width()) / 2; + + $endPoint = array ('X' => $value, 'Y' => '#max#'); + $dX = $this->_pointX($endPoint); + $dY = $this->_pointY($endPoint); + + $offX = ($dX - $centerX); + $offY = ($dY - $centerY); + + $hyp = sqrt($offX*$offX + $offY*$offY); + if ($hyp != 0) { + $scale = $this->_distanceFromEnd / $hyp; + } else { + $scale = 1; + } + + $adX = $dX + $offX * $scale; + $adY = $dY + $offY * $scale; + + if (is_object($this->_dataPreProcessor)) { + $labelText = $this->_dataPreProcessor->_process($value); + } else { + $labelText = $value; + } + + if ((abs($dX - $centerX) < 1.5) && ($dY < $centerY)) { + $align = IMAGE_GRAPH_ALIGN_BOTTOM + IMAGE_GRAPH_ALIGN_CENTER_X; + } elseif ((abs($dX - $centerX) < 1.5) && ($dY > $centerY)) { + $align = IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_CENTER_X; + } elseif ($dX < $centerX) { + $align = IMAGE_GRAPH_ALIGN_RIGHT + IMAGE_GRAPH_ALIGN_CENTER_Y; + } else { + $align = IMAGE_GRAPH_ALIGN_LEFT + IMAGE_GRAPH_ALIGN_CENTER_Y; + } + $this->write($adX, $adY, $labelText, $align); + + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $centerX, 'y0' => $centerY, 'x1' => $dX, 'y1' => $dY)); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Common.php b/includes/pear/Image/Graph/Common.php index be671e23..d9e428d4 100644 --- a/includes/pear/Image/Graph/Common.php +++ b/includes/pear/Image/Graph/Common.php @@ -1,308 +1,313 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Common.php,v 1.14 2005/10/05 20:51:21 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -if (!function_exists('is_a')) { - - /** - * Check if an object is of a given class, this function is available as of PHP 4.2.0, so if it exist it will not be declared - * - * @link http://www.php.net/manual/en/function.is-a.php PHP.net Online Manual for function is_a() - * @param object $object The object to check class for - * @param string $class_name The name of the class to check the object for - * @return bool Returns TRUE if the object is of this class or has this class as one of its parents - */ - function is_a($object, $class_name) - { - if (empty ($object)) { - return false; - } - $object = is_object($object) ? get_class($object) : $object; - if (strtolower($object) == strtolower($class_name)) { - return true; - } - return is_a(get_parent_class($object), $class_name); - } -} - -/** - * Include file Image/Canvas.php - */ -require_once 'Image/Canvas.php'; - -/** - * The ultimate ancestor of all Image_Graph classes. - * - * This class contains common functionality needed by all Image_Graph classes. - * - * @category Images - * @package Image_Graph - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Common -{ - - /** - * The parent container of the current Image_Graph object - * - * @var Image_Graph_Common - * @access private - */ - var $_parent = null; - - /** - * The sub-elements of the current Image_Graph container object - * - * @var array - * @access private - */ - var $_elements; - - /** - * The canvas for output. - * - * Enables support for multiple output formats. - * - * @var Image_Canvas - * @access private - */ - var $_canvas = null; - - /** - * Is the object visible? - * - * @var bool - * @access private - */ - var $_visible = true; - - /** - * Constructor [Image_Graph_Common] - */ - function Image_Graph_Common() - { - } - - /** - * Resets the elements - * - * @access private - */ - function _reset() - { - if (is_array($this->_elements)) { - $keys = array_keys($this->_elements); - foreach ($keys as $key) { - if (is_object($this->_elements[$key])) { - $this->_elements[$key]->_setParent($this); - @$result =& $this->_elements[$key]->_reset(); - if (PEAR::isError($result)) { - return $result; - } - } - } - unset($keys); - } - return true; - } - - /** - * Sets the parent. The parent chain should ultimately be a GraPHP object - * - * @see Image_Graph_Common - * @param Image_Graph_Common $parent The parent - * @access private - */ - function _setParent(& $parent) - { - $this->_parent =& $parent; - $this->_canvas =& $this->_parent->_getCanvas(); - - if (is_array($this->_elements)) { - $keys = array_keys($this->_elements); - foreach ($keys as $key) { - if (is_object($this->_elements[$key])) { - $this->_elements[$key]->_setParent($this); - } - } - unset($keys); - } - } - - /** - * Hide the element - */ - function hide() - { - $this->_visible = false; - } - - /** - * Get the canvas - * - * @return Image_Canvas The canvas - * @access private - */ - function &_getCanvas() - { - if (($this->_canvas !== null) || ($this->_canvas !== false)) { - return $this->_canvas; - } elseif (is_a($this->_parent, 'Image_Graph_Common')) { - $this->_canvas =& $this->_parent->_getCanvas(); - return $this->_canvas; - } else { - $this->_error('Invalid canvas'); - $result = null; - return $result; - } - } - - /** - * Adds an element to the objects element list. - * - * The new Image_Graph_elements parent is automatically set. - * - * @param Image_Graph_Common $element The new Image_Graph_element - * @return Image_Graph_Common The new Image_Graph_element - */ - function &add(& $element) - { - if (!is_a($element, 'Image_Graph_Font')) { - $this->_elements[] = &$element; - } - $element->_setParent($this); - return $element; - } - - /** - * Creates an object from the class and adds it to the objects element list. - * - * Creates an object from the class specified and adds it to the objects - * element list. If only one parameter is required for the constructor of - * the class simply pass this parameter as the $params parameter, unless the - * parameter is an array or a reference to a value, in that case you must - * 'enclose' the parameter in an array. Similar if the constructor takes - * more than one parameter specify the parameters in an array. - * - * @see Image_Graph::factory() - * @param string $class The class for the object - * @param mixed $params The paramaters to pass to the constructor - * @return Image_Graph_Common The new Image_Graph_element - */ - function &addNew($class, $params = null, $additional = false) - { - include_once 'Image/Graph.php'; - $element =& Image_Graph::factory($class, $params); - if ($additional === false) { - $obj =& $this->add($element); - } else { - $obj =& $this->add($element, $additional); - } - return $obj; - } - - /** - * Shows an error message box on the canvas - * - * @param string $text The error text - * @param array $params An array containing error specific details - * @param int $error_code Error code - * @access private - */ - function _error($text, $params = false, $error_code = IMAGE_GRAPH_ERROR_GENERIC) - { - foreach ($params as $name => $key) { - if (isset($parameters)) { - $parameters .= ' '; - } - $parameters .= $name . '=' . $key; - } - $error =& PEAR::raiseError( - $text . - ($error_code != IMAGE_GRAPH_ERROR_GENERIC ? ' error:' . IMAGE_GRAPH_ERROR_GENERIC : '') . - (isset($parameters) ? ' parameters:[' . $parameters . ']' : '') - ); - } - - /** - * Causes the object to update all sub elements coordinates - * - * (Image_Graph_Common, does not itself have coordinates, this is basically - * an abstract method) - * - * @access private - */ - function _updateCoords() - { - if (is_array($this->_elements)) { - $keys = array_keys($this->_elements); - foreach ($keys as $key) { - if (is_object($this->_elements[$key])) { - $this->_elements[$key]->_updateCoords(); - } - } - unset($keys); - } - return true; - } - - /** - * Causes output to canvas - * - * The last method to call. Calling Done causes output to the canvas. All - * sub elements done() method will be invoked - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (($this->_canvas == null) || (!is_a($this->_canvas, 'Image_Canvas'))) { - return false; - } - - if (is_array($this->_elements)) { - $keys = array_keys($this->_elements); - foreach ($keys as $key) { - if (($this->_elements[$key]->_visible) && ($this->_elements[$key]->_done() === false)) { - return false; - } - } - unset($keys); - } - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Common.php,v 1.16 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +if (!function_exists('is_a')) { + + /** + * Check if an object is of a given class, this function is available as of PHP 4.2.0, so if it exist it will not be declared + * + * @link http://www.php.net/manual/en/function.is-a.php PHP.net Online Manual for function is_a() + * @param object $object The object to check class for + * @param string $class_name The name of the class to check the object for + * @return bool Returns TRUE if the object is of this class or has this class as one of its parents + */ + function is_a($object, $class_name) + { + if (empty ($object)) { + return false; + } + $object = is_object($object) ? get_class($object) : $object; + if (strtolower($object) == strtolower($class_name)) { + return true; + } + return is_a(get_parent_class($object), $class_name); + } +} + +/** + * Include file Image/Canvas.php + */ +require_once 'Image/Canvas.php'; + +/** + * The ultimate ancestor of all Image_Graph classes. + * + * This class contains common functionality needed by all Image_Graph classes. + * + * @category Images + * @package Image_Graph + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Common +{ + + /** + * The parent container of the current Image_Graph object + * + * @var Image_Graph_Common + * @access private + */ + var $_parent = null; + + /** + * The sub-elements of the current Image_Graph container object + * + * @var array + * @access private + */ + var $_elements; + + /** + * The canvas for output. + * + * Enables support for multiple output formats. + * + * @var Image_Canvas + * @access private + */ + var $_canvas = null; + + /** + * Is the object visible? + * + * @var bool + * @access private + */ + var $_visible = true; + + /** + * Constructor [Image_Graph_Common] + */ + function Image_Graph_Common() + { + } + + /** + * Resets the elements + * + * @access private + */ + function _reset() + { + if (is_array($this->_elements)) { + $keys = array_keys($this->_elements); + foreach ($keys as $key) { + if (is_object($this->_elements[$key])) { + $this->_elements[$key]->_setParent($this); + $result =& $this->_elements[$key]->_reset(); + if (PEAR::isError($result)) { + return $result; + } + } + } + unset($keys); + } + return true; + } + + /** + * Sets the parent. The parent chain should ultimately be a GraPHP object + * + * @see Image_Graph_Common + * @param Image_Graph_Common $parent The parent + * @access private + */ + function _setParent(& $parent) + { + $this->_parent =& $parent; + $this->_canvas =& $this->_parent->_getCanvas(); + + if (is_array($this->_elements)) { + $keys = array_keys($this->_elements); + foreach ($keys as $key) { + if (is_object($this->_elements[$key])) { + $this->_elements[$key]->_setParent($this); + } + } + unset($keys); + } + } + + /** + * Hide the element + */ + function hide() + { + $this->_visible = false; + } + + /** + * Get the canvas + * + * @return Image_Canvas The canvas + * @access private + */ + function &_getCanvas() + { + if (($this->_canvas !== null) || ($this->_canvas !== false)) { + return $this->_canvas; + } elseif (is_a($this->_parent, 'Image_Graph_Common')) { + $this->_canvas =& $this->_parent->_getCanvas(); + return $this->_canvas; + } else { + $this->_error('Invalid canvas'); + $result = null; + return $result; + } + } + + /** + * Adds an element to the objects element list. + * + * The new Image_Graph_elements parent is automatically set. + * + * @param Image_Graph_Common $element The new Image_Graph_element + * @return Image_Graph_Common The new Image_Graph_element + */ + function &add(& $element) + { + if (!is_a($element, 'Image_Graph_Font')) { + $this->_elements[] = &$element; + } + $element->_setParent($this); + return $element; + } + + /** + * Creates an object from the class and adds it to the objects element list. + * + * Creates an object from the class specified and adds it to the objects + * element list. If only one parameter is required for the constructor of + * the class simply pass this parameter as the $params parameter, unless the + * parameter is an array or a reference to a value, in that case you must + * 'enclose' the parameter in an array. Similar if the constructor takes + * more than one parameter specify the parameters in an array. + * + * @see Image_Graph::factory() + * @param string $class The class for the object + * @param mixed $params The paramaters to pass to the constructor + * @return Image_Graph_Common The new Image_Graph_element + */ + function &addNew($class, $params = null, $additional = false) + { + include_once 'Image/Graph.php'; + $element =& Image_Graph::factory($class, $params); + if ($additional === false) { + $obj =& $this->add($element); + } else { + $obj =& $this->add($element, $additional); + } + return $obj; + } + + /** + * Shows an error message box on the canvas + * + * @param string $text The error text + * @param array $params An array containing error specific details + * @param int $error_code Error code + * @access private + */ + function _error($text, $params = false, $error_code = IMAGE_GRAPH_ERROR_GENERIC) + { + if ((is_array($params)) && (count($params) > 0)) { + foreach ($params as $name => $key) { + if (isset($parameters)) { + $parameters .= ' '; + } + else { + $parameters = ''; + } + $parameters .= $name . '=' . $key; + } + } + $error =& PEAR::raiseError( + $text . + ($error_code != IMAGE_GRAPH_ERROR_GENERIC ? ' error:' . IMAGE_GRAPH_ERROR_GENERIC : '') . + (isset($parameters) ? ' parameters:[' . $parameters . ']' : '') + ); + } + + /** + * Causes the object to update all sub elements coordinates + * + * (Image_Graph_Common, does not itself have coordinates, this is basically + * an abstract method) + * + * @access private + */ + function _updateCoords() + { + if (is_array($this->_elements)) { + $keys = array_keys($this->_elements); + foreach ($keys as $key) { + if (is_object($this->_elements[$key])) { + $this->_elements[$key]->_updateCoords(); + } + } + unset($keys); + } + return true; + } + + /** + * Causes output to canvas + * + * The last method to call. Calling Done causes output to the canvas. All + * sub elements done() method will be invoked + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (($this->_canvas == null) || (!is_a($this->_canvas, 'Image_Canvas'))) { + return false; + } + + if (is_array($this->_elements)) { + $keys = array_keys($this->_elements); + foreach ($keys as $key) { + if (($this->_elements[$key]->_visible) && ($this->_elements[$key]->_done() === false)) { + return false; + } + } + unset($keys); + } + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Config.php b/includes/pear/Image/Graph/Config.php index f5385556..aa5ddf5e 100644 --- a/includes/pear/Image/Graph/Config.php +++ b/includes/pear/Image/Graph/Config.php @@ -1,30 +1,30 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Config.php,v 1.7 2005/08/03 21:21:52 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Config.php,v 1.7 2005/08/03 21:21:52 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Constants.php b/includes/pear/Image/Graph/Constants.php index 030f36d6..669be4de 100644 --- a/includes/pear/Image/Graph/Constants.php +++ b/includes/pear/Image/Graph/Constants.php @@ -1,225 +1,225 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Constants.php,v 1.7 2005/08/03 21:21:52 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Font.php - */ -require_once 'Image/Graph/Font.php'; - -// Constant declarations - -/** - * Defines an X (horizontal) axis - */ -define('IMAGE_GRAPH_AXIS_X', 1); - -/** - * Defines an Y (vertical) axis - */ -define('IMAGE_GRAPH_AXIS_Y', 2); - -/** - * Defines an Y (vertical) axis - */ -define('IMAGE_GRAPH_AXIS_Y_SECONDARY', 3); - -/** - * Defines an horizontal (X) axis - */ -define('IMAGE_GRAPH_AXIS_HORIZONTAL', 1); - -/** - * Defines an vertical (Y) axis - */ -define('IMAGE_GRAPH_AXIS_VERTICAL', 2); - -/** - * Define if label should be shown for axis minimum value - */ -define('IMAGE_GRAPH_LABEL_MINIMUM', 1); - -/** - * Define if label should be shown for axis 0 (zero) value - */ -define('IMAGE_GRAPH_LABEL_ZERO', 2); - -/** - * Define if label should be shown for axis maximum value - */ -define('IMAGE_GRAPH_LABEL_MAXIMUM', 4); - -/** - * Defines a horizontal gradient fill - */ -define('IMAGE_GRAPH_GRAD_HORIZONTAL', 1); - -/** - * Defines a vertical gradient fill - */ -define('IMAGE_GRAPH_GRAD_VERTICAL', 2); - -/** - * Defines a horizontally mirrored gradient fill - */ -define('IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED', 3); - -/** - * Defines a vertically mirrored gradient fill - */ -define('IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED', 4); - -/** - * Defines a diagonal gradient fill from top-left to bottom-right - */ -define('IMAGE_GRAPH_GRAD_DIAGONALLY_TL_BR', 5); - -/** - * Defines a diagonal gradient fill from bottom-left to top-right - */ -define('IMAGE_GRAPH_GRAD_DIAGONALLY_BL_TR', 6); - -/** - * Defines a radial gradient fill - */ -define('IMAGE_GRAPH_GRAD_RADIAL', 7); - -/** - * Defines the default builtin font - */ -define('IMAGE_GRAPH_FONT', 1); - -/** - * Defines a X value should be used - */ -define('IMAGE_GRAPH_VALUE_X', 0); - -/** - * Defines a Y value should be used - */ -define('IMAGE_GRAPH_VALUE_Y', 1); - -/** - * Defines a min X% value should be used - */ -define('IMAGE_GRAPH_PCT_X_MIN', 2); - -/** - * Defines a max X% value should be used - */ -define('IMAGE_GRAPH_PCT_X_MAX', 3); - -/** - * Defines a min Y% value should be used - */ -define('IMAGE_GRAPH_PCT_Y_MIN', 4); - -/** - * Defines a max Y% value should be used - */ -define('IMAGE_GRAPH_PCT_Y_MAX', 5); - -/** - * Defines a total Y% value should be used - */ -define('IMAGE_GRAPH_PCT_Y_TOTAL', 6); - -/** - * Defines a ID value should be used - */ -define('IMAGE_GRAPH_POINT_ID', 7); - -/** - * Align text left - */ -define('IMAGE_GRAPH_ALIGN_LEFT', 0x1); - -/** - * Align text right - */ -define('IMAGE_GRAPH_ALIGN_RIGHT', 0x2); - -/** - * Align text center x (horizontal) - */ -define('IMAGE_GRAPH_ALIGN_CENTER_X', 0x4); - -/** - * Align text top - */ -define('IMAGE_GRAPH_ALIGN_TOP', 0x8); - -/** - * Align text bottom - */ -define('IMAGE_GRAPH_ALIGN_BOTTOM', 0x10); - -/** - * Align text center y (vertical) - */ -define('IMAGE_GRAPH_ALIGN_CENTER_Y', 0x20); - -/** - * Align text center (both x and y) - */ -define('IMAGE_GRAPH_ALIGN_CENTER', IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_CENTER_Y); - -/** - * Align text top left - */ -define('IMAGE_GRAPH_ALIGN_TOP_LEFT', IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_LEFT); - -/** - * Align text top right - */ -define('IMAGE_GRAPH_ALIGN_TOP_RIGHT', IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_RIGHT); - -/** - * Align text bottom left - */ -define('IMAGE_GRAPH_ALIGN_BOTTOM_LEFT', IMAGE_GRAPH_ALIGN_BOTTOM + IMAGE_GRAPH_ALIGN_LEFT); - -/** - * Align text bottom right - */ -define('IMAGE_GRAPH_ALIGN_BOTTOM_RIGHT', IMAGE_GRAPH_ALIGN_BOTTOM + IMAGE_GRAPH_ALIGN_RIGHT); - -/** - * Align vertical - */ -define('IMAGE_GRAPH_ALIGN_VERTICAL', IMAGE_GRAPH_ALIGN_TOP); - -/** - * Align horizontal - */ -define('IMAGE_GRAPH_ALIGN_HORIZONTAL', IMAGE_GRAPH_ALIGN_LEFT); - -// Error codes -define('IMAGE_GRAPH_ERROR_GENERIC', 0); - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Constants.php,v 1.7 2005/08/03 21:21:52 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Font.php + */ +require_once 'Image/Graph/Font.php'; + +// Constant declarations + +/** + * Defines an X (horizontal) axis + */ +define('IMAGE_GRAPH_AXIS_X', 1); + +/** + * Defines an Y (vertical) axis + */ +define('IMAGE_GRAPH_AXIS_Y', 2); + +/** + * Defines an Y (vertical) axis + */ +define('IMAGE_GRAPH_AXIS_Y_SECONDARY', 3); + +/** + * Defines an horizontal (X) axis + */ +define('IMAGE_GRAPH_AXIS_HORIZONTAL', 1); + +/** + * Defines an vertical (Y) axis + */ +define('IMAGE_GRAPH_AXIS_VERTICAL', 2); + +/** + * Define if label should be shown for axis minimum value + */ +define('IMAGE_GRAPH_LABEL_MINIMUM', 1); + +/** + * Define if label should be shown for axis 0 (zero) value + */ +define('IMAGE_GRAPH_LABEL_ZERO', 2); + +/** + * Define if label should be shown for axis maximum value + */ +define('IMAGE_GRAPH_LABEL_MAXIMUM', 4); + +/** + * Defines a horizontal gradient fill + */ +define('IMAGE_GRAPH_GRAD_HORIZONTAL', 1); + +/** + * Defines a vertical gradient fill + */ +define('IMAGE_GRAPH_GRAD_VERTICAL', 2); + +/** + * Defines a horizontally mirrored gradient fill + */ +define('IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED', 3); + +/** + * Defines a vertically mirrored gradient fill + */ +define('IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED', 4); + +/** + * Defines a diagonal gradient fill from top-left to bottom-right + */ +define('IMAGE_GRAPH_GRAD_DIAGONALLY_TL_BR', 5); + +/** + * Defines a diagonal gradient fill from bottom-left to top-right + */ +define('IMAGE_GRAPH_GRAD_DIAGONALLY_BL_TR', 6); + +/** + * Defines a radial gradient fill + */ +define('IMAGE_GRAPH_GRAD_RADIAL', 7); + +/** + * Defines the default builtin font + */ +define('IMAGE_GRAPH_FONT', 1); + +/** + * Defines a X value should be used + */ +define('IMAGE_GRAPH_VALUE_X', 0); + +/** + * Defines a Y value should be used + */ +define('IMAGE_GRAPH_VALUE_Y', 1); + +/** + * Defines a min X% value should be used + */ +define('IMAGE_GRAPH_PCT_X_MIN', 2); + +/** + * Defines a max X% value should be used + */ +define('IMAGE_GRAPH_PCT_X_MAX', 3); + +/** + * Defines a min Y% value should be used + */ +define('IMAGE_GRAPH_PCT_Y_MIN', 4); + +/** + * Defines a max Y% value should be used + */ +define('IMAGE_GRAPH_PCT_Y_MAX', 5); + +/** + * Defines a total Y% value should be used + */ +define('IMAGE_GRAPH_PCT_Y_TOTAL', 6); + +/** + * Defines a ID value should be used + */ +define('IMAGE_GRAPH_POINT_ID', 7); + +/** + * Align text left + */ +define('IMAGE_GRAPH_ALIGN_LEFT', 0x1); + +/** + * Align text right + */ +define('IMAGE_GRAPH_ALIGN_RIGHT', 0x2); + +/** + * Align text center x (horizontal) + */ +define('IMAGE_GRAPH_ALIGN_CENTER_X', 0x4); + +/** + * Align text top + */ +define('IMAGE_GRAPH_ALIGN_TOP', 0x8); + +/** + * Align text bottom + */ +define('IMAGE_GRAPH_ALIGN_BOTTOM', 0x10); + +/** + * Align text center y (vertical) + */ +define('IMAGE_GRAPH_ALIGN_CENTER_Y', 0x20); + +/** + * Align text center (both x and y) + */ +define('IMAGE_GRAPH_ALIGN_CENTER', IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_CENTER_Y); + +/** + * Align text top left + */ +define('IMAGE_GRAPH_ALIGN_TOP_LEFT', IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_LEFT); + +/** + * Align text top right + */ +define('IMAGE_GRAPH_ALIGN_TOP_RIGHT', IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_RIGHT); + +/** + * Align text bottom left + */ +define('IMAGE_GRAPH_ALIGN_BOTTOM_LEFT', IMAGE_GRAPH_ALIGN_BOTTOM + IMAGE_GRAPH_ALIGN_LEFT); + +/** + * Align text bottom right + */ +define('IMAGE_GRAPH_ALIGN_BOTTOM_RIGHT', IMAGE_GRAPH_ALIGN_BOTTOM + IMAGE_GRAPH_ALIGN_RIGHT); + +/** + * Align vertical + */ +define('IMAGE_GRAPH_ALIGN_VERTICAL', IMAGE_GRAPH_ALIGN_TOP); + +/** + * Align horizontal + */ +define('IMAGE_GRAPH_ALIGN_HORIZONTAL', IMAGE_GRAPH_ALIGN_LEFT); + +// Error codes +define('IMAGE_GRAPH_ERROR_GENERIC', 0); + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor.php b/includes/pear/Image/Graph/DataPreprocessor.php index 6bdf37aa..1806d81b 100644 --- a/includes/pear/Image/Graph/DataPreprocessor.php +++ b/includes/pear/Image/Graph/DataPreprocessor.php @@ -1,74 +1,74 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: DataPreprocessor.php,v 1.7 2005/08/24 20:35:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Data preprocessor used for preformatting a data. - * - * A data preprocessor is used in cases where a value from a dataset or label must be - * displayed in another format or way than entered. This could for example be the need - * to display X-values as a date instead of 1, 2, 3, .. or even worse unix-timestamps. - * It could also be when a {@link Image_Graph_Marker_Value} needs to display values as percentages - * with 1 decimal digit instead of the default formatting (fx. 12.01271 -> 12.0%). - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_DataPreprocessor -{ - - /** - * Image_Graph_DataPreprocessor [Constructor]. - */ - function Image_Graph_DataPreprocessor() - { - } - - /** - * Process the value - * - * @param var $value The value to process/format - * @return string The processed value - * @access private - */ - function _process($value) - { - return $value; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: DataPreprocessor.php,v 1.7 2005/08/24 20:35:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Data preprocessor used for preformatting a data. + * + * A data preprocessor is used in cases where a value from a dataset or label must be + * displayed in another format or way than entered. This could for example be the need + * to display X-values as a date instead of 1, 2, 3, .. or even worse unix-timestamps. + * It could also be when a {@link Image_Graph_Marker_Value} needs to display values as percentages + * with 1 decimal digit instead of the default formatting (fx. 12.01271 -> 12.0%). + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_DataPreprocessor +{ + + /** + * Image_Graph_DataPreprocessor [Constructor]. + */ + function Image_Graph_DataPreprocessor() + { + } + + /** + * Process the value + * + * @param var $value The value to process/format + * @return string The processed value + * @access private + */ + function _process($value) + { + return $value; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor/Array.php b/includes/pear/Image/Graph/DataPreprocessor/Array.php index 4586055a..6a6b808d 100644 --- a/includes/pear/Image/Graph/DataPreprocessor/Array.php +++ b/includes/pear/Image/Graph/DataPreprocessor/Array.php @@ -1,103 +1,103 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Array.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataPreprocessor.php - */ -require_once 'Image/Graph/DataPreprocessor.php'; - -/** - * Format data as looked up in an array. - * - * ArrayData is useful when a numercal value is to be translated to - * something thats cannot directly be calculated from this value, this could for - * example be a dataset meant to plot population of various countries. Since x- - * values are numerical and they should really be country names, but there is no - * linear correlation between the number and the name, we use an array to 'map' - * the numbers to the name, i.e. $array[0] = 'Denmark'; $array[1] = 'Sweden'; - * ..., where the indexes are the numerical values from the dataset. This is NOT - * usefull when the x-values are a large domain, i.e. to map unix timestamps to - * date-strings for an x-axis. This is because the x-axis will selecte arbitrary - * values for labels, which would in principle require the ArrayData to hold - * values for every unix timestamp. However ArrayData can still be used to solve - * such a situation, since one can use another value for X-data in the dataset - * and then map this (smaller domain) value to a date. That is we for example - * instead of using the unix-timestamp we use value 0 to represent the 1st date, - * 1 to represent the next date, etc. - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataPreprocessor_Array extends Image_Graph_DataPreprocessor -{ - - /** - * The data label array - * @var array - * @access private - */ - var $_dataArray; - - /** - * Image_Graph_ArrayData [Constructor]. - * - * @param array $array The array to use as a lookup table - */ - function Image_Graph_DataPreprocessor_Array($array) - { - parent::Image_Graph_DataPreprocessor(); - $this->_dataArray = $array; - } - - /** - * Process the value - * - * @param var $value The value to process/format - * @return string The processed value - * @access private - */ - function _process($value) - { - if ((is_array($this->_dataArray)) && (isset ($this->_dataArray[$value]))) { - return $this->_dataArray[$value]; - } else { - return $value; - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Array.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataPreprocessor.php + */ +require_once 'Image/Graph/DataPreprocessor.php'; + +/** + * Format data as looked up in an array. + * + * ArrayData is useful when a numercal value is to be translated to + * something thats cannot directly be calculated from this value, this could for + * example be a dataset meant to plot population of various countries. Since x- + * values are numerical and they should really be country names, but there is no + * linear correlation between the number and the name, we use an array to 'map' + * the numbers to the name, i.e. $array[0] = 'Denmark'; $array[1] = 'Sweden'; + * ..., where the indexes are the numerical values from the dataset. This is NOT + * usefull when the x-values are a large domain, i.e. to map unix timestamps to + * date-strings for an x-axis. This is because the x-axis will selecte arbitrary + * values for labels, which would in principle require the ArrayData to hold + * values for every unix timestamp. However ArrayData can still be used to solve + * such a situation, since one can use another value for X-data in the dataset + * and then map this (smaller domain) value to a date. That is we for example + * instead of using the unix-timestamp we use value 0 to represent the 1st date, + * 1 to represent the next date, etc. + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataPreprocessor_Array extends Image_Graph_DataPreprocessor +{ + + /** + * The data label array + * @var array + * @access private + */ + var $_dataArray; + + /** + * Image_Graph_ArrayData [Constructor]. + * + * @param array $array The array to use as a lookup table + */ + function Image_Graph_DataPreprocessor_Array($array) + { + parent::Image_Graph_DataPreprocessor(); + $this->_dataArray = $array; + } + + /** + * Process the value + * + * @param var $value The value to process/format + * @return string The processed value + * @access private + */ + function _process($value) + { + if ((is_array($this->_dataArray)) && (isset ($this->_dataArray[$value]))) { + return $this->_dataArray[$value]; + } else { + return $value; + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor/Currency.php b/includes/pear/Image/Graph/DataPreprocessor/Currency.php index 35aa96f2..eb24e175 100644 --- a/includes/pear/Image/Graph/DataPreprocessor/Currency.php +++ b/includes/pear/Image/Graph/DataPreprocessor/Currency.php @@ -1,66 +1,66 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Currency.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataPreprocessor/Formatted.php - */ -require_once 'Image/Graph/DataPreprocessor/Formatted.php'; - -/** - * Format data as a currency. - * - * Uses the {@link Image_Graph_DataPreprocessor_Formatted} to represent the - * values as a currency, i.e. 10 => € 10.00 - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataPreprocessor_Currency extends Image_Graph_DataPreprocessor_Formatted -{ - - /** - * Image_Graph_CurrencyData [Constructor]. - * - * @param string $currencySymbol The symbol representing the currency - */ - function Image_Graph_DataPreprocessor_Currency($currencySymbol) - { - parent::Image_Graph_DataPreprocessor_Formatted("$currencySymbol %0.2f"); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Currency.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataPreprocessor/Formatted.php + */ +require_once 'Image/Graph/DataPreprocessor/Formatted.php'; + +/** + * Format data as a currency. + * + * Uses the {@link Image_Graph_DataPreprocessor_Formatted} to represent the + * values as a currency, i.e. 10 => € 10.00 + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataPreprocessor_Currency extends Image_Graph_DataPreprocessor_Formatted +{ + + /** + * Image_Graph_CurrencyData [Constructor]. + * + * @param string $currencySymbol The symbol representing the currency + */ + function Image_Graph_DataPreprocessor_Currency($currencySymbol) + { + parent::Image_Graph_DataPreprocessor_Formatted("$currencySymbol %0.2f"); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor/Date.php b/includes/pear/Image/Graph/DataPreprocessor/Date.php index e522b6d3..4fe83af8 100644 --- a/includes/pear/Image/Graph/DataPreprocessor/Date.php +++ b/includes/pear/Image/Graph/DataPreprocessor/Date.php @@ -1,90 +1,90 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Date.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataPreprocessor.php - */ -require_once 'Image/Graph/DataPreprocessor.php'; - -/** - * Formats Unix timestamp as a date using specified format. - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataPreprocessor_Date extends Image_Graph_DataPreprocessor -{ - - /** - * The format of the Unix time stamp. - * See PHP - * Manual for a description - * @var string - * @access private - */ - var $_format; - - /** - * Create a DateData preprocessor [Constructor] - * - * @param string $format See {@link http://www.php.net/manual/en/function.date.php - * PHP Manual} for a description - */ - function Image_Graph_DataPreprocessor_Date($format) - { - parent::Image_Graph_DataPreprocessor(); - $this->_format = $format; - } - - /** - * Process the value - * - * @param var $value The value to process/format - * @return string The processed value - * @access private - */ - function _process($value) - { - if (!$value) { - return false; - } else { - return date($this->_format, $value); - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Date.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataPreprocessor.php + */ +require_once 'Image/Graph/DataPreprocessor.php'; + +/** + * Formats Unix timestamp as a date using specified format. + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataPreprocessor_Date extends Image_Graph_DataPreprocessor +{ + + /** + * The format of the Unix time stamp. + * See PHP + * Manual for a description + * @var string + * @access private + */ + var $_format; + + /** + * Create a DateData preprocessor [Constructor] + * + * @param string $format See {@link http://www.php.net/manual/en/function.date.php + * PHP Manual} for a description + */ + function Image_Graph_DataPreprocessor_Date($format) + { + parent::Image_Graph_DataPreprocessor(); + $this->_format = $format; + } + + /** + * Process the value + * + * @param var $value The value to process/format + * @return string The processed value + * @access private + */ + function _process($value) + { + if (!$value) { + return false; + } else { + return date($this->_format, $value); + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor/Formatted.php b/includes/pear/Image/Graph/DataPreprocessor/Formatted.php index d5fec662..499b14c2 100644 --- a/includes/pear/Image/Graph/DataPreprocessor/Formatted.php +++ b/includes/pear/Image/Graph/DataPreprocessor/Formatted.php @@ -1,90 +1,90 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Formatted.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataPreprocessor.php - */ -require_once 'Image/Graph/DataPreprocessor.php'; - -/** - * Format data using a (s)printf pattern. - * - * This method is useful when data must displayed using a simple (s) printf - * pattern as described in the {@link http://www.php. net/manual/en/function. - * sprintf.php PHP manual} - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataPreprocessor_Formatted extends Image_Graph_DataPreprocessor -{ - - /** - * A (s)printf format string. - * See {@link http://www.php.net/manual/en/function.sprintf.php PHP Manual} - * for a description - * @var string - * @access private - */ - var $_format; - - /** - * Create a (s)printf format data preprocessor - * - * @param string $format See {@link http://www.php.net/manual/en/function.sprintf.php - * PHP Manual} for a description - */ - function Image_Graph_DataPreprocessor_Formatted($format) - { - parent::Image_Graph_DataPreprocessor(); - $this->_format = $format; - } - - /** - * Process the value - * - * @param var $value The value to process/format - * @return string The processed value - * @access private - */ - function _process($value) - { - return sprintf($this->_format, $value); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Formatted.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataPreprocessor.php + */ +require_once 'Image/Graph/DataPreprocessor.php'; + +/** + * Format data using a (s)printf pattern. + * + * This method is useful when data must displayed using a simple (s) printf + * pattern as described in the {@link http://www.php. net/manual/en/function. + * sprintf.php PHP manual} + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataPreprocessor_Formatted extends Image_Graph_DataPreprocessor +{ + + /** + * A (s)printf format string. + * See {@link http://www.php.net/manual/en/function.sprintf.php PHP Manual} + * for a description + * @var string + * @access private + */ + var $_format; + + /** + * Create a (s)printf format data preprocessor + * + * @param string $format See {@link http://www.php.net/manual/en/function.sprintf.php + * PHP Manual} for a description + */ + function Image_Graph_DataPreprocessor_Formatted($format) + { + parent::Image_Graph_DataPreprocessor(); + $this->_format = $format; + } + + /** + * Process the value + * + * @param var $value The value to process/format + * @return string The processed value + * @access private + */ + function _process($value) + { + return sprintf($this->_format, $value); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor/Function.php b/includes/pear/Image/Graph/DataPreprocessor/Function.php index ba1bacbc..d08025b8 100644 --- a/includes/pear/Image/Graph/DataPreprocessor/Function.php +++ b/includes/pear/Image/Graph/DataPreprocessor/Function.php @@ -1,92 +1,92 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Function.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataPreprocessor.php - */ -require_once 'Image/Graph/DataPreprocessor.php'; - -/** - * Formatting a value using a userdefined function. - * - * Use this method to convert/format a value to a 'displayable' lable using a (perhaps) - * more complex function. An example could be (not very applicable though) if one would - * need for values to be displayed on the reverse order, i.e. 1234 would be displayed as - * 4321, then this method can solve this by creating the function that converts the value - * and use the FunctionData datapreprocessor to make Image_Graph use this function. - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataPreprocessor_Function extends Image_Graph_DataPreprocessor -{ - - /** - * The name of the PHP function - * @var string - * @access private - */ - var $_dataFunction; - - /** - * Create a FunctionData preprocessor - * - * @param string $function The name of the PHP function to use as - * a preprocessor, this function must take a single parameter and return a - * formatted version of this parameter - */ - function Image_Graph_DataPreprocessor_Function($function) - { - parent::Image_Graph_DataPreprocessor(); - $this->_dataFunction = $function; - } - - /** - * Process the value - * - * @param var $value The value to process/format - * @return string The processed value - * @access private - */ - function _process($value) - { - $function = $this->_dataFunction; - return $function ($value); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Function.php,v 1.7 2005/11/11 17:53:44 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataPreprocessor.php + */ +require_once 'Image/Graph/DataPreprocessor.php'; + +/** + * Formatting a value using a userdefined function. + * + * Use this method to convert/format a value to a 'displayable' lable using a (perhaps) + * more complex function. An example could be (not very applicable though) if one would + * need for values to be displayed on the reverse order, i.e. 1234 would be displayed as + * 4321, then this method can solve this by creating the function that converts the value + * and use the FunctionData datapreprocessor to make Image_Graph use this function. + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataPreprocessor_Function extends Image_Graph_DataPreprocessor +{ + + /** + * The name of the PHP function + * @var string + * @access private + */ + var $_dataFunction; + + /** + * Create a FunctionData preprocessor + * + * @param string $function The name of the PHP function to use as + * a preprocessor, this function must take a single parameter and return a + * formatted version of this parameter + */ + function Image_Graph_DataPreprocessor_Function($function) + { + parent::Image_Graph_DataPreprocessor(); + $this->_dataFunction = $function; + } + + /** + * Process the value + * + * @param var $value The value to process/format + * @return string The processed value + * @access private + */ + function _process($value) + { + $function = $this->_dataFunction; + return call_user_func($function, $value); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor/NumberText.php b/includes/pear/Image/Graph/DataPreprocessor/NumberText.php index b380c041..6c4c9ef2 100644 --- a/includes/pear/Image/Graph/DataPreprocessor/NumberText.php +++ b/includes/pear/Image/Graph/DataPreprocessor/NumberText.php @@ -1,89 +1,89 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: NumberText.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataPreprocessor.php - */ -require_once 'Image/Graph/DataPreprocessor.php'; - -/** - * Formatting a number as its written in languages supported by Numbers_Words. - * - * Used to display values as text, i.e. 123 is displayed as one hundred and twenty three. - * Requires Numbers_Words - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataPreprocessor_NumberText extends Image_Graph_DataPreprocessor -{ - - /** - * The language identifier - * @var string - * @access private - */ - var $_language; - - /** - * Image_Graph_NumberText [Constructor]. - * - * Supported languages see {@link http://pear.php.net/package/Numbers_Words Numbers_Words} - * - * @param string $langugage The language identifier for the language. - */ - function Image_Graph_DataPreprocessor_NumberText($language = 'en_US') - { - parent::Image_Graph_DataPreprocessor(); - $this->_language = $language; - require_once 'Numbers/Words.php'; - } - - /** - * Process the value - * - * @param var $value The value to process/format - * @return string The processed value - * @access private - */ - function _process($value) - { - return Numbers_Words::toWords($value, $this->_language); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: NumberText.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataPreprocessor.php + */ +require_once 'Image/Graph/DataPreprocessor.php'; + +/** + * Formatting a number as its written in languages supported by Numbers_Words. + * + * Used to display values as text, i.e. 123 is displayed as one hundred and twenty three. + * Requires Numbers_Words + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataPreprocessor_NumberText extends Image_Graph_DataPreprocessor +{ + + /** + * The language identifier + * @var string + * @access private + */ + var $_language; + + /** + * Image_Graph_NumberText [Constructor]. + * + * Supported languages see {@link http://pear.php.net/package/Numbers_Words Numbers_Words} + * + * @param string $langugage The language identifier for the language. + */ + function Image_Graph_DataPreprocessor_NumberText($language = 'en_US') + { + parent::Image_Graph_DataPreprocessor(); + $this->_language = $language; + require_once 'Numbers/Words.php'; + } + + /** + * Process the value + * + * @param var $value The value to process/format + * @return string The processed value + * @access private + */ + function _process($value) + { + return Numbers_Words::toWords($value, $this->_language); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor/RomanNumerals.php b/includes/pear/Image/Graph/DataPreprocessor/RomanNumerals.php index 4368d92e..29831adf 100644 --- a/includes/pear/Image/Graph/DataPreprocessor/RomanNumerals.php +++ b/includes/pear/Image/Graph/DataPreprocessor/RomanNumerals.php @@ -1,79 +1,79 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: RomanNumerals.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataPreprocessor.php - */ -require_once 'Image/Graph/DataPreprocessor.php'; - -/** - * Formatting a value as a roman numerals. - * - * Values are formatted as roman numeral, i.e. 1 = I, 2 = II, 9 = IX, 2004 = MMIV. - * Requires Numbers_Roman - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataPreprocessor_RomanNumerals extends Image_Graph_DataPreprocessor -{ - - /** - * Create a RomanNumerals preprocessor - * - * See {@link http://pear.php.net/package/Numbers_Roman Numbers_Roman} - */ - function Image_Graph_DataPreprocessor_RomanNumerals() - { - parent::Image_Graph_DataPreprocessor(); - include_once 'Numbers/Roman.php'; - } - - /** - * Process the value - * - * @param var $value The value to process/format - * @return string The processed value - * @access private - */ - function _process($value) - { - return Numbers_Roman::toNumeral($value); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: RomanNumerals.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataPreprocessor.php + */ +require_once 'Image/Graph/DataPreprocessor.php'; + +/** + * Formatting a value as a roman numerals. + * + * Values are formatted as roman numeral, i.e. 1 = I, 2 = II, 9 = IX, 2004 = MMIV. + * Requires Numbers_Roman + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataPreprocessor_RomanNumerals extends Image_Graph_DataPreprocessor +{ + + /** + * Create a RomanNumerals preprocessor + * + * See {@link http://pear.php.net/package/Numbers_Roman Numbers_Roman} + */ + function Image_Graph_DataPreprocessor_RomanNumerals() + { + parent::Image_Graph_DataPreprocessor(); + include_once 'Numbers/Roman.php'; + } + + /** + * Process the value + * + * @param var $value The value to process/format + * @return string The processed value + * @access private + */ + function _process($value) + { + return Numbers_Roman::toNumeral($value); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataPreprocessor/Sequential.php b/includes/pear/Image/Graph/DataPreprocessor/Sequential.php index 23f8f00a..8305339a 100644 --- a/includes/pear/Image/Graph/DataPreprocessor/Sequential.php +++ b/includes/pear/Image/Graph/DataPreprocessor/Sequential.php @@ -1,67 +1,67 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Sequential.php,v 1.5 2005/02/21 20:49:50 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataPreprocessor/Array.php - */ -require_once 'Image/Graph/DataPreprocessor/Array.php'; - -/** - * Formatting values using a sequential data label array, ie. returning the - * 'next label' when asked for any label. - * - * @category Images - * @package Image_Graph - * @subpackage DataPreprocessor - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataPreprocessor_Sequential extends Image_Graph_DataPreprocessor_Array -{ - - /** - * Process the value - * - * @param var $value The value to process/format - * @return string The processed value - * @access private - */ - function _process($value) - { - list ($id, $value) = each($this->_dataArray); - return $value; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Sequential.php,v 1.5 2005/02/21 20:49:50 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataPreprocessor/Array.php + */ +require_once 'Image/Graph/DataPreprocessor/Array.php'; + +/** + * Formatting values using a sequential data label array, ie. returning the + * 'next label' when asked for any label. + * + * @category Images + * @package Image_Graph + * @subpackage DataPreprocessor + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataPreprocessor_Sequential extends Image_Graph_DataPreprocessor_Array +{ + + /** + * Process the value + * + * @param var $value The value to process/format + * @return string The processed value + * @access private + */ + function _process($value) + { + list ($id, $value) = each($this->_dataArray); + return $value; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataSelector.php b/includes/pear/Image/Graph/DataSelector.php index f3b6a3f0..ce50ac58 100644 --- a/includes/pear/Image/Graph/DataSelector.php +++ b/includes/pear/Image/Graph/DataSelector.php @@ -1,67 +1,67 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: DataSelector.php,v 1.7 2005/08/24 20:35:56 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Filter used for selecting which data to show as markers - * - * @category Images - * @package Image_Graph - * @subpackage DataSelector - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataSelector -{ - - /** - * Image_Graph_DataSelector [Constructor] - */ - function Image_Graph_DataSelector() - { - } - - /** - * Check if a specified value should be 'selected', ie shown as a marker - * - * @param array $values The values to check - * @return bool True if the Values should cause a marker to be shown, false if not - * @access private - */ - function _select($values) - { - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: DataSelector.php,v 1.7 2005/08/24 20:35:56 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Filter used for selecting which data to show as markers + * + * @category Images + * @package Image_Graph + * @subpackage DataSelector + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataSelector +{ + + /** + * Image_Graph_DataSelector [Constructor] + */ + function Image_Graph_DataSelector() + { + } + + /** + * Check if a specified value should be 'selected', ie shown as a marker + * + * @param array $values The values to check + * @return bool True if the Values should cause a marker to be shown, false if not + * @access private + */ + function _select($values) + { + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataSelector/EveryNthPoint.php b/includes/pear/Image/Graph/DataSelector/EveryNthPoint.php index 4b9658e9..20d9f980 100644 --- a/includes/pear/Image/Graph/DataSelector/EveryNthPoint.php +++ b/includes/pear/Image/Graph/DataSelector/EveryNthPoint.php @@ -1,97 +1,97 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: EveryNthPoint.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataSelector.php - */ -require_once 'Image/Graph/DataSelector.php'; - -/** - * Filter out all points except every Nth point. - * - * Use this dataselector if you have a large number of datapoints, but only want to - * show markers for a small number of them, say every 10th. - * - * @category Images - * @package Image_Graph - * @subpackage DataSelector - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataSelector_EveryNthPoint extends Image_Graph_DataSelector -{ - - /** - * The number of points checked - * @var int - * @access private - */ - var $_pointNum = 0; - - /** - * The number of points between every 'show', default: 10 - * @var int - * @access private - */ - var $_pointInterval = 10; - - /** - * EvertNthPoint [Constructor] - * - * @param int $pointInterval The number of points between every 'show', - * default: 10 - */ - function Image_Graph_DataSelector_EveryNthpoint($pointInterval = 10) - { - parent::Image_Graph_DataSelector(); - $this->_pointInterval = $pointInterval; - } - - /** - * Check if a specified value should be 'selected', ie shown as a marker - * - * @param array $values The values to check - * @return bool True if the Values should cause a marker to be shown, - * false if not - * @access private - */ - function _select($values) - { - $oldPointNum = $this->_pointNum; - $this->_pointNum++; - return (($oldPointNum % $this->_pointInterval) == 0); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: EveryNthPoint.php,v 1.6 2005/08/24 20:35:59 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataSelector.php + */ +require_once 'Image/Graph/DataSelector.php'; + +/** + * Filter out all points except every Nth point. + * + * Use this dataselector if you have a large number of datapoints, but only want to + * show markers for a small number of them, say every 10th. + * + * @category Images + * @package Image_Graph + * @subpackage DataSelector + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataSelector_EveryNthPoint extends Image_Graph_DataSelector +{ + + /** + * The number of points checked + * @var int + * @access private + */ + var $_pointNum = 0; + + /** + * The number of points between every 'show', default: 10 + * @var int + * @access private + */ + var $_pointInterval = 10; + + /** + * EvertNthPoint [Constructor] + * + * @param int $pointInterval The number of points between every 'show', + * default: 10 + */ + function Image_Graph_DataSelector_EveryNthpoint($pointInterval = 10) + { + parent::Image_Graph_DataSelector(); + $this->_pointInterval = $pointInterval; + } + + /** + * Check if a specified value should be 'selected', ie shown as a marker + * + * @param array $values The values to check + * @return bool True if the Values should cause a marker to be shown, + * false if not + * @access private + */ + function _select($values) + { + $oldPointNum = $this->_pointNum; + $this->_pointNum++; + return (($oldPointNum % $this->_pointInterval) == 0); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataSelector/NoZeros.php b/includes/pear/Image/Graph/DataSelector/NoZeros.php index 00d8cf24..3432a8b0 100644 --- a/includes/pear/Image/Graph/DataSelector/NoZeros.php +++ b/includes/pear/Image/Graph/DataSelector/NoZeros.php @@ -1,68 +1,68 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: NoZeros.php,v 1.5 2005/02/21 20:49:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataSelector.php - */ -require_once 'Image/Graph/DataSelector.php'; - -/** - * Filter out all zero's. - * - * Display all Y-values as markers, except those with Y = 0 - * - * @category Images - * @package Image_Graph - * @subpackage DataSelector - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataSelector_NoZeros extends Image_Graph_DataSelector -{ - - /** - * Check if a specified value should be 'selected', ie shown as a marker - * - * @param array $values The values to check - * @return bool True if the Values should cause a marker to be shown, false - * if not - * @access private - */ - function _select($values) - { - return ($values['Y'] != 0); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: NoZeros.php,v 1.5 2005/02/21 20:49:58 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataSelector.php + */ +require_once 'Image/Graph/DataSelector.php'; + +/** + * Filter out all zero's. + * + * Display all Y-values as markers, except those with Y = 0 + * + * @category Images + * @package Image_Graph + * @subpackage DataSelector + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataSelector_NoZeros extends Image_Graph_DataSelector +{ + + /** + * Check if a specified value should be 'selected', ie shown as a marker + * + * @param array $values The values to check + * @return bool True if the Values should cause a marker to be shown, false + * if not + * @access private + */ + function _select($values) + { + return ($values['Y'] != 0); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/DataSelector/Values.php b/includes/pear/Image/Graph/DataSelector/Values.php index b93051ae..516b2b17 100644 --- a/includes/pear/Image/Graph/DataSelector/Values.php +++ b/includes/pear/Image/Graph/DataSelector/Values.php @@ -1,90 +1,90 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Values.php,v 1.2 2005/10/05 20:51:21 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/DataSelector.php - */ -require_once 'Image/Graph/DataSelector.php'; - -/** - * Filter out all but the specified values. - * - * @category Images - * @package Image_Graph - * @subpackage DataSelector - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_DataSelector_Values extends Image_Graph_DataSelector { - - /** - * The array with values that should be included - * @var array - * @access private - */ - var $_values; - - /** - * ValueArray [Constructor] - * - * @param array $valueArray The array to use as filter (default empty) - */ - function &Image_Graph_DataSelector_Values($values) - { - parent::Image_Graph_DataSelector(); - $this->_values = $values; - } - - /** - * Sets the array to use - */ - function setValueArray($values) - { - $this->_values = $values; - } - - /** - * Check if a specified value should be 'selected', ie shown as a marker - * - * @param array $values The values to check - * @return bool True if the Values should cause a marker to be shown, false - * if not - * @access private - */ - function _select($values) - { - return ( in_array($values['Y'], $this->_values) ); - } -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Values.php,v 1.2 2005/10/05 20:51:21 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/DataSelector.php + */ +require_once 'Image/Graph/DataSelector.php'; + +/** + * Filter out all but the specified values. + * + * @category Images + * @package Image_Graph + * @subpackage DataSelector + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_DataSelector_Values extends Image_Graph_DataSelector { + + /** + * The array with values that should be included + * @var array + * @access private + */ + var $_values; + + /** + * ValueArray [Constructor] + * + * @param array $valueArray The array to use as filter (default empty) + */ + function &Image_Graph_DataSelector_Values($values) + { + parent::Image_Graph_DataSelector(); + $this->_values = $values; + } + + /** + * Sets the array to use + */ + function setValueArray($values) + { + $this->_values = $values; + } + + /** + * Check if a specified value should be 'selected', ie shown as a marker + * + * @param array $values The values to check + * @return bool True if the Values should cause a marker to be shown, false + * if not + * @access private + */ + function _select($values) + { + return ( in_array($values['Y'], $this->_values) ); + } +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Dataset.php b/includes/pear/Image/Graph/Dataset.php index 65d1b422..9854ef38 100644 --- a/includes/pear/Image/Graph/Dataset.php +++ b/includes/pear/Image/Graph/Dataset.php @@ -1,483 +1,483 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Dataset.php,v 1.10 2005/08/24 20:35:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - - -/** - * Data set used to represent a data collection to plot in a chart - * - * @category Images - * @package Image_Graph - * @subpackage Dataset - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Dataset -{ - - /** - * The pointer of the data set - * @var int - * @access private - */ - var $_posX = 0; - - /** - * The minimum X value of the dataset - * @var int - * @access private - */ - var $_minimumX = 0; - - /** - * The maximum X value of the dataset - * @var int - * @access private - */ - var $_maximumX = 0; - - /** - * The minimum Y value of the dataset - * @var int - * @access private - */ - var $_minimumY = 0; - - /** - * The maximum Y value of the dataset - * @var int - * @access private - */ - var $_maximumY = 0; - - /** - * The number of points in the dataset - * @var int - * @access private - */ - var $_count = 0; - - /** - * The name of the dataset, used for legending - * @var string - * @access private - */ - var $_name = ''; - - /** - * Image_Graph_Dataset [Constructor] - */ - function Image_Graph_Dataset() - { - } - - /** - * Sets the name of the data set, used for legending - * - * @param string $name The name of the dataset - */ - function setName($name) - { - $this->_name = $name; - } - - /** - * Add a point to the dataset - * - * $ID can contain either the ID of the point, i.e. 'DK', 123, 'George', etc. or it can contain - * values used for creation of the HTML image map. This is achieved using is an an associated array - * with the following values: - * - * 'url' The URL to create the link to - * - * 'alt' [optional] The alt text on the link - * - * 'target' [optional] The target of the link - * - * 'htmltags' [optional] An associated array with html tags (tag as key), fx. 'onMouseOver' => 'history.go(-1);', 'id' => 'thelink' - * - * @param int $x The X value to add - * @param int $y The Y value to add, can be omited - * @param var $ID The ID of the point - */ - function addPoint($x, $y = false, $ID = false) - { - if ($y !== null) { - if (is_array($y)) { - $maxY = max($y); - $minY = min($y); - } else { - $maxY = $y; - $minY = $y; - } - } - - if ($this->_count) { - $this->_minimumX = min($x, $this->_minimumX); - $this->_maximumX = max($x, $this->_maximumX); - if ($y !== null) { - $this->_minimumY = min($minY, $this->_minimumY); - $this->_maximumY = max($maxY, $this->_maximumY); - } - } else { - $this->_minimumX = $x; - $this->_maximumX = $x; - if ($y !== null) { - $this->_minimumY = $minY; - $this->_maximumY = $maxY; - } - } - - $this->_count++; - } - - /** - * The number of values in the dataset - * - * @return int The number of values in the dataset - */ - function count() - { - return $this->_count; - } - - /** - * Gets a X point from the dataset - * - * @param var $x The variable to return an X value from, fx in a vector - * function data set - * @return var The X value of the variable - * @access private - */ - function _getPointX($x) - { - return $x; - } - - /** - * Gets a Y point from the dataset - * - * @param var $x The variable to return an Y value from, fx in a vector - * function data set - * @return var The Y value of the variable - * @access private - */ - function _getPointY($x) - { - return $x; - } - - /** - * Gets a ID from the dataset - * - * @param var $x The variable to return an Y value from, fx in a vector - * function data set - * @return var The ID value of the variable - * @access private - */ - function _getPointID($x) - { - return false; - } - - /** - * Gets point data from the dataset - * - * @param var $x The variable to return an Y value from, fx in a vector - * function data set - * @return array The data for the point - * @access private - */ - function _getPointData($x) - { - return false; - } - - /** - * The minimum X value - * - * @return var The minimum X value - */ - function minimumX() - { - return $this->_minimumX; - } - - /** - * The maximum X value - * - * @return var The maximum X value - */ - function maximumX() - { - return $this->_maximumX; - } - - /** - * The minimum Y value - * - * @return var The minimum Y value - */ - function minimumY() - { - return $this->_minimumY; - } - - /** - * The maximum Y value - * - * @return var The maximum Y value - */ - function maximumY() - { - return $this->_maximumY; - } - - /** - * The first point - * - * @return array The last point - */ - function first() - { - return array('X' => $this->minimumX(), 'Y' => $this->minimumY()); - } - - /** - * The last point - * - * @return array The first point - */ - function last() - { - return array('X' => $this->maximumX(), 'Y' => $this->maximumY()); - } - - /** - * The minimum X value - * - * @param var $value The minimum X value - * @access private - */ - function _setMinimumX($value) - { - $this->_minimumX = $value; - } - - /** - * The maximum X value - * - * @param var $value The maximum X value - * @access private - */ - function _setMaximumX($value) - { - $this->_maximumX = $value; - } - - /** - * The minimum Y value - * - * @param var $value The minimum X value - * @access private - */ - function _setMinimumY($value) - { - $this->_minimumY = $value; - } - - /** - * The maximum Y value - * - * @param var $value The maximum X value - * @access private - */ - function _setMaximumY($value) - { - $this->_maximumY = $value; - } - - /** - * The interval between 2 adjacent X values - * - * @return var The interval - * @access private - */ - function _stepX() - { - return 1; - } - - /** - * The interval between 2 adjacent Y values - * - * @return var The interval - * @access private - */ - function _stepY() - { - return 1; - } - - /** - * Reset the intertal dataset pointer - * - * @return var The first X value - * @access private - */ - function _reset() - { - $this->_posX = $this->_minimumX; - return $this->_posX; - } - - /** - * Get a point close to the internal pointer - * - * @param int Step Number of points next to the internal pointer, negative - * Step is towards lower X values, positive towards higher X values - * @return array The point - * @access private - */ - function _nearby($step = 0) - { - $x = $this->_getPointX($this->_posX + $this->_stepX() * $step); - $y = $this->_getPointY($this->_posX + $this->_stepX() * $step); - $ID = $this->_getPointID($this->_posX + $this->_stepX() * $step); - $data = $this->_getPointData($this->_posX + $this->_stepX() * $step); - if (($x === false) || ($y === false)) { - return false; - } else { - return array ('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); - } - } - - /** - * Get the next point the internal pointer refers to and advance the pointer - * - * @return array The next point - * @access private - */ - function _next() - { - if ($this->_posX > $this->_maximumX) { - return false; - } - - $x = $this->_getPointX($this->_posX); - $y = $this->_getPointY($this->_posX); - $ID = $this->_getPointID($this->_posX); - $data = $this->_getPointData($this->_posX); - $this->_posX += $this->_stepX(); - - return array ('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); - } - - /** - * Get the average of the dataset's Y points - * - * @return var The Y-average across the dataset - * @access private - */ - function _averageY() - { - $posX = $this->_minimumX; - $count = 0; - $total = 0; - while ($posX < $this->_maximumX) { - $count ++; - $total += $this->_getPointY($posX); - $posX += $this->_stepX(); - } - - if ($count != 0) { - return $total / $count; - } else { - return false; - } - } - - /** - * Get the median of the array passed Y points - * - * @param array $data The data-array to get the median from - * @param int $quartile The quartile to return the median from - * @return var The Y-median across the dataset from the specified quartile - * @access private - */ - function _median($data, $quartile = 'second') - { - sort($data); - $point = (count($data) - 1) / 2; - - if ($quartile == 'first') { - $lowPoint = 0; - $highPoint = floor($point); - } elseif ($quartile == 'third') { - $lowPoint = round($point); - $highPoint = count($data) - 1; - } else { - $lowPoint = 0; - $highPoint = count($data) - 1; - } - - $point = ($lowPoint + $highPoint) / 2; - - if (floor($point) != $point) { - $point = floor($point); - return ($data[$point] + $data[($point + 1)]) / 2; - } else { - return $data[$point]; - } - } - - /** - * Get the median of the datasets Y points - * - * @param int $quartile The quartile to return the median from - * @return var The Y-median across the dataset from the specified quartile - * @access private - */ - function _medianY($quartile = 'second') - { - $pointsY = array(); - $posX = $this->_minimumX; - while ($posX <= $this->_maximumX) { - $pointsY[] = $this->_getPointY($posX); - $posX += $this->_stepX(); - } - return $this->_median($pointsY, $quartile); - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Dataset.php,v 1.10 2005/08/24 20:35:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + + +/** + * Data set used to represent a data collection to plot in a chart + * + * @category Images + * @package Image_Graph + * @subpackage Dataset + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Dataset +{ + + /** + * The pointer of the data set + * @var int + * @access private + */ + var $_posX = 0; + + /** + * The minimum X value of the dataset + * @var int + * @access private + */ + var $_minimumX = 0; + + /** + * The maximum X value of the dataset + * @var int + * @access private + */ + var $_maximumX = 0; + + /** + * The minimum Y value of the dataset + * @var int + * @access private + */ + var $_minimumY = 0; + + /** + * The maximum Y value of the dataset + * @var int + * @access private + */ + var $_maximumY = 0; + + /** + * The number of points in the dataset + * @var int + * @access private + */ + var $_count = 0; + + /** + * The name of the dataset, used for legending + * @var string + * @access private + */ + var $_name = ''; + + /** + * Image_Graph_Dataset [Constructor] + */ + function Image_Graph_Dataset() + { + } + + /** + * Sets the name of the data set, used for legending + * + * @param string $name The name of the dataset + */ + function setName($name) + { + $this->_name = $name; + } + + /** + * Add a point to the dataset + * + * $ID can contain either the ID of the point, i.e. 'DK', 123, 'George', etc. or it can contain + * values used for creation of the HTML image map. This is achieved using is an an associated array + * with the following values: + * + * 'url' The URL to create the link to + * + * 'alt' [optional] The alt text on the link + * + * 'target' [optional] The target of the link + * + * 'htmltags' [optional] An associated array with html tags (tag as key), fx. 'onMouseOver' => 'history.go(-1);', 'id' => 'thelink' + * + * @param int $x The X value to add + * @param int $y The Y value to add, can be omited + * @param var $ID The ID of the point + */ + function addPoint($x, $y = false, $ID = false) + { + if ($y !== null) { + if (is_array($y)) { + $maxY = max($y); + $minY = min($y); + } else { + $maxY = $y; + $minY = $y; + } + } + + if ($this->_count) { + $this->_minimumX = min($x, $this->_minimumX); + $this->_maximumX = max($x, $this->_maximumX); + if ($y !== null) { + $this->_minimumY = min($minY, $this->_minimumY); + $this->_maximumY = max($maxY, $this->_maximumY); + } + } else { + $this->_minimumX = $x; + $this->_maximumX = $x; + if ($y !== null) { + $this->_minimumY = $minY; + $this->_maximumY = $maxY; + } + } + + $this->_count++; + } + + /** + * The number of values in the dataset + * + * @return int The number of values in the dataset + */ + function count() + { + return $this->_count; + } + + /** + * Gets a X point from the dataset + * + * @param var $x The variable to return an X value from, fx in a vector + * function data set + * @return var The X value of the variable + * @access private + */ + function _getPointX($x) + { + return $x; + } + + /** + * Gets a Y point from the dataset + * + * @param var $x The variable to return an Y value from, fx in a vector + * function data set + * @return var The Y value of the variable + * @access private + */ + function _getPointY($x) + { + return $x; + } + + /** + * Gets a ID from the dataset + * + * @param var $x The variable to return an Y value from, fx in a vector + * function data set + * @return var The ID value of the variable + * @access private + */ + function _getPointID($x) + { + return false; + } + + /** + * Gets point data from the dataset + * + * @param var $x The variable to return an Y value from, fx in a vector + * function data set + * @return array The data for the point + * @access private + */ + function _getPointData($x) + { + return false; + } + + /** + * The minimum X value + * + * @return var The minimum X value + */ + function minimumX() + { + return $this->_minimumX; + } + + /** + * The maximum X value + * + * @return var The maximum X value + */ + function maximumX() + { + return $this->_maximumX; + } + + /** + * The minimum Y value + * + * @return var The minimum Y value + */ + function minimumY() + { + return $this->_minimumY; + } + + /** + * The maximum Y value + * + * @return var The maximum Y value + */ + function maximumY() + { + return $this->_maximumY; + } + + /** + * The first point + * + * @return array The last point + */ + function first() + { + return array('X' => $this->minimumX(), 'Y' => $this->minimumY()); + } + + /** + * The last point + * + * @return array The first point + */ + function last() + { + return array('X' => $this->maximumX(), 'Y' => $this->maximumY()); + } + + /** + * The minimum X value + * + * @param var $value The minimum X value + * @access private + */ + function _setMinimumX($value) + { + $this->_minimumX = $value; + } + + /** + * The maximum X value + * + * @param var $value The maximum X value + * @access private + */ + function _setMaximumX($value) + { + $this->_maximumX = $value; + } + + /** + * The minimum Y value + * + * @param var $value The minimum X value + * @access private + */ + function _setMinimumY($value) + { + $this->_minimumY = $value; + } + + /** + * The maximum Y value + * + * @param var $value The maximum X value + * @access private + */ + function _setMaximumY($value) + { + $this->_maximumY = $value; + } + + /** + * The interval between 2 adjacent X values + * + * @return var The interval + * @access private + */ + function _stepX() + { + return 1; + } + + /** + * The interval between 2 adjacent Y values + * + * @return var The interval + * @access private + */ + function _stepY() + { + return 1; + } + + /** + * Reset the intertal dataset pointer + * + * @return var The first X value + * @access private + */ + function _reset() + { + $this->_posX = $this->_minimumX; + return $this->_posX; + } + + /** + * Get a point close to the internal pointer + * + * @param int Step Number of points next to the internal pointer, negative + * Step is towards lower X values, positive towards higher X values + * @return array The point + * @access private + */ + function _nearby($step = 0) + { + $x = $this->_getPointX($this->_posX + $this->_stepX() * $step); + $y = $this->_getPointY($this->_posX + $this->_stepX() * $step); + $ID = $this->_getPointID($this->_posX + $this->_stepX() * $step); + $data = $this->_getPointData($this->_posX + $this->_stepX() * $step); + if (($x === false) || ($y === false)) { + return false; + } else { + return array ('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); + } + } + + /** + * Get the next point the internal pointer refers to and advance the pointer + * + * @return array The next point + * @access private + */ + function _next() + { + if ($this->_posX > $this->_maximumX) { + return false; + } + + $x = $this->_getPointX($this->_posX); + $y = $this->_getPointY($this->_posX); + $ID = $this->_getPointID($this->_posX); + $data = $this->_getPointData($this->_posX); + $this->_posX += $this->_stepX(); + + return array ('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); + } + + /** + * Get the average of the dataset's Y points + * + * @return var The Y-average across the dataset + * @access private + */ + function _averageY() + { + $posX = $this->_minimumX; + $count = 0; + $total = 0; + while ($posX < $this->_maximumX) { + $count ++; + $total += $this->_getPointY($posX); + $posX += $this->_stepX(); + } + + if ($count != 0) { + return $total / $count; + } else { + return false; + } + } + + /** + * Get the median of the array passed Y points + * + * @param array $data The data-array to get the median from + * @param int $quartile The quartile to return the median from + * @return var The Y-median across the dataset from the specified quartile + * @access private + */ + function _median($data, $quartile = 'second') + { + sort($data); + $point = (count($data) - 1) / 2; + + if ($quartile == 'first') { + $lowPoint = 0; + $highPoint = floor($point); + } elseif ($quartile == 'third') { + $lowPoint = round($point); + $highPoint = count($data) - 1; + } else { + $lowPoint = 0; + $highPoint = count($data) - 1; + } + + $point = ($lowPoint + $highPoint) / 2; + + if (floor($point) != $point) { + $point = floor($point); + return ($data[$point] + $data[($point + 1)]) / 2; + } else { + return $data[$point]; + } + } + + /** + * Get the median of the datasets Y points + * + * @param int $quartile The quartile to return the median from + * @return var The Y-median across the dataset from the specified quartile + * @access private + */ + function _medianY($quartile = 'second') + { + $pointsY = array(); + $posX = $this->_minimumX; + while ($posX <= $this->_maximumX) { + $pointsY[] = $this->_getPointY($posX); + $posX += $this->_stepX(); + } + return $this->_median($pointsY, $quartile); + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Dataset/Function.php b/includes/pear/Image/Graph/Dataset/Function.php index 1510e3ef..735a3527 100644 --- a/includes/pear/Image/Graph/Dataset/Function.php +++ b/includes/pear/Image/Graph/Dataset/Function.php @@ -1,147 +1,147 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Function.php,v 1.7 2005/08/24 20:35:57 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Dataset.php - */ -require_once 'Image/Graph/Dataset.php'; - -/** - * Function data set, points are generated by calling an external function. - * - * The function must be a single variable function and return a the result, - * builtin functions that are fx sin() or cos(). User defined function can be - * used if they are such, i.e: function myFunction($variable) - * - * @category Images - * @package Image_Graph - * @subpackage Dataset - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Dataset_Function extends Image_Graph_Dataset -{ - - /** - * The name of the function - * @var string - * @access private - */ - var $_dataFunction; - - /** - * Image_Graph_FunctionDataset [Constructor] - * - * @param double $minimumX The minimum X value - * @param double $maximumX The maximum X value - * @param string $function The name of the function, if must be a single - * parameter function like fx sin(x) or cos(x) - * @param int $points The number of points to create - */ - function Image_Graph_Dataset_Function($minimumX, $maximumX, $function, $points) - { - parent::Image_Graph_Dataset(); - $this->_minimumX = $minimumX; - $this->_maximumX = $maximumX; - $this->_dataFunction = $function; - $this->_count = $points; - $this->_calculateMaxima(); - } - - /** - * Add a point to the dataset. - * - * You can't add points to a function dataset - * - * @param int $x The X value to add - * @param int $y The Y value to add, can be omited - * @param var $ID The ID of the point - */ - function addPoint($x, $y = false, $ID = false) - { - } - - /** - * Gets a Y point from the dataset - * - * @param var $x The variable to apply the function to - * @return var The function applied to the X value - * @access private - */ - function _getPointY($x) - { - $function = $this->_dataFunction; - return $function ($x); - } - - /** - * The number of values in the dataset - * - * @return int The number of values in the dataset - * @access private - */ - function _count() - { - return $this->_count; - } - - /** - * The interval between 2 adjacent Y values - * - * @return var The interval - * @access private - */ - function _stepX() - { - return ($this->_maximumX - $this->_minimumX) / $this->_count(); - } - - /** - * Calculates the Y extrema of the function - * - * @access private - */ - function _calculateMaxima() - { - $x = $this->_minimumX; - while ($x <= $this->_maximumX) { - $y = $this->_getPointY($x); - $this->_minimumY = min($y, $this->_minimumY); - $this->_maximumY = max($y, $this->_maximumY); - $x += $this->_stepX(); - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Function.php,v 1.7 2005/08/24 20:35:57 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Dataset.php + */ +require_once 'Image/Graph/Dataset.php'; + +/** + * Function data set, points are generated by calling an external function. + * + * The function must be a single variable function and return a the result, + * builtin functions that are fx sin() or cos(). User defined function can be + * used if they are such, i.e: function myFunction($variable) + * + * @category Images + * @package Image_Graph + * @subpackage Dataset + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Dataset_Function extends Image_Graph_Dataset +{ + + /** + * The name of the function + * @var string + * @access private + */ + var $_dataFunction; + + /** + * Image_Graph_FunctionDataset [Constructor] + * + * @param double $minimumX The minimum X value + * @param double $maximumX The maximum X value + * @param string $function The name of the function, if must be a single + * parameter function like fx sin(x) or cos(x) + * @param int $points The number of points to create + */ + function Image_Graph_Dataset_Function($minimumX, $maximumX, $function, $points) + { + parent::Image_Graph_Dataset(); + $this->_minimumX = $minimumX; + $this->_maximumX = $maximumX; + $this->_dataFunction = $function; + $this->_count = $points; + $this->_calculateMaxima(); + } + + /** + * Add a point to the dataset. + * + * You can't add points to a function dataset + * + * @param int $x The X value to add + * @param int $y The Y value to add, can be omited + * @param var $ID The ID of the point + */ + function addPoint($x, $y = false, $ID = false) + { + } + + /** + * Gets a Y point from the dataset + * + * @param var $x The variable to apply the function to + * @return var The function applied to the X value + * @access private + */ + function _getPointY($x) + { + $function = $this->_dataFunction; + return $function ($x); + } + + /** + * The number of values in the dataset + * + * @return int The number of values in the dataset + * @access private + */ + function _count() + { + return $this->_count; + } + + /** + * The interval between 2 adjacent Y values + * + * @return var The interval + * @access private + */ + function _stepX() + { + return ($this->_maximumX - $this->_minimumX) / $this->_count(); + } + + /** + * Calculates the Y extrema of the function + * + * @access private + */ + function _calculateMaxima() + { + $x = $this->_minimumX; + while ($x <= $this->_maximumX) { + $y = $this->_getPointY($x); + $this->_minimumY = min($y, $this->_minimumY); + $this->_maximumY = max($y, $this->_maximumY); + $x += $this->_stepX(); + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Dataset/Random.php b/includes/pear/Image/Graph/Dataset/Random.php index 23dbb4ba..580abd22 100644 --- a/includes/pear/Image/Graph/Dataset/Random.php +++ b/includes/pear/Image/Graph/Dataset/Random.php @@ -1,77 +1,77 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Random.php,v 1.6 2005/08/24 20:35:57 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Dataset/Trivial.php - */ -require_once 'Image/Graph/Dataset/Trivial.php'; - -/** - * Random data set, points are generated by random. - * - * This dataset is mostly (if not solely) used for demo-purposes. - * - * @category Images - * @package Image_Graph - * @subpackage Dataset - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Dataset_Random extends Image_Graph_Dataset_Trivial -{ - - /** - * RandomDataset [Constructor] - * - * @param int $count The number of points to create - * @param double $minimum The minimum value the random set can be - * @param double $maximum The maximum value the random set can be - * @param bool $includeZero Whether 0 should be included or not as an X - * value, may be omitted, default: false - */ - function Image_Graph_Dataset_Random($count, $minimum, $maximum, $includeZero = false) - { - parent::Image_Graph_Dataset_Trivial(); - $i = 0; - while ($i < $count) { - $this->addPoint( - $ixc = ($includeZero ? $i : $i +1), - rand($minimum, $maximum) - ); - $i ++; - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Random.php,v 1.6 2005/08/24 20:35:57 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Dataset/Trivial.php + */ +require_once 'Image/Graph/Dataset/Trivial.php'; + +/** + * Random data set, points are generated by random. + * + * This dataset is mostly (if not solely) used for demo-purposes. + * + * @category Images + * @package Image_Graph + * @subpackage Dataset + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Dataset_Random extends Image_Graph_Dataset_Trivial +{ + + /** + * RandomDataset [Constructor] + * + * @param int $count The number of points to create + * @param double $minimum The minimum value the random set can be + * @param double $maximum The maximum value the random set can be + * @param bool $includeZero Whether 0 should be included or not as an X + * value, may be omitted, default: false + */ + function Image_Graph_Dataset_Random($count, $minimum, $maximum, $includeZero = false) + { + parent::Image_Graph_Dataset_Trivial(); + $i = 0; + while ($i < $count) { + $this->addPoint( + $ixc = ($includeZero ? $i : $i +1), + rand($minimum, $maximum) + ); + $i ++; + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Dataset/Sequential.php b/includes/pear/Image/Graph/Dataset/Sequential.php index 4451f38e..df51b70e 100644 --- a/includes/pear/Image/Graph/Dataset/Sequential.php +++ b/includes/pear/Image/Graph/Dataset/Sequential.php @@ -1,114 +1,114 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Sequential.php,v 1.7 2005/08/24 20:35:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Dataset/Trivial.php - */ -require_once 'Image/Graph/Dataset/Trivial.php'; - -/** - * Sequential data set, simply add points (y) 1 by 1. - * - * This is a single point (1D) dataset, all points are of the type (0, y1), (1, - * y2), (2, y3)... Where the X-value is implicitly incremented. This is useful - * for example for barcharts, where you could fx. use an {@link - * Image_Graph_Dataset_Array} datapreprocessor to make sence of the x-values. - * - * @category Images - * @package Image_Graph - * @subpackage Dataset - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Dataset_Sequential extends Image_Graph_Dataset_Trivial -{ - - /** - * Image_Graph_SequentialDataset [Constructor] - */ - function Image_Graph_Dataset_Sequential($dataArray = false) - { - parent::Image_Graph_Dataset_Trivial(); - if (is_array($dataArray)) { - reset($dataArray); - foreach ($dataArray as $value) { - $this->addPoint($value); - } - } - } - - /** - * Add a point to the dataset - * - * @param int $y The Y value to add, can be omited - * @param var $ID The ID of the point - */ - function addPoint($y, $ID = false) - { - parent::addPoint($this->count(), $y); - } - - /** - * Gets a X point from the dataset - * - * @param var $x The variable to return an X value from, fx in a - * vector function data set - * @return var The X value of the variable - * @access private - */ - function _getPointX($x) - { - return ((int) $x); - } - - /** - * The minimum X value - * @return var The minimum X value - */ - function minimumX() - { - return 0; - } - - /** - * The maximum X value - * @return var The maximum X value - */ - function maximumX() - { - return $this->count(); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Sequential.php,v 1.7 2005/08/24 20:35:58 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Dataset/Trivial.php + */ +require_once 'Image/Graph/Dataset/Trivial.php'; + +/** + * Sequential data set, simply add points (y) 1 by 1. + * + * This is a single point (1D) dataset, all points are of the type (0, y1), (1, + * y2), (2, y3)... Where the X-value is implicitly incremented. This is useful + * for example for barcharts, where you could fx. use an {@link + * Image_Graph_Dataset_Array} datapreprocessor to make sence of the x-values. + * + * @category Images + * @package Image_Graph + * @subpackage Dataset + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Dataset_Sequential extends Image_Graph_Dataset_Trivial +{ + + /** + * Image_Graph_SequentialDataset [Constructor] + */ + function Image_Graph_Dataset_Sequential($dataArray = false) + { + parent::Image_Graph_Dataset_Trivial(); + if (is_array($dataArray)) { + reset($dataArray); + foreach ($dataArray as $value) { + $this->addPoint($value); + } + } + } + + /** + * Add a point to the dataset + * + * @param int $y The Y value to add, can be omited + * @param var $ID The ID of the point + */ + function addPoint($y, $ID = false) + { + parent::addPoint($this->count(), $y); + } + + /** + * Gets a X point from the dataset + * + * @param var $x The variable to return an X value from, fx in a + * vector function data set + * @return var The X value of the variable + * @access private + */ + function _getPointX($x) + { + return ((int) $x); + } + + /** + * The minimum X value + * @return var The minimum X value + */ + function minimumX() + { + return 0; + } + + /** + * The maximum X value + * @return var The maximum X value + */ + function maximumX() + { + return $this->count(); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Dataset/Trivial.php b/includes/pear/Image/Graph/Dataset/Trivial.php index eb7907cc..05f7f92f 100644 --- a/includes/pear/Image/Graph/Dataset/Trivial.php +++ b/includes/pear/Image/Graph/Dataset/Trivial.php @@ -1,260 +1,260 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Trivial.php,v 1.10 2005/09/25 18:08:56 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Dataset.php - */ -require_once 'Image/Graph/Dataset.php'; - -/** - * Trivial data set, simply add points (x, y) 1 by 1 - * - * @category Images - * @package Image_Graph - * @subpackage Dataset - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Dataset_Trivial extends Image_Graph_Dataset -{ - - /** - * Data storage - * @var array - * @access private - */ - var $_data; - - /** - * Image_Graph_Dataset_Trivial [Constructor] - * - * Pass an associated array ($data[$x] = $y) to the constructor for easy - * data addition. Alternatively (if multiple entries with same x value is - * required) pass an array with (x, y) values: $data[$id] = array('x' => $x, - * 'y' => $y); - * - * NB! If passing the 1st type array at this point, the x-values will also - * be used for ID tags, i.e. when using {@link Image_Graph_Fill_Array}. In - * the 2nd type the key/index of the "outermost" array will be the id tag - * (i.e. $id in the example) - * - * @param array $dataArray An associated array with values to the dataset - */ - function Image_Graph_Dataset_Trivial($dataArray = false) - { - parent::Image_Graph_Dataset(); - $this->_data = array (); - if (is_array($dataArray)) { - reset($dataArray); - $keys = array_keys($dataArray); - foreach ($keys as $x) { - $y =& $dataArray[$x]; - if ((is_array($y)) && (isset($y['x'])) && (isset($y['y']))) { - $this->addPoint($y['x'], $y['y'], (isset($y['id']) ? $y['id'] : $x)); - } else { - $this->addPoint($x, $y, $x); - } - } - } - } - - /** - * Add a point to the dataset - * - * $ID can contain either the ID of the point, i.e. 'DK', 123, 'George', etc. or it can contain - * values used for creation of the HTML image map. This is achieved using is an an associated array - * with the following values: - * - * 'url' The URL to create the link to - * - * 'alt' [optional] The alt text on the link - * - * 'target' [optional] The target of the link - * - * 'htmltags' [optional] An associated array with html tags (tag as key), fx. 'onMouseOver' => 'history.go(-1);', 'id' => 'thelink' - * - * @param int $x The X value to add - * @param int $y The Y value to add, can be omited - * @param var $ID The ID of the point - */ - function addPoint($x, $y = false, $ID = false) - { - parent::addPoint($x, $y, $ID); - - if (is_array($ID)) { - $data = $ID; - $ID = (isset($data['id']) ? $data['id'] : false); - } else { - $data = false; - } - - $this->_data[] = array ('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); - if (!is_numeric($x)) { - $this->_maximumX = count($this->_data); - } - } - - /** - * The first point - * - * @return array The last point - */ - function first() - { - reset($this->_data); - return current($this->_data); - } - - /** - * The last point - * - * @return array The first point - */ - function last() - { - return end($this->_data); - } - - /** - * Gets a X point from the dataset - * - * @param var $x The variable to return an X value from, fx in a - * vector function data set - * @return var The X value of the variable - * @access private - */ - function _getPointX($x) - { - if (isset($this->_data[$x])) { - return $this->_data[$x]['X']; - } else { - return false; - } - } - - /** - * Gets a Y point from the dataset - * - * @param var $x The variable to return an Y value from, fx in a - * vector function data set - * @return var The Y value of the variable - * @access private - */ - function _getPointY($x) - { - if (isset($this->_data[$x])) { - return $this->_data[$x]['Y']; - } else { - return false; - } - } - - /** - * Gets a ID from the dataset - * - * @param var $x The variable to return an Y value from, fx in a - * vector function data set - * @return var The ID value of the variable - * @access private - */ - function _getPointID($x) - { - if (isset($this->_data[$x])) { - return $this->_data[$x]['ID']; - } else { - return false; - } - } - - /** - * Gets point data from the dataset - * - * @param var $x The variable to return an Y value from, fx in a vector - * function data set - * @return array The data for the point - * @access private - */ - function _getPointData($x) - { - if (isset($this->_data[$x])) { - return $this->_data[$x]['data']; - } else { - return false; - } - } - - /** - * The number of values in the dataset - * - * @return int The number of values in the dataset - */ - function count() - { - return count($this->_data); - } - - /** - * Reset the intertal dataset pointer - * - * @return var The first X value - * @access private - */ - function _reset() - { - $this->_posX = 0; - return $this->_posX; - } - - /** - * Get the next point the internal pointer refers to and advance the pointer - * - * @return array The next point - * @access private - */ - function _next() - { - if ($this->_posX >= $this->count()) { - return false; - } - $x = $this->_getPointX($this->_posX); - $y = $this->_getPointY($this->_posX); - $ID = $this->_getPointID($this->_posX); - $data = $this->_getPointData($this->_posX); - $this->_posX += $this->_stepX(); - - return array('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Trivial.php,v 1.10 2005/09/25 18:08:56 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Dataset.php + */ +require_once 'Image/Graph/Dataset.php'; + +/** + * Trivial data set, simply add points (x, y) 1 by 1 + * + * @category Images + * @package Image_Graph + * @subpackage Dataset + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Dataset_Trivial extends Image_Graph_Dataset +{ + + /** + * Data storage + * @var array + * @access private + */ + var $_data; + + /** + * Image_Graph_Dataset_Trivial [Constructor] + * + * Pass an associated array ($data[$x] = $y) to the constructor for easy + * data addition. Alternatively (if multiple entries with same x value is + * required) pass an array with (x, y) values: $data[$id] = array('x' => $x, + * 'y' => $y); + * + * NB! If passing the 1st type array at this point, the x-values will also + * be used for ID tags, i.e. when using {@link Image_Graph_Fill_Array}. In + * the 2nd type the key/index of the "outermost" array will be the id tag + * (i.e. $id in the example) + * + * @param array $dataArray An associated array with values to the dataset + */ + function Image_Graph_Dataset_Trivial($dataArray = false) + { + parent::Image_Graph_Dataset(); + $this->_data = array (); + if (is_array($dataArray)) { + reset($dataArray); + $keys = array_keys($dataArray); + foreach ($keys as $x) { + $y =& $dataArray[$x]; + if ((is_array($y)) && (isset($y['x'])) && (isset($y['y']))) { + $this->addPoint($y['x'], $y['y'], (isset($y['id']) ? $y['id'] : $x)); + } else { + $this->addPoint($x, $y, $x); + } + } + } + } + + /** + * Add a point to the dataset + * + * $ID can contain either the ID of the point, i.e. 'DK', 123, 'George', etc. or it can contain + * values used for creation of the HTML image map. This is achieved using is an an associated array + * with the following values: + * + * 'url' The URL to create the link to + * + * 'alt' [optional] The alt text on the link + * + * 'target' [optional] The target of the link + * + * 'htmltags' [optional] An associated array with html tags (tag as key), fx. 'onMouseOver' => 'history.go(-1);', 'id' => 'thelink' + * + * @param int $x The X value to add + * @param int $y The Y value to add, can be omited + * @param var $ID The ID of the point + */ + function addPoint($x, $y = false, $ID = false) + { + parent::addPoint($x, $y, $ID); + + if (is_array($ID)) { + $data = $ID; + $ID = (isset($data['id']) ? $data['id'] : false); + } else { + $data = false; + } + + $this->_data[] = array ('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); + if (!is_numeric($x)) { + $this->_maximumX = count($this->_data); + } + } + + /** + * The first point + * + * @return array The last point + */ + function first() + { + reset($this->_data); + return current($this->_data); + } + + /** + * The last point + * + * @return array The first point + */ + function last() + { + return end($this->_data); + } + + /** + * Gets a X point from the dataset + * + * @param var $x The variable to return an X value from, fx in a + * vector function data set + * @return var The X value of the variable + * @access private + */ + function _getPointX($x) + { + if (isset($this->_data[$x])) { + return $this->_data[$x]['X']; + } else { + return false; + } + } + + /** + * Gets a Y point from the dataset + * + * @param var $x The variable to return an Y value from, fx in a + * vector function data set + * @return var The Y value of the variable + * @access private + */ + function _getPointY($x) + { + if (isset($this->_data[$x])) { + return $this->_data[$x]['Y']; + } else { + return false; + } + } + + /** + * Gets a ID from the dataset + * + * @param var $x The variable to return an Y value from, fx in a + * vector function data set + * @return var The ID value of the variable + * @access private + */ + function _getPointID($x) + { + if (isset($this->_data[$x])) { + return $this->_data[$x]['ID']; + } else { + return false; + } + } + + /** + * Gets point data from the dataset + * + * @param var $x The variable to return an Y value from, fx in a vector + * function data set + * @return array The data for the point + * @access private + */ + function _getPointData($x) + { + if (isset($this->_data[$x])) { + return $this->_data[$x]['data']; + } else { + return false; + } + } + + /** + * The number of values in the dataset + * + * @return int The number of values in the dataset + */ + function count() + { + return count($this->_data); + } + + /** + * Reset the intertal dataset pointer + * + * @return var The first X value + * @access private + */ + function _reset() + { + $this->_posX = 0; + return $this->_posX; + } + + /** + * Get the next point the internal pointer refers to and advance the pointer + * + * @return array The next point + * @access private + */ + function _next() + { + if ($this->_posX >= $this->count()) { + return false; + } + $x = $this->_getPointX($this->_posX); + $y = $this->_getPointY($this->_posX); + $ID = $this->_getPointID($this->_posX); + $data = $this->_getPointData($this->_posX); + $this->_posX += $this->_stepX(); + + return array('X' => $x, 'Y' => $y, 'ID' => $ID, 'data' => $data); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Dataset/VectorFunction.php b/includes/pear/Image/Graph/Dataset/VectorFunction.php index 62f274fb..dabe73d4 100644 --- a/includes/pear/Image/Graph/Dataset/VectorFunction.php +++ b/includes/pear/Image/Graph/Dataset/VectorFunction.php @@ -1,185 +1,185 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: VectorFunction.php,v 1.6 2005/08/24 20:35:57 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Dataset.php - */ -require_once 'Image/Graph/Dataset.php'; - -/** - * Vector Function data set. - * - * Points are generated by calling 2 external functions, fx. x = sin(t) and y = - * cos(t) - * - * @category Images - * @package Image_Graph - * @subpackage Dataset - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Dataset_VectorFunction extends Image_Graph_Dataset -{ - - /** - * The name of the X function - * @var string - * @access private - */ - var $_functionX; - - /** - * The name of the Y function - * @var string - * @access private - */ - var $_functionY; - - /** - * The minimum of the vector function variable - * @var double - * @access private - */ - var $_minimumT; - - /** - * The maximum of the vector function variable - * @var double - * @access private - */ - var $_maximumT; - - /** - * Image_Graph_VectorFunctionDataset [Constructor] - * - * @param double $minimumT The minimum value of the vector function variable - * @param double $maximumT The maximum value of the vector function variable - * @param string $functionX The name of the X function, if must be a single - * parameter function like fx sin(x) or cos(x) - * @param string $functionY The name of the Y function, if must be a single - * parameter function like fx sin(x) or cos(x) - * @param int $points The number of points to create - */ - function Image_Graph_Dataset_VectorFunction($minimumT, $maximumT, $functionX, $functionY, $points) - { - parent::Image_Graph_Dataset(); - $this->_minimumT = $minimumT; - $this->_maximumT = $maximumT; - $this->_functionX = $functionX; - $this->_functionY = $functionY; - $this->_count = $points; - $this->_calculateMaxima(); - } - - /** - * Add a point to the dataset - * - * @param int $x The X value to add - * @param int $y The Y value to add, can be omited - * @param var $ID The ID of the point - */ - function addPoint($x, $y = false, $ID = false) - { - } - - /** - * Gets a X point from the dataset - * - * @param var $x The variable to apply the X function to - * @return var The X function applied to the X value - * @access private - */ - function _getPointX($x) - { - $functionX = $this->_functionX; - return $functionX ($x); - } - - /** - * Gets a Y point from the dataset - * - * @param var $x The variable to apply the Y function to - * @return var The Y function applied to the X value - * @access private - */ - function _getPointY($x) - { - $functionY = $this->_functionY; - return $functionY ($x); - } - - /** - * Reset the intertal dataset pointer - * - * @return var The first T value - * @access private - */ - function _reset() - { - $this->_posX = $this->_minimumT; - return $this->_posX; - } - - /** - * The interval between 2 adjacent T values - * - * @return var The interval - * @access private - */ - function _stepX() - { - return ($this->_maximumT - $this->_minimumT) / $this->count(); - } - - /** - * Calculates the X and Y extrema of the functions - * - * @access private - */ - function _calculateMaxima() - { - $t = $this->_minimumT; - while ($t <= $this->_maximumT) { - $x = $this->_getPointX($t); - $y = $this->_getPointY($t); - $this->_minimumX = min($x, $this->_minimumX); - $this->_maximumX = max($x, $this->_maximumX); - $this->_minimumY = min($y, $this->_minimumY); - $this->_maximumY = max($y, $this->_maximumY); - $t += $this->_stepX(); - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: VectorFunction.php,v 1.6 2005/08/24 20:35:57 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Dataset.php + */ +require_once 'Image/Graph/Dataset.php'; + +/** + * Vector Function data set. + * + * Points are generated by calling 2 external functions, fx. x = sin(t) and y = + * cos(t) + * + * @category Images + * @package Image_Graph + * @subpackage Dataset + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Dataset_VectorFunction extends Image_Graph_Dataset +{ + + /** + * The name of the X function + * @var string + * @access private + */ + var $_functionX; + + /** + * The name of the Y function + * @var string + * @access private + */ + var $_functionY; + + /** + * The minimum of the vector function variable + * @var double + * @access private + */ + var $_minimumT; + + /** + * The maximum of the vector function variable + * @var double + * @access private + */ + var $_maximumT; + + /** + * Image_Graph_VectorFunctionDataset [Constructor] + * + * @param double $minimumT The minimum value of the vector function variable + * @param double $maximumT The maximum value of the vector function variable + * @param string $functionX The name of the X function, if must be a single + * parameter function like fx sin(x) or cos(x) + * @param string $functionY The name of the Y function, if must be a single + * parameter function like fx sin(x) or cos(x) + * @param int $points The number of points to create + */ + function Image_Graph_Dataset_VectorFunction($minimumT, $maximumT, $functionX, $functionY, $points) + { + parent::Image_Graph_Dataset(); + $this->_minimumT = $minimumT; + $this->_maximumT = $maximumT; + $this->_functionX = $functionX; + $this->_functionY = $functionY; + $this->_count = $points; + $this->_calculateMaxima(); + } + + /** + * Add a point to the dataset + * + * @param int $x The X value to add + * @param int $y The Y value to add, can be omited + * @param var $ID The ID of the point + */ + function addPoint($x, $y = false, $ID = false) + { + } + + /** + * Gets a X point from the dataset + * + * @param var $x The variable to apply the X function to + * @return var The X function applied to the X value + * @access private + */ + function _getPointX($x) + { + $functionX = $this->_functionX; + return $functionX ($x); + } + + /** + * Gets a Y point from the dataset + * + * @param var $x The variable to apply the Y function to + * @return var The Y function applied to the X value + * @access private + */ + function _getPointY($x) + { + $functionY = $this->_functionY; + return $functionY ($x); + } + + /** + * Reset the intertal dataset pointer + * + * @return var The first T value + * @access private + */ + function _reset() + { + $this->_posX = $this->_minimumT; + return $this->_posX; + } + + /** + * The interval between 2 adjacent T values + * + * @return var The interval + * @access private + */ + function _stepX() + { + return ($this->_maximumT - $this->_minimumT) / $this->count(); + } + + /** + * Calculates the X and Y extrema of the functions + * + * @access private + */ + function _calculateMaxima() + { + $t = $this->_minimumT; + while ($t <= $this->_maximumT) { + $x = $this->_getPointX($t); + $y = $this->_getPointY($t); + $this->_minimumX = min($x, $this->_minimumX); + $this->_maximumX = max($x, $this->_maximumX); + $this->_minimumY = min($y, $this->_minimumY); + $this->_maximumY = max($y, $this->_maximumY); + $t += $this->_stepX(); + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Element.php b/includes/pear/Image/Graph/Element.php index d040a52c..fb9dfe34 100644 --- a/includes/pear/Image/Graph/Element.php +++ b/includes/pear/Image/Graph/Element.php @@ -1,727 +1,763 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Element.php,v 1.16 2005/08/03 21:21:52 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Common.php - */ -require_once 'Image/Graph/Common.php'; - -/** - * Representation of a element. - * - * The Image_Graph_Element can be drawn on the canvas, ie it has coordinates, - * {@link Image_Graph_Line}, {@link Image_Graph_Fill}, border and background - - * although not all of these may apply to all children. - * - * @category Images - * @package Image_Graph - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Element extends Image_Graph_Common -{ - - /** - * The leftmost pixel of the element on the canvas - * @var int - * @access private - */ - var $_left = 0; - - /** - * The topmost pixel of the element on the canvas - * @var int - * @access private - */ - var $_top = 0; - - /** - * The rightmost pixel of the element on the canvas - * @var int - * @access private - */ - var $_right = 0; - - /** - * The bottommost pixel of the element on the canvas - * @var int - * @access private - */ - var $_bottom = 0; - - /** - * Background of the element. Default: None - * @var FillStyle - * @access private - */ - var $_background = null; - - /** - * Borderstyle of the element. Default: None - * @var LineStyle - * @access private - */ - var $_borderStyle = null; - - /** - * Line style of the element. Default: None - * @var LineStyle - * @access private - */ - var $_lineStyle = 'black'; - - /** - * Fill style of the element. Default: None - * @var FillStyle - * @access private - */ - var $_fillStyle = 'white'; - - /** - * Font of the element. Default: Standard font - FONT - * @var Font - * @access private - * @see $IMAGE_GRAPH_FONT - */ - var $_font = null; - - /** - * Font options - * @var array - * @access private - */ - var $_fontOptions = array(); - - /** - * Default font options - * - * This option is included for performance reasons. The value is calculated - * before output and reused in default cases to avoid unnecessary recursive - * calls. - * - * @var array - * @access private - */ - var $_defaultFontOptions = false; - - /** - * Shadows options of the element - * @var mixed - * @access private - */ - var $_shadow = false; - - /** - * The padding displayed on the element - * @var int - * @access private - */ - var $_padding = 0; - - /** - * Sets the background fill style of the element - * - * @param Image_Graph_Fill $background The background - * @see Image_Graph_Fill - */ - function setBackground(& $background) - { - if (!is_a($background, 'Image_Graph_Fill')) { - $this->_error( - 'Could not set background for ' . get_class($this) . ': ' . - get_class($background), array('background' => &$background) - ); - } else { - $this->_background =& $background; - $this->add($background); - } - } - - /** - * Shows shadow on the element - */ - function showShadow($color = 'black@0.2', $size = 5) - { - $this->_shadow = array( - 'color' => $color, - 'size' => $size - ); - } - - /** - * Sets the background color of the element. - * - * See colors.txt in the docs/ folder for a list of available named colors. - * - * @param mixed $color The color - */ - function setBackgroundColor($color) - { - $this->_background = $color; - } - - /** - * Gets the background fill style of the element - * - * @return int A GD fillstyle representing the background style - * @see Image_Graph_Fill - * @access private - */ - function _getBackground() - { - if (is_object($this->_background)) { - $this->_canvas->setFill($this->_background->_getFillStyle()); - } elseif ($this->_background != null) { - $this->_canvas->setFill($this->_background); - } else { - return false; - } - return true; - } - - /** - * Sets the border line style of the element - * - * @param Image_Graph_Line $borderStyle The line style of the border - * @see Image_Graph_Line - */ - function setBorderStyle(& $borderStyle) - { - if (!is_a($borderStyle, 'Image_Graph_Line')) { - $this->_error( - 'Could not set border style for ' . get_class($this) . ': ' . - get_class($borderStyle), array('borderstyle' => &$borderStyle) - ); - } else { - $this->_borderStyle =& $borderStyle; - $this->add($borderStyle); - } - } - - /** - * Sets the border color of the element. - * - * See colors.txt in the docs/ folder for a list of available named colors. - * @param mixed $color The color - */ - function setBorderColor($color) - { - $this->_borderStyle = $color; - } - - /** - * Gets the border line style of the element - * - * @return int A GD linestyle representing the borders line style - * @see Image_Graph_Line - * @access private - */ - function _getBorderStyle() - { - if (is_object($this->_borderStyle)) { - $result = $this->_borderStyle->_getLineStyle(); - $this->_canvas->setLineThickness($result['thickness']); - $this->_canvas->setLineColor($result['color']); - } elseif ($this->_borderStyle != null) { - $this->_canvas->setLineThickness(1); - $this->_canvas->setLineColor($this->_borderStyle); - } else { - return false; - } - return true; - } - - /** - * Sets the line style of the element - * - * @param Image_Graph_Line $lineStyle The line style of the element - * @see Image_Graph_Line - */ - function setLineStyle(& $lineStyle) - { - if (!is_object($lineStyle)) { - $this->_error( - 'Could not set line style for ' . get_class($this) . ': ' . - get_class($lineStyle), array('linestyle' => &$lineStyle) - ); - } else { - $this->_lineStyle =& $lineStyle; - $this->add($lineStyle); - } - } - - /** - * Sets the line color of the element. - * - * See colors.txt in the docs/ folder for a list of available named colors. - * - * @param mixed $color The color - */ - function setLineColor($color) - { - $this->_lineStyle = $color; - } - - /** - * Gets the line style of the element - * - * @return int A GD linestyle representing the line style - * @see Image_Graph_Line - * @access private - */ - function _getLineStyle($ID = false) - { - if (is_object($this->_lineStyle)) { - $result = $this->_lineStyle->_getLineStyle($ID); - if (is_array($result)) { - $this->_canvas->setLineThickness($result['thickness']); - $this->_canvas->setLineColor($result['color']); - } else { - $this->_canvas->setLineThickness(1); - $this->_canvas->setLineColor($result); - } - } elseif ($this->_lineStyle != null) { - $this->_canvas->setLineThickness(1); - $this->_canvas->setLineColor($this->_lineStyle); - } else { - return false; - } - return true; - } - - /** - * Sets the fill style of the element - * - * @param Image_Graph_Fill $fillStyle The fill style of the element - * @see Image_Graph_Fill - */ - function setFillStyle(& $fillStyle) - { - if (!is_a($fillStyle, 'Image_Graph_Fill')) { - $this->_error( - 'Could not set fill style for ' . get_class($this) . ': ' . - get_class($fillStyle), array('fillstyle' => &$fillStyle) - ); - } else { - $this->_fillStyle =& $fillStyle; - $this->add($fillStyle); - } - } - - /** - * Sets the fill color of the element. - * - * See colors.txt in the docs/ folder for a list of available named colors. - * - * @param mixed $color The color - */ - function setFillColor($color) - { - $this->_fillStyle = $color; - } - - - /** - * Gets the fill style of the element - * - * @return int A GD filestyle representing the fill style - * @see Image_Graph_Fill - * @access private - */ - function _getFillStyle($ID = false) - { - if (is_object($this->_fillStyle)) { - $this->_canvas->setFill($this->_fillStyle->_getFillStyle($ID)); - } elseif ($this->_fillStyle != null) { - $this->_canvas->setFill($this->_fillStyle); - } else { - return false; - } - return true; - } - - /** - * Gets the font of the element. - * - * If not font has been set, the parent font is propagated through it's - * children. - * - * @return array An associated array used for canvas - * @access private - */ - function _getFont($options = false) - { - if (($options === false) && ($this->_defaultFontOptions !== false)) { - return $this->_defaultFontOptions; - } - - if ($options === false) { - $saveDefault = true; - } else { - $saveDefault = false; - } - - if ($options === false) { - $options = $this->_fontOptions; - } else { - $options = array_merge($this->_fontOptions, $options); - } - - if ($this->_font == null) { - $result = $this->_parent->_getFont($options); - } else { - $result = $this->_font->_getFont($options); - } - - if ((isset($result['size'])) && (isset($result['size_rel']))) { - $result['size'] += $result['size_rel']; - unset($result['size_rel']); - } - - if ($saveDefault) { - $this->_defaultFontOptions = $result; - } - - return $result; - } - - /** - * Sets the font of the element - * - * @param Image_Graph_Font $font The font of the element - * @see Image_Graph_Font - */ - function setFont(& $font) - { - if (!is_a($font, 'Image_Graph_Font')) { - $this->_error('Invalid font set on ' . get_class($this)); - } else { - $this->_font =& $font; - $this->add($font); - } - } - - /** - * Sets the font size - * - * @param int $size The size of the font - */ - function setFontSize($size) - { - $this->_fontOptions['size'] = $size; - } - - /** - * Sets the font angle - * - * @param int $angle The angle of the font - */ - function setFontAngle($angle) - { - if ($angle == 'vertical') { - $this->_fontOptions['vertical'] = true; - $this->_fontOptions['angle'] = 90; - } else { - $this->_fontOptions['angle'] = $angle; - } - } - - /** - * Sets the font color - * - * @param mixed $color The color of the font - */ - function setFontColor($color) - { - $this->_fontOptions['color'] = $color; - } - - /** - * Sets the coordinates of the element - * - * @param int $left The leftmost pixel of the element on the canvas - * @param int $top The topmost pixel of the element on the canvas - * @param int $right The rightmost pixel of the element on the canvas - * @param int $bottom The bottommost pixel of the element on the canvas - * @access private - */ - function _setCoords($left, $top, $right, $bottom) - { - if ($left === false) { - $left = $this->_left; - } - - if ($top === false) { - $top = $this->_top; - } - - if ($right === false) { - $right = $this->_right; - } - - if ($bottom === false) { - $bottom = $this->_bottom; - } - - $this->_left = min($left, $right); - $this->_top = min($top, $bottom); - $this->_right = max($left, $right); - $this->_bottom = max($top, $bottom); - } - - /** - * Moves the element - * - * @param int $deltaX Number of pixels to move the element to the right - * (negative values move to the left) - * @param int $deltaY Number of pixels to move the element downwards - * (negative values move upwards) - * @access private - */ - function _move($deltaX, $deltaY) - { - $this->_left += $deltaX; - $this->_right += $deltaX; - $this->_top += $deltaY; - $this->_bottom += $deltaY; - } - - /** - * Sets the width of the element relative to the left side - * - * @param int $width Number of pixels the element should be in width - * @access private - */ - function _setWidth($width) - { - $this->_right = $this->_left + $width; - } - - /** - * Sets the height of the element relative to the top - * - * @param int $width Number of pixels the element should be in height - * @access private - */ - function _setHeight($height) - { - $this->_bottom = $this->_top + $height; - } - - /** - * Sets padding of the element - * - * @param int $padding Number of pixels the element should be padded with - */ - function setPadding($padding) - { - $this->_padding = $padding; - } - - /** - * The width of the element on the canvas - * - * @return int Number of pixels representing the width of the element - */ - function width() - { - return abs($this->_right - $this->_left) + 1; - } - - /** - * The height of the element on the canvas - * - * @return int Number of pixels representing the height of the element - */ - function height() - { - return abs($this->_bottom - $this->_top) + 1; - } - - /** - * Left boundary of the background fill area - * - * @return int Leftmost position on the canvas - * @access private - */ - function _fillLeft() - { - return $this->_left + $this->_padding; - } - - /** - * Top boundary of the background fill area - * - * @return int Topmost position on the canvas - * @access private - */ - function _fillTop() - { - return $this->_top + $this->_padding; - } - - /** - * Right boundary of the background fill area - * - * @return int Rightmost position on the canvas - * @access private - */ - function _fillRight() - { - return $this->_right - $this->_padding; - } - - /** - * Bottom boundary of the background fill area - * - * @return int Bottommost position on the canvas - * @access private - */ - function _fillBottom() - { - return $this->_bottom - $this->_padding; - } - - /** - * Returns the filling width of the element on the canvas - * - * @return int Filling width - * @access private - */ - function _fillWidth() - { - return $this->_fillRight() - $this->_fillLeft() + 1; - } - - /** - * Returns the filling height of the element on the canvas - * - * @return int Filling height - * @access private - */ - function _fillHeight() - { - return $this->_fillBottom() - $this->_fillTop() + 1; - } - - /** - * Draws a shadow 'around' the element - * - * Not implemented yet. - * - * @access private - */ - function _displayShadow() - { - if (is_array($this->_shadow)) { - $this->_canvas->startGroup(get_class($this) . '_shadow'); - $this->_canvas->setFillColor($this->_shadow['color']); - $this->_canvas->addVertex(array('x' => $this->_right + 1, 'y' => $this->_top + $this->_shadow['size'])); - $this->_canvas->addVertex(array('x' => $this->_right + $this->_shadow['size'], 'y' => $this->_top + $this->_shadow['size'])); - $this->_canvas->addVertex(array('x' => $this->_right + $this->_shadow['size'], 'y' => $this->_bottom + $this->_shadow['size'])); - $this->_canvas->addVertex(array('x' => $this->_left + $this->_shadow['size'], 'y' => $this->_bottom + $this->_shadow['size'])); - $this->_canvas->addVertex(array('x' => $this->_left + $this->_shadow['size'], 'y' => $this->_bottom + 1)); - $this->_canvas->addVertex(array('x' => $this->_right + 1, 'y' => $this->_bottom + 1)); - $this->_canvas->polygon(array('connect' => true)); - $this->_canvas->endGroup(); - } - } - - /** - * Writes text to the canvas. - * - * @param int $x The x position relative to alignment - * @param int $y The y position relative to alignment - * @param string $text The text - * @param int $alignmen The text alignment (both vertically and horizontally) - */ - function write($x, $y, $text, $alignment = false, $font = false) - { - if (($font === false) && ($this->_defaultFontOptions !== false)) { - $font = $this->_defaultFontOptions; - } else { - $font = $this->_getFont($font); - } - - if ($alignment === false) { - $alignment = IMAGE_GRAPH_ALIGN_LEFT + IMAGE_GRAPH_ALIGN_TOP; - } - - $align = array(); - - if (($alignment & IMAGE_GRAPH_ALIGN_TOP) != 0) { - $align['vertical'] = 'top'; - } else if (($alignment & IMAGE_GRAPH_ALIGN_BOTTOM) != 0) { - $align['vertical'] = 'bottom'; - } else { - $align['vertical'] = 'center'; - } - - if (($alignment & IMAGE_GRAPH_ALIGN_LEFT) != 0) { - $align['horizontal'] = 'left'; - } else if (($alignment & IMAGE_GRAPH_ALIGN_RIGHT) != 0) { - $align['horizontal'] = 'right'; - } else { - $align['horizontal'] = 'center'; - } - - $this->_canvas->setFont($font); - $this->_canvas->addText(array('x' => $x, 'y' => $y, 'text' => $text, 'alignment' => $align)); - } - - /** - * Output the element to the canvas - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @see Image_Graph_Common - * @access private - */ - function _done() - { - $background = $this->_getBackground(); - $border = $this->_getBorderStyle(); - if (($background) || ($border)) { - $this->_canvas->rectangle(array('x0' => $this->_left, 'y0' => $this->_top, 'x1' => $this->_right, 'y1' => $this->_bottom)); - } - - $result = parent::_done(); - - if ($this->_shadow !== false) { - $this->_displayShadow(); - } - - return $result; - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Element.php,v 1.18 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Common.php + */ +require_once 'Image/Graph/Common.php'; + +/** + * Representation of a element. + * + * The Image_Graph_Element can be drawn on the canvas, ie it has coordinates, + * {@link Image_Graph_Line}, {@link Image_Graph_Fill}, border and background - + * although not all of these may apply to all children. + * + * @category Images + * @package Image_Graph + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Element extends Image_Graph_Common +{ + + /** + * The leftmost pixel of the element on the canvas + * @var int + * @access private + */ + var $_left = 0; + + /** + * The topmost pixel of the element on the canvas + * @var int + * @access private + */ + var $_top = 0; + + /** + * The rightmost pixel of the element on the canvas + * @var int + * @access private + */ + var $_right = 0; + + /** + * The bottommost pixel of the element on the canvas + * @var int + * @access private + */ + var $_bottom = 0; + + /** + * Background of the element. Default: None + * @var FillStyle + * @access private + */ + var $_background = null; + + /** + * Borderstyle of the element. Default: None + * @var LineStyle + * @access private + */ + var $_borderStyle = null; + + /** + * Line style of the element. Default: None + * @var LineStyle + * @access private + */ + var $_lineStyle = 'black'; + + /** + * Fill style of the element. Default: None + * @var FillStyle + * @access private + */ + var $_fillStyle = 'white'; + + /** + * Font of the element. Default: Standard font - FONT + * @var Font + * @access private + * @see $IMAGE_GRAPH_FONT + */ + var $_font = null; + + /** + * Font options + * @var array + * @access private + */ + var $_fontOptions = array(); + + /** + * Default font options + * + * This option is included for performance reasons. The value is calculated + * before output and reused in default cases to avoid unnecessary recursive + * calls. + * + * @var array + * @access private + */ + var $_defaultFontOptions = false; + + /** + * Shadows options of the element + * @var mixed + * @access private + */ + var $_shadow = false; + + /** + * The padding displayed on the element + * @var int + * @access private + */ + var $_padding = array('left' => 0, 'top' => 0, 'right' => 0, 'bottom' => 0); + + /** + * Sets the background fill style of the element + * + * @param Image_Graph_Fill $background The background + * @see Image_Graph_Fill + */ + function setBackground(& $background) + { + if (!is_a($background, 'Image_Graph_Fill')) { + $this->_error( + 'Could not set background for ' . get_class($this) . ': ' . + get_class($background), array('background' => &$background) + ); + } else { + $this->_background =& $background; + $this->add($background); + } + } + + /** + * Shows shadow on the element + */ + function showShadow($color = 'black@0.2', $size = 5) + { + $this->_shadow = array( + 'color' => $color, + 'size' => $size + ); + } + + /** + * Sets the background color of the element. + * + * See colors.txt in the docs/ folder for a list of available named colors. + * + * @param mixed $color The color + */ + function setBackgroundColor($color) + { + $this->_background = $color; + } + + /** + * Gets the background fill style of the element + * + * @return int A GD fillstyle representing the background style + * @see Image_Graph_Fill + * @access private + */ + function _getBackground() + { + if (is_object($this->_background)) { + $this->_canvas->setFill($this->_background->_getFillStyle()); + } elseif ($this->_background != null) { + $this->_canvas->setFill($this->_background); + } else { + return false; + } + return true; + } + + /** + * Sets the border line style of the element + * + * @param Image_Graph_Line $borderStyle The line style of the border + * @see Image_Graph_Line + */ + function setBorderStyle(& $borderStyle) + { + if (!is_a($borderStyle, 'Image_Graph_Line')) { + $this->_error( + 'Could not set border style for ' . get_class($this) . ': ' . + get_class($borderStyle), array('borderstyle' => &$borderStyle) + ); + } else { + $this->_borderStyle =& $borderStyle; + $this->add($borderStyle); + } + } + + /** + * Sets the border color of the element. + * + * See colors.txt in the docs/ folder for a list of available named colors. + * @param mixed $color The color + */ + function setBorderColor($color) + { + $this->_borderStyle = $color; + } + + /** + * Gets the border line style of the element + * + * @return int A GD linestyle representing the borders line style + * @see Image_Graph_Line + * @access private + */ + function _getBorderStyle() + { + if (is_object($this->_borderStyle)) { + $result = $this->_borderStyle->_getLineStyle(); + $this->_canvas->setLineThickness($result['thickness']); + $this->_canvas->setLineColor($result['color']); + } elseif ($this->_borderStyle != null) { + $this->_canvas->setLineThickness(1); + $this->_canvas->setLineColor($this->_borderStyle); + } else { + return false; + } + return true; + } + + /** + * Sets the line style of the element + * + * @param Image_Graph_Line $lineStyle The line style of the element + * @see Image_Graph_Line + */ + function setLineStyle(& $lineStyle) + { + if (!is_object($lineStyle)) { + $this->_error( + 'Could not set line style for ' . get_class($this) . ': ' . + get_class($lineStyle), array('linestyle' => &$lineStyle) + ); + } else { + $this->_lineStyle =& $lineStyle; + $this->add($lineStyle); + } + } + + /** + * Sets the line color of the element. + * + * See colors.txt in the docs/ folder for a list of available named colors. + * + * @param mixed $color The color + */ + function setLineColor($color) + { + $this->_lineStyle = $color; + } + + /** + * Gets the line style of the element + * + * @return int A GD linestyle representing the line style + * @see Image_Graph_Line + * @access private + */ + function _getLineStyle($ID = false) + { + if (is_object($this->_lineStyle)) { + $result = $this->_lineStyle->_getLineStyle($ID); + if (is_array($result)) { + $this->_canvas->setLineThickness($result['thickness']); + $this->_canvas->setLineColor($result['color']); + } else { + $this->_canvas->setLineThickness(1); + $this->_canvas->setLineColor($result); + } + } elseif ($this->_lineStyle != null) { + $this->_canvas->setLineThickness(1); + $this->_canvas->setLineColor($this->_lineStyle); + } else { + return false; + } + return true; + } + + /** + * Sets the fill style of the element + * + * @param Image_Graph_Fill $fillStyle The fill style of the element + * @see Image_Graph_Fill + */ + function setFillStyle(& $fillStyle) + { + if (!is_a($fillStyle, 'Image_Graph_Fill')) { + $this->_error( + 'Could not set fill style for ' . get_class($this) . ': ' . + get_class($fillStyle), array('fillstyle' => &$fillStyle) + ); + } else { + $this->_fillStyle =& $fillStyle; + $this->add($fillStyle); + } + } + + /** + * Sets the fill color of the element. + * + * See colors.txt in the docs/ folder for a list of available named colors. + * + * @param mixed $color The color + */ + function setFillColor($color) + { + $this->_fillStyle = $color; + } + + + /** + * Gets the fill style of the element + * + * @return int A GD filestyle representing the fill style + * @see Image_Graph_Fill + * @access private + */ + function _getFillStyle($ID = false) + { + if (is_object($this->_fillStyle)) { + $this->_canvas->setFill($this->_fillStyle->_getFillStyle($ID)); + } elseif ($this->_fillStyle != null) { + $this->_canvas->setFill($this->_fillStyle); + } else { + return false; + } + return true; + } + + /** + * Gets the font of the element. + * + * If not font has been set, the parent font is propagated through it's + * children. + * + * @return array An associated array used for canvas + * @access private + */ + function _getFont($options = false) + { + if (($options === false) && ($this->_defaultFontOptions !== false)) { + return $this->_defaultFontOptions; + } + + if ($options === false) { + $saveDefault = true; + } else { + $saveDefault = false; + } + + if ($options === false) { + $options = $this->_fontOptions; + } else { + $options = array_merge($this->_fontOptions, $options); + } + + if ($this->_font == null) { + $result = $this->_parent->_getFont($options); + } else { + $result = $this->_font->_getFont($options); + } + + if ((isset($result['size'])) && (isset($result['size_rel']))) { + $result['size'] += $result['size_rel']; + unset($result['size_rel']); + } + + if ($saveDefault) { + $this->_defaultFontOptions = $result; + } + + return $result; + } + + /** + * Sets the font of the element + * + * @param Image_Graph_Font $font The font of the element + * @see Image_Graph_Font + */ + function setFont(& $font) + { + if (!is_a($font, 'Image_Graph_Font')) { + $this->_error('Invalid font set on ' . get_class($this)); + } else { + $this->_font =& $font; + $this->add($font); + } + } + + /** + * Sets the font size + * + * @param int $size The size of the font + */ + function setFontSize($size) + { + $this->_fontOptions['size'] = $size; + } + + /** + * Sets the font angle + * + * @param int $angle The angle of the font + */ + function setFontAngle($angle) + { + if ($angle == 'vertical') { + $this->_fontOptions['vertical'] = true; + $this->_fontOptions['angle'] = 90; + } else { + $this->_fontOptions['angle'] = $angle; + } + } + + /** + * Sets the font color + * + * @param mixed $color The color of the font + */ + function setFontColor($color) + { + $this->_fontOptions['color'] = $color; + } + + /** + * Clip the canvas to the coordinates of the element + * + * @param $enable bool Whether clipping should be enabled or disabled + * @access protected + */ + function _clip($enable) + { + $this->_canvas->setClipping( + ($enable ? + array( + 'x0' => min($this->_left, $this->_right), + 'y0' => min($this->_top, $this->_bottom), + 'x1' => max($this->_left, $this->_right), + 'y1' => max($this->_top, $this->_bottom) + ) + : false + ) + ); + } + + /** + * Sets the coordinates of the element + * + * @param int $left The leftmost pixel of the element on the canvas + * @param int $top The topmost pixel of the element on the canvas + * @param int $right The rightmost pixel of the element on the canvas + * @param int $bottom The bottommost pixel of the element on the canvas + * @access private + */ + function _setCoords($left, $top, $right, $bottom) + { + if ($left === false) { + $left = $this->_left; + } + + if ($top === false) { + $top = $this->_top; + } + + if ($right === false) { + $right = $this->_right; + } + + if ($bottom === false) { + $bottom = $this->_bottom; + } + + $this->_left = min($left, $right); + $this->_top = min($top, $bottom); + $this->_right = max($left, $right); + $this->_bottom = max($top, $bottom); + } + + /** + * Moves the element + * + * @param int $deltaX Number of pixels to move the element to the right + * (negative values move to the left) + * @param int $deltaY Number of pixels to move the element downwards + * (negative values move upwards) + * @access private + */ + function _move($deltaX, $deltaY) + { + $this->_left += $deltaX; + $this->_right += $deltaX; + $this->_top += $deltaY; + $this->_bottom += $deltaY; + } + + /** + * Sets the width of the element relative to the left side + * + * @param int $width Number of pixels the element should be in width + * @access private + */ + function _setWidth($width) + { + $this->_right = $this->_left + $width; + } + + /** + * Sets the height of the element relative to the top + * + * @param int $width Number of pixels the element should be in height + * @access private + */ + function _setHeight($height) + { + $this->_bottom = $this->_top + $height; + } + + /** + * Sets padding of the element + * + * @param mixed $padding Number of pixels the element should be padded with + * or an array of paddings (left, top, right and bottom as index) + */ + function setPadding($padding) + { + if (is_array($padding)) { + $this->_padding = array(); + $this->_padding['left'] = (isset($padding['left']) ? $padding['left'] : 0); + $this->_padding['top'] = (isset($padding['top']) ? $padding['top'] : 0); + $this->_padding['right'] = (isset($padding['right']) ? $padding['right'] : 0); + $this->_padding['bottom'] = (isset($padding['bottom']) ? $padding['bottom'] : 0); + } + else { + $this->_padding = array( + 'left' => $padding, + 'top' => $padding, + 'right' => $padding, + 'bottom' => $padding + ); + } + } + + /** + * The width of the element on the canvas + * + * @return int Number of pixels representing the width of the element + */ + function width() + { + return abs($this->_right - $this->_left) + 1; + } + + /** + * The height of the element on the canvas + * + * @return int Number of pixels representing the height of the element + */ + function height() + { + return abs($this->_bottom - $this->_top) + 1; + } + + /** + * Left boundary of the background fill area + * + * @return int Leftmost position on the canvas + * @access private + */ + function _fillLeft() + { + return $this->_left + $this->_padding['left']; + } + + /** + * Top boundary of the background fill area + * + * @return int Topmost position on the canvas + * @access private + */ + function _fillTop() + { + return $this->_top + $this->_padding['top']; + } + + /** + * Right boundary of the background fill area + * + * @return int Rightmost position on the canvas + * @access private + */ + function _fillRight() + { + return $this->_right - $this->_padding['right']; + } + + /** + * Bottom boundary of the background fill area + * + * @return int Bottommost position on the canvas + * @access private + */ + function _fillBottom() + { + return $this->_bottom - $this->_padding['bottom']; + } + + /** + * Returns the filling width of the element on the canvas + * + * @return int Filling width + * @access private + */ + function _fillWidth() + { + return $this->_fillRight() - $this->_fillLeft() + 1; + } + + /** + * Returns the filling height of the element on the canvas + * + * @return int Filling height + * @access private + */ + function _fillHeight() + { + return $this->_fillBottom() - $this->_fillTop() + 1; + } + + /** + * Draws a shadow 'around' the element + * + * Not implemented yet. + * + * @access private + */ + function _displayShadow() + { + if (is_array($this->_shadow)) { + $this->_canvas->startGroup(get_class($this) . '_shadow'); + $this->_canvas->setFillColor($this->_shadow['color']); + $this->_canvas->addVertex(array('x' => $this->_right + 1, 'y' => $this->_top + $this->_shadow['size'])); + $this->_canvas->addVertex(array('x' => $this->_right + $this->_shadow['size'], 'y' => $this->_top + $this->_shadow['size'])); + $this->_canvas->addVertex(array('x' => $this->_right + $this->_shadow['size'], 'y' => $this->_bottom + $this->_shadow['size'])); + $this->_canvas->addVertex(array('x' => $this->_left + $this->_shadow['size'], 'y' => $this->_bottom + $this->_shadow['size'])); + $this->_canvas->addVertex(array('x' => $this->_left + $this->_shadow['size'], 'y' => $this->_bottom + 1)); + $this->_canvas->addVertex(array('x' => $this->_right + 1, 'y' => $this->_bottom + 1)); + $this->_canvas->polygon(array('connect' => true)); + $this->_canvas->endGroup(); + } + } + + /** + * Writes text to the canvas. + * + * @param int $x The x position relative to alignment + * @param int $y The y position relative to alignment + * @param string $text The text + * @param int $alignmen The text alignment (both vertically and horizontally) + */ + function write($x, $y, $text, $alignment = false, $font = false) + { + if (($font === false) && ($this->_defaultFontOptions !== false)) { + $font = $this->_defaultFontOptions; + } else { + $font = $this->_getFont($font); + } + + if ($alignment === false) { + $alignment = IMAGE_GRAPH_ALIGN_LEFT + IMAGE_GRAPH_ALIGN_TOP; + } + + $align = array(); + + if (($alignment & IMAGE_GRAPH_ALIGN_TOP) != 0) { + $align['vertical'] = 'top'; + } else if (($alignment & IMAGE_GRAPH_ALIGN_BOTTOM) != 0) { + $align['vertical'] = 'bottom'; + } else { + $align['vertical'] = 'center'; + } + + if (($alignment & IMAGE_GRAPH_ALIGN_LEFT) != 0) { + $align['horizontal'] = 'left'; + } else if (($alignment & IMAGE_GRAPH_ALIGN_RIGHT) != 0) { + $align['horizontal'] = 'right'; + } else { + $align['horizontal'] = 'center'; + } + + $this->_canvas->setFont($font); + $this->_canvas->addText(array('x' => $x, 'y' => $y, 'text' => $text, 'alignment' => $align)); + } + + /** + * Output the element to the canvas + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @see Image_Graph_Common + * @access private + */ + function _done() + { + $background = $this->_getBackground(); + $border = $this->_getBorderStyle(); + if (($background) || ($border)) { + $this->_canvas->rectangle(array('x0' => $this->_left, 'y0' => $this->_top, 'x1' => $this->_right, 'y1' => $this->_bottom)); + } + + $result = parent::_done(); + + if ($this->_shadow !== false) { + $this->_displayShadow(); + } + + return $result; + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Figure/Circle.php b/includes/pear/Image/Graph/Figure/Circle.php index 262368ae..26006ffd 100644 --- a/includes/pear/Image/Graph/Figure/Circle.php +++ b/includes/pear/Image/Graph/Figure/Circle.php @@ -1,64 +1,64 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Circle.php,v 1.6 2005/08/24 20:36:01 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Figure/Ellipse.php - */ -require_once 'Image/Graph/Figure/Ellipse.php'; - -/** - * Circle to draw on the canvas - * - * @category Images - * @package Image_Graph - * @subpackage Figure - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Figure_Circle extends Image_Graph_Figure_Ellipse -{ - - /** - * Image_Graph_Circle [Constructor] - * - * @param int $x The center pixel of the circle on the canvas - * @param int $y The center pixel of the circle on the canvas - * @param int $radius The radius in pixels of the circle - */ - function Image_Graph_Figure_Circle($x, $y, $radius) - { - parent::Image_Graph_Ellipse($x, $y, $radius, $radius); - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Circle.php,v 1.6 2005/08/24 20:36:01 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Figure/Ellipse.php + */ +require_once 'Image/Graph/Figure/Ellipse.php'; + +/** + * Circle to draw on the canvas + * + * @category Images + * @package Image_Graph + * @subpackage Figure + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Figure_Circle extends Image_Graph_Figure_Ellipse +{ + + /** + * Image_Graph_Circle [Constructor] + * + * @param int $x The center pixel of the circle on the canvas + * @param int $y The center pixel of the circle on the canvas + * @param int $radius The radius in pixels of the circle + */ + function Image_Graph_Figure_Circle($x, $y, $radius) + { + parent::Image_Graph_Ellipse($x, $y, $radius, $radius); + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Figure/Ellipse.php b/includes/pear/Image/Graph/Figure/Ellipse.php index 7c1e39f8..1e4ccc87 100644 --- a/includes/pear/Image/Graph/Figure/Ellipse.php +++ b/includes/pear/Image/Graph/Figure/Ellipse.php @@ -1,97 +1,97 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Ellipse.php,v 1.9 2005/08/24 20:36:00 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Element.php - */ -require_once 'Image/Graph/Element.php'; - -/** - * Ellipse to draw on the canvas - * - * @category Images - * @package Image_Graph - * @subpackage Figure - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Figure_Ellipse extends Image_Graph_Element -{ - - /** - * Ellipse [Constructor] - * - * @param int $x The center pixel of the ellipse on the canvas - * @param int $y The center pixel of the ellipse on the canvas - * @param int $radiusX The width in pixels of the box on the canvas - * @param int $radiusY The height in pixels of the box on the canvas - */ - function Image_Graph_Figure_Ellipse($x, $y, $radiusX, $radiusY) - { - parent::Image_Graph_Element(); - $this->_setCoords($x - $radiusX, $y - $radiusY, $x + $radiusX, $y + $radiusY); - } - - /** - * Output the ellipse - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->ellipse( - array( - 'x' => ($this->_left + $this->_right) / 2, - 'y' => ($this->_top + $this->_bottom) / 2, - 'rx' => $this->width(), - 'ry' => $this->height() - ) - ); - - $this->_canvas->endGroup(); - - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Ellipse.php,v 1.9 2005/08/24 20:36:00 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Element.php + */ +require_once 'Image/Graph/Element.php'; + +/** + * Ellipse to draw on the canvas + * + * @category Images + * @package Image_Graph + * @subpackage Figure + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Figure_Ellipse extends Image_Graph_Element +{ + + /** + * Ellipse [Constructor] + * + * @param int $x The center pixel of the ellipse on the canvas + * @param int $y The center pixel of the ellipse on the canvas + * @param int $radiusX The width in pixels of the box on the canvas + * @param int $radiusY The height in pixels of the box on the canvas + */ + function Image_Graph_Figure_Ellipse($x, $y, $radiusX, $radiusY) + { + parent::Image_Graph_Element(); + $this->_setCoords($x - $radiusX, $y - $radiusY, $x + $radiusX, $y + $radiusY); + } + + /** + * Output the ellipse + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->ellipse( + array( + 'x' => ($this->_left + $this->_right) / 2, + 'y' => ($this->_top + $this->_bottom) / 2, + 'rx' => $this->width(), + 'ry' => $this->height() + ) + ); + + $this->_canvas->endGroup(); + + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Figure/Polygon.php b/includes/pear/Image/Graph/Figure/Polygon.php index 15e0f1c7..e2ff6079 100644 --- a/includes/pear/Image/Graph/Figure/Polygon.php +++ b/includes/pear/Image/Graph/Figure/Polygon.php @@ -1,94 +1,94 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Polygon.php,v 1.8 2005/08/03 21:21:57 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Element.php - */ -require_once 'Image/Graph/Element.php'; - -/** - * Polygon to draw on the canvas - * - * @category Images - * @package Image_Graph - * @subpackage Figure - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Figure_Polygon extends Image_Graph_Element -{ - - /** - * Polygon vertices - * - * @var array - * @access private - */ - var $_polygon = array (); - - /** - * Add a vertex to the polygon - * - * @param int $x X-coordinate - * @param int $y Y-coordinate - */ - function addVertex($x, $y) - { - $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); - } - - /** - * Output the polygon - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->polygon(array('connect' => true)); - - $this->_canvas->endGroup(); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Polygon.php,v 1.8 2005/08/03 21:21:57 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Element.php + */ +require_once 'Image/Graph/Element.php'; + +/** + * Polygon to draw on the canvas + * + * @category Images + * @package Image_Graph + * @subpackage Figure + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Figure_Polygon extends Image_Graph_Element +{ + + /** + * Polygon vertices + * + * @var array + * @access private + */ + var $_polygon = array (); + + /** + * Add a vertex to the polygon + * + * @param int $x X-coordinate + * @param int $y Y-coordinate + */ + function addVertex($x, $y) + { + $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); + } + + /** + * Output the polygon + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->polygon(array('connect' => true)); + + $this->_canvas->endGroup(); + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Figure/Rectangle.php b/includes/pear/Image/Graph/Figure/Rectangle.php index e5c2901c..6b3bd4e5 100644 --- a/includes/pear/Image/Graph/Figure/Rectangle.php +++ b/includes/pear/Image/Graph/Figure/Rectangle.php @@ -1,96 +1,96 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Rectangle.php,v 1.9 2005/08/24 20:36:01 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Element.php - */ -require_once 'Image/Graph/Element.php'; - -/** - * Rectangle to draw on the canvas - * - * @category Images - * @package Image_Graph - * @subpackage Figure - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Figure_Rectangle extends Image_Graph_Element -{ - - /** - * Rectangle [Construcor] - * - * @param int $x The leftmost pixel of the box on the canvas - * @param int $y The topmost pixel of the box on the canvas - * @param int $width The width in pixels of the box on the canvas - * @param int $height The height in pixels of the box on the canvas - */ - function Image_Graph_Figure_Rectangle($x, $y, $width, $height) - { - parent::Image_Graph_Element(); - $this->_setCoords($x, $y, $x + $width, $y + $height); - } - - /** - * Output the box - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->rectangle( - array( - 'x0' => $this->_left, - 'y0' => $this->_top, - 'x1' => $this->_right, - 'y1' => $this->_bottom - ) - ); - - $this->_canvas->endGroup(); - - return true; - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Rectangle.php,v 1.9 2005/08/24 20:36:01 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Element.php + */ +require_once 'Image/Graph/Element.php'; + +/** + * Rectangle to draw on the canvas + * + * @category Images + * @package Image_Graph + * @subpackage Figure + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Figure_Rectangle extends Image_Graph_Element +{ + + /** + * Rectangle [Construcor] + * + * @param int $x The leftmost pixel of the box on the canvas + * @param int $y The topmost pixel of the box on the canvas + * @param int $width The width in pixels of the box on the canvas + * @param int $height The height in pixels of the box on the canvas + */ + function Image_Graph_Figure_Rectangle($x, $y, $width, $height) + { + parent::Image_Graph_Element(); + $this->_setCoords($x, $y, $x + $width, $y + $height); + } + + /** + * Output the box + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->rectangle( + array( + 'x0' => $this->_left, + 'y0' => $this->_top, + 'x1' => $this->_right, + 'y1' => $this->_bottom + ) + ); + + $this->_canvas->endGroup(); + + return true; + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Fill.php b/includes/pear/Image/Graph/Fill.php index b7fadc99..69e3e229 100644 --- a/includes/pear/Image/Graph/Fill.php +++ b/includes/pear/Image/Graph/Fill.php @@ -1,63 +1,63 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Fill.php,v 1.6 2005/02/21 20:49:46 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Element.php - */ -require_once 'Image/Graph/Element.php'; - -/** - * Style used for filling elements. - * - * @category Images - * @package Image_Graph - * @subpackage Fill - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Fill extends Image_Graph_Common -{ - - /** - * Resets the fillstyle - * - * @access private - */ - function _reset() - { - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Fill.php,v 1.6 2005/02/21 20:49:46 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Element.php + */ +require_once 'Image/Graph/Element.php'; + +/** + * Style used for filling elements. + * + * @category Images + * @package Image_Graph + * @subpackage Fill + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Fill extends Image_Graph_Common +{ + + /** + * Resets the fillstyle + * + * @access private + */ + function _reset() + { + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Fill/Array.php b/includes/pear/Image/Graph/Fill/Array.php index d76124f8..0ade5c19 100644 --- a/includes/pear/Image/Graph/Fill/Array.php +++ b/includes/pear/Image/Graph/Fill/Array.php @@ -1,137 +1,137 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Array.php,v 1.8 2005/08/24 20:36:03 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Fill.php - */ -require_once 'Image/Graph/Fill.php'; - -/** - * A sequential array of fillstyles. - * - * This is used for filling multiple objects within the same element with - * different styles. This is done by adding multiple fillstyles to a FillArrray - * structure. The fillarray will then when requested return the 'next' fillstyle - * in sequential order. It is possible to specify ID tags to each fillstyle, - * which is used to make sure some data uses a specific fillstyle (i.e. in a - * multiple-/stackedbarchart you name the {@link Image_Graph_Dataset}s and uses - * this name as ID tag when adding the dataset's associated fillstyle to the - * fillarray. - * - * @category Images - * @package Image_Graph - * @subpackage Fill - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Fill_Array extends Image_Graph_Fill -{ - - /** - * The fill array - * @var array - * @access private - */ - var $_fillStyles = array (); - - /** - * Resets the fillstyle - * - * @access private - */ - function _reset() - { - reset($this->_fillStyles); - } - - /** - * Add a fill style to the array - * - * @param Image_Graph_Fill $style The style to add - * @param string $id The id or name of the style - */ - function &add(& $style, $id = '') - { - if ($id == '') { - $this->_fillStyles[] =& $style; - } else { - $this->_fillStyles[$id] =& $style; - } - reset($this->_fillStyles); - return $style; - } - - /** - * Add a color to the array - * - * @param int $color The color - * @param string $id The id or name of the color - */ - function addColor($color, $id = false) - { - if ($id !== false) { - $this->_fillStyles[$id] = $color; - } else { - $this->_fillStyles[] = $color; - } - reset($this->_fillStyles); - } - - /** - * Return the fillstyle - * - * @return int A GD fillstyle - * @access private - */ - function _getFillStyle($ID = false) - { - if (($ID === false) || (!isset($this->_fillStyles[$ID]))) { - $ID = key($this->_fillStyles); - if (!next($this->_fillStyles)) { - reset($this->_fillStyles); - } - } - $fillStyle =& $this->_fillStyles[$ID]; - - if (is_object($fillStyle)) { - return $fillStyle->_getFillStyle($ID); - } elseif ($fillStyle !== null) { - return $fillStyle; - } else { - return parent::_getFillStyle($ID); - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Array.php,v 1.8 2005/08/24 20:36:03 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Fill.php + */ +require_once 'Image/Graph/Fill.php'; + +/** + * A sequential array of fillstyles. + * + * This is used for filling multiple objects within the same element with + * different styles. This is done by adding multiple fillstyles to a FillArrray + * structure. The fillarray will then when requested return the 'next' fillstyle + * in sequential order. It is possible to specify ID tags to each fillstyle, + * which is used to make sure some data uses a specific fillstyle (i.e. in a + * multiple-/stackedbarchart you name the {@link Image_Graph_Dataset}s and uses + * this name as ID tag when adding the dataset's associated fillstyle to the + * fillarray. + * + * @category Images + * @package Image_Graph + * @subpackage Fill + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Fill_Array extends Image_Graph_Fill +{ + + /** + * The fill array + * @var array + * @access private + */ + var $_fillStyles = array (); + + /** + * Resets the fillstyle + * + * @access private + */ + function _reset() + { + reset($this->_fillStyles); + } + + /** + * Add a fill style to the array + * + * @param Image_Graph_Fill $style The style to add + * @param string $id The id or name of the style + */ + function &add(& $style, $id = '') + { + if ($id == '') { + $this->_fillStyles[] =& $style; + } else { + $this->_fillStyles[$id] =& $style; + } + reset($this->_fillStyles); + return $style; + } + + /** + * Add a color to the array + * + * @param int $color The color + * @param string $id The id or name of the color + */ + function addColor($color, $id = false) + { + if ($id !== false) { + $this->_fillStyles[$id] = $color; + } else { + $this->_fillStyles[] = $color; + } + reset($this->_fillStyles); + } + + /** + * Return the fillstyle + * + * @return int A GD fillstyle + * @access private + */ + function _getFillStyle($ID = false) + { + if (($ID === false) || (!isset($this->_fillStyles[$ID]))) { + $ID = key($this->_fillStyles); + if (!next($this->_fillStyles)) { + reset($this->_fillStyles); + } + } + $fillStyle =& $this->_fillStyles[$ID]; + + if (is_object($fillStyle)) { + return $fillStyle->_getFillStyle($ID); + } elseif ($fillStyle !== null) { + return $fillStyle; + } else { + return parent::_getFillStyle($ID); + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Fill/Gradient.php b/includes/pear/Image/Graph/Fill/Gradient.php index e12b805a..5b39fff8 100644 --- a/includes/pear/Image/Graph/Fill/Gradient.php +++ b/includes/pear/Image/Graph/Fill/Gradient.php @@ -1,149 +1,149 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Gradient.php,v 1.15 2005/08/24 20:36:03 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Fill/Image.php - */ -require_once 'Image/Graph/Fill/Image.php'; - -/** - * Fill using a gradient color. - * This creates a scaled fillstyle with colors flowing gradiently between 2 - * specified RGB values. Several directions are supported: - * - * 1 Vertically (IMAGE_GRAPH_GRAD_VERTICAL) - * - * 2 Horizontally (IMAGE_GRAPH_GRAD_HORIZONTAL) - * - * 3 Mirrored vertically (the color grades from a- b-a vertically) - * (IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED) - * - * 4 Mirrored horizontally (the color grades from a-b-a horizontally) - * IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED - * - * 5 Diagonally from top-left to right-bottom - * (IMAGE_GRAPH_GRAD_DIAGONALLY_TL_BR) - * - * 6 Diagonally from bottom-left to top-right - * (IMAGE_GRAPH_GRAD_DIAGONALLY_BL_TR) - * - * 7 Radially (concentric circles in the center) (IMAGE_GRAPH_GRAD_RADIAL) - * - * @category Images - * @package Image_Graph - * @subpackage Fill - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Fill_Gradient extends Image_Graph_Fill //Image_Graph_Fill_Image -{ - - /** - * The direction of the gradient - * @var int - * @access private - */ - var $_direction; - - /** - * The first color to gradient - * @var mixed - * @access private - */ - var $_startColor; - - /** - * The last color to gradient - * @var mixed - * @access private - */ - var $_endColor; - - /** - * Image_Graph_GradientFill [Constructor] - * - * @param int $direction The direction of the gradient - * @param mixed $startColor The value of the starting color - * @param mixed $endColor The value of the ending color - */ - function Image_Graph_Fill_Gradient($direction, $startColor, $endColor) - { - parent::Image_Graph_Fill(); - $this->_direction = $direction; - $this->_startColor = $startColor; - $this->_endColor = $endColor; - } - - /** - * Return the fillstyle - * - * @return int A GD fillstyle - * @access private - */ - function _getFillStyle($ID = false) - { - switch ($this->_direction) { - case IMAGE_GRAPH_GRAD_HORIZONTAL: - $direction = 'horizontal'; - break; - case IMAGE_GRAPH_GRAD_VERTICAL: - $direction = 'vertical'; - break; - case IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED: - $direction = 'horizontal_mirror'; - break; - case IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED: - $direction = 'vertical_mirror'; - break; - case IMAGE_GRAPH_GRAD_DIAGONALLY_TL_BR: - $direction = 'diagonal_tl_br'; - break; - case IMAGE_GRAPH_GRAD_DIAGONALLY_BL_TR: - $direction = 'diagonal_bl_tr'; - break; - case IMAGE_GRAPH_GRAD_RADIAL: - $direction = 'radial'; - break; - } - - return array( - 'type' => 'gradient', - 'start' => $this->_startColor, - 'end' => $this->_endColor, - 'direction' => $direction - ); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Gradient.php,v 1.15 2005/08/24 20:36:03 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Fill/Image.php + */ +require_once 'Image/Graph/Fill/Image.php'; + +/** + * Fill using a gradient color. + * This creates a scaled fillstyle with colors flowing gradiently between 2 + * specified RGB values. Several directions are supported: + * + * 1 Vertically (IMAGE_GRAPH_GRAD_VERTICAL) + * + * 2 Horizontally (IMAGE_GRAPH_GRAD_HORIZONTAL) + * + * 3 Mirrored vertically (the color grades from a- b-a vertically) + * (IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED) + * + * 4 Mirrored horizontally (the color grades from a-b-a horizontally) + * IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED + * + * 5 Diagonally from top-left to right-bottom + * (IMAGE_GRAPH_GRAD_DIAGONALLY_TL_BR) + * + * 6 Diagonally from bottom-left to top-right + * (IMAGE_GRAPH_GRAD_DIAGONALLY_BL_TR) + * + * 7 Radially (concentric circles in the center) (IMAGE_GRAPH_GRAD_RADIAL) + * + * @category Images + * @package Image_Graph + * @subpackage Fill + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Fill_Gradient extends Image_Graph_Fill //Image_Graph_Fill_Image +{ + + /** + * The direction of the gradient + * @var int + * @access private + */ + var $_direction; + + /** + * The first color to gradient + * @var mixed + * @access private + */ + var $_startColor; + + /** + * The last color to gradient + * @var mixed + * @access private + */ + var $_endColor; + + /** + * Image_Graph_GradientFill [Constructor] + * + * @param int $direction The direction of the gradient + * @param mixed $startColor The value of the starting color + * @param mixed $endColor The value of the ending color + */ + function Image_Graph_Fill_Gradient($direction, $startColor, $endColor) + { + parent::Image_Graph_Fill(); + $this->_direction = $direction; + $this->_startColor = $startColor; + $this->_endColor = $endColor; + } + + /** + * Return the fillstyle + * + * @return int A GD fillstyle + * @access private + */ + function _getFillStyle($ID = false) + { + switch ($this->_direction) { + case IMAGE_GRAPH_GRAD_HORIZONTAL: + $direction = 'horizontal'; + break; + case IMAGE_GRAPH_GRAD_VERTICAL: + $direction = 'vertical'; + break; + case IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED: + $direction = 'horizontal_mirror'; + break; + case IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED: + $direction = 'vertical_mirror'; + break; + case IMAGE_GRAPH_GRAD_DIAGONALLY_TL_BR: + $direction = 'diagonal_tl_br'; + break; + case IMAGE_GRAPH_GRAD_DIAGONALLY_BL_TR: + $direction = 'diagonal_bl_tr'; + break; + case IMAGE_GRAPH_GRAD_RADIAL: + $direction = 'radial'; + break; + } + + return array( + 'type' => 'gradient', + 'start' => $this->_startColor, + 'end' => $this->_endColor, + 'direction' => $direction + ); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Fill/Image.php b/includes/pear/Image/Graph/Fill/Image.php index 101b47d5..832f1eda 100644 --- a/includes/pear/Image/Graph/Fill/Image.php +++ b/includes/pear/Image/Graph/Fill/Image.php @@ -1,97 +1,97 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Image.php,v 1.7 2005/08/24 20:36:03 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Fill.php - */ -require_once 'Image/Graph/Fill.php'; - -/** - * Fill using an image. - * - * @category Images - * @package Image_Graph - * @subpackage Fill - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Fill_Image extends Image_Graph_Fill -{ - - /** - * The file name - * @var stirng - * @access private - */ - var $_filename; - - /** - * The GD Image resource - * @var resource - * @access private - */ - var $_image; - - /** - * Resize the image to the bounding box of the area to fill - * @var bool - * @access private - */ - var $_resize = true; - - /** - * Image_Graph_ImageFill [Constructor] - * - * @param string $filename The filename and path of the image to use for filling - */ - function Image_Graph_Fill_Image($filename) - { - parent::Image_Graph_Fill(); - $this->_filename = $filename; - } - - /** - * Return the fillstyle - * - * @param (something) $ID (Add description) - * @return int A GD fillstyle - * @access private - */ - function _getFillStyle($ID = false) - { - return $this->_filename; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Image.php,v 1.7 2005/08/24 20:36:03 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Fill.php + */ +require_once 'Image/Graph/Fill.php'; + +/** + * Fill using an image. + * + * @category Images + * @package Image_Graph + * @subpackage Fill + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Fill_Image extends Image_Graph_Fill +{ + + /** + * The file name + * @var stirng + * @access private + */ + var $_filename; + + /** + * The GD Image resource + * @var resource + * @access private + */ + var $_image; + + /** + * Resize the image to the bounding box of the area to fill + * @var bool + * @access private + */ + var $_resize = true; + + /** + * Image_Graph_ImageFill [Constructor] + * + * @param string $filename The filename and path of the image to use for filling + */ + function Image_Graph_Fill_Image($filename) + { + parent::Image_Graph_Fill(); + $this->_filename = $filename; + } + + /** + * Return the fillstyle + * + * @param (something) $ID (Add description) + * @return int A GD fillstyle + * @access private + */ + function _getFillStyle($ID = false) + { + return $this->_filename; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Font.php b/includes/pear/Image/Graph/Font.php index 141b5db5..cb1d4884 100644 --- a/includes/pear/Image/Graph/Font.php +++ b/includes/pear/Image/Graph/Font.php @@ -1,158 +1,158 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Font.php,v 1.8 2005/08/24 20:35:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Common.php - */ -require_once 'Image/Graph/Common.php'; - -/** - * A font. - * - * @category Images - * @package Image_Graph - * @subpackage Text - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Font extends Image_Graph_Common -{ - - /** - * The name of the font - * @var string - * @access private - */ - var $_name = false; - - /** - * The angle of the output - * @var int - * @access private - */ - var $_angle = false; - - /** - * The size of the font - * @var int - * @access private - */ - var $_size = 11; - - /** - * The color of the font - * @var Color - * @access private - */ - var $_color = 'black'; - - /** - * Image_Graph_Font [Constructor] - */ - function Image_Graph_Font($name = false, $size = false) - { - parent::Image_Graph_Common(); - if ($name !== false) { - $this->_name = $name; - } - if ($size !== false) { - $this->_size = $size; - } - } - - /** - * Set the color of the font - * - * @param mixed $color The color object of the Font - */ - function setColor($color) - { - $this->_color = $color; - } - - /** - * Set the angle slope of the output font. - * - * 0 = normal, 90 = bottom and up, 180 = upside down, 270 = top and down - * - * @param int $angle The angle in degrees to slope the text - */ - function setAngle($angle) - { - $this->_angle = $angle; - } - - /** - * Set the size of the font - * - * @param int $size The size in pixels of the font - */ - function setSize($size) - { - $this->_size = $size; - } - - /** - * Get the font 'array' - * - * @return array The font 'summary' to pass to the canvas - * @access private - */ - function _getFont($options = false) - { - if ($options === false) { - $options = array(); - } - - if ($this->_name !== false) { - $options['name'] = $this->_name; - } - - if (!isset($options['color'])) { - $options['color'] = $this->_color; - } - - if (!isset($options['size'])) { - $options['size'] = $this->_size; - } - - if ((!isset($options['angle'])) && ($this->_angle !== false)) { - $options['angle'] = $this->_angle; - } - return $options; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Font.php,v 1.8 2005/08/24 20:35:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Common.php + */ +require_once 'Image/Graph/Common.php'; + +/** + * A font. + * + * @category Images + * @package Image_Graph + * @subpackage Text + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Font extends Image_Graph_Common +{ + + /** + * The name of the font + * @var string + * @access private + */ + var $_name = false; + + /** + * The angle of the output + * @var int + * @access private + */ + var $_angle = false; + + /** + * The size of the font + * @var int + * @access private + */ + var $_size = 11; + + /** + * The color of the font + * @var Color + * @access private + */ + var $_color = 'black'; + + /** + * Image_Graph_Font [Constructor] + */ + function Image_Graph_Font($name = false, $size = false) + { + parent::Image_Graph_Common(); + if ($name !== false) { + $this->_name = $name; + } + if ($size !== false) { + $this->_size = $size; + } + } + + /** + * Set the color of the font + * + * @param mixed $color The color object of the Font + */ + function setColor($color) + { + $this->_color = $color; + } + + /** + * Set the angle slope of the output font. + * + * 0 = normal, 90 = bottom and up, 180 = upside down, 270 = top and down + * + * @param int $angle The angle in degrees to slope the text + */ + function setAngle($angle) + { + $this->_angle = $angle; + } + + /** + * Set the size of the font + * + * @param int $size The size in pixels of the font + */ + function setSize($size) + { + $this->_size = $size; + } + + /** + * Get the font 'array' + * + * @return array The font 'summary' to pass to the canvas + * @access private + */ + function _getFont($options = false) + { + if ($options === false) { + $options = array(); + } + + if ($this->_name !== false) { + $options['name'] = $this->_name; + } + + if (!isset($options['color'])) { + $options['color'] = $this->_color; + } + + if (!isset($options['size'])) { + $options['size'] = $this->_size; + } + + if ((!isset($options['angle'])) && ($this->_angle !== false)) { + $options['angle'] = $this->_angle; + } + return $options; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Grid.php b/includes/pear/Image/Graph/Grid.php index fc9cd055..196a3324 100644 --- a/includes/pear/Image/Graph/Grid.php +++ b/includes/pear/Image/Graph/Grid.php @@ -1,175 +1,175 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Grid.php,v 1.8 2005/02/21 20:49:47 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Element.php - */ -require_once 'Image/Graph/Element.php'; - -/** - * A grid displayed on the plotarea. - * - * A grid is associated with a primary and a secondary axis. The grid is - * displayed in context of the primary axis' label interval - meaning that a - * grid for an Y-axis displays a grid for every label on the y-axis (fx. a {@link - * Image_Graph_Grid_Lines}, which displays horizontal lines for every label on - * the y-axis from the x-axis minimum to the x-axis maximum). You should always - * add the grid as one of the first elements to the plotarea. This is due to the - * fact that elements are 'outputted' in the order they are added, i.e. if an - * grid is added *after* a chart, the grid will be displayed on top of the chart - * which is (probably) not desired. - * - * @category Images - * @package Image_Graph - * @subpackage Grid - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Grid extends Image_Graph_Plotarea_Element -{ - - /** - * The primary axis: the grid 'refers' to - * @var Axis - * @access private - */ - var $_primaryAxis = null; - - /** - * The secondary axis - * @var Axis - * @access private - */ - var $_secondaryAxis = null; - - /** - * Set the primary axis: the grid should 'refer' to - * - * @param Image_Graph_Axis $axis The axis - * @access private - */ - function _setPrimaryAxis(& $axis) - { - $this->_primaryAxis =& $axis; - } - - /** - * Set the secondary axis - * - * @param Image_Graph_Axis $axis The axis - * @access private - */ - function _setSecondaryAxis(& $axis) - { - $this->_secondaryAxis =& $axis; - } - - /** - * Get the points on the secondary axis that the grid should 'connect' - * - * @return array The secondary data values that should mark the grid 'end points' - * @access private - */ - function _getSecondaryAxisPoints() - { - if (is_a($this->_secondaryAxis, 'Image_Graph_Axis_Radar')) { - $secondaryValue = false; - $firstValue = $secondaryValue; - while (($secondaryValue = $this->_secondaryAxis->_getNextLabel($secondaryValue)) !== false) { - $secondaryAxisPoints[] = $secondaryValue; - } - $secondaryAxisPoints[] = $firstValue; - } else { - $secondaryAxisPoints = array ('#min#', '#max#'); - } - return $secondaryAxisPoints; - } - - /** - * Get the X pixel position represented by a value - * - * @param double $point the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointX($point) - { - if (($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y) || - ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY)) - { - $point['AXIS_Y'] = $this->_primaryAxis->_type; - } else { - $point['AXIS_Y'] = $this->_secondaryAxis->_type; - } - return parent::_pointX($point); - } - - /** - * Get the Y pixel position represented by a value - * - * @param double $point the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointY($point) - { - if (($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y) || - ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY)) - { - $point['AXIS_Y'] = $this->_primaryAxis->_type; - } else { - $point['AXIS_Y'] = $this->_secondaryAxis->_type; - } - return parent::_pointY($point); - } - - /** - * Causes the object to update all sub elements coordinates. - * - * @access private - */ - function _updateCoords() - { - $this->_setCoords( - $this->_parent->_plotLeft, - $this->_parent->_plotTop, - $this->_parent->_plotRight, - $this->_parent->_plotBottom - ); - parent::_updateCoords(); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Grid.php,v 1.8 2005/02/21 20:49:47 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Element.php + */ +require_once 'Image/Graph/Element.php'; + +/** + * A grid displayed on the plotarea. + * + * A grid is associated with a primary and a secondary axis. The grid is + * displayed in context of the primary axis' label interval - meaning that a + * grid for an Y-axis displays a grid for every label on the y-axis (fx. a {@link + * Image_Graph_Grid_Lines}, which displays horizontal lines for every label on + * the y-axis from the x-axis minimum to the x-axis maximum). You should always + * add the grid as one of the first elements to the plotarea. This is due to the + * fact that elements are 'outputted' in the order they are added, i.e. if an + * grid is added *after* a chart, the grid will be displayed on top of the chart + * which is (probably) not desired. + * + * @category Images + * @package Image_Graph + * @subpackage Grid + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Grid extends Image_Graph_Plotarea_Element +{ + + /** + * The primary axis: the grid 'refers' to + * @var Axis + * @access private + */ + var $_primaryAxis = null; + + /** + * The secondary axis + * @var Axis + * @access private + */ + var $_secondaryAxis = null; + + /** + * Set the primary axis: the grid should 'refer' to + * + * @param Image_Graph_Axis $axis The axis + * @access private + */ + function _setPrimaryAxis(& $axis) + { + $this->_primaryAxis =& $axis; + } + + /** + * Set the secondary axis + * + * @param Image_Graph_Axis $axis The axis + * @access private + */ + function _setSecondaryAxis(& $axis) + { + $this->_secondaryAxis =& $axis; + } + + /** + * Get the points on the secondary axis that the grid should 'connect' + * + * @return array The secondary data values that should mark the grid 'end points' + * @access private + */ + function _getSecondaryAxisPoints() + { + if (is_a($this->_secondaryAxis, 'Image_Graph_Axis_Radar')) { + $secondaryValue = false; + $firstValue = $secondaryValue; + while (($secondaryValue = $this->_secondaryAxis->_getNextLabel($secondaryValue)) !== false) { + $secondaryAxisPoints[] = $secondaryValue; + } + $secondaryAxisPoints[] = $firstValue; + } else { + $secondaryAxisPoints = array ('#min#', '#max#'); + } + return $secondaryAxisPoints; + } + + /** + * Get the X pixel position represented by a value + * + * @param double $point the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointX($point) + { + if (($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y) || + ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY)) + { + $point['AXIS_Y'] = $this->_primaryAxis->_type; + } else { + $point['AXIS_Y'] = $this->_secondaryAxis->_type; + } + return parent::_pointX($point); + } + + /** + * Get the Y pixel position represented by a value + * + * @param double $point the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointY($point) + { + if (($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y) || + ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y_SECONDARY)) + { + $point['AXIS_Y'] = $this->_primaryAxis->_type; + } else { + $point['AXIS_Y'] = $this->_secondaryAxis->_type; + } + return parent::_pointY($point); + } + + /** + * Causes the object to update all sub elements coordinates. + * + * @access private + */ + function _updateCoords() + { + $this->_setCoords( + $this->_parent->_plotLeft, + $this->_parent->_plotTop, + $this->_parent->_plotRight, + $this->_parent->_plotBottom + ); + parent::_updateCoords(); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Grid/Bars.php b/includes/pear/Image/Graph/Grid/Bars.php index dada02a9..35b548bb 100644 --- a/includes/pear/Image/Graph/Grid/Bars.php +++ b/includes/pear/Image/Graph/Grid/Bars.php @@ -1,117 +1,117 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Bars.php,v 1.10 2005/09/14 20:27:25 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Grid.php - */ -require_once 'Image/Graph/Grid.php'; - -/** - * Display alternating bars on the plotarea. - * - * {@link Image_Graph_Grid} - * - * @category Images - * @package Image_Graph - * @subpackage Grid - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Grid_Bars extends Image_Graph_Grid -{ - - /** - * Output the grid - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!$this->_primaryAxis) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $i = 0; - $value = false; - - $previousValue = 0; - - $secondaryPoints = $this->_getSecondaryAxisPoints(); - - while (($value = $this->_primaryAxis->_getNextLabel($value)) !== false) { - if ($i == 1) { - reset($secondaryPoints); - list ($id, $previousSecondaryValue) = each($secondaryPoints); - while (list ($id, $secondaryValue) = each($secondaryPoints)) { - if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_X) { - $p1 = array ('Y' => $secondaryValue, 'X' => $value); - $p2 = array ('Y' => $previousSecondaryValue, 'X' => $value); - $p3 = array ('Y' => $previousSecondaryValue, 'X' => $previousValue); - $p4 = array ('Y' => $secondaryValue, 'X' => $previousValue); - } else { - $p1 = array ('X' => $secondaryValue, 'Y' => $value); - $p2 = array ('X' => $previousSecondaryValue, 'Y' => $value); - $p3 = array ('X' => $previousSecondaryValue, 'Y' => $previousValue); - $p4 = array ('X' => $secondaryValue, 'Y' => $previousValue); - } - - $this->_canvas->addVertex(array('x' => $this->_pointX($p1), 'y' => $this->_pointY($p1))); - $this->_canvas->addVertex(array('x' => $this->_pointX($p2), 'y' => $this->_pointY($p2))); - $this->_canvas->addVertex(array('x' => $this->_pointX($p3), 'y' => $this->_pointY($p3))); - $this->_canvas->addVertex(array('x' => $this->_pointX($p4), 'y' => $this->_pointY($p4))); - - $this->_getFillStyle(); - $this->_canvas->polygon(array('connect' => true)); - - $previousSecondaryValue = $secondaryValue; - } - } - $i = 1 - $i; - $previousValue = $value; - } - - $this->_canvas->endGroup(); - - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Bars.php,v 1.10 2005/09/14 20:27:25 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Grid.php + */ +require_once 'Image/Graph/Grid.php'; + +/** + * Display alternating bars on the plotarea. + * + * {@link Image_Graph_Grid} + * + * @category Images + * @package Image_Graph + * @subpackage Grid + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Grid_Bars extends Image_Graph_Grid +{ + + /** + * Output the grid + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!$this->_primaryAxis) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $i = 0; + $value = false; + + $previousValue = 0; + + $secondaryPoints = $this->_getSecondaryAxisPoints(); + + while (($value = $this->_primaryAxis->_getNextLabel($value)) !== false) { + if ($i == 1) { + reset($secondaryPoints); + list ($id, $previousSecondaryValue) = each($secondaryPoints); + while (list ($id, $secondaryValue) = each($secondaryPoints)) { + if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_X) { + $p1 = array ('Y' => $secondaryValue, 'X' => $value); + $p2 = array ('Y' => $previousSecondaryValue, 'X' => $value); + $p3 = array ('Y' => $previousSecondaryValue, 'X' => $previousValue); + $p4 = array ('Y' => $secondaryValue, 'X' => $previousValue); + } else { + $p1 = array ('X' => $secondaryValue, 'Y' => $value); + $p2 = array ('X' => $previousSecondaryValue, 'Y' => $value); + $p3 = array ('X' => $previousSecondaryValue, 'Y' => $previousValue); + $p4 = array ('X' => $secondaryValue, 'Y' => $previousValue); + } + + $this->_canvas->addVertex(array('x' => $this->_pointX($p1), 'y' => $this->_pointY($p1))); + $this->_canvas->addVertex(array('x' => $this->_pointX($p2), 'y' => $this->_pointY($p2))); + $this->_canvas->addVertex(array('x' => $this->_pointX($p3), 'y' => $this->_pointY($p3))); + $this->_canvas->addVertex(array('x' => $this->_pointX($p4), 'y' => $this->_pointY($p4))); + + $this->_getFillStyle(); + $this->_canvas->polygon(array('connect' => true)); + + $previousSecondaryValue = $secondaryValue; + } + } + $i = 1 - $i; + $previousValue = $value; + } + + $this->_canvas->endGroup(); + + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Grid/Lines.php b/includes/pear/Image/Graph/Grid/Lines.php index 61b7611b..e4dc4e97 100644 --- a/includes/pear/Image/Graph/Grid/Lines.php +++ b/includes/pear/Image/Graph/Grid/Lines.php @@ -1,114 +1,114 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Lines.php,v 1.10 2005/08/24 20:36:04 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Grid.php - */ -require_once 'Image/Graph/Grid.php'; - -/** - * Display a line grid on the plotarea. - * - * {@link Image_Graph_Grid} - * - * @category Images - * @package Image_Graph - * @subpackage Grid - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Grid_Lines extends Image_Graph_Grid -{ - - /** - * GridLines [Constructor] - */ - function Image_Graph_Grid_Lines() - { - parent::Image_Graph_Grid(); - $this->_lineStyle = 'lightgrey'; - } - - /** - * Output the grid - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!$this->_primaryAxis) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $value = false; - - $secondaryPoints = $this->_getSecondaryAxisPoints(); - - while (($value = $this->_primaryAxis->_getNextLabel($value)) !== false) { - reset($secondaryPoints); - list ($id, $previousSecondaryValue) = each($secondaryPoints); - while (list ($id, $secondaryValue) = each($secondaryPoints)) { - if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y) { - $p1 = array ('X' => $secondaryValue, 'Y' => $value); - $p2 = array ('X' => $previousSecondaryValue, 'Y' => $value); - } else { - $p1 = array ('X' => $value, 'Y' => $secondaryValue); - $p2 = array ('X' => $value, 'Y' => $previousSecondaryValue); - } - - $x1 = $this->_pointX($p1); - $y1 = $this->_pointY($p1); - $x2 = $this->_pointX($p2); - $y2 = $this->_pointY($p2); - - $previousSecondaryValue = $secondaryValue; - - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x1, 'y0' => $y1, 'x1' => $x2, 'y1' => $y2)); - } - } - - $this->_canvas->endGroup(); - - return true; - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Lines.php,v 1.10 2005/08/24 20:36:04 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Grid.php + */ +require_once 'Image/Graph/Grid.php'; + +/** + * Display a line grid on the plotarea. + * + * {@link Image_Graph_Grid} + * + * @category Images + * @package Image_Graph + * @subpackage Grid + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Grid_Lines extends Image_Graph_Grid +{ + + /** + * GridLines [Constructor] + */ + function Image_Graph_Grid_Lines() + { + parent::Image_Graph_Grid(); + $this->_lineStyle = 'lightgrey'; + } + + /** + * Output the grid + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!$this->_primaryAxis) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $value = false; + + $secondaryPoints = $this->_getSecondaryAxisPoints(); + + while (($value = $this->_primaryAxis->_getNextLabel($value)) !== false) { + reset($secondaryPoints); + list ($id, $previousSecondaryValue) = each($secondaryPoints); + while (list ($id, $secondaryValue) = each($secondaryPoints)) { + if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y) { + $p1 = array ('X' => $secondaryValue, 'Y' => $value); + $p2 = array ('X' => $previousSecondaryValue, 'Y' => $value); + } else { + $p1 = array ('X' => $value, 'Y' => $secondaryValue); + $p2 = array ('X' => $value, 'Y' => $previousSecondaryValue); + } + + $x1 = $this->_pointX($p1); + $y1 = $this->_pointY($p1); + $x2 = $this->_pointX($p2); + $y2 = $this->_pointY($p2); + + $previousSecondaryValue = $secondaryValue; + + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x1, 'y0' => $y1, 'x1' => $x2, 'y1' => $y2)); + } + } + + $this->_canvas->endGroup(); + + return true; + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Grid/Polar.php b/includes/pear/Image/Graph/Grid/Polar.php index 7491afe6..bc978ae6 100644 --- a/includes/pear/Image/Graph/Grid/Polar.php +++ b/includes/pear/Image/Graph/Grid/Polar.php @@ -1,111 +1,111 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Polar.php,v 1.10 2005/08/24 20:36:04 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - * @since File available since Release 0.3.0dev2 - */ - -/** - * Include file Image/Graph/Grid.php - */ -require_once 'Image/Graph/Grid.php'; - -/** - * Display a line grid on the plotarea. - * - * {@link Image_Graph_Grid} - * - * @category Images - * @package Image_Graph - * @subpackage Grid - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @since Class available since Release 0.3.0dev2 - */ -class Image_Graph_Grid_Polar extends Image_Graph_Grid -{ - - /** - * GridLines [Constructor] - */ - function Image_Graph_Grid_Polar() - { - parent::Image_Graph_Grid(); - $this->_lineStyle = 'lightgrey'; - } - - /** - * Output the grid - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!$this->_primaryAxis) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $value = false; - - $p0 = array ('X' => '#min#', 'Y' => '#min#'); - if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y) { - $p1 = array ('X' => '#min#', 'Y' => '#max#'); - $r0 = abs($this->_pointY($p1) - $this->_pointY($p0)); - } else { - $p1 = array ('X' => '#max#', 'Y' => '#min#'); - $r0 = abs($this->_pointX($p1) - $this->_pointX($p0)); - } - - $cx = $this->_pointX($p0); - $cy = $this->_pointY($p0); - - $span = $this->_primaryAxis->_axisSpan; - - while (($value = $this->_primaryAxis->_getNextLabel($value)) !== false) { - $r = $r0 * ($value - $this->_primaryAxis->_getMinimum()) / $span; - - $this->_getLineStyle(); - $this->_canvas->ellipse(array('x' => $cx, 'y' => $cy, 'rx' => $r, 'ry' => $r)); - } - - $this->_canvas->endGroup(); - - return true; - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Polar.php,v 1.10 2005/08/24 20:36:04 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + * @since File available since Release 0.3.0dev2 + */ + +/** + * Include file Image/Graph/Grid.php + */ +require_once 'Image/Graph/Grid.php'; + +/** + * Display a line grid on the plotarea. + * + * {@link Image_Graph_Grid} + * + * @category Images + * @package Image_Graph + * @subpackage Grid + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @since Class available since Release 0.3.0dev2 + */ +class Image_Graph_Grid_Polar extends Image_Graph_Grid +{ + + /** + * GridLines [Constructor] + */ + function Image_Graph_Grid_Polar() + { + parent::Image_Graph_Grid(); + $this->_lineStyle = 'lightgrey'; + } + + /** + * Output the grid + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!$this->_primaryAxis) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $value = false; + + $p0 = array ('X' => '#min#', 'Y' => '#min#'); + if ($this->_primaryAxis->_type == IMAGE_GRAPH_AXIS_Y) { + $p1 = array ('X' => '#min#', 'Y' => '#max#'); + $r0 = abs($this->_pointY($p1) - $this->_pointY($p0)); + } else { + $p1 = array ('X' => '#max#', 'Y' => '#min#'); + $r0 = abs($this->_pointX($p1) - $this->_pointX($p0)); + } + + $cx = $this->_pointX($p0); + $cy = $this->_pointY($p0); + + $span = $this->_primaryAxis->_axisSpan; + + while (($value = $this->_primaryAxis->_getNextLabel($value)) !== false) { + $r = $r0 * ($value - $this->_primaryAxis->_getMinimum()) / $span; + + $this->_getLineStyle(); + $this->_canvas->ellipse(array('x' => $cx, 'y' => $cy, 'rx' => $r, 'ry' => $r)); + } + + $this->_canvas->endGroup(); + + return true; + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Images/Maps/README b/includes/pear/Image/Graph/Images/Maps/README index 1b984bbb..df5a7bfd 100644 --- a/includes/pear/Image/Graph/Images/Maps/README +++ b/includes/pear/Image/Graph/Images/Maps/README @@ -1,17 +1,17 @@ -In this folder the files for the Image_Graph_Plot_Map are located. They should be the -following format: - -[map name].png -[map name].txt - -The [map name].png (fx. europe.png) is the actual image presenting the map. The -[map name].txt file is the location -> (x,y) conversion table. In this file the -named locations is written on every line with the x and y coordinates after the -name (with a TAB), i.e.: - -Denmark 10 30 -England 4 30 - -Where Denmark will be 'located' on (10, 30) on the map, and England at (4, 30). - +In this folder the files for the Image_Graph_Plot_Map are located. They should be the +following format: + +[map name].png +[map name].txt + +The [map name].png (fx. europe.png) is the actual image presenting the map. The +[map name].txt file is the location -> (x,y) conversion table. In this file the +named locations is written on every line with the x and y coordinates after the +name (with a TAB), i.e.: + +Denmark 10 30 +England 4 30 + +Where Denmark will be 'located' on (10, 30) on the map, and England at (4, 30). + No maps are released by default due to we want to avoid possible copyright issues. \ No newline at end of file diff --git a/includes/pear/Image/Graph/Layout.php b/includes/pear/Image/Graph/Layout.php index 1496bf44..c6543deb 100644 --- a/includes/pear/Image/Graph/Layout.php +++ b/includes/pear/Image/Graph/Layout.php @@ -1,219 +1,219 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Layout.php,v 1.11 2005/09/14 20:27:25 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plotarea/Element.php - */ -require_once 'Image/Graph/Plotarea/Element.php'; - -/** - * Defines an area of the graph that can be layout'ed. - * - * Any class that extends this abstract class can be used within a layout on the canvas. - * - * @category Images - * @package Image_Graph - * @subpackage Layout - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Layout extends Image_Graph_Plotarea_Element -{ - - /** - * Has the coordinates already been updated? - * @var bool - * @access private - */ - var $_updated = false; - - /** - * Alignment of the area for each vertice (left, top, right, bottom) - * @var array - * @access private - */ - var $_alignSize = array ('left' => 0, 'top' => 0, 'right' => 0, 'bottom' => 0); - - /** - * Image_Graph_Layout [Constructor] - */ - function Image_Graph_Layout() - { - parent::Image_Graph_Element(); - $this->_padding = 2; - } - - /** - * Resets the elements - * - * @access private - */ - function _reset() - { - parent::_reset(); - $this->_updated = false; - } - - /** - * Calculate the edge offset for a specific edge - * @param array $alignSize The alignment of the edge - * @param int $offset The offset/posision of the at 0% edge - * @param int $total The total size (width or height) of the element - * @param int $multiplier +/- 1 if the edge should pushed either toward more - * negative or positive values - * @since 0.3.0dev2 - * @access private - */ - function _calcEdgeOffset($alignSize, $offset, $total, $multiplier) - { - if ($alignSize['unit'] == 'percentage') { - return $offset + $multiplier * ($total * $alignSize['value'] / 100); - } elseif ($alignSize['unit'] == 'pixels') { - if (($alignSize['value'] == 'auto_part1') || ($alignSize['value'] == 'auto_part2')) { - $alignSize['value'] = $multiplier * $this->_parent->_getAbsolute($alignSize['value']); - } - if ($alignSize['value'] < 0) { - return $offset + $multiplier * ($total + $alignSize['value']); - } else { - return $offset + $multiplier * $alignSize['value']; - } - } - return $offset; - } - - /** - * Calculate the edges - * - * @access private - */ - function _calcEdges() - { - if ((is_array($this->_alignSize)) && (!$this->_updated)) { - $left = $this->_calcEdgeOffset( - $this->_alignSize['left'], - $this->_parent->_fillLeft(), - $this->_parent->_fillWidth(), - +1 - ); - $top = $this->_calcEdgeOffset( - $this->_alignSize['top'], - $this->_parent->_fillTop(), - $this->_parent->_fillHeight(), - +1 - ); - $right = $this->_calcEdgeOffset( - $this->_alignSize['right'], - $this->_parent->_fillRight(), - $this->_parent->_fillWidth(), - -1 - ); - $bottom = $this->_calcEdgeOffset( - $this->_alignSize['bottom'], - $this->_parent->_fillBottom(), - $this->_parent->_fillHeight(), - -1 - ); - - $this->_setCoords( - $left + $this->_padding, - $top + $this->_padding, - $right - $this->_padding, - $bottom - $this->_padding - ); - } - } - - /** - * Update coordinates - * - * @access private - */ - function _updateCoords() - { - $this->_calcEdges(); - parent::_updateCoords(); - } - - /** - * Pushes an edge of area a specific distance 'into' the canvas - * - * @param int $edge The edge of the canvas to align relative to - * @param int $size The number of pixels or the percentage of the canvas total size to occupy relative to the selected alignment edge - * @access private - */ - function _push($edge, $size = '100%') - { - $result = array(); - if (ereg("([0-9]*)\%", $size, $result)) { - $this->_alignSize[$edge] = array( - 'value' => min(100, max(0, $result[1])), - 'unit' => 'percentage' - ); - } else { - $this->_alignSize[$edge] = array( - 'value' => $size, - 'unit' => 'pixels' - ); - } - } - - /** - * Sets the coordinates of the element - * - * @param int $left The leftmost pixel of the element on the canvas - * @param int $top The topmost pixel of the element on the canvas - * @param int $right The rightmost pixel of the element on the canvas - * @param int $bottom The bottommost pixel of the element on the canvas - * @access private - */ - function _setCoords($left, $top, $right, $bottom) - { - parent::_setCoords($left, $top, $right, $bottom); - $this->_updated = true; - } - - /** - * Returns the calculated "auto" size - * - * @return int The calculated auto size - * @access private - */ - function _getAutoSize() - { - return false; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Layout.php,v 1.12 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plotarea/Element.php + */ +require_once 'Image/Graph/Plotarea/Element.php'; + +/** + * Defines an area of the graph that can be layout'ed. + * + * Any class that extends this abstract class can be used within a layout on the canvas. + * + * @category Images + * @package Image_Graph + * @subpackage Layout + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Layout extends Image_Graph_Plotarea_Element +{ + + /** + * Has the coordinates already been updated? + * @var bool + * @access private + */ + var $_updated = false; + + /** + * Alignment of the area for each vertice (left, top, right, bottom) + * @var array + * @access private + */ + var $_alignSize = array ('left' => 0, 'top' => 0, 'right' => 0, 'bottom' => 0); + + /** + * Image_Graph_Layout [Constructor] + */ + function Image_Graph_Layout() + { + parent::Image_Graph_Element(); + $this->_padding = array('left' => 2, 'top' => 2, 'right' => 2, 'bottom' => 2); + } + + /** + * Resets the elements + * + * @access private + */ + function _reset() + { + parent::_reset(); + $this->_updated = false; + } + + /** + * Calculate the edge offset for a specific edge + * @param array $alignSize The alignment of the edge + * @param int $offset The offset/posision of the at 0% edge + * @param int $total The total size (width or height) of the element + * @param int $multiplier +/- 1 if the edge should pushed either toward more + * negative or positive values + * @since 0.3.0dev2 + * @access private + */ + function _calcEdgeOffset($alignSize, $offset, $total, $multiplier) + { + if ($alignSize['unit'] == 'percentage') { + return $offset + $multiplier * ($total * $alignSize['value'] / 100); + } elseif ($alignSize['unit'] == 'pixels') { + if (($alignSize['value'] == 'auto_part1') || ($alignSize['value'] == 'auto_part2')) { + $alignSize['value'] = $multiplier * $this->_parent->_getAbsolute($alignSize['value']); + } + if ($alignSize['value'] < 0) { + return $offset + $multiplier * ($total + $alignSize['value']); + } else { + return $offset + $multiplier * $alignSize['value']; + } + } + return $offset; + } + + /** + * Calculate the edges + * + * @access private + */ + function _calcEdges() + { + if ((is_array($this->_alignSize)) && (!$this->_updated)) { + $left = $this->_calcEdgeOffset( + $this->_alignSize['left'], + $this->_parent->_fillLeft(), + $this->_parent->_fillWidth(), + +1 + ); + $top = $this->_calcEdgeOffset( + $this->_alignSize['top'], + $this->_parent->_fillTop(), + $this->_parent->_fillHeight(), + +1 + ); + $right = $this->_calcEdgeOffset( + $this->_alignSize['right'], + $this->_parent->_fillRight(), + $this->_parent->_fillWidth(), + -1 + ); + $bottom = $this->_calcEdgeOffset( + $this->_alignSize['bottom'], + $this->_parent->_fillBottom(), + $this->_parent->_fillHeight(), + -1 + ); + + $this->_setCoords( + $left + $this->_padding['left'], + $top + $this->_padding['top'], + $right - $this->_padding['right'], + $bottom - $this->_padding['bottom'] + ); + } + } + + /** + * Update coordinates + * + * @access private + */ + function _updateCoords() + { + $this->_calcEdges(); + parent::_updateCoords(); + } + + /** + * Pushes an edge of area a specific distance 'into' the canvas + * + * @param int $edge The edge of the canvas to align relative to + * @param int $size The number of pixels or the percentage of the canvas total size to occupy relative to the selected alignment edge + * @access private + */ + function _push($edge, $size = '100%') + { + $result = array(); + if (ereg("([0-9]*)\%", $size, $result)) { + $this->_alignSize[$edge] = array( + 'value' => min(100, max(0, $result[1])), + 'unit' => 'percentage' + ); + } else { + $this->_alignSize[$edge] = array( + 'value' => $size, + 'unit' => 'pixels' + ); + } + } + + /** + * Sets the coordinates of the element + * + * @param int $left The leftmost pixel of the element on the canvas + * @param int $top The topmost pixel of the element on the canvas + * @param int $right The rightmost pixel of the element on the canvas + * @param int $bottom The bottommost pixel of the element on the canvas + * @access private + */ + function _setCoords($left, $top, $right, $bottom) + { + parent::_setCoords($left, $top, $right, $bottom); + $this->_updated = true; + } + + /** + * Returns the calculated "auto" size + * + * @return int The calculated auto size + * @access private + */ + function _getAutoSize() + { + return false; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Layout/Horizontal.php b/includes/pear/Image/Graph/Layout/Horizontal.php index 21773dbd..44d42db1 100644 --- a/includes/pear/Image/Graph/Layout/Horizontal.php +++ b/includes/pear/Image/Graph/Layout/Horizontal.php @@ -1,186 +1,186 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Horizontal.php,v 1.10 2005/08/24 20:35:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Layout.php - */ -require_once 'Image/Graph/Layout.php'; - -/** - * Layout for displaying two elements side by side. - * - * This splits the area contained by this element in two, side by side by - * a specified percentage (relative to the left side). A layout can be nested. - * Fx. a HorizontalLayout can layout two {@link Image_Graph_Layout_Vertical}s to - * make a 2 by 2 matrix of 'element-areas'. - * - * @category Images - * @package Image_Graph - * @subpackage Layout - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Layout_Horizontal extends Image_Graph_Layout -{ - - /** - * Part1 of the layout - * @var GraPHPElemnt - * @access private - */ - var $_part1 = false; - - /** - * Part2 of the layout - * @var GraPHPElemnt - * @access private - */ - var $_part2 = false; - - /** - * The percentage of the graph where the split occurs - * @var int - * @access private - */ - var $_percentage; - - /** - * An absolute position where the split occurs - * @var int - * @access private - */ - var $_absolute; - - /** - * HorizontalLayout [Constructor] - * - * @param Image_Graph_Element $part1 The 1st part of the layout - * @param Image_Graph_Element $part2 The 2nd part of the layout - * @param int $percentage The percentage of the layout to split at - */ - function Image_Graph_Layout_Horizontal(& $part1, & $part2, $percentage = 50) - { - parent::Image_Graph_Layout(); - if (!is_a($part1, 'Image_Graph_Layout')) { - $this->_error( - 'Cannot create layout on non-layouable parts: ' . get_class($part1), - array('part1' => &$part1, 'part2' => &$part2) - ); - } elseif (!is_a($part2, 'Image_Graph_Layout')) { - $this->_error( - 'Cannot create layout on non-layouable parts: ' . get_class($part2), - array('part1' => &$part1, 'part2' => &$part2) - ); - } else { - $this->_part1 =& $part1; - $this->_part2 =& $part2; - $this->add($this->_part1); - $this->add($this->_part2); - }; - if ($percentage === 'auto') { - $this->_percentage = false; - $this->_absolute = 'runtime'; - } else { - $this->_absolute = false; - $this->_percentage = max(0, min(100, $percentage)); - } - $this->_split(); - $this->_padding = 0; - } - - /** - * Gets the absolute size of one of the parts. - * - * @param string $part The name of the part - auto_part(1|2) - * @return int The number of pixels the edge should be pushed - * @since 0.3.0dev2 - * @access private - */ - function _getAbsolute(&$part) - { - $part1Size = $this->_part1->_getAutoSize(); - $part2Size = $this->_part2->_getAutoSize(); - $this->_percentage = false; - if (($part1Size !== false) and ($part2Size !== false)) { - $width = $this->_fillWidth() * $part1Size / ($part1Size + $part2Size); - } elseif ($part1Size !== false) { - $width = $part1Size; - } elseif ($part2Size !== false) { - $width = -$part2Size; - } else { - $width = $this->_fillWidth() / 2; - } - if ($part == 'auto_part2') { - $width = -$width; - } - - return $width; - } - - /** - * Splits the layout between the parts, by the specified percentage - * - * @access private - */ - function _split() - { - if (($this->_part1) && ($this->_part2)) { - if ($this->_percentage !== false) { - $split1 = 100 - $this->_percentage; - $split2 = $this->_percentage; - $this->_part1->_push('right', "$split1%"); - $this->_part2->_push('left', "$split2%"); - } else { - $this->_part1->_push('right', 'auto_part1'); - $this->_part2->_push('left', 'auto_part2'); - } - } - } - - /** - * Output the layout to the canvas - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (($this->_part1) && ($this->_part2)) { - return (($this->_part1->_done()) && ($this->_part2->_done())); - } - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Horizontal.php,v 1.11 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Layout.php + */ +require_once 'Image/Graph/Layout.php'; + +/** + * Layout for displaying two elements side by side. + * + * This splits the area contained by this element in two, side by side by + * a specified percentage (relative to the left side). A layout can be nested. + * Fx. a HorizontalLayout can layout two {@link Image_Graph_Layout_Vertical}s to + * make a 2 by 2 matrix of 'element-areas'. + * + * @category Images + * @package Image_Graph + * @subpackage Layout + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Layout_Horizontal extends Image_Graph_Layout +{ + + /** + * Part1 of the layout + * @var GraPHPElemnt + * @access private + */ + var $_part1 = false; + + /** + * Part2 of the layout + * @var GraPHPElemnt + * @access private + */ + var $_part2 = false; + + /** + * The percentage of the graph where the split occurs + * @var int + * @access private + */ + var $_percentage; + + /** + * An absolute position where the split occurs + * @var int + * @access private + */ + var $_absolute; + + /** + * HorizontalLayout [Constructor] + * + * @param Image_Graph_Element $part1 The 1st part of the layout + * @param Image_Graph_Element $part2 The 2nd part of the layout + * @param int $percentage The percentage of the layout to split at + */ + function Image_Graph_Layout_Horizontal(& $part1, & $part2, $percentage = 50) + { + parent::Image_Graph_Layout(); + if (!is_a($part1, 'Image_Graph_Layout')) { + $this->_error( + 'Cannot create layout on non-layouable parts: ' . get_class($part1), + array('part1' => &$part1, 'part2' => &$part2) + ); + } elseif (!is_a($part2, 'Image_Graph_Layout')) { + $this->_error( + 'Cannot create layout on non-layouable parts: ' . get_class($part2), + array('part1' => &$part1, 'part2' => &$part2) + ); + } else { + $this->_part1 =& $part1; + $this->_part2 =& $part2; + $this->add($this->_part1); + $this->add($this->_part2); + }; + if ($percentage === 'auto') { + $this->_percentage = false; + $this->_absolute = 'runtime'; + } else { + $this->_absolute = false; + $this->_percentage = max(0, min(100, $percentage)); + } + $this->_split(); + $this->_padding = array('left' => 0, 'top' => 0, 'right' => 0, 'bottom' => 0); + } + + /** + * Gets the absolute size of one of the parts. + * + * @param string $part The name of the part - auto_part(1|2) + * @return int The number of pixels the edge should be pushed + * @since 0.3.0dev2 + * @access private + */ + function _getAbsolute(&$part) + { + $part1Size = $this->_part1->_getAutoSize(); + $part2Size = $this->_part2->_getAutoSize(); + $this->_percentage = false; + if (($part1Size !== false) and ($part2Size !== false)) { + $width = $this->_fillWidth() * $part1Size / ($part1Size + $part2Size); + } elseif ($part1Size !== false) { + $width = $part1Size; + } elseif ($part2Size !== false) { + $width = -$part2Size; + } else { + $width = $this->_fillWidth() / 2; + } + if ($part == 'auto_part2') { + $width = -$width; + } + + return $width; + } + + /** + * Splits the layout between the parts, by the specified percentage + * + * @access private + */ + function _split() + { + if (($this->_part1) && ($this->_part2)) { + if ($this->_percentage !== false) { + $split1 = 100 - $this->_percentage; + $split2 = $this->_percentage; + $this->_part1->_push('right', "$split1%"); + $this->_part2->_push('left', "$split2%"); + } else { + $this->_part1->_push('right', 'auto_part1'); + $this->_part2->_push('left', 'auto_part2'); + } + } + } + + /** + * Output the layout to the canvas + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (($this->_part1) && ($this->_part2)) { + return (($this->_part1->_done()) && ($this->_part2->_done())); + } + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Layout/Matrix.php b/includes/pear/Image/Graph/Layout/Matrix.php index 5ad98455..376503ac 100644 --- a/includes/pear/Image/Graph/Layout/Matrix.php +++ b/includes/pear/Image/Graph/Layout/Matrix.php @@ -1,201 +1,201 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Matrix.php,v 1.8 2005/08/24 20:35:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Layout.php - */ -require_once 'Image/Graph/Layout.php'; - -/** - * Layout for displaying elements in a matix. - * - * @category Images - * @package Image_Graph - * @subpackage Layout - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Layout_Matrix extends Image_Graph_Layout -{ - - /** - * Layout matrix - * @var array - * @access private - */ - var $_matrix = false; - - /** - * The number of rows - * @var int - * @access private - */ - var $_rows = false; - - /** - * The number of columns - * @var int - * @access private - */ - var $_cols = false; - - /** - * Image_Graph_Layout_Matrix [Constructor] - * - * @param int $rows The number of rows - * @param int $cols The number of cols - * @param bool $autoCreate Specifies whether the matrix should automatically - * be filled with newly created Image_Graph_Plotares objects, or they will - * be added manually - */ - function Image_Graph_Layout_Matrix($rows, $cols, $autoCreate = true) - { - parent::Image_Graph_Layout(); - - $this->_rows = $rows; - $this->_cols = $cols; - if (($this->_rows > 0) && ($this->_cols > 0)) { - $this->_matrix = array(array()); - for ($i = 0; $i < $this->_rows; $i++) { - for ($j = 0; $j < $this->_cols; $j++) { - if ($autoCreate) { - $this->_matrix[$i][$j] =& $this->addNew('plotarea'); - $this->_pushEdges($i, $j); - } else { - $this->_matrix[$i][$j] = false; - } - } - } - } - } - - /** - * Pushes the edges on the specified position in the matrix - * - * @param int $row The row - * @param int $col The column - * @access private - */ - function _pushEdges($row, $col) - { - if ((isset($this->_matrix[$row])) && (isset($this->_matrix[$row][$col]))) { - $height = 100/$this->_rows; - $width = 100/$this->_cols; - if ($col > 0) { - $this->_matrix[$row][$col]->_push('left', round($col*$width) . '%'); - } - if ($col+1 < $this->_cols) { - $this->_matrix[$row][$col]->_push('right', round(100-($col+1)*$width) . '%'); - } - if ($row > 0) { - $this->_matrix[$row][$col]->_push('top', round($row*$height) . '%'); - } - if ($row+1 < $this->_rows) { - $this->_matrix[$row][$col]->_push('bottom', round(100-($row+1)*$height) . '%'); - } - } - } - - /** - * Get the area on the specified position in the matrix - * - * @param int $row The row - * @param int $col The column - * @return Image_Graph_Layout The element of position ($row, $col) in the - * matrix - */ - function &getEntry($row, $col) - { - if ((isset($this->_matrix[$row])) && (isset($this->_matrix[$row][$col]))) { - return $this->_matrix[$row][$col]; - } else { - $result = null; - return $result; - } - } - - /** - * Get the area on the specified position in the matrix - * - * @param int $row The row - * @param int $col The column - * @param Image_Graph_Layout $element The element to set in the position - * ($row, $col) in the matrix - */ - function setEntry($row, $col, &$element) - { - $this->_matrix[$row][$col] =& $element; - $this->_pushEdges($row, $col); - } - - /** - * Update coordinates - * - * @access private - */ - function _updateCoords() - { - for ($i = 0; $i < $this->_rows; $i++) { - for ($j = 0; $j < $this->_cols; $j++) { - $element =& $this->getEntry($i, $j); - $this->add($element); - } - } - parent::_updateCoords(); - } - - /** - * Output the layout to the canvas - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - $result = true; - for ($i = 0; $i < $this->_rows; $i++) { - for ($j = 0; $j < $this->_cols; $j++) { - $element =& $this->getEntry($i, $j); - if ($element) { - if (!$element->_done()) { - $result = false; - } - } - } - } - return $result; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Matrix.php,v 1.8 2005/08/24 20:35:58 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Layout.php + */ +require_once 'Image/Graph/Layout.php'; + +/** + * Layout for displaying elements in a matix. + * + * @category Images + * @package Image_Graph + * @subpackage Layout + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Layout_Matrix extends Image_Graph_Layout +{ + + /** + * Layout matrix + * @var array + * @access private + */ + var $_matrix = false; + + /** + * The number of rows + * @var int + * @access private + */ + var $_rows = false; + + /** + * The number of columns + * @var int + * @access private + */ + var $_cols = false; + + /** + * Image_Graph_Layout_Matrix [Constructor] + * + * @param int $rows The number of rows + * @param int $cols The number of cols + * @param bool $autoCreate Specifies whether the matrix should automatically + * be filled with newly created Image_Graph_Plotares objects, or they will + * be added manually + */ + function Image_Graph_Layout_Matrix($rows, $cols, $autoCreate = true) + { + parent::Image_Graph_Layout(); + + $this->_rows = $rows; + $this->_cols = $cols; + if (($this->_rows > 0) && ($this->_cols > 0)) { + $this->_matrix = array(array()); + for ($i = 0; $i < $this->_rows; $i++) { + for ($j = 0; $j < $this->_cols; $j++) { + if ($autoCreate) { + $this->_matrix[$i][$j] =& $this->addNew('plotarea'); + $this->_pushEdges($i, $j); + } else { + $this->_matrix[$i][$j] = false; + } + } + } + } + } + + /** + * Pushes the edges on the specified position in the matrix + * + * @param int $row The row + * @param int $col The column + * @access private + */ + function _pushEdges($row, $col) + { + if ((isset($this->_matrix[$row])) && (isset($this->_matrix[$row][$col]))) { + $height = 100/$this->_rows; + $width = 100/$this->_cols; + if ($col > 0) { + $this->_matrix[$row][$col]->_push('left', round($col*$width) . '%'); + } + if ($col+1 < $this->_cols) { + $this->_matrix[$row][$col]->_push('right', round(100-($col+1)*$width) . '%'); + } + if ($row > 0) { + $this->_matrix[$row][$col]->_push('top', round($row*$height) . '%'); + } + if ($row+1 < $this->_rows) { + $this->_matrix[$row][$col]->_push('bottom', round(100-($row+1)*$height) . '%'); + } + } + } + + /** + * Get the area on the specified position in the matrix + * + * @param int $row The row + * @param int $col The column + * @return Image_Graph_Layout The element of position ($row, $col) in the + * matrix + */ + function &getEntry($row, $col) + { + if ((isset($this->_matrix[$row])) && (isset($this->_matrix[$row][$col]))) { + return $this->_matrix[$row][$col]; + } else { + $result = null; + return $result; + } + } + + /** + * Get the area on the specified position in the matrix + * + * @param int $row The row + * @param int $col The column + * @param Image_Graph_Layout $element The element to set in the position + * ($row, $col) in the matrix + */ + function setEntry($row, $col, &$element) + { + $this->_matrix[$row][$col] =& $element; + $this->_pushEdges($row, $col); + } + + /** + * Update coordinates + * + * @access private + */ + function _updateCoords() + { + for ($i = 0; $i < $this->_rows; $i++) { + for ($j = 0; $j < $this->_cols; $j++) { + $element =& $this->getEntry($i, $j); + $this->add($element); + } + } + parent::_updateCoords(); + } + + /** + * Output the layout to the canvas + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + $result = true; + for ($i = 0; $i < $this->_rows; $i++) { + for ($j = 0; $j < $this->_cols; $j++) { + $element =& $this->getEntry($i, $j); + if ($element) { + if (!$element->_done()) { + $result = false; + } + } + } + } + return $result; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Layout/Vertical.php b/includes/pear/Image/Graph/Layout/Vertical.php index e61019ca..4315e905 100644 --- a/includes/pear/Image/Graph/Layout/Vertical.php +++ b/includes/pear/Image/Graph/Layout/Vertical.php @@ -1,108 +1,108 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Vertical.php,v 1.6 2005/02/21 20:49:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Layout/Horizontal.php - */ -require_once 'Image/Graph/Layout/Horizontal.php'; - -/** - * Layout for displaying two elements on top of each other. - * - * This splits the area contained by this element in two on top of each other - * by a specified percentage (relative to the top). A layout can be nested. - * Fx. a {@link Image_Graph_Layout_Horizontal} can layout two VerticalLayout's to - * make a 2 by 2 matrix of 'element-areas'. - * - * @category Images - * @package Image_Graph - * @subpackage Layout - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Layout_Vertical extends Image_Graph_Layout_Horizontal -{ - - /** - * Gets the absolute size of one of the parts. - * - * @param string $part The name of the part - auto_part(1|2) - * @return int The number of pixels the edge should be pushed - * @since 0.3.0dev2 - * @access private - */ - function _getAbsolute(&$part) - { - $part1Size = $this->_part1->_getAutoSize(); - $part2Size = $this->_part2->_getAutoSize(); - $this->_percentage = false; - if (($part1Size !== false) and ($part2Size !== false)) { - $height = $this->_fillHeight() * $part1Size / ($part1Size + $part2Size); - } elseif ($part1Size !== false) { - $height = $part1Size; - } elseif ($part2Size !== false) { - $height = -$part2Size; - } else { - $height = $this->_fillHeight() / 2; - } - - if ($part == 'auto_part2') { -// $height = $this->_fillHeight() - $height; - } - - return $height; - } - - /** - * Splits the layout between the parts, by the specified percentage - * - * @access private - */ - function _split() - { - if (($this->_part1) && ($this->_part2)) { - if ($this->_percentage !== false) { - $split1 = 100 - $this->_percentage; - $split2 = $this->_percentage; - $this->_part1->_push('bottom', "$split1%"); - $this->_part2->_push('top', "$split2%"); - } else { - $this->_part1->_push('bottom', 'auto_part1'); - $this->_part2->_push('top', 'auto_part2'); - } - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Vertical.php,v 1.6 2005/02/21 20:49:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Layout/Horizontal.php + */ +require_once 'Image/Graph/Layout/Horizontal.php'; + +/** + * Layout for displaying two elements on top of each other. + * + * This splits the area contained by this element in two on top of each other + * by a specified percentage (relative to the top). A layout can be nested. + * Fx. a {@link Image_Graph_Layout_Horizontal} can layout two VerticalLayout's to + * make a 2 by 2 matrix of 'element-areas'. + * + * @category Images + * @package Image_Graph + * @subpackage Layout + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Layout_Vertical extends Image_Graph_Layout_Horizontal +{ + + /** + * Gets the absolute size of one of the parts. + * + * @param string $part The name of the part - auto_part(1|2) + * @return int The number of pixels the edge should be pushed + * @since 0.3.0dev2 + * @access private + */ + function _getAbsolute(&$part) + { + $part1Size = $this->_part1->_getAutoSize(); + $part2Size = $this->_part2->_getAutoSize(); + $this->_percentage = false; + if (($part1Size !== false) and ($part2Size !== false)) { + $height = $this->_fillHeight() * $part1Size / ($part1Size + $part2Size); + } elseif ($part1Size !== false) { + $height = $part1Size; + } elseif ($part2Size !== false) { + $height = -$part2Size; + } else { + $height = $this->_fillHeight() / 2; + } + + if ($part == 'auto_part2') { +// $height = $this->_fillHeight() - $height; + } + + return $height; + } + + /** + * Splits the layout between the parts, by the specified percentage + * + * @access private + */ + function _split() + { + if (($this->_part1) && ($this->_part2)) { + if ($this->_percentage !== false) { + $split1 = 100 - $this->_percentage; + $split2 = $this->_percentage; + $this->_part1->_push('bottom', "$split1%"); + $this->_part2->_push('top', "$split2%"); + } else { + $this->_part1->_push('bottom', 'auto_part1'); + $this->_part2->_push('top', 'auto_part2'); + } + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Legend.php b/includes/pear/Image/Graph/Legend.php index 077cd1c5..d2023692 100644 --- a/includes/pear/Image/Graph/Legend.php +++ b/includes/pear/Image/Graph/Legend.php @@ -1,385 +1,385 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Legend.php,v 1.15 2005/09/30 18:59:18 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Layout.php - */ -require_once 'Image/Graph/Layout.php'; - -/** - * Displays a legend for a plotarea. - * - * A legend can be displayed in two ways: - * - * 1 As an overlayed box within the plotarea - * - * 2 Layout'ed on the canvas smewhere next to the plotarea. - * - * @category Images - * @package Image_Graph - * @subpackage Legend - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Legend extends Image_Graph_Layout -{ - - /** - * Alignment of the text - * @var int - * @access private - */ - var $_alignment = false; - - /** - * The plotarea(s) to show the legend for - * @var array - * @access private - */ - var $_plotareas = array(); - - /** - * Should markers be shown or not on this legend - * @var bool - * @access private - */ - var $_showMarker = false; - - /** - * Image_Graph_Legend [Constructor] - */ - function Image_Graph_Legend() - { - parent::Image_Graph_Layout(); - $this->_padding = 5; - } - - /** - * The number of actual plots in the plot area - * - * @return int The number of plotes - * @access private - */ - function _plotCount() - { - $count = 0; - $keys = array_keys($this->_plotareas); - foreach($keys as $key) { - $plotarea =& $this->_plotareas[$key]; - if (is_a($plotarea, 'Image_Graph_Plotarea')) { - $keys2 = array_keys($plotarea->_elements); - foreach ($keys2 as $key) { - $element =& $plotarea->_elements[$key]; - if (is_a($element, 'Image_Graph_Plot')) { - $count ++; - } - } - unset($keys2); - } - } - unset($keys); - return $count; - } - - /** - * Get a default parameter array for legendSamples - * @param bool $simulate Whether the array should be used for simulation or - * not - * @return array Default parameter array - * @access private - */ - function _parameterArray($simulate = false) - { - $param['left'] = $this->_left + $this->_padding; - $param['top'] = $this->_top + $this->_padding; - $param['right'] = $this->_right - $this->_padding; - $param['bottom'] = $this->_bottom - $this->_padding; - $param['align'] = $this->_alignment; - $param['x'] = $this->_left + $this->_padding; - $param['y'] = $this->_top + $this->_padding; - $param['width'] = 16; - $param['height'] = 16; - $param['show_marker'] = $this->_showMarker; - $param['maxwidth'] = 0; - $param['font'] = $this->_getFont(); - if ($simulate) { - $param['simulate'] = true; - } - - return $param; - } - - /** - * The height of the element on the canvas - * - * @return int Number of pixels representing the height of the element - * @access private - */ - function _height() - { - $parent = (is_object($this->_parent) ? get_class($this->_parent) : $this->_parent); - - if (strtolower($parent) == 'image_graph_plotarea') { - $param = $this->_parameterArray(true); - $param['align'] = IMAGE_GRAPH_ALIGN_VERTICAL; - $param0 = $param; - $keys = array_keys($this->_plotareas); - foreach($keys as $key) { - $plotarea =& $this->_plotareas[$key]; - $keys2 = array_keys($plotarea->_elements); - foreach($keys2 as $key) { - $element =& $plotarea->_elements[$key]; - if (is_a($element, 'Image_Graph_Plot')) { - $element->_legendSample($param); - } - } - unset($keys2); - } - unset($keys); - return abs($param['y'] - $param0['y']) + 2*$this->_padding; - } else { - return parent::height(); - } - } - - /** - * The width of the element on the canvas - * - * @return int Number of pixels representing the width of the element - * @access private - */ - function _width() - { - $parent = (is_object($this->_parent) ? get_class($this->_parent) : $this->_parent); - - if (strtolower($parent) == 'image_graph_plotarea') { - $param = $this->_parameterArray(true); - $param['align'] = IMAGE_GRAPH_ALIGN_VERTICAL; - $keys = array_keys($this->_plotareas); - foreach($keys as $key) { - $plotarea =& $this->_plotareas[$key]; - $keys2 = array_keys($plotarea->_elements); - foreach($keys2 as $key) { - $element =& $plotarea->_elements[$key]; - if (is_a($element, 'Image_Graph_Plot')) { - $element->_legendSample($param); - } - } - unset($keys2); - } - unset($keys); - return $param['maxwidth']; - } else { - return parent::width(); - } - } - - /** - * Set the alignment of the legend - * - * @param int $alignment The alignment - */ - function setAlignment($alignment) - { - $this->_alignment = $alignment; - } - - /** - * Update coordinates - * - * @access private - */ - function _updateCoords() - { - parent::_updateCoords(); - - $parent = (is_object($this->_parent) ? get_class($this->_parent) : $this->_parent); - - if (strtolower($parent) == 'image_graph_plotarea') { - $w = $this->_width(); - $h = $this->_height(); - - if ($this->_alignment === false) { - $this->_alignment = IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_RIGHT; - } - - if (($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) != 0) { - $y = $this->_parent->_fillBottom() - $h - $this->_padding; - } else { - $y = $this->_parent->_fillTop() + $this->_padding; - } - - if (($this->_alignment & IMAGE_GRAPH_ALIGN_LEFT) != 0) { - $x = $this->_parent->_fillLeft() + $this->_padding; - } else { - $x = $this->_parent->_fillRight() - $w - $this->_padding; - } - - $this->_setCoords($x, $y, $x + $w, $y + $h); - } - } - - /** - * Sets Plotarea - * - * @param Image_Graph_Plotarea $plotarea The plotarea - */ - function setPlotarea(& $plotarea) - { - if (is_a($plotarea, 'Image_Graph_Plotarea')) { - $this->_plotareas[] =& $plotarea; - } - } - - /** - * Sets the parent. The parent chain should ultimately be a GraPHP object - * - * @see Image_Graph - * @param Image_Graph_Common $parent The parent - * @access private - */ - function _setParent(& $parent) - { - parent::_setParent($parent); - if (count($this->_plotareas) == 0) { - $this->setPlotarea($parent); - } - } - - /** - * Set if this legends should show markers - * - * @param bool $showMarker True if markers are to be shown, false is not - */ - function setShowMarker($showMarker) - { - $this->_showMarker = $showMarker; - } - - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - - if (Image_Graph_Element::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this)); - - $param = $this->_parameterArray(); - - $parent = (is_object($this->_parent) ? - get_class($this->_parent) : - $this->_parent - ); - - if (strtolower($parent) == 'image_graph_plotarea') { - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->rectangle( - array( - 'x0' => $this->_left, - 'y0' => $this->_top, - 'x1' => $this->_right, - 'y1' => $this->_bottom - ) - ); - - $param = $this->_parameterArray(); - - $keys = array_keys($this->_plotareas); - foreach($keys as $key) { - $plotarea =& $this->_plotareas[$key]; - $keys2 = array_keys($plotarea->_elements); - foreach($keys2 as $key) { - $element =& $plotarea->_elements[$key]; - if (is_a($element, 'Image_Graph_Plot')) { - $element->_legendSample($param); - } - } - unset($keys2); - } - unset($keys); - } else { - $param0 = $param; - $param0['simulate'] = true; - $keys = array_keys($this->_plotareas); - foreach($keys as $key) { - $plotarea =& $this->_plotareas[$key]; - $keys2 = array_keys($plotarea->_elements); - foreach($keys2 as $key) { - $element =& $plotarea->_elements[$key]; - if (is_a($element, 'Image_Graph_Plot')) { - $element->_legendSample($param0); - } - } - unset($keys2); - } - unset($keys); - if (($this->_alignment & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { - if ($param0['x'] == $param['x']) { - $param['y'] = $param['y'] + ($this->_height() - ($param0['y'] - $param['y']))/2; - } - } else { - if ($param0['y'] == $param['y']) { - $param['x'] = $param['x'] + ($this->_width() - ($param0['x'] - $param['x']))/2; - } - } - - $keys = array_keys($this->_plotareas); - foreach($keys as $key) { - $plotarea =& $this->_plotareas[$key]; - $keys2 = array_keys($plotarea->_elements); - foreach($keys2 as $key) { - $element =& $plotarea->_elements[$key]; - if (is_a($element, 'Image_Graph_Plot')) { - $element->_legendSample($param); - } - } - unset($keys2); - } - unset($keys); - } - - $this->_canvas->endGroup(); - - return true; - } -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Legend.php,v 1.16 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Layout.php + */ +require_once 'Image/Graph/Layout.php'; + +/** + * Displays a legend for a plotarea. + * + * A legend can be displayed in two ways: + * + * 1 As an overlayed box within the plotarea + * + * 2 Layout'ed on the canvas smewhere next to the plotarea. + * + * @category Images + * @package Image_Graph + * @subpackage Legend + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Legend extends Image_Graph_Layout +{ + + /** + * Alignment of the text + * @var int + * @access private + */ + var $_alignment = false; + + /** + * The plotarea(s) to show the legend for + * @var array + * @access private + */ + var $_plotareas = array(); + + /** + * Should markers be shown or not on this legend + * @var bool + * @access private + */ + var $_showMarker = false; + + /** + * Image_Graph_Legend [Constructor] + */ + function Image_Graph_Legend() + { + parent::Image_Graph_Layout(); + $this->_padding = array('left' => 5, 'top' => 5, 'right' => 5, 'bottom' => 5); + } + + /** + * The number of actual plots in the plot area + * + * @return int The number of plotes + * @access private + */ + function _plotCount() + { + $count = 0; + $keys = array_keys($this->_plotareas); + foreach($keys as $key) { + $plotarea =& $this->_plotareas[$key]; + if (is_a($plotarea, 'Image_Graph_Plotarea')) { + $keys2 = array_keys($plotarea->_elements); + foreach ($keys2 as $key) { + $element =& $plotarea->_elements[$key]; + if (is_a($element, 'Image_Graph_Plot')) { + $count ++; + } + } + unset($keys2); + } + } + unset($keys); + return $count; + } + + /** + * Get a default parameter array for legendSamples + * @param bool $simulate Whether the array should be used for simulation or + * not + * @return array Default parameter array + * @access private + */ + function _parameterArray($simulate = false) + { + $param['left'] = $this->_left + $this->_padding['left']; + $param['top'] = $this->_top + $this->_padding['top']; + $param['right'] = $this->_right - $this->_padding['right']; + $param['bottom'] = $this->_bottom - $this->_padding['bottom']; + $param['align'] = $this->_alignment; + $param['x'] = $this->_left + $this->_padding['left']; + $param['y'] = $this->_top + $this->_padding['top']; + $param['width'] = 16; + $param['height'] = 16; + $param['show_marker'] = $this->_showMarker; + $param['maxwidth'] = 0; + $param['font'] = $this->_getFont(); + if ($simulate) { + $param['simulate'] = true; + } + + return $param; + } + + /** + * The height of the element on the canvas + * + * @return int Number of pixels representing the height of the element + * @access private + */ + function _height() + { + $parent = (is_object($this->_parent) ? get_class($this->_parent) : $this->_parent); + + if (strtolower($parent) == 'image_graph_plotarea') { + $param = $this->_parameterArray(true); + $param['align'] = IMAGE_GRAPH_ALIGN_VERTICAL; + $param0 = $param; + $keys = array_keys($this->_plotareas); + foreach($keys as $key) { + $plotarea =& $this->_plotareas[$key]; + $keys2 = array_keys($plotarea->_elements); + foreach($keys2 as $key) { + $element =& $plotarea->_elements[$key]; + if (is_a($element, 'Image_Graph_Plot')) { + $element->_legendSample($param); + } + } + unset($keys2); + } + unset($keys); + return abs($param['y'] - $param0['y']) + $this->_padding['top'] + $this->_padding['bottom']; + } else { + return parent::height(); + } + } + + /** + * The width of the element on the canvas + * + * @return int Number of pixels representing the width of the element + * @access private + */ + function _width() + { + $parent = (is_object($this->_parent) ? get_class($this->_parent) : $this->_parent); + + if (strtolower($parent) == 'image_graph_plotarea') { + $param = $this->_parameterArray(true); + $param['align'] = IMAGE_GRAPH_ALIGN_VERTICAL; + $keys = array_keys($this->_plotareas); + foreach($keys as $key) { + $plotarea =& $this->_plotareas[$key]; + $keys2 = array_keys($plotarea->_elements); + foreach($keys2 as $key) { + $element =& $plotarea->_elements[$key]; + if (is_a($element, 'Image_Graph_Plot')) { + $element->_legendSample($param); + } + } + unset($keys2); + } + unset($keys); + return $param['maxwidth']; + } else { + return parent::width(); + } + } + + /** + * Set the alignment of the legend + * + * @param int $alignment The alignment + */ + function setAlignment($alignment) + { + $this->_alignment = $alignment; + } + + /** + * Update coordinates + * + * @access private + */ + function _updateCoords() + { + parent::_updateCoords(); + + $parent = (is_object($this->_parent) ? get_class($this->_parent) : $this->_parent); + + if (strtolower($parent) == 'image_graph_plotarea') { + $w = $this->_width(); + $h = $this->_height(); + + if ($this->_alignment === false) { + $this->_alignment = IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_RIGHT; + } + + if (($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) != 0) { + $y = $this->_parent->_fillBottom() - $h - $this->_padding['bottom']; + } else { + $y = $this->_parent->_fillTop() + $this->_padding['top']; + } + + if (($this->_alignment & IMAGE_GRAPH_ALIGN_LEFT) != 0) { + $x = $this->_parent->_fillLeft() + $this->_padding['left']; + } else { + $x = $this->_parent->_fillRight() - $w - $this->_padding['right']; + } + + $this->_setCoords($x, $y, $x + $w, $y + $h); + } + } + + /** + * Sets Plotarea + * + * @param Image_Graph_Plotarea $plotarea The plotarea + */ + function setPlotarea(& $plotarea) + { + if (is_a($plotarea, 'Image_Graph_Plotarea')) { + $this->_plotareas[] =& $plotarea; + } + } + + /** + * Sets the parent. The parent chain should ultimately be a GraPHP object + * + * @see Image_Graph + * @param Image_Graph_Common $parent The parent + * @access private + */ + function _setParent(& $parent) + { + parent::_setParent($parent); + if (count($this->_plotareas) == 0) { + $this->setPlotarea($parent); + } + } + + /** + * Set if this legends should show markers + * + * @param bool $showMarker True if markers are to be shown, false is not + */ + function setShowMarker($showMarker) + { + $this->_showMarker = $showMarker; + } + + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + + if (Image_Graph_Element::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this)); + + $param = $this->_parameterArray(); + + $parent = (is_object($this->_parent) ? + get_class($this->_parent) : + $this->_parent + ); + + if (strtolower($parent) == 'image_graph_plotarea') { + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->rectangle( + array( + 'x0' => $this->_left, + 'y0' => $this->_top, + 'x1' => $this->_right, + 'y1' => $this->_bottom + ) + ); + + $param = $this->_parameterArray(); + + $keys = array_keys($this->_plotareas); + foreach($keys as $key) { + $plotarea =& $this->_plotareas[$key]; + $keys2 = array_keys($plotarea->_elements); + foreach($keys2 as $key) { + $element =& $plotarea->_elements[$key]; + if (is_a($element, 'Image_Graph_Plot')) { + $element->_legendSample($param); + } + } + unset($keys2); + } + unset($keys); + } else { + $param0 = $param; + $param0['simulate'] = true; + $keys = array_keys($this->_plotareas); + foreach($keys as $key) { + $plotarea =& $this->_plotareas[$key]; + $keys2 = array_keys($plotarea->_elements); + foreach($keys2 as $key) { + $element =& $plotarea->_elements[$key]; + if (is_a($element, 'Image_Graph_Plot')) { + $element->_legendSample($param0); + } + } + unset($keys2); + } + unset($keys); + if (($this->_alignment & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { + if ($param0['x'] == $param['x']) { + $param['y'] = $param['y'] + ($this->_height() - ($param0['y'] - $param['y']))/2; + } + } else { + if ($param0['y'] == $param['y']) { + $param['x'] = $param['x'] + ($this->_width() - ($param0['x'] - $param['x']))/2; + } + } + + $keys = array_keys($this->_plotareas); + foreach($keys as $key) { + $plotarea =& $this->_plotareas[$key]; + $keys2 = array_keys($plotarea->_elements); + foreach($keys2 as $key) { + $element =& $plotarea->_elements[$key]; + if (is_a($element, 'Image_Graph_Plot')) { + $element->_legendSample($param); + } + } + unset($keys2); + } + unset($keys); + } + + $this->_canvas->endGroup(); + + return true; + } +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Line/Array.php b/includes/pear/Image/Graph/Line/Array.php index 92281d93..cb9ac535 100644 --- a/includes/pear/Image/Graph/Line/Array.php +++ b/includes/pear/Image/Graph/Line/Array.php @@ -1,129 +1,129 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Array.php,v 1.7 2005/02/21 20:49:42 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Common.php - */ -require_once 'Image/Graph/Common.php'; - -/** - * A sequential array of linestyles. - * - * This is used for multiple objects within the same element with different line - * styles. This is done by adding multiple line styles to a LineArrray - * structure. The linearray will then when requested return the 'next' linestyle - * in sequential order. It is possible to specify ID tags to each linestyle, - * which is used to make sure some data uses a specific linestyle (i.e. in a - * multiple-/stackedbarchart you name the {@link Image_Graph_Dataset}s and uses - * this name as ID tag when adding the dataset's associated linestyle to the - * linearray. - * - * @category Images - * @package Image_Graph - * @subpackage Line - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Line_Array extends Image_Graph_Common -{ - - /** - * The fill array - * @var array - * @access private - */ - var $_lineStyles = array (); - - /** - * Add a line style to the array - * - * @param Image_Graph_Line $style The style to add - */ - function add(& $style, $id = false) - { - if (is_a($style, 'Image_Graph_Element')) { - parent::add($style); - } - if ($id === false) { - $this->_lineStyles[] =& $style; - } else { - $this->_lineStyles[$id] =& $style; - } - reset($this->_lineStyles); - - } - - /** - * Add a color to the array - * - * @param int $color The color - * @param string $id The id or name of the color - */ - function addColor($color, $id = false) - { - if ($id !== false) { - $this->_lineStyles[$id] = $color; - } else { - $this->_lineStyles[] = $color; - } - reset($this->_lineStyles); - } - - /** - * Return the linestyle - * - * @return int A GD Linestyle - * @access private - */ - function _getLineStyle($ID = false) - { - if (($ID === false) || (!isset($this->_lineStyles[$ID]))) { - $ID = key($this->_lineStyles); - if (!next($this->_lineStyles)) { - reset($this->_lineStyles); - } - } - $lineStyle =& $this->_lineStyles[$ID]; - - if (is_object($lineStyle)) { - return $lineStyle->_getLineStyle($ID); - } elseif ($lineStyle !== null) { - return $lineStyle; - } else { - return parent::_getLineStyle($ID); - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Array.php,v 1.7 2005/02/21 20:49:42 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Common.php + */ +require_once 'Image/Graph/Common.php'; + +/** + * A sequential array of linestyles. + * + * This is used for multiple objects within the same element with different line + * styles. This is done by adding multiple line styles to a LineArrray + * structure. The linearray will then when requested return the 'next' linestyle + * in sequential order. It is possible to specify ID tags to each linestyle, + * which is used to make sure some data uses a specific linestyle (i.e. in a + * multiple-/stackedbarchart you name the {@link Image_Graph_Dataset}s and uses + * this name as ID tag when adding the dataset's associated linestyle to the + * linearray. + * + * @category Images + * @package Image_Graph + * @subpackage Line + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Line_Array extends Image_Graph_Common +{ + + /** + * The fill array + * @var array + * @access private + */ + var $_lineStyles = array (); + + /** + * Add a line style to the array + * + * @param Image_Graph_Line $style The style to add + */ + function add(& $style, $id = false) + { + if (is_a($style, 'Image_Graph_Element')) { + parent::add($style); + } + if ($id === false) { + $this->_lineStyles[] =& $style; + } else { + $this->_lineStyles[$id] =& $style; + } + reset($this->_lineStyles); + + } + + /** + * Add a color to the array + * + * @param int $color The color + * @param string $id The id or name of the color + */ + function addColor($color, $id = false) + { + if ($id !== false) { + $this->_lineStyles[$id] = $color; + } else { + $this->_lineStyles[] = $color; + } + reset($this->_lineStyles); + } + + /** + * Return the linestyle + * + * @return int A GD Linestyle + * @access private + */ + function _getLineStyle($ID = false) + { + if (($ID === false) || (!isset($this->_lineStyles[$ID]))) { + $ID = key($this->_lineStyles); + if (!next($this->_lineStyles)) { + reset($this->_lineStyles); + } + } + $lineStyle =& $this->_lineStyles[$ID]; + + if (is_object($lineStyle)) { + return $lineStyle->_getLineStyle($ID); + } elseif ($lineStyle !== null) { + return $lineStyle; + } else { + return parent::_getLineStyle($ID); + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Line/Dashed.php b/includes/pear/Image/Graph/Line/Dashed.php index 1a60dc2c..3e903ab1 100644 --- a/includes/pear/Image/Graph/Line/Dashed.php +++ b/includes/pear/Image/Graph/Line/Dashed.php @@ -1,76 +1,76 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Dashed.php,v 1.6 2005/08/24 20:35:52 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Line/Formatted.php - */ -require_once 'Image/Graph/Line/Formatted.php'; - -/** - * Dashed line style. - * - * This style displays as a short line with a shorter space afterwards, i.e - * 4px color1, 2px color2, 4px color1, etc. - * - * @category Images - * @package Image_Graph - * @subpackage Line - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Line_Dashed extends Image_Graph_Line_Formatted -{ - - /** - * Image_Graph_DashedLine [Constructor] - * - * @param mixed $color1 The color for the 'dashes' - * @param mixed $color2 The color for the 'spaces' - */ - function Image_Graph_Line_Dashed($color1, $color2) - { - parent::Image_Graph_Line_Formatted( - array( - $color1, - $color1, - $color1, - $color1, - $color2, - $color2 - ) - ); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Dashed.php,v 1.6 2005/08/24 20:35:52 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Line/Formatted.php + */ +require_once 'Image/Graph/Line/Formatted.php'; + +/** + * Dashed line style. + * + * This style displays as a short line with a shorter space afterwards, i.e + * 4px color1, 2px color2, 4px color1, etc. + * + * @category Images + * @package Image_Graph + * @subpackage Line + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Line_Dashed extends Image_Graph_Line_Formatted +{ + + /** + * Image_Graph_DashedLine [Constructor] + * + * @param mixed $color1 The color for the 'dashes' + * @param mixed $color2 The color for the 'spaces' + */ + function Image_Graph_Line_Dashed($color1, $color2) + { + parent::Image_Graph_Line_Formatted( + array( + $color1, + $color1, + $color1, + $color1, + $color2, + $color2 + ) + ); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Line/Dotted.php b/includes/pear/Image/Graph/Line/Dotted.php index 9bf05d87..f78c3d9d 100644 --- a/includes/pear/Image/Graph/Line/Dotted.php +++ b/includes/pear/Image/Graph/Line/Dotted.php @@ -1,67 +1,67 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Dotted.php,v 1.6 2005/08/24 20:35:52 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Line/Formatted.php - */ -require_once 'Image/Graph/Line/Formatted.php'; - -/** - * Dotted line style. - * - * This style displays as a short line with a shorter space afterwards, i.e - * 1px color1, 1px color2, 1px color1, etc. - * - * @category Images - * @package Image_Graph - * @subpackage Line - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Line_Dotted extends Image_Graph_Line_Formatted -{ - - /** - * DottedLine [Constructor] - * - * @param mixed $color1 The color representing the dots - * @param mixed $color2 The color representing the spaces - */ - function Image_Graph_Line_Dotted($color1, $color2) - { - parent::Image_Graph_Line_Formatted(array ($color1, $color2)); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Dotted.php,v 1.6 2005/08/24 20:35:52 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Line/Formatted.php + */ +require_once 'Image/Graph/Line/Formatted.php'; + +/** + * Dotted line style. + * + * This style displays as a short line with a shorter space afterwards, i.e + * 1px color1, 1px color2, 1px color1, etc. + * + * @category Images + * @package Image_Graph + * @subpackage Line + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Line_Dotted extends Image_Graph_Line_Formatted +{ + + /** + * DottedLine [Constructor] + * + * @param mixed $color1 The color representing the dots + * @param mixed $color2 The color representing the spaces + */ + function Image_Graph_Line_Dotted($color1, $color2) + { + parent::Image_Graph_Line_Formatted(array ($color1, $color2)); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Line/Formatted.php b/includes/pear/Image/Graph/Line/Formatted.php index 58c819ff..0759724d 100644 --- a/includes/pear/Image/Graph/Line/Formatted.php +++ b/includes/pear/Image/Graph/Line/Formatted.php @@ -1,90 +1,90 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Formatted.php,v 1.6 2005/08/24 20:35:51 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Line/Solid.php - */ -require_once 'Image/Graph/Line/Solid.php'; - -/** - * Formatted user defined line style. - * - * Use this to create a user defined line style. Specify an array of colors that are to - * be used for displaying the line. - * - * @category Images - * @package Image_Graph - * @subpackage Line - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Line_Formatted extends Image_Graph_Line_Solid -{ - - /** - * The style of the line - * - * @var array - * @access private - */ - var $_style; - - /** - * Image_Graph_FormattedLine [Constructor] - * - * @param array $style The style of the line - */ - function Image_Graph_Line_Formatted($style) - { - parent::Image_Graph_Line_Solid(reset($style)); - $this->_style = $style; - } - - /** - * Gets the line style of the element - * - * @return int A GD linestyle representing the line style - * @see Image_Graph_Line - * @access private - */ - function _getLineStyle() - { - return array( - 'color' => $this->_style, - 'thickness' => $this->_thickness - ); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Formatted.php,v 1.6 2005/08/24 20:35:51 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Line/Solid.php + */ +require_once 'Image/Graph/Line/Solid.php'; + +/** + * Formatted user defined line style. + * + * Use this to create a user defined line style. Specify an array of colors that are to + * be used for displaying the line. + * + * @category Images + * @package Image_Graph + * @subpackage Line + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Line_Formatted extends Image_Graph_Line_Solid +{ + + /** + * The style of the line + * + * @var array + * @access private + */ + var $_style; + + /** + * Image_Graph_FormattedLine [Constructor] + * + * @param array $style The style of the line + */ + function Image_Graph_Line_Formatted($style) + { + parent::Image_Graph_Line_Solid(reset($style)); + $this->_style = $style; + } + + /** + * Gets the line style of the element + * + * @return int A GD linestyle representing the line style + * @see Image_Graph_Line + * @access private + */ + function _getLineStyle() + { + return array( + 'color' => $this->_style, + 'thickness' => $this->_thickness + ); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Line/Solid.php b/includes/pear/Image/Graph/Line/Solid.php index ffbe685d..4239d348 100644 --- a/includes/pear/Image/Graph/Line/Solid.php +++ b/includes/pear/Image/Graph/Line/Solid.php @@ -1,105 +1,105 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Solid.php,v 1.6 2005/08/24 20:35:51 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Common.php - */ -require_once 'Image/Graph/Common.php'; - -/** - * Simple colored line style. - * - * Use a color for line style. - * - * @category Images - * @package Image_Graph - * @subpackage Line - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Line_Solid extends Image_Graph_Common -{ - - /** - * The thickness of the line (requires GD 2) - * @var int - * @access private - */ - var $_thickness = 1; - - /** - * The color of the line - * @var mixed - * @access private - */ - var $_color; - - /** - * Image_Graph_SolidLine [Constructor] - * - * @param mixed $color The color of the line - */ - function Image_Graph_Line_Solid($color) - { - parent::Image_Graph_Common(); - $this->_color = $color; - } - - /** - * Set the thickness of the linestyle - * - * @param int $thickness The line width in pixels - */ - function setThickness($thickness) - { - $this->_thickness = $thickness; - } - - /** - * Gets the line style of the element - * - * @return int A GD linestyle representing the line style - * @see Image_Graph_Line - * @access private - */ - function _getLineStyle() - { - return array( - 'color' => $this->_color, - 'thickness' => $this->_thickness - ); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Solid.php,v 1.6 2005/08/24 20:35:51 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Common.php + */ +require_once 'Image/Graph/Common.php'; + +/** + * Simple colored line style. + * + * Use a color for line style. + * + * @category Images + * @package Image_Graph + * @subpackage Line + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Line_Solid extends Image_Graph_Common +{ + + /** + * The thickness of the line (requires GD 2) + * @var int + * @access private + */ + var $_thickness = 1; + + /** + * The color of the line + * @var mixed + * @access private + */ + var $_color; + + /** + * Image_Graph_SolidLine [Constructor] + * + * @param mixed $color The color of the line + */ + function Image_Graph_Line_Solid($color) + { + parent::Image_Graph_Common(); + $this->_color = $color; + } + + /** + * Set the thickness of the linestyle + * + * @param int $thickness The line width in pixels + */ + function setThickness($thickness) + { + $this->_thickness = $thickness; + } + + /** + * Gets the line style of the element + * + * @return int A GD linestyle representing the line style + * @see Image_Graph_Line + * @access private + */ + function _getLineStyle() + { + return array( + 'color' => $this->_color, + 'thickness' => $this->_thickness + ); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Logo.php b/includes/pear/Image/Graph/Logo.php index 6093b13e..fea5d986 100644 --- a/includes/pear/Image/Graph/Logo.php +++ b/includes/pear/Image/Graph/Logo.php @@ -1,153 +1,153 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Logo.php,v 1.9 2005/08/24 20:35:56 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Element.php - */ -require_once 'Image/Graph/Element.php'; - -/** - * Displays a logo on the canvas. - * - * By default the logo is displayed in the top-right corner of the canvas. - * - * @category Images - * @package Image_Graph - * @subpackage Logo - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Logo extends Image_Graph_Element -{ - - /** - * The file name - * @var stirng - * @access private - */ - var $_filename; - - /** - * The GD Image resource - * @var resource - * @access private - */ - var $_image; - - /** - * Alignment of the logo - * @var int - * @access private - */ - var $_alignment; - - /** - * Logo [Constructor] - * - * @param string $filename The filename and path of the image to use for logo - */ - function Image_Graph_Logo($filename, $alignment = IMAGE_GRAPH_ALIGN_TOP_RIGHT) - { - parent::Image_Graph_Element(); - $this->_filename = $filename; - $this->_alignment = $alignment; - } - - /** - * Sets the parent. The parent chain should ultimately be a GraPHP object - * - * @see Image_Graph - * @param Image_Graph_Common $parent The parent - * @access private - */ - function _setParent(& $parent) - { - parent::_setParent($parent); - $this->_setCoords( - $this->_parent->_left, - $this->_parent->_top, - $this->_parent->_right, - $this->_parent->_bottom - ); - } - - /** - * Output the logo - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - $align = array(); - - if ($this->_alignment & IMAGE_GRAPH_ALIGN_LEFT) { - $x = $this->_parent->_left + 2; - $align['horizontal'] = 'left'; - } elseif ($this->_alignment & IMAGE_GRAPH_ALIGN_RIGHT) { - $x = $this->_parent->_right - 2; - $align['horizontal'] = 'right'; - } else { - $x = ($this->_parent->_left + $this->_parent->_right) / 2; - $align['horizontal'] = 'center'; - } - - if ($this->_alignment & IMAGE_GRAPH_ALIGN_TOP) { - $y = $this->_parent->_top + 2; - $align['vertical'] = 'top'; - } elseif ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) { - $y = $this->_parent->_bottom - 2; - $align['vertical'] = 'bottom'; - } else { - $y = ($this->_parent->_top + $this->_parent->_bottom) / 2; - $align['vertical'] = 'center'; - } - - $this->_canvas->image( - array( - 'x' => $x, - 'y' => $y, - 'filename' => $this->_filename, - 'alignment' => $align - ) - ); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Logo.php,v 1.9 2005/08/24 20:35:56 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Element.php + */ +require_once 'Image/Graph/Element.php'; + +/** + * Displays a logo on the canvas. + * + * By default the logo is displayed in the top-right corner of the canvas. + * + * @category Images + * @package Image_Graph + * @subpackage Logo + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Logo extends Image_Graph_Element +{ + + /** + * The file name + * @var stirng + * @access private + */ + var $_filename; + + /** + * The GD Image resource + * @var resource + * @access private + */ + var $_image; + + /** + * Alignment of the logo + * @var int + * @access private + */ + var $_alignment; + + /** + * Logo [Constructor] + * + * @param string $filename The filename and path of the image to use for logo + */ + function Image_Graph_Logo($filename, $alignment = IMAGE_GRAPH_ALIGN_TOP_RIGHT) + { + parent::Image_Graph_Element(); + $this->_filename = $filename; + $this->_alignment = $alignment; + } + + /** + * Sets the parent. The parent chain should ultimately be a GraPHP object + * + * @see Image_Graph + * @param Image_Graph_Common $parent The parent + * @access private + */ + function _setParent(& $parent) + { + parent::_setParent($parent); + $this->_setCoords( + $this->_parent->_left, + $this->_parent->_top, + $this->_parent->_right, + $this->_parent->_bottom + ); + } + + /** + * Output the logo + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + $align = array(); + + if ($this->_alignment & IMAGE_GRAPH_ALIGN_LEFT) { + $x = $this->_parent->_left + 2; + $align['horizontal'] = 'left'; + } elseif ($this->_alignment & IMAGE_GRAPH_ALIGN_RIGHT) { + $x = $this->_parent->_right - 2; + $align['horizontal'] = 'right'; + } else { + $x = ($this->_parent->_left + $this->_parent->_right) / 2; + $align['horizontal'] = 'center'; + } + + if ($this->_alignment & IMAGE_GRAPH_ALIGN_TOP) { + $y = $this->_parent->_top + 2; + $align['vertical'] = 'top'; + } elseif ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) { + $y = $this->_parent->_bottom - 2; + $align['vertical'] = 'bottom'; + } else { + $y = ($this->_parent->_top + $this->_parent->_bottom) / 2; + $align['vertical'] = 'center'; + } + + $this->_canvas->image( + array( + 'x' => $x, + 'y' => $y, + 'filename' => $this->_filename, + 'alignment' => $align + ) + ); + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker.php b/includes/pear/Image/Graph/Marker.php index 4bad1540..7e445d66 100644 --- a/includes/pear/Image/Graph/Marker.php +++ b/includes/pear/Image/Graph/Marker.php @@ -1,123 +1,123 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Marker.php,v 1.8 2005/02/21 20:49:47 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plotarea/Element.php - */ -require_once 'Image/Graph/Plotarea/Element.php'; - -/** - * Data point marker. - * - * The data point marker is used for marking the datapoints on a graph with some - * visual label, fx. a cross, a text box with the value or an icon. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Marker extends Image_Graph_Plotarea_Element -{ - - /** - * Secondary marker - * @var Marker - * @access private - */ - var $_secondaryMarker = false; - - /** - * The 'size' of the marker, the meaning depends on the specific Marker - * implementation - * @var int - * @access private - */ - var $_size = 6; - - /** - * Set the 'size' of the marker - * - * @param int $size The 'size' of the marker, the meaning depends on the - * specific Marker implementation - */ - function setSize($size) - { - $this->_size = $size; - } - - /** - * Set the secondary marker - * - * @param Marker $secondaryMarker The secondary marker - */ - function setSecondaryMarker(& $secondaryMarker) - { - $this->_secondaryMarker =& $secondaryMarker; - $this->_secondaryMarker->_setParent($this); - } - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - if (is_a($this->_secondaryMarker, 'Image_Graph_Marker')) { - $this->_secondaryMarker->_drawMarker($x, $y, $values); - } - } - - /** - * Output to the canvas - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Marker.php,v 1.8 2005/02/21 20:49:47 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plotarea/Element.php + */ +require_once 'Image/Graph/Plotarea/Element.php'; + +/** + * Data point marker. + * + * The data point marker is used for marking the datapoints on a graph with some + * visual label, fx. a cross, a text box with the value or an icon. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Marker extends Image_Graph_Plotarea_Element +{ + + /** + * Secondary marker + * @var Marker + * @access private + */ + var $_secondaryMarker = false; + + /** + * The 'size' of the marker, the meaning depends on the specific Marker + * implementation + * @var int + * @access private + */ + var $_size = 6; + + /** + * Set the 'size' of the marker + * + * @param int $size The 'size' of the marker, the meaning depends on the + * specific Marker implementation + */ + function setSize($size) + { + $this->_size = $size; + } + + /** + * Set the secondary marker + * + * @param Marker $secondaryMarker The secondary marker + */ + function setSecondaryMarker(& $secondaryMarker) + { + $this->_secondaryMarker =& $secondaryMarker; + $this->_secondaryMarker->_setParent($this); + } + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + if (is_a($this->_secondaryMarker, 'Image_Graph_Marker')) { + $this->_secondaryMarker->_drawMarker($x, $y, $values); + } + } + + /** + * Output to the canvas + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Array.php b/includes/pear/Image/Graph/Marker/Array.php index e958b872..73dee076 100644 --- a/includes/pear/Image/Graph/Marker/Array.php +++ b/includes/pear/Image/Graph/Marker/Array.php @@ -1,105 +1,105 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Array.php,v 1.6 2005/02/21 20:49:50 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * A sequential array of markers. - * - * This is used for displaying different markers for datapoints on a chart. - * This is done by adding multiple markers to a MarkerArrray structure. - * The marker array will then when requested return the 'next' marker in - * sequential order. It is possible to specify ID tags to each marker, which is - * used to make sure some data uses a specific marker. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Array extends Image_Graph_Marker -{ - - /** - * The marker array - * @var array - * @access private - */ - var $_markers = array (); - - /** - * Add a marker style to the array - * - * @param Marker $marker The marker to add - */ - function add(& $marker) - { - if (is_a($marker, 'Image_Graph_Element')) { - parent::add($marker); - } - $this->_markers[] =& $marker; - reset($this->_markers); - } - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $ID = key($this->_markers); - if (!next($this->_markers)) { - reset($this->_markers); - } - $marker =& $this->_markers[$ID]; - - if ($marker != null) { - $marker->_drawMarker($x, $y, $values); - } - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Array.php,v 1.6 2005/02/21 20:49:50 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * A sequential array of markers. + * + * This is used for displaying different markers for datapoints on a chart. + * This is done by adding multiple markers to a MarkerArrray structure. + * The marker array will then when requested return the 'next' marker in + * sequential order. It is possible to specify ID tags to each marker, which is + * used to make sure some data uses a specific marker. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Array extends Image_Graph_Marker +{ + + /** + * The marker array + * @var array + * @access private + */ + var $_markers = array (); + + /** + * Add a marker style to the array + * + * @param Marker $marker The marker to add + */ + function add(& $marker) + { + if (is_a($marker, 'Image_Graph_Element')) { + parent::add($marker); + } + $this->_markers[] =& $marker; + reset($this->_markers); + } + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $ID = key($this->_markers); + if (!next($this->_markers)) { + reset($this->_markers); + } + $marker =& $this->_markers[$ID]; + + if ($marker != null) { + $marker->_drawMarker($x, $y, $values); + } + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Asterisk.php b/includes/pear/Image/Graph/Marker/Asterisk.php index 908ea109..632acb29 100644 --- a/includes/pear/Image/Graph/Marker/Asterisk.php +++ b/includes/pear/Image/Graph/Marker/Asterisk.php @@ -1,109 +1,109 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Asterisk.php,v 1.6 2005/08/03 21:21:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as an asterisk (*) - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Asterisk extends Image_Graph_Marker -{ - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $this->_getLineStyle(); - $this->_canvas->line( - array( - 'x0' => $x - $this->_size, - 'y0' => $y - $this->_size, - 'x1' => $x + $this->_size, - 'y1' => $y + $this->_size - ) - ); - - $this->_getLineStyle(); - $this->_canvas->line( - array( - 'x0' => $x + $this->_size, - 'y0' => $y - $this->_size, - 'x1' => $x - $this->_size, - 'y1' => $y + $this->_size - ) - ); - - $this->_getLineStyle(); - $this->_canvas->line( - array( - 'x0' => $x - $this->_size, - 'y0' => $y, - 'x1' => $x + $this->_size, - 'y1' => $y - ) - ); - - $this->_getLineStyle(); - $this->_canvas->line( - array( - 'x0' => $x, - 'y0' => $y - $this->_size, - 'x1' => $x, - 'y1' => $y + $this->_size - ) - ); - - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Asterisk.php,v 1.6 2005/08/03 21:21:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as an asterisk (*) + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Asterisk extends Image_Graph_Marker +{ + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $this->_getLineStyle(); + $this->_canvas->line( + array( + 'x0' => $x - $this->_size, + 'y0' => $y - $this->_size, + 'x1' => $x + $this->_size, + 'y1' => $y + $this->_size + ) + ); + + $this->_getLineStyle(); + $this->_canvas->line( + array( + 'x0' => $x + $this->_size, + 'y0' => $y - $this->_size, + 'x1' => $x - $this->_size, + 'y1' => $y + $this->_size + ) + ); + + $this->_getLineStyle(); + $this->_canvas->line( + array( + 'x0' => $x - $this->_size, + 'y0' => $y, + 'x1' => $x + $this->_size, + 'y1' => $y + ) + ); + + $this->_getLineStyle(); + $this->_canvas->line( + array( + 'x0' => $x, + 'y0' => $y - $this->_size, + 'x1' => $x, + 'y1' => $y + $this->_size + ) + ); + + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Average.php b/includes/pear/Image/Graph/Marker/Average.php index 7e691c27..b799d7ff 100644 --- a/includes/pear/Image/Graph/Marker/Average.php +++ b/includes/pear/Image/Graph/Marker/Average.php @@ -1,91 +1,91 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Average.php,v 1.6 2005/08/03 21:21:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * A marker displaying the 'distance' to the datasets average value. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Average extends Image_Graph_Marker -{ - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - if ((isset($values['AVERAGE_Y'])) && - (is_a($this->_parent, 'Image_Graph_Plot'))) - { - $point = $this->_pointXY( - array( - 'X' => $values['APX'], - 'Y' => $values['AVERAGE_Y'] - ) - ); - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $point['X'], 'y1' => $point['Y'])); - - $this->_getLineStyle(); - $this->_canvas->line( - array( - 'x0' => $point['X'] - 2, - 'y0' => $point['Y'], - 'x1' => $point['X'] + 2, - 'y1' => $point['Y'] - ) - ); - } - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Average.php,v 1.6 2005/08/03 21:21:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * A marker displaying the 'distance' to the datasets average value. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Average extends Image_Graph_Marker +{ + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + if ((isset($values['AVERAGE_Y'])) && + (is_a($this->_parent, 'Image_Graph_Plot'))) + { + $point = $this->_pointXY( + array( + 'X' => $values['APX'], + 'Y' => $values['AVERAGE_Y'] + ) + ); + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $point['X'], 'y1' => $point['Y'])); + + $this->_getLineStyle(); + $this->_canvas->line( + array( + 'x0' => $point['X'] - 2, + 'y0' => $point['Y'], + 'x1' => $point['X'] + 2, + 'y1' => $point['Y'] + ) + ); + } + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Box.php b/includes/pear/Image/Graph/Marker/Box.php index 25a91bcc..5b0328e1 100644 --- a/includes/pear/Image/Graph/Marker/Box.php +++ b/includes/pear/Image/Graph/Marker/Box.php @@ -1,76 +1,76 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Box.php,v 1.6 2005/08/03 21:21:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as a box - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Box extends Image_Graph_Marker -{ - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas - * @param array $values The values representing the data the marker 'points' to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->rectangle( - array( - 'x0' => $x - $this->_size, - 'y0' => $y - $this->_size, - 'x1' => $x + $this->_size, - 'y1' => $y + $this->_size - ) - ); - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Box.php,v 1.6 2005/08/03 21:21:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as a box + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Box extends Image_Graph_Marker +{ + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas + * @param array $values The values representing the data the marker 'points' to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->rectangle( + array( + 'x0' => $x - $this->_size, + 'y0' => $y - $this->_size, + 'x1' => $x + $this->_size, + 'y1' => $y + $this->_size + ) + ); + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Bubble.php b/includes/pear/Image/Graph/Marker/Bubble.php index 784d47a9..114d93bd 100644 --- a/includes/pear/Image/Graph/Marker/Bubble.php +++ b/includes/pear/Image/Graph/Marker/Bubble.php @@ -1,91 +1,91 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Bubble.php,v 1.5 2005/02/21 20:49:50 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker/Circle.php - */ -require_once 'Image/Graph/Marker/Circle.php'; - -/** - * Display a circle with y-value percentage as radius (require GD2). - * - * This will display a circle centered on the datapoint with a radius calculated - * as a percentage of the maximum value. I.e. the radius depends on the y-value - * of the datapoint - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Bubble extends Image_Graph_Marker_Circle -{ - - /** - * The radius of the marker when 100% - * @var int - * @access private - */ - var $_size100Pct = 40; - - /** - * Sets the maximum radius the marker can occupy - * - * @param int $radius The new Image_Graph_max radius - */ - function setMaxRadius($radius) - { - $this->_size100Pct = $radius; - } - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $this->_size = $this->_size100Pct*$values['PCT_MAX_Y']/100; - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Bubble.php,v 1.5 2005/02/21 20:49:50 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker/Circle.php + */ +require_once 'Image/Graph/Marker/Circle.php'; + +/** + * Display a circle with y-value percentage as radius (require GD2). + * + * This will display a circle centered on the datapoint with a radius calculated + * as a percentage of the maximum value. I.e. the radius depends on the y-value + * of the datapoint + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Bubble extends Image_Graph_Marker_Circle +{ + + /** + * The radius of the marker when 100% + * @var int + * @access private + */ + var $_size100Pct = 40; + + /** + * Sets the maximum radius the marker can occupy + * + * @param int $radius The new Image_Graph_max radius + */ + function setMaxRadius($radius) + { + $this->_size100Pct = $radius; + } + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $this->_size = $this->_size100Pct*$values['PCT_MAX_Y']/100; + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Circle.php b/includes/pear/Image/Graph/Marker/Circle.php index aaa8dcdc..7851a963 100644 --- a/includes/pear/Image/Graph/Marker/Circle.php +++ b/includes/pear/Image/Graph/Marker/Circle.php @@ -1,96 +1,96 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Circle.php,v 1.6 2005/08/03 21:21:54 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as circle (require GD2) - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Circle extends Image_Graph_Marker -{ - - /** - * The 'size' of the marker, the meaning depends on the specific Marker - * implementation - * @var int - * @access private - */ - var $_size = 10; - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $this->_getFillStyle(); - $this->_getLineStyle(); - - $dA = 2*pi()/($this->_size*2); - $angle = 0; - while ($angle < 2*pi()) { - $this->_canvas->addVertex(array('x' => - $x + $this->_size*cos($angle), 'y' => - $y - $this->_size*sin($angle) - )); - $angle += $dA; - } - - $this->_canvas->addVertex(array('x' => - $x + $this->_size*cos(0), 'y' => - $y - $this->_size*sin(0) - )); - - $this->_canvas->polygon(array('connect' => true)); - - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Circle.php,v 1.6 2005/08/03 21:21:54 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as circle (require GD2) + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Circle extends Image_Graph_Marker +{ + + /** + * The 'size' of the marker, the meaning depends on the specific Marker + * implementation + * @var int + * @access private + */ + var $_size = 10; + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $this->_getFillStyle(); + $this->_getLineStyle(); + + $dA = 2*pi()/($this->_size*2); + $angle = 0; + while ($angle < 2*pi()) { + $this->_canvas->addVertex(array('x' => + $x + $this->_size*cos($angle), 'y' => + $y - $this->_size*sin($angle) + )); + $angle += $dA; + } + + $this->_canvas->addVertex(array('x' => + $x + $this->_size*cos(0), 'y' => + $y - $this->_size*sin(0) + )); + + $this->_canvas->polygon(array('connect' => true)); + + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Cross.php b/includes/pear/Image/Graph/Marker/Cross.php index 2a893069..853d8786 100644 --- a/includes/pear/Image/Graph/Marker/Cross.php +++ b/includes/pear/Image/Graph/Marker/Cross.php @@ -1,114 +1,114 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Cross.php,v 1.7 2005/08/03 21:21:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as a cross. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Cross extends Image_Graph_Marker -{ - - /** - * The thickness of the plus in pixels (thickness is actually double this) - * @var int - * @access private - */ - var $_thickness = 2; - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas - * @param array $values The values representing the data the marker 'points' to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - if ($this->_thickness > 0) { - $this->_getLineStyle(); - $this->_getFillStyle(); - - $d1 = round(0.7071067 * $this->_size); // cos/sin(45 de>) - $d2 = round(0.7071067 * $this->_thickness); // cos/sin(45 deg) - - $this->_canvas->addVertex(array('x' => $x - $d1 - $d2, 'y' => $y - $d1 + $d2)); - $this->_canvas->addVertex(array('x' => $x - $d1 + $d2, 'y' => $y - $d1 - $d2)); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y - 2 * $d2)); - $this->_canvas->addVertex(array('x' => $x + $d1 - $d2, 'y' => $y - $d1 - $d2)); - $this->_canvas->addVertex(array('x' => $x + $d1 + $d2, 'y' => $y - $d1 + $d2)); - $this->_canvas->addVertex(array('x' => $x + 2 * $d2, 'y' => $y)); - $this->_canvas->addVertex(array('x' => $x + $d1 + $d2, 'y' => $y + $d1 - $d2)); - $this->_canvas->addVertex(array('x' => $x + $d1 - $d2, 'y' => $y + $d1 + $d2)); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y + 2 * $d2)); - $this->_canvas->addVertex(array('x' => $x - $d1 + $d2, 'y' => $y + $d1 + $d2)); - $this->_canvas->addVertex(array('x' => $x - $d1 - $d2, 'y' => $y + $d1 - $d2)); - $this->_canvas->addVertex(array('x' => $x - 2 * $d2, 'y' => $y)); - $this->_canvas->polygon(array('connect' => true)); - } else { - $this->_getLineStyle(); - $this->_canvas->line( - array( - 'x0' => $x - $this->_size, - 'y0' => $y - $this->_size, - 'x1' => $x + $this->_size, - 'y1' => $y + $this->_size - ) - ); - - $this->_getLineStyle(); - $this->_canvas->line( - array( - 'x0' => $x + $this->_size, - 'y0' => $y - $this->_size, - 'x1' => $x - $this->_size, - 'y1' => $y + $this->_size - ) - ); - } - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Cross.php,v 1.7 2005/08/03 21:21:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as a cross. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Cross extends Image_Graph_Marker +{ + + /** + * The thickness of the plus in pixels (thickness is actually double this) + * @var int + * @access private + */ + var $_thickness = 2; + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas + * @param array $values The values representing the data the marker 'points' to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + if ($this->_thickness > 0) { + $this->_getLineStyle(); + $this->_getFillStyle(); + + $d1 = round(0.7071067 * $this->_size); // cos/sin(45 de>) + $d2 = round(0.7071067 * $this->_thickness); // cos/sin(45 deg) + + $this->_canvas->addVertex(array('x' => $x - $d1 - $d2, 'y' => $y - $d1 + $d2)); + $this->_canvas->addVertex(array('x' => $x - $d1 + $d2, 'y' => $y - $d1 - $d2)); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y - 2 * $d2)); + $this->_canvas->addVertex(array('x' => $x + $d1 - $d2, 'y' => $y - $d1 - $d2)); + $this->_canvas->addVertex(array('x' => $x + $d1 + $d2, 'y' => $y - $d1 + $d2)); + $this->_canvas->addVertex(array('x' => $x + 2 * $d2, 'y' => $y)); + $this->_canvas->addVertex(array('x' => $x + $d1 + $d2, 'y' => $y + $d1 - $d2)); + $this->_canvas->addVertex(array('x' => $x + $d1 - $d2, 'y' => $y + $d1 + $d2)); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y + 2 * $d2)); + $this->_canvas->addVertex(array('x' => $x - $d1 + $d2, 'y' => $y + $d1 + $d2)); + $this->_canvas->addVertex(array('x' => $x - $d1 - $d2, 'y' => $y + $d1 - $d2)); + $this->_canvas->addVertex(array('x' => $x - 2 * $d2, 'y' => $y)); + $this->_canvas->polygon(array('connect' => true)); + } else { + $this->_getLineStyle(); + $this->_canvas->line( + array( + 'x0' => $x - $this->_size, + 'y0' => $y - $this->_size, + 'x1' => $x + $this->_size, + 'y1' => $y + $this->_size + ) + ); + + $this->_getLineStyle(); + $this->_canvas->line( + array( + 'x0' => $x + $this->_size, + 'y0' => $y - $this->_size, + 'x1' => $x - $this->_size, + 'y1' => $y + $this->_size + ) + ); + } + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Diamond.php b/includes/pear/Image/Graph/Marker/Diamond.php index b1301e06..96ded5e6 100644 --- a/includes/pear/Image/Graph/Marker/Diamond.php +++ b/includes/pear/Image/Graph/Marker/Diamond.php @@ -1,73 +1,73 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Diamond.php,v 1.6 2005/08/03 21:21:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as a diamond. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Diamond extends Image_Graph_Marker -{ - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas - * @param array $values The values representing the data the marker 'points' to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y)); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y - $this->_size)); - $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y)); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y + $this->_size)); - $this->_canvas->polygon(array('connect' => true)); - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Diamond.php,v 1.6 2005/08/03 21:21:55 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as a diamond. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Diamond extends Image_Graph_Marker +{ + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas + * @param array $values The values representing the data the marker 'points' to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y)); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y - $this->_size)); + $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y)); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y + $this->_size)); + $this->_canvas->polygon(array('connect' => true)); + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Icon.php b/includes/pear/Image/Graph/Marker/Icon.php index b8d27b2f..0765942f 100644 --- a/includes/pear/Image/Graph/Marker/Icon.php +++ b/includes/pear/Image/Graph/Marker/Icon.php @@ -1,133 +1,133 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Icon.php,v 1.8 2005/08/24 20:35:53 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker using an image as icon. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Icon extends Image_Graph_Marker -{ - - /** - * Filename of the image icon - * @var string - * @access private - */ - var $_filename; - - /** - * X Point of the icon to use as data 'center' - * @var int - * @access private - */ - var $_pointX = 0; - - /** - * Y Point of the icon to use as data 'center' - * @var int - * @access private - */ - var $_pointY = 0; - - /** - * Create an icon marker - * - * @param string $filename The filename of the icon - * @param int $width The 'new' width of the icon if it is to be resized - * @param int $height The 'new' height of the icon if it is to be resized - */ - function Image_Graph_Marker_Icon($filename, $width = 0, $height = 0) - { - parent::Image_Graph_Marker(); - $this->_filename = $filename; - } - - /** - * Set the X 'center' point of the marker - * - * @param int $x The X 'center' point of the marker - */ - function setPointX($x) - { - $this->_pointX = $x; - } - - /** - * Set the Y 'center' point of the marker - * - * @param int $y The Y 'center' point of the marker - */ - function setPointY($y) - { - $this->_pointY = $y; - } - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - parent::_drawMarker($x, $y, $values); - if ($this->_filename) { - $this->_canvas->image( - array( - 'x' => $x, - 'y' => $y, - 'filename' => $this->_filename, - 'alignment' => array('horizontal' => 'center', 'vertical' => 'center') - ) - ); - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Icon.php,v 1.8 2005/08/24 20:35:53 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker using an image as icon. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Icon extends Image_Graph_Marker +{ + + /** + * Filename of the image icon + * @var string + * @access private + */ + var $_filename; + + /** + * X Point of the icon to use as data 'center' + * @var int + * @access private + */ + var $_pointX = 0; + + /** + * Y Point of the icon to use as data 'center' + * @var int + * @access private + */ + var $_pointY = 0; + + /** + * Create an icon marker + * + * @param string $filename The filename of the icon + * @param int $width The 'new' width of the icon if it is to be resized + * @param int $height The 'new' height of the icon if it is to be resized + */ + function Image_Graph_Marker_Icon($filename, $width = 0, $height = 0) + { + parent::Image_Graph_Marker(); + $this->_filename = $filename; + } + + /** + * Set the X 'center' point of the marker + * + * @param int $x The X 'center' point of the marker + */ + function setPointX($x) + { + $this->_pointX = $x; + } + + /** + * Set the Y 'center' point of the marker + * + * @param int $y The Y 'center' point of the marker + */ + function setPointY($y) + { + $this->_pointY = $y; + } + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + parent::_drawMarker($x, $y, $values); + if ($this->_filename) { + $this->_canvas->image( + array( + 'x' => $x, + 'y' => $y, + 'filename' => $this->_filename, + 'alignment' => array('horizontal' => 'center', 'vertical' => 'center') + ) + ); + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Pinpoint.php b/includes/pear/Image/Graph/Marker/Pinpoint.php index 010a3416..f9784872 100644 --- a/includes/pear/Image/Graph/Marker/Pinpoint.php +++ b/includes/pear/Image/Graph/Marker/Pinpoint.php @@ -1,65 +1,65 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Pinpoint.php,v 1.5 2005/08/24 20:35:53 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker/Icon.php - */ -require_once 'Image/Graph/Marker/Icon.php'; - -/** - * Data marker using a pinpoint as marker. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Pinpoint extends Image_Graph_Marker_Icon -{ - - /** - * Create the marker as a pin point - */ - function Image_Graph_Marker_Pinpoint() - { - parent::Image_Graph_Marker_Icon( - dirname(__FILE__).'/../Images/Icons/pinpoint.png' - ); - $this->setPointX(0); - $this->setPointY(13); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Pinpoint.php,v 1.5 2005/08/24 20:35:53 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker/Icon.php + */ +require_once 'Image/Graph/Marker/Icon.php'; + +/** + * Data marker using a pinpoint as marker. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Pinpoint extends Image_Graph_Marker_Icon +{ + + /** + * Create the marker as a pin point + */ + function Image_Graph_Marker_Pinpoint() + { + parent::Image_Graph_Marker_Icon( + dirname(__FILE__).'/../Images/Icons/pinpoint.png' + ); + $this->setPointX(0); + $this->setPointY(13); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Plus.php b/includes/pear/Image/Graph/Marker/Plus.php index 2909438d..3c3fb7a6 100644 --- a/includes/pear/Image/Graph/Marker/Plus.php +++ b/includes/pear/Image/Graph/Marker/Plus.php @@ -1,98 +1,98 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Plus.php,v 1.7 2005/08/03 21:21:54 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as a plus. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Plus extends Image_Graph_Marker -{ - - /** - * The thickness of the plus in pixels (thickness is actually double this) - * @var int - * @access private - */ - var $_thickness = 2; - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - if ($this->_thickness > 0) { - $this->_getLineStyle(); - $this->_getFillStyle(); - $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y - $this->_thickness)); - $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y - $this->_thickness)); - $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y - $this->_size)); - $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y - $this->_size)); - $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y - $this->_thickness)); - $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y - $this->_thickness)); - $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y + $this->_thickness)); - $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y + $this->_thickness)); - $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y + $this->_size)); - $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y + $this->_size)); - $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y + $this->_thickness)); - $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y + $this->_thickness)); - $this->_canvas->polygon(array('connect' => true)); - } else { - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x - $this->_size, 'y0' => $y, 'x1' => $x + $this->_size, 'y1' => $y)); - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x, 'y0' => $y - $this->_size, 'x1' => $x, 'y1' => $y + $this->_size)); - } - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Plus.php,v 1.7 2005/08/03 21:21:54 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as a plus. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Plus extends Image_Graph_Marker +{ + + /** + * The thickness of the plus in pixels (thickness is actually double this) + * @var int + * @access private + */ + var $_thickness = 2; + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + if ($this->_thickness > 0) { + $this->_getLineStyle(); + $this->_getFillStyle(); + $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y - $this->_thickness)); + $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y - $this->_thickness)); + $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y - $this->_size)); + $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y - $this->_size)); + $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y - $this->_thickness)); + $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y - $this->_thickness)); + $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y + $this->_thickness)); + $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y + $this->_thickness)); + $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y + $this->_size)); + $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y + $this->_size)); + $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y + $this->_thickness)); + $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y + $this->_thickness)); + $this->_canvas->polygon(array('connect' => true)); + } else { + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x - $this->_size, 'y0' => $y, 'x1' => $x + $this->_size, 'y1' => $y)); + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x, 'y0' => $y - $this->_size, 'x1' => $x, 'y1' => $y + $this->_size)); + } + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Pointing.php b/includes/pear/Image/Graph/Marker/Pointing.php index f3975953..3a0d78e2 100644 --- a/includes/pear/Image/Graph/Marker/Pointing.php +++ b/includes/pear/Image/Graph/Marker/Pointing.php @@ -1,140 +1,140 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Pointing.php,v 1.8 2005/08/24 20:35:54 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as a 'pointing marker'. - * - * Points to the data using another marker (as start and/or end) - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Pointing extends Image_Graph_Marker -{ - - /** - * The starting marker - * @var Marker - * @access private - */ - var $_markerStart; - - /** - * The ending marker - * @var Marker - * @access private - */ - var $_markerEnd; - - /** - * The X offset from the 'data' - * @var int - * @access private - */ - var $_deltaX = -1; - - /** - * The Y offset from the 'data' - * @var int - * @access private - */ - var $_deltaY = -1; - - /** - * Create an pointing marker, ie a pin on a board - * - * @param int $deltaX The the X offset from the real 'data' point - * @param int $deltaY The the Y offset from the real 'data' point - * @param Marker $markerEnd The ending marker that represents 'the head of - * the pin' - */ - function Image_Graph_Marker_Pointing($deltaX, $deltaY, & $markerEnd) - { - parent::Image_Graph_Marker(); - $this->_deltaX = $deltaX; - $this->_deltaY = $deltaY; - $this->_markerStart = null; - $this->_markerEnd =& $markerEnd; - } - - /** - * Sets the starting marker, ie the tip of the pin on a board - * - * @param Marker $markerStart The starting marker that represents 'the tip - * of the pin' - */ - function setMarkerStart(& $markerStart) - { - $this->_markerStart =& $markerStart; - $this->_markerStart->_setParent($this); - } - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - parent::_drawMarker($x, $y, $values); - if ($this->_markerStart) { - $this->_markerStart->_setParent($this); - $this->_markerStart->_drawMarker($x, $y, $values); - } - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $this->_deltaX, 'y1' => $y + $this->_deltaY)); - $this->_markerEnd->_setParent($this); - $this->_markerEnd->_drawMarker( - $x + $this->_deltaX, - $y + $this->_deltaY, - $values - ); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Pointing.php,v 1.8 2005/08/24 20:35:54 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as a 'pointing marker'. + * + * Points to the data using another marker (as start and/or end) + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Pointing extends Image_Graph_Marker +{ + + /** + * The starting marker + * @var Marker + * @access private + */ + var $_markerStart; + + /** + * The ending marker + * @var Marker + * @access private + */ + var $_markerEnd; + + /** + * The X offset from the 'data' + * @var int + * @access private + */ + var $_deltaX = -1; + + /** + * The Y offset from the 'data' + * @var int + * @access private + */ + var $_deltaY = -1; + + /** + * Create an pointing marker, ie a pin on a board + * + * @param int $deltaX The the X offset from the real 'data' point + * @param int $deltaY The the Y offset from the real 'data' point + * @param Marker $markerEnd The ending marker that represents 'the head of + * the pin' + */ + function Image_Graph_Marker_Pointing($deltaX, $deltaY, & $markerEnd) + { + parent::Image_Graph_Marker(); + $this->_deltaX = $deltaX; + $this->_deltaY = $deltaY; + $this->_markerStart = null; + $this->_markerEnd =& $markerEnd; + } + + /** + * Sets the starting marker, ie the tip of the pin on a board + * + * @param Marker $markerStart The starting marker that represents 'the tip + * of the pin' + */ + function setMarkerStart(& $markerStart) + { + $this->_markerStart =& $markerStart; + $this->_markerStart->_setParent($this); + } + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + parent::_drawMarker($x, $y, $values); + if ($this->_markerStart) { + $this->_markerStart->_setParent($this); + $this->_markerStart->_drawMarker($x, $y, $values); + } + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $this->_deltaX, 'y1' => $y + $this->_deltaY)); + $this->_markerEnd->_setParent($this); + $this->_markerEnd->_drawMarker( + $x + $this->_deltaX, + $y + $this->_deltaY, + $values + ); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Pointing/Angular.php b/includes/pear/Image/Graph/Marker/Pointing/Angular.php index 327974bb..c12969bf 100644 --- a/includes/pear/Image/Graph/Marker/Pointing/Angular.php +++ b/includes/pear/Image/Graph/Marker/Pointing/Angular.php @@ -1,105 +1,105 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Angular.php,v 1.5 2005/08/24 20:36:03 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker/Pointing.php - */ -require_once 'Image/Graph/Marker/Pointing.php'; - -/** - * Marker that points 'away' from the graph. - * - * Use this as a marker for displaying another marker pointing to the original - * point on the graph - where the 'pointer' is calculated as line orthogonal to - * a line drawn between the points neighbours to both sides (an approximate - * tangent). This should make an the pointer appear to point 'straight' out from - * the graph. The 'head' of the pointer is then another marker of any choice. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Pointing_Angular extends Image_Graph_Marker_Pointing -{ - - /** - * The length of the angular marker - * @var int - * @access private - */ - var $_radius; - - /** - * Image_Graph_AngularPointingMarker [Constructor] - * @param int $radius The 'length' of the pointer - * @param Marker $markerEnd The ending marker that represents 'the head of - * the pin' - */ - function Image_Graph_Marker_Pointing_Angular($radius, & $markerEnd) - { - parent::Image_Graph_Marker_Pointing(0, 0, $markerEnd); - $this->_radius = $radius; - } - - /** - * Draw the marker on the canvas - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - if ((isset($values['LENGTH'])) && ($values['LENGTH'] != 0)) { - $this->_deltaX = - $values['AX'] * $this->_radius / $values['LENGTH']; - $this->_deltaY = - $values['AY'] * $this->_radius / $values['LENGTH']; - } - - if ((isset($values['NPY'])) && (isset($values['APY'])) && - (isset($values['PPY'])) && ($values['NPY'] > $values['APY']) && - ($values['PPY'] > $values['APY'])) - { - $this->_deltaX = - $this->_deltaX; - $this->_deltaY = - $this->_deltaY; - } - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Angular.php,v 1.5 2005/08/24 20:36:03 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker/Pointing.php + */ +require_once 'Image/Graph/Marker/Pointing.php'; + +/** + * Marker that points 'away' from the graph. + * + * Use this as a marker for displaying another marker pointing to the original + * point on the graph - where the 'pointer' is calculated as line orthogonal to + * a line drawn between the points neighbours to both sides (an approximate + * tangent). This should make an the pointer appear to point 'straight' out from + * the graph. The 'head' of the pointer is then another marker of any choice. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Pointing_Angular extends Image_Graph_Marker_Pointing +{ + + /** + * The length of the angular marker + * @var int + * @access private + */ + var $_radius; + + /** + * Image_Graph_AngularPointingMarker [Constructor] + * @param int $radius The 'length' of the pointer + * @param Marker $markerEnd The ending marker that represents 'the head of + * the pin' + */ + function Image_Graph_Marker_Pointing_Angular($radius, & $markerEnd) + { + parent::Image_Graph_Marker_Pointing(0, 0, $markerEnd); + $this->_radius = $radius; + } + + /** + * Draw the marker on the canvas + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + if ((isset($values['LENGTH'])) && ($values['LENGTH'] != 0)) { + $this->_deltaX = - $values['AX'] * $this->_radius / $values['LENGTH']; + $this->_deltaY = - $values['AY'] * $this->_radius / $values['LENGTH']; + } + + if ((isset($values['NPY'])) && (isset($values['APY'])) && + (isset($values['PPY'])) && ($values['NPY'] > $values['APY']) && + ($values['PPY'] > $values['APY'])) + { + $this->_deltaX = - $this->_deltaX; + $this->_deltaY = - $this->_deltaY; + } + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Pointing/Radial.php b/includes/pear/Image/Graph/Marker/Pointing/Radial.php index 391de831..185afa51 100644 --- a/includes/pear/Image/Graph/Marker/Pointing/Radial.php +++ b/includes/pear/Image/Graph/Marker/Pointing/Radial.php @@ -1,91 +1,91 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Radial.php,v 1.5 2005/08/24 20:36:03 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker/Pointing.php - */ -require_once 'Image/Graph/Marker/Pointing.php'; - -/** - * A pointing marker in a random angle from the data - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Pointing_Radial extends Image_Graph_Marker_Pointing -{ - - /** - * The radius of the radial marker - * @var int - * @access private - */ - var $_radius; - - /** - * Create an radial pointing marker, ie a marker on a defined distance from - * the data - * @param int $radius The 'length' of the pointer - * @param Marker $markerEnd The ending marker that represents 'the head of - * the pin' - */ - function Image_Graph_Marker_Pointing_Radial($radius, & $markerEnd) - { - parent::Image_Graph_Marker_Pointing(0, 0, $markerEnd); - $this->_radius = $radius; - } - - /** - * Draw the marker on the canvas - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $angle = pi() * rand(0, 360) / 180; - $this->_deltaX = $this->_radius * cos($angle); - $this->_deltaY = $this->_radius * sin($angle); - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Radial.php,v 1.5 2005/08/24 20:36:03 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker/Pointing.php + */ +require_once 'Image/Graph/Marker/Pointing.php'; + +/** + * A pointing marker in a random angle from the data + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Pointing_Radial extends Image_Graph_Marker_Pointing +{ + + /** + * The radius of the radial marker + * @var int + * @access private + */ + var $_radius; + + /** + * Create an radial pointing marker, ie a marker on a defined distance from + * the data + * @param int $radius The 'length' of the pointer + * @param Marker $markerEnd The ending marker that represents 'the head of + * the pin' + */ + function Image_Graph_Marker_Pointing_Radial($radius, & $markerEnd) + { + parent::Image_Graph_Marker_Pointing(0, 0, $markerEnd); + $this->_radius = $radius; + } + + /** + * Draw the marker on the canvas + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $angle = pi() * rand(0, 360) / 180; + $this->_deltaX = $this->_radius * cos($angle); + $this->_deltaY = $this->_radius * sin($angle); + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/ReversePinpoint.php b/includes/pear/Image/Graph/Marker/ReversePinpoint.php index 5adaef44..d8d51efb 100644 --- a/includes/pear/Image/Graph/Marker/ReversePinpoint.php +++ b/includes/pear/Image/Graph/Marker/ReversePinpoint.php @@ -1,65 +1,65 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: ReversePinpoint.php,v 1.5 2005/08/24 20:35:53 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker/Icon.php - */ -require_once 'Image/Graph/Marker/Icon.php'; - -/** - * Data marker using a (reverse) pinpoint as marker. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_ReversePinpoint extends Image_Graph_Marker_Icon -{ - - /** - * Create the marker as a reverse pin point - */ - function Image_Graph_Marker_ReversePinpoint() - { - parent::Image_Graph_Marker_Icon( - dirname(__FILE__).'/../Images/Icons/pinpointr.png' - ); - $this->setPointX(10); - $this->setPointY(13); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: ReversePinpoint.php,v 1.5 2005/08/24 20:35:53 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker/Icon.php + */ +require_once 'Image/Graph/Marker/Icon.php'; + +/** + * Data marker using a (reverse) pinpoint as marker. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_ReversePinpoint extends Image_Graph_Marker_Icon +{ + + /** + * Create the marker as a reverse pin point + */ + function Image_Graph_Marker_ReversePinpoint() + { + parent::Image_Graph_Marker_Icon( + dirname(__FILE__).'/../Images/Icons/pinpointr.png' + ); + $this->setPointX(10); + $this->setPointY(13); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Star.php b/includes/pear/Image/Graph/Marker/Star.php index 773cd927..2ce4a35d 100644 --- a/includes/pear/Image/Graph/Marker/Star.php +++ b/includes/pear/Image/Graph/Marker/Star.php @@ -1,88 +1,88 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Star.php,v 1.2 2005/08/03 21:21:54 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as a triangle. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Star extends Image_Graph_Marker -{ - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $this->_getFillStyle(); - $this->_getLineStyle(); - - $d = $this->_size / 5; - $x = round($x); - $y = round($y); - - $this->_canvas->addVertex(array('x' => $x, 'y' => $y - $this->_size)); - $this->_canvas->addVertex(array('x' => $x + round($d), 'y' => $y - round($d))); - $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y - round($d))); - $this->_canvas->addVertex(array('x' => $x + round(2 * $d), 'y' => $y + round($d))); - $this->_canvas->addVertex(array('x' => $x + round(3 * $d), 'y' => $y + $this->_size)); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y + round(3 * $d))); - $this->_canvas->addVertex(array('x' => $x - round(3 * $d), 'y' => $y + $this->_size)); - $this->_canvas->addVertex(array('x' => $x - round(2 * $d), 'y' => $y + round($d))); - $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y - round($d))); - $this->_canvas->addVertex(array('x' => $x - round($d), 'y' => $y - round($d))); - $this->_canvas->polygon(array('connect' => true)); - - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Star.php,v 1.2 2005/08/03 21:21:54 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as a triangle. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Star extends Image_Graph_Marker +{ + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $this->_getFillStyle(); + $this->_getLineStyle(); + + $d = $this->_size / 5; + $x = round($x); + $y = round($y); + + $this->_canvas->addVertex(array('x' => $x, 'y' => $y - $this->_size)); + $this->_canvas->addVertex(array('x' => $x + round($d), 'y' => $y - round($d))); + $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y - round($d))); + $this->_canvas->addVertex(array('x' => $x + round(2 * $d), 'y' => $y + round($d))); + $this->_canvas->addVertex(array('x' => $x + round(3 * $d), 'y' => $y + $this->_size)); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y + round(3 * $d))); + $this->_canvas->addVertex(array('x' => $x - round(3 * $d), 'y' => $y + $this->_size)); + $this->_canvas->addVertex(array('x' => $x - round(2 * $d), 'y' => $y + round($d))); + $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y - round($d))); + $this->_canvas->addVertex(array('x' => $x - round($d), 'y' => $y - round($d))); + $this->_canvas->polygon(array('connect' => true)); + + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Triangle.php b/includes/pear/Image/Graph/Marker/Triangle.php index 2e64912f..b40226f9 100644 --- a/includes/pear/Image/Graph/Marker/Triangle.php +++ b/includes/pear/Image/Graph/Marker/Triangle.php @@ -1,75 +1,75 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Triangle.php,v 1.6 2005/08/03 21:21:54 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * Data marker as a triangle. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Triangle extends Image_Graph_Marker -{ - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - $this->_getFillStyle(); - $this->_getLineStyle(); - $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y + $this->_size)); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y - $this->_size)); - $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y + $this->_size)); - $this->_canvas->polygon(array('connect' => true)); - parent::_drawMarker($x, $y, $values); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Triangle.php,v 1.6 2005/08/03 21:21:54 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * Data marker as a triangle. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Triangle extends Image_Graph_Marker +{ + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + $this->_getFillStyle(); + $this->_getLineStyle(); + $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y + $this->_size)); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y - $this->_size)); + $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y + $this->_size)); + $this->_canvas->polygon(array('connect' => true)); + parent::_drawMarker($x, $y, $values); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Marker/Value.php b/includes/pear/Image/Graph/Marker/Value.php index 9a6f7e12..ad044914 100644 --- a/includes/pear/Image/Graph/Marker/Value.php +++ b/includes/pear/Image/Graph/Marker/Value.php @@ -1,214 +1,214 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Value.php,v 1.9 2005/08/24 20:35:52 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Marker.php - */ -require_once 'Image/Graph/Marker.php'; - -/** - * A marker showing the data value. - * - * @category Images - * @package Image_Graph - * @subpackage Marker - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Marker_Value extends Image_Graph_Marker -{ - - /** - * Datapreproccesor to format the value - * @var DataPreprocessor - * @access private - */ - var $_dataPreprocessor = null; - - /** - * Which value to use from the data set, ie the X or Y value - * @var int - * @access private - */ - var $_useValue; - - /** - * Create a value marker, ie a box containing the value of the 'pointing - * data' - * - * @param int $useValue Defines which value to use from the dataset, i.e. the - * X or Y value - */ - function Image_Graph_Marker_Value($useValue = IMAGE_GRAPH_VALUE_X) - { - parent::Image_Graph_Marker(); - $this->_padding = 2; - $this->_useValue = $useValue; - $this->_fillStyle = 'white'; - $this->_borderStyle = 'black'; - } - - /** - * Sets the background fill style of the element - * - * @param Image_Graph_Fill $background The background - * @see Image_Graph_Fill - */ - function setBackground(& $background) - { - $this->setFillStyle($background); - } - - /** - * Sets the background color of the element - * - * @param mixed $color The color - */ - function setBackgroundColor($color) - { - $this->setFillColor($color); - } - - /** - * Sets a data preprocessor for formatting the values - * - * @param DataPreprocessor $dataPreprocessor The data preprocessor - * @return Image_Graph_DataPreprocessor The data preprocessor - */ - function &setDataPreprocessor(& $dataPreprocessor) - { - $this->_dataPreprocessor =& $dataPreprocessor; - return $dataPreprocessor; - } - - /** - * Get the value to display - * - * @param array $values The values representing the data the marker 'points' - * to - * @return string The display value, this is the pre-preprocessor value, to - * support for customized with multiple values. i.e show 'x = y' or '(x, y)' - * @access private - */ - function _getDisplayValue($values) - { - switch ($this->_useValue) { - case IMAGE_GRAPH_VALUE_X: - $value = $values['X']; - break; - - case IMAGE_GRAPH_PCT_X_MIN: - $value = $values['PCT_MIN_X']; - break; - - case IMAGE_GRAPH_PCT_X_MAX: - $value = $values['PCT_MAX_X']; - break; - - case IMAGE_GRAPH_PCT_Y_MIN: - $value = $values['PCT_MIN_Y']; - break; - - case IMAGE_GRAPH_PCT_Y_MAX: - $value = $values['PCT_MAX_Y']; - break; - - case IMAGE_GRAPH_PCT_Y_TOTAL: - if (isset($values['SUM_Y'])) { - $value = 100 * $values['Y'] / $values['SUM_Y']; - } - else { - $value = 0; - } - break; - - case IMAGE_GRAPH_POINT_ID: - $value = $values['ID']; - break; - - default: - $value = $values['Y']; - break; - } - return $value; - } - - /** - * Draw the marker on the canvas - * - * @param int $x The X (horizontal) position (in pixels) of the marker on - * the canvas - * @param int $y The Y (vertical) position (in pixels) of the marker on the - * canvas - * @param array $values The values representing the data the marker 'points' - * to - * @access private - */ - function _drawMarker($x, $y, $values = false) - { - parent::_drawMarker($x, $y, $values); - - $value = $this->_getDisplayValue($values); - - if ($this->_dataPreprocessor) { - $value = $this->_dataPreprocessor->_process($value); - } - - if ($this->_defaultFontOptions !== false) { - $this->_canvas->setFont($this->_defaultFontOptions); - } else { - $this->_canvas->setFont($this->_getFont()); - } - - $width = $this->_canvas->textWidth($value); - $height = $this->_canvas->textHeight($value); - $offsetX = $width/2 + $this->_padding; - $offsetY = $height/2 + $this->_padding; - - $this->_getFillStyle(); - $this->_getBorderStyle(); - $this->_canvas->rectangle( - array( - 'x0' => $x - $offsetX, - 'y0' => $y - $offsetY, - 'x1' => $x + $offsetX, - 'y1' => $y + $offsetY - ) - ); - - $this->write($x, $y, $value, IMAGE_GRAPH_ALIGN_CENTER); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Value.php,v 1.10 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Marker.php + */ +require_once 'Image/Graph/Marker.php'; + +/** + * A marker showing the data value. + * + * @category Images + * @package Image_Graph + * @subpackage Marker + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Marker_Value extends Image_Graph_Marker +{ + + /** + * Datapreproccesor to format the value + * @var DataPreprocessor + * @access private + */ + var $_dataPreprocessor = null; + + /** + * Which value to use from the data set, ie the X or Y value + * @var int + * @access private + */ + var $_useValue; + + /** + * Create a value marker, ie a box containing the value of the 'pointing + * data' + * + * @param int $useValue Defines which value to use from the dataset, i.e. the + * X or Y value + */ + function Image_Graph_Marker_Value($useValue = IMAGE_GRAPH_VALUE_X) + { + parent::Image_Graph_Marker(); + $this->_padding = array('left' => 2, 'top' => 2, 'right' => 2, 'bottom' => 2); + $this->_useValue = $useValue; + $this->_fillStyle = 'white'; + $this->_borderStyle = 'black'; + } + + /** + * Sets the background fill style of the element + * + * @param Image_Graph_Fill $background The background + * @see Image_Graph_Fill + */ + function setBackground(& $background) + { + $this->setFillStyle($background); + } + + /** + * Sets the background color of the element + * + * @param mixed $color The color + */ + function setBackgroundColor($color) + { + $this->setFillColor($color); + } + + /** + * Sets a data preprocessor for formatting the values + * + * @param DataPreprocessor $dataPreprocessor The data preprocessor + * @return Image_Graph_DataPreprocessor The data preprocessor + */ + function &setDataPreprocessor(& $dataPreprocessor) + { + $this->_dataPreprocessor =& $dataPreprocessor; + return $dataPreprocessor; + } + + /** + * Get the value to display + * + * @param array $values The values representing the data the marker 'points' + * to + * @return string The display value, this is the pre-preprocessor value, to + * support for customized with multiple values. i.e show 'x = y' or '(x, y)' + * @access private + */ + function _getDisplayValue($values) + { + switch ($this->_useValue) { + case IMAGE_GRAPH_VALUE_X: + $value = $values['X']; + break; + + case IMAGE_GRAPH_PCT_X_MIN: + $value = $values['PCT_MIN_X']; + break; + + case IMAGE_GRAPH_PCT_X_MAX: + $value = $values['PCT_MAX_X']; + break; + + case IMAGE_GRAPH_PCT_Y_MIN: + $value = $values['PCT_MIN_Y']; + break; + + case IMAGE_GRAPH_PCT_Y_MAX: + $value = $values['PCT_MAX_Y']; + break; + + case IMAGE_GRAPH_PCT_Y_TOTAL: + if (isset($values['SUM_Y'])) { + $value = 100 * $values['Y'] / $values['SUM_Y']; + } + else { + $value = 0; + } + break; + + case IMAGE_GRAPH_POINT_ID: + $value = $values['ID']; + break; + + default: + $value = $values['Y']; + break; + } + return $value; + } + + /** + * Draw the marker on the canvas + * + * @param int $x The X (horizontal) position (in pixels) of the marker on + * the canvas + * @param int $y The Y (vertical) position (in pixels) of the marker on the + * canvas + * @param array $values The values representing the data the marker 'points' + * to + * @access private + */ + function _drawMarker($x, $y, $values = false) + { + parent::_drawMarker($x, $y, $values); + + $value = $this->_getDisplayValue($values); + + if ($this->_dataPreprocessor) { + $value = $this->_dataPreprocessor->_process($value); + } + + if ($this->_defaultFontOptions !== false) { + $this->_canvas->setFont($this->_defaultFontOptions); + } else { + $this->_canvas->setFont($this->_getFont()); + } + + $width = $this->_canvas->textWidth($value); + $height = $this->_canvas->textHeight($value); + $offsetX = $width/2 + $this->_padding['left']; + $offsetY = $height/2 + $this->_padding['top']; + + $this->_getFillStyle(); + $this->_getBorderStyle(); + $this->_canvas->rectangle( + array( + 'x0' => $x - $offsetX, + 'y0' => $y - $offsetY, + 'x1' => $x + $offsetX, + 'y1' => $y + $offsetY + ) + ); + + $this->write($x, $y, $value, IMAGE_GRAPH_ALIGN_CENTER); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot.php b/includes/pear/Image/Graph/Plot.php index 17dc2031..684ad057 100644 --- a/includes/pear/Image/Graph/Plot.php +++ b/includes/pear/Image/Graph/Plot.php @@ -1,818 +1,824 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Plot.php,v 1.18 2005/09/30 18:59:19 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plotarea/Element.php - */ -require_once 'Image/Graph/Plotarea/Element.php'; - -/** - * Framework for a chart - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Plot extends Image_Graph_Plotarea_Element -{ - - /** - * The dataset to plot - * @var Dataset - * @access private - */ - var $_dataset; - - /** - * The marker to plot the data set as - * @var Marker - * @access private - */ - var $_marker = null; - - /** - * The dataselector to use for data marking - * @var DataSelector - * @access private - */ - var $_dataSelector = null; - - /** - * The Y axis to associate the plot with - * @var int - * @access private - */ - var $_axisY = IMAGE_GRAPH_AXIS_Y; - - /** - * The type of the plot if multiple datasets are used - * @var string - * @access private - */ - var $_multiType = 'normal'; - - /** - * The title of the plot, used for legending in case of simple plots - * @var string - * @access private - */ - var $_title = 'plot'; - - /** - * PlotType [Constructor] - * - * Valid values for multiType are: - * - * 'normal' Plot is normal, multiple datasets are displayes next to one - * another - * - * 'stacked' Datasets are stacked on top of each other - * - * 'stacked100pct' Datasets are stacked and displayed as percentages of the - * total sum - * - * I no title is specified a default is used, which is basically the plot - * type (fx. for a 'Image_Graph_Plot_Smoothed_Area' default title is - * 'Smoothed Area') - * - * @param Image_Graph_Dataset $dataset The data set (value containter) to - * plot or an array of datasets - * @param string $multiType The type of the plot - * @param string $title The title of the plot (used for legends, - * {@link Image_Graph_Legend}) - */ - function Image_Graph_Plot(& $dataset, $multiType = 'normal', $title = '') - { - if (!is_a($dataset, 'Image_Graph_Dataset')) { - if (is_array($dataset)) { - $keys = array_keys($dataset); - foreach ($keys as $key) { - if (!is_a($dataset[$key], 'Image_Graph_Dataset')) { - $this->_error('Invalid dataset passed to ' . get_class($this)); - } - } - unset($keys); - } else { - $this->_error('Invalid dataset passed to ' . get_class($this)); - } - } - - parent::Image_Graph_Common(); - if ($dataset) { - if (is_array($dataset)) { - $this->_dataset =& $dataset; - } else { - $this->_dataset = array(&$dataset); - } - } - if ($title) { - $this->_title = $title; - } else { - $this->_title = str_replace('_', ' ', substr(get_class($this), 17)); - } - - $multiType = strtolower($multiType); - if (($multiType == 'normal') || - ($multiType == 'stacked') || - ($multiType == 'stacked100pct')) - { - $this->_multiType = $multiType; - } else { - $this->_error( - 'Invalid multitype: ' . $multiType . - ' expected (normal|stacked|stacked100pct)' - ); - $this->_multiType = 'normal'; - } - } - - /** - * Sets the title of the plot, used for legend - * - * @param string $title The title of the plot - */ - function setTitle($title) - { - $this->_title = $title; - } - - /** - * Parses the URL mapping data in the point and adds it to the parameter array used by - * Image_Canvas - * - * @param array $point The data point (from the dataset) - * @param array $canvasData The The for the canvas method - * @return array The union of the canvas data points and the appropriate points for the dataset - * @access private - */ - function _mergeData($point, $canvasData) - { - if (isset($point['data'])) { - if (isset($point['data']['url'])) { - $canvasData['url'] = $point['data']['url']; - } - if (isset($point['data']['target'])) { - $canvasData['target'] = $point['data']['target']; - } - if (isset($point['data']['alt'])) { - $canvasData['alt'] = $point['data']['alt']; - } - if (isset($point['data']['htmltags'])) { - $canvasData['htmltags'] = $point['data']['htmltags']; - } - } - - return $canvasData; - } - - /** - * Sets the Y axis to plot the data - * - * @param int $axisY The Y axis (either IMAGE_GRAPH_AXIS_Y / 'y' or - * IMAGE_GRAPH_AXIS_Y_SECONDARY / 'ysec' (defaults to IMAGE_GRAPH_AXIS_Y)) - * @access private - */ - function _setAxisY($axisY) - { - if ($axisY == 'y') { - $this->_axisY = IMAGE_GRAPH_AXIS_Y; - } elseif ($axisY == 'ysec') { - $this->_axisY = IMAGE_GRAPH_AXIS_Y_SECONDARY; - } else { - $this->_axisY = $axisY; - } - } - - /** - * Sets the marker to 'display' data points on the graph - * - * @param Marker $marker The marker - */ - function &setMarker(& $marker) - { - $this->add($marker); - $this->_marker =& $marker; - return $marker; - } - - /** - * Sets the dataselector to specify which data should be displayed on the - * plot as markers and which are not - * - * @param DataSelector $dataSelector The dataselector - */ - function setDataSelector(& $dataSelector) - { - $this->_dataSelector =& $dataSelector; - } - - /** - * Calculate marker point data - * - * @param array Point The point to calculate data for - * @param array NextPoint The next point - * @param array PrevPoint The previous point - * @param array Totals The pre-calculated totals, if needed - * @return array An array containing marker point data - * @access private - */ - function _getMarkerData($point, $nextPoint, $prevPoint, & $totals) - { - if (is_array($this->_dataset)) { - if ($this->_multiType == 'stacked') { - if (!isset($totals['SUM_Y'])) { - $totals['SUM_Y'] = array(); - } - $x = $point['X']; - if (!isset($totals['SUM_Y'][$x])) { - $totals['SUM_Y'][$x] = 0; - } - } elseif ($this->_multiType == 'stacked100pct') { - $x = $point['X']; - if ($totals['TOTAL_Y'][$x] != 0) { - if (!isset($totals['SUM_Y'])) { - $totals['SUM_Y'] = array(); - } - if (!isset($totals['SUM_Y'][$x])) { - $totals['SUM_Y'][$x] = 0; - } - } - } - - if (isset($totals['ALL_SUM_Y'])) { - $point['SUM_Y'] = $totals['ALL_SUM_Y']; - } - - if (!$prevPoint) { - $point['AX'] = -5; - $point['AY'] = 5; - $point['PPX'] = 0; - $point['PPY'] = 0; - $point['NPX'] = $nextPoint['X']; - $point['NPY'] = $nextPoint['Y']; - } elseif (!$nextPoint) { - $point['AX'] = 5; - $point['AY'] = 5; - $point['PPX'] = $prevPoint['X']; - $point['PPY'] = $prevPoint['Y']; - $point['NPX'] = 0; - $point['NPY'] = 0; - } else { - $point['AX'] = $this->_pointY($prevPoint) - $this->_pointY($nextPoint); - $point['AY'] = $this->_pointX($nextPoint) - $this->_pointX($prevPoint); - $point['PPX'] = $prevPoint['X']; - $point['PPY'] = $prevPoint['Y']; - $point['NPX'] = $nextPoint['X']; - $point['NPY'] = $nextPoint['Y']; - } - - $point['APX'] = $point['X']; - $point['APY'] = $point['Y']; - - if ((isset($totals['MINIMUM_X'])) && ($totals['MINIMUM_X'] != 0)) { - $point['PCT_MIN_X'] = 100 * $point['X'] / $totals['MINIMUM_X']; - } - if ((isset($totals['MAXIMUM_X'])) && ($totals['MAXIMUM_X'] != 0)) { - $point['PCT_MAX_X'] = 100 * $point['X'] / $totals['MAXIMUM_X']; - } - - if ((isset($totals['MINIMUM_Y'])) && ($totals['MINIMUM_Y'] != 0)) { - $point['PCT_MIN_Y'] = 100 * $point['Y'] / $totals['MINIMUM_Y']; - } - if ((isset($totals['MAXIMUM_Y'])) && ($totals['MAXIMUM_Y'] != 0)) { - $point['PCT_MAX_Y'] = 100 * $point['Y'] / $totals['MAXIMUM_Y']; - } - - $point['LENGTH'] = sqrt($point['AX'] * $point['AX'] + - $point['AY'] * $point['AY']); - - if ((isset($point['LENGTH'])) && ($point['LENGTH'] != 0)) { - $point['ANGLE'] = asin($point['AY'] / $point['LENGTH']); - } - - if ((isset($point['AX'])) && ($point['AX'] > 0)) { - $point['ANGLE'] = pi() - $point['ANGLE']; - } - - if ($this->_parent->_horizontal) { - $point['MARKER_Y1'] = $this->_pointY($point) - - (isset($totals['WIDTH']) ? $totals['WIDTH'] : 0); - - $point['MARKER_Y2'] = $this->_pointY($point) + - (isset($totals['WIDTH']) ? $totals['WIDTH'] : 0); - - $point['COLUMN_WIDTH'] = abs($point['MARKER_Y2'] - - $point['MARKER_Y1']) / count($this->_dataset); - - $point['MARKER_Y'] = $point['MARKER_Y1'] + - ((isset($totals['NUMBER']) ? $totals['NUMBER'] : 0) + 0.5) * - $point['COLUMN_WIDTH']; - - $point['MARKER_X'] = $this->_pointX($point); - - if ($this->_multiType == 'stacked') { - $point['MARKER_Y'] = - ($point['MARKER_Y1'] + $point['MARKER_Y2']) / 2; - - $P1 = array('Y' => $totals['SUM_Y'][$x]); - $P2 = array('Y' => $totals['SUM_Y'][$x] + $point['Y']); - - $point['MARKER_X'] = - ($this->_pointX($P1) + $this->_pointX($P2)) / 2; - } elseif ($this->_multiType == 'stacked100pct') { - $x = $point['X']; - if ($totals['TOTAL_Y'][$x] != 0) { - $point['MARKER_Y'] = - ($point['MARKER_Y1'] + $point['MARKER_Y2']) / 2; - - $P1 = array( - 'Y' => 100 * $totals['SUM_Y'][$x] / $totals['TOTAL_Y'][$x] - ); - - $P2 = array( - 'Y' => 100 * ($totals['SUM_Y'][$x] + $point['Y']) / $totals['TOTAL_Y'][$x] - ); - - $point['MARKER_X'] = - ($this->_pointX($P1) + $this->_pointX($P2)) / 2; - } else { - $point = false; - } - } - } - else { - $point['MARKER_X1'] = $this->_pointX($point) - - (isset($totals['WIDTH']) ? $totals['WIDTH'] : 0); - - $point['MARKER_X2'] = $this->_pointX($point) + - (isset($totals['WIDTH']) ? $totals['WIDTH'] : 0); - - $point['COLUMN_WIDTH'] = abs($point['MARKER_X2'] - - $point['MARKER_X1']) / count($this->_dataset); - - $point['MARKER_X'] = $point['MARKER_X1'] + - ((isset($totals['NUMBER']) ? $totals['NUMBER'] : 0) + 0.5) * - $point['COLUMN_WIDTH']; - - $point['MARKER_Y'] = $this->_pointY($point); - - if ($this->_multiType == 'stacked') { - $point['MARKER_X'] = - ($point['MARKER_X1'] + $point['MARKER_X2']) / 2; - - $P1 = array('Y' => $totals['SUM_Y'][$x]); - $P2 = array('Y' => $totals['SUM_Y'][$x] + $point['Y']); - - $point['MARKER_Y'] = - ($this->_pointY($P1) + $this->_pointY($P2)) / 2; - } elseif ($this->_multiType == 'stacked100pct') { - $x = $point['X']; - if ($totals['TOTAL_Y'][$x] != 0) { - $point['MARKER_X'] = - ($point['MARKER_X1'] + $point['MARKER_X2']) / 2; - - $P1 = array( - 'Y' => 100 * $totals['SUM_Y'][$x] / $totals['TOTAL_Y'][$x] - ); - - $P2 = array( - 'Y' => 100 * ($totals['SUM_Y'][$x] + $point['Y']) / $totals['TOTAL_Y'][$x] - ); - - $point['MARKER_Y'] = - ($this->_pointY($P1) + $this->_pointY($P2)) / 2; - } else { - $point = false; - } - } - } - return $point; - } - } - - /** - * Draws markers on the canvas - * - * @access private - */ - function _drawMarker() - { - if (($this->_marker) && (is_array($this->_dataset))) { - $this->_canvas->startGroup(get_class($this) . '_marker'); - - $totals = $this->_getTotals(); - $totals['WIDTH'] = $this->width() / ($this->_maximumX() + 2) / 2; - - $number = 0; - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $totals['MINIMUM_X'] = $dataset->minimumX(); - $totals['MAXIMUM_X'] = $dataset->maximumX(); - $totals['MINIMUM_Y'] = $dataset->minimumY(); - $totals['MAXIMUM_Y'] = $dataset->maximumY(); - $totals['NUMBER'] = $number ++; - $dataset->_reset(); - while ($point = $dataset->_next()) { - $prevPoint = $dataset->_nearby(-2); - $nextPoint = $dataset->_nearby(); - - $x = $point['X']; - $y = $point['Y']; - if (((!is_object($this->_dataSelector)) || - ($this->_dataSelector->_select($point))) && ($point['Y'] != null)) - { - - $point = $this->_getMarkerData( - $point, - $nextPoint, - $prevPoint, - $totals - ); - - if (is_array($point)) { - $this->_marker->_drawMarker( - $point['MARKER_X'], - $point['MARKER_Y'], - $point - ); - } - } - if (!isset($totals['SUM_Y'])) { - $totals['SUM_Y'] = array(); - } - if (isset($totals['SUM_Y'][$x])) { - $totals['SUM_Y'][$x] += $y; - } else { - $totals['SUM_Y'][$x] = $y; - } - } - } - unset($keys); - $this->_canvas->endGroup(); - } - } - - /** - * Get the minimum X value from the dataset - * - * @return double The minimum X value - * @access private - */ - function _minimumX() - { - if (!is_array($this->_dataset)) { - return 0; - } - - $min = false; - if (is_array($this->_dataset)) { - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - if ($min === false) { - $min = $this->_dataset[$key]->minimumX(); - } else { - $min = min($min, $this->_dataset[$key]->minimumX()); - } - } - unset($keys); - } - return $min; - } - - /** - * Get the maximum X value from the dataset - * - * @return double The maximum X value - * @access private - */ - function _maximumX() - { - if (!is_array($this->_dataset)) { - return 0; - } - - $max = 0; - if (is_array($this->_dataset)) { - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $max = max($max, $this->_dataset[$key]->maximumX()); - } - unset($keys); - } - return $max; - } - - /** - * Get the minimum Y value from the dataset - * - * @return double The minimum Y value - * @access private - */ - function _minimumY() - { - if (!is_array($this->_dataset)) { - return 0; - } - - $min = false; - if (is_array($this->_dataset)) { - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - if ($this->_multiType == 'normal') { - if ($min === false) { - $min = $this->_dataset[$key]->minimumY(); - } else { - $min = min($min, $this->_dataset[$key]->minimumY()); - } - } else { - if ($min === false) { - $min = 0; - } - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - while ($point = $dataset->_next()) { - if ($point['Y'] < 0) { - $x = $point['X']; - if ((!isset($total)) || (!isset($total[$x]))) { - $total[$x] = $point['Y']; - } else { - $total[$x] += $point['Y']; - } - if (isset($min)) { - $min = min($min, $total[$x]); - } else { - $min = $total[$x]; - } - } - } - } - } - unset($keys); - } - return $min; - } - - /** - * Get the maximum Y value from the dataset - * - * @return double The maximum Y value - * @access private - */ - function _maximumY() - { - if ($this->_multiType == 'stacked100pct') { - return 100; - } - - $maxY = 0; - if (is_array($this->_dataset)) { - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - - if ($this->_multiType == 'normal') { - if (isset($maxY)) { - $maxY = max($maxY, $dataset->maximumY()); - } else { - $maxY = $dataset->maximumY(); - } - } else { - $dataset->_reset(); - while ($point = $dataset->_next()) { - if ($point['Y'] > 0) { - $x = $point['X']; - if ((!isset($total)) || (!isset($total[$x]))) { - $total[$x] = $point['Y']; - } else { - $total[$x] += $point['Y']; - } - if (isset($maxY)) { - $maxY = max($maxY, $total[$x]); - } else { - $maxY = $total[$x]; - } - } - } - } - } - unset($keys); - } - return $maxY; - } - - /** - * Get the X pixel position represented by a value - * - * @param double $point The value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointX($point) - { - $point['AXIS_Y'] = $this->_axisY; - return parent::_pointX($point); - } - - /** - * Get the Y pixel position represented by a value - * - * @param double $point the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointY($point) - { - $point['AXIS_Y'] = $this->_axisY; - return parent::_pointY($point); - } - - /** - * Update coordinates - * - * @access private - */ - function _updateCoords() - { - $this->_setCoords($this->_parent->_plotLeft, $this->_parent->_plotTop, $this->_parent->_plotRight, $this->_parent->_plotBottom); - parent::_updateCoords(); - } - - /** - * Get the dataset - * - * @return Image_Graph_Dataset The dataset(s) - */ - function &dataset() - { - return $this->_dataset; - } - - /** - * Calulate totals - * - * @return array An associated array with the totals - * @access private - */ - function _getTotals() - { - $total = array( - 'MINIMUM_X' => $this->_minimumX(), - 'MAXIMUM_X' => $this->_maximumX(), - 'MINIMUM_Y' => $this->_minimumY(), - 'MAXIMUM_Y' => $this->_maximumY() - ); - $total['ALL_SUM_Y'] = 0; - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - - $dataset->_reset(); - while ($point = $dataset->_next()) { - $x = $point['X']; - $total['ALL_SUM_Y'] += $point['Y']; - if (isset($total['TOTAL_Y'][$x])) { - $total['TOTAL_Y'][$x] += $point['Y']; - } else { - $total['TOTAL_Y'][$x] = $point['Y']; - } - if (isset($total['TOTAL_X'][$x])) { - $total['TOTAL_X'][$x] += $point['X']; - } else { - $total['TOTAL_X'][$x] = $point['X']; - } - } - } - unset($keys); - return $total; - } - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $this->_canvas->rectangle(array('x0' => $x0, 'y0' => $y0, 'x1' => $x1, 'y1' => $y1)); - } - - /** - * Draw a sample for use with legend - * - * @param array $param The parameters for the legend - * @access private - */ - function _legendSample(&$param) - { - if (!is_array($this->_dataset)) { - return false; - } - - if (is_a($this->_fillStyle, 'Image_Graph_Fill')) { - $this->_fillStyle->_reset(); - } - - $count = 0; - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $count++; - - $caption = ($dataset->_name ? $dataset->_name : $this->_title); - - $this->_canvas->setFont($param['font']); - $width = 20 + $param['width'] + $this->_canvas->textWidth($caption); - $param['maxwidth'] = max($param['maxwidth'], $width); - $x2 = $param['x'] + $width; - $y2 = $param['y'] + $param['height'] + 5; - - if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { - $param['y'] = $param['top']; - $param['x'] = $x2; - $y2 = $param['y'] + $param['height']; - } elseif ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) == 0) && ($x2 > $param['right'])) { - $param['x'] = $param['left']; - $param['y'] = $y2; - $x2 = $param['x'] + 20 + $param['width'] + $this->_canvas->textWidth($caption); - } - - $x = $x0 = $param['x']; - $y = $param['y']; - $y0 = $param['y']; - $x1 = $param['x'] + $param['width']; - $y1 = $param['y'] + $param['height']; - - if (!isset($param['simulate'])) { - $this->_getFillStyle($key); - $this->_getLineStyle(); - $this->_drawLegendSample($x0, $y0, $x1, $y1); - - if (($this->_marker) && ($dataset) && ($param['show_marker'])) { - $dataset->_reset(); - $point = $dataset->_next(); - $prevPoint = $dataset->_nearby(-2); - $nextPoint = $dataset->_nearby(); - - $tmp = array(); - $point = $this->_getMarkerData($point, $nextPoint, $prevPoint, $tmp); - if (is_array($point)) { - $point['MARKER_X'] = $x+$param['width']/2; - $point['MARKER_Y'] = $y; - unset ($point['AVERAGE_Y']); - $this->_marker->_drawMarker($point['MARKER_X'], $point['MARKER_Y'], $point); - } - } - $this->write($x + $param['width'] + 10, $y + $param['height'] / 2, $caption, IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, $param['font']); - } - - if (($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { - $param['y'] = $y2; - } else { - $param['x'] = $x2; - } - } - unset($keys); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Plot.php,v 1.20 2006/02/28 22:33:00 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plotarea/Element.php + */ +require_once 'Image/Graph/Plotarea/Element.php'; + +/** + * Framework for a chart + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Plot extends Image_Graph_Plotarea_Element +{ + + /** + * The dataset to plot + * @var Dataset + * @access private + */ + var $_dataset; + + /** + * The marker to plot the data set as + * @var Marker + * @access private + */ + var $_marker = null; + + /** + * The dataselector to use for data marking + * @var DataSelector + * @access private + */ + var $_dataSelector = null; + + /** + * The Y axis to associate the plot with + * @var int + * @access private + */ + var $_axisY = IMAGE_GRAPH_AXIS_Y; + + /** + * The type of the plot if multiple datasets are used + * @var string + * @access private + */ + var $_multiType = 'normal'; + + /** + * The title of the plot, used for legending in case of simple plots + * @var string + * @access private + */ + var $_title = 'plot'; + + /** + * PlotType [Constructor] + * + * Valid values for multiType are: + * + * 'normal' Plot is normal, multiple datasets are displayes next to one + * another + * + * 'stacked' Datasets are stacked on top of each other + * + * 'stacked100pct' Datasets are stacked and displayed as percentages of the + * total sum + * + * I no title is specified a default is used, which is basically the plot + * type (fx. for a 'Image_Graph_Plot_Smoothed_Area' default title is + * 'Smoothed Area') + * + * @param Image_Graph_Dataset $dataset The data set (value containter) to + * plot or an array of datasets + * @param string $multiType The type of the plot + * @param string $title The title of the plot (used for legends, + * {@link Image_Graph_Legend}) + */ + function Image_Graph_Plot(& $dataset, $multiType = 'normal', $title = '') + { + if (!is_a($dataset, 'Image_Graph_Dataset')) { + if (is_array($dataset)) { + $keys = array_keys($dataset); + foreach ($keys as $key) { + if (!is_a($dataset[$key], 'Image_Graph_Dataset')) { + $this->_error('Invalid dataset passed to ' . get_class($this)); + } + } + unset($keys); + } else { + $this->_error('Invalid dataset passed to ' . get_class($this)); + } + } + + parent::Image_Graph_Common(); + if ($dataset) { + if (is_array($dataset)) { + $this->_dataset =& $dataset; + } else { + $this->_dataset = array(&$dataset); + } + } + if ($title) { + $this->_title = $title; + } else { + $this->_title = str_replace('_', ' ', substr(get_class($this), 17)); + } + + $multiType = strtolower($multiType); + if (($multiType == 'normal') || + ($multiType == 'stacked') || + ($multiType == 'stacked100pct')) + { + $this->_multiType = $multiType; + } else { + $this->_error( + 'Invalid multitype: ' . $multiType . + ' expected (normal|stacked|stacked100pct)' + ); + $this->_multiType = 'normal'; + } + } + + /** + * Sets the title of the plot, used for legend + * + * @param string $title The title of the plot + */ + function setTitle($title) + { + $this->_title = $title; + } + + /** + * Parses the URL mapping data in the point and adds it to the parameter array used by + * Image_Canvas + * + * @param array $point The data point (from the dataset) + * @param array $canvasData The The for the canvas method + * @return array The union of the canvas data points and the appropriate points for the dataset + * @access private + */ + function _mergeData($point, $canvasData) + { + if (isset($point['data'])) { + if (isset($point['data']['url'])) { + $canvasData['url'] = $point['data']['url']; + } + if (isset($point['data']['target'])) { + $canvasData['target'] = $point['data']['target']; + } + if (isset($point['data']['alt'])) { + $canvasData['alt'] = $point['data']['alt']; + } + if (isset($point['data']['htmltags'])) { + $canvasData['htmltags'] = $point['data']['htmltags']; + } + } + + return $canvasData; + } + + /** + * Sets the Y axis to plot the data + * + * @param int $axisY The Y axis (either IMAGE_GRAPH_AXIS_Y / 'y' or + * IMAGE_GRAPH_AXIS_Y_SECONDARY / 'ysec' (defaults to IMAGE_GRAPH_AXIS_Y)) + * @access private + */ + function _setAxisY($axisY) + { + if ($axisY == 'y') { + $this->_axisY = IMAGE_GRAPH_AXIS_Y; + } elseif ($axisY == 'ysec') { + $this->_axisY = IMAGE_GRAPH_AXIS_Y_SECONDARY; + } else { + $this->_axisY = $axisY; + } + } + + /** + * Sets the marker to 'display' data points on the graph + * + * @param Marker $marker The marker + */ + function &setMarker(& $marker) + { + $this->add($marker); + $this->_marker =& $marker; + return $marker; + } + + /** + * Sets the dataselector to specify which data should be displayed on the + * plot as markers and which are not + * + * @param DataSelector $dataSelector The dataselector + */ + function setDataSelector(& $dataSelector) + { + $this->_dataSelector =& $dataSelector; + } + + /** + * Calculate marker point data + * + * @param array Point The point to calculate data for + * @param array NextPoint The next point + * @param array PrevPoint The previous point + * @param array Totals The pre-calculated totals, if needed + * @return array An array containing marker point data + * @access private + */ + function _getMarkerData($point, $nextPoint, $prevPoint, & $totals) + { + if (is_array($this->_dataset)) { + if ($this->_multiType == 'stacked') { + if (!isset($totals['SUM_Y'])) { + $totals['SUM_Y'] = array(); + } + $x = $point['X']; + if (!isset($totals['SUM_Y'][$x])) { + $totals['SUM_Y'][$x] = 0; + } + } elseif ($this->_multiType == 'stacked100pct') { + $x = $point['X']; + if ($totals['TOTAL_Y'][$x] != 0) { + if (!isset($totals['SUM_Y'])) { + $totals['SUM_Y'] = array(); + } + if (!isset($totals['SUM_Y'][$x])) { + $totals['SUM_Y'][$x] = 0; + } + } + } + + if (isset($totals['ALL_SUM_Y'])) { + $point['SUM_Y'] = $totals['ALL_SUM_Y']; + } + + if (!$prevPoint) { + $point['AX'] = -5; + $point['AY'] = 5; + $point['PPX'] = 0; + $point['PPY'] = 0; + $point['NPX'] = $nextPoint['X']; + $point['NPY'] = $nextPoint['Y']; + } elseif (!$nextPoint) { + $point['AX'] = 5; + $point['AY'] = 5; + $point['PPX'] = $prevPoint['X']; + $point['PPY'] = $prevPoint['Y']; + $point['NPX'] = 0; + $point['NPY'] = 0; + } else { + $point['AX'] = $this->_pointY($prevPoint) - $this->_pointY($nextPoint); + $point['AY'] = $this->_pointX($nextPoint) - $this->_pointX($prevPoint); + $point['PPX'] = $prevPoint['X']; + $point['PPY'] = $prevPoint['Y']; + $point['NPX'] = $nextPoint['X']; + $point['NPY'] = $nextPoint['Y']; + } + + $point['APX'] = $point['X']; + $point['APY'] = $point['Y']; + + if ((isset($totals['MINIMUM_X'])) && ($totals['MINIMUM_X'] != 0)) { + $point['PCT_MIN_X'] = 100 * $point['X'] / $totals['MINIMUM_X']; + } + if ((isset($totals['MAXIMUM_X'])) && ($totals['MAXIMUM_X'] != 0)) { + $point['PCT_MAX_X'] = 100 * $point['X'] / $totals['MAXIMUM_X']; + } + + if ((isset($totals['MINIMUM_Y'])) && ($totals['MINIMUM_Y'] != 0)) { + $point['PCT_MIN_Y'] = 100 * $point['Y'] / $totals['MINIMUM_Y']; + } + if ((isset($totals['MAXIMUM_Y'])) && ($totals['MAXIMUM_Y'] != 0)) { + $point['PCT_MAX_Y'] = 100 * $point['Y'] / $totals['MAXIMUM_Y']; + } + + $point['LENGTH'] = sqrt($point['AX'] * $point['AX'] + + $point['AY'] * $point['AY']); + + if ((isset($point['LENGTH'])) && ($point['LENGTH'] != 0)) { + $point['ANGLE'] = asin($point['AY'] / $point['LENGTH']); + } + + if ((isset($point['AX'])) && ($point['AX'] > 0)) { + $point['ANGLE'] = pi() - $point['ANGLE']; + } + + if ($this->_parent->_horizontal) { + $point['MARKER_Y1'] = $this->_pointY($point) - + (isset($totals['WIDTH']) ? $totals['WIDTH'] : 0); + + $point['MARKER_Y2'] = $this->_pointY($point) + + (isset($totals['WIDTH']) ? $totals['WIDTH'] : 0); + + $point['COLUMN_WIDTH'] = abs($point['MARKER_Y2'] - + $point['MARKER_Y1']) / count($this->_dataset); + + $point['MARKER_Y'] = $point['MARKER_Y1'] + + ((isset($totals['NUMBER']) ? $totals['NUMBER'] : 0) + 0.5) * + $point['COLUMN_WIDTH']; + + $point['MARKER_X'] = $this->_pointX($point); + + if ($this->_multiType == 'stacked') { + $point['MARKER_Y'] = + ($point['MARKER_Y1'] + $point['MARKER_Y2']) / 2; + + $P1 = array('Y' => $totals['SUM_Y'][$x]); + $P2 = array('Y' => $totals['SUM_Y'][$x] + $point['Y']); + + $point['MARKER_X'] = + ($this->_pointX($P1) + $this->_pointX($P2)) / 2; + } elseif ($this->_multiType == 'stacked100pct') { + $x = $point['X']; + if ($totals['TOTAL_Y'][$x] != 0) { + $point['MARKER_Y'] = + ($point['MARKER_Y1'] + $point['MARKER_Y2']) / 2; + + $P1 = array( + 'Y' => 100 * $totals['SUM_Y'][$x] / $totals['TOTAL_Y'][$x] + ); + + $P2 = array( + 'Y' => 100 * ($totals['SUM_Y'][$x] + $point['Y']) / $totals['TOTAL_Y'][$x] + ); + + $point['MARKER_X'] = + ($this->_pointX($P1) + $this->_pointX($P2)) / 2; + } else { + $point = false; + } + } + } + else { + $point['MARKER_X1'] = $this->_pointX($point) - + (isset($totals['WIDTH']) ? $totals['WIDTH'] : 0); + + $point['MARKER_X2'] = $this->_pointX($point) + + (isset($totals['WIDTH']) ? $totals['WIDTH'] : 0); + + $point['COLUMN_WIDTH'] = abs($point['MARKER_X2'] - + $point['MARKER_X1']) / count($this->_dataset); + + $point['MARKER_X'] = $point['MARKER_X1'] + + ((isset($totals['NUMBER']) ? $totals['NUMBER'] : 0) + 0.5) * + $point['COLUMN_WIDTH']; + + $point['MARKER_Y'] = $this->_pointY($point); + + if ($this->_multiType == 'stacked') { + $point['MARKER_X'] = + ($point['MARKER_X1'] + $point['MARKER_X2']) / 2; + + $P1 = array('Y' => $totals['SUM_Y'][$x]); + $P2 = array('Y' => $totals['SUM_Y'][$x] + $point['Y']); + + $point['MARKER_Y'] = + ($this->_pointY($P1) + $this->_pointY($P2)) / 2; + } elseif ($this->_multiType == 'stacked100pct') { + $x = $point['X']; + if ($totals['TOTAL_Y'][$x] != 0) { + $point['MARKER_X'] = + ($point['MARKER_X1'] + $point['MARKER_X2']) / 2; + + $P1 = array( + 'Y' => 100 * $totals['SUM_Y'][$x] / $totals['TOTAL_Y'][$x] + ); + + $P2 = array( + 'Y' => 100 * ($totals['SUM_Y'][$x] + $point['Y']) / $totals['TOTAL_Y'][$x] + ); + + $point['MARKER_Y'] = + ($this->_pointY($P1) + $this->_pointY($P2)) / 2; + } else { + $point = false; + } + } + } + return $point; + } + } + + /** + * Draws markers on the canvas + * + * @access private + */ + function _drawMarker() + { + if (($this->_marker) && (is_array($this->_dataset))) { + $this->_canvas->startGroup(get_class($this) . '_marker'); + + $totals = $this->_getTotals(); + $totals['WIDTH'] = $this->width() / ($this->_maximumX() + 2) / 2; + + $number = 0; + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $totals['MINIMUM_X'] = $dataset->minimumX(); + $totals['MAXIMUM_X'] = $dataset->maximumX(); + $totals['MINIMUM_Y'] = $dataset->minimumY(); + $totals['MAXIMUM_Y'] = $dataset->maximumY(); + $totals['NUMBER'] = $number ++; + $dataset->_reset(); + while ($point = $dataset->_next()) { + $prevPoint = $dataset->_nearby(-2); + $nextPoint = $dataset->_nearby(); + + $x = $point['X']; + $y = $point['Y']; + if (((!is_object($this->_dataSelector)) || + ($this->_dataSelector->_select($point))) && ($point['Y'] !== null)) + { + + $point = $this->_getMarkerData( + $point, + $nextPoint, + $prevPoint, + $totals + ); + + if (is_array($point)) { + $this->_marker->_drawMarker( + $point['MARKER_X'], + $point['MARKER_Y'], + $point + ); + } + } + if (!isset($totals['SUM_Y'])) { + $totals['SUM_Y'] = array(); + } + if (isset($totals['SUM_Y'][$x])) { + $totals['SUM_Y'][$x] += $y; + } else { + $totals['SUM_Y'][$x] = $y; + } + } + } + unset($keys); + $this->_canvas->endGroup(); + } + } + + /** + * Get the minimum X value from the dataset + * + * @return double The minimum X value + * @access private + */ + function _minimumX() + { + if (!is_array($this->_dataset)) { + return 0; + } + + $min = false; + if (is_array($this->_dataset)) { + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + if ($min === false) { + $min = $this->_dataset[$key]->minimumX(); + } else { + $min = min($min, $this->_dataset[$key]->minimumX()); + } + } + unset($keys); + } + return $min; + } + + /** + * Get the maximum X value from the dataset + * + * @return double The maximum X value + * @access private + */ + function _maximumX() + { + if (!is_array($this->_dataset)) { + return 0; + } + + $max = 0; + if (is_array($this->_dataset)) { + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $max = max($max, $this->_dataset[$key]->maximumX()); + } + unset($keys); + } + return $max; + } + + /** + * Get the minimum Y value from the dataset + * + * @return double The minimum Y value + * @access private + */ + function _minimumY() + { + if (!is_array($this->_dataset)) { + return 0; + } + + $min = false; + if (is_array($this->_dataset)) { + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + if ($this->_multiType == 'normal') { + if ($min === false) { + $min = $this->_dataset[$key]->minimumY(); + } else { + $min = min($min, $this->_dataset[$key]->minimumY()); + } + } else { + if ($min === false) { + $min = 0; + } + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + while ($point = $dataset->_next()) { + if ($point['Y'] < 0) { + $x = $point['X']; + if ((!isset($total)) || (!isset($total[$x]))) { + $total[$x] = $point['Y']; + } else { + $total[$x] += $point['Y']; + } + if (isset($min)) { + $min = min($min, $total[$x]); + } else { + $min = $total[$x]; + } + } + } + } + } + unset($keys); + } + return $min; + } + + /** + * Get the maximum Y value from the dataset + * + * @return double The maximum Y value + * @access private + */ + function _maximumY() + { + if ($this->_multiType == 'stacked100pct') { + return 100; + } + + $maxY = 0; + if (is_array($this->_dataset)) { + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + + if ($this->_multiType == 'normal') { + if (isset($maxY)) { + $maxY = max($maxY, $dataset->maximumY()); + } else { + $maxY = $dataset->maximumY(); + } + } else { + $dataset->_reset(); + while ($point = $dataset->_next()) { + if ($point['Y'] > 0) { + $x = $point['X']; + if ((!isset($total)) || (!isset($total[$x]))) { + $total[$x] = $point['Y']; + } else { + $total[$x] += $point['Y']; + } + if (isset($maxY)) { + $maxY = max($maxY, $total[$x]); + } else { + $maxY = $total[$x]; + } + } + } + } + } + unset($keys); + } + return $maxY; + } + + /** + * Get the X pixel position represented by a value + * + * @param double $point The value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointX($point) + { + $point['AXIS_Y'] = $this->_axisY; + return parent::_pointX($point); + } + + /** + * Get the Y pixel position represented by a value + * + * @param double $point the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointY($point) + { + $point['AXIS_Y'] = $this->_axisY; + return parent::_pointY($point); + } + + /** + * Update coordinates + * + * @access private + */ + function _updateCoords() + { + $this->_setCoords($this->_parent->_plotLeft, $this->_parent->_plotTop, $this->_parent->_plotRight, $this->_parent->_plotBottom); + parent::_updateCoords(); + } + + /** + * Get the dataset + * + * @return Image_Graph_Dataset The dataset(s) + */ + function &dataset() + { + return $this->_dataset; + } + + /** + * Calulate totals + * + * @return array An associated array with the totals + * @access private + */ + function _getTotals() + { + $total = array( + 'MINIMUM_X' => $this->_minimumX(), + 'MAXIMUM_X' => $this->_maximumX(), + 'MINIMUM_Y' => $this->_minimumY(), + 'MAXIMUM_Y' => $this->_maximumY() + ); + $total['ALL_SUM_Y'] = 0; + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + + $dataset->_reset(); + while ($point = $dataset->_next()) { + $x = $point['X']; + + if (is_numeric($point['Y'])) { + $total['ALL_SUM_Y'] += $point['Y']; + if (isset($total['TOTAL_Y'][$x])) { + $total['TOTAL_Y'][$x] += $point['Y']; + } else { + $total['TOTAL_Y'][$x] = $point['Y']; + } + } + + if (is_numeric($point['X'])) { + if (isset($total['TOTAL_X'][$x])) { + $total['TOTAL_X'][$x] += $point['X']; + } else { + $total['TOTAL_X'][$x] = $point['X']; + } + } + } + } + unset($keys); + return $total; + } + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $this->_canvas->rectangle(array('x0' => $x0, 'y0' => $y0, 'x1' => $x1, 'y1' => $y1)); + } + + /** + * Draw a sample for use with legend + * + * @param array $param The parameters for the legend + * @access private + */ + function _legendSample(&$param) + { + if (!is_array($this->_dataset)) { + return false; + } + + if (is_a($this->_fillStyle, 'Image_Graph_Fill')) { + $this->_fillStyle->_reset(); + } + + $count = 0; + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $count++; + + $caption = ($dataset->_name ? $dataset->_name : $this->_title); + + $this->_canvas->setFont($param['font']); + $width = 20 + $param['width'] + $this->_canvas->textWidth($caption); + $param['maxwidth'] = max($param['maxwidth'], $width); + $x2 = $param['x'] + $width; + $y2 = $param['y'] + $param['height'] + 5; + + if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { + $param['y'] = $param['top']; + $param['x'] = $x2; + $y2 = $param['y'] + $param['height']; + } elseif ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) == 0) && ($x2 > $param['right'])) { + $param['x'] = $param['left']; + $param['y'] = $y2; + $x2 = $param['x'] + 20 + $param['width'] + $this->_canvas->textWidth($caption); + } + + $x = $x0 = $param['x']; + $y = $param['y']; + $y0 = $param['y']; + $x1 = $param['x'] + $param['width']; + $y1 = $param['y'] + $param['height']; + + if (!isset($param['simulate'])) { + $this->_getFillStyle($key); + $this->_getLineStyle(); + $this->_drawLegendSample($x0, $y0, $x1, $y1); + + if (($this->_marker) && ($dataset) && ($param['show_marker'])) { + $dataset->_reset(); + $point = $dataset->_next(); + $prevPoint = $dataset->_nearby(-2); + $nextPoint = $dataset->_nearby(); + + $tmp = array(); + $point = $this->_getMarkerData($point, $nextPoint, $prevPoint, $tmp); + if (is_array($point)) { + $point['MARKER_X'] = $x+$param['width']/2; + $point['MARKER_Y'] = $y; + unset ($point['AVERAGE_Y']); + $this->_marker->_drawMarker($point['MARKER_X'], $point['MARKER_Y'], $point); + } + } + $this->write($x + $param['width'] + 10, $y + $param['height'] / 2, $caption, IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, $param['font']); + } + + if (($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { + $param['y'] = $y2; + } else { + $param['x'] = $x2; + } + } + unset($keys); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Area.php b/includes/pear/Image/Graph/Plot/Area.php index 45fb549a..d60b7c03 100644 --- a/includes/pear/Image/Graph/Plot/Area.php +++ b/includes/pear/Image/Graph/Plot/Area.php @@ -1,188 +1,194 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Area.php,v 1.12 2005/08/08 19:09:18 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Area Chart plot. - * - * An area chart plots all data points similar to a {@link - * Image_Graph_Plot_Line}, but the area beneath the line is filled and the whole - * area 'the-line', 'the right edge', 'the x-axis' and 'the left edge' is - * bounded. Smoothed charts are only supported with non-stacked types - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Area extends Image_Graph_Plot -{ - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $dx = abs($x1 - $x0) / 3; - $dy = abs($y1 - $y0) / 3; - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y1)); - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y0 + $dy)); - $this->_canvas->addVertex(array('x' => $x0 + $dx, 'y' => $y0)); - $this->_canvas->addVertex(array('x' => $x0 + 2*$dx, 'y' => $y0 + 2*$dy)); - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y0 + $dy)); - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y1)); - $this->_canvas->polygon(array('connect' => true)); - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - $base = array(); - if ($this->_multiType == 'stacked') { - reset($this->_dataset); - $key = key($this->_dataset); - $dataset =& $this->_dataset[$key]; - - $first = $dataset->first(); - $point = array ('X' => $first['X'], 'Y' => '#min_pos#'); - $base[] = array(); - $base[] = $this->_pointY($point); - $first = $this->_pointX($point); - $base[] = $first; - - $last = $dataset->last(); - $point = array ('X' => $last['X'], 'Y' => '#min_pos#'); - $base[] = array(); - $base[] = $this->_pointY($point); - $base[] = $this->_pointX($point); - - $current = array(); - } - - $minYaxis = $this->_parent->_getMinimum($this->_axisY); - $maxYaxis = $this->_parent->_getMaximum($this->_axisY); - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - if ($this->_multiType == 'stacked') { - $plotarea = array_reverse($base); - $base = array(); - while ($point = $dataset->_next()) { - $x = $point['X']; - $p = $point; - if (isset($current[$x])) { - $p['Y'] += $current[$x]; - } else { - $current[$x] = 0; - } - $x1 = $this->_pointX($p); - $y1 = $this->_pointY($p); - $plotarea[] = $x1; - $plotarea[] = $y1; - $plotarea[] = $point; - $base[] = array(); - $base[] = $y1; - $base[] = $x1; - $current[$x] += $point['Y']; - } - } else { - $first = true; - $plotarea = array(); - while ($point = $dataset->_next()) { - if ($first) { - $firstPoint = array ('X' => $point['X'], 'Y' => '#min_pos#'); - $plotarea[] = $this->_pointX($firstPoint); - $plotarea[] = $this->_pointY($firstPoint); - $plotarea[] = array(); - } - $plotarea[] = $this->_pointX($point); - $plotarea[] = $this->_pointY($point); - $plotarea[] = $point; - $lastPoint = $point; - $first = false; - } - $endPoint['X'] = $lastPoint['X']; - $endPoint['Y'] = '#min_pos#'; - $plotarea[] = $this->_pointX($endPoint); - $plotarea[] = $this->_pointY($endPoint); - $plotarea[] = array(); - } - - reset($plotarea); - while (list(, $x) = each($plotarea)) { - list(, $y) = each($plotarea); - list(, $data) = each($plotarea); - $this->_canvas->addVertex( - $this->_mergeData( - $data, - array('x' => $x, 'y' => $y) - ) - ); - } - - $this->_getFillStyle($key); - $this->_getLineStyle($key); - $this->_canvas->polygon(array('connect' => true, 'map_vertices' => true)); - } - unset($keys); - $this->_drawMarker(); - $this->_canvas->endGroup(); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Area.php,v 1.13 2005/11/27 22:21:17 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Area Chart plot. + * + * An area chart plots all data points similar to a {@link + * Image_Graph_Plot_Line}, but the area beneath the line is filled and the whole + * area 'the-line', 'the right edge', 'the x-axis' and 'the left edge' is + * bounded. Smoothed charts are only supported with non-stacked types + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Area extends Image_Graph_Plot +{ + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $dx = abs($x1 - $x0) / 3; + $dy = abs($y1 - $y0) / 3; + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y1)); + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y0 + $dy)); + $this->_canvas->addVertex(array('x' => $x0 + $dx, 'y' => $y0)); + $this->_canvas->addVertex(array('x' => $x0 + 2*$dx, 'y' => $y0 + 2*$dy)); + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y0 + $dy)); + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y1)); + $this->_canvas->polygon(array('connect' => true)); + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + + $this->_clip(true); + + $base = array(); + if ($this->_multiType == 'stacked') { + reset($this->_dataset); + $key = key($this->_dataset); + $dataset =& $this->_dataset[$key]; + + $first = $dataset->first(); + $point = array ('X' => $first['X'], 'Y' => '#min_pos#'); + $base[] = array(); + $base[] = $this->_pointY($point); + $first = $this->_pointX($point); + $base[] = $first; + + $last = $dataset->last(); + $point = array ('X' => $last['X'], 'Y' => '#min_pos#'); + $base[] = array(); + $base[] = $this->_pointY($point); + $base[] = $this->_pointX($point); + + $current = array(); + } + + $minYaxis = $this->_parent->_getMinimum($this->_axisY); + $maxYaxis = $this->_parent->_getMaximum($this->_axisY); + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + if ($this->_multiType == 'stacked') { + $plotarea = array_reverse($base); + $base = array(); + while ($point = $dataset->_next()) { + $x = $point['X']; + $p = $point; + if (isset($current[$x])) { + $p['Y'] += $current[$x]; + } else { + $current[$x] = 0; + } + $x1 = $this->_pointX($p); + $y1 = $this->_pointY($p); + $plotarea[] = $x1; + $plotarea[] = $y1; + $plotarea[] = $point; + $base[] = array(); + $base[] = $y1; + $base[] = $x1; + $current[$x] += $point['Y']; + } + } else { + $first = true; + $plotarea = array(); + while ($point = $dataset->_next()) { + if ($first) { + $firstPoint = array ('X' => $point['X'], 'Y' => '#min_pos#'); + $plotarea[] = $this->_pointX($firstPoint); + $plotarea[] = $this->_pointY($firstPoint); + $plotarea[] = array(); + } + $plotarea[] = $this->_pointX($point); + $plotarea[] = $this->_pointY($point); + $plotarea[] = $point; + $lastPoint = $point; + $first = false; + } + $endPoint['X'] = $lastPoint['X']; + $endPoint['Y'] = '#min_pos#'; + $plotarea[] = $this->_pointX($endPoint); + $plotarea[] = $this->_pointY($endPoint); + $plotarea[] = array(); + } + + reset($plotarea); + while (list(, $x) = each($plotarea)) { + list(, $y) = each($plotarea); + list(, $data) = each($plotarea); + $this->_canvas->addVertex( + $this->_mergeData( + $data, + array('x' => $x, 'y' => $y) + ) + ); + } + + $this->_getFillStyle($key); + $this->_getLineStyle($key); + $this->_canvas->polygon(array('connect' => true, 'map_vertices' => true)); + } + unset($keys); + $this->_drawMarker(); + $this->_clip(false); + + $this->_canvas->endGroup(); + + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Band.php b/includes/pear/Image/Graph/Plot/Band.php index 2a283384..7acaee9b 100644 --- a/includes/pear/Image/Graph/Plot/Band.php +++ b/includes/pear/Image/Graph/Plot/Band.php @@ -1,198 +1,205 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Band.php,v 1.11 2005/08/23 21:01:46 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - * @since File available since Release 0.3.0dev2 - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * "Band" (area chart with min AND max) chart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @since Class available since Release 0.3.0dev2 - */ -class Image_Graph_Plot_Band extends Image_Graph_Plot -{ - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $h = abs($y1 - $y0) / 6; - $w = round(abs($x1 - $x0) / 5); - $y = ($y0 + $y1) / 2; - - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y - $h * 3)); - $this->_canvas->addVertex(array('x' => $x0 + $w, 'y' => $y - 4 * $h)); - $this->_canvas->addVertex(array('x' => $x0 + 2 * $w, 'y' => $y - $h * 2)); - $this->_canvas->addVertex(array('x' => $x0 + 3 * $w, 'y' => $y - $h * 4)); - $this->_canvas->addVertex(array('x' => $x0 + 4 * $w, 'y' => $y - $h * 3)); - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y - $h * 2)); - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y + $h * 3)); - $this->_canvas->addVertex(array('x' => $x0 + 4 * $w, 'y' => $y + $h)); - $this->_canvas->addVertex(array('x' => $x0 + 3 * $w, 'y' => $y + 2 * $h)); - $this->_canvas->addVertex(array('x' => $x0 + 2 * $w, 'y' => $y + 1 * $h)); - $this->_canvas->addVertex(array('x' => $x0 + 1 * $w, 'y' => $y)); - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y + $h)); - - $this->_getLineStyle(); - $this->_getFillStyle(); - $this->_canvas->polygon(array('connect' => true)); - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!is_array($this->_dataset)) { - return false; - } - - $current = array(); - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - $upperBand = array(); - $lowerBand = array(); - while ($data = $dataset->_next()) { - if ($this->_parent->_horizontal) { - $point['X'] = $data['X']; - - $point['Y'] = $data['Y']['high']; - $y = $this->_pointY($point); - $x_high = $this->_pointX($point); - - $point['Y'] = $data['Y']['low']; - $x_low = $this->_pointX($point); - - $data = array('X' => $x_high, 'Y' => $y); - if (isset($point['data'])) { - $data['data'] = $point['data']; - } else { - $data['data'] = array(); - } - $upperBand[] = $data; - - $data = array('X' => $x_low, 'Y' => $y); - if (isset($point['data'])) { - $data['data'] = $point['data']; - } else { - $data['data'] = array(); - } - $lowerBand[] = $data; - } - else { - $point['X'] = $data['X']; - $y = $data['Y']; - - $point['Y'] = $data['Y']['high']; - $x = $this->_pointX($point); - $y_high = $this->_pointY($point); - - $point['Y'] = $data['Y']['low']; - $y_low = $this->_pointY($point); - - $data = array('X' => $x, 'Y' => $y_high); - if (isset($point['data'])) { - $data['data'] = $point['data']; - } else { - $data['data'] = array(); - } - $upperBand[] = $data; - - $data = array('X' => $x, 'Y' => $y_low); - if (isset($point['data'])) { - $data['data'] = $point['data']; - } else { - $data['data'] = array(); - } - $lowerBand[] = $data; - } - } - $lowerBand = array_reverse($lowerBand); - foreach ($lowerBand as $point) { - $this->_canvas->addVertex( - $this->_mergeData( - $point['data'], - array('x' => $point['X'], 'y' => $point['Y']) - ) - ); - } - foreach ($upperBand as $point) { - $this->_canvas->addVertex( - $this->_mergeData( - $point['data'], - array('x' => $point['X'], 'y' => $point['Y']) - ) - ); - } - unset($upperBand); - unset($lowerBand); - - $this->_getLineStyle($key); - $this->_getFillStyle($key); - $this->_canvas->polygon(array('connect' => true, 'map_vertices' => true)); - } - unset($keys); - $this->_drawMarker(); - $this->_canvas->endGroup(); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Band.php,v 1.12 2005/11/27 22:21:16 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + * @since File available since Release 0.3.0dev2 + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * "Band" (area chart with min AND max) chart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @since Class available since Release 0.3.0dev2 + */ +class Image_Graph_Plot_Band extends Image_Graph_Plot +{ + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $h = abs($y1 - $y0) / 6; + $w = round(abs($x1 - $x0) / 5); + $y = ($y0 + $y1) / 2; + + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y - $h * 3)); + $this->_canvas->addVertex(array('x' => $x0 + $w, 'y' => $y - 4 * $h)); + $this->_canvas->addVertex(array('x' => $x0 + 2 * $w, 'y' => $y - $h * 2)); + $this->_canvas->addVertex(array('x' => $x0 + 3 * $w, 'y' => $y - $h * 4)); + $this->_canvas->addVertex(array('x' => $x0 + 4 * $w, 'y' => $y - $h * 3)); + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y - $h * 2)); + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y + $h * 3)); + $this->_canvas->addVertex(array('x' => $x0 + 4 * $w, 'y' => $y + $h)); + $this->_canvas->addVertex(array('x' => $x0 + 3 * $w, 'y' => $y + 2 * $h)); + $this->_canvas->addVertex(array('x' => $x0 + 2 * $w, 'y' => $y + 1 * $h)); + $this->_canvas->addVertex(array('x' => $x0 + 1 * $w, 'y' => $y)); + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y + $h)); + + $this->_getLineStyle(); + $this->_getFillStyle(); + $this->_canvas->polygon(array('connect' => true)); + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!is_array($this->_dataset)) { + return false; + } + + $current = array(); + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + + $this->_clip(true); + + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + $upperBand = array(); + $lowerBand = array(); + while ($data = $dataset->_next()) { + if ($this->_parent->_horizontal) { + $point['X'] = $data['X']; + + $point['Y'] = $data['Y']['high']; + $y = $this->_pointY($point); + $x_high = $this->_pointX($point); + + $point['Y'] = $data['Y']['low']; + $x_low = $this->_pointX($point); + + $data = array('X' => $x_high, 'Y' => $y); + if (isset($point['data'])) { + $data['data'] = $point['data']; + } else { + $data['data'] = array(); + } + $upperBand[] = $data; + + $data = array('X' => $x_low, 'Y' => $y); + if (isset($point['data'])) { + $data['data'] = $point['data']; + } else { + $data['data'] = array(); + } + $lowerBand[] = $data; + } + else { + $point['X'] = $data['X']; + $y = $data['Y']; + + $point['Y'] = $data['Y']['high']; + $x = $this->_pointX($point); + $y_high = $this->_pointY($point); + + $point['Y'] = $data['Y']['low']; + $y_low = $this->_pointY($point); + + $data = array('X' => $x, 'Y' => $y_high); + if (isset($point['data'])) { + $data['data'] = $point['data']; + } else { + $data['data'] = array(); + } + $upperBand[] = $data; + + $data = array('X' => $x, 'Y' => $y_low); + if (isset($point['data'])) { + $data['data'] = $point['data']; + } else { + $data['data'] = array(); + } + $lowerBand[] = $data; + } + } + $lowerBand = array_reverse($lowerBand); + foreach ($lowerBand as $point) { + $this->_canvas->addVertex( + $this->_mergeData( + $point['data'], + array('x' => $point['X'], 'y' => $point['Y']) + ) + ); + } + foreach ($upperBand as $point) { + $this->_canvas->addVertex( + $this->_mergeData( + $point['data'], + array('x' => $point['X'], 'y' => $point['Y']) + ) + ); + } + unset($upperBand); + unset($lowerBand); + + $this->_getLineStyle($key); + $this->_getFillStyle($key); + $this->_canvas->polygon(array('connect' => true, 'map_vertices' => true)); + } + unset($keys); + $this->_drawMarker(); + $this->_clip(false); + + $this->_canvas->endGroup(); + + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Bar.php b/includes/pear/Image/Graph/Plot/Bar.php index 17cc0624..c589d4b4 100644 --- a/includes/pear/Image/Graph/Plot/Bar.php +++ b/includes/pear/Image/Graph/Plot/Bar.php @@ -1,302 +1,307 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Bar.php,v 1.13 2005/08/24 16:02:49 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * A bar chart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Bar extends Image_Graph_Plot -{ - - /** - * The space between 2 bars (should be a multipla of 2) - * @var int - * @access private - */ - var $_space = 4; - - /** - * The width of the bars - * @var array - * @access private - */ - var $_width = 'auto'; - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $dx = abs($x1 - $x0) / 7; - $this->_canvas->rectangle(array('x0' => $x0 + $dx, 'y0' => $y0, 'x1' => $x1 - $dx, 'y1' => $y1)); - } - - /** - * Set the spacing between 2 neighbouring bars - * - * @param int $space The number of pixels between 2 bars, should be a - * multipla of 2 (ie an even number) - */ - function setSpacing($space) - { - $this->_space = (int) ($space / 2); - } - - /** - * Set the width of a bars. - * - * Specify 'auto' to auto calculate the width based on the positions on the - * x-axis. - * - * Supported units are: - * - * '%' The width is specified in percentage of the total plot width - * - * 'px' The width specified in pixels - * - * @param string $width The width of any bar - * @param string $unit The unit of the width - */ - function setBarWidth($width, $unit = false) - { - if ($width == 'auto') { - $this->_width = $width; - } else { - $this->_width = array( - 'width' => $width, - 'unit' => $unit - ); - } - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!is_array($this->_dataset)) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - if ($this->_width == 'auto') { - $width = $this->_parent->_labelDistance(IMAGE_GRAPH_AXIS_X) / 2; - } elseif ($this->_width['unit'] == '%') { - $width = $this->_width['width'] * $this->width() / 200; - } elseif ($this->_width['unit'] == 'px') { - $width = $this->_width['width'] / 2; - } - - if ($this->_multiType == 'stacked100pct') { - $total = $this->_getTotals(); - } - - $minYaxis = $this->_parent->_getMinimum($this->_axisY); - $maxYaxis = $this->_parent->_getMaximum($this->_axisY); - - $number = 0; - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - while ($point = $dataset->_next()) { - - if ($this->_parent->_horizontal) { - $y1 = $this->_pointY($point) - $width; - $y2 = $this->_pointY($point) + $width; - - if ($y2 - $this->_space > $y1 + $this->_space) { - /* - * Take bar spacing into account _only_ if the space doesn't - * turn the bar "inside-out", i.e. if the actual bar width - * is smaller than the space between the bars - */ - $y2 -= $this->_space; - $y1 += $this->_space; - } - } - else { - $x1 = $this->_pointX($point) - $width; - $x2 = $this->_pointX($point) + $width; - - if ($x2 - $this->_space > $x1 + $this->_space) { - /* - * Take bar spacing into account _only_ if the space doesn't - * turn the bar "inside-out", i.e. if the actual bar width - * is smaller than the space between the bars - */ - $x2 -= $this->_space; - $x1 += $this->_space; - } - } - - - if (($this->_multiType == 'stacked') || - ($this->_multiType == 'stacked100pct')) - { - $x = $point['X']; - - if ($point['Y'] >= 0) { - if (!isset($current[$x])) { - $current[$x] = 0; - } - - if ($this->_multiType == 'stacked') { - $p0 = array( - 'X' => $point['X'], - 'Y' => $current[$x] - ); - $p1 = array( - 'X' => $point['X'], - 'Y' => $current[$x] + $point['Y'] - ); - } else { - $p0 = array( - 'X' => $point['X'], - 'Y' => 100 * $current[$x] / $total['TOTAL_Y'][$x] - ); - $p1 = array( - 'X' => $point['X'], - 'Y' => 100 * ($current[$x] + $point['Y']) / $total['TOTAL_Y'][$x] - ); - } - $current[$x] += $point['Y']; - } else { - if (!isset($currentNegative[$x])) { - $currentNegative[$x] = 0; - } - - $p0 = array( - 'X' => $point['X'], - 'Y' => $currentNegative[$x] - ); - $p1 = array( - 'X' => $point['X'], - 'Y' => $currentNegative[$x] + $point['Y'] - ); - $currentNegative[$x] += $point['Y']; - } - } else { - if (count($this->_dataset) > 1) { - $w = 2 * ($width - $this->_space) / count($this->_dataset); - if ($this->_parent->_horizontal) { - $y2 = ($y1 = ($y1 + $y2) / 2 - ($width - $this->_space) + $number * $w) + $w; - } - else { - $x2 = ($x1 = ($x1 + $x2) / 2 - ($width - $this->_space) + $number * $w) + $w; - } - } - $p0 = array('X' => $point['X'], 'Y' => 0); - $p1 = $point; - } - - if ((($minY = min($p0['Y'], $p1['Y'])) < $maxYaxis) && - (($maxY = max($p0['Y'], $p1['Y'])) > $minYaxis) - ) { - $p0['Y'] = $minY; - $p1['Y'] = $maxY; - - if ($p0['Y'] < $minYaxis) { - $p0['Y'] = '#min_pos#'; - } - if ($p1['Y'] > $maxYaxis) { - $p1['Y'] = '#max_neg#'; - } - - if ($this->_parent->_horizontal) { - $x1 = $this->_pointX($p0); - $x2 = $this->_pointX($p1); - } - else { - $y1 = $this->_pointY($p0); - $y2 = $this->_pointY($p1); - } - - $ID = $point['ID']; - if (($ID === false) && (count($this->_dataset) > 1)) { - $ID = $key; - } - $this->_getFillStyle($ID); - $this->_getLineStyle($ID); - - if (($y1 != $y2) && ($x1 != $x2)) { - $this->_canvas->rectangle( - $this->_mergeData( - $point, - array( - 'x0' => min($x1, $x2), - 'y0' => min($y1, $y2), - 'x1' => max($x1, $x2), - 'y1' => max($y1, $y2) - ) - ) - ); - } - } - } - $number ++; - } - unset($keys); - - $this->_drawMarker(); - - $this->_canvas->endGroup(); - return true; - } -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Bar.php,v 1.14 2005/11/27 22:21:16 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * A bar chart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Bar extends Image_Graph_Plot +{ + + /** + * The space between 2 bars (should be a multipla of 2) + * @var int + * @access private + */ + var $_space = 4; + + /** + * The width of the bars + * @var array + * @access private + */ + var $_width = 'auto'; + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $dx = abs($x1 - $x0) / 7; + $this->_canvas->rectangle(array('x0' => $x0 + $dx, 'y0' => $y0, 'x1' => $x1 - $dx, 'y1' => $y1)); + } + + /** + * Set the spacing between 2 neighbouring bars + * + * @param int $space The number of pixels between 2 bars, should be a + * multipla of 2 (ie an even number) + */ + function setSpacing($space) + { + $this->_space = (int) ($space / 2); + } + + /** + * Set the width of a bars. + * + * Specify 'auto' to auto calculate the width based on the positions on the + * x-axis. + * + * Supported units are: + * + * '%' The width is specified in percentage of the total plot width + * + * 'px' The width specified in pixels + * + * @param string $width The width of any bar + * @param string $unit The unit of the width + */ + function setBarWidth($width, $unit = false) + { + if ($width == 'auto') { + $this->_width = $width; + } else { + $this->_width = array( + 'width' => $width, + 'unit' => $unit + ); + } + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!is_array($this->_dataset)) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + + $this->_clip(true); + + if ($this->_width == 'auto') { + $width = $this->_parent->_labelDistance(IMAGE_GRAPH_AXIS_X) / 2; + } elseif ($this->_width['unit'] == '%') { + $width = $this->_width['width'] * $this->width() / 200; + } elseif ($this->_width['unit'] == 'px') { + $width = $this->_width['width'] / 2; + } + + if ($this->_multiType == 'stacked100pct') { + $total = $this->_getTotals(); + } + + $minYaxis = $this->_parent->_getMinimum($this->_axisY); + $maxYaxis = $this->_parent->_getMaximum($this->_axisY); + + $number = 0; + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + while ($point = $dataset->_next()) { + + if ($this->_parent->_horizontal) { + $y1 = $this->_pointY($point) - $width; + $y2 = $this->_pointY($point) + $width; + + if ($y2 - $this->_space > $y1 + $this->_space) { + /* + * Take bar spacing into account _only_ if the space doesn't + * turn the bar "inside-out", i.e. if the actual bar width + * is smaller than the space between the bars + */ + $y2 -= $this->_space; + $y1 += $this->_space; + } + } + else { + $x1 = $this->_pointX($point) - $width; + $x2 = $this->_pointX($point) + $width; + + if ($x2 - $this->_space > $x1 + $this->_space) { + /* + * Take bar spacing into account _only_ if the space doesn't + * turn the bar "inside-out", i.e. if the actual bar width + * is smaller than the space between the bars + */ + $x2 -= $this->_space; + $x1 += $this->_space; + } + } + + + if (($this->_multiType == 'stacked') || + ($this->_multiType == 'stacked100pct')) + { + $x = $point['X']; + + if ($point['Y'] >= 0) { + if (!isset($current[$x])) { + $current[$x] = 0; + } + + if ($this->_multiType == 'stacked') { + $p0 = array( + 'X' => $point['X'], + 'Y' => $current[$x] + ); + $p1 = array( + 'X' => $point['X'], + 'Y' => $current[$x] + $point['Y'] + ); + } else { + $p0 = array( + 'X' => $point['X'], + 'Y' => 100 * $current[$x] / $total['TOTAL_Y'][$x] + ); + $p1 = array( + 'X' => $point['X'], + 'Y' => 100 * ($current[$x] + $point['Y']) / $total['TOTAL_Y'][$x] + ); + } + $current[$x] += $point['Y']; + } else { + if (!isset($currentNegative[$x])) { + $currentNegative[$x] = 0; + } + + $p0 = array( + 'X' => $point['X'], + 'Y' => $currentNegative[$x] + ); + $p1 = array( + 'X' => $point['X'], + 'Y' => $currentNegative[$x] + $point['Y'] + ); + $currentNegative[$x] += $point['Y']; + } + } else { + if (count($this->_dataset) > 1) { + $w = 2 * ($width - $this->_space) / count($this->_dataset); + if ($this->_parent->_horizontal) { + $y2 = ($y1 = ($y1 + $y2) / 2 - ($width - $this->_space) + $number * $w) + $w; + } + else { + $x2 = ($x1 = ($x1 + $x2) / 2 - ($width - $this->_space) + $number * $w) + $w; + } + } + $p0 = array('X' => $point['X'], 'Y' => 0); + $p1 = $point; + } + + if ((($minY = min($p0['Y'], $p1['Y'])) < $maxYaxis) && + (($maxY = max($p0['Y'], $p1['Y'])) > $minYaxis) + ) { + $p0['Y'] = $minY; + $p1['Y'] = $maxY; + + if ($p0['Y'] < $minYaxis) { + $p0['Y'] = '#min_pos#'; + } + if ($p1['Y'] > $maxYaxis) { + $p1['Y'] = '#max_neg#'; + } + + if ($this->_parent->_horizontal) { + $x1 = $this->_pointX($p0); + $x2 = $this->_pointX($p1); + } + else { + $y1 = $this->_pointY($p0); + $y2 = $this->_pointY($p1); + } + + $ID = $point['ID']; + if (($ID === false) && (count($this->_dataset) > 1)) { + $ID = $key; + } + $this->_getFillStyle($ID); + $this->_getLineStyle($ID); + + if (($y1 != $y2) && ($x1 != $x2)) { + $this->_canvas->rectangle( + $this->_mergeData( + $point, + array( + 'x0' => min($x1, $x2), + 'y0' => min($y1, $y2), + 'x1' => max($x1, $x2), + 'y1' => max($y1, $y2) + ) + ) + ); + } + } + } + $number ++; + } + unset($keys); + + $this->_drawMarker(); + + $this->_clip(false); + + $this->_canvas->endGroup(); + + return true; + } +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/BoxWhisker.php b/includes/pear/Image/Graph/Plot/BoxWhisker.php index d6b0d388..8acaa8d8 100644 --- a/includes/pear/Image/Graph/Plot/BoxWhisker.php +++ b/includes/pear/Image/Graph/Plot/BoxWhisker.php @@ -1,294 +1,298 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: BoxWhisker.php,v 1.13 2005/09/08 19:02:18 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - * @since File available since Release 0.3.0dev2 - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Box & Whisker chart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @since Class available since Release 0.3.0dev2 - */ -class Image_Graph_Plot_BoxWhisker extends Image_Graph_Plot -{ - /** - * Whisker circle size - * @var int - * @access private - */ - var $_whiskerSize = false; - - /** - * Draws a box & whisker - * - * @param int $x The x position - * @param int $w The width of the box - * @param int $r The radius of the circle markers - * @param int $y_min The Y position of the minimum value - * @param int $y_q1 The Y position of the median of the first quartile - * @param int $y_med The Y position of the median - * @param int $y_q3 The Y position of the median of the third quartile - * @param int $y_max The Y position of the maximum value - * @param int $key The ID tag - * @access private - */ - function _drawBoxWhiskerV($x, $w, $r, $y_min, $y_q1, $y_med, $y_q3, $y_max, $key = false) - { - // draw circles - $this->_getLineStyle(); - $this->_getFillStyle('min'); - $this->_canvas->ellipse(array('x' => $x, 'y' => $y_min, 'rx' => $r, 'ry' => $r)); - - $this->_getLineStyle(); - $this->_getFillStyle('quartile1'); - $this->_canvas->ellipse(array('x' => $x, 'y' => $y_q1, 'rx' => $r, 'ry' => $r)); - - $this->_getLineStyle(); - $this->_getFillStyle('median'); - $this->_canvas->ellipse(array('x' => $x, 'y' => $y_med, 'rx' => $r, 'ry' => $r)); - - $this->_getLineStyle(); - $this->_getFillStyle('quartile3'); - $this->_canvas->ellipse(array('x' => $x, 'y' => $y_q3, $r, 'rx' => $r, 'ry' => $r)); - - $this->_getLineStyle(); - $this->_getFillStyle('max'); - $this->_canvas->ellipse(array('x' => $x, 'y' => $y_max, $r, 'rx' => $r, 'ry' => $r)); - - // draw box and lines - - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x, 'y0' => $y_min, 'x1' => $x, 'y1' => $y_q1)); - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x, 'y0' => $y_q3, 'x1' => $x, 'y1' => $y_max)); - - $this->_getLineStyle(); - $this->_getFillStyle('box'); - $this->_canvas->rectangle(array('x0' => $x - $w, 'y0' => $y_q1, 'x1' => $x + $w, 'y1' => $y_q3)); - - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x - $w, 'y0' => $y_med, 'x1' => $x + $w, 'y1' => $y_med)); - } - - /** - * Draws a box & whisker - * - * @param int $y The x position - * @param int $h The width of the box - * @param int $r The radius of the circle markers - * @param int $x_min The Y position of the minimum value - * @param int $x_q1 The Y position of the median of the first quartile - * @param int $x_med The Y position of the median - * @param int $x_q3 The Y position of the median of the third quartile - * @param int $x_max The Y position of the maximum value - * @param int $key The ID tag - * @access private - */ - function _drawBoxWhiskerH($y, $h, $r, $x_min, $x_q1, $x_med, $x_q3, $x_max, $key = false) - { - // draw circles - $this->_getLineStyle(); - $this->_getFillStyle('min'); - $this->_canvas->ellipse(array('x' => $x_min, 'y' => $y, 'rx' => $r, 'ry' => $r)); - - $this->_getLineStyle(); - $this->_getFillStyle('quartile1'); - $this->_canvas->ellipse(array('x' => $x_q1, 'y' => $y, 'rx' => $r, 'ry' => $r)); - - $this->_getLineStyle(); - $this->_getFillStyle('median'); - $this->_canvas->ellipse(array('x' => $x_med, 'y' => $y, 'rx' => $r, 'ry' => $r)); - - $this->_getLineStyle(); - $this->_getFillStyle('quartile3'); - $this->_canvas->ellipse(array('x' => $x_q3, 'y' => $y, $r, 'rx' => $r, 'ry' => $r)); - - $this->_getLineStyle(); - $this->_getFillStyle('max'); - $this->_canvas->ellipse(array('x' => $x_max, 'y' => $y, $r, 'rx' => $r, 'ry' => $r)); - - // draw box and lines - - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x_min, 'y0' => $y, 'x1' => $x_q1, 'y1' => $y)); - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x_q3, 'y0' => $y, 'x1' => $x_max, 'y1' => $y)); - - $this->_getLineStyle(); - $this->_getFillStyle('box'); - $this->_canvas->rectangle(array('x0' => $x_q1, 'y0' => $y - $h, 'x1' => $x_q3, 'y1' => $y + $h)); - - $this->_getLineStyle(); - $this->_canvas->line(array('x0' => $x_med, 'y0' => $y - $h, 'x1' => $x_med, 'y1' => $y + $h)); - } - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $x = round(($x0 + $x1) / 2); - $h = abs($y1 - $y0) / 9; - $w = round(abs($x1 - $x0) / 5); - $r = 2;//round(abs($x1 - $x0) / 13); - $this->_drawBoxWhiskerV($x, $w, $r, $y1, $y1 - 2 * $h, $y1 - 4 * $h, $y0 + 3 * $h, $y0); - } - - /** - * Sets the whisker circle size - * - * @param int $size Size (radius) of the whisker circle/dot - */ - function setWhiskerSize($size = false) - { - $this->_whiskerSize = $size; - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!is_array($this->_dataset)) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - if ($this->_multiType == 'stacked100pct') { - $total = $this->_getTotals(); - } - $current = array(); - $number = 0; - $width = floor(0.5 * $this->_parent->_labelDistance(IMAGE_GRAPH_AXIS_X) / 2); - - if ($this->_whiskerSize !== false) { - $r = $this->_whiskerSize; - } else { - $r = min(5, $width / 10); - } - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - while ($data = $dataset->_next()) { - if ($this->_parent->_horizontal) { - $point['X'] = $data['X']; - $y = $data['Y']; - - $min = min($y); - $max = max($y); - $q1 = $dataset->_median($y, 'first'); - $med = $dataset->_median($y, 'second'); - $q3 = $dataset->_median($y, 'third'); - - $point['Y'] = $min; - $y = $this->_pointY($point); - $x_min = $this->_pointX($point); - - $point['Y'] = $max; - $x_max = $this->_pointX($point); - - $point['Y'] = $q1; - $x_q1 = $this->_pointX($point); - - $point['Y'] = $med; - $x_med = $this->_pointX($point); - - $point['Y'] = $q3; - $x_q3 = $this->_pointX($point); - - $this->_drawBoxWhiskerH($y, $width, $r, $x_min, $x_q1, $x_med, $x_q3, $x_max, $key); - } - else { - $point['X'] = $data['X']; - $y = $data['Y']; - - $min = min($y); - $max = max($y); - $q1 = $dataset->_median($y, 'first'); - $med = $dataset->_median($y, 'second'); - $q3 = $dataset->_median($y, 'third'); - - $point['Y'] = $min; - $x = $this->_pointX($point); - $y_min = $this->_pointY($point); - - $point['Y'] = $max; - $y_max = $this->_pointY($point); - - $point['Y'] = $q1; - $y_q1 = $this->_pointY($point); - - $point['Y'] = $med; - $y_med = $this->_pointY($point); - - $point['Y'] = $q3; - $y_q3 = $this->_pointY($point); - - $this->_drawBoxWhiskerV($x, $width, $r, $y_min, $y_q1, $y_med, $y_q3, $y_max, $key); - } - } - } - unset($keys); - $this->_drawMarker(); - - $this->_canvas->endGroup(); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: BoxWhisker.php,v 1.14 2005/11/27 22:21:17 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + * @since File available since Release 0.3.0dev2 + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Box & Whisker chart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @since Class available since Release 0.3.0dev2 + */ +class Image_Graph_Plot_BoxWhisker extends Image_Graph_Plot +{ + /** + * Whisker circle size + * @var int + * @access private + */ + var $_whiskerSize = false; + + /** + * Draws a box & whisker + * + * @param int $x The x position + * @param int $w The width of the box + * @param int $r The radius of the circle markers + * @param int $y_min The Y position of the minimum value + * @param int $y_q1 The Y position of the median of the first quartile + * @param int $y_med The Y position of the median + * @param int $y_q3 The Y position of the median of the third quartile + * @param int $y_max The Y position of the maximum value + * @param int $key The ID tag + * @access private + */ + function _drawBoxWhiskerV($x, $w, $r, $y_min, $y_q1, $y_med, $y_q3, $y_max, $key = false) + { + // draw circles + $this->_getLineStyle(); + $this->_getFillStyle('min'); + $this->_canvas->ellipse(array('x' => $x, 'y' => $y_min, 'rx' => $r, 'ry' => $r)); + + $this->_getLineStyle(); + $this->_getFillStyle('quartile1'); + $this->_canvas->ellipse(array('x' => $x, 'y' => $y_q1, 'rx' => $r, 'ry' => $r)); + + $this->_getLineStyle(); + $this->_getFillStyle('median'); + $this->_canvas->ellipse(array('x' => $x, 'y' => $y_med, 'rx' => $r, 'ry' => $r)); + + $this->_getLineStyle(); + $this->_getFillStyle('quartile3'); + $this->_canvas->ellipse(array('x' => $x, 'y' => $y_q3, $r, 'rx' => $r, 'ry' => $r)); + + $this->_getLineStyle(); + $this->_getFillStyle('max'); + $this->_canvas->ellipse(array('x' => $x, 'y' => $y_max, $r, 'rx' => $r, 'ry' => $r)); + + // draw box and lines + + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x, 'y0' => $y_min, 'x1' => $x, 'y1' => $y_q1)); + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x, 'y0' => $y_q3, 'x1' => $x, 'y1' => $y_max)); + + $this->_getLineStyle(); + $this->_getFillStyle('box'); + $this->_canvas->rectangle(array('x0' => $x - $w, 'y0' => $y_q1, 'x1' => $x + $w, 'y1' => $y_q3)); + + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x - $w, 'y0' => $y_med, 'x1' => $x + $w, 'y1' => $y_med)); + } + + /** + * Draws a box & whisker + * + * @param int $y The x position + * @param int $h The width of the box + * @param int $r The radius of the circle markers + * @param int $x_min The Y position of the minimum value + * @param int $x_q1 The Y position of the median of the first quartile + * @param int $x_med The Y position of the median + * @param int $x_q3 The Y position of the median of the third quartile + * @param int $x_max The Y position of the maximum value + * @param int $key The ID tag + * @access private + */ + function _drawBoxWhiskerH($y, $h, $r, $x_min, $x_q1, $x_med, $x_q3, $x_max, $key = false) + { + // draw circles + $this->_getLineStyle(); + $this->_getFillStyle('min'); + $this->_canvas->ellipse(array('x' => $x_min, 'y' => $y, 'rx' => $r, 'ry' => $r)); + + $this->_getLineStyle(); + $this->_getFillStyle('quartile1'); + $this->_canvas->ellipse(array('x' => $x_q1, 'y' => $y, 'rx' => $r, 'ry' => $r)); + + $this->_getLineStyle(); + $this->_getFillStyle('median'); + $this->_canvas->ellipse(array('x' => $x_med, 'y' => $y, 'rx' => $r, 'ry' => $r)); + + $this->_getLineStyle(); + $this->_getFillStyle('quartile3'); + $this->_canvas->ellipse(array('x' => $x_q3, 'y' => $y, $r, 'rx' => $r, 'ry' => $r)); + + $this->_getLineStyle(); + $this->_getFillStyle('max'); + $this->_canvas->ellipse(array('x' => $x_max, 'y' => $y, $r, 'rx' => $r, 'ry' => $r)); + + // draw box and lines + + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x_min, 'y0' => $y, 'x1' => $x_q1, 'y1' => $y)); + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x_q3, 'y0' => $y, 'x1' => $x_max, 'y1' => $y)); + + $this->_getLineStyle(); + $this->_getFillStyle('box'); + $this->_canvas->rectangle(array('x0' => $x_q1, 'y0' => $y - $h, 'x1' => $x_q3, 'y1' => $y + $h)); + + $this->_getLineStyle(); + $this->_canvas->line(array('x0' => $x_med, 'y0' => $y - $h, 'x1' => $x_med, 'y1' => $y + $h)); + } + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $x = round(($x0 + $x1) / 2); + $h = abs($y1 - $y0) / 9; + $w = round(abs($x1 - $x0) / 5); + $r = 2;//round(abs($x1 - $x0) / 13); + $this->_drawBoxWhiskerV($x, $w, $r, $y1, $y1 - 2 * $h, $y1 - 4 * $h, $y0 + 3 * $h, $y0); + } + + /** + * Sets the whisker circle size + * + * @param int $size Size (radius) of the whisker circle/dot + */ + function setWhiskerSize($size = false) + { + $this->_whiskerSize = $size; + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!is_array($this->_dataset)) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + + $this->_clip(true); + + if ($this->_multiType == 'stacked100pct') { + $total = $this->_getTotals(); + } + $current = array(); + $number = 0; + $width = floor(0.5 * $this->_parent->_labelDistance(IMAGE_GRAPH_AXIS_X) / 2); + + if ($this->_whiskerSize !== false) { + $r = $this->_whiskerSize; + } else { + $r = min(5, $width / 10); + } + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + while ($data = $dataset->_next()) { + if ($this->_parent->_horizontal) { + $point['X'] = $data['X']; + $y = $data['Y']; + + $min = min($y); + $max = max($y); + $q1 = $dataset->_median($y, 'first'); + $med = $dataset->_median($y, 'second'); + $q3 = $dataset->_median($y, 'third'); + + $point['Y'] = $min; + $y = $this->_pointY($point); + $x_min = $this->_pointX($point); + + $point['Y'] = $max; + $x_max = $this->_pointX($point); + + $point['Y'] = $q1; + $x_q1 = $this->_pointX($point); + + $point['Y'] = $med; + $x_med = $this->_pointX($point); + + $point['Y'] = $q3; + $x_q3 = $this->_pointX($point); + + $this->_drawBoxWhiskerH($y, $width, $r, $x_min, $x_q1, $x_med, $x_q3, $x_max, $key); + } + else { + $point['X'] = $data['X']; + $y = $data['Y']; + + $min = min($y); + $max = max($y); + $q1 = $dataset->_median($y, 'first'); + $med = $dataset->_median($y, 'second'); + $q3 = $dataset->_median($y, 'third'); + + $point['Y'] = $min; + $x = $this->_pointX($point); + $y_min = $this->_pointY($point); + + $point['Y'] = $max; + $y_max = $this->_pointY($point); + + $point['Y'] = $q1; + $y_q1 = $this->_pointY($point); + + $point['Y'] = $med; + $y_med = $this->_pointY($point); + + $point['Y'] = $q3; + $y_q3 = $this->_pointY($point); + + $this->_drawBoxWhiskerV($x, $width, $r, $y_min, $y_q1, $y_med, $y_q3, $y_max, $key); + } + } + } + unset($keys); + $this->_drawMarker(); + + $this->_clip(false); + + $this->_canvas->endGroup(); + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/CandleStick.php b/includes/pear/Image/Graph/Plot/CandleStick.php index 025d701f..5251e799 100644 --- a/includes/pear/Image/Graph/Plot/CandleStick.php +++ b/includes/pear/Image/Graph/Plot/CandleStick.php @@ -1,247 +1,251 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: CandleStick.php,v 1.11 2005/08/30 21:25:24 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - * @since File available since Release 0.3.0dev2 - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Candlestick chart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @since Class available since Release 0.3.0dev2 - */ -class Image_Graph_Plot_CandleStick extends Image_Graph_Plot -{ - - /** - * (Add basic description here) - * - * @access private - */ - function _drawCandleStickH($y, $h, $x_min, $x_open, $x_close, $x_max, $ID) - { - $this->_getLineStyle($ID); - $this->_canvas->line( - array( - 'x0' => min($x_open, $x_close), - 'y0' => $y, - 'x1' => $x_min, - 'y1' => $y - ) - ); - $this->_getLineStyle($ID); - $this->_canvas->line( - array( - 'x0' => max($x_open, $x_close), - 'y0' => $y, - 'x1' => $x_max, - 'y1' => $y - ) - ); - - $this->_getLineStyle($ID); - $this->_getFillStyle($ID); - $this->_canvas->rectangle( - array( - 'x0' => min($x_open, $x_close), - 'y0' => $y - $h, - 'x1' => max($x_open, $x_close), - 'y1' => $y + $h - ) - ); - } - - /** - * (Add basic description here) - * - * @access private - */ - function _drawCandleStickV($x, $w, $y_min, $y_open, $y_close, $y_max, $ID) - { - $this->_getLineStyle($ID); - $this->_canvas->line( - array( - 'x0' => $x, - 'y0' => min($y_open, $y_close), - 'x1' => $x, - 'y1' => $y_max - ) - ); - $this->_getLineStyle($ID); - $this->_canvas->line( - array( - 'x0' => $x, - 'y0' => max($y_open, $y_close), - 'x1' => $x, - 'y1' => $y_min - ) - ); - - $this->_getLineStyle($ID); - $this->_getFillStyle($ID); - $this->_canvas->rectangle( - array( - 'x0' => $x - $w, - 'y0' => min($y_open, $y_close), - 'x1' => $x + $w, - 'y1' => max($y_open, $y_close) - ) - ); - } - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $x = round(($x0 + $x1) / 2); - $h = abs($y1 - $y0) / 4; - $w = round(abs($x1 - $x0) / 5); - $this->_drawCandleStickV($x, $w, $y1, $y1 - $h, $y0 + $h, $y0, 'green'); - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!is_array($this->_dataset)) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - if ($this->_multiType == 'stacked100pct') { - $total = $this->_getTotals(); - } - $current = array(); - $number = 0; - $width = floor(0.8 * $this->_parent->_labelDistance(IMAGE_GRAPH_AXIS_X) / 2); - - $lastClosed = false; - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - while ($data = $dataset->_next()) { - if ($this->_parent->_horizontal) { - $point['X'] = $data['X']; - //$y = $data['Y']; - - if (isset($data['Y']['open'])) { - $point['Y'] = $data['Y']['open']; - } else { - $point['Y'] = $lastClosed; - } - $y = $this->_pointY($point); - $x_open = $this->_pointX($point); - - $lastClosed = $point['Y'] = $data['Y']['close']; - $x_close = $this->_pointX($point); - - $point['Y'] = $data['Y']['min']; - $x_min = $this->_pointX($point); - - $point['Y'] = $data['Y']['max']; - $x_max = $this->_pointX($point); - - if ($data['Y']['close'] < $data['Y']['open']) { - $ID = 'red'; - } else { - $ID = 'green'; - } - - $this->_drawCandleStickH($y, $width, $x_min, $x_open, $x_close, $x_max, $ID); - } - else { - $point['X'] = $data['X']; - //$y = $data['Y']; - - if (isset($data['Y']['open'])) { - $point['Y'] = $data['Y']['open']; - } else { - $point['Y'] = $lastClosed; - } - $x = $this->_pointX($point); - $y_open = $this->_pointY($point); - - $lastClosed = $point['Y'] = $data['Y']['close']; - $y_close = $this->_pointY($point); - - $point['Y'] = $data['Y']['min']; - $y_min = $this->_pointY($point); - - $point['Y'] = $data['Y']['max']; - $y_max = $this->_pointY($point); - - if ($data['Y']['close'] < $data['Y']['open']) { - $ID = 'red'; - } else { - $ID = 'green'; - } - - $this->_drawCandleStickV($x, $width, $y_min, $y_open, $y_close, $y_max, $ID); - } - } - } - unset($keys); - $this->_drawMarker(); - - $this->_canvas->endGroup($this->_title); - - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: CandleStick.php,v 1.12 2005/11/27 22:21:16 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + * @since File available since Release 0.3.0dev2 + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Candlestick chart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @since Class available since Release 0.3.0dev2 + */ +class Image_Graph_Plot_CandleStick extends Image_Graph_Plot +{ + + /** + * (Add basic description here) + * + * @access private + */ + function _drawCandleStickH($y, $h, $x_min, $x_open, $x_close, $x_max, $ID) + { + $this->_getLineStyle($ID); + $this->_canvas->line( + array( + 'x0' => min($x_open, $x_close), + 'y0' => $y, + 'x1' => $x_min, + 'y1' => $y + ) + ); + $this->_getLineStyle($ID); + $this->_canvas->line( + array( + 'x0' => max($x_open, $x_close), + 'y0' => $y, + 'x1' => $x_max, + 'y1' => $y + ) + ); + + $this->_getLineStyle($ID); + $this->_getFillStyle($ID); + $this->_canvas->rectangle( + array( + 'x0' => min($x_open, $x_close), + 'y0' => $y - $h, + 'x1' => max($x_open, $x_close), + 'y1' => $y + $h + ) + ); + } + + /** + * (Add basic description here) + * + * @access private + */ + function _drawCandleStickV($x, $w, $y_min, $y_open, $y_close, $y_max, $ID) + { + $this->_getLineStyle($ID); + $this->_canvas->line( + array( + 'x0' => $x, + 'y0' => min($y_open, $y_close), + 'x1' => $x, + 'y1' => $y_max + ) + ); + $this->_getLineStyle($ID); + $this->_canvas->line( + array( + 'x0' => $x, + 'y0' => max($y_open, $y_close), + 'x1' => $x, + 'y1' => $y_min + ) + ); + + $this->_getLineStyle($ID); + $this->_getFillStyle($ID); + $this->_canvas->rectangle( + array( + 'x0' => $x - $w, + 'y0' => min($y_open, $y_close), + 'x1' => $x + $w, + 'y1' => max($y_open, $y_close) + ) + ); + } + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $x = round(($x0 + $x1) / 2); + $h = abs($y1 - $y0) / 4; + $w = round(abs($x1 - $x0) / 5); + $this->_drawCandleStickV($x, $w, $y1, $y1 - $h, $y0 + $h, $y0, 'green'); + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!is_array($this->_dataset)) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + + $this->_clip(true); + + if ($this->_multiType == 'stacked100pct') { + $total = $this->_getTotals(); + } + $current = array(); + $number = 0; + $width = floor(0.8 * $this->_parent->_labelDistance(IMAGE_GRAPH_AXIS_X) / 2); + + $lastClosed = false; + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + while ($data = $dataset->_next()) { + if ($this->_parent->_horizontal) { + $point['X'] = $data['X']; + //$y = $data['Y']; + + if (isset($data['Y']['open'])) { + $point['Y'] = $data['Y']['open']; + } else { + $point['Y'] = $lastClosed; + } + $y = $this->_pointY($point); + $x_open = $this->_pointX($point); + + $lastClosed = $point['Y'] = $data['Y']['close']; + $x_close = $this->_pointX($point); + + $point['Y'] = $data['Y']['min']; + $x_min = $this->_pointX($point); + + $point['Y'] = $data['Y']['max']; + $x_max = $this->_pointX($point); + + if ($data['Y']['close'] < $data['Y']['open']) { + $ID = 'red'; + } else { + $ID = 'green'; + } + + $this->_drawCandleStickH($y, $width, $x_min, $x_open, $x_close, $x_max, $ID); + } + else { + $point['X'] = $data['X']; + //$y = $data['Y']; + + if (isset($data['Y']['open'])) { + $point['Y'] = $data['Y']['open']; + } else { + $point['Y'] = $lastClosed; + } + $x = $this->_pointX($point); + $y_open = $this->_pointY($point); + + $lastClosed = $point['Y'] = $data['Y']['close']; + $y_close = $this->_pointY($point); + + $point['Y'] = $data['Y']['min']; + $y_min = $this->_pointY($point); + + $point['Y'] = $data['Y']['max']; + $y_max = $this->_pointY($point); + + if ($data['Y']['close'] < $data['Y']['open']) { + $ID = 'red'; + } else { + $ID = 'green'; + } + + $this->_drawCandleStickV($x, $width, $y_min, $y_open, $y_close, $y_max, $ID); + } + } + } + unset($keys); + $this->_drawMarker(); + + $this->_clip(false); + + $this->_canvas->endGroup($this->_title); + + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Dot.php b/includes/pear/Image/Graph/Plot/Dot.php index 13bf16b8..2bde1908 100644 --- a/includes/pear/Image/Graph/Plot/Dot.php +++ b/includes/pear/Image/Graph/Plot/Dot.php @@ -1,95 +1,99 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Dot.php,v 1.10 2005/08/03 21:21:56 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Dot / scatter chart (only marker). - * - * This plot type only displays a {@link Image_Graph_Marker} for the datapoints. - * The marker must explicitly be defined using {@link Image_Graph_Plot:: - * setMarker()}. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Dot extends Image_Graph_Plot -{ - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - if (isset($this->_marker)) { - $key = key($this->_dataset); - $samplePoint = $this->_dataset[$key]->_nearby(); - $this->_marker->_drawMarker(($x0 + $x1) / 2, ($y0 + $y1) / 2, $samplePoint); - } - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (Image_Graph_Plot::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - $this->_drawMarker(); - - $this->_canvas->endGroup(); - - return true; - } -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Dot.php,v 1.11 2005/11/27 22:21:16 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Dot / scatter chart (only marker). + * + * This plot type only displays a {@link Image_Graph_Marker} for the datapoints. + * The marker must explicitly be defined using {@link Image_Graph_Plot:: + * setMarker()}. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Dot extends Image_Graph_Plot +{ + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + if (isset($this->_marker)) { + $key = key($this->_dataset); + $samplePoint = $this->_dataset[$key]->_nearby(); + $this->_marker->_drawMarker(($x0 + $x1) / 2, ($y0 + $y1) / 2, $samplePoint); + } + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (Image_Graph_Plot::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + + $this->_clip(true); + + $this->_drawMarker(); + + $this->_clip(false); + + $this->_canvas->endGroup(); + + return true; + } +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Fit/Line.php b/includes/pear/Image/Graph/Plot/Fit/Line.php index c182a3c2..39455a6c 100644 --- a/includes/pear/Image/Graph/Plot/Fit/Line.php +++ b/includes/pear/Image/Graph/Plot/Fit/Line.php @@ -1,116 +1,118 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Line.php,v 1.1 2005/09/14 20:27:25 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Include file Image/Graph/Tool.php - */ -require_once 'Image/Graph/Tool.php'; - -/** - * Fit the graph (to a line using linear regression). - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Fit_Line extends Image_Graph_Plot -{ - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $y = ($y0 + $y1) / 2; - $dy = abs($y1 - $y0) / 6; - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y + $dy)); - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y - $dy)); - $this->_canvas->polygon(array('connect' => false)); - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (Image_Graph_Plot::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - $data = array(); - while ($point = $dataset->_next()) { - $data[] = array( - 'X' => $this->_pointX($point), - 'Y' => $this->_pointY($point) - ); - } - - $regression = Image_Graph_Tool::calculateLinearRegression($data); - $this->_getLineStyle($key); - $this->_canvas->line( - array( - 'x0' => $this->_left, - 'y0' => $this->_left * $regression['slope'] + $regression['intersection'], - 'x1' => $this->_right, - 'y1' => $this->_right * $regression['slope'] + $regression['intersection'] - ) - ); - } - $this->_canvas->endGroup(); - - return true; - } -} - -?> + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Line.php,v 1.2 2005/11/27 22:21:18 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Include file Image/Graph/Tool.php + */ +require_once 'Image/Graph/Tool.php'; + +/** + * Fit the graph (to a line using linear regression). + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Fit_Line extends Image_Graph_Plot +{ + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $y = ($y0 + $y1) / 2; + $dy = abs($y1 - $y0) / 6; + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y + $dy)); + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y - $dy)); + $this->_canvas->polygon(array('connect' => false)); + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (Image_Graph_Plot::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + $data = array(); + while ($point = $dataset->_next()) { + $data[] = array( + 'X' => $this->_pointX($point), + 'Y' => $this->_pointY($point) + ); + } + + $regression = Image_Graph_Tool::calculateLinearRegression($data); + $this->_getLineStyle($key); + $this->_canvas->line( + array( + 'x0' => $this->_left, + 'y0' => $this->_left * $regression['slope'] + $regression['intersection'], + 'x1' => $this->_right, + 'y1' => $this->_right * $regression['slope'] + $regression['intersection'] + ) + ); + } + $this->_clip(false); + $this->_canvas->endGroup(); + + return true; + } +} + +?> diff --git a/includes/pear/Image/Graph/Plot/Impulse.php b/includes/pear/Image/Graph/Plot/Impulse.php index 64a8207b..ed9e4ad3 100644 --- a/includes/pear/Image/Graph/Plot/Impulse.php +++ b/includes/pear/Image/Graph/Plot/Impulse.php @@ -1,203 +1,204 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Impulse.php,v 1.12 2005/08/08 19:09:18 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Impulse chart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Impulse extends Image_Graph_Plot -{ - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $x = ($x0 + $x1) / 2; - $this->_canvas->line(array('x0' => $x, 'y0' => $y0, 'x1' => $x, 'y1' => $y1)); - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!is_array($this->_dataset)) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - - if ($this->_multiType == 'stacked100pct') { - $total = $this->_getTotals(); - } - $current = array(); - $number = 0; - - $minYaxis = $this->_parent->_getMinimum($this->_axisY); - $maxYaxis = $this->_parent->_getMaximum($this->_axisY); - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - while ($point = $dataset->_next()) { - $x0 = $this->_pointX($point); - if (($this->_multiType == 'stacked') || - ($this->_multiType == 'stacked100pct')) - { - $x = $point['X']; - - if ($point['Y'] >= 0) { - if (!isset($current[$x])) { - $current[$x] = 0; - } - - if ($this->_multiType == 'stacked') { - $p0 = array( - 'X' => $point['X'], - 'Y' => $current[$x] - ); - $p1 = array( - 'X' => $point['X'], - 'Y' => $current[$x] + $point['Y'] - ); - } else { - $p0 = array( - 'X' => $point['X'], - 'Y' => 100 * $current[$x] / $total['TOTAL_Y'][$x] - ); - $p1 = array( - 'X' => $point['X'], - 'Y' => 100 * ($current[$x] + $point['Y']) / $total['TOTAL_Y'][$x] - ); - } - $current[$x] += $point['Y']; - } else { - if (!isset($currentNegative[$x])) { - $currentNegative[$x] = 0; - } - - $p0 = array( - 'X' => $point['X'], - 'Y' => $currentNegative[$x] - ); - $p1 = array( - 'X' => $point['X'], - 'Y' => $currentNegative[$x] + $point['Y'] - ); - $currentNegative[$x] += $point['Y']; - } - } else { - $p0 = array('X' => $point['X'], 'Y' => 0); - $p1 = $point; - } - - if ((($minY = min($p0['Y'], $p1['Y'])) < $maxYaxis) && - (($maxY = max($p0['Y'], $p1['Y'])) > $minYaxis) - ) { - $p0['Y'] = $minY; - $p1['Y'] = $maxY; - - if ($p0['Y'] < $minYaxis) { - $p0['Y'] = '#min_pos#'; - } - if ($p1['Y'] > $maxYaxis) { - $p1['Y'] = '#max_neg#'; - } - - $x1 = $this->_pointX($p0); - $y1 = $this->_pointY($p0); - - $x2 = $this->_pointX($p1); - $y2 = $this->_pointY($p1); - - if ($this->_multiType == 'normal') { - $offset = 5*$number; - $x1 += $offset; - $x2 += $offset; - } - - $ID = $point['ID']; - if (($ID === false) && (count($this->_dataset) > 1)) { - $ID = $key; - } - $this->_getLineStyle($key); - $this->_canvas->line( - $this->_mergeData( - $point, - array( - 'x0' => $x1, - 'y0' => $y1, - 'x1' => $x2, - 'y1' => $y2 - ) - ) - ); - } - } - $number++; - } - unset($keys); - $this->_drawMarker(); - $this->_canvas->endGroup(); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Impulse.php,v 1.13 2005/11/27 22:21:17 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Impulse chart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Impulse extends Image_Graph_Plot +{ + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $x = ($x0 + $x1) / 2; + $this->_canvas->line(array('x0' => $x, 'y0' => $y0, 'x1' => $x, 'y1' => $y1)); + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!is_array($this->_dataset)) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + + if ($this->_multiType == 'stacked100pct') { + $total = $this->_getTotals(); + } + $current = array(); + $number = 0; + + $minYaxis = $this->_parent->_getMinimum($this->_axisY); + $maxYaxis = $this->_parent->_getMaximum($this->_axisY); + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + while ($point = $dataset->_next()) { + $x0 = $this->_pointX($point); + if (($this->_multiType == 'stacked') || + ($this->_multiType == 'stacked100pct')) + { + $x = $point['X']; + + if ($point['Y'] >= 0) { + if (!isset($current[$x])) { + $current[$x] = 0; + } + + if ($this->_multiType == 'stacked') { + $p0 = array( + 'X' => $point['X'], + 'Y' => $current[$x] + ); + $p1 = array( + 'X' => $point['X'], + 'Y' => $current[$x] + $point['Y'] + ); + } else { + $p0 = array( + 'X' => $point['X'], + 'Y' => 100 * $current[$x] / $total['TOTAL_Y'][$x] + ); + $p1 = array( + 'X' => $point['X'], + 'Y' => 100 * ($current[$x] + $point['Y']) / $total['TOTAL_Y'][$x] + ); + } + $current[$x] += $point['Y']; + } else { + if (!isset($currentNegative[$x])) { + $currentNegative[$x] = 0; + } + + $p0 = array( + 'X' => $point['X'], + 'Y' => $currentNegative[$x] + ); + $p1 = array( + 'X' => $point['X'], + 'Y' => $currentNegative[$x] + $point['Y'] + ); + $currentNegative[$x] += $point['Y']; + } + } else { + $p0 = array('X' => $point['X'], 'Y' => 0); + $p1 = $point; + } + + if ((($minY = min($p0['Y'], $p1['Y'])) < $maxYaxis) && + (($maxY = max($p0['Y'], $p1['Y'])) > $minYaxis) + ) { + $p0['Y'] = $minY; + $p1['Y'] = $maxY; + + if ($p0['Y'] < $minYaxis) { + $p0['Y'] = '#min_pos#'; + } + if ($p1['Y'] > $maxYaxis) { + $p1['Y'] = '#max_neg#'; + } + + $x1 = $this->_pointX($p0); + $y1 = $this->_pointY($p0); + + $x2 = $this->_pointX($p1); + $y2 = $this->_pointY($p1); + + if ($this->_multiType == 'normal') { + $offset = 5*$number; + $x1 += $offset; + $x2 += $offset; + } + + $ID = $point['ID']; + if (($ID === false) && (count($this->_dataset) > 1)) { + $ID = $key; + } + $this->_getLineStyle($key); + $this->_canvas->line( + $this->_mergeData( + $point, + array( + 'x0' => $x1, + 'y0' => $y1, + 'x1' => $x2, + 'y1' => $y2 + ) + ) + ); + } + } + $number++; + } + unset($keys); + $this->_drawMarker(); + $this->_clip(false); + $this->_canvas->endGroup(); + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Line.php b/includes/pear/Image/Graph/Plot/Line.php index f9b715a3..cfc89780 100644 --- a/includes/pear/Image/Graph/Plot/Line.php +++ b/includes/pear/Image/Graph/Plot/Line.php @@ -1,164 +1,171 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Line.php,v 1.12 2005/08/08 19:09:18 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Linechart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Line extends Image_Graph_Plot -{ - - /** - * Gets the fill style of the element - * - * @return int A GD filestyle representing the fill style - * @see Image_Graph_Fill - * @access private - */ - function _getFillStyle($ID = false) - { - return IMG_COLOR_TRANSPARENT; - } - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $y = ($y0 + $y1) / 2; - $dx = abs($x1 - $x0) / 3; - $dy = abs($y1 - $y0) / 5; - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y)); - $this->_canvas->addVertex(array('x' => $x0 + $dx, 'y' => $y - $dy * 2)); - $this->_canvas->addVertex(array('x' => $x1 - $dx, 'y' => $y + $dy)); - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y - $dy)); - $this->_canvas->polygon(array('connect' => false)); - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - if (!is_array($this->_dataset)) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - reset($this->_dataset); - - if ($this->_multiType == 'stacked100pct') { - $total = $this->_getTotals(); - } - - $p1 = false; - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - $numPoints = 0; - while ($point = $dataset->_next()) { - if (($this->_multiType == 'stacked') || - ($this->_multiType == 'stacked100pct')) - { - $x = $point['X']; - if (!isset($current[$x])) { - $current[$x] = 0; - } - if ($this->_multiType == 'stacked') { - $py = $current[$x] + $point['Y']; - } else { - $py = 100 * ($current[$x] + $point['Y']) / $total['TOTAL_Y'][$x]; - } - $current[$x] += $point['Y']; - $point['Y'] = $py; - } - - if ($point['Y'] === null) { - if ($numPoints > 1) { - $this->_getLineStyle($key); - $this->_canvas->polygon(array('connect' => false, 'map_vertices' => true)); - } - $numPoints = 0; - } else { - $p2['X'] = $this->_pointX($point); - $p2['Y'] = $this->_pointY($point); - - $this->_canvas->addVertex( - $this->_mergeData( - $point, - array('x' => $p2['X'], 'y' => $p2['Y']) - ) - ); - $numPoints++; - } - } - if ($numPoints > 1) { - $this->_getLineStyle($key); - $this->_canvas->polygon(array('connect' => false, 'map_vertices' => true)); - } - } - unset($keys); - $this->_drawMarker(); - $this->_canvas->endGroup(); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Line.php,v 1.15 2006/03/02 12:37:37 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Linechart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Line extends Image_Graph_Plot +{ + + /** + * Gets the fill style of the element + * + * @return int A GD filestyle representing the fill style + * @see Image_Graph_Fill + * @access private + */ + function _getFillStyle($ID = false) + { + return IMG_COLOR_TRANSPARENT; + } + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $y = ($y0 + $y1) / 2; + $dx = abs($x1 - $x0) / 3; + $dy = abs($y1 - $y0) / 5; + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y)); + $this->_canvas->addVertex(array('x' => $x0 + $dx, 'y' => $y - $dy * 2)); + $this->_canvas->addVertex(array('x' => $x1 - $dx, 'y' => $y + $dy)); + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y - $dy)); + $this->_canvas->polygon(array('connect' => false)); + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + if (!is_array($this->_dataset)) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + reset($this->_dataset); + + if ($this->_multiType == 'stacked100pct') { + $total = $this->_getTotals(); + } + + $p1 = false; + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + $numPoints = 0; + while ($point = $dataset->_next()) { + if (($this->_multiType == 'stacked') || + ($this->_multiType == 'stacked100pct')) + { + $x = $point['X']; + if (!isset($current[$x])) { + $current[$x] = 0; + } + if ($this->_multiType == 'stacked') { + $py = $current[$x] + $point['Y']; + } else { + $py = 100 * ($current[$x] + $point['Y']) / $total['TOTAL_Y'][$x]; + } + $current[$x] += $point['Y']; + $point['Y'] = $py; + } + + if ($point['Y'] === null) { + if ($numPoints > 1) { + $this->_getLineStyle($key); + $this->_canvas->polygon(array('connect' => false, 'map_vertices' => true)); + } + else { + $this->_canvas->reset(); + } + $numPoints = 0; + } else { + $p2['X'] = $this->_pointX($point); + $p2['Y'] = $this->_pointY($point); + + $this->_canvas->addVertex( + $this->_mergeData( + $point, + array('x' => $p2['X'], 'y' => $p2['Y']) + ) + ); + $numPoints++; + } + } + if ($numPoints > 1) { + $this->_getLineStyle($key); + $this->_canvas->polygon(array('connect' => false, 'map_vertices' => true)); + } + else { + $this->_canvas->reset(); + } + } + unset($keys); + $this->_drawMarker(); + $this->_clip(false); + $this->_canvas->endGroup(); + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Odo.php b/includes/pear/Image/Graph/Plot/Odo.php index 4216b450..0a567a36 100644 --- a/includes/pear/Image/Graph/Plot/Odo.php +++ b/includes/pear/Image/Graph/Plot/Odo.php @@ -1,717 +1,719 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Odo.php,v 1.2 2005/09/30 18:59:19 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Include file Image/Graph/Tool.php - */ -require_once 'Image/Graph/Tool.php'; - -/** - * 2D Odochart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Maxime Delorme - * @copyright Copyright (C) 2005 Maxime Delorme - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Odo extends Image_Graph_Plot -{ - /** - * the percent of the radius of the chart that will be use as the width of the range - * @access private - * @var int - */ - var $_radiusPercent = 50; - - /** - * the minimun value of the chart or the start value - * @access private - * @var int - */ - var $_value_min = 0; - - /** - * the maximum value of the chart or the end value - * @access private - * @var int - */ - var $_value_max = 100; - - /** - * the start angle - * @access private - * @var int - */ - var $_deg_offset = 135; - - /** - * the angle of the chart , the length of the chart - * 180 min a half circle - * @access private - * @var int - */ - var $_deg_width = 270; - - /** - * the length of the big ticks - * the small ones will be half ot it, the values 160% of it - * 180 min a half circle - * @access private - * @var int - */ - var $_tickLength = 14; - - /** - * how many small ticks a big tick appears - * the small ticks appear every 6° - * so with the default value of 5, every 30° there is a value and a big tick - * 180 min a half circle - * @access private - * @var int - */ - var $_axisTicks = 5; - - /** - * Arrow marker - * @access private - * @var Image_Graph_Marker - */ - var $_arrowMarker; - - /** - * Range marker fill style - * @access private - * @var Image_Graph_Fill - */ - var $_rangeFillStyle = null; - - /** - * The width of the arrow - * @access private - * @var int - */ - var $_arrowWidth = 5; - - /** - * The length of the arrow - * @access private - * @var int - */ - var $_arrowLength = 80; - - /** - * The radius of the plot - * @access private - * @var int - */ - var $_radius = false; - - /** - * The total Y - * @access private - * @var int - */ - var $_totalY = false; - - /** - * Center X of odometer "circle" - * @access private - * @var int - */ - var $_centerX = false; - - /** - * Center y of odometer "circle" - * @access private - * @var int - */ - var $_centerY = false; - - /** - * Plot_Odo [Constructor] - * - * dataset with one data per arrow - * @param Image_Graph_Dataset $dataset The data set (value containter) to - * plot or an array of datasets - * {@link Image_Graph_Legend} - */ - function Image_Graph_Plot_Odo(&$dataset) - { - parent::Image_Graph_Plot($dataset); - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - if (isset($min)) { - $min = min($dataset->minimumY(), $min); - } - else { - $min = $dataset->minimumY(); - } - if (isset($max)) { - $max = max($dataset->maximumY(), $max); - } - else { - $max = $dataset->maximumY(); - } - } - $this->_value_min = $min; - $this->_value_max = $max; - } - - /** - * Set the center of the odometer - * - * @param int $centerX The center x point - * @param int $centerY The center y point - */ - function setCenter($centerX, $centerY) - { - $this->_centerX = $centerX; - $this->_centerY = $centerY; - } - - /** - * Convert a value to the angle position onto the odometer - * - * @access private - * @param int $value the value to convert - * @return int the angle'position onto the odometer - */ - function _value2angle($value) - { - return $this->_deg_width * (($value - $this->_value_min) / $this->_totalY) + $this->_deg_offset; - } - - /** - * set some internal var - * - * @access private - */ - function _initialize() - { - $v1 = $this->_deg_offset; - $v2 = $this->_deg_offset + $this->_deg_width; - - $dimensions = Image_Graph_Tool::calculateArcDimensionAndCenter($v1, $v2); - - $radiusX = ($this->width() / 2) / $dimensions['rx']; - $radiusY = ($this->height() / 2) / $dimensions['ry']; - - $this->_radius = min($radiusX, $radiusY); - - if ($this->_marker) { - $this->_radius = $this->_radius * 0.85; - } - - //the center of the plot - if ($this->_centerX === false) { - $this->_centerX = (int) (($this->_left + $this->_right) / 2) + - $this->_radius * ($dimensions['cx'] - 0.5); - } - - if ($this->_centerY === false) { - $this->_centerY = (int) (($this->_top + $this->_bottom) / 2) + - $this->_radius * ($dimensions['cy'] - 0.5); - } - - //the max range - $this->_totalY = abs($this->_value_max - $this->_value_min); - } - - /** - * set min and max value of the range - * - * @access public - * @param integer $value_min the minimun value of the chart or the start value - * @param integer $value_max the maximum value of the chart or the end value - */ - function setRange($value_min, $value_max) - { - $this->_value_min = $value_min; - $this->_value_max = $value_max; - } - - /** - * Set start's angle and amplitude of the chart - * - * @access public - * @param integer $deg_offset the start angle - * @param integer $deg_width the angle of the chart (the length) - */ - function setAngles($deg_offset, $deg_width) - { - $this->_deg_offset = min(360, abs($deg_offset)); - $this->_deg_width = min(360, abs($deg_width)); - } - - /** - * set the width of the chart - * - * @access public - * @param string $radius_percent a value between 0 and 100 - */ - function setRadiusWidth($radius_percent) - { - $this->_radiusPercent = $radius_percent; - } - - /** - * set the width and length of the arrow (in percent of the total plot "radius") - * - * @param int length The length in percent - * @param int width The width in percent - */ - function setArrowSize($length, $width) - { - $this->_arrowWidth = max(0, min(100, $width)); - $this->_arrowLength = max(0, min(100, $length)); - } - - /** - * Set the arrow marker - * @param Image_Graph_Marker $marker The marker to set for arrow marker - */ - function setArrowMarker(&$marker) - { - $this->_arrowMarker =& $marker; - } - - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - $this->_initialize(); - $this->_drawRange(); - $this->_drawAxis(); - $this->_drawArrow(); - $this->_drawMarker(); - return true; - } - - /** - * set the length of the ticks - * - * @access public - * @param string $radius_percent a value between 0 and 100 - */ - function setTickLength($radius) - { - $this->_tickLength = $radius; - } - - /** - * set the length of the ticks - * - * @access public - * @param string $radius_percent a value between 0 and 100 - */ - function setAxisTicks($int) - { - $this->_axisTicks = $int; - } - - /** - * Draw the outline and the axis - * - * @access private - */ - function _drawAxis() - { - //draw outline - $this->_getLineStyle(); - $this->_canvas->pieslice( - array( - 'x' => $this->_centerX, - 'y' => $this->_centerY, - 'rx' => $this->_radius, - 'ry' => $this->_radius, - 'v1' => $this->_deg_offset, - 'v2' => $this->_deg_offset+$this->_deg_width, - 'srx' => $this->_radius * (1 - $this->_radiusPercent / 100), - 'sry' => $this->_radius * (1 - $this->_radiusPercent / 100) - ) - ); - - //step for every 6° - $step = (int) ($this->_totalY / $this->_deg_width * 6); - $value = $this->_value_min; - $i = 0; - while ($value <= $this->_value_max) { - $angle = $this->_value2angle($value); - - $cos = cos(deg2rad($angle)); - $sin = sin(deg2rad($angle)); - $point = array('Y' => $value); - $point['AX'] = $cos; - $point['AY'] = $sin; - $point['LENGTH'] = 1; - $x = $this->_centerX + $this->_radius * $cos; - $y = $this->_centerY + $this->_radius * $sin; - $deltaX = - $cos * $this->_tickLength ; - $deltaY = - $sin * $this->_tickLength ; - $this->_getLineStyle(); - if(($i % $this->_axisTicks) == 0){ - $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $deltaX, 'y1' => $y + $deltaY)); - if ($this->_arrowMarker) { - $this->_arrowMarker->_drawMarker($x + $deltaX * 1.6, $y + $deltaY *1.6, $point); - } - } else { - $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $deltaX * 0.5, 'y1' => $y + $deltaY * 0.5)); - } - $i++; - $value += $step; - } - - } - - /** - * Set the line style of the arrows - * - * @param Image_Graph_Line $lineStyle The line style of the Arrow - * @see Image_Graph_Line - * @access public - */ - function setArrowLineStyle($lineStyle) - { - $this->_arrowLineStyle = &$lineStyle; - } - - /** - * Set the fillstyle of the arrows - * - * @param Image_Graph_Fill $fillStyle The fill style of the arrows - * @see Image_Graph_Fill - * @access public - */ - function setArrowFillStyle($fillStyle) - { - $this->_arrowFillStyle = &$fillStyle; - } - - /** - * Draw the arrows - * - * @access private - */ - function _drawArrow() - { - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - $this->setLineStyle($this->_arrowLineStyle); - $this->setFillStyle($this->_arrowFillStyle); - while ($point = $dataset->_next()) { - $ID = $point['ID']; - $this->_getFillStyle($ID); - $this->_getLineStyle($ID); - $deg = $this->_value2angle($point['Y']); - list($xr,$yr) = Image_Graph_Tool::rotate($this->_centerX + $this->_arrowLength * $this->_radius / 100, $this->_centerY, $this->_centerX, $this->_centerY, $deg); - $this->_canvas->addVertex(array('x' => $xr, 'y' => $yr)); - list($xr,$yr) = Image_Graph_Tool::rotate($this->_centerX, $this->_centerY - $this->_arrowWidth * $this->_radius/100, $this->_centerX, $this->_centerY, $deg); - $this->_canvas->addVertex(array('x' => $xr, 'y' => $yr)); - list($xr,$yr) = Image_Graph_Tool::rotate($this->_centerX - $this->_arrowWidth * $this->_radius / 100, $this->_centerY, $this->_centerX, $this->_centerY, $deg); - $this->_canvas->addVertex(array('x' => $xr, 'y' => $yr)); - list($xr,$yr) = Image_Graph_Tool::rotate($this->_centerX,$this->_centerY + $this->_arrowWidth * $this->_radius / 100, $this->_centerX, $this->_centerY, $deg); - $this->_canvas->addVertex(array('x' => $xr, 'y' => $yr)); - $this->_canvas->polygon(array('connect' => true)); - } - } - } - - /** - * Calculate marker point data - * - * @param array $point The point to calculate data for - * @param array $nextPoint The next point - * @param array $prevPoint The previous point - * @param array $totals The pre-calculated totals, if needed - * @return array An array containing marker point data - * @access private - */ - function _getMarkerData($point, $nextPoint, $prevPoint, &$totals) - { - $point = parent::_getMarkerData($point, $nextPoint, $prevPoint, $totals); - - $point['ANGLE'] = $this->_value2angle($point['Y']); - - $point['ANG_X'] = cos(deg2rad($point['ANGLE'])); - $point['ANG_Y'] = sin(deg2rad($point['ANGLE'])); - - $point['AX'] = -$point['ANG_X']; - $point['AY'] = -$point['ANG_Y']; - - $point['LENGTH'] = 2.5; //$radius; - - $point['MARKER_X'] = $totals['CENTER_X'] + - $totals['ODO_RADIUS'] * $point['ANG_X']; - $point['MARKER_Y'] = $totals['CENTER_Y'] + - $totals['ODO_RADIUS'] * $point['ANG_Y']; - - return $point; - } - - /** - * Draws markers of the arrows on the canvas - * - * @access private - */ - function _drawMarker() - { - - if ($this->_marker) { - $this->_marker->_radius += $this->_radius / 2; - $totals = $this->_getTotals(); - - $totals['CENTER_X'] = $this->_centerX; - $totals['CENTER_Y'] = $this->_centerY; - - - /* $keys = array_keys($this->_dataset); - foreach ($keys as $key) { */ - $dataset =& $this->_dataset[0]; - - $totals['RADIUS0'] = false; - $totals['ODO_RADIUS'] = 1.1 * $this->_radius * $this->_arrowLength / 100; - $totals['ALL_SUM_Y'] = $this->_totalY; - - $dataset->_reset(); - while ($point = $dataset->_next()) { - if ((!is_object($this->_dataSelector)) || - ($this->_dataSelector->select($point)) - ) { - $point = $this->_getMarkerData( - $point, - false, - false, - $totals - ); - if (is_array($point)) { - $this->_marker->_drawMarker( - $point['MARKER_X'], - $point['MARKER_Y'], - $point - ); - } - } - } - /* } - unset($keys); */ - } - } - - /** - * Set range - * - * dataset with two data start and end value of the range - * @param Image_Graph_Dataset $dataset The data set (value containter) to - * plot or an array of datasets - * - */ - function addRangeMarker($min, $max, $id = false) - { - $this->_range[] = - array( - 'min' => max($this->_value_min, min($min, $max)), - 'max' => min($this->_value_max, max($min, $max)), - 'id' => $id - ); - } - - /** - * Set the fillstyle of the ranges - * - * @param Image_Graph_Fill $fillStyle The fill style of the range - * @see Image_Graph_Fill - * @access public - */ - function &setRangeMarkerFillStyle(&$rangeMarkerFillStyle) - { - $this->_rangeFillStyle = $rangeMarkerFillStyle; - } - - /** - * Draw the ranges - * - * @access private - */ - function _drawRange() - { - if($this->_range){ - $radius0 = $this->_radius * (1 - $this->_radiusPercent/100); - foreach ($this->_range as $range) { - $angle1 = $this->_value2angle($range['min']); - $angle2 = $this->_value2angle($range['max']); - - if (is_object($this->_rangeFillStyle)) { - $this->_canvas->setFill($this->_rangeFillStyle->_getFillStyle($range['id'])); - } elseif ($this->_rangeFillStyle != null) { - $this->_canvas->setFill($this->_rangeFillStyle); - } - $this->_getLineStyle(); - $this->_canvas->Pieslice( - array( - 'x' => $this->_centerX, - 'y' => $this->_centerY, - 'rx' => $this->_radius, - 'ry' => $this->_radius, - 'v1' => $angle1, - 'v2' => $angle2, - 'srx' => $radius0, - 'sry' => $radius0 - ) - ); - } - } - } - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $dx = abs($x1 - $x0) / 4; - $this->_canvas->addVertex(array('x' => $x0 + $dx , 'y' => $y1)); - $this->_canvas->addVertex(array('x' => ($x0 + $x1) / 2, 'y' => $y0 )); - $this->_canvas->addVertex(array('x' => $x1 - $dx , 'y' => $y1)); - $this->_canvas->polygon(array('connect' => true)); - } - - /** - * Draw a sample for use with legend - * - * @param array $param The parameters for the legend - * @access private - */ - function _legendSample(&$param) - { - if (is_array($this->_dataset)) { - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - $totals = $this->_getTotals(); - $totals['CENTER_X'] = (int) (($this->_left + $this->_right) / 2); - $totals['CENTER_Y'] = (int) (($this->_top + $this->_bottom) / 2); - $totals['RADIUS'] = min($this->height(), $this->width()) * 0.75 * 0.5; - $totals['CURRENT_Y'] = 0; - - if (is_a($this->_fillStyle, "Image_Graph_Fill")) { - $this->_fillStyle->_reset(); - } - - $count = 0; - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $count++; - - $dataset->_reset(); - while ($point = $dataset->_next()) { - $caption = $point['X']; - - $this->_canvas->setFont($param['font']); - $width = 20 + $param['width'] + $this->_canvas->textWidth($caption); - $param['maxwidth'] = max($param['maxwidth'], $width); - $x2 = $param['x'] + $width; - $y2 = $param['y'] + $param['height'] + 5; - - if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { - $param['y'] = $param['top']; - $param['x'] = $x2; - $y2 = $param['y'] + $param['height']; - } elseif ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) == 0) && ($x2 > $param['right'])) { - $param['x'] = $param['left']; - $param['y'] = $y2; - $x2 = $param['x'] + 20 + $param['width'] + $this->_canvas->textWidth($caption); - } - - $x = $x0 = $param['x']; - $y = $param['y']; - $y0 = $param['y'] - $param['height'] / 2; - $x1 = $param['x'] + $param['width']; - $y1 = $param['y'] + $param['height'] / 2; - - if (!isset($param['simulate'])) { - $this->_getFillStyle($point['ID']); - $this->_getLineStyle($point['ID']); - $this->_drawLegendSample($x0, $y0, $x1, $y1); - - if (($this->_marker) && ($dataset) && ($param['show_marker'])) { - $prevPoint = $dataset->_nearby(-2); - $nextPoint = $dataset->_nearby(); - - $p = $this->_getMarkerData($point, $nextPoint, $prevPoint, $totals); - if (is_array($point)) { - $p['MARKER_X'] = $x+$param['width'] / 2; - $p['MARKER_Y'] = $y; - unset ($p['AVERAGE_Y']); - $this->_marker->_drawMarker($p['MARKER_X'], $p['MARKER_Y'], $p); - } - } - $this->write($x + $param['width'] + 10, $y, $caption, IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, $param['font']); - } - - if (($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { - $param['y'] = $y2; - } else { - $param['x'] = $x2; - } - } - } - unset($keys); - $this->_canvas->endGroup(); - } - } -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Odo.php,v 1.3 2005/11/27 22:21:16 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Include file Image/Graph/Tool.php + */ +require_once 'Image/Graph/Tool.php'; + +/** + * 2D Odochart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Maxime Delorme + * @copyright Copyright (C) 2005 Maxime Delorme + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Odo extends Image_Graph_Plot +{ + /** + * the percent of the radius of the chart that will be use as the width of the range + * @access private + * @var int + */ + var $_radiusPercent = 50; + + /** + * the minimun value of the chart or the start value + * @access private + * @var int + */ + var $_value_min = 0; + + /** + * the maximum value of the chart or the end value + * @access private + * @var int + */ + var $_value_max = 100; + + /** + * the start angle + * @access private + * @var int + */ + var $_deg_offset = 135; + + /** + * the angle of the chart , the length of the chart + * 180 min a half circle + * @access private + * @var int + */ + var $_deg_width = 270; + + /** + * the length of the big ticks + * the small ones will be half ot it, the values 160% of it + * 180 min a half circle + * @access private + * @var int + */ + var $_tickLength = 14; + + /** + * how many small ticks a big tick appears + * the small ticks appear every 6° + * so with the default value of 5, every 30° there is a value and a big tick + * 180 min a half circle + * @access private + * @var int + */ + var $_axisTicks = 5; + + /** + * Arrow marker + * @access private + * @var Image_Graph_Marker + */ + var $_arrowMarker; + + /** + * Range marker fill style + * @access private + * @var Image_Graph_Fill + */ + var $_rangeFillStyle = null; + + /** + * The width of the arrow + * @access private + * @var int + */ + var $_arrowWidth = 5; + + /** + * The length of the arrow + * @access private + * @var int + */ + var $_arrowLength = 80; + + /** + * The radius of the plot + * @access private + * @var int + */ + var $_radius = false; + + /** + * The total Y + * @access private + * @var int + */ + var $_totalY = false; + + /** + * Center X of odometer "circle" + * @access private + * @var int + */ + var $_centerX = false; + + /** + * Center y of odometer "circle" + * @access private + * @var int + */ + var $_centerY = false; + + /** + * Plot_Odo [Constructor] + * + * dataset with one data per arrow + * @param Image_Graph_Dataset $dataset The data set (value containter) to + * plot or an array of datasets + * {@link Image_Graph_Legend} + */ + function Image_Graph_Plot_Odo(&$dataset) + { + parent::Image_Graph_Plot($dataset); + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + if (isset($min)) { + $min = min($dataset->minimumY(), $min); + } + else { + $min = $dataset->minimumY(); + } + if (isset($max)) { + $max = max($dataset->maximumY(), $max); + } + else { + $max = $dataset->maximumY(); + } + } + $this->_value_min = $min; + $this->_value_max = $max; + } + + /** + * Set the center of the odometer + * + * @param int $centerX The center x point + * @param int $centerY The center y point + */ + function setCenter($centerX, $centerY) + { + $this->_centerX = $centerX; + $this->_centerY = $centerY; + } + + /** + * Convert a value to the angle position onto the odometer + * + * @access private + * @param int $value the value to convert + * @return int the angle'position onto the odometer + */ + function _value2angle($value) + { + return $this->_deg_width * (($value - $this->_value_min) / $this->_totalY) + $this->_deg_offset; + } + + /** + * set some internal var + * + * @access private + */ + function _initialize() + { + $v1 = $this->_deg_offset; + $v2 = $this->_deg_offset + $this->_deg_width; + + $dimensions = Image_Graph_Tool::calculateArcDimensionAndCenter($v1, $v2); + + $radiusX = ($this->width() / 2) / $dimensions['rx']; + $radiusY = ($this->height() / 2) / $dimensions['ry']; + + $this->_radius = min($radiusX, $radiusY); + + if ($this->_marker) { + $this->_radius = $this->_radius * 0.85; + } + + //the center of the plot + if ($this->_centerX === false) { + $this->_centerX = (int) (($this->_left + $this->_right) / 2) + + $this->_radius * ($dimensions['cx'] - 0.5); + } + + if ($this->_centerY === false) { + $this->_centerY = (int) (($this->_top + $this->_bottom) / 2) + + $this->_radius * ($dimensions['cy'] - 0.5); + } + + //the max range + $this->_totalY = abs($this->_value_max - $this->_value_min); + } + + /** + * set min and max value of the range + * + * @access public + * @param integer $value_min the minimun value of the chart or the start value + * @param integer $value_max the maximum value of the chart or the end value + */ + function setRange($value_min, $value_max) + { + $this->_value_min = $value_min; + $this->_value_max = $value_max; + } + + /** + * Set start's angle and amplitude of the chart + * + * @access public + * @param integer $deg_offset the start angle + * @param integer $deg_width the angle of the chart (the length) + */ + function setAngles($deg_offset, $deg_width) + { + $this->_deg_offset = min(360, abs($deg_offset)); + $this->_deg_width = min(360, abs($deg_width)); + } + + /** + * set the width of the chart + * + * @access public + * @param string $radius_percent a value between 0 and 100 + */ + function setRadiusWidth($radius_percent) + { + $this->_radiusPercent = $radius_percent; + } + + /** + * set the width and length of the arrow (in percent of the total plot "radius") + * + * @param int length The length in percent + * @param int width The width in percent + */ + function setArrowSize($length, $width) + { + $this->_arrowWidth = max(0, min(100, $width)); + $this->_arrowLength = max(0, min(100, $length)); + } + + /** + * Set the arrow marker + * @param Image_Graph_Marker $marker The marker to set for arrow marker + */ + function setArrowMarker(&$marker) + { + $this->_arrowMarker =& $marker; + } + + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + $this->_initialize(); + $this->_drawRange(); + $this->_drawAxis(); + $this->_drawArrow(); + $this->_drawMarker(); + return true; + } + + /** + * set the length of the ticks + * + * @access public + * @param string $radius_percent a value between 0 and 100 + */ + function setTickLength($radius) + { + $this->_tickLength = $radius; + } + + /** + * set the length of the ticks + * + * @access public + * @param string $radius_percent a value between 0 and 100 + */ + function setAxisTicks($int) + { + $this->_axisTicks = $int; + } + + /** + * Draw the outline and the axis + * + * @access private + */ + function _drawAxis() + { + //draw outline + $this->_getLineStyle(); + $this->_canvas->pieslice( + array( + 'x' => $this->_centerX, + 'y' => $this->_centerY, + 'rx' => $this->_radius, + 'ry' => $this->_radius, + 'v1' => $this->_deg_offset, + 'v2' => $this->_deg_offset+$this->_deg_width, + 'srx' => $this->_radius * (1 - $this->_radiusPercent / 100), + 'sry' => $this->_radius * (1 - $this->_radiusPercent / 100) + ) + ); + + //step for every 6° + $step = (int) ($this->_totalY / $this->_deg_width * 6); + $value = $this->_value_min; + $i = 0; + while ($value <= $this->_value_max) { + $angle = $this->_value2angle($value); + + $cos = cos(deg2rad($angle)); + $sin = sin(deg2rad($angle)); + $point = array('Y' => $value); + $point['AX'] = $cos; + $point['AY'] = $sin; + $point['LENGTH'] = 1; + $x = $this->_centerX + $this->_radius * $cos; + $y = $this->_centerY + $this->_radius * $sin; + $deltaX = - $cos * $this->_tickLength ; + $deltaY = - $sin * $this->_tickLength ; + $this->_getLineStyle(); + if(($i % $this->_axisTicks) == 0){ + $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $deltaX, 'y1' => $y + $deltaY)); + if ($this->_arrowMarker) { + $this->_arrowMarker->_drawMarker($x + $deltaX * 1.6, $y + $deltaY *1.6, $point); + } + } else { + $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $deltaX * 0.5, 'y1' => $y + $deltaY * 0.5)); + } + $i++; + $value += $step; + } + + } + + /** + * Set the line style of the arrows + * + * @param Image_Graph_Line $lineStyle The line style of the Arrow + * @see Image_Graph_Line + * @access public + */ + function setArrowLineStyle($lineStyle) + { + $this->_arrowLineStyle = &$lineStyle; + } + + /** + * Set the fillstyle of the arrows + * + * @param Image_Graph_Fill $fillStyle The fill style of the arrows + * @see Image_Graph_Fill + * @access public + */ + function setArrowFillStyle($fillStyle) + { + $this->_arrowFillStyle = &$fillStyle; + } + + /** + * Draw the arrows + * + * @access private + */ + function _drawArrow() + { + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + $this->setLineStyle($this->_arrowLineStyle); + $this->setFillStyle($this->_arrowFillStyle); + while ($point = $dataset->_next()) { + $ID = $point['ID']; + $this->_getFillStyle($ID); + $this->_getLineStyle($ID); + $deg = $this->_value2angle($point['Y']); + list($xr,$yr) = Image_Graph_Tool::rotate($this->_centerX + $this->_arrowLength * $this->_radius / 100, $this->_centerY, $this->_centerX, $this->_centerY, $deg); + $this->_canvas->addVertex(array('x' => $xr, 'y' => $yr)); + list($xr,$yr) = Image_Graph_Tool::rotate($this->_centerX, $this->_centerY - $this->_arrowWidth * $this->_radius/100, $this->_centerX, $this->_centerY, $deg); + $this->_canvas->addVertex(array('x' => $xr, 'y' => $yr)); + list($xr,$yr) = Image_Graph_Tool::rotate($this->_centerX - $this->_arrowWidth * $this->_radius / 100, $this->_centerY, $this->_centerX, $this->_centerY, $deg); + $this->_canvas->addVertex(array('x' => $xr, 'y' => $yr)); + list($xr,$yr) = Image_Graph_Tool::rotate($this->_centerX,$this->_centerY + $this->_arrowWidth * $this->_radius / 100, $this->_centerX, $this->_centerY, $deg); + $this->_canvas->addVertex(array('x' => $xr, 'y' => $yr)); + $this->_canvas->polygon(array('connect' => true)); + } + } + } + + /** + * Calculate marker point data + * + * @param array $point The point to calculate data for + * @param array $nextPoint The next point + * @param array $prevPoint The previous point + * @param array $totals The pre-calculated totals, if needed + * @return array An array containing marker point data + * @access private + */ + function _getMarkerData($point, $nextPoint, $prevPoint, &$totals) + { + $point = parent::_getMarkerData($point, $nextPoint, $prevPoint, $totals); + + $point['ANGLE'] = $this->_value2angle($point['Y']); + + $point['ANG_X'] = cos(deg2rad($point['ANGLE'])); + $point['ANG_Y'] = sin(deg2rad($point['ANGLE'])); + + $point['AX'] = -$point['ANG_X']; + $point['AY'] = -$point['ANG_Y']; + + $point['LENGTH'] = 2.5; //$radius; + + $point['MARKER_X'] = $totals['CENTER_X'] + + $totals['ODO_RADIUS'] * $point['ANG_X']; + $point['MARKER_Y'] = $totals['CENTER_Y'] + + $totals['ODO_RADIUS'] * $point['ANG_Y']; + + return $point; + } + + /** + * Draws markers of the arrows on the canvas + * + * @access private + */ + function _drawMarker() + { + + if ($this->_marker) { + $this->_marker->_radius += $this->_radius / 2; + $totals = $this->_getTotals(); + + $totals['CENTER_X'] = $this->_centerX; + $totals['CENTER_Y'] = $this->_centerY; + + + /* $keys = array_keys($this->_dataset); + foreach ($keys as $key) { */ + $dataset =& $this->_dataset[0]; + + $totals['RADIUS0'] = false; + $totals['ODO_RADIUS'] = 1.1 * $this->_radius * $this->_arrowLength / 100; + $totals['ALL_SUM_Y'] = $this->_totalY; + + $dataset->_reset(); + while ($point = $dataset->_next()) { + if ((!is_object($this->_dataSelector)) || + ($this->_dataSelector->select($point)) + ) { + $point = $this->_getMarkerData( + $point, + false, + false, + $totals + ); + if (is_array($point)) { + $this->_marker->_drawMarker( + $point['MARKER_X'], + $point['MARKER_Y'], + $point + ); + } + } + } + /* } + unset($keys); */ + } + } + + /** + * Set range + * + * dataset with two data start and end value of the range + * @param Image_Graph_Dataset $dataset The data set (value containter) to + * plot or an array of datasets + * + */ + function addRangeMarker($min, $max, $id = false) + { + $this->_range[] = + array( + 'min' => max($this->_value_min, min($min, $max)), + 'max' => min($this->_value_max, max($min, $max)), + 'id' => $id + ); + } + + /** + * Set the fillstyle of the ranges + * + * @param Image_Graph_Fill $fillStyle The fill style of the range + * @see Image_Graph_Fill + * @access public + */ + function &setRangeMarkerFillStyle(&$rangeMarkerFillStyle) + { + $this->_rangeFillStyle = $rangeMarkerFillStyle; + } + + /** + * Draw the ranges + * + * @access private + */ + function _drawRange() + { + if($this->_range){ + $radius0 = $this->_radius * (1 - $this->_radiusPercent/100); + foreach ($this->_range as $range) { + $angle1 = $this->_value2angle($range['min']); + $angle2 = $this->_value2angle($range['max']); + + if (is_object($this->_rangeFillStyle)) { + $this->_canvas->setFill($this->_rangeFillStyle->_getFillStyle($range['id'])); + } elseif ($this->_rangeFillStyle != null) { + $this->_canvas->setFill($this->_rangeFillStyle); + } + $this->_getLineStyle(); + $this->_canvas->Pieslice( + array( + 'x' => $this->_centerX, + 'y' => $this->_centerY, + 'rx' => $this->_radius, + 'ry' => $this->_radius, + 'v1' => $angle1, + 'v2' => $angle2, + 'srx' => $radius0, + 'sry' => $radius0 + ) + ); + } + } + } + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $dx = abs($x1 - $x0) / 4; + $this->_canvas->addVertex(array('x' => $x0 + $dx , 'y' => $y1)); + $this->_canvas->addVertex(array('x' => ($x0 + $x1) / 2, 'y' => $y0 )); + $this->_canvas->addVertex(array('x' => $x1 - $dx , 'y' => $y1)); + $this->_canvas->polygon(array('connect' => true)); + } + + /** + * Draw a sample for use with legend + * + * @param array $param The parameters for the legend + * @access private + */ + function _legendSample(&$param) + { + if (is_array($this->_dataset)) { + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + + $totals = $this->_getTotals(); + $totals['CENTER_X'] = (int) (($this->_left + $this->_right) / 2); + $totals['CENTER_Y'] = (int) (($this->_top + $this->_bottom) / 2); + $totals['RADIUS'] = min($this->height(), $this->width()) * 0.75 * 0.5; + $totals['CURRENT_Y'] = 0; + + if (is_a($this->_fillStyle, "Image_Graph_Fill")) { + $this->_fillStyle->_reset(); + } + + $count = 0; + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $count++; + + $dataset->_reset(); + while ($point = $dataset->_next()) { + $caption = $point['X']; + + $this->_canvas->setFont($param['font']); + $width = 20 + $param['width'] + $this->_canvas->textWidth($caption); + $param['maxwidth'] = max($param['maxwidth'], $width); + $x2 = $param['x'] + $width; + $y2 = $param['y'] + $param['height'] + 5; + + if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { + $param['y'] = $param['top']; + $param['x'] = $x2; + $y2 = $param['y'] + $param['height']; + } elseif ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) == 0) && ($x2 > $param['right'])) { + $param['x'] = $param['left']; + $param['y'] = $y2; + $x2 = $param['x'] + 20 + $param['width'] + $this->_canvas->textWidth($caption); + } + + $x = $x0 = $param['x']; + $y = $param['y']; + $y0 = $param['y'] - $param['height'] / 2; + $x1 = $param['x'] + $param['width']; + $y1 = $param['y'] + $param['height'] / 2; + + if (!isset($param['simulate'])) { + $this->_getFillStyle($point['ID']); + $this->_getLineStyle($point['ID']); + $this->_drawLegendSample($x0, $y0, $x1, $y1); + + if (($this->_marker) && ($dataset) && ($param['show_marker'])) { + $prevPoint = $dataset->_nearby(-2); + $nextPoint = $dataset->_nearby(); + + $p = $this->_getMarkerData($point, $nextPoint, $prevPoint, $totals); + if (is_array($point)) { + $p['MARKER_X'] = $x+$param['width'] / 2; + $p['MARKER_Y'] = $y; + unset ($p['AVERAGE_Y']); + $this->_marker->_drawMarker($p['MARKER_X'], $p['MARKER_Y'], $p); + } + } + $this->write($x + $param['width'] + 10, $y, $caption, IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, $param['font']); + } + + if (($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { + $param['y'] = $y2; + } else { + $param['x'] = $x2; + } + } + } + unset($keys); + $this->_clip(false); + $this->_canvas->endGroup(); + } + } +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Pie.php b/includes/pear/Image/Graph/Plot/Pie.php index 0456c96d..e232993d 100644 --- a/includes/pear/Image/Graph/Plot/Pie.php +++ b/includes/pear/Image/Graph/Plot/Pie.php @@ -1,481 +1,623 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Pie.php,v 1.17 2005/09/29 18:21:24 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * 2D Piechart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Pie extends Image_Graph_Plot -{ - - /** - * The radius of the 'pie' spacing - * @access private - * @var int - */ - var $_radius = 3; - - /** - * Explode pie slices. - * @access private - * @var mixed - */ - var $_explode = false; - - /** - * The starting angle of the plot - * @access private - * @var int - */ - var $_startingAngle = 0; - - /** - * The angle direction (1 = CCW, -1 = CW) - * @access private - * @var int - */ - var $_angleDirection = 1; - - /** - * The diameter of the pie plot - * @access private - * @var int - */ - var $_diameter = false; - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $y = ($y0 + $y1) / 2; - $this->_canvas->pieslice( - array( - 'x' => $x1, - 'y' => $y, - 'rx' => abs($x1 - $x0) / 2, - 'ry' => abs($y1 - $y0) / 2, - 'v1' => 45, - 'v2' => 315 - ) - ); - } - - /** - * Calculate marker point data - * - * @param array $point The point to calculate data for - * @param array $nextPoint The next point - * @param array $prevPoint The previous point - * @param array $totals The pre-calculated totals, if needed - * @return array An array containing marker point data - * @access private - */ - function _getMarkerData($point, $nextPoint, $prevPoint, &$totals) - { - $point = parent::_getMarkerData($point, $nextPoint, $prevPoint, $totals); - - $y = $totals['CURRENT_Y']; - - if ($this->_angleDirection < 0) { - $y = $totals['ALL_SUM_Y'] - $y; - } - - $point['ANGLE'] = 360 * (($y + ($point['Y'] / 2)) / $totals['ALL_SUM_Y']) + $this->_startingAngle; - $totals['CURRENT_Y'] += $point['Y']; - - $point['ANG_X'] = cos(deg2rad($point['ANGLE'])); - $point['ANG_Y'] = sin(deg2rad($point['ANGLE'])); - - $point['AX'] = -10 * $point['ANG_X']; - $point['AY'] = -10 * $point['ANG_Y']; - - if ((isset($totals['ALL_SUM_Y'])) && ($totals['ALL_SUM_Y'] != 0)) { - $point['PCT_MIN_Y'] = $point['PCT_MAX_Y'] = (100 * $point['Y'] / $totals['ALL_SUM_Y']); - } - - $point['LENGTH'] = 10; //$radius; - - $x = $point['X']; - $explodeRadius = 0; - if ((is_array($this->_explode)) && (isset($this->_explode[$x]))) { - $explodeRadius = $this->_explode[$x]; - } elseif (is_numeric($this->_explode)) { - $explodeRadius = $this->_explode; - } - - $point['MARKER_X'] = $totals['CENTER_X'] + - ($totals['RADIUS'] + $explodeRadius) * $point['ANG_X']; - $point['MARKER_Y'] = $totals['CENTER_Y'] + - ($totals['RADIUS'] + $explodeRadius) * $point['ANG_Y']; - - return $point; - } - - /** - * Draws markers on the canvas - * - * @access private - */ - function _drawMarker() - { - - if ($this->_marker) { - $totals = $this->_getTotals(); - - $totals['CENTER_X'] = (int) (($this->_left + $this->_right) / 2); - $totals['CENTER_Y'] = (int) (($this->_top + $this->_bottom) / 2); - - $totals['CURRENT_Y'] = 0; - $number = 0; - - $diameter = $this->_getDiameter(); - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - - if (count($this->_dataset) == 1) { - $totals['RADIUS0'] = false; - $totals['RADIUS'] = $diameter / 2; - } else { - $dr = $diameter / (2 * count($this->_dataset)); - - $totals['RADIUS0'] = $number * $dr + ($number > 0 ? $this->_radius : 0); - $totals['RADIUS'] = ($number + 1) * $dr; - } - - $totals['ALL_SUM_Y'] = 0; - $totals['CURRENT_Y'] = 0; - $dataset->_reset(); - while ($point = $dataset->_next()) { - $totals['ALL_SUM_Y'] += $point['Y']; - } - - $dataset->_reset(); - $currentY = 0; - while ($point = $dataset->_next()) { - if ((!is_object($this->_dataSelector)) || - ($this->_dataSelector->select($point)) - ) { - $point = $this->_getMarkerData( - $point, - false, - false, - $totals - ); - if (is_array($point)) { - $this->_marker->_drawMarker( - $point['MARKER_X'], - $point['MARKER_Y'], - $point - ); - } - } - } - $number++; - } - unset($keys); - } - } - - /** - * Explodes a piece of this pie chart - * - * @param int $explode Radius to explode with (or an array) - * @param string $x The 'x' value to explode or omitted - */ - function explode($explode, $x = false) - { - if ($x === false) { - $this->_explode = $explode; - } else { - $this->_explode[$x] = $explode; - } - } - - /** - * Set the starting angle of the plot - * - * East is 0 degrees - * South is 90 degrees - * West is 180 degrees - * North is 270 degrees - * - * It is also possible to specify the direction of the plot angles (i.e. clockwise 'cw' or - * counterclockwise 'ccw') - */ - function setStartingAngle($angle = 0, $direction = 'ccw') - { - $this->_startingAngle = ($angle % 360); - $this->_angleDirection = ($direction == 'ccw' ? 1 : -1); - } - - /** - * Set the diameter of the pie plot (i.e. the number of pixels the - * pie plot should be across) - * - * Use 'max' for the maximum possible diameter - * - * Use negative values for the maximum possible - minus this value (fx -2 - * to leave 1 pixel at each side) - * - * @param mixed @diameter The number of pixels - */ - function setDiameter($diameter) - { - $this->_diameter = $diameter; - } - - /** - * Get the diameter of the plot - * @return int The number of pixels the diameter is - * @access private - */ - function _getDiameter() - { - $diameter = 0; - if ($this->_diameter === false) { - $diameter = min($this->height(), $this->width()) * 0.75; - } - else { - if ($this->_diameter === 'max') { - $diameter = min($this->height(), $this->width()); - } - elseif ($this->_diameter < 0) { - $diameter = min($this->height(), $this->width()) + $this->_diameter; - } else { - $diameter = $this->_diameter; - } - } - return $diameter; - } - - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - $number = 0; - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - - $totalY = 0; - $dataset->_reset(); - while ($point = $dataset->_next()) { - $totalY += $point['Y']; - } - - $centerX = (int) (($this->_left + $this->_right) / 2); - $centerY = (int) (($this->_top + $this->_bottom) / 2); - $diameter = $this->_getDiameter(); - if ($this->_angleDirection < 0) { - $currentY = $totalY; - } else { - $currentY = 0; //rand(0, 100)*$totalY/100; - } - $dataset->_reset(); - - if (count($this->_dataset) == 1) { - $radius0 = false; - $radius1 = $diameter / 2; - } else { - $dr = $diameter / (2 * count($this->_dataset)); - - $radius0 = $number * $dr + ($number > 0 ? $this->_radius : 0); - $radius1 = ($number + 1) * $dr; - } - - while ($point = $dataset->_next()) { - $angle1 = 360 * ($currentY / $totalY) + $this->_startingAngle; - $currentY += $this->_angleDirection * $point['Y']; - $angle2 = 360 * ($currentY / $totalY) + $this->_startingAngle; - - $x = $point['X']; - $id = $point['ID']; - - $dX = 0; - $dY = 0; - $explodeRadius = 0; - if ((is_array($this->_explode)) && (isset($this->_explode[$x]))) { - $explodeRadius = $this->_explode[$x]; - } elseif (is_numeric($this->_explode)) { - $explodeRadius = $this->_explode; - } - - if ($explodeRadius > 0) { - $dX = $explodeRadius * cos(deg2rad(($angle1 + $angle2) / 2)); - $dY = $explodeRadius * sin(deg2rad(($angle1 + $angle2) / 2)); - } - - $ID = $point['ID']; - $this->_getFillStyle($ID); - $this->_getLineStyle($ID); - $this->_canvas->pieslice( - $this->_mergeData( - $point, - array( - 'x' => $centerX + $dX, - 'y' => $centerY + $dY, - 'rx' => $radius1, - 'ry' => $radius1, - 'v1' => $angle1, - 'v2' => $angle2, - 'srx' => $radius0, - 'sry' => $radius0 - ) - ) - ); - } - $number++; - } - unset($keys); - $this->_drawMarker(); - return true; - } - - /** - * Draw a sample for use with legend - * - * @param array $param The parameters for the legend - * @access private - */ - function _legendSample(&$param) - { - if (is_array($this->_dataset)) { - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - $totals = $this->_getTotals(); - $totals['CENTER_X'] = (int) (($this->_left + $this->_right) / 2); - $totals['CENTER_Y'] = (int) (($this->_top + $this->_bottom) / 2); - $totals['RADIUS'] = min($this->height(), $this->width()) * 0.75 * 0.5; - $totals['CURRENT_Y'] = 0; - - if (is_a($this->_fillStyle, "Image_Graph_Fill")) { - $this->_fillStyle->_reset(); - } - - $count = 0; - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $count++; - - $dataset->_reset(); - while ($point = $dataset->_next()) { - $caption = $point['X']; - - $this->_canvas->setFont($param['font']); - $width = 20 + $param['width'] + $this->_canvas->textWidth($caption); - $param['maxwidth'] = max($param['maxwidth'], $width); - $x2 = $param['x'] + $width; - $y2 = $param['y'] + $param['height']+5; - - if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { - $param['y'] = $param['top']; - $param['x'] = $x2; - $y2 = $param['y'] + $param['height']; - } elseif ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) == 0) && ($x2 > $param['right'])) { - $param['x'] = $param['left']; - $param['y'] = $y2; - $x2 = $param['x'] + 20 + $param['width'] + $this->_canvas->textWidth($caption); - } - - $x = $x0 = $param['x']; - $y = $param['y']; - $y0 = $param['y'] - $param['height']/2; - $x1 = $param['x'] + $param['width']; - $y1 = $param['y'] + $param['height']/2; - - if (!isset($param['simulate'])) { - $this->_getFillStyle($point['ID']); - $this->_getLineStyle($point['ID']); - $this->_drawLegendSample($x0, $y0, $x1, $y1); - - if (($this->_marker) && ($dataset) && ($param['show_marker'])) { - $prevPoint = $dataset->_nearby(-2); - $nextPoint = $dataset->_nearby(); - - $p = $this->_getMarkerData($point, $nextPoint, $prevPoint, $totals); - if (is_array($point)) { - $p['MARKER_X'] = $x+$param['width']/2; - $p['MARKER_Y'] = $y; - unset ($p['AVERAGE_Y']); - $this->_marker->_drawMarker($p['MARKER_X'], $p['MARKER_Y'], $p); - } - } - $this->write($x + $param['width'] +10, $y, $caption, IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, $param['font']); - } - - if (($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { - $param['y'] = $y2; - } else { - $param['x'] = $x2; - } - } - } - unset($keys); - $this->_canvas->endGroup(); - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Pie.php,v 1.19 2005/11/27 22:21:16 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * 2D Piechart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Pie extends Image_Graph_Plot +{ + + /** + * The radius of the 'pie' spacing + * @access private + * @var int + */ + var $_radius = 3; + + /** + * Explode pie slices. + * @access private + * @var mixed + */ + var $_explode = false; + + /** + * The starting angle of the plot + * @access private + * @var int + */ + var $_startingAngle = 0; + + /** + * The angle direction (1 = CCW, -1 = CW) + * @access private + * @var int + */ + var $_angleDirection = 1; + + /** + * The diameter of the pie plot + * @access private + * @var int + */ + var $_diameter = false; + + /** + * Group items below this limit together as "the rest" + * @access private + * @var double + */ + var $_restGroupLimit = false; + + /** + * Rest group title + * @access private + * @var string + */ + var $_restGroupTitle = 'The rest'; + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $y = ($y0 + $y1) / 2; + $this->_canvas->pieslice( + array( + 'x' => $x1, + 'y' => $y, + 'rx' => abs($x1 - $x0) / 2, + 'ry' => abs($y1 - $y0) / 2, + 'v1' => 45, + 'v2' => 315 + ) + ); + } + + /** + * Calculate marker point data + * + * @param array $point The point to calculate data for + * @param array $nextPoint The next point + * @param array $prevPoint The previous point + * @param array $totals The pre-calculated totals, if needed + * @return array An array containing marker point data + * @access private + */ + function _getMarkerData($point, $nextPoint, $prevPoint, &$totals) + { + $point = parent::_getMarkerData($point, $nextPoint, $prevPoint, $totals); + + $y = $totals['CURRENT_Y']; + + if ($this->_angleDirection < 0) { + $y = $totals['ALL_SUM_Y'] - $y; + } + + $point['ANGLE'] = 360 * (($y + ($point['Y'] / 2)) / $totals['ALL_SUM_Y']) + $this->_startingAngle; + $totals['CURRENT_Y'] += $point['Y']; + + $point['ANG_X'] = cos(deg2rad($point['ANGLE'])); + $point['ANG_Y'] = sin(deg2rad($point['ANGLE'])); + + $point['AX'] = -10 * $point['ANG_X']; + $point['AY'] = -10 * $point['ANG_Y']; + + if ((isset($totals['ALL_SUM_Y'])) && ($totals['ALL_SUM_Y'] != 0)) { + $point['PCT_MIN_Y'] = $point['PCT_MAX_Y'] = (100 * $point['Y'] / $totals['ALL_SUM_Y']); + } + + $point['LENGTH'] = 10; //$radius; + + $x = $point['X']; + $explodeRadius = 0; + if ((is_array($this->_explode)) && (isset($this->_explode[$x]))) { + $explodeRadius = $this->_explode[$x]; + } elseif (is_numeric($this->_explode)) { + $explodeRadius = $this->_explode; + } + + $point['MARKER_X'] = $totals['CENTER_X'] + + ($totals['RADIUS'] + $explodeRadius) * $point['ANG_X']; + $point['MARKER_Y'] = $totals['CENTER_Y'] + + ($totals['RADIUS'] + $explodeRadius) * $point['ANG_Y']; + + return $point; + } + + /** + * Draws markers on the canvas + * + * @access private + */ + function _drawMarker() + { + + if ($this->_marker) { + $totals = $this->_getTotals(); + + $totals['CENTER_X'] = (int) (($this->_left + $this->_right) / 2); + $totals['CENTER_Y'] = (int) (($this->_top + $this->_bottom) / 2); + + $totals['CURRENT_Y'] = 0; + $number = 0; + + $diameter = $this->_getDiameter(); + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + + if (count($this->_dataset) == 1) { + $totals['RADIUS0'] = false; + $totals['RADIUS'] = $diameter / 2; + } else { + $dr = $diameter / (2 * count($this->_dataset)); + + $totals['RADIUS0'] = $number * $dr + ($number > 0 ? $this->_radius : 0); + $totals['RADIUS'] = ($number + 1) * $dr; + } + + $totals['ALL_SUM_Y'] = 0; + $totals['CURRENT_Y'] = 0; + $dataset->_reset(); + while ($point = $dataset->_next()) { + $totals['ALL_SUM_Y'] += $point['Y']; + } + + $dataset->_reset(); + $currentY = 0; + $the_rest = 0; + while ($point = $dataset->_next()) { + if (($this->_restGroupLimit !== false) && ($point['Y'] <= $this->_restGroupLimit)) { + $the_rest += $point['Y']; + } + else { + if ((!is_object($this->_dataSelector)) || + ($this->_dataSelector->select($point)) + ) { + $point = $this->_getMarkerData( + $point, + false, + false, + $totals + ); + if (is_array($point)) { + $this->_marker->_drawMarker( + $point['MARKER_X'], + $point['MARKER_Y'], + $point + ); + } + } + } + } + if ($the_rest > 0) { + $point = array('X' => $this->_restGroupTitle, 'Y' => $the_rest); + $point = $this->_getMarkerData( + $point, + false, + false, + $totals + ); + if (is_array($point)) { + $this->_marker->_drawMarker( + $point['MARKER_X'], + $point['MARKER_Y'], + $point + ); + } + } + $number++; + } + unset($keys); + } + } + + /** + * Explodes a piece of this pie chart + * + * @param int $explode Radius to explode with (or an array) + * @param string $x The 'x' value to explode or omitted + */ + function explode($explode, $x = false) + { + if ($x === false) { + $this->_explode = $explode; + } else { + $this->_explode[$x] = $explode; + } + } + + /** + * Set the starting angle of the plot + * + * East is 0 degrees + * South is 90 degrees + * West is 180 degrees + * North is 270 degrees + * + * It is also possible to specify the direction of the plot angles (i.e. clockwise 'cw' or + * counterclockwise 'ccw') + */ + function setStartingAngle($angle = 0, $direction = 'ccw') + { + $this->_startingAngle = ($angle % 360); + $this->_angleDirection = ($direction == 'ccw' ? 1 : -1); + } + + /** + * Set the diameter of the pie plot (i.e. the number of pixels the + * pie plot should be across) + * + * Use 'max' for the maximum possible diameter + * + * Use negative values for the maximum possible - minus this value (fx -2 + * to leave 1 pixel at each side) + * + * @param mixed @diameter The number of pixels + */ + function setDiameter($diameter) + { + $this->_diameter = $diameter; + } + + /** + * Set the limit for the y-value, where values below are grouped together + * as "the rest" + * + * @param double $limit The limit + * @param string $title The title to display in the legends (default 'The + * rest') + */ + function setRestGroup($limit, $title = 'The rest') + { + $this->_restGroupLimit = $limit; + $this->_restGroupTitle = $title; + } + + /** + * Get the diameter of the plot + * @return int The number of pixels the diameter is + * @access private + */ + function _getDiameter() + { + $diameter = 0; + if ($this->_diameter === false) { + $diameter = min($this->height(), $this->width()) * 0.75; + } + else { + if ($this->_diameter === 'max') { + $diameter = min($this->height(), $this->width()); + } + elseif ($this->_diameter < 0) { + $diameter = min($this->height(), $this->width()) + $this->_diameter; + } else { + $diameter = $this->_diameter; + } + } + return $diameter; + } + + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + $number = 0; + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + + $totalY = 0; + $dataset->_reset(); + while ($point = $dataset->_next()) { + $totalY += $point['Y']; + } + + $centerX = (int) (($this->_left + $this->_right) / 2); + $centerY = (int) (($this->_top + $this->_bottom) / 2); + $diameter = $this->_getDiameter(); + if ($this->_angleDirection < 0) { + $currentY = $totalY; + } else { + $currentY = 0; //rand(0, 100)*$totalY/100; + } + $dataset->_reset(); + + if (count($this->_dataset) == 1) { + $radius0 = false; + $radius1 = $diameter / 2; + } else { + $dr = $diameter / (2 * count($this->_dataset)); + + $radius0 = $number * $dr + ($number > 0 ? $this->_radius : 0); + $radius1 = ($number + 1) * $dr; + } + + $the_rest = 0; + while ($point = $dataset->_next()) { + if (($this->_restGroupLimit !== false) && ($point['Y'] <= $this->_restGroupLimit)) { + $the_rest += $point['Y']; + } + else { + $angle1 = 360 * ($currentY / $totalY) + $this->_startingAngle; + $currentY += $this->_angleDirection * $point['Y']; + $angle2 = 360 * ($currentY / $totalY) + $this->_startingAngle; + + $x = $point['X']; + $id = $point['ID']; + + $dX = 0; + $dY = 0; + $explodeRadius = 0; + if ((is_array($this->_explode)) && (isset($this->_explode[$x]))) { + $explodeRadius = $this->_explode[$x]; + } elseif (is_numeric($this->_explode)) { + $explodeRadius = $this->_explode; + } + + if ($explodeRadius > 0) { + $dX = $explodeRadius * cos(deg2rad(($angle1 + $angle2) / 2)); + $dY = $explodeRadius * sin(deg2rad(($angle1 + $angle2) / 2)); + } + + $ID = $point['ID']; + $this->_getFillStyle($ID); + $this->_getLineStyle($ID); + $this->_canvas->pieslice( + $this->_mergeData( + $point, + array( + 'x' => $centerX + $dX, + 'y' => $centerY + $dY, + 'rx' => $radius1, + 'ry' => $radius1, + 'v1' => $angle1, + 'v2' => $angle2, + 'srx' => $radius0, + 'sry' => $radius0 + ) + ) + ); + } + } + + if ($the_rest > 0) { + $angle1 = 360 * ($currentY / $totalY) + $this->_startingAngle; + $currentY += $this->_angleDirection * $the_rest; + $angle2 = 360 * ($currentY / $totalY) + $this->_startingAngle; + + $x = 'rest'; + $id = 'rest'; + + $dX = 0; + $dY = 0; + $explodeRadius = 0; + if ((is_array($this->_explode)) && (isset($this->_explode[$x]))) { + $explodeRadius = $this->_explode[$x]; + } elseif (is_numeric($this->_explode)) { + $explodeRadius = $this->_explode; + } + + if ($explodeRadius > 0) { + $dX = $explodeRadius * cos(deg2rad(($angle1 + $angle2) / 2)); + $dY = $explodeRadius * sin(deg2rad(($angle1 + $angle2) / 2)); + } + + $ID = $id; + $this->_getFillStyle($ID); + $this->_getLineStyle($ID); + $this->_canvas->pieslice( + $this->_mergeData( + $point, + array( + 'x' => $centerX + $dX, + 'y' => $centerY + $dY, + 'rx' => $radius1, + 'ry' => $radius1, + 'v1' => $angle1, + 'v2' => $angle2, + 'srx' => $radius0, + 'sry' => $radius0 + ) + ) + ); + } + $number++; + } + unset($keys); + $this->_drawMarker(); + return true; + } + + /** + * Draw a sample for use with legend + * + * @param array $param The parameters for the legend + * @access private + */ + function _legendSample(&$param) + { + if (is_array($this->_dataset)) { + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + + $totals = $this->_getTotals(); + $totals['CENTER_X'] = (int) (($this->_left + $this->_right) / 2); + $totals['CENTER_Y'] = (int) (($this->_top + $this->_bottom) / 2); + $totals['RADIUS'] = min($this->height(), $this->width()) * 0.75 * 0.5; + $totals['CURRENT_Y'] = 0; + + if (is_a($this->_fillStyle, "Image_Graph_Fill")) { + $this->_fillStyle->_reset(); + } + + $count = 0; + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $count++; + + $dataset->_reset(); + $the_rest = 0; + while ($point = $dataset->_next()) { + $caption = $point['X']; + if (($this->_restGroupLimit !== false) && ($point['Y'] <= $this->_restGroupLimit)) { + $the_rest += $point['Y']; + } + else { + $this->_canvas->setFont($param['font']); + $width = 20 + $param['width'] + $this->_canvas->textWidth($caption); + $param['maxwidth'] = max($param['maxwidth'], $width); + $x2 = $param['x'] + $width; + $y2 = $param['y'] + $param['height']+5; + + if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { + $param['y'] = $param['top']; + $param['x'] = $x2; + $y2 = $param['y'] + $param['height']; + } elseif ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) == 0) && ($x2 > $param['right'])) { + $param['x'] = $param['left']; + $param['y'] = $y2; + $x2 = $param['x'] + 20 + $param['width'] + $this->_canvas->textWidth($caption); + } + + $x = $x0 = $param['x']; + $y = $param['y']; + $y0 = $param['y'] - $param['height']/2; + $x1 = $param['x'] + $param['width']; + $y1 = $param['y'] + $param['height']/2; + + if (!isset($param['simulate'])) { + $this->_getFillStyle($point['ID']); + $this->_getLineStyle($point['ID']); + $this->_drawLegendSample($x0, $y0, $x1, $y1); + + if (($this->_marker) && ($dataset) && ($param['show_marker'])) { + $prevPoint = $dataset->_nearby(-2); + $nextPoint = $dataset->_nearby(); + + $p = $this->_getMarkerData($point, $nextPoint, $prevPoint, $totals); + if (is_array($point)) { + $p['MARKER_X'] = $x+$param['width']/2; + $p['MARKER_Y'] = $y; + unset ($p['AVERAGE_Y']); + $this->_marker->_drawMarker($p['MARKER_X'], $p['MARKER_Y'], $p); + } + } + $this->write($x + $param['width'] +10, $y, $caption, IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, $param['font']); + } + + if (($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { + $param['y'] = $y2; + } else { + $param['x'] = $x2; + } + } + } + if ($the_rest > 0) { + $this->_canvas->setFont($param['font']); + $width = 20 + $param['width'] + $this->_canvas->textWidth($this->_restGroupTitle); + $param['maxwidth'] = max($param['maxwidth'], $width); + $x2 = $param['x'] + $width; + $y2 = $param['y'] + $param['height']+5; + + if ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) && ($y2 > $param['bottom'])) { + $param['y'] = $param['top']; + $param['x'] = $x2; + $y2 = $param['y'] + $param['height']; + } elseif ((($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) == 0) && ($x2 > $param['right'])) { + $param['x'] = $param['left']; + $param['y'] = $y2; + $x2 = $param['x'] + 20 + $param['width'] + $this->_canvas->textWidth($this->_restGroupTitle); + } + + $x = $x0 = $param['x']; + $y = $param['y']; + $y0 = $param['y'] - $param['height']/2; + $x1 = $param['x'] + $param['width']; + $y1 = $param['y'] + $param['height']/2; + + if (!isset($param['simulate'])) { + $this->_getFillStyle('rest'); + $this->_getLineStyle('rest'); + $this->_drawLegendSample($x0, $y0, $x1, $y1); + + $this->write($x + $param['width'] + 10, $y, $this->_restGroupTitle, IMAGE_GRAPH_ALIGN_CENTER_Y | IMAGE_GRAPH_ALIGN_LEFT, $param['font']); + } + + if (($param['align'] & IMAGE_GRAPH_ALIGN_VERTICAL) != 0) { + $param['y'] = $y2; + } else { + $param['x'] = $x2; + } + } + } + unset($keys); + $this->_clip(false); + $this->_canvas->endGroup(); + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Radar.php b/includes/pear/Image/Graph/Plot/Radar.php index cf73df0c..11577e66 100644 --- a/includes/pear/Image/Graph/Plot/Radar.php +++ b/includes/pear/Image/Graph/Plot/Radar.php @@ -1,116 +1,118 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Radar.php,v 1.10 2005/08/03 21:21:55 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Radar chart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Radar extends Image_Graph_Plot -{ - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $p = 10; - $rx = abs($x1 - $x0) / 2; - $ry = abs($x1 - $x0) / 2; - $r = min($rx, $ry); - $cx = ($x0 + $x1) / 2; - $cy = ($y0 + $y1) / 2; - $max = 5; - for ($i = 0; $i < $p; $i++) { - $v = 2 * pi() * $i / $p; - $t = $r * rand(3, $max) / $max; - $x = $cx + $t * cos($v); - $y = $cy + $t * sin($v); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); - } - $this->_canvas->polygon(array('connect' => true)); - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - if (is_a($this->_parent, 'Image_Graph_Plotarea_Radar')) { - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $maxY = $dataset->maximumY(); - $count = $dataset->count(); - - $dataset->_reset(); - while ($point = $dataset->_next()) { - $this->_canvas->addVertex(array('x' => - $this->_pointX($point), 'y' => - $this->_pointY($point) - )); - } - $this->_getFillStyle($key); - $this->_getLineStyle($key); - $this->_canvas->polygon(array('connect' => true)); - } - unset($keys); - } - $this->_drawMarker(); - - $this->_canvas->endGroup(); - return parent::_done(); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Radar.php,v 1.11 2005/11/27 22:21:16 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Radar chart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Radar extends Image_Graph_Plot +{ + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $p = 10; + $rx = abs($x1 - $x0) / 2; + $ry = abs($x1 - $x0) / 2; + $r = min($rx, $ry); + $cx = ($x0 + $x1) / 2; + $cy = ($y0 + $y1) / 2; + $max = 5; + for ($i = 0; $i < $p; $i++) { + $v = 2 * pi() * $i / $p; + $t = $r * rand(3, $max) / $max; + $x = $cx + $t * cos($v); + $y = $cy + $t * sin($v); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); + } + $this->_canvas->polygon(array('connect' => true)); + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + if (is_a($this->_parent, 'Image_Graph_Plotarea_Radar')) { + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $maxY = $dataset->maximumY(); + $count = $dataset->count(); + + $dataset->_reset(); + while ($point = $dataset->_next()) { + $this->_canvas->addVertex(array('x' => + $this->_pointX($point), 'y' => + $this->_pointY($point) + )); + } + $this->_getFillStyle($key); + $this->_getLineStyle($key); + $this->_canvas->polygon(array('connect' => true)); + } + unset($keys); + } + $this->_drawMarker(); + + $this->_clip(false); + $this->_canvas->endGroup(); + return parent::_done(); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Smoothed/Area.php b/includes/pear/Image/Graph/Plot/Smoothed/Area.php index 8cabc310..914e3b26 100644 --- a/includes/pear/Image/Graph/Plot/Smoothed/Area.php +++ b/includes/pear/Image/Graph/Plot/Smoothed/Area.php @@ -1,142 +1,145 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Area.php,v 1.10 2005/08/03 21:21:52 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot/Smoothed/Bezier.php - */ -require_once 'Image/Graph/Plot/Smoothed/Bezier.php'; - -/** - * Bezier smoothed area chart - * - * Similar to an {@link Image_Graph_Plot_Area}, but the interconnecting lines - * between two datapoints are smoothed using a Bezier curve, which enables the - * chart to appear as a nice curved plot instead of the sharp edges of a - * conventional {@link Image_Graph_Plot_Area}. Smoothed charts are only supported - * with non-stacked types - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Smoothed_Area extends Image_Graph_Plot_Smoothed_Bezier -{ - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y1)); - $this->_addSamplePoints($x0, $y0, $x1, $y1); - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y1)); - $this->_canvas->polygon(array('connect' => true)); - } - - /** - * Output the Bezier smoothed plot as an Area Chart - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - $first = true; - while ($p1 = $dataset->_next()) { - $p0 = $dataset->_nearby(-2); - $p2 = $dataset->_nearby(0); - $p3 = $dataset->_nearby(1); - if ($first) { - $p = $p1; - $p['Y'] = '#min_pos#'; - $x = $this->_pointX($p); - $y = $this->_pointY($p); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); - } - - if ($p2) { - $cp = $this->_getControlPoints($p1, $p0, $p2, $p3); - $this->_canvas->addSpline( - array( - 'x' => $cp['X'], - 'y' => $cp['Y'], - 'p1x' => $cp['P1X'], - 'p1y' => $cp['P1Y'], - 'p2x' => $cp['P2X'], - 'p2y' => $cp['P2Y'] - ) - ); - } else { - $x = $this->_pointX($p1); - $y = $this->_pointY($p1); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); - } - $lastPoint = $p1; - $first = false; - } - $lastPoint['Y'] = '#min_pos#'; - $x = $this->_pointX($lastPoint); - $y = $this->_pointY($lastPoint); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); - - $this->_getFillStyle($key); - $this->_getLineStyle($key); - $this->_canvas->polygon(array('connect' => true)); - } - unset($keys); - $this->_drawMarker(); - $this->_canvas->endGroup(); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Area.php,v 1.11 2005/11/27 22:21:17 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot/Smoothed/Bezier.php + */ +require_once 'Image/Graph/Plot/Smoothed/Bezier.php'; + +/** + * Bezier smoothed area chart + * + * Similar to an {@link Image_Graph_Plot_Area}, but the interconnecting lines + * between two datapoints are smoothed using a Bezier curve, which enables the + * chart to appear as a nice curved plot instead of the sharp edges of a + * conventional {@link Image_Graph_Plot_Area}. Smoothed charts are only supported + * with non-stacked types + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Smoothed_Area extends Image_Graph_Plot_Smoothed_Bezier +{ + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y1)); + $this->_addSamplePoints($x0, $y0, $x1, $y1); + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y1)); + $this->_canvas->polygon(array('connect' => true)); + } + + /** + * Output the Bezier smoothed plot as an Area Chart + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + $first = true; + while ($p1 = $dataset->_next()) { + $p0 = $dataset->_nearby(-2); + $p2 = $dataset->_nearby(0); + $p3 = $dataset->_nearby(1); + if ($first) { + $p = $p1; + $p['Y'] = '#min_pos#'; + $x = $this->_pointX($p); + $y = $this->_pointY($p); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); + } + + if ($p2) { + $cp = $this->_getControlPoints($p1, $p0, $p2, $p3); + $this->_canvas->addSpline( + array( + 'x' => $cp['X'], + 'y' => $cp['Y'], + 'p1x' => $cp['P1X'], + 'p1y' => $cp['P1Y'], + 'p2x' => $cp['P2X'], + 'p2y' => $cp['P2Y'] + ) + ); + } else { + $x = $this->_pointX($p1); + $y = $this->_pointY($p1); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); + } + $lastPoint = $p1; + $first = false; + } + $lastPoint['Y'] = '#min_pos#'; + $x = $this->_pointX($lastPoint); + $y = $this->_pointY($lastPoint); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); + + $this->_getFillStyle($key); + $this->_getLineStyle($key); + $this->_canvas->polygon(array('connect' => true)); + } + unset($keys); + $this->_drawMarker(); + $this->_clip(false); + $this->_canvas->endGroup(); + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Smoothed/Bezier.php b/includes/pear/Image/Graph/Plot/Smoothed/Bezier.php index 0b9f5366..2350c7f0 100644 --- a/includes/pear/Image/Graph/Plot/Smoothed/Bezier.php +++ b/includes/pear/Image/Graph/Plot/Smoothed/Bezier.php @@ -1,173 +1,173 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Bezier.php,v 1.8 2005/08/24 20:36:02 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot.php - */ -require_once 'Image/Graph/Plot.php'; - -/** - * Include file Image/Graph/Tool.php - */ -require_once 'Image/Graph/Tool.php'; - -/** - * Bezier smoothed plottype. - * - * The framework for calculating the Bezier smoothed curve from the dataset. - * Used in {@link Image_Graph_Plot_Smoothed_Line} and {@link - * Image_Graph_Plot_Smoothed_Area}. Smoothed charts are only supported with non- - * stacked types - * @link http://homepages.borland.com/efg2lab/Graphics/Jean- - * YvesQueinecBezierCurves.htm efg computer lab - description of bezier curves - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Plot_Smoothed_Bezier extends Image_Graph_Plot -{ - - /** - * Image_Graph_Plot_Smoothed_Bezier [Constructor] - * - * Only 'normal' multitype supported - * - * @param Dataset $dataset The data set (value containter) to plot - * @param string $title The title of the plot (used for legends, {@link - * Image_Graph_Legend}) - */ - function Image_Graph_Plot_Smoothed_Bezier(& $dataset, $title = '') - { - parent::Image_Graph_Plot($dataset, 'normal', $title); - } - - /** - * Return the minimum Y point - * - * @return double The minumum Y point - * @access private - */ - function _minimumY() - { - return 1.05 * parent::_minimumY(); - } - - /** - * Return the maximum Y point - * - * @return double The maximum Y point - * @access private - */ - function _maximumY() - { - return 1.05 * parent::_maximumY(); - } - - /** - * Calculates all Bezier points, for the curve - * - * @param array $p1 The actual point to calculate control points for - * @param array $p0 The point "just before" $p1 - * @param array $p2 The point "just after" $p1 - * @param array $p3 The point "just after" $p2 - * @return array Array of Bezier points - * @access private - */ - function _getControlPoints($p1, $p0, $p2, $p3) - { - $p1 = $this->_pointXY($p1); - if ($p2) { - $p2 = $this->_pointXY($p2); - } - if (!$p0) { - $p0['X'] = $p1['X'] - abs($p2['X'] - $p1['X']); - $p0['Y'] = $p1['Y']; //-($p2['Y']-$p1['Y']); - } else { - $p0 = $this->_pointXY($p0); - } - if (!$p3) { - $p3['X'] = $p1['X'] + 2*abs($p1['X'] - $p0['X']); - $p3['Y'] = $p1['Y']; - } else { - $p3 = $this->_pointXY($p3); - } - - if (!$p2) { - $p2['X'] = $p1['X'] + abs($p1['X'] - $p0['X']); - $p2['Y'] = $p1['Y']; - } - - $pC1['X'] = Image_Graph_Tool::controlPoint($p0['X'], $p1['X'], $p2['X']); - $pC1['Y'] = Image_Graph_Tool::controlPoint($p0['Y'], $p1['Y'], $p2['Y']); - $pC2['X'] = Image_Graph_Tool::controlPoint($p3['X'], $p2['X'], $p1['X']); - $pC2['Y'] = Image_Graph_Tool::controlPoint($p3['Y'], $p2['Y'], $p1['Y']); - - return array( - 'X' => $p1['X'], - 'Y' => $p1['Y'], - 'P1X' => $pC1['X'], - 'P1Y' => $pC1['Y'], - 'P2X' => $pC2['X'], - 'P2Y' => $pC2['Y'] - ); - } - - /** - * Create legend sample data for the canvas. - * - * Common for all smoothed plots - * - * @access private - */ - function _addSamplePoints($x0, $y0, $x1, $y1) - { - $p = abs($x1 - $x0); - $cy = ($y0 + $y1) / 2; - $h = abs($y1 - $y0); - $dy = $h / 4; - $dw = abs($x1 - $x0) / $p; - for ($i = 0; $i < $p; $i++) { - $v = 2 * pi() * $i / $p; - $x = $x0 + $i * $dw; - $y = $cy + 2 * $v * sin($v); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Bezier.php,v 1.8 2005/08/24 20:36:02 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot.php + */ +require_once 'Image/Graph/Plot.php'; + +/** + * Include file Image/Graph/Tool.php + */ +require_once 'Image/Graph/Tool.php'; + +/** + * Bezier smoothed plottype. + * + * The framework for calculating the Bezier smoothed curve from the dataset. + * Used in {@link Image_Graph_Plot_Smoothed_Line} and {@link + * Image_Graph_Plot_Smoothed_Area}. Smoothed charts are only supported with non- + * stacked types + * @link http://homepages.borland.com/efg2lab/Graphics/Jean- + * YvesQueinecBezierCurves.htm efg computer lab - description of bezier curves + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Plot_Smoothed_Bezier extends Image_Graph_Plot +{ + + /** + * Image_Graph_Plot_Smoothed_Bezier [Constructor] + * + * Only 'normal' multitype supported + * + * @param Dataset $dataset The data set (value containter) to plot + * @param string $title The title of the plot (used for legends, {@link + * Image_Graph_Legend}) + */ + function Image_Graph_Plot_Smoothed_Bezier(& $dataset, $title = '') + { + parent::Image_Graph_Plot($dataset, 'normal', $title); + } + + /** + * Return the minimum Y point + * + * @return double The minumum Y point + * @access private + */ + function _minimumY() + { + return 1.05 * parent::_minimumY(); + } + + /** + * Return the maximum Y point + * + * @return double The maximum Y point + * @access private + */ + function _maximumY() + { + return 1.05 * parent::_maximumY(); + } + + /** + * Calculates all Bezier points, for the curve + * + * @param array $p1 The actual point to calculate control points for + * @param array $p0 The point "just before" $p1 + * @param array $p2 The point "just after" $p1 + * @param array $p3 The point "just after" $p2 + * @return array Array of Bezier points + * @access private + */ + function _getControlPoints($p1, $p0, $p2, $p3) + { + $p1 = $this->_pointXY($p1); + if ($p2) { + $p2 = $this->_pointXY($p2); + } + if (!$p0) { + $p0['X'] = $p1['X'] - abs($p2['X'] - $p1['X']); + $p0['Y'] = $p1['Y']; //-($p2['Y']-$p1['Y']); + } else { + $p0 = $this->_pointXY($p0); + } + if (!$p3) { + $p3['X'] = $p1['X'] + 2*abs($p1['X'] - $p0['X']); + $p3['Y'] = $p1['Y']; + } else { + $p3 = $this->_pointXY($p3); + } + + if (!$p2) { + $p2['X'] = $p1['X'] + abs($p1['X'] - $p0['X']); + $p2['Y'] = $p1['Y']; + } + + $pC1['X'] = Image_Graph_Tool::controlPoint($p0['X'], $p1['X'], $p2['X']); + $pC1['Y'] = Image_Graph_Tool::controlPoint($p0['Y'], $p1['Y'], $p2['Y']); + $pC2['X'] = Image_Graph_Tool::controlPoint($p3['X'], $p2['X'], $p1['X']); + $pC2['Y'] = Image_Graph_Tool::controlPoint($p3['Y'], $p2['Y'], $p1['Y']); + + return array( + 'X' => $p1['X'], + 'Y' => $p1['Y'], + 'P1X' => $pC1['X'], + 'P1Y' => $pC1['Y'], + 'P2X' => $pC2['X'], + 'P2Y' => $pC2['Y'] + ); + } + + /** + * Create legend sample data for the canvas. + * + * Common for all smoothed plots + * + * @access private + */ + function _addSamplePoints($x0, $y0, $x1, $y1) + { + $p = abs($x1 - $x0); + $cy = ($y0 + $y1) / 2; + $h = abs($y1 - $y0); + $dy = $h / 4; + $dw = abs($x1 - $x0) / $p; + for ($i = 0; $i < $p; $i++) { + $v = 2 * pi() * $i / $p; + $x = $x0 + $i * $dw; + $y = $cy + 2 * $v * sin($v); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Smoothed/Line.php b/includes/pear/Image/Graph/Plot/Smoothed/Line.php index d99769bd..d768aac8 100644 --- a/includes/pear/Image/Graph/Plot/Smoothed/Line.php +++ b/includes/pear/Image/Graph/Plot/Smoothed/Line.php @@ -1,164 +1,172 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Line.php,v 1.11 2005/08/08 19:09:19 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot/Smoothed/Bezier.php - */ -require_once 'Image/Graph/Plot/Smoothed/Bezier.php'; - -/** - * Bezier smoothed line chart. - * - * Similar to a {@link Image_Graph_Plot_Line}, but the interconnecting lines - * between two datapoints are smoothed using a Bezier curve, which enables the - * chart to appear as a nice curved plot instead of the sharp edges of a - * conventional {@link Image_Graph_Plot_Line}. Smoothed charts are only supported - * with non-stacked types - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Smoothed_Line extends Image_Graph_Plot_Smoothed_Bezier -{ - - /** - * Gets the fill style of the element - * - * @return int A GD filestyle representing the fill style - * @see Image_Graph_Fill - * @access private - */ - function _getFillStyle($ID = false) - { - return IMG_COLOR_TRANSPARENT; - } - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $this->_addSamplePoints($x0, $y0, $x1, $y1); - $this->_canvas->polygon(array('connect' => false)); - } - - /** - * Output the Bezier smoothed plot as an Line Chart - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (parent::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - $numPoints = 0; - while ($p1 = $dataset->_next()) { - if ($p1['Y'] === null) { - if ($numPoints > 1) { - $this->_getLineStyle($key); - $this->_canvas->polygon(array('connect' => false, 'map_vertices' => true)); - } - $numPoints = 0; - } else { - $p0 = $dataset->_nearby(-2); - $p2 = $dataset->_nearby(0); - $p3 = $dataset->_nearby(1); - - if (($p0) && ($p0['Y'] === null)) { - $p0 = false; - } - if (($p2) && ($p2['Y'] === null)) { - $p2 = false; - } - if (($p3) && ($p3['Y'] === null)) { - $p3 = false; - } - - if ($p2) { - $cp = $this->_getControlPoints($p1, $p0, $p2, $p3); - $this->_canvas->addSpline( - $this->_mergeData( - $p1, - array( - 'x' => $cp['X'], - 'y' => $cp['Y'], - 'p1x' => $cp['P1X'], - 'p1y' => $cp['P1Y'], - 'p2x' => $cp['P2X'], - 'p2y' => $cp['P2Y'] - ) - ) - ); - } else { - $x = $this->_pointX($p1); - $y = $this->_pointY($p1); - $this->_canvas->addVertex( - $this->_mergeData( - $p1, - array('x' => $x, 'y' => $y) - ) - ); - } - $numPoints++; - } - } - if ($numPoints > 1) { - $this->_getLineStyle(); - $this->_canvas->polygon(array('connect' => false, 'map_vertices' => true)); - } - } - unset($keys); - $this->_drawMarker(); - $this->_canvas->endGroup(); - return true; - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Line.php,v 1.14 2006/03/02 12:37:37 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot/Smoothed/Bezier.php + */ +require_once 'Image/Graph/Plot/Smoothed/Bezier.php'; + +/** + * Bezier smoothed line chart. + * + * Similar to a {@link Image_Graph_Plot_Line}, but the interconnecting lines + * between two datapoints are smoothed using a Bezier curve, which enables the + * chart to appear as a nice curved plot instead of the sharp edges of a + * conventional {@link Image_Graph_Plot_Line}. Smoothed charts are only supported + * with non-stacked types + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Smoothed_Line extends Image_Graph_Plot_Smoothed_Bezier +{ + + /** + * Gets the fill style of the element + * + * @return int A GD filestyle representing the fill style + * @see Image_Graph_Fill + * @access private + */ + function _getFillStyle($ID = false) + { + return IMG_COLOR_TRANSPARENT; + } + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $this->_addSamplePoints($x0, $y0, $x1, $y1); + $this->_canvas->polygon(array('connect' => false)); + } + + /** + * Output the Bezier smoothed plot as an Line Chart + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (parent::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + $numPoints = 0; + while ($p1 = $dataset->_next()) { + if ($p1['Y'] === null) { + if ($numPoints > 1) { + $this->_getLineStyle($key); + $this->_canvas->polygon(array('connect' => false, 'map_vertices' => true)); + } + else { + $this->_canvas->reset(); + } + $numPoints = 0; + } else { + $p0 = $dataset->_nearby(-2); + $p2 = $dataset->_nearby(0); + $p3 = $dataset->_nearby(1); + + if (($p0) && ($p0['Y'] === null)) { + $p0 = false; + } + if (($p2) && ($p2['Y'] === null)) { + $p2 = false; + } + if (($p3) && ($p3['Y'] === null)) { + $p3 = false; + } + + if ($p2) { + $cp = $this->_getControlPoints($p1, $p0, $p2, $p3); + $this->_canvas->addSpline( + $this->_mergeData( + $p1, + array( + 'x' => $cp['X'], + 'y' => $cp['Y'], + 'p1x' => $cp['P1X'], + 'p1y' => $cp['P1Y'], + 'p2x' => $cp['P2X'], + 'p2y' => $cp['P2Y'] + ) + ) + ); + } else { + $x = $this->_pointX($p1); + $y = $this->_pointY($p1); + $this->_canvas->addVertex( + $this->_mergeData( + $p1, + array('x' => $x, 'y' => $y) + ) + ); + } + $numPoints++; + } + } + if ($numPoints > 1) { + $this->_getLineStyle(); + $this->_canvas->polygon(array('connect' => false, 'map_vertices' => true)); + } + else { + $this->_canvas->reset(); + } + } + unset($keys); + $this->_drawMarker(); + $this->_clip(false); + $this->_canvas->endGroup(); + return true; + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Smoothed/Radar.php b/includes/pear/Image/Graph/Plot/Smoothed/Radar.php index 49e989f2..15922962 100644 --- a/includes/pear/Image/Graph/Plot/Smoothed/Radar.php +++ b/includes/pear/Image/Graph/Plot/Smoothed/Radar.php @@ -1,140 +1,142 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Radar.php,v 1.9 2005/08/03 21:21:52 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - * @since File available since Release 0.3.0dev2 - */ - -/** - * Include file Image/Graph/Plot/Smoothed/Bezier.php - */ -require_once 'Image/Graph/Plot/Smoothed/Bezier.php'; - -/** - * Smoothed radar chart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @since Class available since Release 0.3.0dev2 - */ -class Image_Graph_Plot_Smoothed_Radar extends Image_Graph_Plot_Smoothed_Bezier -{ - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - if (is_a($this->_parent, 'Image_Graph_Plotarea_Radar')) { - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - if ($dataset->count() >= 3) { - $dataset->_reset(); - $p1_ = $dataset->_next(); - $p2_ = $dataset->_next(); - $p3_ = $dataset->_next(); - $plast_ = false; - if ($p3_) { - while ($p = $dataset->_next()) { - $plast_ = $p; - } - } - - if ($plast_ === false) { - $plast_ = $p3_; - } - $dataset->_reset(); - while ($p1 = $dataset->_next()) { - $p0 = $dataset->_nearby(-2); - $p2 = $dataset->_nearby(0); - $p3 = $dataset->_nearby(1); - - if ($p0 === false) { - $p0 = $plast_; - } - - if ($p2 === false) { - $p2 = $p1_; - $p3 = $p2_; - } elseif ($p3 === false) { - $p3 = $p1_; - } - - - $cp = $this->_getControlPoints($p1, $p0, $p2, $p3); - $this->_canvas->addSpline( - array( - 'x' => $cp['X'], - 'y' => $cp['Y'], - 'p1x' => $cp['P1X'], - 'p1y' => $cp['P1Y'], - 'p2x' => $cp['P2X'], - 'p2y' => $cp['P2Y'] - ) - ); - - $next2last = $p0; - $last = $p1; - } - - $cp = $this->_getControlPoints($p1_, $plast_, $p2_, $p3_); - $this->_canvas->addSpline( - array( - 'x' => $cp['X'], - 'y' => $cp['Y'], - 'p1x' => $cp['P1X'], - 'p1y' => $cp['P1Y'], - 'p2x' => $cp['P2X'], - 'p2y' => $cp['P2Y'] - ) - ); - $this->_getFillStyle($key); - $this->_getLineStyle($key); - $this->_canvas->polygon(array('connect' => true)); - } - } - unset($keys); - } - $this->_drawMarker(); - $this->_canvas->endGroup($this->_title); - return parent::_done(); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Radar.php,v 1.10 2005/11/27 22:21:17 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + * @since File available since Release 0.3.0dev2 + */ + +/** + * Include file Image/Graph/Plot/Smoothed/Bezier.php + */ +require_once 'Image/Graph/Plot/Smoothed/Bezier.php'; + +/** + * Smoothed radar chart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @since Class available since Release 0.3.0dev2 + */ +class Image_Graph_Plot_Smoothed_Radar extends Image_Graph_Plot_Smoothed_Bezier +{ + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + if (is_a($this->_parent, 'Image_Graph_Plotarea_Radar')) { + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + if ($dataset->count() >= 3) { + $dataset->_reset(); + $p1_ = $dataset->_next(); + $p2_ = $dataset->_next(); + $p3_ = $dataset->_next(); + $plast_ = false; + if ($p3_) { + while ($p = $dataset->_next()) { + $plast_ = $p; + } + } + + if ($plast_ === false) { + $plast_ = $p3_; + } + $dataset->_reset(); + while ($p1 = $dataset->_next()) { + $p0 = $dataset->_nearby(-2); + $p2 = $dataset->_nearby(0); + $p3 = $dataset->_nearby(1); + + if ($p0 === false) { + $p0 = $plast_; + } + + if ($p2 === false) { + $p2 = $p1_; + $p3 = $p2_; + } elseif ($p3 === false) { + $p3 = $p1_; + } + + + $cp = $this->_getControlPoints($p1, $p0, $p2, $p3); + $this->_canvas->addSpline( + array( + 'x' => $cp['X'], + 'y' => $cp['Y'], + 'p1x' => $cp['P1X'], + 'p1y' => $cp['P1Y'], + 'p2x' => $cp['P2X'], + 'p2y' => $cp['P2Y'] + ) + ); + + $next2last = $p0; + $last = $p1; + } + + $cp = $this->_getControlPoints($p1_, $plast_, $p2_, $p3_); + $this->_canvas->addSpline( + array( + 'x' => $cp['X'], + 'y' => $cp['Y'], + 'p1x' => $cp['P1X'], + 'p1y' => $cp['P1Y'], + 'p2x' => $cp['P2X'], + 'p2y' => $cp['P2Y'] + ) + ); + $this->_getFillStyle($key); + $this->_getLineStyle($key); + $this->_canvas->polygon(array('connect' => true)); + } + } + unset($keys); + } + $this->_drawMarker(); + $this->_clip(false); + $this->_canvas->endGroup($this->_title); + return parent::_done(); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plot/Step.php b/includes/pear/Image/Graph/Plot/Step.php index c5ccf4cd..27dc04bd 100644 --- a/includes/pear/Image/Graph/Plot/Step.php +++ b/includes/pear/Image/Graph/Plot/Step.php @@ -1,198 +1,200 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Step.php,v 1.14 2005/10/05 20:51:21 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plot/Bar.php - */ -require_once 'Image/Graph/Plot/Bar.php'; - -/** - * Step chart. - * - * @category Images - * @package Image_Graph - * @subpackage Plot - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plot_Step extends Image_Graph_Plot -{ - - /** - * Perform the actual drawing on the legend. - * - * @param int $x0 The top-left x-coordinate - * @param int $y0 The top-left y-coordinate - * @param int $x1 The bottom-right x-coordinate - * @param int $y1 The bottom-right y-coordinate - * @access private - */ - function _drawLegendSample($x0, $y0, $x1, $y1) - { - $dx = abs($x1 - $x0) / 3; - $dy = abs($y1 - $y0) / 3; - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y1)); - $this->_canvas->addVertex(array('x' => $x0, 'y' => $y0 + $dy)); - - $this->_canvas->addVertex(array('x' => $x0 + $dx, 'y' => $y0 + $dy)); - $this->_canvas->addVertex(array('x' => $x0 + $dx, 'y' => $y0)); - - $this->_canvas->addVertex(array('x' => $x0 + 2*$dx, 'y' => $y0)); - $this->_canvas->addVertex(array('x' => $x0 + 2*$dx, 'y' => $y0 + 2*$dy)); - - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y0 + 2*$dy)); - $this->_canvas->addVertex(array('x' => $x1, 'y' => $y1)); - $this->_canvas->polygon(array('connect' => true)); - } - - /** - * PlotType [Constructor] - * - * A 'normal' step chart is 'stacked' - * - * @param Dataset $dataset The data set (value containter) to plot - * @param string $multiType The type of the plot - * @param string $title The title of the plot (used for legends, - * {@link Image_Graph_Legend}) - */ - function Image_Graph_Plot_Step(& $dataset, $multiType = 'stacked', $title = '') - { - $multiType = strtolower($multiType); - if (($multiType != 'stacked') && ($multiType != 'stacked100pct')) { - $multiType = 'stacked'; - } - parent::Image_Graph_Plot($dataset, $multiType, $title); - } - - /** - * Output the plot - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if (Image_Graph_Plot::_done() === false) { - return false; - } - - $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); - - if ($this->_multiType == 'stacked100pct') { - $total = $this->_getTotals(); - } - - if ($this->_parent->_horizontal) { - $width = $this->height() / ($this->_maximumX() + 2) / 2; - } - else { - $width = $this->width() / ($this->_maximumX() + 2) / 2; - } - - reset($this->_dataset); - $key = key($this->_dataset); - $dataset =& $this->_dataset[$key]; - - $first = $dataset->first(); - $last = $dataset->last(); - - $point = array ('X' => $first['X'], 'Y' => '#min_pos#'); - $firstY = $this->_pointY($point) + ($this->_parent->_horizontal ? $width : 0); - $base[] = $firstY; - $firstX = $this->_pointX($point) - ($this->_parent->_horizontal ? 0 : $width); - $base[] = $firstX; - - $point = array ('X' => $last['X'], 'Y' => '#min_pos#'); - $base[] = $this->_pointY($point) - ($this->_parent->_horizontal ? $width : 0); - $base[] = $this->_pointX($point) + ($this->_parent->_horizontal ? 0 : $width); - - $first = ($this->_parent->_horizontal ? $firstY : $firstX); - - $keys = array_keys($this->_dataset); - foreach ($keys as $key) { - $dataset =& $this->_dataset[$key]; - $dataset->_reset(); - $polygon = array_reverse($base); - unset ($base); - $last = $first; - while ($point = $dataset->_next()) { - $x = $point['X']; - $p = $point; - - if (!isset($current[$x])) { - $current[$x] = 0; - } - - if ($this->_multiType == 'stacked100pct') { - $p['Y'] = 100 * ($current[$x] + $point['Y']) / $total['TOTAL_Y'][$x]; - } else { - $p['Y'] += $current[$x]; - } - $current[$x] += $point['Y']; - $point = $p; - - if ($this->_parent->_horizontal) { - $x0 = $this->_pointX($point); - $y0 = $last; - $x1 = $this->_pointX($point); - $last = $y1 = $this->_pointY($point) - $width; - } - else { - $x0 = $last; - $y0 = $this->_pointY($point); - $last = $x1 = $this->_pointX($point) + $width; - $y1 = $this->_pointY($point); - } - $polygon[] = $x0; $base[] = $y0; - $polygon[] = $y0; $base[] = $x0; - $polygon[] = $x1; $base[] = $y1; - $polygon[] = $y1; $base[] = $x1; - } - - while (list(, $x) = each($polygon)) { - list(, $y) = each($polygon); - $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); - } - - $this->_getFillStyle($key); - $this->_getLineStyle($key); - $this->_canvas->polygon(array('connect' => true)); - } - unset($keys); - $this->_drawMarker(); - $this->_canvas->endGroup(); - return true; - } -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Step.php,v 1.15 2005/11/27 22:21:16 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plot/Bar.php + */ +require_once 'Image/Graph/Plot/Bar.php'; + +/** + * Step chart. + * + * @category Images + * @package Image_Graph + * @subpackage Plot + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plot_Step extends Image_Graph_Plot +{ + + /** + * Perform the actual drawing on the legend. + * + * @param int $x0 The top-left x-coordinate + * @param int $y0 The top-left y-coordinate + * @param int $x1 The bottom-right x-coordinate + * @param int $y1 The bottom-right y-coordinate + * @access private + */ + function _drawLegendSample($x0, $y0, $x1, $y1) + { + $dx = abs($x1 - $x0) / 3; + $dy = abs($y1 - $y0) / 3; + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y1)); + $this->_canvas->addVertex(array('x' => $x0, 'y' => $y0 + $dy)); + + $this->_canvas->addVertex(array('x' => $x0 + $dx, 'y' => $y0 + $dy)); + $this->_canvas->addVertex(array('x' => $x0 + $dx, 'y' => $y0)); + + $this->_canvas->addVertex(array('x' => $x0 + 2*$dx, 'y' => $y0)); + $this->_canvas->addVertex(array('x' => $x0 + 2*$dx, 'y' => $y0 + 2*$dy)); + + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y0 + 2*$dy)); + $this->_canvas->addVertex(array('x' => $x1, 'y' => $y1)); + $this->_canvas->polygon(array('connect' => true)); + } + + /** + * PlotType [Constructor] + * + * A 'normal' step chart is 'stacked' + * + * @param Dataset $dataset The data set (value containter) to plot + * @param string $multiType The type of the plot + * @param string $title The title of the plot (used for legends, + * {@link Image_Graph_Legend}) + */ + function Image_Graph_Plot_Step(& $dataset, $multiType = 'stacked', $title = '') + { + $multiType = strtolower($multiType); + if (($multiType != 'stacked') && ($multiType != 'stacked100pct')) { + $multiType = 'stacked'; + } + parent::Image_Graph_Plot($dataset, $multiType, $title); + } + + /** + * Output the plot + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if (Image_Graph_Plot::_done() === false) { + return false; + } + + $this->_canvas->startGroup(get_class($this) . '_' . $this->_title); + $this->_clip(true); + + if ($this->_multiType == 'stacked100pct') { + $total = $this->_getTotals(); + } + + if ($this->_parent->_horizontal) { + $width = $this->height() / ($this->_maximumX() + 2) / 2; + } + else { + $width = $this->width() / ($this->_maximumX() + 2) / 2; + } + + reset($this->_dataset); + $key = key($this->_dataset); + $dataset =& $this->_dataset[$key]; + + $first = $dataset->first(); + $last = $dataset->last(); + + $point = array ('X' => $first['X'], 'Y' => '#min_pos#'); + $firstY = $this->_pointY($point) + ($this->_parent->_horizontal ? $width : 0); + $base[] = $firstY; + $firstX = $this->_pointX($point) - ($this->_parent->_horizontal ? 0 : $width); + $base[] = $firstX; + + $point = array ('X' => $last['X'], 'Y' => '#min_pos#'); + $base[] = $this->_pointY($point) - ($this->_parent->_horizontal ? $width : 0); + $base[] = $this->_pointX($point) + ($this->_parent->_horizontal ? 0 : $width); + + $first = ($this->_parent->_horizontal ? $firstY : $firstX); + + $keys = array_keys($this->_dataset); + foreach ($keys as $key) { + $dataset =& $this->_dataset[$key]; + $dataset->_reset(); + $polygon = array_reverse($base); + unset ($base); + $last = $first; + while ($point = $dataset->_next()) { + $x = $point['X']; + $p = $point; + + if (!isset($current[$x])) { + $current[$x] = 0; + } + + if ($this->_multiType == 'stacked100pct') { + $p['Y'] = 100 * ($current[$x] + $point['Y']) / $total['TOTAL_Y'][$x]; + } else { + $p['Y'] += $current[$x]; + } + $current[$x] += $point['Y']; + $point = $p; + + if ($this->_parent->_horizontal) { + $x0 = $this->_pointX($point); + $y0 = $last; + $x1 = $this->_pointX($point); + $last = $y1 = $this->_pointY($point) - $width; + } + else { + $x0 = $last; + $y0 = $this->_pointY($point); + $last = $x1 = $this->_pointX($point) + $width; + $y1 = $this->_pointY($point); + } + $polygon[] = $x0; $base[] = $y0; + $polygon[] = $y0; $base[] = $x0; + $polygon[] = $x1; $base[] = $y1; + $polygon[] = $y1; $base[] = $x1; + } + + while (list(, $x) = each($polygon)) { + list(, $y) = each($polygon); + $this->_canvas->addVertex(array('x' => $x, 'y' => $y)); + } + + $this->_getFillStyle($key); + $this->_getLineStyle($key); + $this->_canvas->polygon(array('connect' => true)); + } + unset($keys); + $this->_drawMarker(); + $this->_clip(false); + $this->_canvas->endGroup(); + return true; + } +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plotarea.php b/includes/pear/Image/Graph/Plotarea.php index b8b53af8..d7a70f40 100644 --- a/includes/pear/Image/Graph/Plotarea.php +++ b/includes/pear/Image/Graph/Plotarea.php @@ -1,1143 +1,1145 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Plotarea.php,v 1.21 2005/10/05 20:51:21 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Layout.php - */ -require_once 'Image/Graph/Layout.php'; - -/** - * Plot area used for drawing plots. - * - * The plotarea consists of an x-axis and an y-axis, the plotarea can plot multiple - * charts within one plotares, by simply adding them (the axis' will scale to the - * plots automatically). A graph can consist of more plotareas - * - * @category Images - * @package Image_Graph - * @subpackage Plotarea - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plotarea extends Image_Graph_Layout -{ - - /** - * The left most pixel of the 'real' plot area on the canvas - * @var int - * @access private - */ - var $_plotLeft = 0; - - /** - * The top most pixel of the 'real' plot area on the canvas - * @var int - * @access private - */ - var $_plotTop = 0; - - /** - * The right most pixel of the 'real' plot area on the canvas - * @var int - * @access private - */ - var $_plotRight = 0; - - /** - * The bottom most pixel of the 'real' plot area on the canvas - * @var int - * @access private - */ - var $_plotBottom = 0; - - /** - * The X axis - * @var Axis - * @access private - */ - var $_axisX = null; - - /** - * The Y axis - * @var Axis - * @access private - */ - var $_axisY = null; - - /** - * The secondary Y axis - * @var Axis - * @access private - */ - var $_axisYSecondary = null; - - /** - * The border style of the 'real' plot area - * @var LineStyle - * @access private - */ - var $_plotBorderStyle = null; - - /** - * Does any plot have any data? - * @var bool - * @access private - */ - var $_hasData = false; - - /** - * Is the plotarea horizontal? - * @var bool - * @access private - */ - var $_horizontal = false; - - /** - * Image_Graph_Plotarea [Constructor] - * - * @param string $axisX The class of the X axis (if omitted a std. axis is created) - * @param string $axisY The class of the Y axis (if omitted a std. axis is created) - * @param string $direction The direction of the plotarea - 'horizontal' or 'vertical' (default) - */ - function Image_Graph_Plotarea($axisX = 'Image_Graph_Axis_Category', $axisY = 'Image_Graph_Axis', $direction = 'vertical') - { - parent::Image_Graph_Layout(); - - $this->_padding = 5; - - include_once 'Image/Graph.php'; - - $this->_axisX =& Image_Graph::factory($axisX, IMAGE_GRAPH_AXIS_X); - $this->_axisX->_setParent($this); - - $this->_axisY =& Image_Graph::factory($axisY, IMAGE_GRAPH_AXIS_Y); - $this->_axisY->_setParent($this); - $this->_axisY->_setMinimum(0); - - $this->_fillStyle = false; - - if ($direction == 'horizontal') { - $this->_horizontal = true; - $this->_axisX->_transpose = true; - $this->_axisY->_transpose = true; - } - } - - /** - * Sets the parent. The parent chain should ultimately be a GraPHP object - * - * @see Image_Graph_Common - * @param Image_Graph_Common $parent The parent - * @access private - */ - function _setParent(& $parent) - { - parent::_setParent($parent); - if ($this->_axisX !== null) { - $this->_axisX->_setParent($this); - } - if ($this->_axisY !== null) { - $this->_axisY->_setParent($this); - } - if ($this->_axisYSecondary !== null) { - $this->_axisYSecondary->_setParent($this); - } - } - - /** - * Sets the plot border line style of the element. - * - * @param Image_Graph_Line $lineStyle The line style of the border - * @deprecated 0.3.0dev2 - 2004-12-16 - */ - function setPlotBorderStyle(& $plotBorderStyle) - { - } - - /** - * Adds an element to the plotarea - * - * @param Image_Graph_Element $element The element to add - * @param int $axis The axis to associate the element with, either - * IMAGE_GRAPH_AXIS_X, IMAGE_GRAPH_AXIS_Y, IMAGE_GRAPH_AXIS_Y_SECONDARY - * or the shorter string notations 'x', 'y' or 'ysec' (defaults to - * IMAGE_GRAPH_AXIS_Y) - * @return Image_Graph_Element The added element - * @see Image_Graph_Common::add() - */ - function &add(& $element, $axis = IMAGE_GRAPH_AXIS_Y) - { - if ($axis == 'x') { - $axis = IMAGE_GRAPH_AXIS_X; - } - if ($axis == 'y') { - $axis = IMAGE_GRAPH_AXIS_Y; - } - if ($axis == 'ysec') { - $axis = IMAGE_GRAPH_AXIS_Y_SECONDARY; - } - if (($axis == IMAGE_GRAPH_AXIS_Y_SECONDARY) && - ($this->_axisYSecondary == null)) - { - $this->_axisYSecondary =& Image_Graph::factory('axis', IMAGE_GRAPH_AXIS_Y_SECONDARY); - $this->_axisYSecondary->_setMinimum(0); - if ($this->_horizontal) { - $this->_axisYSecondary->_transpose = true; - } - } - - parent::add($element); - - if (is_a($element, 'Image_Graph_Plot')) { - $element->_setAxisY($axis); - // postpone extrema calculation until we calculate coordinates - //$this->_setExtrema($element); - } elseif (is_a($element, 'Image_Graph_Grid')) { - switch ($axis) { - case IMAGE_GRAPH_AXIS_X: - if ($this->_axisX != null) { - $element->_setPrimaryAxis($this->_axisX); - if ($this->_axisY != null) { - $element->_setSecondaryAxis($this->_axisY); - } - } - break; - case IMAGE_GRAPH_AXIS_Y: - if ($this->_axisY != null) { - $element->_setPrimaryAxis($this->_axisY); - if ($this->_axisX != null) { - $element->_setSecondaryAxis($this->_axisX); - } - } - break; - case IMAGE_GRAPH_AXIS_Y_SECONDARY: - if ($this->_axisYSecondary != null) { - $element->_setPrimaryAxis($this->_axisYSecondary); - if ($this->_axisX != null) { - $element->_setSecondaryAxis($this->_axisX); - } - } - break; - } - } elseif (is_a($element, 'Image_Graph_Axis')) { - switch ($element->_type) { - case IMAGE_GRAPH_AXIS_X: - $this->_axisX =& $element; - break; - - case IMAGE_GRAPH_AXIS_Y: - $this->_axisY =& $element; - break; - - case IMAGE_GRAPH_AXIS_Y_SECONDARY: - $this->_axisYSecondary =& $element; - break; - - } - if ($element->_getMinimum() == $element->_getMaximum()) { - $element->_setMinimum(0); - $element->_setMaximum(1); - } - } - return $element; - } - - /** - * Get the width of the 'real' plotarea - * - * @return int The width of the 'real' plotarea, ie not including space occupied by padding and axis - * @access private - */ - function _plotWidth() - { - return abs($this->_plotRight - $this->_plotLeft); - } - - /** - * Get the height of the 'real' plotarea - * - * @return int The height of the 'real' plotarea, ie not including space - * occupied by padding and axis - * @access private - */ - function _plotHeight() - { - return abs($this->_plotBottom - $this->_plotTop); - } - - /** - * Set the extrema of the axis - * - * @param Image_Graph_Plot $plot The plot that 'hold' the values - * @access private - */ - function _setExtrema(& $plot) - { - if (($this->_axisX != null) && ($this->_axisX->_isNumeric())) { - $this->_axisX->_setMinimum($plot->_minimumX()); - $this->_axisX->_setMaximum($plot->_maximumX()); - } - - if (($plot->_axisY == IMAGE_GRAPH_AXIS_Y_SECONDARY) && - ($this->_axisYSecondary !== null) && - ($this->_axisYSecondary->_isNumeric())) - { - $this->_axisYSecondary->_setMinimum($plot->_minimumY()); - $this->_axisYSecondary->_setMaximum($plot->_maximumY()); - } elseif (($this->_axisY != null) && ($this->_axisY->_isNumeric())) { - $this->_axisY->_setMinimum($plot->_minimumY()); - $this->_axisY->_setMaximum($plot->_maximumY()); - } - - $datasets =& $plot->dataset(); - if (!is_array($datasets)) { - $datasets = array($datasets); - } - - $keys = array_keys($datasets); - foreach ($keys as $key) { - $dataset =& $datasets[$key]; - if ($dataset->count() > 0) { - $this->_hasData = true; - } - - if (is_a($dataset, 'Image_Graph_Dataset')) { - if (($this->_axisX != null) && (!$this->_axisX->_isNumeric())) { - $this->_axisX->_applyDataset($dataset); - } - - if (($plot->_axisY == IMAGE_GRAPH_AXIS_Y_SECONDARY) && - ($this->_axisYSecondary !== null) && - (!$this->_axisYSecondary->_isNumeric())) - { - $this->_axisYSecondary->_applyDataset($dataset); - } elseif (($this->_axisY != null) && (!$this->_axisY->_isNumeric())) { - $this->_axisY->_applyDataset($dataset); - } - } - } - unset($keys); - } - - /** - * Left boundary of the background fill area - * - * @return int Leftmost position on the canvas - * @access private - */ - function _fillLeft() - { - return $this->_plotLeft; - } - - /** - * Top boundary of the background fill area - * - * @return int Topmost position on the canvas - * @access private - */ - function _fillTop() - { - return $this->_plotTop; - } - - /** - * Right boundary of the background fill area - * - * @return int Rightmost position on the canvas - * @access private - */ - function _fillRight() - { - return $this->_plotRight; - } - - /** - * Bottom boundary of the background fill area - * - * @return int Bottommost position on the canvas - * @access private - */ - function _fillBottom() - { - return $this->_plotBottom; - } - - /** - * Get the point from the x-axis - * @param array $value The value array - * @param int $min The minimum pixel position possible - * @param int $max The maximum pixel position possible - * @return int The pixel position from the axis - * @access private - */ - function _axisPointX($value, $min, $max) - { - if (($this->_axisX == null) || (!isset($value['X']))) { - return false; - } - - if ($value['X'] === '#min#') { - return $min; - } - if ($value['X'] === '#max#') { - return $max; - } - - return $this->_axisX->_point($value['X']); - } - - /** - * Get the point from the x-axis - * @param array $value The value array - * @param int $min The minimum pixel position possible - * @param int $max The maximum pixel position possible - * @return int The pixel position from the axis - * @access private - */ - function _axisPointY($value, $min, $max) - { - if (!isset($value['Y'])) { - return false; - } - - if (($value['Y'] === '#min_pos#') || ($value['Y'] === '#max_nex#')) { - // return the minimum (bottom) position or if negative then zero - // or the maxmum (top) position or if positive then zero - if ((isset($value['AXIS_Y'])) && - ($value['AXIS_Y'] == IMAGE_GRAPH_AXIS_Y_SECONDARY) && - ($this->_axisYSecondary !== null) - ) { - $axisY =& $this->_axisYSecondary; - } else { - $axisY =& $this->_axisY; - } - if ($value['Y'] === '#min_pos#') { - return $axisY->_point(max(0, $axisY->_getMinimum())); - } else { - return $axisY->_point(min(0, $axisY->_getMaximum())); - } - } - - if ($value['Y'] === '#min#') { - return $min; - } - if ($value['Y'] === '#max#') { - return $max; - } - - if ((isset($value['AXIS_Y'])) && - ($value['AXIS_Y'] == IMAGE_GRAPH_AXIS_Y_SECONDARY) - ) { - if ($this->_axisYSecondary !== null) { - return $this->_axisYSecondary->_point($value['Y']); - } - } else { - if ($this->_axisY !== null) { - return $this->_axisY->_point($value['Y']); - } - } - return false; - } - - /** - * Get the X pixel position represented by a value - * - * @param double Value the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointX($value) - { - if ($this->_horizontal) { - return $this->_axisPointY($value, $this->_plotLeft, $this->_plotRight); - } - else { - return $this->_axisPointX($value, $this->_plotLeft, $this->_plotRight); - } - } - - /** - * Get the Y pixel position represented by a value - * - * @param double Value the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointY($value) - { - if ($this->_horizontal) { - return $this->_axisPointX($value, $this->_plotBottom, $this->_plotTop); - } - else { - return $this->_axisPointY($value, $this->_plotBottom, $this->_plotTop); - } - } - - /** - * Return the minimum value of the specified axis - * - * @param int $axis The axis to return the minimum value of (see {$link - * Image_Graph_Plotarea::getAxis()}) - * @return double The minimum value of the axis - * @access private - */ - function _getMinimum($axis = IMAGE_GRAPH_AXIS_Y) - { - $axis =& $this->getAxis($axis); - if ($axis !== null) { - return $axis->_getMinimum(); - } else { - return 0; - } - } - - /** - * Return the maximum value of the specified axis - * - * @param int $axis The axis to return the maximum value of(see {$link - * Image_Graph_Plotarea::getAxis()}) - * @return double The maximum value of the axis - * @access private - */ - function _getMaximum($axis = IMAGE_GRAPH_AXIS_Y) - { - $axis =& $this->getAxis($axis); - if ($axis !== null) { - return $axis->_getMaximum(); - } else { - return 0; - } - } - - /** - * Return the label distance for the specified axis. - * - * @param int $axis The axis to return the label distance for - * @return int The distance between 2 adjacent labels - * @access private - */ - function _labelDistance($axis) - { - $axis =& $this->getAxis($axis); - if ($axis !== null) { - return $axis->_labelDistance(); - } - - return false; - } - - /** - * Hides the axis - */ - function hideAxis($axis = false) - { - if (((!$axis) || ($axis === $this->_axisX) || ($axis === 'x')) && ($this->_axisX != null)) { - $this->_axisX->hide(); - } - if (((!$axis) || ($axis === $this->_axisY) || ($axis === 'y')) && ($this->_axisY != null)) { - $this->_axisY->hide(); - } - if (((!$axis) || ($axis === $this->_axisYSecondary) || ($axis === 'y_sec')) && ($this->_axisYSecondary != null)) { - $this->_axisYSecondary->hide(); - } - } - - /** - * Clears/removes the axis - */ - function clearAxis() - { - $this->_axisX = $this->_axisY = $this->_axisYSecondary = null; - } - - /** - * Get axis. - * - * Possible values are IMAGE_GRAPH_AXIS_X, IMAGE_GRAPH_AXIS_Y, - * IMAGE_GRAPH_AXIS_Y_SECONDARY or a short hand notation using - * string identifiers: 'x', 'y', 'ysec' - * - * @param int $axis The axis to return - * @return Image_Graph_Axis The axis - */ - function &getAxis($axis = IMAGE_GRAPH_AXIS_X) - { - switch ($axis) { - case IMAGE_GRAPH_AXIS_X: - case 'x': - return $this->_axisX; - - case IMAGE_GRAPH_AXIS_Y: - case 'y': - return $this->_axisY; - - case IMAGE_GRAPH_AXIS_Y_SECONDARY: - case 'ysec': - return $this->_axisYSecondary; - - } - return null; - } - - /** - * Update coordinates - * - * @access private - */ - function _updateCoords() - { - if (is_array($this->_elements)) { - $keys = array_keys($this->_elements); - foreach ($keys as $key) { - $element =& $this->_elements[$key]; - if (is_a($element, 'Image_Graph_Plot')) { - if (((is_a($element, 'Image_Graph_Plot_Bar')) || - (is_a($element, 'Image_Graph_Plot_Step')) || - (is_a($element, 'Image_Graph_Plot_Dot')) || - (is_a($element, 'Image_Graph_Plot_CandleStick')) || - (is_a($element, 'Image_Graph_Plot_BoxWhisker')) || - (is_a($element, 'Image_Graph_Plot_Impulse'))) && - ($this->_axisX != null)) - { - $this->_axisX->_pushValues(); - } - $this->_setExtrema($element); - } - } - unset($keys); - } - - $this->_calcEdges(); - - $pctWidth = (int) ($this->width() * 0.05); - $pctHeight = (int) ($this->height() * 0.05); - - $left = $this->_left + $this->_padding; - $top = $this->_top + $this->_padding; - $right = $this->_right - $this->_padding; - $bottom = $this->_bottom - $this->_padding; - - // temporary place holder for axis point calculations - $axisPoints['x'] = array($left, $top, $right, $bottom); - $axisPoints['y'] = $axisPoints['x']; - $axisPoints['y2'] = $axisPoints['x']; - - if ($this->_axisX !== null) { - $intersectX = $this->_axisX->_getAxisIntersection(); - $sizeX = $this->_axisX->_size(); - $this->_axisX->_setCoords($left, $top, $right, $bottom); - $this->_axisX->_updateCoords(); - } - - if ($this->_axisY !== null) { - $intersectY = $this->_axisY->_getAxisIntersection(); - $sizeY = $this->_axisY->_size(); - $this->_axisY->_setCoords($left, $top, $right, $bottom); - $this->_axisY->_updateCoords(); - } - - if ($this->_axisYSecondary !== null) { - $intersectYsec = $this->_axisYSecondary->_getAxisIntersection(); - $sizeYsec = $this->_axisYSecondary->_size(); - $this->_axisYSecondary->_setCoords($left, $top, $right, $bottom); - $this->_axisYSecondary->_updateCoords(); - } - - $axisCoordAdd = array('left' => 0, 'right' => 0, 'top' => 0, 'bottom' => 0); - - if ($this->_axisY != null) { - if ($this->_axisX != null) { - $pos = $this->_axisX->_intersectPoint($intersectY['value']); - } else { - $pos = ($this->_horizontal ? $bottom : $left); - } - - if ($this->_horizontal) { - if (($pos + $sizeY) > $bottom) { - $axisCoordAdd['bottom'] = ($pos + $sizeY) - $bottom; - // the y-axis position needs to be recalculated! - } else { - // top & bottom may need to be adjusted when the x-axis has been - // calculated! - $this->_axisY->_setCoords( - $left, - $pos, - $right, - $pos + $sizeY - ); - $this->_axisY->_updateCoords(); - } - } - else { - if (($pos - $sizeY) < $left) { - $axisCoordAdd['left'] = $left - ($pos - $sizeY); - // the y-axis position needs to be recalculated! - } else { - // top & bottom may need to be adjusted when the x-axis has been - // calculated! - $this->_axisY->_setCoords( - $pos - $sizeY, - $top, - $pos, - $bottom - ); - $this->_axisY->_updateCoords(); - } - } - } - - if ($this->_axisYSecondary != null) { - if ($this->_axisX != null) { - $pos = $this->_axisX->_intersectPoint($intersectYsec['value']); - } else { - $pos = ($this->_horizontal ? $top : $right); - } - - if ($this->_horizontal) { - if (($pos - $sizeYsec) < $top) { - $axisCoordAdd['top'] = $top - ($pos - $sizeYsec); - // the secondary y-axis position need to be recalculated - } else { - // top & bottom may need to be adjusted when the x-axis has been - // calculated! - $this->_axisYSecondary->_setCoords( - $left, - $pos - $sizeY, - $right, - $pos - ); - $this->_axisYSecondary->_updateCoords(); - } - } - else { - if (($pos + $sizeYsec) > $right) { - $axisCoordAdd['right'] = ($pos + $sizeYsec) - $right; - // the secondary y-axis position need to be recalculated - } else { - // top & bottom may need to be adjusted when the x-axis has been - // calculated! - $this->_axisYSecondary->_setCoords( - $pos, - $top, - $pos + $sizeY, - $bottom - ); - $this->_axisYSecondary->_updateCoords(); - } - } - } - - if ($this->_axisX != null) { - if (($intersectX['axis'] == IMAGE_GRAPH_AXIS_Y_SECONDARY) && - ($this->_axisYSecondary !== null) - ) { - $axis =& $this->_axisYSecondary; - } elseif ($this->_axisY !== null) { - $axis =& $this->_axisY; - } else { - $axis = false; - } - - if ($axis !== false) { - $pos = $axis->_intersectPoint($intersectX['value']); - } else { - $pos = ($this->_horizontal ? $left : $bottom); - } - - if ($this->_horizontal) { - if (($pos - $sizeX) < $left) { - $axisCoordAdd['left'] = $left - ($pos - $sizeX); - $pos = $left + $sizeX; - } - - $this->_axisX->_setCoords( - $pos - $sizeX, - $top + $axisCoordAdd['top'], - $pos, - $bottom - $axisCoordAdd['bottom'] - ); - $this->_axisX->_updateCoords(); - } - else { - if (($pos + $sizeX) > $bottom) { - $axisCoordAdd['bottom'] = ($pos + $sizeX) - $bottom; - $pos = $bottom - $sizeX; - } - - $this->_axisX->_setCoords( - $left + $axisCoordAdd['left'], - $pos, - $right - $axisCoordAdd['right'], - $pos + $sizeX - ); - $this->_axisX->_updateCoords(); - } - } - - if ($this->_horizontal) { - if (($this->_axisX !== null) && - (($axisCoordAdd['top'] != 0) || - ($axisCoordAdd['bottom'] != 0)) - ) { - // readjust y-axis for better estimate of position - if ($this->_axisY !== null) { - $pos = $this->_axisX->_intersectPoint($intersectY['value']); - $this->_axisY->_setCoords( - false, - $pos, - false, - $pos + $sizeY - ); - $this->_axisY->_updateCoords(); - } - - if ($this->_axisYSecondary !== null) { - $pos = $this->_axisX->_intersectPoint($intersectYsec['value']); - $this->_axisYSecondary->_setCoords( - false, - $pos - $sizeYsec, - false, - $pos - ); - $this->_axisYSecondary->_updateCoords(); - } - } - - // adjust top and bottom of y-axis - if ($this->_axisY !== null) { - $this->_axisY->_setCoords( - $left + $axisCoordAdd['left'], - false, - $right - $axisCoordAdd['right'], - false - ); - $this->_axisY->_updateCoords(); - } - - // adjust top and bottom of y-axis - if ($this->_axisYSecondary !== null) { - $this->_axisYSecondary->_setCoords( - $left + $axisCoordAdd['left'], - false, - $right - $axisCoordAdd['right'], - false - ); - $this->_axisYSecondary->_updateCoords(); - } - - if ($this->_axisX !== null) { - $this->_plotTop = $this->_axisX->_top; - $this->_plotBottom = $this->_axisX->_bottom; - } else { - $this->_plotTop = $top; - $this->_plotBottom = $bottom; - } - - if ($this->_axisY !== null) { - $this->_plotLeft = $this->_axisY->_left; - $this->_plotRight = $this->_axisY->_right; - } elseif ($this->_axisYSecondary !== null) { - $this->_plotLeft = $this->_axisYSecondary->_left; - $this->_plotRight = $this->_axisYSecondary->_right; - } else { - $this->_plotLeft = $this->_left; - $this->_plotRight = $this->_right; - } - } - else { - if (($this->_axisX !== null) && - (($axisCoordAdd['left'] != 0) || - ($axisCoordAdd['right'] != 0)) - ) { - // readjust y-axis for better estimate of position - if ($this->_axisY !== null) { - $pos = $this->_axisX->_intersectPoint($intersectY['value']); - $this->_axisY->_setCoords( - $pos - $sizeY, - false, - $pos, - false - ); - $this->_axisY->_updateCoords(); - } - - if ($this->_axisYSecondary !== null) { - $pos = $this->_axisX->_intersectPoint($intersectYsec['value']); - $this->_axisYSecondary->_setCoords( - $pos, - false, - $pos + $sizeYsec, - false - ); - $this->_axisYSecondary->_updateCoords(); - } - } - - // adjust top and bottom of y-axis - if ($this->_axisY !== null) { - $this->_axisY->_setCoords( - false, - $top + $axisCoordAdd['top'], - false, - $bottom - $axisCoordAdd['bottom'] - ); - $this->_axisY->_updateCoords(); - } - - // adjust top and bottom of y-axis - if ($this->_axisYSecondary !== null) { - $this->_axisYSecondary->_setCoords( - false, - $top + $axisCoordAdd['top'], - false, - $bottom - $axisCoordAdd['bottom'] - ); - $this->_axisYSecondary->_updateCoords(); - } - - if ($this->_axisX !== null) { - $this->_plotLeft = $this->_axisX->_left; - $this->_plotRight = $this->_axisX->_right; - } else { - $this->_plotLeft = $left; - $this->_plotRight = $right; - } - - if ($this->_axisY !== null) { - $this->_plotTop = $this->_axisY->_top; - $this->_plotBottom = $this->_axisY->_bottom; - } elseif ($this->_axisYSecondary !== null) { - $this->_plotTop = $this->_axisYSecondary->_top; - $this->_plotBottom = $this->_axisYSecondary->_bottom; - } else { - $this->_plotTop = $this->_top; - $this->_plotBottom = $this->_bottom; - } - } - - Image_Graph_Element::_updateCoords(); -/* - if ($this->_axisX != null) { - $this->_axisX->_updateCoords(); - } - if ($this->_axisY != null) { - $this->_axisY->_updateCoords(); - } - if ($this->_axisYSecondary != null) { - $this->_axisYSecondary->_updateCoords(); - }*/ - } - - /** - * Set the axis padding for a specified position. - * - * The axis padding is padding "inside" the plotarea (i.e. to put some space - * between the axis line and the actual plot). - * - * This can be specified in a number of ways: - * - * 1) Specify an associated array with 'left', 'top', 'right' and 'bottom' - * indices with values for the paddings. Leave out 2nd parameter. - * - * 2) Specify an overall padding as the first parameter - * - * 3) Specify the padding and position with position values as mentioned - * above - * - * Normally you'd only consider applying axis padding to a category x-axis. - * - * @param mixed $value The value/padding - * @param mixed $position The "position" of the padding - */ - function setAxisPadding($value, $position = false) - { - if ($position === false) { - if (is_array($value)) { - if ($this->_horizontal) { - if ((isset($value['top'])) && ($this->_axisX !== null)) { - $this->_axisX->_setAxisPadding('low', $value['top']); - } - if ((isset($value['bottom'])) && ($this->_axisX !== null)) { - $this->_axisX->_setAxisPadding('high', $value['bottom']); - } - if ((isset($value['left'])) && ($this->_axisY !== null)) { - $this->_axisY->_setAxisPadding('low', $value['left']); - } - if ((isset($value['right'])) && ($this->_axisY !== null)) { - $this->_axisY->_setAxisPadding('high', $value['right']); - } - if ((isset($value['left'])) && ($this->_axisYSecondary !== null)) { - $this->_axisYSecondary->_setAxisPadding('low', $value['left']); - } - if ((isset($value['right'])) && ($this->_axisYSecondary !== null)) { - $this->_axisYSecondary->_setAxisPadding('high', $value['right']); - } - } - else { - if ((isset($value['left'])) && ($this->_axisX !== null)) { - $this->_axisX->_setAxisPadding('low', $value['left']); - } - if ((isset($value['right'])) && ($this->_axisX !== null)) { - $this->_axisX->_setAxisPadding('high', $value['right']); - } - if ((isset($value['bottom'])) && ($this->_axisY !== null)) { - $this->_axisY->_setAxisPadding('low', $value['bottom']); - } - if ((isset($value['top'])) && ($this->_axisY !== null)) { - $this->_axisY->_setAxisPadding('high', $value['top']); - } - if ((isset($value['bottom'])) && ($this->_axisYSecondary !== null)) { - $this->_axisYSecondary->_setAxisPadding('low', $value['bottom']); - } - if ((isset($value['top'])) && ($this->_axisYSecondary !== null)) { - $this->_axisYSecondary->_setAxisPadding('high', $value['top']); - } - } - } else { - if ($this->_axisX !== null) { - $this->_axisX->_setAxisPadding('low', $value); - $this->_axisX->_setAxisPadding('high', $value); - } - if ($this->_axisY !== null) { - $this->_axisY->_setAxisPadding('low', $value); - $this->_axisY->_setAxisPadding('high', $value); - } - if ($this->_axisYSecondary !== null) { - $this->_axisYSecondary->_setAxisPadding('low', $value); - $this->_axisYSecondary->_setAxisPadding('high', $value); - } - } - } else { - switch ($position) { - case 'left': - if ($this->_horizontal) { - if ($this->_axisY !== null) { - $this->_axisY->_setAxisPadding('low', $value); - } - if ($this->_axisYSecondary !== null) { - $this->_axisYSecondary->_setAxisPadding('low', $value); - } - } - else if ($this->_axisX !== null) { - $this->_axisX->_setAxisPadding('low', $value); - } - break; - - case 'right': - if ($this->_horizontal) { - if ($this->_axisY !== null) { - $this->_axisY->_setAxisPadding('high', $value); - } - if ($this->_axisYSecondary !== null) { - $this->_axisYSecondary->_setAxisPadding('high', $value); - } - } - else if ($this->_axisX !== null) { - $this->_axisX->_setAxisPadding('high', $value); - } - break; - - case 'top': - if (!$this->_horizontal) { - if ($this->_axisY !== null) { - $this->_axisY->_setAxisPadding('high', $value); - } - if ($this->_axisYSecondary !== null) { - $this->_axisYSecondary->_setAxisPadding('high', $value); - } - } - else if ($this->_axisX !== null) { - $this->_axisX->_setAxisPadding('high', $value); - } - break; - - case 'bottom': - if (!$this->_horizontal) { - if ($this->_axisY !== null) { - $this->_axisY->_setAxisPadding('low', $value); - } - if ($this->_axisYSecondary !== null) { - $this->_axisYSecondary->_setAxisPadding('low', $value); - } - } - else if ($this->_axisX !== null) { - $this->_axisX->_setAxisPadding('low', $value); - } - break; - } - } - } - - /** - * Output the plotarea to the canvas - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if ($this->_hasData) { - $this->_canvas->startGroup(get_class($this)); - - if ($this->_axisX != null) { - $this->add($this->_axisX); - } - if ($this->_axisY != null) { - $this->add($this->_axisY); - } - if ($this->_axisYSecondary != null) { - $this->add($this->_axisYSecondary); - } - - $this->_getFillStyle(); - $this->_canvas->rectangle( - array( - 'x0' => $this->_plotLeft, - 'y0' => $this->_plotTop, - 'x1' => $this->_plotRight, - 'y1' => $this->_plotBottom - ) - ); - $result = parent::_done(); - $this->_canvas->endGroup(); - return $result; - } else { - // no data -> do nothing at all! - return true; - } - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Plotarea.php,v 1.23 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Layout.php + */ +require_once 'Image/Graph/Layout.php'; + +/** + * Plot area used for drawing plots. + * + * The plotarea consists of an x-axis and an y-axis, the plotarea can plot multiple + * charts within one plotares, by simply adding them (the axis' will scale to the + * plots automatically). A graph can consist of more plotareas + * + * @category Images + * @package Image_Graph + * @subpackage Plotarea + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plotarea extends Image_Graph_Layout +{ + + /** + * The left most pixel of the 'real' plot area on the canvas + * @var int + * @access private + */ + var $_plotLeft = 0; + + /** + * The top most pixel of the 'real' plot area on the canvas + * @var int + * @access private + */ + var $_plotTop = 0; + + /** + * The right most pixel of the 'real' plot area on the canvas + * @var int + * @access private + */ + var $_plotRight = 0; + + /** + * The bottom most pixel of the 'real' plot area on the canvas + * @var int + * @access private + */ + var $_plotBottom = 0; + + /** + * The X axis + * @var Axis + * @access private + */ + var $_axisX = null; + + /** + * The Y axis + * @var Axis + * @access private + */ + var $_axisY = null; + + /** + * The secondary Y axis + * @var Axis + * @access private + */ + var $_axisYSecondary = null; + + /** + * The border style of the 'real' plot area + * @var LineStyle + * @access private + */ + var $_plotBorderStyle = null; + + /** + * Does any plot have any data? + * @var bool + * @access private + */ + var $_hasData = false; + + /** + * Is the plotarea horizontal? + * @var bool + * @access private + */ + var $_horizontal = false; + + /** + * Image_Graph_Plotarea [Constructor] + * + * @param string $axisX The class of the X axis (if omitted a std. axis is created) + * @param string $axisY The class of the Y axis (if omitted a std. axis is created) + * @param string $direction The direction of the plotarea - 'horizontal' or 'vertical' (default) + */ + function Image_Graph_Plotarea($axisX = 'Image_Graph_Axis_Category', $axisY = 'Image_Graph_Axis', $direction = 'vertical') + { + parent::Image_Graph_Layout(); + + $this->_padding = array('left' => 5, 'top' => 5, 'right' => 5, 'bottom' => 5);; + + include_once 'Image/Graph.php'; + + $this->_axisX =& Image_Graph::factory($axisX, IMAGE_GRAPH_AXIS_X); + $this->_axisX->_setParent($this); + + $this->_axisY =& Image_Graph::factory($axisY, IMAGE_GRAPH_AXIS_Y); + $this->_axisY->_setParent($this); + $this->_axisY->_setMinimum(0); + + $this->_fillStyle = false; + + if ($direction == 'horizontal') { + $this->_horizontal = true; + $this->_axisX->_transpose = true; + $this->_axisY->_transpose = true; + } + } + + /** + * Sets the parent. The parent chain should ultimately be a GraPHP object + * + * @see Image_Graph_Common + * @param Image_Graph_Common $parent The parent + * @access private + */ + function _setParent(& $parent) + { + parent::_setParent($parent); + if ($this->_axisX !== null) { + $this->_axisX->_setParent($this); + } + if ($this->_axisY !== null) { + $this->_axisY->_setParent($this); + } + if ($this->_axisYSecondary !== null) { + $this->_axisYSecondary->_setParent($this); + } + } + + /** + * Sets the plot border line style of the element. + * + * @param Image_Graph_Line $lineStyle The line style of the border + * @deprecated 0.3.0dev2 - 2004-12-16 + */ + function setPlotBorderStyle(& $plotBorderStyle) + { + } + + /** + * Adds an element to the plotarea + * + * @param Image_Graph_Element $element The element to add + * @param int $axis The axis to associate the element with, either + * IMAGE_GRAPH_AXIS_X, IMAGE_GRAPH_AXIS_Y, IMAGE_GRAPH_AXIS_Y_SECONDARY + * or the shorter string notations 'x', 'y' or 'ysec' (defaults to + * IMAGE_GRAPH_AXIS_Y) + * @return Image_Graph_Element The added element + * @see Image_Graph_Common::add() + */ + function &add(& $element, $axis = IMAGE_GRAPH_AXIS_Y) + { + if ($axis == 'x') { + $axis = IMAGE_GRAPH_AXIS_X; + } + if ($axis == 'y') { + $axis = IMAGE_GRAPH_AXIS_Y; + } + if ($axis == 'ysec') { + $axis = IMAGE_GRAPH_AXIS_Y_SECONDARY; + } + if (($axis == IMAGE_GRAPH_AXIS_Y_SECONDARY) && + ($this->_axisYSecondary == null)) + { + $this->_axisYSecondary =& Image_Graph::factory('axis', IMAGE_GRAPH_AXIS_Y_SECONDARY); + $this->_axisYSecondary->_setMinimum(0); + if ($this->_horizontal) { + $this->_axisYSecondary->_transpose = true; + } + } + + parent::add($element); + + if (is_a($element, 'Image_Graph_Plot')) { + $element->_setAxisY($axis); + // postpone extrema calculation until we calculate coordinates + //$this->_setExtrema($element); + } elseif (is_a($element, 'Image_Graph_Grid')) { + switch ($axis) { + case IMAGE_GRAPH_AXIS_X: + if ($this->_axisX != null) { + $element->_setPrimaryAxis($this->_axisX); + if ($this->_axisY != null) { + $element->_setSecondaryAxis($this->_axisY); + } + } + break; + case IMAGE_GRAPH_AXIS_Y: + if ($this->_axisY != null) { + $element->_setPrimaryAxis($this->_axisY); + if ($this->_axisX != null) { + $element->_setSecondaryAxis($this->_axisX); + } + } + break; + case IMAGE_GRAPH_AXIS_Y_SECONDARY: + if ($this->_axisYSecondary != null) { + $element->_setPrimaryAxis($this->_axisYSecondary); + if ($this->_axisX != null) { + $element->_setSecondaryAxis($this->_axisX); + } + } + break; + } + } elseif (is_a($element, 'Image_Graph_Axis')) { + switch ($element->_type) { + case IMAGE_GRAPH_AXIS_X: + $this->_axisX =& $element; + break; + + case IMAGE_GRAPH_AXIS_Y: + $this->_axisY =& $element; + break; + + case IMAGE_GRAPH_AXIS_Y_SECONDARY: + $this->_axisYSecondary =& $element; + break; + + } + if ($element->_getMinimum() == $element->_getMaximum()) { + $element->_setMinimum(0); + $element->_setMaximum(1); + } + } + return $element; + } + + /** + * Get the width of the 'real' plotarea + * + * @return int The width of the 'real' plotarea, ie not including space occupied by padding and axis + * @access private + */ + function _plotWidth() + { + return abs($this->_plotRight - $this->_plotLeft); + } + + /** + * Get the height of the 'real' plotarea + * + * @return int The height of the 'real' plotarea, ie not including space + * occupied by padding and axis + * @access private + */ + function _plotHeight() + { + return abs($this->_plotBottom - $this->_plotTop); + } + + /** + * Set the extrema of the axis + * + * @param Image_Graph_Plot $plot The plot that 'hold' the values + * @access private + */ + function _setExtrema(& $plot) + { + if (($this->_axisX != null) && ($this->_axisX->_isNumeric())) { + $this->_axisX->_setMinimum($plot->_minimumX()); + $this->_axisX->_setMaximum($plot->_maximumX()); + } + + if (($plot->_axisY == IMAGE_GRAPH_AXIS_Y_SECONDARY) && + ($this->_axisYSecondary !== null) && + ($this->_axisYSecondary->_isNumeric())) + { + $this->_axisYSecondary->_setMinimum($plot->_minimumY()); + $this->_axisYSecondary->_setMaximum($plot->_maximumY()); + } elseif (($this->_axisY != null) && ($this->_axisY->_isNumeric())) { + $this->_axisY->_setMinimum($plot->_minimumY()); + $this->_axisY->_setMaximum($plot->_maximumY()); + } + + $datasets =& $plot->dataset(); + if (!is_array($datasets)) { + $datasets = array($datasets); + } + + $keys = array_keys($datasets); + foreach ($keys as $key) { + $dataset =& $datasets[$key]; + if ($dataset->count() > 0) { + $this->_hasData = true; + } + + if (is_a($dataset, 'Image_Graph_Dataset')) { + if (($this->_axisX != null) && (!$this->_axisX->_isNumeric())) { + $this->_axisX->_applyDataset($dataset); + } + + if (($plot->_axisY == IMAGE_GRAPH_AXIS_Y_SECONDARY) && + ($this->_axisYSecondary !== null) && + (!$this->_axisYSecondary->_isNumeric())) + { + $this->_axisYSecondary->_applyDataset($dataset); + } elseif (($this->_axisY != null) && (!$this->_axisY->_isNumeric())) { + $this->_axisY->_applyDataset($dataset); + } + } + } + unset($keys); + } + + /** + * Left boundary of the background fill area + * + * @return int Leftmost position on the canvas + * @access private + */ + function _fillLeft() + { + return $this->_plotLeft; + } + + /** + * Top boundary of the background fill area + * + * @return int Topmost position on the canvas + * @access private + */ + function _fillTop() + { + return $this->_plotTop; + } + + /** + * Right boundary of the background fill area + * + * @return int Rightmost position on the canvas + * @access private + */ + function _fillRight() + { + return $this->_plotRight; + } + + /** + * Bottom boundary of the background fill area + * + * @return int Bottommost position on the canvas + * @access private + */ + function _fillBottom() + { + return $this->_plotBottom; + } + + /** + * Get the point from the x-axis + * @param array $value The value array + * @param int $min The minimum pixel position possible + * @param int $max The maximum pixel position possible + * @return int The pixel position from the axis + * @access private + */ + function _axisPointX($value, $min, $max) + { + if (($this->_axisX == null) || (!isset($value['X']))) { + return false; + } + + if ($value['X'] === '#min#') { + return $min; + } + if ($value['X'] === '#max#') { + return $max; + } + + return $this->_axisX->_point($value['X']); + } + + /** + * Get the point from the x-axis + * @param array $value The value array + * @param int $min The minimum pixel position possible + * @param int $max The maximum pixel position possible + * @return int The pixel position from the axis + * @access private + */ + function _axisPointY($value, $min, $max) + { + if (!isset($value['Y'])) { + return false; + } + + if (($value['Y'] === '#min_pos#') || ($value['Y'] === '#max_nex#')) { + // return the minimum (bottom) position or if negative then zero + // or the maxmum (top) position or if positive then zero + if ((isset($value['AXIS_Y'])) && + ($value['AXIS_Y'] == IMAGE_GRAPH_AXIS_Y_SECONDARY) && + ($this->_axisYSecondary !== null) + ) { + $axisY =& $this->_axisYSecondary; + } else { + $axisY =& $this->_axisY; + } + if ($value['Y'] === '#min_pos#') { + return $axisY->_point(max(0, $axisY->_getMinimum())); + } else { + return $axisY->_point(min(0, $axisY->_getMaximum())); + } + } + + if ($value['Y'] === '#min#') { + return $min; + } + if ($value['Y'] === '#max#') { + return $max; + } + + if ((isset($value['AXIS_Y'])) && + ($value['AXIS_Y'] == IMAGE_GRAPH_AXIS_Y_SECONDARY) + ) { + if ($this->_axisYSecondary !== null) { + return $this->_axisYSecondary->_point($value['Y']); + } + } else { + if ($this->_axisY !== null) { + return $this->_axisY->_point($value['Y']); + } + } + return false; + } + + /** + * Get the X pixel position represented by a value + * + * @param double Value the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointX($value) + { + if ($this->_horizontal) { + return $this->_axisPointY($value, $this->_plotLeft, $this->_plotRight); + } + else { + return $this->_axisPointX($value, $this->_plotLeft, $this->_plotRight); + } + } + + /** + * Get the Y pixel position represented by a value + * + * @param double Value the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointY($value) + { + if ($this->_horizontal) { + return $this->_axisPointX($value, $this->_plotBottom, $this->_plotTop); + } + else { + return $this->_axisPointY($value, $this->_plotBottom, $this->_plotTop); + } + } + + /** + * Return the minimum value of the specified axis + * + * @param int $axis The axis to return the minimum value of (see {$link + * Image_Graph_Plotarea::getAxis()}) + * @return double The minimum value of the axis + * @access private + */ + function _getMinimum($axis = IMAGE_GRAPH_AXIS_Y) + { + $axis =& $this->getAxis($axis); + if ($axis !== null) { + return $axis->_getMinimum(); + } else { + return 0; + } + } + + /** + * Return the maximum value of the specified axis + * + * @param int $axis The axis to return the maximum value of(see {$link + * Image_Graph_Plotarea::getAxis()}) + * @return double The maximum value of the axis + * @access private + */ + function _getMaximum($axis = IMAGE_GRAPH_AXIS_Y) + { + $axis =& $this->getAxis($axis); + if ($axis !== null) { + return $axis->_getMaximum(); + } else { + return 0; + } + } + + /** + * Return the label distance for the specified axis. + * + * @param int $axis The axis to return the label distance for + * @return int The distance between 2 adjacent labels + * @access private + */ + function _labelDistance($axis) + { + $axis =& $this->getAxis($axis); + if ($axis !== null) { + return $axis->_labelDistance(); + } + + return false; + } + + /** + * Hides the axis + */ + function hideAxis($axis = false) + { + if (((!$axis) || ($axis === $this->_axisX) || ($axis === 'x')) && ($this->_axisX != null)) { + $this->_axisX->hide(); + } + if (((!$axis) || ($axis === $this->_axisY) || ($axis === 'y')) && ($this->_axisY != null)) { + $this->_axisY->hide(); + } + if (((!$axis) || ($axis === $this->_axisYSecondary) || ($axis === 'y_sec')) && ($this->_axisYSecondary != null)) { + $this->_axisYSecondary->hide(); + } + } + + /** + * Clears/removes the axis + */ + function clearAxis() + { + $this->_axisX = $this->_axisY = $this->_axisYSecondary = null; + } + + /** + * Get axis. + * + * Possible values are IMAGE_GRAPH_AXIS_X, IMAGE_GRAPH_AXIS_Y, + * IMAGE_GRAPH_AXIS_Y_SECONDARY or a short hand notation using + * string identifiers: 'x', 'y', 'ysec' + * + * @param int $axis The axis to return + * @return Image_Graph_Axis The axis + */ + function &getAxis($axis = IMAGE_GRAPH_AXIS_X) + { + switch ($axis) { + case IMAGE_GRAPH_AXIS_X: + case 'x': + return $this->_axisX; + + case IMAGE_GRAPH_AXIS_Y: + case 'y': + return $this->_axisY; + + case IMAGE_GRAPH_AXIS_Y_SECONDARY: + case 'ysec': + return $this->_axisYSecondary; + + } + return null; + } + + /** + * Update coordinates + * + * @access private + */ + function _updateCoords() + { + if (is_array($this->_elements)) { + $keys = array_keys($this->_elements); + foreach ($keys as $key) { + $element =& $this->_elements[$key]; + if (is_a($element, 'Image_Graph_Plot')) { + if (((is_a($element, 'Image_Graph_Plot_Bar')) || + (is_a($element, 'Image_Graph_Plot_Step')) || + (is_a($element, 'Image_Graph_Plot_Dot')) || + (is_a($element, 'Image_Graph_Plot_CandleStick')) || + (is_a($element, 'Image_Graph_Plot_BoxWhisker')) || + (is_a($element, 'Image_Graph_Plot_Impulse'))) && + ($this->_axisX != null) && + (strtolower(get_class($this->_axisX)) != 'image_graph_axis') // do not push plot if x-axis is linear + ) + { + $this->_axisX->_pushValues(); + } + $this->_setExtrema($element); + } + } + unset($keys); + } + + $this->_calcEdges(); + + $pctWidth = (int) ($this->width() * 0.05); + $pctHeight = (int) ($this->height() * 0.05); + + $left = $this->_left + $this->_padding['left']; + $top = $this->_top + $this->_padding['top']; + $right = $this->_right - $this->_padding['right']; + $bottom = $this->_bottom - $this->_padding['bottom']; + + // temporary place holder for axis point calculations + $axisPoints['x'] = array($left, $top, $right, $bottom); + $axisPoints['y'] = $axisPoints['x']; + $axisPoints['y2'] = $axisPoints['x']; + + if ($this->_axisX !== null) { + $intersectX = $this->_axisX->_getAxisIntersection(); + $sizeX = $this->_axisX->_size(); + $this->_axisX->_setCoords($left, $top, $right, $bottom); + $this->_axisX->_updateCoords(); + } + + if ($this->_axisY !== null) { + $intersectY = $this->_axisY->_getAxisIntersection(); + $sizeY = $this->_axisY->_size(); + $this->_axisY->_setCoords($left, $top, $right, $bottom); + $this->_axisY->_updateCoords(); + } + + if ($this->_axisYSecondary !== null) { + $intersectYsec = $this->_axisYSecondary->_getAxisIntersection(); + $sizeYsec = $this->_axisYSecondary->_size(); + $this->_axisYSecondary->_setCoords($left, $top, $right, $bottom); + $this->_axisYSecondary->_updateCoords(); + } + + $axisCoordAdd = array('left' => 0, 'right' => 0, 'top' => 0, 'bottom' => 0); + + if ($this->_axisY != null) { + if ($this->_axisX != null) { + $pos = $this->_axisX->_intersectPoint($intersectY['value']); + } else { + $pos = ($this->_horizontal ? $bottom : $left); + } + + if ($this->_horizontal) { + if (($pos + $sizeY) > $bottom) { + $axisCoordAdd['bottom'] = ($pos + $sizeY) - $bottom; + // the y-axis position needs to be recalculated! + } else { + // top & bottom may need to be adjusted when the x-axis has been + // calculated! + $this->_axisY->_setCoords( + $left, + $pos, + $right, + $pos + $sizeY + ); + $this->_axisY->_updateCoords(); + } + } + else { + if (($pos - $sizeY) < $left) { + $axisCoordAdd['left'] = $left - ($pos - $sizeY); + // the y-axis position needs to be recalculated! + } else { + // top & bottom may need to be adjusted when the x-axis has been + // calculated! + $this->_axisY->_setCoords( + $pos - $sizeY, + $top, + $pos, + $bottom + ); + $this->_axisY->_updateCoords(); + } + } + } + + if ($this->_axisYSecondary != null) { + if ($this->_axisX != null) { + $pos = $this->_axisX->_intersectPoint($intersectYsec['value']); + } else { + $pos = ($this->_horizontal ? $top : $right); + } + + if ($this->_horizontal) { + if (($pos - $sizeYsec) < $top) { + $axisCoordAdd['top'] = $top - ($pos - $sizeYsec); + // the secondary y-axis position need to be recalculated + } else { + // top & bottom may need to be adjusted when the x-axis has been + // calculated! + $this->_axisYSecondary->_setCoords( + $left, + $pos - $sizeY, + $right, + $pos + ); + $this->_axisYSecondary->_updateCoords(); + } + } + else { + if (($pos + $sizeYsec) > $right) { + $axisCoordAdd['right'] = ($pos + $sizeYsec) - $right; + // the secondary y-axis position need to be recalculated + } else { + // top & bottom may need to be adjusted when the x-axis has been + // calculated! + $this->_axisYSecondary->_setCoords( + $pos, + $top, + $pos + $sizeY, + $bottom + ); + $this->_axisYSecondary->_updateCoords(); + } + } + } + + if ($this->_axisX != null) { + if (($intersectX['axis'] == IMAGE_GRAPH_AXIS_Y_SECONDARY) && + ($this->_axisYSecondary !== null) + ) { + $axis =& $this->_axisYSecondary; + } elseif ($this->_axisY !== null) { + $axis =& $this->_axisY; + } else { + $axis = false; + } + + if ($axis !== false) { + $pos = $axis->_intersectPoint($intersectX['value']); + } else { + $pos = ($this->_horizontal ? $left : $bottom); + } + + if ($this->_horizontal) { + if (($pos - $sizeX) < $left) { + $axisCoordAdd['left'] = $left - ($pos - $sizeX); + $pos = $left + $sizeX; + } + + $this->_axisX->_setCoords( + $pos - $sizeX, + $top + $axisCoordAdd['top'], + $pos, + $bottom - $axisCoordAdd['bottom'] + ); + $this->_axisX->_updateCoords(); + } + else { + if (($pos + $sizeX) > $bottom) { + $axisCoordAdd['bottom'] = ($pos + $sizeX) - $bottom; + $pos = $bottom - $sizeX; + } + + $this->_axisX->_setCoords( + $left + $axisCoordAdd['left'], + $pos, + $right - $axisCoordAdd['right'], + $pos + $sizeX + ); + $this->_axisX->_updateCoords(); + } + } + + if ($this->_horizontal) { + if (($this->_axisX !== null) && + (($axisCoordAdd['top'] != 0) || + ($axisCoordAdd['bottom'] != 0)) + ) { + // readjust y-axis for better estimate of position + if ($this->_axisY !== null) { + $pos = $this->_axisX->_intersectPoint($intersectY['value']); + $this->_axisY->_setCoords( + false, + $pos, + false, + $pos + $sizeY + ); + $this->_axisY->_updateCoords(); + } + + if ($this->_axisYSecondary !== null) { + $pos = $this->_axisX->_intersectPoint($intersectYsec['value']); + $this->_axisYSecondary->_setCoords( + false, + $pos - $sizeYsec, + false, + $pos + ); + $this->_axisYSecondary->_updateCoords(); + } + } + + // adjust top and bottom of y-axis + if ($this->_axisY !== null) { + $this->_axisY->_setCoords( + $left + $axisCoordAdd['left'], + false, + $right - $axisCoordAdd['right'], + false + ); + $this->_axisY->_updateCoords(); + } + + // adjust top and bottom of y-axis + if ($this->_axisYSecondary !== null) { + $this->_axisYSecondary->_setCoords( + $left + $axisCoordAdd['left'], + false, + $right - $axisCoordAdd['right'], + false + ); + $this->_axisYSecondary->_updateCoords(); + } + + if ($this->_axisX !== null) { + $this->_plotTop = $this->_axisX->_top; + $this->_plotBottom = $this->_axisX->_bottom; + } else { + $this->_plotTop = $top; + $this->_plotBottom = $bottom; + } + + if ($this->_axisY !== null) { + $this->_plotLeft = $this->_axisY->_left; + $this->_plotRight = $this->_axisY->_right; + } elseif ($this->_axisYSecondary !== null) { + $this->_plotLeft = $this->_axisYSecondary->_left; + $this->_plotRight = $this->_axisYSecondary->_right; + } else { + $this->_plotLeft = $this->_left; + $this->_plotRight = $this->_right; + } + } + else { + if (($this->_axisX !== null) && + (($axisCoordAdd['left'] != 0) || + ($axisCoordAdd['right'] != 0)) + ) { + // readjust y-axis for better estimate of position + if ($this->_axisY !== null) { + $pos = $this->_axisX->_intersectPoint($intersectY['value']); + $this->_axisY->_setCoords( + $pos - $sizeY, + false, + $pos, + false + ); + $this->_axisY->_updateCoords(); + } + + if ($this->_axisYSecondary !== null) { + $pos = $this->_axisX->_intersectPoint($intersectYsec['value']); + $this->_axisYSecondary->_setCoords( + $pos, + false, + $pos + $sizeYsec, + false + ); + $this->_axisYSecondary->_updateCoords(); + } + } + + // adjust top and bottom of y-axis + if ($this->_axisY !== null) { + $this->_axisY->_setCoords( + false, + $top + $axisCoordAdd['top'], + false, + $bottom - $axisCoordAdd['bottom'] + ); + $this->_axisY->_updateCoords(); + } + + // adjust top and bottom of y-axis + if ($this->_axisYSecondary !== null) { + $this->_axisYSecondary->_setCoords( + false, + $top + $axisCoordAdd['top'], + false, + $bottom - $axisCoordAdd['bottom'] + ); + $this->_axisYSecondary->_updateCoords(); + } + + if ($this->_axisX !== null) { + $this->_plotLeft = $this->_axisX->_left; + $this->_plotRight = $this->_axisX->_right; + } else { + $this->_plotLeft = $left; + $this->_plotRight = $right; + } + + if ($this->_axisY !== null) { + $this->_plotTop = $this->_axisY->_top; + $this->_plotBottom = $this->_axisY->_bottom; + } elseif ($this->_axisYSecondary !== null) { + $this->_plotTop = $this->_axisYSecondary->_top; + $this->_plotBottom = $this->_axisYSecondary->_bottom; + } else { + $this->_plotTop = $this->_top; + $this->_plotBottom = $this->_bottom; + } + } + + Image_Graph_Element::_updateCoords(); +/* + if ($this->_axisX != null) { + $this->_axisX->_updateCoords(); + } + if ($this->_axisY != null) { + $this->_axisY->_updateCoords(); + } + if ($this->_axisYSecondary != null) { + $this->_axisYSecondary->_updateCoords(); + }*/ + } + + /** + * Set the axis padding for a specified position. + * + * The axis padding is padding "inside" the plotarea (i.e. to put some space + * between the axis line and the actual plot). + * + * This can be specified in a number of ways: + * + * 1) Specify an associated array with 'left', 'top', 'right' and 'bottom' + * indices with values for the paddings. Leave out 2nd parameter. + * + * 2) Specify an overall padding as the first parameter + * + * 3) Specify the padding and position with position values as mentioned + * above + * + * Normally you'd only consider applying axis padding to a category x-axis. + * + * @param mixed $value The value/padding + * @param mixed $position The "position" of the padding + */ + function setAxisPadding($value, $position = false) + { + if ($position === false) { + if (is_array($value)) { + if ($this->_horizontal) { + if ((isset($value['top'])) && ($this->_axisX !== null)) { + $this->_axisX->_setAxisPadding('low', $value['top']); + } + if ((isset($value['bottom'])) && ($this->_axisX !== null)) { + $this->_axisX->_setAxisPadding('high', $value['bottom']); + } + if ((isset($value['left'])) && ($this->_axisY !== null)) { + $this->_axisY->_setAxisPadding('low', $value['left']); + } + if ((isset($value['right'])) && ($this->_axisY !== null)) { + $this->_axisY->_setAxisPadding('high', $value['right']); + } + if ((isset($value['left'])) && ($this->_axisYSecondary !== null)) { + $this->_axisYSecondary->_setAxisPadding('low', $value['left']); + } + if ((isset($value['right'])) && ($this->_axisYSecondary !== null)) { + $this->_axisYSecondary->_setAxisPadding('high', $value['right']); + } + } + else { + if ((isset($value['left'])) && ($this->_axisX !== null)) { + $this->_axisX->_setAxisPadding('low', $value['left']); + } + if ((isset($value['right'])) && ($this->_axisX !== null)) { + $this->_axisX->_setAxisPadding('high', $value['right']); + } + if ((isset($value['bottom'])) && ($this->_axisY !== null)) { + $this->_axisY->_setAxisPadding('low', $value['bottom']); + } + if ((isset($value['top'])) && ($this->_axisY !== null)) { + $this->_axisY->_setAxisPadding('high', $value['top']); + } + if ((isset($value['bottom'])) && ($this->_axisYSecondary !== null)) { + $this->_axisYSecondary->_setAxisPadding('low', $value['bottom']); + } + if ((isset($value['top'])) && ($this->_axisYSecondary !== null)) { + $this->_axisYSecondary->_setAxisPadding('high', $value['top']); + } + } + } else { + if ($this->_axisX !== null) { + $this->_axisX->_setAxisPadding('low', $value); + $this->_axisX->_setAxisPadding('high', $value); + } + if ($this->_axisY !== null) { + $this->_axisY->_setAxisPadding('low', $value); + $this->_axisY->_setAxisPadding('high', $value); + } + if ($this->_axisYSecondary !== null) { + $this->_axisYSecondary->_setAxisPadding('low', $value); + $this->_axisYSecondary->_setAxisPadding('high', $value); + } + } + } else { + switch ($position) { + case 'left': + if ($this->_horizontal) { + if ($this->_axisY !== null) { + $this->_axisY->_setAxisPadding('low', $value); + } + if ($this->_axisYSecondary !== null) { + $this->_axisYSecondary->_setAxisPadding('low', $value); + } + } + else if ($this->_axisX !== null) { + $this->_axisX->_setAxisPadding('low', $value); + } + break; + + case 'right': + if ($this->_horizontal) { + if ($this->_axisY !== null) { + $this->_axisY->_setAxisPadding('high', $value); + } + if ($this->_axisYSecondary !== null) { + $this->_axisYSecondary->_setAxisPadding('high', $value); + } + } + else if ($this->_axisX !== null) { + $this->_axisX->_setAxisPadding('high', $value); + } + break; + + case 'top': + if (!$this->_horizontal) { + if ($this->_axisY !== null) { + $this->_axisY->_setAxisPadding('high', $value); + } + if ($this->_axisYSecondary !== null) { + $this->_axisYSecondary->_setAxisPadding('high', $value); + } + } + else if ($this->_axisX !== null) { + $this->_axisX->_setAxisPadding('high', $value); + } + break; + + case 'bottom': + if (!$this->_horizontal) { + if ($this->_axisY !== null) { + $this->_axisY->_setAxisPadding('low', $value); + } + if ($this->_axisYSecondary !== null) { + $this->_axisYSecondary->_setAxisPadding('low', $value); + } + } + else if ($this->_axisX !== null) { + $this->_axisX->_setAxisPadding('low', $value); + } + break; + } + } + } + + /** + * Output the plotarea to the canvas + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if ($this->_hasData) { + $this->_canvas->startGroup(get_class($this)); + + if ($this->_axisX != null) { + $this->add($this->_axisX); + } + if ($this->_axisY != null) { + $this->add($this->_axisY); + } + if ($this->_axisYSecondary != null) { + $this->add($this->_axisYSecondary); + } + + $this->_getFillStyle(); + $this->_canvas->rectangle( + array( + 'x0' => $this->_plotLeft, + 'y0' => $this->_plotTop, + 'x1' => $this->_plotRight, + 'y1' => $this->_plotBottom + ) + ); + $result = parent::_done(); + $this->_canvas->endGroup(); + return $result; + } else { + // no data -> do nothing at all! + return true; + } + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plotarea/Element.php b/includes/pear/Image/Graph/Plotarea/Element.php index 4c528c69..c70d708b 100644 --- a/includes/pear/Image/Graph/Plotarea/Element.php +++ b/includes/pear/Image/Graph/Plotarea/Element.php @@ -1,87 +1,87 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Element.php,v 1.5 2005/02/21 20:50:01 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Element.php - */ -require_once 'Image/Graph/Element.php'; - -/** - * Representation of a element on a plotarea. - * - * @category Images - * @package Image_Graph - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - * @abstract - */ -class Image_Graph_Plotarea_Element extends Image_Graph_Element -{ - - /** - * Get the X pixel position represented by a value - * - * @param double $point the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointX($point) - { - return $this->_parent->_pointX($point); - } - - /** - * Get the Y pixel position represented by a value - * - * @param double $point the value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointY($point) - { - return $this->_parent->_pointY($point); - } - - /** - * Get the X and Y pixel position represented by a value - * - * @param array $point the values to get the pixel-point for - * @return array The (x, y) pixel position along the axis - * @access private - */ - function _pointXY($point) - { - return array ('X' => $this->_pointX($point), 'Y' => $this->_pointY($point)); - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Element.php,v 1.5 2005/02/21 20:50:01 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Element.php + */ +require_once 'Image/Graph/Element.php'; + +/** + * Representation of a element on a plotarea. + * + * @category Images + * @package Image_Graph + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + * @abstract + */ +class Image_Graph_Plotarea_Element extends Image_Graph_Element +{ + + /** + * Get the X pixel position represented by a value + * + * @param double $point the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointX($point) + { + return $this->_parent->_pointX($point); + } + + /** + * Get the Y pixel position represented by a value + * + * @param double $point the value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointY($point) + { + return $this->_parent->_pointY($point); + } + + /** + * Get the X and Y pixel position represented by a value + * + * @param array $point the values to get the pixel-point for + * @return array The (x, y) pixel position along the axis + * @access private + */ + function _pointXY($point) + { + return array ('X' => $this->_pointX($point), 'Y' => $this->_pointY($point)); + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plotarea/Map.php b/includes/pear/Image/Graph/Plotarea/Map.php index eb456cf6..54e5124f 100644 --- a/includes/pear/Image/Graph/Plotarea/Map.php +++ b/includes/pear/Image/Graph/Plotarea/Map.php @@ -1,304 +1,304 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Map.php,v 1.9 2005/08/24 20:36:01 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plotarea.php - */ -require_once 'Image/Graph/Plotarea.php'; - -/** - * Plot area used for map plots. - * - * A map plot is a chart that displays a map (fx. a world map) in the form of . - * png file. The maps must be located in the /Images/Maps folder and a - * corresponding .txt files mush also exist in this location where named - * locations are mapped to an (x, y) coordinate of the map picture (this text - * file is tab separated with 'Name' 'X' 'Y' values, fx 'Denmark 378 223'). The - * x-values in the dataset are then the named locations (fx 'Denmark') and the - * y-values are then the data to plot. Currently the best (if not only) use is - * to combine a map plot area with a {@link Image_Graph_Plot_Dot} using {@link - * Image_Graph_Marker_PercentageCircle} as marker. - * - * @category Images - * @package Image_Graph - * @subpackage Plotarea - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plotarea_Map extends Image_Graph_Plotarea -{ - - /** - * The GD image for the map - * @var string - * @access private - */ - var $_imageMap; - - /** - * The value for scaling the width and height to fit into the layout boundaries - * @var int - * @access private - */ - var $_scale; - - /** - * The (x,y)-points for the named point - * @var array - * @access private - */ - var $_mapPoints; - - /** - * The original size of the image map - * @var array - * @access private - */ - var $_mapSize; - - /** - * PlotareaMap [Constructor] - * - * @param string $map The name of the map, i.e. the [name].png and [name]. - * txt files located in the Images/maps folder - */ - function Image_Graph_Plotarea_Map($map) - { - parent::Image_Graph_Plotarea(); - - $this->_imageMap = dirname(__FILE__)."/../Images/Maps/$map.png"; - $points = file(dirname(__FILE__)."/../Images/Maps/$map.txt"); - list($width, $height) = getimagesize($this->_imageMap); - $this->_mapSize['X'] = $width; - $this->_mapSize['Y'] = $height; - - if (is_array($points)) { - unset($this->_mapPoints); - foreach ($points as $line) { - list($country, $x, $y) = explode("\t", $line); - $this->_mapPoints[$country] = array('X' => $x, 'Y' => $y); - } - } - } - - /** - * Left boundary of the background fill area - * - * @return int Leftmost position on the canvas - * @access private - */ - function _fillLeft() - { - return $this->_left + $this->_padding; - } - - /** - * Top boundary of the background fill area - * - * @return int Topmost position on the canvas - * @access private - */ - function _fillTop() - { - return $this->_top + $this->_padding; - } - - /** - * Right boundary of the background fill area - * - * @return int Rightmost position on the canvas - * @access private - */ - function _fillRight() - { - return $this->_right - $this->_padding; - } - - /** - * Bottom boundary of the background fill area - * - * @return int Bottommost position on the canvas - * @access private - */ - function _fillBottom() - { - return $this->_bottom - $this->_padding; - } - - /** - * Set the extrema of the axis - * - * @param Image_Graph_Plot $plot The plot that 'hold' the values - * @access private - */ - function _setExtrema(& $plot) - { - } - - /** - * Get the X pixel position represented by a value - * - * @param double $value The value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointX($value) - { - $country = $value['X']; - return $this->_plotLeft+$this->_mapPoints[$country]['X']*$this->_scale; - } - - /** - * Get the Y pixel position represented by a value - * - * @param double $value The value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointY($value) - { - $country = $value['X']; - return $this->_plotTop+$this->_mapPoints[$country]['Y']*$this->_scale; - } - - /** - * Hides the axis - */ - function hideAxis() - { - } - - /** - * Add a point to the maps - * - * @param int $latitude The latitude of the point - * @param int $longiude The longitude of the point - * @param string $name The name of the plot - */ - function addMappoint($latitude, $longitude, $name) - { - $x = (($longitude + 180) * ($this->_mapSize['X'] / 360)); - $y = ((($latitude * -1) + 90) * ($this->_mapSize['Y'] / 180)); - $this->_mapPoints[$name] = array('X' => $x, 'Y' => $y); - } - - /** - * Add a point to the maps - * - * @param int $x The latitude of the point - * @param int $y The longitude of the point - * @param string $name The name of the plot - */ - function addPoint($x, $y, $name) - { - $this->_mapPoints[$name] = array('X' => $x, 'Y' => $y); - } - - /** - * Update coordinates - * - * @access private - */ - function _updateCoords() - { - parent::_updateCoords(); - - $mapAspectRatio = $this->_mapSize['X']/$this->_mapSize['Y']; - $plotAspectRatio = ($width = $this->_fillWidth())/($height = $this->_fillHeight()); - - $scaleFactorX = ($mapAspectRatio > $plotAspectRatio); - - if ((($this->_mapSize['X'] <= $width) && ($this->_mapSize['Y'] <= $height)) || - (($this->_mapSize['X'] >= $width) && ($this->_mapSize['Y'] >= $height))) - { - if ($scaleFactorX) { - $this->_scale = $width / $this->_mapSize['X']; - } else { - $this->_scale = $height / $this->_mapSize['Y']; - } - } elseif ($this->_mapSize['X'] < $width) { - $this->_scale = $height / $this->_mapSize['Y']; - } elseif ($this->_mapSize['Y'] < $height) { - $this->_scale = $width / $this->_mapSize['X']; - } - - $this->_plotLeft = ($this->_fillLeft() + $this->_fillRight() - - $this->_mapSize['X']*$this->_scale)/2; - - $this->_plotTop = ($this->_fillTop() + $this->_fillBottom() - - $this->_mapSize['Y']*$this->_scale)/2; - - $this->_plotRight = ($this->_fillLeft() + $this->_fillRight() + - $this->_mapSize['X']*$this->_scale)/2; - - $this->_plotBottom = ($this->_fillTop() + $this->_fillBottom() + - $this->_mapSize['Y']*$this->_scale)/2; - } - - /** - * Output the plotarea to the canvas - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - $this->_getFillStyle(); - $this->_canvas->rectangle( - array( - 'x0' => $this->_fillLeft(), - 'y0' => $this->_fillTop(), - 'x1' => $this->_fillRight(), - 'y1' => $this->_fillBottom() - ) - ); - - $scaledWidth = $this->_mapSize['X']*$this->_scale; - $scaledHeight = $this->_mapSize['Y']*$this->_scale; - - $this->_canvas->image( - array( - 'x' => $this->_plotLeft, - 'y' => $this->_plotTop, - 'filename' => $this->_imageMap, - 'width' => $scaledWidth, - 'height' => $scaledHeight - ) - ); - - return Image_Graph_Layout::_done(); - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Map.php,v 1.10 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plotarea.php + */ +require_once 'Image/Graph/Plotarea.php'; + +/** + * Plot area used for map plots. + * + * A map plot is a chart that displays a map (fx. a world map) in the form of . + * png file. The maps must be located in the /Images/Maps folder and a + * corresponding .txt files mush also exist in this location where named + * locations are mapped to an (x, y) coordinate of the map picture (this text + * file is tab separated with 'Name' 'X' 'Y' values, fx 'Denmark 378 223'). The + * x-values in the dataset are then the named locations (fx 'Denmark') and the + * y-values are then the data to plot. Currently the best (if not only) use is + * to combine a map plot area with a {@link Image_Graph_Plot_Dot} using {@link + * Image_Graph_Marker_PercentageCircle} as marker. + * + * @category Images + * @package Image_Graph + * @subpackage Plotarea + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plotarea_Map extends Image_Graph_Plotarea +{ + + /** + * The GD image for the map + * @var string + * @access private + */ + var $_imageMap; + + /** + * The value for scaling the width and height to fit into the layout boundaries + * @var int + * @access private + */ + var $_scale; + + /** + * The (x,y)-points for the named point + * @var array + * @access private + */ + var $_mapPoints; + + /** + * The original size of the image map + * @var array + * @access private + */ + var $_mapSize; + + /** + * PlotareaMap [Constructor] + * + * @param string $map The name of the map, i.e. the [name].png and [name]. + * txt files located in the Images/maps folder + */ + function Image_Graph_Plotarea_Map($map) + { + parent::Image_Graph_Plotarea(); + + $this->_imageMap = dirname(__FILE__)."/../Images/Maps/$map.png"; + $points = file(dirname(__FILE__)."/../Images/Maps/$map.txt"); + list($width, $height) = getimagesize($this->_imageMap); + $this->_mapSize['X'] = $width; + $this->_mapSize['Y'] = $height; + + if (is_array($points)) { + unset($this->_mapPoints); + foreach ($points as $line) { + list($country, $x, $y) = explode("\t", $line); + $this->_mapPoints[$country] = array('X' => $x, 'Y' => $y); + } + } + } + + /** + * Left boundary of the background fill area + * + * @return int Leftmost position on the canvas + * @access private + */ + function _fillLeft() + { + return $this->_left + $this->_padding['left']; + } + + /** + * Top boundary of the background fill area + * + * @return int Topmost position on the canvas + * @access private + */ + function _fillTop() + { + return $this->_top + $this->_padding['top']; + } + + /** + * Right boundary of the background fill area + * + * @return int Rightmost position on the canvas + * @access private + */ + function _fillRight() + { + return $this->_right - $this->_padding['right']; + } + + /** + * Bottom boundary of the background fill area + * + * @return int Bottommost position on the canvas + * @access private + */ + function _fillBottom() + { + return $this->_bottom - $this->_padding['bottom']; + } + + /** + * Set the extrema of the axis + * + * @param Image_Graph_Plot $plot The plot that 'hold' the values + * @access private + */ + function _setExtrema(& $plot) + { + } + + /** + * Get the X pixel position represented by a value + * + * @param double $value The value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointX($value) + { + $country = $value['X']; + return $this->_plotLeft+$this->_mapPoints[$country]['X']*$this->_scale; + } + + /** + * Get the Y pixel position represented by a value + * + * @param double $value The value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointY($value) + { + $country = $value['X']; + return $this->_plotTop+$this->_mapPoints[$country]['Y']*$this->_scale; + } + + /** + * Hides the axis + */ + function hideAxis() + { + } + + /** + * Add a point to the maps + * + * @param int $latitude The latitude of the point + * @param int $longiude The longitude of the point + * @param string $name The name of the plot + */ + function addMappoint($latitude, $longitude, $name) + { + $x = (($longitude + 180) * ($this->_mapSize['X'] / 360)); + $y = ((($latitude * -1) + 90) * ($this->_mapSize['Y'] / 180)); + $this->_mapPoints[$name] = array('X' => $x, 'Y' => $y); + } + + /** + * Add a point to the maps + * + * @param int $x The latitude of the point + * @param int $y The longitude of the point + * @param string $name The name of the plot + */ + function addPoint($x, $y, $name) + { + $this->_mapPoints[$name] = array('X' => $x, 'Y' => $y); + } + + /** + * Update coordinates + * + * @access private + */ + function _updateCoords() + { + parent::_updateCoords(); + + $mapAspectRatio = $this->_mapSize['X']/$this->_mapSize['Y']; + $plotAspectRatio = ($width = $this->_fillWidth())/($height = $this->_fillHeight()); + + $scaleFactorX = ($mapAspectRatio > $plotAspectRatio); + + if ((($this->_mapSize['X'] <= $width) && ($this->_mapSize['Y'] <= $height)) || + (($this->_mapSize['X'] >= $width) && ($this->_mapSize['Y'] >= $height))) + { + if ($scaleFactorX) { + $this->_scale = $width / $this->_mapSize['X']; + } else { + $this->_scale = $height / $this->_mapSize['Y']; + } + } elseif ($this->_mapSize['X'] < $width) { + $this->_scale = $height / $this->_mapSize['Y']; + } elseif ($this->_mapSize['Y'] < $height) { + $this->_scale = $width / $this->_mapSize['X']; + } + + $this->_plotLeft = ($this->_fillLeft() + $this->_fillRight() - + $this->_mapSize['X']*$this->_scale)/2; + + $this->_plotTop = ($this->_fillTop() + $this->_fillBottom() - + $this->_mapSize['Y']*$this->_scale)/2; + + $this->_plotRight = ($this->_fillLeft() + $this->_fillRight() + + $this->_mapSize['X']*$this->_scale)/2; + + $this->_plotBottom = ($this->_fillTop() + $this->_fillBottom() + + $this->_mapSize['Y']*$this->_scale)/2; + } + + /** + * Output the plotarea to the canvas + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + $this->_getFillStyle(); + $this->_canvas->rectangle( + array( + 'x0' => $this->_fillLeft(), + 'y0' => $this->_fillTop(), + 'x1' => $this->_fillRight(), + 'y1' => $this->_fillBottom() + ) + ); + + $scaledWidth = $this->_mapSize['X']*$this->_scale; + $scaledHeight = $this->_mapSize['Y']*$this->_scale; + + $this->_canvas->image( + array( + 'x' => $this->_plotLeft, + 'y' => $this->_plotTop, + 'filename' => $this->_imageMap, + 'width' => $scaledWidth, + 'height' => $scaledHeight + ) + ); + + return Image_Graph_Layout::_done(); + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Plotarea/Radar.php b/includes/pear/Image/Graph/Plotarea/Radar.php index 8ceab265..296f5e6d 100644 --- a/includes/pear/Image/Graph/Plotarea/Radar.php +++ b/includes/pear/Image/Graph/Plotarea/Radar.php @@ -1,243 +1,243 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Radar.php,v 1.7 2005/08/24 20:36:02 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Plotarea.php - */ -require_once 'Image/Graph/Plotarea.php'; - -/** - * Plot area used for radar plots. - * - * @category Images - * @package Image_Graph - * @subpackage Plotarea - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Plotarea_Radar extends Image_Graph_Plotarea -{ - - /** - * Create the plotarea, implicitely creates 2 normal axis - */ - function Image_Graph_Plotarea_Radar() - { - parent::Image_Graph_Element(); - $this->_padding = 10; - $this->_axisX =& Image_Graph::factory('Image_Graph_Axis_Radar'); - $this->_axisX->_setParent($this); - $this->_axisY =& Image_Graph::factory('Image_Graph_Axis', IMAGE_GRAPH_AXIS_Y); - $this->_axisY->_setParent($this); - $this->_axisY->_setMinimum(0); - } - - /** - * Get the width of the 'real' plotarea - * - * @return int The width of the 'real' plotarea, ie not including space occupied by padding and axis - * @access private - */ - function _plotWidth() - { - return (min($this->height(), $this->width())) * 0.80; - } - - /** - * Get the height of the 'real' plotarea - * - * @return int The height of the 'real' plotarea, ie not including space occupied by padding and axis - * @access private - */ - function _plotHeight() - { - return (min($this->height(), $this->width())) * 0.80; - } - - /** - * Left boundary of the background fill area - * - * @return int Leftmost position on the canvas - * @access private - */ - function _fillLeft() - { - return (int) (($this->_left + $this->_right - $this->_plotWidth()) / 2); - } - - /** - * Top boundary of the background fill area - * - * @return int Topmost position on the canvas - * @access private - */ - function _fillTop() - { - return (int) (($this->_top + $this->_bottom - $this->_plotHeight()) / 2); - } - - /** - * Right boundary of the background fill area - * - * @return int Rightmost position on the canvas - * @access private - */ - function _fillRight() - { - return (int) (($this->_left + $this->_right + $this->_plotWidth()) / 2); - } - - /** - * Bottom boundary of the background fill area - * - * @return int Bottommost position on the canvas - * @access private - */ - function _fillBottom() - { - return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2); - } - - /** - * Get the X pixel position represented by a value - * - * @param double $value The value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointX($value) - { - if (is_array($value)) { - if ($value['Y'] == '#min#') { - $radius = 0; - } elseif (($value['Y'] == '#max#') || ($value['Y'] === false)) { - $radius = 1; - } else { - $radius = ($value['Y'] - $this->_axisY->_getMinimum()) / - ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()); - } - $x = ($this->_left + $this->_right) / 2 - - $radius * ($this->_plotWidth() / 2) * - cos(deg2rad($this->_axisX->_point($value['X']))); - } - return max($this->_plotLeft, min($this->_plotRight, $x)); - } - - /** - * Get the Y pixel position represented by a value - * - * @param double $value The value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _pointY($value) - { - if (is_array($value)) { - if ($value['Y'] == '#min#') { - $radius = 0; - } elseif (($value['Y'] == '#max#') || ($value['Y'] === false)) { - $radius = 1; - } else { - $radius = ($value['Y'] - $this->_axisY->_getMinimum()) / - ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()); - } - - $y = ($this->_top + $this->_bottom) / 2 - - $radius * ($this->_plotHeight() / 2) * - sin(deg2rad($this->_axisX->_point($value['X']))); - } - return max($this->_plotTop, min($this->_plotBottom, $y)); - } - - /** - * Update coordinates - * - * @access private - */ - function _updateCoords() - { - if (is_array($this->_elements)) { - $keys = array_keys($this->_elements); - foreach ($keys as $key) { - $element =& $this->_elements[$key]; - if (is_a($element, 'Image_Graph_Plot')) { - $this->_setExtrema($element); - } - } - unset($keys); - } - - $this->_calcEdges(); - - $centerX = (int) (($this->_left + $this->_right) / 2); - $centerY = (int) (($this->_top + $this->_bottom) / 2); - $radius = min($this->_plotHeight(), $this->_plotWidth()) / 2; - - if (is_object($this->_axisX)) { - $this->_axisX->_setCoords( - $centerX - $radius, - $centerY - $radius, - $centerX + $radius, - $centerY + $radius - ); - } - - if (is_object($this->_axisY)) { - $this->_axisY->_setCoords( - $centerX, - $centerY, - $centerX - $radius, - $centerY - $radius - ); - } - - $this->_plotLeft = $this->_fillLeft(); - $this->_plotTop = $this->_fillTop(); - $this->_plotRight = $this->_fillRight(); - $this->_plotBottom = $this->_fillBottom(); - - Image_Graph_Element::_updateCoords(); - - if (is_object($this->_axisX)) { - $this->_axisX->_updateCoords(); - } - - if (is_object($this->_axisY)) { - $this->_axisY->_updateCoords(); - } - - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Radar.php,v 1.8 2006/02/28 22:48:07 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Plotarea.php + */ +require_once 'Image/Graph/Plotarea.php'; + +/** + * Plot area used for radar plots. + * + * @category Images + * @package Image_Graph + * @subpackage Plotarea + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Plotarea_Radar extends Image_Graph_Plotarea +{ + + /** + * Create the plotarea, implicitely creates 2 normal axis + */ + function Image_Graph_Plotarea_Radar() + { + parent::Image_Graph_Element(); + $this->_padding = array('left' => 10, 'top' => 10, 'right' => 10, 'bottom' => 10); + $this->_axisX =& Image_Graph::factory('Image_Graph_Axis_Radar'); + $this->_axisX->_setParent($this); + $this->_axisY =& Image_Graph::factory('Image_Graph_Axis', IMAGE_GRAPH_AXIS_Y); + $this->_axisY->_setParent($this); + $this->_axisY->_setMinimum(0); + } + + /** + * Get the width of the 'real' plotarea + * + * @return int The width of the 'real' plotarea, ie not including space occupied by padding and axis + * @access private + */ + function _plotWidth() + { + return (min($this->height(), $this->width())) * 0.80; + } + + /** + * Get the height of the 'real' plotarea + * + * @return int The height of the 'real' plotarea, ie not including space occupied by padding and axis + * @access private + */ + function _plotHeight() + { + return (min($this->height(), $this->width())) * 0.80; + } + + /** + * Left boundary of the background fill area + * + * @return int Leftmost position on the canvas + * @access private + */ + function _fillLeft() + { + return (int) (($this->_left + $this->_right - $this->_plotWidth()) / 2); + } + + /** + * Top boundary of the background fill area + * + * @return int Topmost position on the canvas + * @access private + */ + function _fillTop() + { + return (int) (($this->_top + $this->_bottom - $this->_plotHeight()) / 2); + } + + /** + * Right boundary of the background fill area + * + * @return int Rightmost position on the canvas + * @access private + */ + function _fillRight() + { + return (int) (($this->_left + $this->_right + $this->_plotWidth()) / 2); + } + + /** + * Bottom boundary of the background fill area + * + * @return int Bottommost position on the canvas + * @access private + */ + function _fillBottom() + { + return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2); + } + + /** + * Get the X pixel position represented by a value + * + * @param double $value The value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointX($value) + { + if (is_array($value)) { + if ($value['Y'] == '#min#') { + $radius = 0; + } elseif (($value['Y'] == '#max#') || ($value['Y'] === false)) { + $radius = 1; + } else { + $radius = ($value['Y'] - $this->_axisY->_getMinimum()) / + ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()); + } + $x = ($this->_left + $this->_right) / 2 - + $radius * ($this->_plotWidth() / 2) * + cos(deg2rad($this->_axisX->_point($value['X']))); + } + return max($this->_plotLeft, min($this->_plotRight, $x)); + } + + /** + * Get the Y pixel position represented by a value + * + * @param double $value The value to get the pixel-point for + * @return double The pixel position along the axis + * @access private + */ + function _pointY($value) + { + if (is_array($value)) { + if ($value['Y'] == '#min#') { + $radius = 0; + } elseif (($value['Y'] == '#max#') || ($value['Y'] === false)) { + $radius = 1; + } else { + $radius = ($value['Y'] - $this->_axisY->_getMinimum()) / + ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()); + } + + $y = ($this->_top + $this->_bottom) / 2 - + $radius * ($this->_plotHeight() / 2) * + sin(deg2rad($this->_axisX->_point($value['X']))); + } + return max($this->_plotTop, min($this->_plotBottom, $y)); + } + + /** + * Update coordinates + * + * @access private + */ + function _updateCoords() + { + if (is_array($this->_elements)) { + $keys = array_keys($this->_elements); + foreach ($keys as $key) { + $element =& $this->_elements[$key]; + if (is_a($element, 'Image_Graph_Plot')) { + $this->_setExtrema($element); + } + } + unset($keys); + } + + $this->_calcEdges(); + + $centerX = (int) (($this->_left + $this->_right) / 2); + $centerY = (int) (($this->_top + $this->_bottom) / 2); + $radius = min($this->_plotHeight(), $this->_plotWidth()) / 2; + + if (is_object($this->_axisX)) { + $this->_axisX->_setCoords( + $centerX - $radius, + $centerY - $radius, + $centerX + $radius, + $centerY + $radius + ); + } + + if (is_object($this->_axisY)) { + $this->_axisY->_setCoords( + $centerX, + $centerY, + $centerX - $radius, + $centerY - $radius + ); + } + + $this->_plotLeft = $this->_fillLeft(); + $this->_plotTop = $this->_fillTop(); + $this->_plotRight = $this->_fillRight(); + $this->_plotBottom = $this->_fillBottom(); + + Image_Graph_Element::_updateCoords(); + + if (is_object($this->_axisX)) { + $this->_axisX->_updateCoords(); + } + + if (is_object($this->_axisY)) { + $this->_axisY->_updateCoords(); + } + + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Simple.php b/includes/pear/Image/Graph/Simple.php index c359f3c5..b83ec30f 100644 --- a/includes/pear/Image/Graph/Simple.php +++ b/includes/pear/Image/Graph/Simple.php @@ -1,121 +1,121 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Simple.php,v 1.8 2005/08/24 20:35:54 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph.php - */ -require_once 'Image/Graph.php'; - -/** - * Class for simple creation of graphs - * - * @category Images - * @package Image_Graph - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Simple extends Image_Graph -{ - - /** - * Image_Graph_Simple [Constructor] - * - * @param int $width The width of the graph in pixels - * @param int $height The height of the graph in pixels - */ - function Image_Graph_Simple($width, $height, $plotType, $data, $title, $lineColor = 'black', $fillColor = 'white', $font = false) - { - parent::Image_Graph($width, $height); - - $plotarea =& Image_Graph::factory('plotarea'); - - $dataset =& Image_Graph::factory('dataset', array($data)); - - if ($font === false) { - $font =& Image_Graph::factory('Image_Graph_Font'); - } elseif (is_string($font)) { - $font =& Image_Graph::factory('ttf_font', $font); - $font->setSize(8); - } - - $this->setFont($font); - - $this->add( - Image_Graph::vertical( - Image_Graph::factory('title', - array( - $title, - array('size_rel' => 2) - ) - ), - $plotarea, - 10 - ) - ); - - $plotarea->addNew('line_grid', array(), IMAGE_GRAPH_AXIS_Y); - - $plot =& $plotarea->addNew($plotType, array(&$dataset)); - $plot->setLineColor($lineColor); - $plot->setFillColor($fillColor); - - $axisX =& $plotarea->getAxis(IMAGE_GRAPH_AXIS_X); - $axisX->showLabel( - IMAGE_GRAPH_LABEL_MINIMUM + - IMAGE_GRAPH_LABEL_ZERO + - IMAGE_GRAPH_LABEL_MAXIMUM - ); - - } - - /** - * Factory method to create the Image_Simple_Graph object. - */ - function &factory($width, $height, $plotType, $data, $title, $lineColor = 'black', $fillColor = 'white', $font = false) - { - $obj =& Image_Graph::factory('Image_Graph_Simple', - array( - $width, - $height, - $plotType, - $data, - $title, - $lineColor, - $fillColor, - $font - ) - ); - return $obj; - } - -} + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Simple.php,v 1.8 2005/08/24 20:35:54 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph.php + */ +require_once 'Image/Graph.php'; + +/** + * Class for simple creation of graphs + * + * @category Images + * @package Image_Graph + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Simple extends Image_Graph +{ + + /** + * Image_Graph_Simple [Constructor] + * + * @param int $width The width of the graph in pixels + * @param int $height The height of the graph in pixels + */ + function Image_Graph_Simple($width, $height, $plotType, $data, $title, $lineColor = 'black', $fillColor = 'white', $font = false) + { + parent::Image_Graph($width, $height); + + $plotarea =& Image_Graph::factory('plotarea'); + + $dataset =& Image_Graph::factory('dataset', array($data)); + + if ($font === false) { + $font =& Image_Graph::factory('Image_Graph_Font'); + } elseif (is_string($font)) { + $font =& Image_Graph::factory('ttf_font', $font); + $font->setSize(8); + } + + $this->setFont($font); + + $this->add( + Image_Graph::vertical( + Image_Graph::factory('title', + array( + $title, + array('size_rel' => 2) + ) + ), + $plotarea, + 10 + ) + ); + + $plotarea->addNew('line_grid', array(), IMAGE_GRAPH_AXIS_Y); + + $plot =& $plotarea->addNew($plotType, array(&$dataset)); + $plot->setLineColor($lineColor); + $plot->setFillColor($fillColor); + + $axisX =& $plotarea->getAxis(IMAGE_GRAPH_AXIS_X); + $axisX->showLabel( + IMAGE_GRAPH_LABEL_MINIMUM + + IMAGE_GRAPH_LABEL_ZERO + + IMAGE_GRAPH_LABEL_MAXIMUM + ); + + } + + /** + * Factory method to create the Image_Simple_Graph object. + */ + function &factory($width, $height, $plotType, $data, $title, $lineColor = 'black', $fillColor = 'white', $font = false) + { + $obj =& Image_Graph::factory('Image_Graph_Simple', + array( + $width, + $height, + $plotType, + $data, + $title, + $lineColor, + $fillColor, + $font + ) + ); + return $obj; + } + +} ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Title.php b/includes/pear/Image/Graph/Title.php index 10907b57..619dab45 100644 --- a/includes/pear/Image/Graph/Title.php +++ b/includes/pear/Image/Graph/Title.php @@ -1,194 +1,194 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Title.php,v 1.12 2005/08/24 20:35:56 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * Include file Image/Graph/Layout.php - */ -require_once 'Image/Graph/Layout.php'; - -/** - * Title - * - * @category Images - * @package Image_Graph - * @subpackage Text - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Title extends Image_Graph_Layout -{ - - /** - * The text to print - * @var string - * @access private - */ - var $_text; - - /** - * The font to use - * @var Font - * @access private - */ - var $_font; - - /** - * The alignment of the title - * @var int - * @access private - */ - var $_alignment = IMAGE_GRAPH_ALIGN_CENTER_X; - - /** - * Create the title. - * - * Pass a Image_Graph_Font object - preferably by-ref (&) as second - * parameter, the font size in pixels or an associated array with some or - * all of the followin keys: - * - * 'size' The size of the title - * - * 'angle' The angle at which to write the title (in degrees or 'vertical') - * - * 'color' The font-face color - * - * @param sting $text The text to represent the title - * @param mixed $fontOptions The font to use in the title - */ - function Image_Graph_Title($text, $fontOptions = false) - { - parent::Image_Graph_Layout(); - if (is_object($fontOptions)) { - $this->_font =& $fontOptions; - } else { - if (is_array($fontOptions)) { - $this->_fontOptions = $fontOptions; - } else { - $this->_fontOptions['size'] = $fontOptions; - } - } - $this->setText($text); - } - - /** - * Set the text - * - * @param string $text The text to display - */ - function setText($text) - { - $this->_text = $text; - } - - /** - * Returns the calculated "auto" size - * - * @return int The calculated auto size - * @access private - */ - function _getAutoSize() - { - if ($this->_defaultFontOptions !== false) { - $this->_canvas->setFont($this->_defaultFontOptions); - } else { - $this->_canvas->setFont($this->_getFont()); - } - - return $this->_canvas->textHeight($this->_text); - } - - /** - * Set the alignment of the legend - * - * @param int $alignment The alignment - */ - function setAlignment($alignment) - { - $this->_alignment = $alignment & 0x7; - } - - /** - * Output the text - * - * @return bool Was the output 'good' (true) or 'bad' (false). - * @access private - */ - function _done() - { - if ($this->_defaultFontOptions !== false) { - $this->_canvas->setFont($this->_defaultFontOptions); - } else { - $this->_canvas->setFont($this->_getFont()); - } - - if (is_a($this->_parent, 'Image_Graph_Plotarea')) { - $this->_setCoords( - $this->_parent->_left, - $this->_parent->_top, - $this->_parent->_right, - $this->_parent->_top + $this->_canvas->textHeight($this->_text) - ); - } elseif (!is_a($this->_parent, 'Image_Graph_Layout')) { - $this->_setCoords( - $this->_parent->_fillLeft(), - $this->_parent->_fillTop(), - $this->_parent->_fillRight(), - $this->_parent->_fillTop() + $this->_canvas->textHeight($this->_text) - ); - } - - if (parent::_done() === false) { - return false; - } - - if ($this->_alignment == IMAGE_GRAPH_ALIGN_CENTER_X) { - $x = ($this->_left + $this->_right) / 2; - } elseif ($this->_alignment == IMAGE_GRAPH_ALIGN_LEFT) { - $x = $this->_left; - } else { - $x = $this->_right; - } - $y = ($this->_top + $this->_bottom) / 2; - - $this->write( - $x, - $y, - $this->_text, - $this->_alignment + IMAGE_GRAPH_ALIGN_CENTER_Y - ); - return true; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Title.php,v 1.12 2005/08/24 20:35:56 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * Include file Image/Graph/Layout.php + */ +require_once 'Image/Graph/Layout.php'; + +/** + * Title + * + * @category Images + * @package Image_Graph + * @subpackage Text + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Title extends Image_Graph_Layout +{ + + /** + * The text to print + * @var string + * @access private + */ + var $_text; + + /** + * The font to use + * @var Font + * @access private + */ + var $_font; + + /** + * The alignment of the title + * @var int + * @access private + */ + var $_alignment = IMAGE_GRAPH_ALIGN_CENTER_X; + + /** + * Create the title. + * + * Pass a Image_Graph_Font object - preferably by-ref (&) as second + * parameter, the font size in pixels or an associated array with some or + * all of the followin keys: + * + * 'size' The size of the title + * + * 'angle' The angle at which to write the title (in degrees or 'vertical') + * + * 'color' The font-face color + * + * @param sting $text The text to represent the title + * @param mixed $fontOptions The font to use in the title + */ + function Image_Graph_Title($text, $fontOptions = false) + { + parent::Image_Graph_Layout(); + if (is_object($fontOptions)) { + $this->_font =& $fontOptions; + } else { + if (is_array($fontOptions)) { + $this->_fontOptions = $fontOptions; + } else { + $this->_fontOptions['size'] = $fontOptions; + } + } + $this->setText($text); + } + + /** + * Set the text + * + * @param string $text The text to display + */ + function setText($text) + { + $this->_text = $text; + } + + /** + * Returns the calculated "auto" size + * + * @return int The calculated auto size + * @access private + */ + function _getAutoSize() + { + if ($this->_defaultFontOptions !== false) { + $this->_canvas->setFont($this->_defaultFontOptions); + } else { + $this->_canvas->setFont($this->_getFont()); + } + + return $this->_canvas->textHeight($this->_text); + } + + /** + * Set the alignment of the legend + * + * @param int $alignment The alignment + */ + function setAlignment($alignment) + { + $this->_alignment = $alignment & 0x7; + } + + /** + * Output the text + * + * @return bool Was the output 'good' (true) or 'bad' (false). + * @access private + */ + function _done() + { + if ($this->_defaultFontOptions !== false) { + $this->_canvas->setFont($this->_defaultFontOptions); + } else { + $this->_canvas->setFont($this->_getFont()); + } + + if (is_a($this->_parent, 'Image_Graph_Plotarea')) { + $this->_setCoords( + $this->_parent->_left, + $this->_parent->_top, + $this->_parent->_right, + $this->_parent->_top + $this->_canvas->textHeight($this->_text) + ); + } elseif (!is_a($this->_parent, 'Image_Graph_Layout')) { + $this->_setCoords( + $this->_parent->_fillLeft(), + $this->_parent->_fillTop(), + $this->_parent->_fillRight(), + $this->_parent->_fillTop() + $this->_canvas->textHeight($this->_text) + ); + } + + if (parent::_done() === false) { + return false; + } + + if ($this->_alignment == IMAGE_GRAPH_ALIGN_CENTER_X) { + $x = ($this->_left + $this->_right) / 2; + } elseif ($this->_alignment == IMAGE_GRAPH_ALIGN_LEFT) { + $x = $this->_left; + } else { + $x = $this->_right; + } + $y = ($this->_top + $this->_bottom) / 2; + + $this->write( + $x, + $y, + $this->_text, + $this->_alignment + IMAGE_GRAPH_ALIGN_CENTER_Y + ); + return true; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/Graph/Tool.php b/includes/pear/Image/Graph/Tool.php index fa296b3a..e9fd424a 100644 --- a/includes/pear/Image/Graph/Tool.php +++ b/includes/pear/Image/Graph/Tool.php @@ -1,291 +1,291 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Tool.php,v 1.4 2005/09/14 20:27:24 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -/** - * This class contains a set of tool-functions. - * - * These functions are all to be called statically - * - * @category Images - * @package Image_Graph - * @author Jesper Veggerby - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version Release: @package_version@ - * @link http://pear.php.net/package/Image_Graph - */ -class Image_Graph_Tool -{ - - /** - * Return the average of 2 points - * - * @param double P1 1st point - * @param double P2 2nd point - * @return double The average of P1 and P2 - * @static - */ - function mid($p1, $p2) - { - return ($p1 + $p2) / 2; - } - - /** - * Mirrors P1 in P2 by a amount of Factor - * - * @param double $p1 1st point, point to mirror - * @param double $o2 2nd point, mirror point - * @param double $factor Mirror factor, 0 returns $p2, 1 returns a pure - * mirror, ie $p1 on the exact other side of $p2 - * @return double $p1 mirrored in $p2 by Factor - * @static - */ - function mirror($p1, $p2, $factor = 1) - { - return $p2 + $factor * ($p2 - $p1); - } - - /** - * Calculates a Bezier control point, this function must be called for BOTH - * X and Y coordinates (will it work for 3D coordinates!?) - * - * @param double $p1 1st point - * @param double $p2 Point to - * @param double $factor Mirror factor, 0 returns P2, 1 returns a pure - * mirror, i.e. P1 on the exact other side of P2 - * @return double P1 mirrored in P2 by Factor - * @static - */ - function controlPoint($p1, $p2, $factor, $smoothFactor = 0.75) - { - $sa = Image_Graph_Tool::mirror($p1, $p2, $smoothFactor); - $sb = Image_Graph_Tool::mid($p2, $sa); - - $m = Image_Graph_Tool::mid($p2, $factor); - - $pC = Image_Graph_Tool::mid($sb, $m); - - return $pC; - } - - /** - * Calculates a Bezier point, this function must be called for BOTH X and Y - * coordinates (will it work for 3D coordinates!?) - * - * @param double $t A position between $p2 and $p3, value between 0 and 1 - * @param double $p1 Point to use for calculating control points - * @param double $p2 Point 1 to calculate bezier curve between - * @param double $p3 Point 2 to calculate bezier curve between - * @param double $p4 Point to use for calculating control points - * @return double The bezier value of the point t between $p2 and $p3 using - * $p1 and $p4 to calculate control points - * @static - */ - function bezier($t, $p1, $p2, $p3, $p4) - { - // (1-t)^3*p1 + 3*(1-t)^2*t*p2 + 3*(1-t)*t^2*p3 + t^3*p4 - return pow(1 - $t, 3) * $p1 + - 3 * pow(1 - $t, 2) * $t * $p2 + - 3 * (1 - $t) * pow($t, 2) * $p3 + - pow($t, 3) * $p4; - } - - /** - * For a given point (x,y) return a point rotated by a given angle aroung the center (xy,yc) - * - * @param int $x x coordinate of the point to rotate - * @param int $y y coordinate of the point to rotate - * @param int $xc x coordinate of the center of the rotation - * @param int $yc y coordinate of the center of the rotation - * @param int $angle angle of the rotation - * @return array the coordinate of the new point - * @static - */ - function rotate($x, $y, $xc, $yc, $angle) - { - $cos = cos(deg2rad($angle)); - $sin = sin(deg2rad($angle)); - $xr= $x - $xc; - $yr= $y - $yc; - $x1= $xc + $cos * $xr - $sin * $yr; - $y1= $yc + $sin * $xr + $cos * $yr; - return array((int) $x1,(int) $y1); - } - - /** - * If a number is close 0 zero (i.e. 0 within $decimal decimals) it is rounded down to zero - * - * @param double $value The value to round - * @param int $decimal The number of decimals - * @return double The value or zero if "close enough" to zero - * @static - */ - function close2zero($value, $decimal) - { - if (abs($value) < pow(10, -$decimal)) { - return 0; - } - else { - return $value; - } - } - - /** - * Calculate the dimensions and center point (of gravity) for an arc - * - * @param int $v1 The angle at which the arc starts - * @param int $v2 The angle at which the arc ends - * @return array An array with the dimensions in a fraction of a circle width radius 1 'rx', 'ry' and the - * center point of gravity ('cx', 'cy') - * @static - */ - function calculateArcDimensionAndCenter($v1, $v2) - { - // $v2 always larger than $v1 - $r1x = Image_Graph_Tool::close2zero(cos(deg2rad($v1)), 3); - $r2x = Image_Graph_Tool::close2zero(cos(deg2rad($v2)), 3); - - $r1y = Image_Graph_Tool::close2zero(sin(deg2rad($v1)), 3); - $r2y = Image_Graph_Tool::close2zero(sin(deg2rad($v2)), 3); - - // $rx = how many percent of the x-diameter of the entire ellipse does the arc x-diameter occupy: 1 entire width, 0 no width - // $cx = at what percentage of the diameter does the center lie - - // if the arc passes through 0/360 degrees the "highest" of r1x and r2x is replaced by 1! - if ((($v1 <= 0) && ($v2 >= 0)) || (($v1 <= 360) && ($v2 >= 360))) { - $r1x = min($r1x, $r2x); - $r2x = 1; - } - - // if the arc passes through 180 degrees the "lowest" of r1x and r2x is replaced by -1! - if ((($v1 <= 180) && ($v2 >= 180)) || (($v1 <= 540) && ($v2 >= 540))) { - $r1x = max($r1x, $r2x); - $r2x = -1; - } - - if ($r1x >= 0) { // start between [270; 360] or [0; 90] - if ($r2x >= 0) { - $rx = max($r1x, $r2x) / 2; - $cx = 0; // center lies 0 percent along this "vector" - } - else { - $rx = abs($r1x - $r2x) / 2; - $cx = abs($r2x / 2) / $rx; - } - } - else { // start between ]90; 270[ - if ($r2x < 0) { - $rx = max(abs($r1x), abs($r2x)) / 2; - $cx = $rx; - } - else { - $rx = abs($r1x - $r2x) / 2; - $cx = abs($r1x / 2) / $rx; - } - } - - // $ry = how many percent of the y-diameter of the entire ellipse does the arc y-diameter occupy: 1 entire, 0 none - // $cy = at what percentage of the y-diameter does the center lie - - // if the arc passes through 90 degrees the "lowest" of r1x and r2x is replaced by -1! - if ((($v1 <= 90) && ($v2 >= 90)) || (($v1 <= 450) && ($v2 >= 450))) { - $r1y = min($r1y, $r2y); - $r2y = 1; - } - - // if the arc passes through 270 degrees the "highest" of r1y and r2y is replaced by -1! - if ((($v1 <= 270) && ($v2 >= 270)) || (($v1 <= 630) && ($v2 >= 630))) { - $r1y = max($r1y, $r2y); - $r2y = -1; - } - - if ($r1y >= 0) { // start between [0; 180] - if ($r2y >= 0) { - $ry = max($r1y, $r2y) / 2; - $cy = 0; // center lies 0 percent along this "vector" - } - else { - $ry = abs($r1y - $r2y) / 2; - $cy = abs($r2y / 2) / $ry; - } - } - else { // start between ]180; 360[ - if ($r2y < 0) { - $ry = max(abs($r1y), abs($r2y)) / 2; - $cy = $ry; - } - else { - $ry = abs($r1y - $r2y) / 2; - $cy = abs($r1y / 2) / $ry; - } - } - - return array( - 'rx' => $rx, - 'cx' => $cx, - 'ry' => $ry, - 'cy' => $cy - ); - } - - /** - * Calculate linear regression on a dataset - * @param array $data The data to calculate regression upon - * @return array The slope and intersection of the "best-fit" line - * @static - */ - function calculateLinearRegression(&$data) - { - $sumX = 0; - $sumY = 0; - foreach ($data as $point) { - $sumX += $point['X']; - $sumY += $point['Y']; - } - $meanX = $sumX / count($data); - $meanY = $sumY / count($data); - - $sumXX = 0; - $sumYY = 0; - $sumXY = 0; - foreach ($data as $point) { - $sumXX += ($point['X'] - $meanX) * ($point['X'] - $meanX); - $sumYY += ($point['Y'] - $meanY) * ($point['Y'] - $meanY); - $sumXY += ($point['X'] - $meanX) * ($point['Y'] - $meanY); - } - - $result = array(); - $result['slope'] = ($sumXY / $sumXX); - $result['intersection'] = $meanY - ($result['slope'] * $meanX); - return $result; - } - -} - + + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version CVS: $Id: Tool.php,v 1.4 2005/09/14 20:27:24 nosey Exp $ + * @link http://pear.php.net/package/Image_Graph + */ + +/** + * This class contains a set of tool-functions. + * + * These functions are all to be called statically + * + * @category Images + * @package Image_Graph + * @author Jesper Veggerby + * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Image_Graph + */ +class Image_Graph_Tool +{ + + /** + * Return the average of 2 points + * + * @param double P1 1st point + * @param double P2 2nd point + * @return double The average of P1 and P2 + * @static + */ + function mid($p1, $p2) + { + return ($p1 + $p2) / 2; + } + + /** + * Mirrors P1 in P2 by a amount of Factor + * + * @param double $p1 1st point, point to mirror + * @param double $o2 2nd point, mirror point + * @param double $factor Mirror factor, 0 returns $p2, 1 returns a pure + * mirror, ie $p1 on the exact other side of $p2 + * @return double $p1 mirrored in $p2 by Factor + * @static + */ + function mirror($p1, $p2, $factor = 1) + { + return $p2 + $factor * ($p2 - $p1); + } + + /** + * Calculates a Bezier control point, this function must be called for BOTH + * X and Y coordinates (will it work for 3D coordinates!?) + * + * @param double $p1 1st point + * @param double $p2 Point to + * @param double $factor Mirror factor, 0 returns P2, 1 returns a pure + * mirror, i.e. P1 on the exact other side of P2 + * @return double P1 mirrored in P2 by Factor + * @static + */ + function controlPoint($p1, $p2, $factor, $smoothFactor = 0.75) + { + $sa = Image_Graph_Tool::mirror($p1, $p2, $smoothFactor); + $sb = Image_Graph_Tool::mid($p2, $sa); + + $m = Image_Graph_Tool::mid($p2, $factor); + + $pC = Image_Graph_Tool::mid($sb, $m); + + return $pC; + } + + /** + * Calculates a Bezier point, this function must be called for BOTH X and Y + * coordinates (will it work for 3D coordinates!?) + * + * @param double $t A position between $p2 and $p3, value between 0 and 1 + * @param double $p1 Point to use for calculating control points + * @param double $p2 Point 1 to calculate bezier curve between + * @param double $p3 Point 2 to calculate bezier curve between + * @param double $p4 Point to use for calculating control points + * @return double The bezier value of the point t between $p2 and $p3 using + * $p1 and $p4 to calculate control points + * @static + */ + function bezier($t, $p1, $p2, $p3, $p4) + { + // (1-t)^3*p1 + 3*(1-t)^2*t*p2 + 3*(1-t)*t^2*p3 + t^3*p4 + return pow(1 - $t, 3) * $p1 + + 3 * pow(1 - $t, 2) * $t * $p2 + + 3 * (1 - $t) * pow($t, 2) * $p3 + + pow($t, 3) * $p4; + } + + /** + * For a given point (x,y) return a point rotated by a given angle aroung the center (xy,yc) + * + * @param int $x x coordinate of the point to rotate + * @param int $y y coordinate of the point to rotate + * @param int $xc x coordinate of the center of the rotation + * @param int $yc y coordinate of the center of the rotation + * @param int $angle angle of the rotation + * @return array the coordinate of the new point + * @static + */ + function rotate($x, $y, $xc, $yc, $angle) + { + $cos = cos(deg2rad($angle)); + $sin = sin(deg2rad($angle)); + $xr= $x - $xc; + $yr= $y - $yc; + $x1= $xc + $cos * $xr - $sin * $yr; + $y1= $yc + $sin * $xr + $cos * $yr; + return array((int) $x1,(int) $y1); + } + + /** + * If a number is close 0 zero (i.e. 0 within $decimal decimals) it is rounded down to zero + * + * @param double $value The value to round + * @param int $decimal The number of decimals + * @return double The value or zero if "close enough" to zero + * @static + */ + function close2zero($value, $decimal) + { + if (abs($value) < pow(10, -$decimal)) { + return 0; + } + else { + return $value; + } + } + + /** + * Calculate the dimensions and center point (of gravity) for an arc + * + * @param int $v1 The angle at which the arc starts + * @param int $v2 The angle at which the arc ends + * @return array An array with the dimensions in a fraction of a circle width radius 1 'rx', 'ry' and the + * center point of gravity ('cx', 'cy') + * @static + */ + function calculateArcDimensionAndCenter($v1, $v2) + { + // $v2 always larger than $v1 + $r1x = Image_Graph_Tool::close2zero(cos(deg2rad($v1)), 3); + $r2x = Image_Graph_Tool::close2zero(cos(deg2rad($v2)), 3); + + $r1y = Image_Graph_Tool::close2zero(sin(deg2rad($v1)), 3); + $r2y = Image_Graph_Tool::close2zero(sin(deg2rad($v2)), 3); + + // $rx = how many percent of the x-diameter of the entire ellipse does the arc x-diameter occupy: 1 entire width, 0 no width + // $cx = at what percentage of the diameter does the center lie + + // if the arc passes through 0/360 degrees the "highest" of r1x and r2x is replaced by 1! + if ((($v1 <= 0) && ($v2 >= 0)) || (($v1 <= 360) && ($v2 >= 360))) { + $r1x = min($r1x, $r2x); + $r2x = 1; + } + + // if the arc passes through 180 degrees the "lowest" of r1x and r2x is replaced by -1! + if ((($v1 <= 180) && ($v2 >= 180)) || (($v1 <= 540) && ($v2 >= 540))) { + $r1x = max($r1x, $r2x); + $r2x = -1; + } + + if ($r1x >= 0) { // start between [270; 360] or [0; 90] + if ($r2x >= 0) { + $rx = max($r1x, $r2x) / 2; + $cx = 0; // center lies 0 percent along this "vector" + } + else { + $rx = abs($r1x - $r2x) / 2; + $cx = abs($r2x / 2) / $rx; + } + } + else { // start between ]90; 270[ + if ($r2x < 0) { + $rx = max(abs($r1x), abs($r2x)) / 2; + $cx = $rx; + } + else { + $rx = abs($r1x - $r2x) / 2; + $cx = abs($r1x / 2) / $rx; + } + } + + // $ry = how many percent of the y-diameter of the entire ellipse does the arc y-diameter occupy: 1 entire, 0 none + // $cy = at what percentage of the y-diameter does the center lie + + // if the arc passes through 90 degrees the "lowest" of r1x and r2x is replaced by -1! + if ((($v1 <= 90) && ($v2 >= 90)) || (($v1 <= 450) && ($v2 >= 450))) { + $r1y = min($r1y, $r2y); + $r2y = 1; + } + + // if the arc passes through 270 degrees the "highest" of r1y and r2y is replaced by -1! + if ((($v1 <= 270) && ($v2 >= 270)) || (($v1 <= 630) && ($v2 >= 630))) { + $r1y = max($r1y, $r2y); + $r2y = -1; + } + + if ($r1y >= 0) { // start between [0; 180] + if ($r2y >= 0) { + $ry = max($r1y, $r2y) / 2; + $cy = 0; // center lies 0 percent along this "vector" + } + else { + $ry = abs($r1y - $r2y) / 2; + $cy = abs($r2y / 2) / $ry; + } + } + else { // start between ]180; 360[ + if ($r2y < 0) { + $ry = max(abs($r1y), abs($r2y)) / 2; + $cy = $ry; + } + else { + $ry = abs($r1y - $r2y) / 2; + $cy = abs($r1y / 2) / $ry; + } + } + + return array( + 'rx' => $rx, + 'cx' => $cx, + 'ry' => $ry, + 'cy' => $cy + ); + } + + /** + * Calculate linear regression on a dataset + * @param array $data The data to calculate regression upon + * @return array The slope and intersection of the "best-fit" line + * @static + */ + function calculateLinearRegression(&$data) + { + $sumX = 0; + $sumY = 0; + foreach ($data as $point) { + $sumX += $point['X']; + $sumY += $point['Y']; + } + $meanX = $sumX / count($data); + $meanY = $sumY / count($data); + + $sumXX = 0; + $sumYY = 0; + $sumXY = 0; + foreach ($data as $point) { + $sumXX += ($point['X'] - $meanX) * ($point['X'] - $meanX); + $sumYY += ($point['Y'] - $meanY) * ($point['Y'] - $meanY); + $sumXY += ($point['X'] - $meanX) * ($point['Y'] - $meanY); + } + + $result = array(); + $result['slope'] = ($sumXY / $sumXX); + $result['intersection'] = $meanY - ($result['slope'] * $meanX); + return $result; + } + +} + ?> \ No newline at end of file diff --git a/includes/pear/Image/docs/ChangeLog b/includes/pear/Image/docs/ChangeLog deleted file mode 100644 index 061a8061..00000000 --- a/includes/pear/Image/docs/ChangeLog +++ /dev/null @@ -1,48 +0,0 @@ -************************** - Image_Canvas - Changelog -************************** -Version 0.2.4 [2005-Nov-08] - Jesper Veggerby - * Fixed a bug causing in Image_Canvas_SVG causing grouping to give a "Missing argument..." error (this rendered Image_Graph using SVG broken) - * Fixed a bug causing rectangles not being displayed, if points were given in the wrong order - -Version 0.2.3 [2005-Oct-28] - Jesper Veggerby - * Fixed Bug #5786 "Error in producing SVG" - * Fixed Bug #5805 "Canvas\Fonts\fontmap.txt is missing" - -Version 0.2.2 [2005-Sep-30] - Jesper Veggerby - * Added 'border' and 'cssclass' option to Image_Canvas_GD::toHtml() - * Added image support when using SVG (using embedded base64 encoding) - * Added link ("imagemap") support with SVG - * Made image loading in GD canvas use getimagesize() to determine type instead of relying on extension - * Fixed bug where 'htmltags' were not transferred to image mapping of polygon vertices - * Fixed bug in SVG where pie slices with some specific angles curled the wrong way - * Fixed bug in Image_Canvas_ImageMap::show() and Image_Canvas_ImageMap::save() calling non-existing method _toHtml() - * Fixed bug in Image_Canvas_SVG::polygon() not showing polygon if last point was a spline - addSpline() - * Fixed bug causing line ends not to show if color not exlicitly defined - * Fixed Bug #5066 "Reference Notices" (from Image_Graph) - * Fixed bug #5175 "Unable to define IMAGE_GRAPH_SYSTEM_FONT_PATH outside of Config.php" - * Fixed Bug #5325 "Image/Color.php compatibility with old PHP versions" - -Version 0.2.1 [2005-Aug-08] - Jesper Veggerby - * Added Request #4997 "HTML attributes and JS actions in imagemaps" - using 'htmltags' entry - * Fixed bug with fonts, now it's not required for the font to have a name - * Changed examples to use require_once instead of include/require - -Version 0.2.0 [2005-Aug-01] - Jesper Veggerby - * First released package in PEAR - * Added support for image maps - a separate canvas (Image_Canvas_ImageMap) has been created to accomplish this - * Added support for antialiasing images when using GD (both using native GD method and Image_Graph own implementation) - * Added support for multi line texts - * Added a toHtml() method for to easy facilitate including canvas in HTML (this includes the associated image map, if any) - * Added line ends - only supported in GD canvases currently and not on polygons (yet!) - -Version 0.1.2 [2005-Jul-21] - Jesper Veggerby - * Changed write() to addText() - * Split done() into show() and save() - * Changed all methods with more than 1 parameter to use hashed array as parameters - -Version 0.1.1 [2005-Mar-21] - Jesper Veggerby - * Renamed package to Image_Canvas - -Version 0.1.0 [2005-Feb-14] - Jesper Veggerby - * First "stand-alone" release ("outside" Image_Graph) \ No newline at end of file diff --git a/includes/pear/Image/docs/LICENSE b/includes/pear/Image/docs/LICENSE deleted file mode 100644 index a825d02b..00000000 --- a/includes/pear/Image/docs/LICENSE +++ /dev/null @@ -1,344 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called 'this License'). -Each licensee is addressed as 'you'. - - A 'library' means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The 'Library', below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term 'modification'.) - - 'Source code' for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a 'work that uses the Library'. Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a 'work that uses the Library' with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a 'work that uses the Library' uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a 'work that uses the Library' with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -'any later version', you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY 'AS IS' WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/includes/pear/Image/docs/README b/includes/pear/Image/docs/README deleted file mode 100644 index d26d35ca..00000000 --- a/includes/pear/Image/docs/README +++ /dev/null @@ -1,41 +0,0 @@ - ******************************* - Image_Canvas - ******************************* - version 0.2.4 - - ------ CopyRight (C) Jesper Veggerby Hansen, 2003-2005 ------ - http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - -_________________________________________________________________ - - This library is free software; you can redistribute it - and/or modify it under the terms of the GNU Lesser General - Public License as published by the Free Software Foundation; - either version 2.1 of the License, or (at your option) - any later version. -_________________________________________________________________ - -Image_Canvas - -Requirements ------------- -The only system requirement is PHP4/PHP5 support. -For GD output GD support is required with GD 2 for optimal performance. For PDF -support, PDFlib is required (planned File_PDF support when released in working -version). - -Documentation -------------- -See http://pear.veggerby.dk/Image_Canvas/docs/ for documentation - -History -------- -Release history of Image_Canvas -0.2.4 08-Nov-2005 -0.2.3 28-Oct-2005 -0.2.2 30-Sep-2005 -0.2.1 08-Aug-2005 First version used by Image_Graph -0.2.0 01-Aug-2005 First PEAR release -0.1.2 21-Jul-2005 -0.1.1 21-Mar-2005 -0.1.0 14-Feb-2005 \ No newline at end of file diff --git a/includes/pear/Image/docs/colors.txt b/includes/pear/Image/docs/colors.txt deleted file mode 100644 index e92d7cb0..00000000 --- a/includes/pear/Image/docs/colors.txt +++ /dev/null @@ -1,142 +0,0 @@ -List of supported named colors (extract from Image/Color.php) - -aliceblue -antiquewhite -aqua -aquamarine -azure -beige -bisque -black -blanchedalmond -blue -blueviolet -brown -burlywood -cadetblue -chartreuse -chocolate -coral -cornflowerblue -cornsilk -crimson -cyan -darkblue -darkcyan -darkgoldenrod -darkgray -darkgreen -darkkhaki -darkmagenta -darkolivegreen -darkorange -darkorchid -darkred -darksalmon -darkseagreen -darkslateblue -darkslategray -darkturquoise -darkviolet -deeppink -deepskyblue -dimgray -dodgerblue -firebrick -floralwhite -forestgreen -fuchsia -gainsboro -ghostwhite -gold -goldenrod -gray -green -greenyellow -honeydew -hotpink -indianred -indigo -ivory -khaki -lavender -lavenderblush -lawngreen -lemonchiffon -lightblue -lightcoral -lightcyan -lightgoldenrodyellow -lightgreen -lightgrey -lightpink -lightsalmon -lightseagreen -lightskyblue -lightslategray -lightsteelblue -lightyellow -lime -limegreen -linen -magenta -maroon -mediumaquamarine -mediumblue -mediumorchid -mediumpurple -mediumseagreen -mediumslateblue -mediumspringgreen -mediumturquoise -mediumvioletred -midnightblue -mintcream -mistyrose -moccasin -navajowhite -navy -oldlace -olive -olivedrab -orange -orangered -orchid -palegoldenrod -palegreen -paleturquoise -palevioletred -papayawhip -peachpuff -peru -pink -plum -powderblue -purple -red -rosybrown -royalblue -saddlebrown -salmon -sandybrown -seagreen -seashell -sienna -silver -skyblue -slateblue -slategray -snow -springgreen -steelblue -tan -teal -thistle -tomato -turquoise -violet -wheat -white -whitesmoke -yellow -yellowgreen \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/antialias.php b/includes/pear/Image/docs/examples/antialias.php deleted file mode 100644 index 1025d77e..00000000 --- a/includes/pear/Image/docs/examples/antialias.php +++ /dev/null @@ -1,104 +0,0 @@ - - */ - -// include libraries -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -// create a PNG canvas and enable antialiasing (canvas implementation) -$Canvas =& Image_Canvas::factory('png', array('width' => 600, 'height' => 300, 'antialias' => 'native')); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 8 pixels -$Font->setSize(8); - -// set the font -$Graph->setFont($Font); - -// create the layout -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Antialiased Sample Chart', 12)), - Image_Graph::vertical( - Image_Graph::horizontal( - $Plotarea1 = Image_Graph::factory('plotarea'), - $Plotarea2 = Image_Graph::factory('plotarea') - ), - $Legend = Image_Graph::factory('legend'), - 80 - ), - 5 - ) -); - -// add grids -$Grid =& $Plotarea1->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); -$Grid->setLineColor('silver'); -$Grid =& $Plotarea2->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); -$Grid->setLineColor('silver'); - -// setup legend -$Legend->setPlotarea($Plotarea1); -$Legend->setPlotarea($Plotarea2); - -// create the dataset -$Datasets = - array( - Image_Graph::factory('random', array(10, 2, 15, true)), - Image_Graph::factory('random', array(10, 2, 15, true)), - Image_Graph::factory('random', array(10, 2, 15, true)) - ); - -// create the plot as stacked area chart using the datasets -$Plot =& $Plotarea1->addNew('Image_Graph_Plot_Area', array($Datasets, 'stacked')); - -// set names for datasets (for legend) -$Datasets[0]->setName('Jylland'); -$Datasets[1]->setName('Fyn'); -$Datasets[2]->setName('Sjælland'); - -// set line color for plot -$Plot->setLineColor('gray'); - -// create and populate the fillarray -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('green@0.2'); - -// set a fill style -$Plot->setFillStyle($FillArray); - -// add other plots -$Plot =& $Plotarea2->addNew('line', $Datasets[0]); -$Plot->setLineColor('blue@0.2'); -$Plot =& $Plotarea2->addNew('line', $Datasets[1]); -$Plot->setLineColor('yellow@0.2'); -$Plot =& $Plotarea2->addNew('line', $Datasets[2]); -$Plot->setLineColor('green@0.2'); - -// set color -$Plotarea1->setFillColor('silver@0.3'); -$Plotarea2->setFillColor('silver@0.3'); - -// output the Graph -$Graph->done(); - -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/axis_direction.php b/includes/pear/Image/docs/examples/axis_direction.php deleted file mode 100644 index e9c55a64..00000000 --- a/includes/pear/Image/docs/examples/axis_direction.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 300)); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(10); - -$Graph->setFont($Font); - -// setup the plotarea, legend and their layout -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Changing Axis Direction', 12)), - Image_Graph::horizontal( - $Plotarea1 = Image_Graph::factory('plotarea'), - $Plotarea2 = Image_Graph::factory('plotarea'), - 50 - ), - 5 - ) -); - -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -$Plot1 =& $Plotarea1->addNew('line', array(&$Dataset)); -$Plot1->setLineColor('red'); - -$Plot2 =& $Plotarea2->addNew('line', array(&$Dataset)); -$Plot2->setLineColor('red'); - -$AxisY =& $Plotarea2->getAxis('y'); -$AxisY->setInverted(true); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/canvas.php b/includes/pear/Image/docs/examples/canvas.php deleted file mode 100644 index a5270016..00000000 --- a/includes/pear/Image/docs/examples/canvas.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: canvas.php,v 1.1 2005/08/03 21:11:22 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -include_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory((isset($_GET['canvas']) ? $_GET['canvas'] : 'png'), array('width' => 400, 'height' => 300)); - -$Canvas->setLineColor('black'); -$Canvas->rectangle(array('x0' => 0, 'y0' => 0, 'x1' => 399, 'y1' => 299)); - -$Canvas->setGradientFill(array('direction' => 'horizontal', 'start' => 'red', 'end' => 'blue')); -$Canvas->setLineColor('black'); -$Canvas->ellipse(array('x' => 199, 'y' => 149, 'rx' => 50, 'ry' => 50)); - -$Canvas->setFont(array('name' => 'Arial', 'size' => 12)); -$Canvas->addText(array('x' => 0, 'y' => 0, 'text' => 'Demonstration of what Image_Canvas do!')); - -$Canvas->setFont(array('name' => 'Times New Roman', 'size' => 12)); -$Canvas->addText(array('x' => 399, 'y' => 20, 'text' => 'This does not demonstrate what is does!', 'alignment' => array('horizontal' => 'right'))); - -$Canvas->setFont(array('name' => 'Courier New', 'size' => 7, 'angle' => 270)); -$Canvas->addText(array('x' => 350, 'y' => 50, 'text' => 'True, but it\'s all independent of the format!', 'alignment' => array('horizontal' => 'right'))); - -$Canvas->setFont(array('name' => 'Garamond', 'size' => 10)); -$Canvas->addText(array('x' => 199, 'y' => 295, 'text' => '[Changing format is done by changing 3 letters in the source]', 'alignment' => array('horizontal' => 'center', 'vertical' => 'bottom'))); - -$Canvas->addVertex(array('x' => 50, 'y' => 200)); -$Canvas->addVertex(array('x' => 100, 'y' => 200)); -$Canvas->addVertex(array('x' => 100, 'y' => 250)); -$Canvas->setFillColor('red@0.2'); -$Canvas->polygon(array('connect' => true)); - -$Canvas->image(array('x' => 398, 'y' => 298, 'filename' => './pear-icon.png', 'alignment' => array('horizontal' => 'right', 'vertical' => 'bottom'))); - -$Canvas->show(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/category_axis_explanation.php b/includes/pear/Image/docs/examples/category_axis_explanation.php deleted file mode 100644 index ef9fa327..00000000 --- a/includes/pear/Image/docs/examples/category_axis_explanation.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('png', array('width' => 500, 'height' => 200, 'antialias' => true)); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(9); - -$Graph->setFont($Font); - -$Plotarea =& $Graph->addNew('plotarea'); - -$Datasets[0] =& Image_Graph::factory('dataset'); -$Datasets[1] =& Image_Graph::factory('dataset'); -$Datasets[2] =& Image_Graph::factory('dataset'); - -$Datasets[0]->addPoint('this', 1); -$Datasets[0]->addPoint('can', 3); -$Datasets[0]->addPoint('make', 2); -$Datasets[0]->addPoint('correctly', 1); - -$Datasets[1]->addPoint('sentence', 1); -$Datasets[1]->addPoint('can', 1); -$Datasets[1]->addPoint('sense', 2); -$Datasets[1]->addPoint('written', 2); -$Datasets[1]->addPoint('correctly', 2); - -$Datasets[2]->addPoint('actually', 3); -$Datasets[2]->addPoint('make', 2); -$Datasets[2]->addPoint('if', 3); -$Datasets[2]->addPoint('written', 1); - - -// expecting the following X-axis order -// 'this sentence can actually make sense if written correctly' -// making points be placed in the following order: -// -// |this|sentence|can|actually|make|sense|if|written|correctly| -// 1 |_1__|________|_2_|________|_3__|_____|__|_______|____4____| -// 2 |____|___1____|_2_|________|____|__3__|__|___4___|____5____| -// 3 |____|________|___|___1____|_2__|_____|3_|___4___|_________| -// -// if an append-algorithm were to be (wrongly) used it would yield -// 'this can make correctly sentence sense written actually if' -// making points be placed in the following order: -// -// |this|can|make|correctly|sentence|sense|written|actually|if| -// 1 |_1__|_2_|_3__|____4____|________|_____|_______|________|__| -// 2 |____|_2_|____|____5____|___1____|__3__|___4___|________|__| -// 3 |____|___|_2__|_________|________|_____|___4___|___1____|3_| - - -$Plot1 =& $Plotarea->addNew('line', array(&$Datasets[0])); -$Plot2 =& $Plotarea->addNew('line', array(&$Datasets[1])); -$Plot3 =& $Plotarea->addNew('line', array(&$Datasets[2])); - -$Plot1->setLineColor('red'); -$Plot2->setLineColor('blue'); -$Plot3->setLineColor('green'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/color_chart.php b/includes/pear/Image/docs/examples/color_chart.php deleted file mode 100644 index e935ded7..00000000 --- a/includes/pear/Image/docs/examples/color_chart.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ - -$file = file('./data/colors.txt'); - -require_once 'Image/Canvas.php'; -require_once 'Image/Graph/Color.php'; -require_once 'Image/Graph/Constants.php'; - -$Canvas =& Image_Canvas::factory('gd', array('width' => 600, 'height' => 1200)); - -$i = 0; -$cols = 10; -$Width = ($Canvas->getWidth() / $cols); -$rows = count($file) / $cols; -$rows = floor($rows) + ($rows > floor($rows) ? 1 : 0); -$Height = ($Canvas->getHeight() / $rows); -while (list($id, $color) = each($file)) { - $color = trim($color); - $x = ($i % $cols) * $Width + $Width / 2; - $y = floor($i / $cols) * $Height; - $Canvas->setLineColor('black'); - $Canvas->setFillColor($color); - $Canvas->rectangle($x - $Width / 4, $y, $x + $Width / 4, $y + $Height / 3); - $Canvas->write($x, $y + $Height / 3 + 3, $color, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_TOP); - - $rgbColor = Image_Graph_Color::color2RGB($color); - $rgbs = 'RGB: '; - unset($rgbColor[3]); - while (list($id, $rgb) = each($rgbColor)) { - $rgbs .= ($rgb < 0x10 ? '0' : '') . dechex($rgb); - } - $Canvas->write($x, $y + $Height / 3 + 13, $rgbs, IMAGE_GRAPH_ALIGN_CENTER_X + IMAGE_GRAPH_ALIGN_TOP); - $i++; -} - -$Canvas->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/customize.php b/includes/pear/Image/docs/examples/customize.php deleted file mode 100644 index 4c765b0a..00000000 --- a/includes/pear/Image/docs/examples/customize.php +++ /dev/null @@ -1,116 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(450, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Stacked Bar Chart with defined axis properties', 12)), - $Plotarea = Image_Graph::factory('plotarea'), - 5 - ) -); - -$MarkerX =& $Plotarea->addNew('Image_Graph_Axis_Marker_Area', null, IMAGE_GRAPH_AXIS_X); -$MarkerX->setFillColor('blue@0.3'); -$MarkerX->setLineColor('blue@0.3'); -$MarkerX->setLowerBound(7); -$MarkerX->setUpperBound(8); - -$MarkerY =& $Plotarea->addNew('Image_Graph_Axis_Marker_Area', null, IMAGE_GRAPH_AXIS_Y); -$MarkerY->setFillColor('green@0.3'); -$MarkerY->setLineColor('green@0.3'); -$MarkerY->setLowerBound(5.2); -$MarkerY->setUpperBound(9.3); - -$MarkerY =& $Plotarea->addNew('Image_Graph_Axis_Marker_Line', null, IMAGE_GRAPH_AXIS_Y); -$MarkerY->setLineColor('red'); -$MarkerY->setValue(14.4); - -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot1 =& $Plotarea->add( - Image_Graph::factory('bar', - array( - $Dataset = array( - Image_Graph::factory('random', array(8, 1, 10, false)), - Image_Graph::factory('random', array(8, 1, 10, false)), - Image_Graph::factory('random', array(8, 1, 10, false)) - ), - 'stacked' - ) - ) -); - -$Dataset[0]->setName('Dataset one'); -$Dataset[1]->setName('Numero duo'); -$Dataset[2]->setName('En-to-tre'); - -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.1', 0); -$FillArray->addColor('red@0.1', 1); -$FillArray->addColor('yellow@0.1', 2); -$Plot1->setFillStyle($FillArray); - -// Show arrow heads on the axis -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); - -$AxisY->addMark(5); -$AxisY->addMark(7); - -$AxisY->setFontSize(7); - -$AxisY->addMark(10.8, 17.5); -$AxisY->setFillColor('red@0.7'); -$AxisY->setLabelInterval(array(1, 5, 9, 12, 13, 14, 19, 21)); -$AxisY->setTickOptions(-3, 2); -$AxisY->setLabelInterval('auto', 2); -$AxisY->setTickOptions(-1, 1, 2); - -$AxisY->setLabelOptions( - array( - 'showtext' => true, - 'font' => array( - 'size' => 3, - 'color' => 'red' - ) - ), 2 -); -$AxisY->setLabelOption('showoffset', true, 1); - -$AxisX->showArrow(); - -$Legend =& $Plotarea->addNew('legend'); -$Legend->setFillColor('white@0.7'); -$Legend->setFontSize(8); -$Legend->showShadow(); - -$Plot1->setLineColor('black@0.1'); - - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/data/colors.txt b/includes/pear/Image/docs/examples/data/colors.txt deleted file mode 100644 index c472f0ac..00000000 --- a/includes/pear/Image/docs/examples/data/colors.txt +++ /dev/null @@ -1,140 +0,0 @@ -aliceblue -antiquewhite -aqua -aquamarine -azure -beige -bisque -black -blanchedalmond -blue -blueviolet -brown -burlywood -cadetblue -chartreuse -chocolate -coral -cornflowerblue -cornsilk -crimson -cyan -darkblue -darkcyan -darkgoldenrod -darkgray -darkgreen -darkkhaki -darkmagenta -darkolivegreen -darkorange -darkorchid -darkred -darksalmon -darkseagreen -darkslateblue -darkslategray -darkturquoise -darkviolet -deeppink -deepskyblue -dimgray -dodgerblue -firebrick -floralwhite -forestgreen -fuchsia -gainsboro -ghostwhite -gold -goldenrod -gray -green -greenyellow -honeydew -hotpink -indianred -indigo -ivory -khaki -lavender -lavenderblush -lawngreen -lemonchiffon -lightblue -lightcoral -lightcyan -lightgoldenrodyellow -lightgreen -lightgrey -lightpink -lightsalmon -lightseagreen -lightskyblue -lightslategray -lightsteelblue -lightyellow -lime -limegreen -linen -magenta -maroon -mediumaquamarine -mediumblue -mediumorchid -mediumpurple -mediumseagreen -mediumslateblue -mediumspringgreen -mediumturquoise -mediumvioletred -midnightblue -mintcream -mistyrose -moccasin -navajowhite -navy -oldlace -olive -olivedrab -orange -orangered -orchid -palegoldenrod -palegreen -paleturquoise -palevioletred -papayawhip -peachpuff -peru -pink -plum -powderblue -purple -red -rosybrown -royalblue -saddlebrown -salmon -sandybrown -seagreen -seashell -sienna -silver -skyblue -slateblue -slategray -snow -springgreen -steelblue -tan -teal -thistle -tomato -turquoise -violet -wheat -white -whitesmoke -yellow -yellowgreen \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/datapreprocessor.php b/includes/pear/Image/docs/examples/datapreprocessor.php deleted file mode 100644 index 2ab78749..00000000 --- a/includes/pear/Image/docs/examples/datapreprocessor.php +++ /dev/null @@ -1,99 +0,0 @@ - - */ - -error_reporting(E_ALL); -include('Image/Graph.php'); - -function foo($value) { - return '-' . chr($value+63) . '-'; -} - -// create the graph -$Graph =& Image_Graph::factory('Image_Graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('Image_Graph_Title', array('DataPreprocessor Example', 11)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2)), - 5 - ) -); - -$Charts = array('bar', 'line', 'Image_Graph_Plot_Smoothed_Line', 'Image_Graph_Plot_Area'); - -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 2; $j++) { - $Plotarea =& $Matrix->getEntry($i, $j); - - $Chart = $Charts[($i*2+$j)]; - - $GridY =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y); - $GridY->setFillStyle(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'lightgrey'))); - - $Var = "Plot$i$j"; - $Dataset =& Image_Graph::factory('Image_Graph_Dataset_Random', array(8, 10, 100, $Chart == 'Image_Graph_Plot_Area')); - $$Var =& $Plotarea->addNew($Chart, array(&$Dataset)); - } -} -$Plotarea =& $Matrix->getEntry(0, 0); - -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_RomanNumerals')); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_NumberText')); - -$Plotarea =& $Matrix->getEntry(0, 1); -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setDataPreprocessor( - Image_Graph::factory('Image_Graph_DataPreprocessor_Array', - array( - array( - 1 => '30 Jul', - 2 => '31 Jul', - 3 => '1 Aug', - 4 => '2 Aug', - 5 => '3 Aug', - 6 => '4 Aug', - 7 => '5 Aug', - 8 => '6 Aug' - ) - ) - ) -); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '+ %0.1f%%')); - -$Plotarea =& $Matrix->getEntry(1, 0); -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'foo')); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Currency', 'US$')); - -// just for looks -$Plot00->setFillColor('red@0.2'); - -$Plot11->setFillColor('blue@0.2'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/double_category_axis.php b/includes/pear/Image/docs/examples/double_category_axis.php deleted file mode 100644 index ed5e3631..00000000 --- a/includes/pear/Image/docs/examples/double_category_axis.php +++ /dev/null @@ -1,100 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Category Axis', 10)), - $Plotarea = Image_Graph::factory('plotarea', array('Image_Graph_Axis_Category', 'Image_Graph_Axis_Category')), - 5 - ) -); - -//$DS =& Image_Graph::factory('dataset'); -//$DS->addPoint('Apache', 'Open Source'); -//$DS->addPoint('BSD', 'Open Source'); -//$DS->addPoint('Linux', 'Open Source'); -//$DS->addPoint('Microsoft', 'Proprietary'); -//$DS->addPoint('Micro', 'Proprietary'); -//$DS->addPoint('Minisoft', 'Proprie'); -//$DS->addPoint('Millisoft', 'Prop'); -// -//$DS2 =& Image_Graph::factory('dataset'); -//$DS->addPoint('Apache', 'Open Source'); -//$DS->addPoint('BSD', 'Open Source'); -//$DS->addPoint('Linux', 'Open Source'); -//$DS->addPoint('Microsoft', 'Proprietary'); -//$DS->addPoint('Micro', 'Proprietary'); -//$DS->addPoint('Minisoft', 'Proprie'); -//$DS->addPoint('Miniority', 'Proprias'); -// -//$Plot =& $Plotarea->addNew('scatter', $DS); -//$Marker =& Image_Graph::factory('Image_Graph_Marker_Plus'); -//$Marker->setFillColor('red'); -//$Marker->setLineColor('black'); -//$Plot->setMarker($Marker); -// -//$Plot2 =& $Plotarea->addNew('scatter', $DS2); -//$Marker =& Image_Graph::factory('Image_Graph_Marker_Cross'); -//$Marker->setFillColor('blue'); -//$Marker->setLineColor('black'); -//$Plot2->setMarker($Marker); -// -//$Graph->done(); - -$DS =& Image_Graph::factory('dataset'); -$DS->addPoint('Germany', 'England'); -$DS->addPoint('Denmark', 'France'); -$DS->addPoint('Sweden', 'Denmark'); -$DS->addPoint('England', 'France'); -$DS->addPoint('Norway', 'Finland'); -$DS->addPoint('Denmark', 'Finland'); -$DS->addPoint('Iceland', 'Germany'); -$DS->addPoint('Norway', 'France'); - -$DS2 =& Image_Graph::factory('dataset'); -$DS2->addPoint('Sweden', 'France'); -$DS2->addPoint('Austria', 'Germany'); -$DS2->addPoint('Norway', 'Holland'); -$DS2->addPoint('Denmark', 'Germany'); -$DS2->addPoint('Sweden', 'Holland'); -$DS2->addPoint('Iceland', 'Denmark'); - -$Plot =& $Plotarea->addNew('scatter', $DS); -$Marker =& Image_Graph::factory('Image_Graph_Marker_Cross'); -$Marker->setFillColor('blue'); -$Marker->setLineColor('black'); -$Plot->setMarker($Marker); - -$Plot2 =& $Plotarea->addNew('scatter', $DS2); -$Marker2 =& Image_Graph::factory('Image_Graph_Marker_Plus'); -$Marker2->setFillColor('yellow'); -$Marker2->setLineColor('black'); -$Plot2->setMarker($Marker2); - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/driver_filepdf.php b/includes/pear/Image/docs/examples/driver_filepdf.php deleted file mode 100644 index f302fd69..00000000 --- a/includes/pear/Image/docs/examples/driver_filepdf.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ - -error_reporting(E_ALL); - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('File_PDF', array('page' => 'A4')); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - -// // setup the plotarea, legend and their layout -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Simple Line Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 88 - ), - 5 - ) -); - -// link the legend with the plotares -$Legend->setPlotarea($Plotarea); - -// create a random dataset for sake of simplicity -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -// create the plot as line chart using the dataset -$Plot =& $Plotarea->addNew('line', array(&$Dataset)); - -// set a line color -$Plot->setLineColor('red'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/driver_pdf.php b/includes/pear/Image/docs/examples/driver_pdf.php deleted file mode 100644 index 7f99b418..00000000 --- a/includes/pear/Image/docs/examples/driver_pdf.php +++ /dev/null @@ -1,198 +0,0 @@ - - */ - -error_reporting(E_ALL); - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('pdflib', array('page' => 'A3', 'align' => 'center', 'width' => 600, 'height' => 400)); - - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 15 pixels -$Font->setSize(15); -// add a title using the created font - -$Dataset_SmoothedLine =& Image_Graph::factory('dataset'); -$Dataset_SmoothedLine->addPoint('DK', 6); -$Dataset_SmoothedLine->addPoint('UK', 8); -$Dataset_SmoothedLine->addPoint('PO', 2); -$Dataset_SmoothedLine->addPoint('NL', 4); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Layout and Legend Sample', &$Font)), - Image_Graph::horizontal( - Image_Graph::vertical( - Image_Graph::horizontal( - Image_Graph::factory('title', array('This is the Y Axis', &$_Image_Graph_verticalFont)), - Image_Graph::vertical( - $Plotarea_BarAndLine = Image_Graph::factory('plotarea'), - Image_Graph::factory('title', array('This is the X Axis', &$_Image_Graph_font)), - 95 - ), - 5 - ), - $Legend_BarAndLine = Image_Graph::factory('legend'), - 95 - ), - Image_Graph::vertical( - Image_Graph::horizontal( - $Plotarea_SmoothedLine = Image_Graph::factory('plotarea'), - $Legend_SmoothedLine = Image_Graph::factory('legend'), - 80 - ), - $Plotarea_Radar = Image_Graph::factory('Image_Graph_Plotarea_Radar') - ), - 65 - ), - 9 - ) -); - -$Legend_BarAndLine->setPlotarea($Plotarea_BarAndLine); -$Legend_SmoothedLine->setPlotarea($Plotarea_SmoothedLine); - -// create a Y grid -$Grid_Radar =& $Plotarea_Radar->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); -$Grid_Radar->setLineColor('lightgrey'); - -// create a Y grid -$Grid_BarAndLine =& $Plotarea_BarAndLine->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y); -// that is light gray in color -$Grid_BarAndLine->setFillStyle(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'lightgrey'))); - -// create a Y grid -$Grid_SmoothedLine =& $Plotarea_SmoothedLine->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); -$Grid_SmoothedLine->setLineColor('lightgrey'); - -// create the 1st dataset -//$Dataset_SmoothedLine =& new Image_RandomDataset(4, 2, 15, true); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot_SmoothedLine =& $Plotarea_SmoothedLine->addNew('Image_Graph_Plot_Smoothed_Line', $Dataset_SmoothedLine); -$Plot_SmoothedLine->setLineColor('orange'); - -// create a 3rd dataset -$Dataset_BarChart =& Image_Graph::factory('random', array(8, 10, 120, false)); -// create the 3rd plot as line chart using the 2nd dataset -$Plot_BarChart =& $Plotarea_BarAndLine->addNew('bar', $Dataset_BarChart); -// set the fill style of the barchart to the almost transparent BlueAlpha -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Plot_BarChart->setFillStyle($FillArray); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'red')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'blue')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'yellow')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'green')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'purple')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'orange')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'black')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'brown')); - -// create the 2nd dataset -$Dataset_LineMarker =& Image_Graph::factory('random', array(8, 20, 100, false)); -// create the 2nd plot as line chart using the 2nd dataset -$Plot_LineMarker =& $Plotarea_BarAndLine->addNew('line', $Dataset_LineMarker); - -$Marker =& Image_Graph::factory('Image_Graph_Marker_Array'); -$CrossMarker =& Image_Graph::factory('Image_Graph_Marker_Cross'); -$CircleMarker =& Image_Graph::factory('Image_Graph_Marker_Circle'); -$Marker->add($CrossMarker); -$Marker->add($CircleMarker); -$Plot_LineMarker->setMarker($Marker); -// Create a red line -$CrossMarker->setLineColor('red'); -// Create a blue line -$CircleMarker->setLineColor('blue'); - -// Show arrow heads on the axis -$AxisX =& $Plotarea_BarAndLine->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisY =& $Plotarea_BarAndLine->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisX->showArrow(); -$AxisY->showArrow(); - -// create an data label array for formatting label data based on an array -$ArrayData =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', - array( - array( - 1=>'A Point', - 2=>'Another', - 6=>'Yet another' - ) - ) -); - -// use the data label array on the X axis -$AxisX->setDataPreprocessor($ArrayData); -$AxisFontX =& $Graph->addNew('Image_Graph_Font_Vertical'); -$AxisX->setFont($AxisFontX); - -$Legend_BarAndLine->setFillColor('white'); -$Legend_SmoothedLine->setFillColor('white'); - -$Font2 =& $Graph->addNew('font', 'Verdana'); -$Font2->setSize(8); -$Legend_BarAndLine->setFont($Font2); -$Legend_SmoothedLine->setFont($Font2); - -$Plot_SmoothedLine->setTitle('Oil'); -$Plot_LineMarker->setTitle('Data Set 1'); -$Plot_BarChart->setTitle('Data Set 2'); - -// create the dataset -$Dataset_Radar1 =& Image_Graph::factory('random', array(8, 1, 5)); -$Dataset_Radar2 =& Image_Graph::factory('random', array(8, 1, 5)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot_Radar1 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', $Dataset_Radar1); -$Plot_Radar2 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', $Dataset_Radar2); - -//$Dataset_Radar1->setMaximumY(7); - -$DataPreprocessor =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', - array( - array( - 'Irrelevance', - 'Partly', - 'Regular', - 'Relevance', - 'Something', - 'Everything', - 'Nothing', - 'Irregular' - ) - ) -); - -$AxisX =& $Plotarea_Radar->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setDataPreprocessor($DataPreprocessor); - -$AverageMarker =& Image_Graph::factory('Image_Graph_Marker_Average'); -$Plot_SmoothedLine->setMarker($AverageMarker); -$AverageMarker->setLineColor('purple'); - -// set a standard fill style -$Plot_Radar1->setFillColor('yellow@0.2'); -$Plot_Radar2->setFillColor('green@0.2'); -// output the Graph - - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/driver_png_svg.php b/includes/pear/Image/docs/examples/driver_png_svg.php deleted file mode 100644 index e7b758e7..00000000 --- a/includes/pear/Image/docs/examples/driver_png_svg.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -// create a new GD canvas -$Canvas =& Image_Canvas::factory('gd', - array( - 'filename' => './images/modify.jpg', - 'left' => 400, - 'top' => 100, - 'width' => 500, - 'height' => 500, - 'transparent' => true - ) - ); - - // create the graph using the GD canvas -$Graph =& Image_Graph::factory('graph', $Canvas); - -// create a simple graph -$Graph->add( - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ) -); -$Legend->setPlotarea($Plotarea); -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -$Plot =& $Plotarea->addNew('area', $Dataset); -$Plot->setLineColor('gray'); -$Plot->setFillColor('blue@0.2'); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); -$Graph->addNew('title', array('Simple Area Chart Sample', 12)); - -// output the graph using the GD canvas -$Graph->done(array('filename' => './canvassample.png')); - -// create a new SVG canvas -$Canvas =& Image_Canvas::factory('svg', - array( - 'width' => 600, - 'height' => 400 - ) -); -// make the graph use this now instead -$Graph->setCanvas($Canvas); - -// 're'-output the graph, but not using the SVG canvas -$Graph->done(array('filename' => './canvassample.svg')); -?> diff --git a/includes/pear/Image/docs/examples/driver_swf01.php b/includes/pear/Image/docs/examples/driver_swf01.php deleted file mode 100644 index f4053f10..00000000 --- a/includes/pear/Image/docs/examples/driver_swf01.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('swf', array('width' => 600, 'height' => 400)); - - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(11); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Simple Area Chart Sample', &$Font)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -// create the 1st plot as smoothed area chart using the 1st dataset - -$Plot =& $Plotarea->addNew('area', $Dataset); - -// set a line color -$Plot->setLineColor('gray'); - -// set a standard fill style -$Plot->setFillColor('blue@0.2'); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/driver_swf02.php b/includes/pear/Image/docs/examples/driver_swf02.php deleted file mode 100644 index aa4799c6..00000000 --- a/includes/pear/Image/docs/examples/driver_swf02.php +++ /dev/null @@ -1,197 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('swf', array('width' => 600, 'height' => 400)); - - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 15 pixels -$Font->setSize(15); -// add a title using the created font - -$Dataset_SmoothedLine =& Image_Graph::factory('dataset'); -$Dataset_SmoothedLine->addPoint('DK', 6); -$Dataset_SmoothedLine->addPoint('UK', 8); -$Dataset_SmoothedLine->addPoint('PO', 2); -$Dataset_SmoothedLine->addPoint('NL', 4); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Layout and Legend Sample', &$Font)), - Image_Graph::horizontal( - Image_Graph::vertical( - Image_Graph::horizontal( - Image_Graph::factory('title', array('This is the Y Axis', &$_Image_Graph_verticalFont)), - Image_Graph::vertical( - $Plotarea_BarAndLine = Image_Graph::factory('plotarea'), - Image_Graph::factory('title', array('This is the X Axis', &$_Image_Graph_font)), - 95 - ), - 5 - ), - $Legend_BarAndLine = Image_Graph::factory('legend'), - 95 - ), - Image_Graph::vertical( - Image_Graph::horizontal( - $Plotarea_SmoothedLine = Image_Graph::factory('plotarea'), - $Legend_SmoothedLine = Image_Graph::factory('legend'), - 80 - ), - $Plotarea_Radar = Image_Graph::factory('Image_Graph_Plotarea_Radar') - ), - 65 - ), - 9 - ) -); - -$Legend_BarAndLine->setPlotarea($Plotarea_BarAndLine); -$Legend_SmoothedLine->setPlotarea($Plotarea_SmoothedLine); - -// create a Y grid -$Grid_Radar =& $Plotarea_Radar->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); -$Grid_Radar->setLineColor('lightgrey'); - -// create a Y grid -$Grid_BarAndLine =& $Plotarea_BarAndLine->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y); -// that is light gray in color -$Grid_BarAndLine->setFillStyle(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'lightgrey'))); - -// create a Y grid -$Grid_SmoothedLine =& $Plotarea_SmoothedLine->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); -$Grid_SmoothedLine->setLineColor('lightgrey'); - -// create the 1st dataset -//$Dataset_SmoothedLine =& new Image_RandomDataset(4, 2, 15, true); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot_SmoothedLine =& $Plotarea_SmoothedLine->addNew('Image_Graph_Plot_Smoothed_Line', $Dataset_SmoothedLine); -$Plot_SmoothedLine->setLineColor('orange'); - -// create a 3rd dataset -$Dataset_BarChart =& Image_Graph::factory('random', array(8, 10, 120, false)); -// create the 3rd plot as line chart using the 2nd dataset -$Plot_BarChart =& $Plotarea_BarAndLine->addNew('bar', $Dataset_BarChart); -// set the fill style of the barchart to the almost transparent BlueAlpha -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Plot_BarChart->setFillStyle($FillArray); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL, 'white', 'red')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'blue')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'yellow')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL, 'white', 'green')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'purple')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'orange')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'black')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'brown')); - -// create the 2nd dataset -$Dataset_LineMarker =& Image_Graph::factory('random', array(8, 20, 100, false)); -// create the 2nd plot as line chart using the 2nd dataset -$Plot_LineMarker =& $Plotarea_BarAndLine->addNew('line', $Dataset_LineMarker); - -$Marker =& Image_Graph::factory('Image_Graph_Marker_Array'); -$CrossMarker =& Image_Graph::factory('Image_Graph_Marker_Cross'); -$CircleMarker =& Image_Graph::factory('Image_Graph_Marker_Circle'); -$Marker->add($CrossMarker); -$Marker->add($CircleMarker); -$Plot_LineMarker->setMarker($Marker); -// Create a red line -$CrossMarker->setLineColor('red'); -// Create a blue line -$CircleMarker->setLineColor('blue'); - -// Show arrow heads on the axis -$AxisX =& $Plotarea_BarAndLine->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisY =& $Plotarea_BarAndLine->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisX->showArrow(); -$AxisY->showArrow(); - -// create an data label array for formatting label data based on an array -$ArrayData =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', - array( - array( - 1=>'A Point', - 2=>'Another', - 6=>'Yet another' - ) - ) -); - -// use the data label array on the X axis -$AxisX->setDataPreprocessor($ArrayData); -$AxisFontX =& $Graph->addNew('Image_Graph_Font_Vertical'); -$AxisX->setFont($AxisFontX); - -$Legend_BarAndLine->setFillColor('white'); -$Legend_SmoothedLine->setFillColor('white'); - -$Font2 =& $Graph->addNew('font', 'Verdana'); -$Font2->setSize(8); -$Legend_BarAndLine->setFont($Font2); -$Legend_SmoothedLine->setFont($Font2); - -$Plot_SmoothedLine->setTitle('Oil'); -$Plot_LineMarker->setTitle('Data Set 1'); -$Plot_BarChart->setTitle('Data Set 2'); - -// create the dataset -$Dataset_Radar1 =& Image_Graph::factory('random', array(8, 1, 5)); -$Dataset_Radar2 =& Image_Graph::factory('random', array(8, 1, 5)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot_Radar1 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', $Dataset_Radar1); -$Plot_Radar2 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', $Dataset_Radar2); - -//$Dataset_Radar1->setMaximumY(7); - -$DataPreprocessor =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', - array( - array( - 'Irrelevance', - 'Partly', - 'Regular', - 'Relevance', - 'Something', - 'Everything', - 'Nothing', - 'Irregular' - ) - ) -); - -$AxisX =& $Plotarea_Radar->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setDataPreprocessor($DataPreprocessor); - -//$Plot_Radar1->setMarker(new Image_CrossMarker(), 'Marker'); -//$Plot_Radar1->setLineStyle($YELLOW); - -$AverageMarker =& Image_Graph::factory('Image_Graph_Marker_Average'); -$Plot_SmoothedLine->setMarker($AverageMarker); -$AverageMarker->setLineColor('purple'); - -// set a standard fill style -$Plot_Radar1->setFillColor('yellow@0.2'); -$Plot_Radar2->setFillColor('green@0.2'); -// output the Graph - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/driver_swf03.php b/includes/pear/Image/docs/examples/driver_swf03.php deleted file mode 100644 index 6e3b052e..00000000 --- a/includes/pear/Image/docs/examples/driver_swf03.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('swf', array('width' => 600, 'height' => 400)); - - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(11); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Simple Line Chart Sample', &$Font)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('line', $Dataset); - -// set a line color -$Plot->setLineColor('red'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/frontpage_sample.php b/includes/pear/Image/docs/examples/frontpage_sample.php deleted file mode 100644 index fa85ddea..00000000 --- a/includes/pear/Image/docs/examples/frontpage_sample.php +++ /dev/null @@ -1,313 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -// create a new GD canvas -$Canvas =& Image_Canvas::factory('gd', - array( - 'width' => 600, - 'height' => 400 - ) -); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - -$Font =& $Graph->addNew('font', 'Verdana'); -$Font->setSize(7); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Image_Graph Demonstration', 12)), - Image_Graph::vertical( - Image_Graph::vertical( - $Plotarea_Weather = Image_Graph::factory('plotarea'), - $Legend_Weather = Image_Graph::factory('legend'), - 85 - ), - Image_Graph::horizontal( - Image_Graph::vertical( - Image_Graph::vertical( - Image_Graph::factory( - 'title', - array('Demonstration of Mathematical Functions', 10) - ), - $Plotarea_SinCos = Image_Graph::factory('plotarea', 'axis'), - 5 - ), - $Legend_SinCos = Image_Graph::factory('legend'), - 90 - ), - $Plotarea_Car = Image_Graph::factory('plotarea'), - 50 - ), - 60 - ), - 5) -); -$Legend_Weather->setPlotarea($Plotarea_Weather); -$Legend_Weather->setFontSize(7); - -$Legend_SinCos->setPlotarea($Plotarea_SinCos); -$Legend_SinCos->setFontSize(8); - -$GridY_Weather =& $Plotarea_Weather->addNew( - 'line_grid', - null, - IMAGE_GRAPH_AXIS_Y -); -$GridY_Weather->setLineColor('gray@0.1'); - -$Marker_AverageSpan =& - $Plotarea_Weather->addNew( - 'Image_Graph_Axis_Marker_Area', - IMAGE_GRAPH_AXIS_Y - ); -$Marker_AverageSpan->setFillColor('green@0.2'); -$Marker_AverageSpan->setLowerBound(3.8); -$Marker_AverageSpan->setUpperBound(11.4); - -$Marker_Average =& - $Plotarea_Weather->addNew( - 'Image_Graph_Axis_Marker_Line', - IMAGE_GRAPH_AXIS_Y - ); -$Marker_Average->setLineColor('blue@0.4'); -$Marker_Average->setValue(7.7); - -$Dataset_Rainfall =& Image_Graph::factory('dataset'); -$Dataset_Rainfall->addPoint('Jan', 60); -$Dataset_Rainfall->addPoint('Feb', 41); -$Dataset_Rainfall->addPoint('Mar', 48); -$Dataset_Rainfall->addPoint('Apr', 42); -$Dataset_Rainfall->addPoint('May', 50); -$Dataset_Rainfall->addPoint('Jun', 55); -$Dataset_Rainfall->addPoint('Jul', 67); -$Dataset_Rainfall->addPoint('Aug', 65); -$Dataset_Rainfall->addPoint('Sep', 72); -$Dataset_Rainfall->addPoint('Oct', 77); -$Dataset_Rainfall->addPoint('Nov', 80); -$Dataset_Rainfall->addPoint('Dec', 68); -$Plot_Rainfall =& - $Plotarea_Weather->addNew( - 'bar', - array(&$Dataset_Rainfall), - IMAGE_GRAPH_AXIS_Y_SECONDARY - ); -$Plot_Rainfall->setLineColor('gray'); -$Plot_Rainfall->setFillColor('yellow@0.1'); -$Plot_Rainfall->setTitle('Average rainfall'); - -$Dataset_TempAvg =& Image_Graph::factory('dataset'); -$Dataset_TempAvg->addPoint('Jan', 0.2); -$Dataset_TempAvg->addPoint('Feb', 0.1); -$Dataset_TempAvg->addPoint('Mar', 2.3); -$Dataset_TempAvg->addPoint('Apr', 5.8); -$Dataset_TempAvg->addPoint('May', 10.8); -$Dataset_TempAvg->addPoint('Jun', 14.1); -$Dataset_TempAvg->addPoint('Jul', 16.2); -$Dataset_TempAvg->addPoint('Aug', 15.9); -$Dataset_TempAvg->addPoint('Sep', 12.1); -$Dataset_TempAvg->addPoint('Oct', 8.7); -$Dataset_TempAvg->addPoint('Nov', 4.4); -$Dataset_TempAvg->addPoint('Dec', 1.8); -$Plot_TempAvg =& - $Plotarea_Weather->addNew( - 'Image_Graph_Plot_Smoothed_Line', - array(&$Dataset_TempAvg) - ); -$Plot_TempAvg->setLineColor('blue'); -$Plot_TempAvg->setTitle('Average temperature'); - -$Dataset_TempMin =& Image_Graph::factory('dataset'); -$Dataset_TempMin->addPoint('Jan', -2.7); -$Dataset_TempMin->addPoint('Feb', -2.8); -$Dataset_TempMin->addPoint('Mar', -0.9); -$Dataset_TempMin->addPoint('Apr', 1.2); -$Dataset_TempMin->addPoint('May', 5.5); -$Dataset_TempMin->addPoint('Jun', 9.2); -$Dataset_TempMin->addPoint('Jul', 11.3); -$Dataset_TempMin->addPoint('Aug', 11.1); -$Dataset_TempMin->addPoint('Sep', 7.8); -$Dataset_TempMin->addPoint('Oct', 5.0); -$Dataset_TempMin->addPoint('Nov', 1.5); -$Dataset_TempMin->addPoint('Dec', -0.9); -$Plot_TempMin =& - $Plotarea_Weather->addNew( - 'Image_Graph_Plot_Smoothed_Line', - array(&$Dataset_TempMin) - ); -$Plot_TempMin->setLineColor('teal'); -$Plot_TempMin->setTitle('Minimum temperature'); - -$Dataset_TempMax =& Image_Graph::factory('dataset'); -$Dataset_TempMax->addPoint('Jan', 2.4); -$Dataset_TempMax->addPoint('Feb', 2.5); -$Dataset_TempMax->addPoint('Mar', 5.4); -$Dataset_TempMax->addPoint('Apr', 10.5); -$Dataset_TempMax->addPoint('May', 15.8); -$Dataset_TempMax->addPoint('Jun', 18.9); -$Dataset_TempMax->addPoint('Jul', 21.2); -$Dataset_TempMax->addPoint('Aug', 20.8); -$Dataset_TempMax->addPoint('Sep', 16.3); -$Dataset_TempMax->addPoint('Oct', 11.8); -$Dataset_TempMax->addPoint('Nov', 6.9); -$Dataset_TempMax->addPoint('Dec', 4.1); -$Plot_TempMax =& - $Plotarea_Weather->addNew( - 'Image_Graph_Plot_Smoothed_Line', - array(&$Dataset_TempMax) - ); -$Plot_TempMax->setLineColor('red'); -$Plot_TempMax->setTitle('Maximum temperature'); - -$DataPreprocessor_MM =& - Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%d mm'); -$DataPreprocessor_DegC =& - Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%d C'); - -$Marker_Rainfall =& - $Plot_Rainfall->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -$Marker_Rainfall->setDataPreprocessor($DataPreprocessor_MM); -$Marker_Rainfall->setFontSize(7); -$PointingMarker_Rainfall =& - $Plot_Rainfall->addNew( - 'Image_Graph_Marker_Pointing_Angular', - array(20, &$Marker_Rainfall) - ); -$Plot_Rainfall->setMarker($PointingMarker_Rainfall); - -$AxisY_Weather =& $Plotarea_Weather->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY_Weather->showLabel(IMAGE_GRAPH_LABEL_ZERO); -$AxisY_Weather->setDataPreprocessor($DataPreprocessor_DegC); -$AxisY_Weather->setTitle( - 'Temperature', - array('vertical' => true, 'angle' => 90) -); - -$AxisYsecondary_Weather =& - $Plotarea_Weather->getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY); -$AxisYsecondary_Weather->setDataPreprocessor($DataPreprocessor_MM); -$AxisYsecondary_Weather->setTitle( - 'Rainfall', - array('vertical' => true, 'angle' => 270) -); - -$GridX_SinCos =& - $Plotarea_SinCos->addNew('line_grid', null, IMAGE_GRAPH_AXIS_X); -$GridY_SinCos =& - $Plotarea_SinCos->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); -$Dataset_Sin =& - Image_Graph::factory( - 'Image_Graph_Dataset_Function', - array(-2*pi(), 2*pi(), 'sin', 50) - ); -$Dataset_Cos =& - Image_Graph::factory( - 'Image_Graph_Dataset_Function', - array(-2*pi(), 2*pi(), 'cos', 50) - ); -$Plot_Sin =& $Plotarea_SinCos->addNew('line', $Dataset_Sin); -$Plot_Cos =& $Plotarea_SinCos->addNew('line', $Dataset_Cos); -$Plot_Sin->setLineColor('red'); -$Plot_Cos->setLineColor('blue'); -$Plot_Sin->setTitle('sin(x)'); -$Plot_Cos->setTitle('cos(x)'); -$AxisX_SinCos =& $Plotarea_SinCos->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX_SinCos->setLabelInterval(array(-6, -4, -2, 2, 4, 6)); -$AxisY_SinCos =& $Plotarea_SinCos->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY_SinCos->forceMinimum(-1.1); -$AxisY_SinCos->forceMaximum(1.1); -$AxisY_SinCos->setLabelInterval(array(-1, -0.5, 0.5, 1)); - -function carLabel($value) { - return 2000+$value; -} - -$DataPreprocessor_Car =& - Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'carLabel'); - -$GridX_Car =& $Plotarea_Car->addNew('line_grid', null, IMAGE_GRAPH_AXIS_X); -$GridY_Car =& $Plotarea_Car->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); -$GridX_Car->setLineColor('gray@0.2'); -$GridY_Car->setLineColor('gray@0.2'); -$Dataset_Car =& Image_Graph::factory('random', array(10, 10, 100, true)); -$Fill_Car =& - Image_Graph::factory('Image_Graph_Fill_Image', './images/audi-tt-coupe.jpg'); -$Plotarea_Car->setFillStyle($Fill_Car); -$Plot_Car =& - $Plotarea_Car->addNew('Image_Graph_Plot_Smoothed_Area', $Dataset_Car); -$Plot_Car->setLineColor('gray'); -$Plot_Car->setFillColor('white@0.7'); - -$AxisX_Car =& $Plotarea_Car->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX_Car->setDataPreprocessor($DataPreprocessor_Car); -$AxisX_Car->setFontSize(6); -$AxisY_Car =& $Plotarea_Car->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY_Car->forceMaximum(100); - -// output the graph using the GD canvas -$Graph->done(array('filename' => './output/frontpage_sample.png')); - -// create a new SVG canvas -$Canvas =& Image_Canvas::factory('svg', - array( - 'width' => 600, - 'height' => 400 - ) -); -// make the graph use this now instead -$Graph->setCanvas($Canvas); - -// 're'-output the graph, but not using the SVG canvas -$Graph->done(array('filename' => './output/frontpage_sample.svg')); - -/* -// create a new PDF canvas -$Canvas =& Image_Canvas::factory('pdflib', - array( - 'page' => 'A4', - 'align' => 'center', - 'orientation' => 'landscape', - 'width' => 600, - 'height' => 400 - ) -); -// make the graph use this now instead -$Graph->setCanvas($Canvas); - -// 're'-output the graph, but not using the PDF canvas -$Graph->done(array('filename' => './output/frontpage_sample.pdf')); - -// create a new SWF canvas -$Canvas =& Image_Canvas::factory('swf', - array( - 'width' => 600, - 'height' => 400 - ) -); -// make the graph use this now instead -$Graph->setCanvas($Canvas); - -// 're'-output the graph, but not using the SWF canvas -$Graph->done(array('filename' => './output/frontpage_sample.swf')); -*/ -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/gradient_fill_area.php b/includes/pear/Image/docs/examples/gradient_fill_area.php deleted file mode 100644 index 4b4f13f3..00000000 --- a/includes/pear/Image/docs/examples/gradient_fill_area.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Gradient filled smoothed area chart', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 85 - ), - 8 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the 1st dataset -$Dataset =& Image_Graph::factory('random', array(10, 40, 100, true)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('smooth_area', array(&$Dataset)); -// create a vertical gradient fill using red and yellow, ie bottom of graph -// will be yellow and the 'higher' the value the more red it will be, ie a 'fire' effect -$Plot->setFillStyle(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'green', 'lightyellow'))); -$Plot->setTitle('Inside scope'); - -// create the 2nd dataset -$Dataset2 =& Image_Graph::factory('random', array(10, 50, 70, true)); -// create the 2nd plot as smoothed area chart using the 2nd dataset -$Plot2 =& $Plotarea->addNew('smooth_area', array(&$Dataset2)); -// create a vertical gradient fill using red and yellow, ie bottom of graph -// will be yellow and the 'higher' the value the more red it will be, ie a 'fire' effect -$Plot2->setFillColor('white@0.4'); -$Plot2->setTitle('Outside scope'); - -$Graph->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED, 'steelblue', 'lightcyan'))); -$Graph->setBorderColor('black'); - - -// create a Y data value marker -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_MAX); -// create a pin-point marker type -$PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); -// and use the marker on the 1st plot -$Plot->setMarker($PointingMarker); -// format value marker labels as percentage values -$Marker->setDataPreProcessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%')); -$Marker->setFontSize(7); - -$AxisY =& $Plotarea->getAxis('y'); -$AxisY->forceMinimum(30); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/gradient_pie.php b/includes/pear/Image/docs/examples/gradient_pie.php deleted file mode 100644 index 694542b2..00000000 --- a/includes/pear/Image/docs/examples/gradient_pie.php +++ /dev/null @@ -1,106 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph = & Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Gradient Filled Donut/Pie Chart', 12)), - Image_Graph::horizontal( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 60 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); -$Legend->setAlignment(IMAGE_GRAPH_ALIGN_VERTICAL); - -// create the dataset -$Dataset = & Image_Graph::factory('dataset'); -$Dataset->addPoint('Beef', rand(1, 10), 'beef'); -$Dataset->addPoint('Pork', rand(1, 10), 'pork'); -$Dataset->addPoint('Poultry', rand(1, 10), 'poultry'); -$Dataset->addPoint('Camels', rand(1, 10), 'camels'); -$Dataset->addPoint('Other', rand(1, 10), 'other'); - -// create the dataset -$Dataset2 = & Image_Graph::factory('dataset'); -$Dataset2->addPoint('Beer', rand(1, 10), 'beer'); -$Dataset2->addPoint('Wine', rand(1, 10), 'wine'); -$Dataset2->addPoint('Alcohol', rand(1, 10), 'alcohol'); -$Dataset2->addPoint('Coffee', rand(1, 10), 'coffee'); -$Dataset2->addPoint('Milk', rand(1, 10), 'milk'); -$Dataset2->addPoint('Water', rand(1, 10), 'water'); - -// create the plot as pie chart using the dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Pie', array(array(&$Dataset, &$Dataset2))); -$Plotarea->hideAxis(); - -// create a Y data value marker -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_TOTAL); -// fill it with white -$Marker->setFillColor('white'); -// and use black border -$Marker->setBorderColor('black'); -// and format it using a data preprocessor -$Marker->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%')); -$Marker->setFontSize(7); - -// create a pin-point marker type -$PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); -// and use the marker on the plot -$Plot->setMarker($PointingMarker); -// format value marker labels as percentage values -$Plot->Radius = 2; - -// create a fillstyle for the plot -$FillArray = & Image_Graph::factory('Image_Graph_Fill_Array'); -$Plot->setFillStyle($FillArray); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'green'), 'beef'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'blue'), 'pork'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'yellow'), 'poultry'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red'), 'camels'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'orange'), 'other'); - - -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'dimgray', 'white'), 'beer'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'sandybrown', 'white'), 'wine'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'sienna', 'white'), 'alcohol'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'powderblue', 'white'), 'coffee'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'purple', 'white'), 'milk'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'thistle', 'white'), 'water'); - -$Plot->explode(20, 'Beer'); - -$Plot->setLineColor('lightgrey'); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/gradient_step.php b/includes/pear/Image/docs/examples/gradient_step.php deleted file mode 100644 index b4284431..00000000 --- a/includes/pear/Image/docs/examples/gradient_step.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('png', - array( - 'width' => 400, - 'height' => 200 - ) -); - - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - -$Font =& $Graph->addNew('font', 'Verdana'); -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Gradient Filled Step Chart', 11)), - Image_Graph::horizontal( - $Plotarea = Image_Graph::factory('plotarea'), - Image_Graph::factory('title', array('Anybody recognize?', array('size' => 7, 'color' => 'gray@0.6', 'angle' => 270))), - 98 - ), - 5) -); - -$Grid =& $Plotarea->addNew('line_grid', array(), IMAGE_GRAPH_AXIS_Y); -$Grid->setLineColor('white@0.4'); - -$Dataset =& Image_Graph::factory('dataset'); -$Dataset->addPoint(1, 20); -$Dataset->addPoint(2, 10); -$Dataset->addPoint(3, 35); -$Dataset->addPoint(4, 5); -$Dataset->addPoint(5, 18); -$Dataset->addPoint(6, 33); -$Plot =& $Plotarea->addNew('step', array(&$Dataset)); - -$Fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'darkgreen', 'white')); -$Plot->setFillStyle($Fill); - -$Fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'yellow', 'darkred')); -$Plotarea->setFillStyle($Fill); - -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->forceMaximum(40); -$AxisY->setLabelInterval(10); - -$Graph->setBackgroundColor('green@0.2'); -$Graph->setBorderColor('black'); -$Graph->setPadding(10); - -$Plot->setBorderColor('black'); - -// output the graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/horizontal.php b/includes/pear/Image/docs/examples/horizontal.php deleted file mode 100644 index cf5812eb..00000000 --- a/includes/pear/Image/docs/examples/horizontal.php +++ /dev/null @@ -1,127 +0,0 @@ - - */ - -error_reporting(E_ALL); - -include_once 'Image/Graph.php'; -include_once 'Image/Canvas.php'; - - -$Dataset =& Image_Graph::factory('dataset', - array( - array( - 'A' => 10, - 'B' => 9, - 'C' => 4, - 'D' => 6, - 'E' => 5, - 'F' => 9, - 'G' => 11, - 'H' => 8 - ) - ) -); - -$Dataset2 =& Image_Graph::factory('dataset', - array( - array( - 'A' => 121, - 'B' => 134, - 'C' => 192, - 'D' => 213, - 'E' => 123, - 'F' => 167, - 'G' => 153, - 'H' => 149 - ) - ) -); - -$Canvas =& Image_Canvas::factory('png', array('width' => 800, 'height' => 400)); - -// create the graph -$Graph =& Image_Graph::factory('graph', &$Canvas); - -$Graph->setFont(Image_Graph::factory('font', array('Courier New'))); -$Graph->setFontSize(8); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Vertical & Horizontal Plots', 11)), - Image_Graph::vertical( - Image_Graph::horizontal( - $Plotarea = Image_Graph::factory('plotarea'), - $Plotarea2 = Image_Graph::factory('plotarea', array('category', 'axis', 'horizontal')) - ), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 7 - ) -); -$Legend->setPlotarea($Plotarea); - -$GridY =& $Plotarea->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); - -$Plot =& $Plotarea->addNew('step', &$Dataset); -$Plot->setFillColor('blue@0.2'); -$Marker =& Image_Graph::factory('value_marker', IMAGE_GRAPH_VALUE_Y); -$Marker->setFontSize(7); -$Plot->setMarker($Marker); - -$Plot12 =& $Plotarea->addNew('line', &$Dataset2, IMAGE_GRAPH_AXIS_Y_SECONDARY); -$Plot12->setLineColor('red'); - -$Plot->setTitle('Primary axis'); -$Plot12->setTitle('Secondary axis'); - -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setTitle('X Data', array('size' => 10)); - -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setTitle('Y Data', array('size' => 10)); - -$AxisY2 =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY); -$AxisY2->setTitle('Y2 Data', array('size' => 10)); - -$Plotarea->setFillColor('gray@0.2'); - -$GridY =& $Plotarea2->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); - -$Plot2 =& $Plotarea2->addNew('step', &$Dataset); -$Plot2->setFillColor('blue@0.2'); -$Marker2 =& Image_Graph::factory('value_marker', IMAGE_GRAPH_VALUE_Y); -$Marker2->setFontSize(7); -$Plot2->setMarker($Marker2); - -$Plot22 =& $Plotarea2->addNew('line', &$Dataset2, IMAGE_GRAPH_AXIS_Y_SECONDARY); -$Plot22->setLineColor('red'); - -$Plot2->setTitle('Primary axis'); -$Plot22->setTitle('Secondary axis'); - -$AxisX =& $Plotarea2->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setTitle('X Data', array('size' => 10)); - -$AxisY =& $Plotarea2->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setTitle('Y Data', array('size' => 10)); - -$AxisY2 =& $Plotarea2->getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY); -$AxisY2->setTitle('Y2 Data', array('size' => 10)); -$Plotarea2->setFillColor('gray@0.2'); - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/html_image_map.php b/includes/pear/Image/docs/examples/html_image_map.php deleted file mode 100644 index dd60fb69..00000000 --- a/includes/pear/Image/docs/examples/html_image_map.php +++ /dev/null @@ -1,108 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('png', array('width' => 400, 'height' => 300, 'usemap' => true)); - -// This is how you get the ImageMap object, fx. to save map to file (using toHtml()) -$Imagemap = $Canvas->getImageMap(); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - // add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ) -); -$Legend->setPlotarea($Plotarea); - -$Dataset =& Image_Graph::factory('dataset'); -$Dataset2 =& Image_Graph::factory('dataset'); -$Dataset3 =& Image_Graph::factory('dataset'); - -$months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); - -foreach($months as $month) { - - $Dataset->addPoint( - $month, - rand(0, 10), - array( - 'url' => 'http://pear.php.net/?month=' . $month, - 'alt' => $month, - 'target' => '_blank' - ) - ); - - $Dataset2->addPoint( - $month, - rand(11, 16), - array( - 'url' => 'http://pear.veggerby.dk/' . $month . '/', - 'alt' => 'Downloads for ' . $month, - 'target' => '_blank' - ) - ); - - $Dataset3->addPoint( - $month, - rand(-1, -10), - array( - 'url' => 'http://pear.veggerby.dk/' . $month . '/', - 'alt' => $month . ' 2005', - 'target' => '_blank', - 'htmltags' => array( - 'onMouseOver' => 'alert("Hello, World!");' - ) - ) - ); -} - -$Plot =& $Plotarea->addNew('bar', array(&$Dataset)); -$Plot->setFillColor('blue@0.2'); - -$Plot2 =& $Plotarea->addNew('line', array(&$Dataset2)); -$Plot2->setLineColor('red'); - -$Plot3 =& $Plotarea->addNew('area', array(&$Dataset3)); -$Plot3->setFillColor('yellow@0.2'); - -// output the Graph -$output = $Graph->done( - array( - 'tohtml' => true, - 'border' => 0, - 'filename' => 'imagemap.png', - 'filepath' => './', - 'urlpath' => '' - ) -); - -print $output . '

' . htmlspecialchars($output) . '
'; -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/image_fill.php b/includes/pear/Image/docs/examples/image_fill.php deleted file mode 100644 index a378e98c..00000000 --- a/includes/pear/Image/docs/examples/image_fill.php +++ /dev/null @@ -1,85 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 8 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Image Filling / Data Preprocessing', 11)), - $Plotarea = Image_Graph::factory('plotarea'), - 8 - ) -); - -// create a Y grid -$GridY =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y); -// that is light gray in color -$GridY->setFillColor('lightgrey'); - -// create the 1st dataset -$Dataset1 =& Image_Graph::factory('random', array(8, 70, 100, false)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot1 =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Area', array(&$Dataset1)); -// create a vertical gradient fill using red and yellow, ie bottom of graph -// will be yellow and the "higher" the value the more red it will be, ie a "fire" effect -$Plot1->setFillStyle(Image_Graph::factory('Image_Graph_Fill_Image', './images/mountain.jpg')); - -// create a Y data value marker -$Marker =& $Plot1->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_MAX); -// fill it with white -$Marker->setFillColor('white'); -// and use black border -$Marker->setBorderColor('black'); -// create a pin-point marker type -$PointingMarker =& $Plot1->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); -// and use the marker on the 1st plot -$Plot1->setMarker($PointingMarker); -// format value marker labels as percentage values -$Marker->setDataPreProcessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%')); - -// create the 2nd dataset -$Dataset2 =& Image_Graph::factory('random', array(8, 30, 80, false)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot2 =& $Plotarea->addNew('bar', array(&$Dataset2)); -// create a vertical gradient fill using red and yellow, ie bottom of graph -// will be yellow and the 'higher' the value the more red it will be, ie a 'fire' effect -$Plot2->setFillColor('orange@0.6'); - -// Show arrow heads on the axis -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisX->showArrow(); -$AxisY->showArrow(); - -$AxisX->setDataPreProcessor(Image_Graph::factory('Image_Graph_DataPreprocessor_RomanNumerals')); -$AxisY->setDataPreProcessor(Image_Graph::factory('Image_Graph_DataPreprocessor_NumberText')); -$AxisY->forceMinimum(10); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/imagemap.png b/includes/pear/Image/docs/examples/imagemap.png deleted file mode 100644 index 7b72d3e2..00000000 Binary files a/includes/pear/Image/docs/examples/imagemap.png and /dev/null differ diff --git a/includes/pear/Image/docs/examples/images/audi-tt-coupe.jpg b/includes/pear/Image/docs/examples/images/audi-tt-coupe.jpg deleted file mode 100644 index 8a7d920a..00000000 Binary files a/includes/pear/Image/docs/examples/images/audi-tt-coupe.jpg and /dev/null differ diff --git a/includes/pear/Image/docs/examples/images/audi.png b/includes/pear/Image/docs/examples/images/audi.png deleted file mode 100644 index c3e2ebfb..00000000 Binary files a/includes/pear/Image/docs/examples/images/audi.png and /dev/null differ diff --git a/includes/pear/Image/docs/examples/images/bmw.png b/includes/pear/Image/docs/examples/images/bmw.png deleted file mode 100644 index c9587638..00000000 Binary files a/includes/pear/Image/docs/examples/images/bmw.png and /dev/null differ diff --git a/includes/pear/Image/docs/examples/images/coins.png b/includes/pear/Image/docs/examples/images/coins.png deleted file mode 100644 index 3df236fd..00000000 Binary files a/includes/pear/Image/docs/examples/images/coins.png and /dev/null differ diff --git a/includes/pear/Image/docs/examples/images/mercedes.png b/includes/pear/Image/docs/examples/images/mercedes.png deleted file mode 100644 index 8ecf21f9..00000000 Binary files a/includes/pear/Image/docs/examples/images/mercedes.png and /dev/null differ diff --git a/includes/pear/Image/docs/examples/images/modify.jpg b/includes/pear/Image/docs/examples/images/modify.jpg deleted file mode 100644 index d5494d29..00000000 Binary files a/includes/pear/Image/docs/examples/images/modify.jpg and /dev/null differ diff --git a/includes/pear/Image/docs/examples/images/mountain.jpg b/includes/pear/Image/docs/examples/images/mountain.jpg deleted file mode 100644 index 754acd4b..00000000 Binary files a/includes/pear/Image/docs/examples/images/mountain.jpg and /dev/null differ diff --git a/includes/pear/Image/docs/examples/images/porsche.png b/includes/pear/Image/docs/examples/images/porsche.png deleted file mode 100644 index 0c70e9a9..00000000 Binary files a/includes/pear/Image/docs/examples/images/porsche.png and /dev/null differ diff --git a/includes/pear/Image/docs/examples/index.html b/includes/pear/Image/docs/examples/index.html deleted file mode 100644 index d5f72538..00000000 --- a/includes/pear/Image/docs/examples/index.html +++ /dev/null @@ -1 +0,0 @@ -Image_Graph Examplesantialias.php
antialias.php
axis_direction.php
axis_direction.php
category_axis_explanation.php
category_axis_explanation.php
color_chart.php
color_chart.php
customize.php
customize.php
datapreprocessor.php
datapreprocessor.php
double_category_axis.php
double_category_axis.php
driver_pdf.php
driver_pdf.php
driver_png_svg.php
driver_png_svg.php
driver_swf01.php
driver_swf01.php
driver_swf02.php
driver_swf02.php
driver_swf03.php
driver_swf03.php
frontpage_sample.php
frontpage_sample.php
gradient_fill_area.php
gradient_fill_area.php
gradient_pie.php
gradient_pie.php
gradient_step.php
gradient_step.php
html_image_map.php
html_image_map.php
image_fill.php
image_fill.php
layout_matrix.php
layout_matrix.php
line_break.php
line_break.php
logo_graph.php
logo_graph.php
log_axis.php
log_axis.php
log_axis_intersect.php
log_axis_intersect.php
manual_labels.php
manual_labels.php
misc01.php
misc01.php
misc02.php
misc02.php
misc03.php
misc03.php
misc04.php
misc04.php
misc05.php
misc05.php
misc06.php
misc06.php
multiple_plots.php
multiple_plots.php
negative_values.php
negative_values.php
plot_all.php
plot_all.php
plot_all_horizontal.php
plot_all_horizontal.php
plot_all_horizontal_invert.php
plot_all_horizontal_invert.php
plot_area.php
plot_area.php
plot_area_smooth.php
plot_area_smooth.php
plot_area_stack.php
plot_area_stack.php
plot_band.php
plot_band.php
plot_bar.php
plot_bar.php
plot_bar_horizontal.php
plot_bar_horizontal.php
plot_bar_multiple.php
plot_bar_multiple.php
plot_bar_stacked.php
plot_bar_stacked.php
plot_bar_stacked100pct.php
plot_bar_stacked100pct.php
plot_bar_stacked_horizontal.php
plot_bar_stacked_horizontal.php
plot_bar_stacked_negative.php
plot_bar_stacked_negative.php
plot_boxwhisker.php
plot_boxwhisker.php
plot_candlestick.php
plot_candlestick.php
plot_impulse.php
plot_impulse.php
plot_impulse_stacked.php
plot_impulse_stacked.php
plot_line.php
plot_line.php
plot_line_smooth.php
plot_line_smooth.php
plot_map.php
plot_map.php
plot_odo.php
plot_odo.php
plot_pie.php
plot_pie.php
plot_pie_rotate.php
plot_pie_rotate.php
plot_radar.php
plot_radar.php
plot_radar_smooth.php
plot_radar_smooth.php
plot_scatter.php
plot_scatter.php
plot_scatter_linefit.php
plot_scatter_linefit.php
plot_step.php
plot_step.php
secondary_axis.php
secondary_axis.php
simple.php
simple.php
simple_graph.php
simple_graph.php
small_pie_plot.php
small_pie_plot.php
vector_function.php
vector_function.php
\ No newline at end of file diff --git a/includes/pear/Image/docs/examples/layout_matrix.php b/includes/pear/Image/docs/examples/layout_matrix.php deleted file mode 100644 index 848b4bc0..00000000 --- a/includes/pear/Image/docs/examples/layout_matrix.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Matrix Layout', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(3, 3)), - 5 - ) -); - -for ($i = 0; $i < 9; $i++) { - $Dataset =& Image_Graph::factory('random', array(5, 2, 15, false)); - $Plotarea =& $Matrix->getEntry($i % 3, floor($i / 3)); - $Plotarea->addNew('line_grid', false, IMAGE_GRAPH_AXIS_X); - $Plotarea->addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y); - - $Plot =& $Plotarea->addNew('line', $Dataset); - $Plot->setLineColor('red'); - $Plot->setTitle("x^2"); -} - -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/line_break.php b/includes/pear/Image/docs/examples/line_break.php deleted file mode 100644 index 742bb60d..00000000 --- a/includes/pear/Image/docs/examples/line_break.php +++ /dev/null @@ -1,78 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(10); - -$Graph->setFont($Font); - -// setup the plotarea, legend and their layout -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Data \'Break\' Sample', 12)), - Image_Graph::vertical( - Image_Graph::vertical( - $Plotarea1 = Image_Graph::factory('plotarea'), - $Plotarea2 = Image_Graph::factory('plotarea'), - 50 - ), - $Legend = Image_Graph::factory('legend'), - 88 - ), - 5 - ) -); - -// link the legend with the plotares -$Legend->setPlotarea($Plotarea1); -$Legend->setPlotarea($Plotarea2); - -// create the dataset -$Dataset =& Image_Graph::factory('dataset'); -$Dataset->addPoint('Jan', 10); -$Dataset->addPoint('Feb', 12); -$Dataset->addPoint('Mar', 3); -$Dataset->addPoint('Apr', null); -$Dataset->addPoint('May', 4); -$Dataset->addPoint('Jun', 10); -$Dataset->addPoint('Jul', null); -$Dataset->addPoint('Aug', null); -$Dataset->addPoint('Sep', 9); -$Dataset->addPoint('Oct', 10); -$Dataset->addPoint('Nov', 4); -$Dataset->addPoint('Dec', 14); - -// create the line plot -$Plot1 =& $Plotarea1->addNew('line', array(&$Dataset)); -// set line color -$Plot1->setLineColor('red'); - -// create the line plot -$Plot2 =& $Plotarea2->addNew('smooth_line', array(&$Dataset)); -// set line color -$Plot2->setLineColor('blue'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/log_axis.php b/includes/pear/Image/docs/examples/log_axis.php deleted file mode 100644 index 6df4ef66..00000000 --- a/includes/pear/Image/docs/examples/log_axis.php +++ /dev/null @@ -1,104 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('png', array('width' => 600, 'height' => 400, 'antialias' => true)); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 15 pixels -$Font->setSize(8); -// add a title using the created font - -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 2; $j++) { - $Axis['X'][($i*2+$j)] = 'axis' . ($i % 2 == 0 ? '' : '_log'); - $Axis['Y'][($i*2+$j)] = 'axis' . ($j % 2 == 0 ? '' : '_log'); - } -} - -for ($i = 0; $i < 4; $i++) { - $Plotarea[$i] =& Image_Graph::factory('plotarea', array($Axis['X'][$i], $Axis['Y'][$i])); -} - -$Graph->setFont($Font); -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Logarithmic Axis', 11)), - Image_Graph::vertical( - Image_Graph::horizontal( - Image_Graph::vertical( - Image_Graph::factory('title', array('Normal Y-Axis', array('size' => 10, 'angle' => 90))), - Image_Graph::factory('title', array('Logarithmic Y-Axis', array('size' => 10, 'angle' => 90))) - ), - Image_Graph::horizontal( - Image_Graph::vertical( - Image_Graph::factory('title', array('Normal X-Axis', 10)), - Image_Graph::vertical( - $Plotarea[0], - $Plotarea[1] - ), - 7 - ), - Image_Graph::vertical( - Image_Graph::factory('Image_Graph_Title', array('Logarithmic X-Axis', 10)), - Image_Graph::vertical( - $Plotarea[2], - $Plotarea[3] - ), - 7 - ) - ), - 4 - ), - $Legend = Image_Graph::factory('Image_Graph_Legend'), - 92 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea[0]); - -$Dataset = Image_Graph::factory('dataset'); -$i = 1; -while ($i <= 10) { - $Dataset->addPoint($i, $i*$i); - $i++; -} - -for ($i = 0; $i < 4; $i++) { - $Plotarea[$i]->addNew('line_grid', false, IMAGE_GRAPH_AXIS_X); - $Plotarea[$i]->addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y); - - if ($i % 2 == 1) { - $Axis =& $Plotarea[$i]->getAxis(IMAGE_GRAPH_AXIS_Y); - $Axis->setLabelInterval(array(1, 2, 3, 5, 10, 20, 30, 50, 100)); - } - - - $Plot =& $Plotarea[$i]->addNew('line', array(&$Dataset)); - $Plot->setLineColor('red'); - $Plot->setTitle("x^2"); -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/log_axis_intersect.php b/includes/pear/Image/docs/examples/log_axis_intersect.php deleted file mode 100644 index b0b30740..00000000 --- a/includes/pear/Image/docs/examples/log_axis_intersect.php +++ /dev/null @@ -1,106 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('png', array('width' => 600, 'height' => 400, 'antialias' => true)); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 15 pixels -$Font->setSize(8); -// add a title using the created font - -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 2; $j++) { - $Axis['X'][($i*2+$j)] = 'axis' . ($i % 2 == 0 ? '' : '_log'); - $Axis['Y'][($i*2+$j)] = 'axis' . ($j % 2 == 0 ? '' : '_log'); - } -} - -for ($i = 0; $i < 4; $i++) { - $Plotarea[$i] =& Image_Graph::factory('plotarea', array($Axis['X'][$i], $Axis['Y'][$i])); -} - -$Graph->setFont($Font); -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Logarithmic Axis', 11)), - Image_Graph::vertical( - Image_Graph::horizontal( - Image_Graph::vertical( - Image_Graph::factory('title', array('Normal Y-Axis', array('size' => 10, 'angle' => 90))), - Image_Graph::factory('title', array('Logarithmic Y-Axis', array('size' => 10, 'angle' => 90))) - ), - Image_Graph::horizontal( - Image_Graph::vertical( - Image_Graph::factory('title', array('Normal X-Axis', 10)), - Image_Graph::vertical( - $Plotarea[0], - $Plotarea[1] - ), - 7 - ), - Image_Graph::vertical( - Image_Graph::factory('Image_Graph_Title', array('Logarithmic X-Axis', 10)), - Image_Graph::vertical( - $Plotarea[2], - $Plotarea[3] - ), - 7 - ) - ), - 4 - ), - $Legend = Image_Graph::factory('Image_Graph_Legend'), - 92 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea[0]); - -$Dataset = Image_Graph::factory('dataset'); -$i = 1; -while ($i <= 10) { - $Dataset->addPoint($i, $i*$i); - $i++; -} - -for ($i = 0; $i < 4; $i++) { - $Plotarea[$i]->addNew('line_grid', false, IMAGE_GRAPH_AXIS_X); - $Plotarea[$i]->addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y); - - if ($i % 2 == 1) { - $Axis =& $Plotarea[$i]->getAxis(IMAGE_GRAPH_AXIS_Y); - $Axis->setLabelInterval(array(1, 2, 3, 5, 10, 20, 30, 50, 100)); - } - - $AxisX =& $Plotarea[$i]->getAxis(IMAGE_GRAPH_AXIS_X); - $AxisX->setAxisIntersection('max'); - - $Plot =& $Plotarea[$i]->addNew('line', array(&$Dataset)); - $Plot->setLineColor('red'); - $Plot->setTitle("x^2"); -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/logo_graph.php b/includes/pear/Image/docs/examples/logo_graph.php deleted file mode 100644 index e6f97df2..00000000 --- a/includes/pear/Image/docs/examples/logo_graph.php +++ /dev/null @@ -1,194 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -require_once 'Image/Canvas.php'; - -// create a new GD canvas -$Canvas =& Image_Canvas::factory('png', - array( - 'width' => 600, - 'height' => 400 - ) -); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - -$Font =& $Graph->addNew('font', 'Verdana'); -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Weather Conditions', 12)), - Image_Graph::vertical( - $Plotarea_Weather = Image_Graph::factory('plotarea'), - $Legend_Weather = Image_Graph::factory('legend'), - 85 - ), - 7) -); -$Legend_Weather->setPlotarea($Plotarea_Weather); -$Legend_Weather->setFontSize(7); - -/* $GridY_Weather =& $Plotarea_Weather->addNew( - 'line_grid', - null, - IMAGE_GRAPH_AXIS_Y - ); - $GridY_Weather->setLineColor('gray@0.1'); - - $Marker_AverageSpan =& - $Plotarea_Weather->addNew( - 'Image_Graph_Axis_Marker_Area', - IMAGE_GRAPH_AXIS_Y - ); - $Marker_AverageSpan->setFillColor('green@0.2'); - $Marker_AverageSpan->setLowerBound(3.8); - $Marker_AverageSpan->setUpperBound(11.4); - - $Marker_Average =& - $Plotarea_Weather->addNew( - 'Image_Graph_Axis_Marker_Line', - IMAGE_GRAPH_AXIS_Y - ); - $Marker_Average->setLineColor('blue@0.4'); - $Marker_Average->setValue(7.7);*/ - -$Dataset_Rainfall =& Image_Graph::factory('dataset'); -$Dataset_Rainfall->addPoint('Jan', 60); -$Dataset_Rainfall->addPoint('Feb', 41); -$Dataset_Rainfall->addPoint('Mar', 48); -$Dataset_Rainfall->addPoint('Apr', 42); -$Dataset_Rainfall->addPoint('May', 50); -$Dataset_Rainfall->addPoint('Jun', 55); -$Dataset_Rainfall->addPoint('Jul', 67); -$Dataset_Rainfall->addPoint('Aug', 65); -$Dataset_Rainfall->addPoint('Sep', 72); -$Dataset_Rainfall->addPoint('Oct', 77); -$Dataset_Rainfall->addPoint('Nov', 80); -$Dataset_Rainfall->addPoint('Dec', 68); -$Plot_Rainfall =& - $Plotarea_Weather->addNew( - 'bar', - array(&$Dataset_Rainfall), - IMAGE_GRAPH_AXIS_Y_SECONDARY - ); -$Plot_Rainfall->setLineColor('gray'); -$Plot_Rainfall->setFillStyle(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', '#7AB025'))); -$Plot_Rainfall->setTitle('Average rainfall'); - -$Dataset_TempAvg =& Image_Graph::factory('dataset'); -$Dataset_TempAvg->addPoint('Jan', 0.2); -$Dataset_TempAvg->addPoint('Feb', 0.1); -$Dataset_TempAvg->addPoint('Mar', 2.3); -$Dataset_TempAvg->addPoint('Apr', 5.8); -$Dataset_TempAvg->addPoint('May', 10.8); -$Dataset_TempAvg->addPoint('Jun', 14.1); -$Dataset_TempAvg->addPoint('Jul', 16.2); -$Dataset_TempAvg->addPoint('Aug', 15.9); -$Dataset_TempAvg->addPoint('Sep', 12.1); -$Dataset_TempAvg->addPoint('Oct', 8.7); -$Dataset_TempAvg->addPoint('Nov', 4.4); -$Dataset_TempAvg->addPoint('Dec', 1.8); -$Plot_TempAvg =& - $Plotarea_Weather->addNew( - 'Image_Graph_Plot_Smoothed_Line', - array(&$Dataset_TempAvg) - ); -$Plot_TempAvg->setLineColor('#7AB025'); -$Plot_TempAvg->setTitle('Average temperature'); - -$Dataset_TempMin =& Image_Graph::factory('dataset'); -$Dataset_TempMin->addPoint('Jan', -2.7); -$Dataset_TempMin->addPoint('Feb', -2.8); -$Dataset_TempMin->addPoint('Mar', -0.9); -$Dataset_TempMin->addPoint('Apr', 1.2); -$Dataset_TempMin->addPoint('May', 5.5); -$Dataset_TempMin->addPoint('Jun', 9.2); -$Dataset_TempMin->addPoint('Jul', 11.3); -$Dataset_TempMin->addPoint('Aug', 11.1); -$Dataset_TempMin->addPoint('Sep', 7.8); -$Dataset_TempMin->addPoint('Oct', 5.0); -$Dataset_TempMin->addPoint('Nov', 1.5); -$Dataset_TempMin->addPoint('Dec', -0.9); -$Plot_TempMin =& - $Plotarea_Weather->addNew( - 'Image_Graph_Plot_Smoothed_Line', - array(&$Dataset_TempMin) - ); -$Plot_TempMin->setLineColor('gray'); -$Plot_TempMin->setTitle('Minimum temperature'); - -$Dataset_TempMax =& Image_Graph::factory('dataset'); -$Dataset_TempMax->addPoint('Jan', 2.4); -$Dataset_TempMax->addPoint('Feb', 2.5); -$Dataset_TempMax->addPoint('Mar', 5.4); -$Dataset_TempMax->addPoint('Apr', 10.5); -$Dataset_TempMax->addPoint('May', 15.8); -$Dataset_TempMax->addPoint('Jun', 18.9); -$Dataset_TempMax->addPoint('Jul', 21.2); -$Dataset_TempMax->addPoint('Aug', 20.8); -$Dataset_TempMax->addPoint('Sep', 16.3); -$Dataset_TempMax->addPoint('Oct', 11.8); -$Dataset_TempMax->addPoint('Nov', 6.9); -$Dataset_TempMax->addPoint('Dec', 4.1); -$Plot_TempMax =& - $Plotarea_Weather->addNew( - 'Image_Graph_Plot_Smoothed_Line', - array(&$Dataset_TempMax) - ); -$Plot_TempMax->setLineColor('black'); -$Plot_TempMax->setTitle('Maximum temperature'); - -$DataPreprocessor_MM =& - Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%d mm'); -$DataPreprocessor_DegC =& - Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%d C'); - -$Marker_Rainfall =& - $Plot_Rainfall->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -$Marker_Rainfall->setDataPreprocessor($DataPreprocessor_MM); -$Marker_Rainfall->setFontSize(7); -$PointingMarker_Rainfall =& - $Plot_Rainfall->addNew( - 'Image_Graph_Marker_Pointing_Angular', - array(20, &$Marker_Rainfall) - ); -$Plot_Rainfall->setMarker($PointingMarker_Rainfall); - -$AxisY_Weather =& $Plotarea_Weather->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY_Weather->showLabel(IMAGE_GRAPH_LABEL_ZERO); -$AxisY_Weather->setDataPreprocessor($DataPreprocessor_DegC); -$AxisY_Weather->setTitle('Temperature', array('angle' => 90, 'size' => 10)); -$AxisY_Weather->forceMinimum(-4); - -$AxisYsecondary_Weather =& - $Plotarea_Weather->getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY); -$AxisYsecondary_Weather->setDataPreprocessor($DataPreprocessor_MM); -$AxisYsecondary_Weather->setTitle('Rainfall', array('angle' => 270, 'size' => 10)); - -$AxisX_Weather =& - $Plotarea_Weather->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX_Weather->setAxisIntersection('min'); - -//$Graph->setBackgroundColor('#F7F9F9'); -// output the graph using the GD canvas -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/manual_labels.php b/includes/pear/Image/docs/examples/manual_labels.php deleted file mode 100644 index a1dbfc61..00000000 --- a/includes/pear/Image/docs/examples/manual_labels.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(500, 200)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Plotarea =& $Graph->addNew('plotarea'); - -$Dataset =& Image_Graph::factory('random', array(8, 1, 10)); -$Plot =& $Plotarea->addNew('line', array(&$Dataset)); - -$LineStyle =& Image_Graph::factory('Image_Graph_Line_Dashed', array('red', 'transparent')); -//$Plot->setLineColor('red'); -$Plot->setLineStyle($LineStyle); - -$AxisY =& $Plotarea->getAxis('y'); -$AxisY->setLabelInterval(array(2, 4, 9)); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/misc01.php b/includes/pear/Image/docs/examples/misc01.php deleted file mode 100644 index 1cac6138..00000000 --- a/includes/pear/Image/docs/examples/misc01.php +++ /dev/null @@ -1,197 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('Image_Graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Dataset_SmoothedLine =& Image_Graph::factory('dataset'); -$Dataset_SmoothedLine->addPoint('DK', 6); -$Dataset_SmoothedLine->addPoint('UK', 8); -$Dataset_SmoothedLine->addPoint('PO', 2); -$Dataset_SmoothedLine->addPoint('NL', 4); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('A Sample Demonstrating Many-a-thing', 15)), - Image_Graph::vertical( - Image_Graph::horizontal( - $Plotarea_BarAndLine = Image_Graph::factory('plotarea'), - Image_Graph::vertical( - $Plotarea_SmoothedLine = Image_Graph::factory('plotarea'), - $Plotarea_Radar = Image_Graph::factory('Image_Graph_Plotarea_Radar') - ), - 65 - ), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 9 - ) -); - -$Legend->setPlotarea($Plotarea_BarAndLine); -$Legend->setPlotarea($Plotarea_SmoothedLine); -$Legend->setPlotarea($Plotarea_Radar); - -// $Plotarea_SmoothedLine->setFillStyle(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'lightred', 'brown'))); -$Plotarea_SmoothedLine->setBorderColor('black'); -$Plotarea_SmoothedLine->showShadow(); -$Plotarea_SmoothedLine->setPadding(15); -$Plotarea_SmoothedLine->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'brown'))); - -// create a Y grid -$Grid_Radar =& $Plotarea_Radar->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); -$Grid_Radar->setLineColor('lightgrey'); - -// create a Y grid -$Grid_BarAndLine =& $Plotarea_BarAndLine->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y); -// that is light gray in color -$Grid_BarAndLine->setFillColor('blue@0.3'); - -// create a Y grid -$Grid_SmoothedLine =& $Plotarea_SmoothedLine->addNew('line_grid', false, IMAGE_GRAPH_AXIS_Y); -$Grid_SmoothedLine->setLineColor('gray'); -$Grid_SmoothedLine =& $Plotarea_SmoothedLine->addNew('line_grid', false, IMAGE_GRAPH_AXIS_X); -$Grid_SmoothedLine->setLineColor('gray'); - -// create the 1st dataset -//$Dataset_SmoothedLine =& new Image_RandomDataset(4, 2, 15, true); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot_SmoothedLine =& $Plotarea_SmoothedLine->addNew('Image_Graph_Plot_Smoothed_Line', $Dataset_SmoothedLine); -$Plot_SmoothedLine->setLineColor('orange'); - -// create a 3rd dataset -$Dataset_BarChart =& Image_Graph::factory('random', array(7, 10, 120, false)); -// create the 3rd plot as line chart using the 2nd dataset -$Plot_BarChart =& $Plotarea_BarAndLine->addNew('bar', array(&$Dataset_BarChart)); -// set the fill style of the barchart to the almost transparent BlueAlpha -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Plot_BarChart->setFillStyle($FillArray); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'red')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL, 'white', 'blue')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED, 'orange', 'white')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED, 'green', 'white')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'purple')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_DIAGONALLY_TL_BR, 'white', 'brown')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_DIAGONALLY_BL_TR, 'white', 'black')); - -// create the 2nd dataset -$Dataset_LineMarker =& Image_Graph::factory('random', array(7, 20, 100, false)); -// create the 2nd plot as line chart using the 2nd dataset -$Plot_LineMarker =& $Plotarea_BarAndLine->addNew('line', array(&$Dataset_LineMarker)); - -$LineStyle =& Image_Graph::factory('Image_Graph_Line_Dotted', array('black', 'transparent')); -$Plot_LineMarker->setLineStyle($LineStyle); - -$Marker =& Image_Graph::factory('Image_Graph_Marker_Array'); -$CrossMarker =& Image_Graph::factory('Image_Graph_Marker_Cross'); -$PlusMarker =& Image_Graph::factory('Image_Graph_Marker_Plus'); -$StarMarker =& Image_Graph::factory('Image_Graph_Marker_Star'); -$Marker->add($CrossMarker); -$Marker->add($PlusMarker); -$Marker->add($StarMarker); -$Plot_LineMarker->setMarker($Marker); - -$CrossMarker->setLineColor('black'); -$CrossMarker->setFillColor('green'); -$PlusMarker->setLineColor('black'); -$PlusMarker->setFillColor('red'); -$StarMarker->setLineColor('black@0.4'); -$StarMarker->setFillColor('yellow'); - -// Show arrow heads on the axis -$AxisX =& $Plotarea_BarAndLine->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisY =& $Plotarea_BarAndLine->getAxis(IMAGE_GRAPH_AXIS_Y); - -$AxisY->setLabelInterval(5, 2); -$AxisY->setTickOptions(-1, 1, 2); - -// create an data label array for formatting label data based on an array -$ArrayData =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', - array( - array( - 1=>'A Point', - 2=>'Another', - 6=>'Yet another' - ) - ) -); - -// use the data label array on the X axis -$AxisX->setDataPreprocessor($ArrayData); -$AxisX->setFontAngle('vertical'); -$AxisX->setTitle('Very obvious', array('angle' => 0, 'size' => 10)); - -$Plotarea_BarAndLine->setAxisPadding(array('left' => 20, 'right' => 20)); - -$Plot_SmoothedLine->setTitle('Oil'); -$Plot_LineMarker->setTitle('Clearly not a good day'); -$Plot_BarChart->setTitle('Buy or Sell'); - -// create the dataset -$Dataset_Radar1 =& Image_Graph::factory('random', array(8, 1, 5)); -$Dataset_Radar2 =& Image_Graph::factory('random', array(8, 1, 5)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot_Radar1 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', array(&$Dataset_Radar1)); -$Plot_Radar1->setTitle('Obscurity'); -$Plot_Radar2 =& $Plotarea_Radar->addNew('Image_Graph_Plot_Radar', array(&$Dataset_Radar2)); -$Plot_Radar2->setTitle('Clarity'); - -//$Dataset_Radar1->setMaximumY(7); - -$DataPreprocessor =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', - array( - array( - 1 => 'Irrelevance', - 2 => 'Regular', - 3 => 'Partly', - 4 => 'Relevance', - 5 => 'Something', - 6 => 'Everything', - 7 => 'Nothing', - 8 => 'Irregular' - ) - ) -); - -$AxisX =& $Plotarea_Radar->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setDataPreprocessor($DataPreprocessor); - -//$Plot_Radar1->setMarker(new Image_CrossMarker(), 'Marker'); -//$Plot_Radar1->setLineStyle($YELLOW); - -$AverageMarker =& Image_Graph::factory('Image_Graph_Marker_Average'); -$Plot_SmoothedLine->setMarker($AverageMarker); -$AverageMarker->setLineColor('purple'); - -// set a standard fill style -$Plot_Radar1->setFillColor('yellow@0.2'); -$Plot_Radar2->setFillColor('green@0.2'); -// output the Graph - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/misc02.php b/includes/pear/Image/docs/examples/misc02.php deleted file mode 100644 index 972ca5e9..00000000 --- a/includes/pear/Image/docs/examples/misc02.php +++ /dev/null @@ -1,117 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -function XtoYear($Value) -{ - return floor($Value+2000); -} - -function salaries($Value) -{ - // I wish! - return exp($Value)+1000; -} - -// create the graph as a 500 x 300 image -$Graph =& Image_Graph::factory('graph', array(600, 300)); -$Graph->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'lightsteelblue', 'papayawhip'))); - -// create a random dataset to use for demonstrational purposes -$DataSet =& Image_Graph::factory('function', array(1, 9, 'salaries', 8)); - -$DataSet2 =& Image_Graph::factory('dataset'); -$DataSet2->addPoint('CEO', 10); -$DataSet2->addPoint('TAP', 32); -$DataSet2->addPoint('TBF', 13); -$DataSet2->addPoint('ABC', 19); -$DataSet2->addPoint('QED', 26); - -// create and set the plot font -$Font =& $Graph->addNew('font', 'Verdana'); -$Font->setSize(7); -$Graph->setFont($Font); - -// add a plot area in a vertical layout to display a title on top -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Annual income', 11)), - Image_Graph::horizontal( - $Plotarea = Image_Graph::factory('plotarea'), - Image_Graph::vertical( - $Plotarea2 = Image_Graph::factory('plotarea'), - $Legend2 = Image_Graph::factory('legend'), - 90 - ) - ), - 5 - ), - 5 -); - -$Legend2->setPlotarea($Plotarea2); - -// create a bar grid and fill it with a gradient fill white->lightgray -$Grid =& $Plotarea->addNew('bar_grid', null, IMAGE_GRAPH_AXIS_Y); -$Grid->setFillColor('gray@0.2'); - -$Plotarea->setFillColor('gray@0.2'); - -// add a line plot to the plotarea based on the function dataset -$Plot =& $Plotarea->addNew('line', array(&$DataSet)); - -// add coins-icon as marker -$Plot->setMarker(Image_Graph::factory('Image_Graph_Marker_Icon', './images/coins.png')); - -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); - -// make x-axis start at 0 -$AxisX->forceMinimum(0); - -// make x-axis end at 9 -$AxisX->forceMaximum(9); - -// show axis arrows -$AxisY->showArrow(); - -// make y-axis have a maximum at 9.500 -$AxisY->forceMaximum(9500); - -// create a datapreprocessor to map X-values to years -$AxisX->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Function', 'XtoYear')); -$AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Currency', "US$")); - -$Plot2 =& $Plotarea2->addNew('pie', array(&$DataSet2)); -$Plotarea2->hideAxis(); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red')); -$Fill->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'blue')); -$Fill->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'yellow')); -$Fill->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'green')); -$Fill->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'orange')); -$Plot2->setFillStyle($Fill); - -$Marker2 =& $Graph->addNew('value_marker', IMAGE_GRAPH_VALUE_Y); -$Plot2->setMarker($Marker2); -$Marker2->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.0f%%')); - -$Plot2->explode(20, 'TBF'); - -// output the graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/misc03.php b/includes/pear/Image/docs/examples/misc03.php deleted file mode 100644 index 530f6019..00000000 --- a/includes/pear/Image/docs/examples/misc03.php +++ /dev/null @@ -1,78 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 7 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Meat Export', 12)), - Image_Graph::horizontal( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 70 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the 1st dataset -$Dataset1 =& Image_Graph::factory('dataset'); -$Dataset1->addPoint('Beef', rand(1, 10)); -$Dataset1->addPoint('Pork', rand(1, 10)); -$Dataset1->addPoint('Poultry', rand(1, 10)); -$Dataset1->addPoint('Camels', rand(1, 10)); -$Dataset1->addPoint('Other', rand(1, 10)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('pie', array(&$Dataset1)); -$Plotarea->hideAxis(); - -// create a Y data value marker -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_TOTAL); -// create a pin-point marker type -$PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); -// and use the marker on the 1st plot -$Plot->setMarker($PointingMarker); -// format value marker labels as percentage values -$Marker->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%')); - -$Plot->Radius = 2; - -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Plot->setFillStyle($FillArray); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'green')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'blue')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'yellow')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'orange')); - -$Plot->explode(5); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/misc04.php b/includes/pear/Image/docs/examples/misc04.php deleted file mode 100644 index a05a26ec..00000000 --- a/includes/pear/Image/docs/examples/misc04.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(500, 300)); - -$Plotarea =& $Graph->addNew('plotarea'); - -$Dataset =& Image_Graph::factory('Image_Graph_Dataset_Random', array(20, 10, 100, true)); - -$Fill =& Image_Graph::factory('Image_Graph_Fill_Image', './images/audi-tt-coupe.jpg'); -$Plotarea->setFillStyle($Fill); - -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Area', $Dataset); - -$Plot->setFillColor('white@0.4'); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/misc05.php b/includes/pear/Image/docs/examples/misc05.php deleted file mode 100644 index 3da000e4..00000000 --- a/includes/pear/Image/docs/examples/misc05.php +++ /dev/null @@ -1,146 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); - -$Font =& $Graph->addNew('font', 'Verdana'); -$Font->setSize(9); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::vertical( - Image_Graph::factory('title', array('Weather Conditions by Month', 12)), - Image_Graph::factory('title', array('Location: Århus, Denmark', 8)), - 80 - ), - Image_Graph::vertical( - $Plotarea_Weather = Image_Graph::factory('plotarea'), - $Legend_Weather = Image_Graph::factory('legend'), - 85 - ), - 9) -); -$Legend_Weather->setPlotarea($Plotarea_Weather); - -$GridY_Weather =& $Plotarea_Weather->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); -$GridY_Weather->setLineColor('gray@0.1'); - -$Dataset_TempAvg =& Image_Graph::factory('dataset'); -$Dataset_TempAvg->addPoint('Jan', 0.2); -$Dataset_TempAvg->addPoint('Feb', 0.1); -$Dataset_TempAvg->addPoint('Mar', 2.3); -$Dataset_TempAvg->addPoint('Apr', 5.8); -$Dataset_TempAvg->addPoint('May', 10.8); -$Dataset_TempAvg->addPoint('Jun', 14.1); -$Dataset_TempAvg->addPoint('Jul', 16.2); -$Dataset_TempAvg->addPoint('Aug', 15.9); -$Dataset_TempAvg->addPoint('Sep', 12.1); -$Dataset_TempAvg->addPoint('Oct', 8.7); -$Dataset_TempAvg->addPoint('Nov', 4.4); -$Dataset_TempAvg->addPoint('Dec', 1.8); -$Plot_TempAvg =& $Plotarea_Weather->addNew('smooth_line', array(&$Dataset_TempAvg)); -$Plot_TempAvg->setLineColor('blue'); -$Plot_TempAvg->setTitle('Average temperature'); - -$Dataset_TempMin =& Image_Graph::factory('dataset'); -$Dataset_TempMin->addPoint('Jan', -2.7); -$Dataset_TempMin->addPoint('Feb', -2.8); -$Dataset_TempMin->addPoint('Mar', -0.9); -$Dataset_TempMin->addPoint('Apr', 1.2); -$Dataset_TempMin->addPoint('May', 5.5); -$Dataset_TempMin->addPoint('Jun', 9.2); -$Dataset_TempMin->addPoint('Jul', 11.3); -$Dataset_TempMin->addPoint('Aug', 11.1); -$Dataset_TempMin->addPoint('Sep', 7.8); -$Dataset_TempMin->addPoint('Oct', 5.0); -$Dataset_TempMin->addPoint('Nov', 1.5); -$Dataset_TempMin->addPoint('Dec', -0.9); -$Plot_TempMin =& $Plotarea_Weather->addNew('smooth_line', array(&$Dataset_TempMin)); -$Plot_TempMin->setLineColor('teal'); -$Plot_TempMin->setTitle('Minimum temperature'); - -$Dataset_TempMax =& Image_Graph::factory('dataset'); -$Dataset_TempMax->addPoint('Jan', 2.4); -$Dataset_TempMax->addPoint('Feb', 2.5); -$Dataset_TempMax->addPoint('Mar', 5.4); -$Dataset_TempMax->addPoint('Apr', 10.5); -$Dataset_TempMax->addPoint('May', 15.8); -$Dataset_TempMax->addPoint('Jun', 18.9); -$Dataset_TempMax->addPoint('Jul', 21.2); -$Dataset_TempMax->addPoint('Aug', 20.8); -$Dataset_TempMax->addPoint('Sep', 16.3); -$Dataset_TempMax->addPoint('Oct', 11.8); -$Dataset_TempMax->addPoint('Nov', 6.9); -$Dataset_TempMax->addPoint('Dec', 4.1); -$Plot_TempMax =& $Plotarea_Weather->addNew('smooth_line', array(&$Dataset_TempMax)); -$Plot_TempMax->setLineColor('red'); -$Plot_TempMax->setTitle('Maximum temperature'); - -$Marker_AverageSpan =& $Plotarea_Weather->addNew('Image_Graph_Axis_Marker_Area', IMAGE_GRAPH_AXIS_Y); -$Marker_AverageSpan->setFillColor('green@0.2'); -$Marker_AverageSpan->setLowerBound(3.8); -$Marker_AverageSpan->setUpperBound(11.4); - -$Marker_Average =& $Plotarea_Weather->addNew('Image_Graph_Axis_Marker_Line', IMAGE_GRAPH_AXIS_Y); -$Marker_Average->setLineColor('blue@0.4'); -$Marker_Average->setValue(7.7); - -$Dataset_Rainfall =& Image_Graph::factory('dataset'); -$Dataset_Rainfall->addPoint('Jan', 60); -$Dataset_Rainfall->addPoint('Feb', 41); -$Dataset_Rainfall->addPoint('Mar', 48); -$Dataset_Rainfall->addPoint('Apr', 42); -$Dataset_Rainfall->addPoint('May', 50); -$Dataset_Rainfall->addPoint('Jun', 55); -$Dataset_Rainfall->addPoint('Jul', 67); -$Dataset_Rainfall->addPoint('Aug', 65); -$Dataset_Rainfall->addPoint('Sep', 72); -$Dataset_Rainfall->addPoint('Oct', 77); -$Dataset_Rainfall->addPoint('Nov', 80); -$Dataset_Rainfall->addPoint('Dec', 68); -$Plot_Rainfall =& $Plotarea_Weather->addNew('bar', array(&$Dataset_Rainfall), IMAGE_GRAPH_AXIS_Y_SECONDARY); -$Plot_Rainfall->setLineColor('gray'); -$Plot_Rainfall->setFillColor('blue@0.1'); -$Plot_Rainfall->setTitle('Average rainfall'); - -$DataPreprocessor_MM =& Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%d mm'); -$DataPreprocessor_DegC =& Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%d C'); - -$Marker_Rainfall =& $Plot_Rainfall->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -$Marker_Rainfall->setDataPreprocessor($DataPreprocessor_MM); -$PointingMarker_Rainfall =& $Plot_Rainfall->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker_Rainfall)); -$Plot_Rainfall->setMarker($PointingMarker_Rainfall); - -$AxisX_Weather =& $Plotarea_Weather->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX_Weather->setAxisIntersection('min'); - -$AxisY_Weather =& $Plotarea_Weather->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY_Weather->showLabel(IMAGE_GRAPH_LABEL_ZERO); -$AxisY_Weather->setDataPreprocessor($DataPreprocessor_DegC); -$AxisY_Weather->setTitle('Temperature', 'vertical'); - -$AxisYsecondary_Weather =& $Plotarea_Weather->getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY); -$AxisYsecondary_Weather->setDataPreprocessor($DataPreprocessor_MM); -$AxisYsecondary_Weather->setTitle('Rainfall', 'vertical2'); - -// output the graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/misc06.php b/includes/pear/Image/docs/examples/misc06.php deleted file mode 100644 index 2250db19..00000000 --- a/includes/pear/Image/docs/examples/misc06.php +++ /dev/null @@ -1,132 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); - -// add a TrueType font -$Arial =& $Graph->addNew('font', 'Verdana'); -// set the font size to 8 pixels -$Arial->setSize(8); -// set default font color to white -$Arial->setColor('white'); - -// make the entire graph use this font -$Graph->setFont($Arial); - -// create the graph layout -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('German Car Popularity', 11)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 7 - ) -); - -// associate the legend with the plotarea -$Legend->setPlotarea($Plotarea); - -// make the graph have a gradient filled background -$Graph->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'green', 'lightblue'))); -// and a black border -$Graph->setBorderColor('black'); - -// create and populate the dataset for 'popularity' -$Dataset =& Image_Graph::factory('dataset'); -$Dataset->addPoint('Audi', 100); -$Dataset->addPoint('Mercedes', 41); -$Dataset->addPoint('Porsche', 78); -$Dataset->addPoint('BMW', 12); - -// create and populate the dataset for 'defects / 1000 units' -$Dataset2 =& Image_Graph::factory('dataset'); -$Dataset2->addPoint('Audi', 10); -$Dataset2->addPoint('Mercedes', 17); -$Dataset2->addPoint('Porsche', 12); -$Dataset2->addPoint('BMW', 21); - -// add a line grid -$GridY =& $Plotarea->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); -// make it have a slightly transparent white color -$GridY->setLineColor('white@0.8'); - -// create the plot as bar chart using the 'popularity' dataset -$Plot =& $Plotarea->addNew('bar', array(&$Dataset)); -// set the plot title (for legends) -$Plot->setTitle('Popularity'); - -// create a fill array to make the bars have individual fill's -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'orange')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'blue')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'yellow')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'red')); - -// make the 'popularity' plot use this fillarray -$Plot->setFillStyle($FillArray); - -// create a marker array and populate it with icon markers -$Marker =& $Graph->addNew('Image_Graph_Marker_Array'); -$Marker->addNew('icon_marker', './images/audi.png'); -$Marker->addNew('icon_marker', './images/mercedes.png'); -$Marker->addNew('icon_marker', './images/porsche.png'); -$Marker->addNew('icon_marker', './images/bmw.png'); - -// make the plot use the marker array -$Plot->setMarker($Marker); - -// create the 2nd plot ('defects / 1000 units') as a line plot and associate -// it with the secondary y-axis (implicitly this creates a y-axis of the class -// Image_Graph_Axis) -$Plot2 =& $Plotarea->addNew('line', array(&$Dataset2), IMAGE_GRAPH_AXIS_Y_SECONDARY); -// set the plot title -$Plot2->setTitle('Defects'); -// and line style -$Plot2->setLineColor('gray@0.8'); - -// create a value marker to display the actual y-values -$Marker =& $Graph->addNew('value_marker', IMAGE_GRAPH_VALUE_Y); -// and make the line plot use this -$Plot2->setMarker($Marker); -// make the marker print using font-size 7 -$Marker->setFontSize(7); -// ... in blue -$Marker->setFontColor('blue'); - -// get the y-axis -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -// and create a datapreprocessor to make the labels print out as percentage valuexs -$AxisY->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.0f%%')); -// force a maximum on the y-axis to 105 -$AxisY->forceMaximum(105); -// set the axis title and make it display vertically ('vertical' = down->up) -$AxisY->setTitle('Popularity', 'vertical'); - -// get the secondary y-axis -$AxisYsec =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY); -// set the axis title and make it display vertically ('vertical2' = up->down) -$AxisYsec->setTitle('Defects / 1000 units', 'vertical2'); - -// output the Graph -$Graph->done(); - -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/multiple_plots.php b/includes/pear/Image/docs/examples/multiple_plots.php deleted file mode 100644 index 95016652..00000000 --- a/includes/pear/Image/docs/examples/multiple_plots.php +++ /dev/null @@ -1,82 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::vertical( - $Title = Image_Graph::factory('title', array('Multiple Plots', 11)), - $SubTitle = Image_Graph::factory('title', array('This is a demonstration of title alignment', 7)), - 90 - ), - $Plotarea = Image_Graph::factory('plotarea'), - 8 - ) -); -$Title->setAlignment(IMAGE_GRAPH_ALIGN_LEFT); -$SubTitle->setAlignment(IMAGE_GRAPH_ALIGN_LEFT); - -$Grid =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y); -$Grid->setFillStyle(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'lightgrey'))); - -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Area', Image_Graph::factory('random', array(10, 20, 100, true))); -$Plot->setFillColor('red@0.2'); - -$Plot =& $Plotarea->addNew('line', Image_Graph::factory('random', array(10, 20, 100, true))); -$Plot->setLineColor('blue@0.2'); -$CircleMarker =& Image_Graph::factory('Image_Graph_Marker_Circle'); -$Plot->setMarker($CircleMarker); -$CircleMarker->setFillColor('white@0.4'); - -$Plot =& $Plotarea->addNew('bar', Image_Graph::factory('random', array(10, 2, 40, true))); -$Plot->setFillColor('green@0.2'); -$Marker =& Image_Graph::factory('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -$Plot->setMarker($Marker); -$Marker->setFillColor('white'); -$Marker->setBorderColor('black'); - -$AxisY = $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->showArrow(); - -$Array = array( - "Jan-Feb\n2004", - "Mar-Apr\n2004", - "May-Jun\n2004", - "Jul-Aug\n2004", - "Sep-Oct\n2004", - "Nov-Dev\n2004", - "Jan-Feb\n2005", - "Mar-Apr\n2005", - "May-Jun\n2005", - "Jul-Aug\n2005" -); -$AxisX = $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Array', array($Array))); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/negative_values.php b/includes/pear/Image/docs/examples/negative_values.php deleted file mode 100644 index 779aa724..00000000 --- a/includes/pear/Image/docs/examples/negative_values.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('png', array('width' => 400, 'height' => 300, 'antialias' => true)); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); - // add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ) -); -$Legend->setPlotarea($Plotarea); - -$Dataset =& Image_Graph::factory('dataset'); -$Dataset->addPoint('Jan', 1); -$Dataset->addPoint('Feb', 2); -$Dataset->addPoint('Mar', -2); -$Dataset->addPoint('Apr', 4); -$Dataset->addPoint('May', 3); -$Dataset->addPoint('Jun', 6); -$Dataset->addPoint('Jul', -1); -$Dataset->addPoint('Aug', -3); -$Dataset->addPoint('Sep', 2); -$Dataset->addPoint('Oct', 3); -$Dataset->addPoint('Nov', 1); -$Dataset->addPoint('Dec', 4); - -$Dataset2 =& Image_Graph::factory('dataset'); -$Dataset2->addPoint('Jan', 3); -$Dataset2->addPoint('Feb', 4); -$Dataset2->addPoint('Mar', 1); -$Dataset2->addPoint('Apr', -2); -$Dataset2->addPoint('May', 3); -$Dataset2->addPoint('Jul', 1); - -$Plot =& $Plotarea->addNew('area', array(&$Dataset)); -$Plot->setFillColor('red@0.2'); - -$Plot2 =& $Plotarea->addNew('bar', array(&$Dataset2)); -$Plot2->setFillColor('blue@0.2'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/pear-icon.png b/includes/pear/Image/docs/examples/pear-icon.png deleted file mode 100644 index 26118f11..00000000 Binary files a/includes/pear/Image/docs/examples/pear-icon.png and /dev/null differ diff --git a/includes/pear/Image/docs/examples/plot_all.php b/includes/pear/Image/docs/examples/plot_all.php deleted file mode 100644 index 761f889f..00000000 --- a/includes/pear/Image/docs/examples/plot_all.php +++ /dev/null @@ -1,231 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -$Graph =& Image_Graph::factory('graph', array(800, 800)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Arial'); -// set the font size to 11 pixels -$Font->setSize(6); - -$Graph->setFont($Font); - -$Matrix =& $Graph->addNew('Image_Graph_Layout_Matrix', array(5, 4)); - -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, false)); -$Dataset2 =& Image_Graph::factory('random', array(10, 2, 15, false)); -$Dataset3 =& Image_Graph::factory('random', array(10, 2, 15, false)); - -$Plotarea =& $Matrix->getEntry(0, 0); -$Plot =& $Plotarea->addNew('line', array(&$Dataset)); -$Plot->setLineColor('red'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Line', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 1); -$Plot =& $Plotarea->addNew('area', array(&$Dataset)); -$Plot->setLineColor('gray'); -$Plot->setFillColor('blue@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Area', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 2); -$Plot =& $Plotarea->addNew('bar', array(&$Dataset)); -$Plot->setLineColor('gray'); -$Plot->setFillColor('green@0.2'); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 3); -$Plot =& $Plotarea->addNew('smooth_line', array(&$Dataset)); -$Plot->setLineColor('orange'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Line', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 0); -$Plot =& $Plotarea->addNew('smooth_area', array(&$Dataset)); -$Plot->setLineColor('purple@0.4'); -$Plot->setFillColor('purple@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Area', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 1); -$Plot =& $Plotarea->addNew('pie', array(&$Dataset)); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.2'); -$Fill->addColor('blue@0.2'); -$Fill->addColor('green@0.2'); -$Fill->addColor('yellow@0.2'); -$Fill->addColor('orange@0.2'); -$Fill->addColor('purple@0.2'); -$Plot->setFillStyle($Fill); -$Plot->setLineColor('gray'); -$Plotarea->hideAxis(); -$Plot->explode(10, 1); -$Plotarea->addNew('title', array('Image_Graph_Plot_Pie', array('size' => 7))); - -$Plotarea =& $Matrix->getEntry(1, 2); -$Plot =& $Plotarea->addNew('step', array(&$Dataset)); -$Plot->setLineColor('yellow@0.5'); -$Plot->setFillColor('yellow@0.3'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Step', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 3); -$Plot =& $Plotarea->addNew('impulse', array(&$Dataset)); -$Plot->setLineColor('blue'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Impulse', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - - $Plotarea =& $Matrix->getEntry(2, 0); - $Plot =& $Plotarea->addNew('scatter', array(&$Dataset)); -$Marker =& $Plot->addNew('Image_Graph_Marker_Circle'); -$Marker->setSize(4); -$Marker->setLineColor('green@0.4'); -$Marker->setFillColor('green@0.2'); -$Plot->setMarker($Marker); -$Plotarea->addNew('title', array('Image_Graph_Plot_Dot', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar'); -$Matrix->setEntry(2, 1, $Plotarea); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Radar', array(&$Dataset)); -$Plot->setLineColor('orange@0.4'); -$Plot->setFillColor('orange@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Radar', array('size' => 7))); - -$Dataset1 =& Image_Graph::factory('dataset'); -$base = mktime(0, 0, 0, 11, 1, 2004); -$open = rand(20, 100); -//for ($i = 0; $i < 61; $i++) { -for ($i = 0; $i < 10; $i++) { - $span = rand(-25, 25); - $close = ($open + $span < 0 ? $open - $span : $open + $span); - $min = max(1, min($close, $open) - rand(1, 20)); - $max = max($close, $open) + rand(1, 20); - $date = $base + $i * 86400; - $Dataset1->addPoint(date('d-M', $date), array('min' => $min, 'open' => $open, 'close' => $close, 'max' => $max)); - $open = $close; -} -$Plotarea =& $Matrix->getEntry(2, 2); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_CandleStick', array(&$Dataset1)); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.4', 'red'); -$Fill->addColor('green@0.4', 'green'); -$Plot->setFillStyle($Fill); -$Axis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$Axis->setLabelInterval(3); -$Plotarea->addNew('title', array('Image_Graph_Plot_CandleStick', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(2, 3); -$Dataset1 =& Image_Graph::factory('dataset'); -for ($i = 0; $i < 40; $i++) { - $v1 = rand(5, 15); - $v2 = $v1 + rand(10, 20); - $Dataset1->addPoint($i, array('low' => $v1, 'high' => $v2)); -} -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Band', array($Dataset1)); -// set a line color -$Plot->setLineColor('gray'); -$Plot->setFillColor('teal@0.2'); -$Axis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$Axis->setLabelInterval(5); -$Plotarea->addNew('title', array('Image_Graph_Plot_Band', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(3, 0); -$Dataset1 =& Image_Graph::factory('dataset'); -for ($i = 0; $i < 4; $i++) { - $data = array(); - $min = rand(1, 10); - $max = rand(15, 30); - for ($j = 0; $j < 20; $j++) { - $data[] = rand($min, $max); - } - $Dataset1->addPoint($i, $data); -} -$Plot =& $Plotarea->addNew('Image_Graph_Plot_BoxWhisker', array($Dataset1)); -$Plot->setWhiskerSize(3); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red', 'min'); -$Fill->addColor('green', 'max'); -$Fill->addColor('orange@0.2', 'quartile1'); -$Fill->addColor('blue@0.2', 'median'); -$Fill->addColor('orange@0.2', 'quartile3'); -$Fill->addColor('yellow@0.1', 'box'); -$Plot->setFillStyle($Fill); -$Line =& Image_Graph::factory('Image_Graph_Line_Solid', 'black@0.6'); -$Line->setThickness(1); -$Plot->setLineStyle($Line); -$Plotarea->addNew('title', array('Image_Graph_Plot_BoxWhisker', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar'); -$Matrix->setEntry(3, 1, $Plotarea); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Radar', array(&$Dataset)); -$Plot->setLineColor('red@0.4'); -$Plot->setFillColor('red@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Radar', array('size' => 7))); - -$Plotarea =& $Matrix->getEntry(4, 0); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Bar', array(array(&$Dataset, &$Dataset2))); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.2'); -$Fill->addColor('blue@0.2'); -$Plot->setFillStyle($Fill); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(2, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar (normal)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(4, 1); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Area', array(array(&$Dataset, &$Dataset2, &$Dataset3), 'stacked')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('khaki@0.2'); -$Fill->addColor('indianred@0.2'); -$Fill->addColor('gold@0.2'); -$Plot->setFillStyle($Fill); -$Plotarea->addNew('title', array('Image_Graph_Plot_Area (stacked)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - - $Plotarea =& $Matrix->getEntry(4, 2); - $Plot =& $Plotarea->addNew('Image_Graph_Plot_Bar', array(array(&$Dataset, &$Dataset2), 'stacked')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('maroon@0.5'); -$Fill->addColor('peru@0.5'); -$Plot->setFillStyle($Fill); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar (stacked)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(4, 3); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Step', array(array(&$Dataset, &$Dataset2, &$Dataset3), 'stacked100pct')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('orange@0.2'); -$Fill->addColor('yellow@0.2'); -$Fill->addColor('lightgrey@0.2'); -$Plot->setFillStyle($Fill); -$Plotarea->setAxisPadding(-1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Step (stacked 100%)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_all_horizontal.php b/includes/pear/Image/docs/examples/plot_all_horizontal.php deleted file mode 100644 index 3ac05318..00000000 --- a/includes/pear/Image/docs/examples/plot_all_horizontal.php +++ /dev/null @@ -1,247 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -$Graph =& Image_Graph::factory('graph', array(800, 800)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Arial'); -// set the font size to 11 pixels -$Font->setSize(6); - -$Graph->setFont($Font); - -$Matrix =& $Graph->addNew('Image_Graph_Layout_Matrix', array(5, 4, false)); - -for ($i = 0; $i < 5; $i++) { - for ($j = 0; $j < 4; $j++) { - $Matrix->setEntry( - $i, $j, - Image_Graph::factory( - 'plotarea', - array( - 'Image_Graph_Axis_Category', - 'Image_Graph_Axis', - 'horizontal' - ) - ) - ); - } -} - -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, false)); -$Dataset2 =& Image_Graph::factory('random', array(10, 2, 15, false)); -$Dataset3 =& Image_Graph::factory('random', array(10, 2, 15, false)); - -$Plotarea =& $Matrix->getEntry(0, 0); -$Plot =& $Plotarea->addNew('line', array(&$Dataset)); -$Plot->setLineColor('red'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Line', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 1); -$Plot =& $Plotarea->addNew('area', array(&$Dataset)); -$Plot->setLineColor('gray'); -$Plot->setFillColor('blue@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Area', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 2); -$Plot =& $Plotarea->addNew('bar', array(&$Dataset)); -$Plot->setLineColor('gray'); -$Plot->setFillColor('green@0.2'); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 3); -$Plot =& $Plotarea->addNew('smooth_line', array(&$Dataset)); -$Plot->setLineColor('orange'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Line', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 0); -$Plot =& $Plotarea->addNew('smooth_area', array(&$Dataset)); -$Plot->setLineColor('purple@0.4'); -$Plot->setFillColor('purple@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Area', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 1); -$Plot =& $Plotarea->addNew('pie', array(&$Dataset)); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.2'); -$Fill->addColor('blue@0.2'); -$Fill->addColor('green@0.2'); -$Fill->addColor('yellow@0.2'); -$Fill->addColor('orange@0.2'); -$Fill->addColor('purple@0.2'); -$Plot->setFillStyle($Fill); -$Plot->setLineColor('gray'); -$Plotarea->hideAxis(); -$Plot->explode(10, 1); -$Plotarea->addNew('title', array('Image_Graph_Plot_Pie', array('size' => 7))); - -$Plotarea =& $Matrix->getEntry(1, 2); -$Plot =& $Plotarea->addNew('step', array(&$Dataset)); -$Plot->setLineColor('yellow@0.5'); -$Plot->setFillColor('yellow@0.3'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Step', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 3); -$Plot =& $Plotarea->addNew('impulse', array(&$Dataset)); -$Plot->setLineColor('blue'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Impulse', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - - $Plotarea =& $Matrix->getEntry(2, 0); - $Plot =& $Plotarea->addNew('scatter', array(&$Dataset)); -$Marker =& $Plot->addNew('Image_Graph_Marker_Circle'); -$Marker->setSize(4); -$Marker->setLineColor('green@0.4'); -$Marker->setFillColor('green@0.2'); -$Plot->setMarker($Marker); -$Plotarea->addNew('title', array('Image_Graph_Plot_Dot', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar'); -$Matrix->setEntry(2, 1, $Plotarea); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Radar', array(&$Dataset)); -$Plot->setLineColor('orange@0.4'); -$Plot->setFillColor('orange@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Radar', array('size' => 7))); - -$Dataset1 =& Image_Graph::factory('dataset'); -$base = mktime(0, 0, 0, 11, 1, 2004); -$open = rand(20, 100); -//for ($i = 0; $i < 61; $i++) { -for ($i = 0; $i < 10; $i++) { - $span = rand(-25, 25); - $close = ($open + $span < 0 ? $open - $span : $open + $span); - $min = max(1, min($close, $open) - rand(1, 20)); - $max = max($close, $open) + rand(1, 20); - $date = $base + $i * 86400; - $Dataset1->addPoint(date('d-M', $date), array('min' => $min, 'open' => $open, 'close' => $close, 'max' => $max)); - $open = $close; -} -$Plotarea =& $Matrix->getEntry(2, 2); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_CandleStick', array(&$Dataset1)); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.4', 'red'); -$Fill->addColor('green@0.4', 'green'); -$Plot->setFillStyle($Fill); -$Axis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$Axis->setLabelInterval(3); -$Plotarea->addNew('title', array('Image_Graph_Plot_CandleStick', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(2, 3); -$Dataset1 =& Image_Graph::factory('dataset'); -for ($i = 0; $i < 40; $i++) { - $v1 = rand(5, 15); - $v2 = $v1 + rand(10, 20); - $Dataset1->addPoint($i, array('low' => $v1, 'high' => $v2)); -} -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Band', array($Dataset1)); -// set a line color -$Plot->setLineColor('gray'); -$Plot->setFillColor('teal@0.2'); -$Axis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$Axis->setLabelInterval(5); -$Plotarea->addNew('title', array('Image_Graph_Plot_Band', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(3, 0); -$Dataset1 =& Image_Graph::factory('dataset'); -for ($i = 0; $i < 4; $i++) { - $data = array(); - $min = rand(1, 10); - $max = rand(15, 30); - for ($j = 0; $j < 20; $j++) { - $data[] = rand($min, $max); - } - $Dataset1->addPoint($i, $data); -} -$Plot =& $Plotarea->addNew('Image_Graph_Plot_BoxWhisker', array($Dataset1)); -$Plot->setWhiskerSize(3); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red', 'min'); -$Fill->addColor('green', 'max'); -$Fill->addColor('orange@0.2', 'quartile1'); -$Fill->addColor('blue@0.2', 'median'); -$Fill->addColor('orange@0.2', 'quartile3'); -$Fill->addColor('yellow@0.1', 'box'); -$Plot->setFillStyle($Fill); -$Line =& Image_Graph::factory('Image_Graph_Line_Solid', 'black@0.6'); -$Line->setThickness(1); -$Plot->setLineStyle($Line); -$Plotarea->addNew('title', array('Image_Graph_Plot_BoxWhisker', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar'); -$Matrix->setEntry(3, 1, $Plotarea); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Radar', array(&$Dataset)); -$Plot->setLineColor('red@0.4'); -$Plot->setFillColor('red@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Radar', array('size' => 7))); - -$Plotarea =& $Matrix->getEntry(4, 0); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Bar', array(array(&$Dataset, &$Dataset2))); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.2'); -$Fill->addColor('blue@0.2'); -$Plot->setFillStyle($Fill); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(2, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar (normal)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(4, 1); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Area', array(array(&$Dataset, &$Dataset2, &$Dataset3), 'stacked')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('khaki@0.2'); -$Fill->addColor('indianred@0.2'); -$Fill->addColor('gold@0.2'); -$Plot->setFillStyle($Fill); -$Plotarea->addNew('title', array('Image_Graph_Plot_Area (stacked)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - - $Plotarea =& $Matrix->getEntry(4, 2); - $Plot =& $Plotarea->addNew('Image_Graph_Plot_Bar', array(array(&$Dataset, &$Dataset2), 'stacked')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('maroon@0.5'); -$Fill->addColor('peru@0.5'); -$Plot->setFillStyle($Fill); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar (stacked)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(4, 3); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Step', array(array(&$Dataset, &$Dataset2, &$Dataset3), 'stacked100pct')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('orange@0.2'); -$Fill->addColor('yellow@0.2'); -$Fill->addColor('lightgrey@0.2'); -$Plot->setFillStyle($Fill); -$Plotarea->setAxisPadding(-1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Step (stacked 100%)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_all_horizontal_invert.php b/includes/pear/Image/docs/examples/plot_all_horizontal_invert.php deleted file mode 100644 index 89646e65..00000000 --- a/includes/pear/Image/docs/examples/plot_all_horizontal_invert.php +++ /dev/null @@ -1,250 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -$Graph =& Image_Graph::factory('graph', array(800, 800)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Arial'); -// set the font size to 11 pixels -$Font->setSize(6); - -$Graph->setFont($Font); - -$Matrix =& $Graph->addNew('Image_Graph_Layout_Matrix', array(5, 4, false)); - -for ($i = 0; $i < 5; $i++) { - for ($j = 0; $j < 4; $j++) { - $Plotarea =& Image_Graph::factory( - 'plotarea', - array( - 'Image_Graph_Axis_Category', - 'Image_Graph_Axis', - 'horizontal' - ) - ); - $AxisX =& $Plotarea->getAxis('x'); - $AxisX->setInverted(true); - $AxisY =& $Plotarea->getAxis('y'); - $AxisY->setInverted(true); - - $Matrix->setEntry($i, $j, $Plotarea); - } -} - -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, false)); -$Dataset2 =& Image_Graph::factory('random', array(10, 2, 15, false)); -$Dataset3 =& Image_Graph::factory('random', array(10, 2, 15, false)); - -$Plotarea =& $Matrix->getEntry(0, 0); -$Plot =& $Plotarea->addNew('line', array(&$Dataset)); -$Plot->setLineColor('red'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Line', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 1); -$Plot =& $Plotarea->addNew('area', array(&$Dataset)); -$Plot->setLineColor('gray'); -$Plot->setFillColor('blue@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Area', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 2); -$Plot =& $Plotarea->addNew('bar', array(&$Dataset)); -$Plot->setLineColor('gray'); -$Plot->setFillColor('green@0.2'); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(0, 3); -$Plot =& $Plotarea->addNew('smooth_line', array(&$Dataset)); -$Plot->setLineColor('orange'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Line', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 0); -$Plot =& $Plotarea->addNew('smooth_area', array(&$Dataset)); -$Plot->setLineColor('purple@0.4'); -$Plot->setFillColor('purple@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Area', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 1); -$Plot =& $Plotarea->addNew('pie', array(&$Dataset)); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.2'); -$Fill->addColor('blue@0.2'); -$Fill->addColor('green@0.2'); -$Fill->addColor('yellow@0.2'); -$Fill->addColor('orange@0.2'); -$Fill->addColor('purple@0.2'); -$Plot->setFillStyle($Fill); -$Plot->setLineColor('gray'); -$Plotarea->hideAxis(); -$Plot->explode(10, 1); -$Plotarea->addNew('title', array('Image_Graph_Plot_Pie', array('size' => 7))); - -$Plotarea =& $Matrix->getEntry(1, 2); -$Plot =& $Plotarea->addNew('step', array(&$Dataset)); -$Plot->setLineColor('yellow@0.5'); -$Plot->setFillColor('yellow@0.3'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Step', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(1, 3); -$Plot =& $Plotarea->addNew('impulse', array(&$Dataset)); -$Plot->setLineColor('blue'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Impulse', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - - $Plotarea =& $Matrix->getEntry(2, 0); - $Plot =& $Plotarea->addNew('scatter', array(&$Dataset)); -$Marker =& $Plot->addNew('Image_Graph_Marker_Circle'); -$Marker->setSize(4); -$Marker->setLineColor('green@0.4'); -$Marker->setFillColor('green@0.2'); -$Plot->setMarker($Marker); -$Plotarea->addNew('title', array('Image_Graph_Plot_Dot', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar'); -$Matrix->setEntry(2, 1, $Plotarea); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Radar', array(&$Dataset)); -$Plot->setLineColor('orange@0.4'); -$Plot->setFillColor('orange@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Radar', array('size' => 7))); - -$Dataset1 =& Image_Graph::factory('dataset'); -$base = mktime(0, 0, 0, 11, 1, 2004); -$open = rand(20, 100); -//for ($i = 0; $i < 61; $i++) { -for ($i = 0; $i < 10; $i++) { - $span = rand(-25, 25); - $close = ($open + $span < 0 ? $open - $span : $open + $span); - $min = max(1, min($close, $open) - rand(1, 20)); - $max = max($close, $open) + rand(1, 20); - $date = $base + $i * 86400; - $Dataset1->addPoint(date('d-M', $date), array('min' => $min, 'open' => $open, 'close' => $close, 'max' => $max)); - $open = $close; -} -$Plotarea =& $Matrix->getEntry(2, 2); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_CandleStick', array(&$Dataset1)); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.4', 'red'); -$Fill->addColor('green@0.4', 'green'); -$Plot->setFillStyle($Fill); -$Axis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$Axis->setLabelInterval(3); -$Plotarea->addNew('title', array('Image_Graph_Plot_CandleStick', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(2, 3); -$Dataset1 =& Image_Graph::factory('dataset'); -for ($i = 0; $i < 40; $i++) { - $v1 = rand(5, 15); - $v2 = $v1 + rand(10, 20); - $Dataset1->addPoint($i, array('low' => $v1, 'high' => $v2)); -} -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Band', array($Dataset1)); -// set a line color -$Plot->setLineColor('gray'); -$Plot->setFillColor('teal@0.2'); -$Axis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$Axis->setLabelInterval(5); -$Plotarea->addNew('title', array('Image_Graph_Plot_Band', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(3, 0); -$Dataset1 =& Image_Graph::factory('dataset'); -for ($i = 0; $i < 4; $i++) { - $data = array(); - $min = rand(1, 10); - $max = rand(15, 30); - for ($j = 0; $j < 20; $j++) { - $data[] = rand($min, $max); - } - $Dataset1->addPoint($i, $data); -} -$Plot =& $Plotarea->addNew('Image_Graph_Plot_BoxWhisker', array($Dataset1)); -$Plot->setWhiskerSize(3); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red', 'min'); -$Fill->addColor('green', 'max'); -$Fill->addColor('orange@0.2', 'quartile1'); -$Fill->addColor('blue@0.2', 'median'); -$Fill->addColor('orange@0.2', 'quartile3'); -$Fill->addColor('yellow@0.1', 'box'); -$Plot->setFillStyle($Fill); -$Line =& Image_Graph::factory('Image_Graph_Line_Solid', 'black@0.6'); -$Line->setThickness(1); -$Plot->setLineStyle($Line); -$Plotarea->addNew('title', array('Image_Graph_Plot_BoxWhisker', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar'); -$Matrix->setEntry(3, 1, $Plotarea); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Radar', array(&$Dataset)); -$Plot->setLineColor('red@0.4'); -$Plot->setFillColor('red@0.2'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Smoothed_Radar', array('size' => 7))); - -$Plotarea =& $Matrix->getEntry(4, 0); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Bar', array(array(&$Dataset, &$Dataset2))); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.2'); -$Fill->addColor('blue@0.2'); -$Plot->setFillStyle($Fill); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(2, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar (normal)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(4, 1); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Area', array(array(&$Dataset, &$Dataset2, &$Dataset3), 'stacked')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('khaki@0.2'); -$Fill->addColor('indianred@0.2'); -$Fill->addColor('gold@0.2'); -$Plot->setFillStyle($Fill); -$Plotarea->addNew('title', array('Image_Graph_Plot_Area (stacked)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - - $Plotarea =& $Matrix->getEntry(4, 2); - $Plot =& $Plotarea->addNew('Image_Graph_Plot_Bar', array(array(&$Dataset, &$Dataset2), 'stacked')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('maroon@0.5'); -$Fill->addColor('peru@0.5'); -$Plot->setFillStyle($Fill); -$Plot->setSpacing(2); -$Plotarea->setAxisPadding(1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Bar (stacked)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Plotarea =& $Matrix->getEntry(4, 3); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Step', array(array(&$Dataset, &$Dataset2, &$Dataset3), 'stacked100pct')); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('orange@0.2'); -$Fill->addColor('yellow@0.2'); -$Fill->addColor('lightgrey@0.2'); -$Plot->setFillStyle($Fill); -$Plotarea->setAxisPadding(-1, 'left'); -$Plotarea->addNew('title', array('Image_Graph_Plot_Step (stacked 100%)', array('size' => 7))); -$Plotarea->setAxisPadding(10, 'top'); - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_area.php b/includes/pear/Image/docs/examples/plot_area.php deleted file mode 100644 index e8899b05..00000000 --- a/includes/pear/Image/docs/examples/plot_area.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Simple Area Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -// create the 1st plot as smoothed area chart using the 1st dataset - -$Plot =& $Plotarea->addNew('area', array(&$Dataset)); - -// set a line color -$Plot->setLineColor('gray'); - -// set a standard fill style -$Plot->setFillColor('blue@0.2'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_area_smooth.php b/includes/pear/Image/docs/examples/plot_area_smooth.php deleted file mode 100644 index d6fcc680..00000000 --- a/includes/pear/Image/docs/examples/plot_area_smooth.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Smoothed Area Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Area', array(&$Dataset)); - -// set a line color -$Plot->setLineColor('gray'); - -// set a standard fill style -$Plot->setFillColor('blue@0.2'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_area_stack.php b/includes/pear/Image/docs/examples/plot_area_stack.php deleted file mode 100644 index dafb1ce2..00000000 --- a/includes/pear/Image/docs/examples/plot_area_stack.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Stacked Area Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Datasets = - array( - Image_Graph::factory('random', array(10, 2, 15, true)), - Image_Graph::factory('random', array(10, 2, 15, true)), - Image_Graph::factory('random', array(10, 2, 15, true)) - ); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Area', array($Datasets, 'stacked')); - -// set a line color -$Plot->setLineColor('gray'); - -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('green@0.2'); - -// set a standard fill style -$Plot->setFillStyle($FillArray); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_band.php b/includes/pear/Image/docs/examples/plot_band.php deleted file mode 100644 index 3a283bb6..00000000 --- a/includes/pear/Image/docs/examples/plot_band.php +++ /dev/null @@ -1,62 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Band Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('dataset'); -for ($i = 0; $i < 40; $i++) { - $v1 = rand(5, 15); - $v2 = $v1 + rand(10, 20); - $Dataset->addPoint($i, array('low' => $v1, 'high' => $v2)); -} - -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Band', $Dataset); - -// set a line color -$Plot->setLineColor('gray'); -$Plot->setFillColor('blue@0.2'); - -$Axis =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$Axis->setLabelInterval(5); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_bar.php b/includes/pear/Image/docs/examples/plot_bar.php deleted file mode 100644 index 92f92e8e..00000000 --- a/includes/pear/Image/docs/examples/plot_bar.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Bar Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, false)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('bar', array(&$Dataset)); - -// set a line color -$Plot->setLineColor('gray'); - -// set a standard fill style -$Plot->setFillColor('blue@0.2'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_bar_horizontal.php b/includes/pear/Image/docs/examples/plot_bar_horizontal.php deleted file mode 100644 index 9e32a8cb..00000000 --- a/includes/pear/Image/docs/examples/plot_bar_horizontal.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Vertical and Horizontal Bar Chart', 12)), - Image_Graph::horizontal( - $Plotarea1 = Image_Graph::factory('plotarea'), - $Plotarea2 = Image_Graph::factory('plotarea', array('category', 'axis', 'horizontal')), - 50 - ), - 5 - ) -); - -$Dataset[0] =& Image_Graph::factory('dataset'); -$Dataset[1] =& Image_Graph::factory('dataset'); -$Dataset[2] =& Image_Graph::factory('dataset'); - -$Dataset[0]->addPoint('A', 1); -$Dataset[0]->addPoint('B', 4); -$Dataset[0]->addPoint('C', -1); -$Dataset[0]->addPoint('D', 2); -$Dataset[0]->addPoint('E', 1); -$Dataset[0]->addPoint('F', 2); -$Dataset[0]->addPoint('G', 3); - -$Dataset[1]->addPoint('A', 2); -$Dataset[1]->addPoint('B', -3); -$Dataset[1]->addPoint('C', -2); -$Dataset[1]->addPoint('D', 3); -$Dataset[1]->addPoint('E', 3); -$Dataset[1]->addPoint('F', 2); -$Dataset[1]->addPoint('G', -1); - -$Dataset[2]->addPoint('A', -1); -$Dataset[2]->addPoint('B', 2); -$Dataset[2]->addPoint('C', 1); -$Dataset[2]->addPoint('D', 3); -$Dataset[2]->addPoint('E', -1); -$Dataset[2]->addPoint('F', 2); -$Dataset[2]->addPoint('G', 3); - -$Plot1 =& $Plotarea1->addNew('bar', array(&$Dataset, 'stacked')); -$Plot2 =& $Plotarea2->addNew('bar', array(&$Dataset, 'stacked')); - -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('green@0.2'); -$Plot1->setFillStyle($FillArray); -$Plot2->setFillStyle($FillArray); - -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_bar_multiple.php b/includes/pear/Image/docs/examples/plot_bar_multiple.php deleted file mode 100644 index 9e2df1b0..00000000 --- a/includes/pear/Image/docs/examples/plot_bar_multiple.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Multiple Bar Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset - $Datasets = - array( - Image_Graph::factory('random', array(5, 2, 15, false)), - Image_Graph::factory('random', array(5, 2, 15, false)), - Image_Graph::factory('random', array(5, 2, 15, false)) -); - -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('bar', array($Datasets)); - -// set a line color -$Plot->setLineColor('gray'); - -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('green@0.2'); - -// set a standard fill style -$Plot->setFillStyle($FillArray); - -// create a Y data value marker -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -// create a pin-point marker type -$PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); -// and use the marker on the 1st plot -$Plot->setMarker($PointingMarker); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_bar_stacked.php b/includes/pear/Image/docs/examples/plot_bar_stacked.php deleted file mode 100644 index ec5ea4dd..00000000 --- a/includes/pear/Image/docs/examples/plot_bar_stacked.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Stacked Bar Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Datasets[] =& Image_Graph::factory('random', array(10, 0, 4, false)); -$Datasets[] =& Image_Graph::factory('random', array(10, 0, 4, false)); -$Datasets[] =& Image_Graph::factory('random', array(10, 0, 4, false)); - - -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('bar', array($Datasets, 'stacked')); - -// set a line color -$Plot->setLineColor('gray'); - -// create a fill array -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('green@0.2'); - -// set a standard fill style -$Plot->setFillStyle($FillArray); - -// create a Y data value marker -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -// and use the marker on the 1st plot -$Plot->setMarker($Marker); - -$Plot->setDataSelector(Image_Graph::factory('Image_Graph_DataSelector_NoZeros')); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_bar_stacked100pct.php b/includes/pear/Image/docs/examples/plot_bar_stacked100pct.php deleted file mode 100644 index dc35faaa..00000000 --- a/includes/pear/Image/docs/examples/plot_bar_stacked100pct.php +++ /dev/null @@ -1,83 +0,0 @@ - - */ - - -include_once('Image/Graph.php'); -include_once('Image/Graph/Marker/Value.php'); - -class myValueMarker extends Image_Graph_Marker_Value { - - function getDisplayValue($Values) { - return "\{$Values[Y]}"; - } - -} - - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Stacked Bar 100% Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -for ($j = 0; $j<4; $j++) { - $DX =& Image_Graph::factory('dataset'); - $Datasets[$j] =& $DX; - for ($i = 0; $i<10; $i++) - $DX->addPoint($i, rand(2, 15), $j); -} - -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('bar', array($Datasets, 'stacked100pct')); - -// set a line color -$Plot->setLineColor('gray'); - -// create a fill array -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('green@0.2'); -$FillArray->addColor('red@0.2'); -$FillArray->addColor('gray@0.2'); - -// set a standard fill style -$Plot->setFillStyle($FillArray); - -// create a Y data value marker -$Marker =& $Plot->add(new myValueMarker(IMAGE_GRAPH_VALUE_Y)); -// and use the marker on the 1st plot -$Plot->setMarker($Marker); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_bar_stacked_horizontal.php b/includes/pear/Image/docs/examples/plot_bar_stacked_horizontal.php deleted file mode 100644 index 23cfc24c..00000000 --- a/includes/pear/Image/docs/examples/plot_bar_stacked_horizontal.php +++ /dev/null @@ -1,79 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Stacked Bar Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea', - array( - 'category', - 'axis', - 'horizontal' - ) - ), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Datasets[] =& Image_Graph::factory('random', array(10, 0, 4, false)); -$Datasets[] =& Image_Graph::factory('random', array(10, 0, 4, false)); -$Datasets[] =& Image_Graph::factory('random', array(10, 0, 4, false)); - - -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('bar', array($Datasets, 'stacked')); - -// set a line color -$Plot->setLineColor('gray'); - -// create a fill array -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('green@0.2'); - -// set a standard fill style -$Plot->setFillStyle($FillArray); - -// create a Y data value marker -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -// and use the marker on the 1st plot -$Plot->setMarker($Marker); - -$Plot->setDataSelector(Image_Graph::factory('Image_Graph_DataSelector_NoZeros')); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_bar_stacked_negative.php b/includes/pear/Image/docs/examples/plot_bar_stacked_negative.php deleted file mode 100644 index 8e0a5319..00000000 --- a/includes/pear/Image/docs/examples/plot_bar_stacked_negative.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Negative Stacked Bar Chart', 10)), - $Plotarea = Image_Graph::factory('plotarea'), - 5 - ) -); - -$Dataset[0] =& Image_Graph::factory('dataset'); -$Dataset[1] =& Image_Graph::factory('dataset'); -$Dataset[2] =& Image_Graph::factory('dataset'); - -$Dataset[0]->addPoint('A', 1); -$Dataset[0]->addPoint('B', 4); -$Dataset[0]->addPoint('C', -1); -$Dataset[0]->addPoint('D', 2); -$Dataset[0]->addPoint('E', 1); -$Dataset[0]->addPoint('F', 2); -$Dataset[0]->addPoint('G', 3); - -$Dataset[1]->addPoint('A', 2); -$Dataset[1]->addPoint('B', -3); -$Dataset[1]->addPoint('C', -2); -$Dataset[1]->addPoint('D', 3); -$Dataset[1]->addPoint('E', 3); -$Dataset[1]->addPoint('F', 2); -$Dataset[1]->addPoint('G', -1); - -$Dataset[2]->addPoint('A', -1); -$Dataset[2]->addPoint('B', 2); -$Dataset[2]->addPoint('C', 1); -$Dataset[2]->addPoint('D', 3); -$Dataset[2]->addPoint('E', -1); -$Dataset[2]->addPoint('F', 2); -$Dataset[2]->addPoint('G', 3); - -$Plot =& $Plotarea->addNew('bar', array(&$Dataset, 'stacked')); - -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('green@0.2'); -$Plot->setFillStyle($FillArray); - -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_boxwhisker.php b/includes/pear/Image/docs/examples/plot_boxwhisker.php deleted file mode 100644 index f3ed76d7..00000000 --- a/includes/pear/Image/docs/examples/plot_boxwhisker.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Box & Whisker Chart', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -$Plotarea->addNew('line_grid', array(), IMAGE_GRAPH_AXIS_Y); - -$Dataset =& Image_Graph::factory('dataset'); -$Dataset->addPoint('Security', array(10, 21, 12, 18, 12, 17, 14, 13)); -$Dataset->addPoint('Internal', array(3, 6, 1, 9, 12, 4, 3, 5, 6)); -$Dataset->addPoint('External', array(9, 10, 12, 15, 13, 12, 11, 17)); -$Plot =& $Plotarea->addNew('Image_Graph_Plot_BoxWhisker', array(&$Dataset)); - -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red', 'min'); -$Fill->addColor('green', 'max'); -$Fill->addColor('orange@0.2', 'quartile1'); -$Fill->addColor('blue@0.2', 'median'); -$Fill->addColor('orange@0.2', 'quartile3'); -$Fill->addColor('yellow@0.1', 'box'); -$Plot->setFillStyle($Fill); -$Line =& Image_Graph::factory('Image_Graph_Line_Solid', 'black@0.6'); -$Line->setThickness(1); -$Plot->setLineStyle($Line); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_candlestick.php b/includes/pear/Image/docs/examples/plot_candlestick.php deleted file mode 100644 index 53f0b785..00000000 --- a/includes/pear/Image/docs/examples/plot_candlestick.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ - - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - - -// create the plotareas -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Candlestick Diagram', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('dataset'); - -$base = mktime(0, 0, 0, 11, 1, 2004); -$open = rand(20, 100); -//for ($i = 0; $i < 61; $i++) { -for ($i = 0; $i < 60; $i++) { - $span = rand(-25, 25); - $close = ($open + $span < 0 ? $open - $span : $open + $span); - $min = max(1, min($close, $open) - rand(1, 20)); - $max = max($close, $open) + rand(1, 20); - $date = $base + $i * 86400; - $Dataset->addPoint(date('d-M-y', $date), array('min' => $min, 'open' => $open, 'close' => $close, 'max' => $max)); - $open = $close; -} - -$Grid =& $Plotarea->addNew('line_grid', null, IMAGE_GRAPH_AXIS_X); -$Grid->setLineColor('lightgray@0.1'); -$Grid =& $Plotarea->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); -$Grid->setLineColor('lightgray@0.1'); - -$Plot =& $Plotarea->addNew('Image_Graph_Plot_CandleStick', array(&$Dataset)); -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.4', 'red'); -$Fill->addColor('green@0.4', 'green'); -$Plot->setFillStyle($Fill); -$Plot->setTitle('Image_Graph Daily'); - -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setFontAngle('vertical'); -$AxisX->setLabelInterval(5); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setLabelInterval(20); -$AxisY->setTitle('Stock Price', array('size' => 10, 'angle' => 90)); - -$Legend->setFontSize(10); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_impulse.php b/includes/pear/Image/docs/examples/plot_impulse.php deleted file mode 100644 index 2f96d6f5..00000000 --- a/includes/pear/Image/docs/examples/plot_impulse.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Impulse Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, false)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Plot_Impulse', array(&$Dataset)); - -// set a line color -$Plot->setLineColor('red'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_impulse_stacked.php b/includes/pear/Image/docs/examples/plot_impulse_stacked.php deleted file mode 100644 index 800f0ba9..00000000 --- a/includes/pear/Image/docs/examples/plot_impulse_stacked.php +++ /dev/null @@ -1,66 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Stacked Impulse Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Datasets[] =& Image_Graph::factory('random', array(10, 2, 15, false)); -$Datasets[] =& Image_Graph::factory('random', array(10, 2, 15, false)); -$Datasets[] =& Image_Graph::factory('random', array(10, 2, 15, false)); - - -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('impulse', array($Datasets, 'stacked')); - -// set a line color -$Plot->setLineColor('gray'); - -// create a line array -$LineArray =& Image_Graph::factory('Image_Graph_Line_Array'); -$LineArray->addColor('blue'); -$LineArray->addColor('orange'); -$LineArray->addColor('green'); - -// set a standard fill style -$Plot->setLineStyle($LineArray); - -$Plotarea->setFillColor('gray@0.2'); -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_line.php b/includes/pear/Image/docs/examples/plot_line.php deleted file mode 100644 index 8f5d5243..00000000 --- a/includes/pear/Image/docs/examples/plot_line.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(10); - -$Graph->setFont($Font); - -// setup the plotarea, legend and their layout -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Simple Line Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 88 - ), - 5 - ) -); - -// link the legend with the plotares -$Legend->setPlotarea($Plotarea); - -// create a random dataset for sake of simplicity -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -// create the plot as line chart using the dataset -$Plot =& $Plotarea->addNew('line', array(&$Dataset)); - -// set a line color -$Plot->setLineColor('red'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_line_smooth.php b/includes/pear/Image/docs/examples/plot_line_smooth.php deleted file mode 100644 index 6fc50510..00000000 --- a/includes/pear/Image/docs/examples/plot_line_smooth.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Smoothed Line Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 2, 15, true)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Line', array(&$Dataset)); - -// set a line color -$Plot->setLineColor('red'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_map.php b/includes/pear/Image/docs/examples/plot_map.php deleted file mode 100644 index efd34f58..00000000 --- a/includes/pear/Image/docs/examples/plot_map.php +++ /dev/null @@ -1,75 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); - -// create the plotareas -$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Map', 'europe'); - -// create the dataset -$Dataset =& Image_Graph::factory('dataset'); -$Dataset->addPoint('Denmark', 10); -$Dataset->addPoint('Sweden', 5); -$Dataset->addPoint('Iceland', 7); -$Dataset->addPoint('Portugal', 2); -$Dataset->addPoint('Sicily', 5); - -$Dataset2 =& Image_Graph::factory('dataset'); -$Dataset2->addPoint('Finland', 0); -$Dataset2->addPoint('Ukraine', 0); -$Dataset2->addPoint('Cyprus', 0); - -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Dot', array(&$Dataset)); -$Marker =& $Plot->setMarker(Image_Graph::factory('Image_Graph_Marker_Bubble')); - -// set a line color -$Plot->setLineColor('gray'); - -// set a standard fill style -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Marker->setFillStyle($FillArray); -$FillArray->addColor('green@0.2'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('red@0.2'); -$FillArray->addColor('orange@0.2'); - -$Plot2 =& $Plotarea->addNew('line', array(&$Dataset2)); -$Plot2->setLineColor('red'); -$Marker2 =& $Plot2->setMarker(Image_Graph::factory('Image_Graph_Marker_Circle')); -$Marker2->setLineColor('blue'); -$Marker2->setFillColor('white'); -$Marker2->Size = 5; -$ValueMarker =& Image_Graph::factory('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_X); -$Marker2->setSecondaryMarker(Image_Graph::factory('Image_Graph_Marker_Pointing_Angular', array(40, &$ValueMarker))); - -$ValueMarker->setFillColor('white'); - -$Font =& $Graph->addNew('font', 'Verdana'); -$Font->setSize(8); -$Graph->setFont($Font); -$Graph->addNew('title', array('Map Chart Sample', 12)); - -$Graph->setBorderColor('black'); -$Graph->showShadow(); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_odo.php b/includes/pear/Image/docs/examples/plot_odo.php deleted file mode 100644 index c9c6522a..00000000 --- a/includes/pear/Image/docs/examples/plot_odo.php +++ /dev/null @@ -1,121 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -// create the graph -$driver=& Image_Canvas::factory('png',array('width'=>400,'height'=>300,'antialias' => 'native')); -$Graph = & Image_Graph::factory('graph', $driver); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Odo Chart', 12)), - Image_Graph::horizontal( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 80 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); -$Legend->setAlignment(IMAGE_GRAPH_ALIGN_HORIZONTAL); -/***************************Arrows************************/ -$Arrows = & Image_Graph::factory('dataset'); -$Arrows->addPoint('ok', 200, 'OK'); -$Arrows->addPoint('std', 120, 'Std'); -$Arrows->addPoint('bad', 250, 'Bad'); - - -/**************************PARAMATERS for PLOT*******************/ - -// create the plot as odo chart using the dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Odo',$Arrows); -$Plot->setRange(100, 300); -$Plot->setAngles(135, 270); -$Plot->setRadiusWidth(75); -$Plot->setLineColor('gray');//for range and outline - -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -$Plot->setArrowMarker($Marker); - -$Plotarea->hideAxis(); -/***************************Axis************************/ -// create a Y data value marker - -$Marker->setFillColor('transparent'); -$Marker->setBorderColor('transparent'); -$Marker->setFontSize(7); -$Marker->setFontColor('black'); - -// create a pin-point marker type -$Plot->setTickLength(14); -$Plot->setAxisTicks(5); -/********************************color of arrows*************/ -$FillArray = & Image_Graph::factory('Image_Graph_Fill_Array'); -$FillArray->addColor('blue@0.6', 'OK'); -$FillArray->addColor('orange@0.6', 'Std'); -$FillArray->addColor('green@0.6', 'Bad'); - -// create a line array -$LineArray =& Image_Graph::factory('Image_Graph_Line_Array'); -$LineArray->addColor('blue', 'OK'); -$LineArray->addColor('orange', 'Std'); -$LineArray->addColor('green', 'Bad'); -$Plot->setArrowLineStyle($LineArray); -$Plot->setArrowFillStyle($FillArray); - -/***************************MARKER OR ARROW************************/ -// create a Y data value marker -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_VALUE_Y); -$Marker->setFillColor('black'); -$Marker->setBorderColor('blue'); -$Marker->setFontSize(7); -$Marker->setFontColor('white'); -// create a pin-point marker type -$PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); -// and use the marker on the plot -$Plot->setMarker($PointingMarker); -/**************************RANGE*******************/ -// create the dataset -/*$Range[] = & Image_Graph::factory('dataset',array(array(100,140))); -$Range[] = & Image_Graph::factory('dataset',array(array(150,260))); -$Range[] = & Image_Graph::factory('dataset',array(array(270,290)));*/ -//print_r($Range);die(); -$Plot->addRangeMarker(100, 140); -$Plot->addRangeMarker(150, 260); -$Plot->addRangeMarker(270, 290); -// create a fillstyle for the ranges -$FillRangeArray = & Image_Graph::factory('Image_Graph_Fill_Array'); -$FillRangeArray->addColor('green@0.7'); -$FillRangeArray->addColor('yellow@0.7'); -$FillRangeArray->addColor('blue@0.7'); -/* $FillRangeArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'green')); -$FillRangeArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'orange')); -$FillRangeArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red')); */ -$Plot->setRangeMarkerFillStyle($FillRangeArray); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_pie.php b/includes/pear/Image/docs/examples/plot_pie.php deleted file mode 100644 index d0ade349..00000000 --- a/includes/pear/Image/docs/examples/plot_pie.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); -// create the plotareas -$Plotarea =& $Graph->addNew('plotarea'); - -$Plotarea->hideAxis(); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 10, 20, true)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Pie', $Dataset); - -$Plot->Radius = 2; - -// set a line color -$Plot->setLineColor('gray'); - -// set a standard fill style -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Plot->setFillStyle($FillArray); -$FillArray->addColor('green@0.2'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('red@0.2'); -$FillArray->addColor('orange@0.2'); - -// add a title using the created font -$Graph->addNew('title', array('Pie Chart Sample', 11)); - -$Plot->explode(10); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/plot_pie_rotate.php b/includes/pear/Image/docs/examples/plot_pie_rotate.php deleted file mode 100644 index ad962d6e..00000000 --- a/includes/pear/Image/docs/examples/plot_pie_rotate.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); - -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 7 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Meat Export', 12)), - Image_Graph::horizontal( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 70 - ), - 5 - ) -); - -$Legend->setPlotarea($Plotarea); - -// create the 1st dataset -$Dataset1 =& Image_Graph::factory('dataset'); -$Dataset1->addPoint('Beef', rand(1, 10)); -$Dataset1->addPoint('Pork', rand(1, 10)); -$Dataset1->addPoint('Poultry', rand(1, 10)); -$Dataset1->addPoint('Camels', rand(1, 10)); -$Dataset1->addPoint('Other', rand(1, 10)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('pie', array(&$Dataset1)); -$Plotarea->hideAxis(); - -// create a Y data value marker -$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_TOTAL); -// create a pin-point marker type -$PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker)); -// and use the marker on the 1st plot -$Plot->setMarker($PointingMarker); -// format value marker labels as percentage values -$Marker->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%')); - -$Plot->Radius = 2; - -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Plot->setFillStyle($FillArray); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'green')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'blue')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'yellow')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'red')); -$FillArray->addNew('gradient', array(IMAGE_GRAPH_GRAD_RADIAL, 'white', 'orange')); - -$Plot->explode(5); - -$Plot->setStartingAngle(90); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_radar.php b/includes/pear/Image/docs/examples/plot_radar.php deleted file mode 100644 index 14a9d881..00000000 --- a/includes/pear/Image/docs/examples/plot_radar.php +++ /dev/null @@ -1,82 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('png', - array( - 'width' => 400, - 'height' => 300, - 'antialias' => 'native' - ) -); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Spider/Radar Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('Image_Graph_Plotarea_Radar'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -$Plotarea->addNew('Image_Graph_Grid_Polar', IMAGE_GRAPH_AXIS_Y); - -// create the dataset -$DS1 =& Image_Graph::factory('dataset'); -$DS1->addPoint('Life', rand(1, 6)); -$DS1->addPoint('Universe', rand(1, 6)); -$DS1->addPoint('Everything', rand(1, 6)); -$DS1->addPoint('Something', rand(1, 6)); -$DS1->addPoint('Nothing', rand(1, 6)); -$DS1->addPoint('Irrelevevant', rand(1, 6)); - -$DS2 =& Image_Graph::factory('dataset'); -$DS2->addPoint('Life', rand(1, 6)); -$DS2->addPoint('Universe', rand(1, 6)); -$DS2->addPoint('Everything', rand(1, 6)); -$DS2->addPoint('Something', rand(1, 6)); -$DS2->addPoint('Nothing', rand(1, 6)); -$DS2->addPoint('Irrelevevant', rand(1, 6)); - -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Radar', $DS1); -$Plot2 =& $Plotarea->addNew('Image_Graph_Plot_Radar', $DS2); - - -// set a standard fill style -$Plot->setLineColor('blue@0.4'); -$Plot->setFillColor('blue@0.2'); - -$Plot2->setLineColor('red@0.4'); -$Plot2->setFillColor('red@0.2'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_radar_smooth.php b/includes/pear/Image/docs/examples/plot_radar_smooth.php deleted file mode 100644 index 27bdec8d..00000000 --- a/includes/pear/Image/docs/examples/plot_radar_smooth.php +++ /dev/null @@ -1,78 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Smoothed Radar Chart Sample', 11)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('Image_Graph_Plotarea_Radar'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -$Plotarea->addNew('Image_Graph_Grid_Polar', IMAGE_GRAPH_AXIS_Y); - -// create the dataset -$DS1 =& Image_Graph::factory('dataset'); -$DS2 =& Image_Graph::factory('dataset'); -for ($i = 0; $i < 360; $i += 10) { - $DS1->addPoint($i, rand(3, 6)); - if ($i % 30 == 0) { - $DS2->addPoint($i, rand(2, 4)); - } -} - -$Plot1 =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Radar', $DS1); -$Plot2 =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Radar', $DS2); - -// set a standard fill style -$Plot1->setLineColor('blue@0.4'); -$Plot1->setFillColor('blue@0.2'); -// set a standard fill style -$Plot2->setLineColor('green@0.4'); -$Plot2->setFillColor('green@0.2'); - -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setLabelInterval(3); -$AxisX->setLineColor('lightgrey'); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setLineColor('lightgrey'); - -// create a Y data value marker -$Marker =& $Plot2->addNew('Image_Graph_Marker_Circle'); -$Marker->setSize(5); -$Marker->setFillColor('gray@0.2'); -$Plot2->setMarker($Marker); - - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_scatter.php b/includes/pear/Image/docs/examples/plot_scatter.php deleted file mode 100644 index 69a1ece2..00000000 --- a/includes/pear/Image/docs/examples/plot_scatter.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Dot Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset1 =& Image_Graph::factory('random', array(10, 2, 9, false)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot1 =& $Plotarea->addNew('Image_Graph_Plot_Dot', array(&$Dataset1)); -$Marker1 =& Image_Graph::factory('Image_Graph_Marker_Cross'); -$Marker1->setFillColor('blue'); -$Marker1->setLineColor('black'); -// set a line color -$Plot1->setMarker($Marker1); -$Plot1->setTitle('Introvert'); - -// create the dataset -$Dataset2 =& Image_Graph::factory('random', array(10, 10, 15, false)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot2 =& $Plotarea->addNew('Image_Graph_Plot_Dot', array(&$Dataset2)); -$Marker2 =& Image_Graph::factory('Image_Graph_Marker_Plus'); -$Marker2->setFillColor('green'); -$Marker2->setLineColor('black'); -// set a line color -$Plot2->setMarker($Marker2); -$Plot2->setTitle('Extrovert'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_scatter_linefit.php b/includes/pear/Image/docs/examples/plot_scatter_linefit.php deleted file mode 100644 index 4c58e5c6..00000000 --- a/includes/pear/Image/docs/examples/plot_scatter_linefit.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Dot Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset1 =& Image_Graph::factory('random', array(10, 10, 50, false)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot1 =& $Plotarea->addNew('Image_Graph_Plot_Dot', array(&$Dataset1)); -$Marker1 =& Image_Graph::factory('Image_Graph_Marker_Cross'); -$Marker1->setFillColor('blue'); -$Marker1->setLineColor('black'); -// set a line color -$Plot1->setMarker($Marker1); -$Plot1->setTitle('Introvert'); - -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot2 =& $Plotarea->addNew('Image_Graph_Plot_Fit_Line', array(&$Dataset1)); -// set a line color -$Plot2->setLineColor('blue'); -$Plot2->setTitle('Extrovert'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/plot_step.php b/includes/pear/Image/docs/examples/plot_step.php deleted file mode 100644 index efa4462e..00000000 --- a/includes/pear/Image/docs/examples/plot_step.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Step Chart Sample', 12)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -// create the dataset -$Dataset[] =& Image_Graph::factory('random', array(10, 2, 5, false)); -$Dataset[] =& Image_Graph::factory('random', array(10, 2, 5, false)); -$Dataset[] =& Image_Graph::factory('random', array(10, 2, 5, false)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Step', array($Dataset, 'stacked')); - -// set a line color -$Plot->setLineColor('gray'); - -$Fill =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Fill->addColor('red@0.2'); -$Fill->addColor('blue@0.2'); -$Fill->addColor('green@0.2'); -$Plot->setFillStyle($Fill); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/secondary_axis.php b/includes/pear/Image/docs/examples/secondary_axis.php deleted file mode 100644 index d7cbfc67..00000000 --- a/includes/pear/Image/docs/examples/secondary_axis.php +++ /dev/null @@ -1,85 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; -require_once 'Image/Canvas.php'; - -$Canvas =& Image_Canvas::factory('png', array('width' => 400, 'height' => 300, 'antialias' => 'native')); - -// create the graph -$Graph =& Image_Graph::factory('graph', $Canvas); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - -// create the plotarea layout -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Primary & Secondary Axis', 11)), - Image_Graph::vertical( - $Plotarea = Image_Graph::factory('plotarea'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); - -// make the legend use the plotarea (or implicitly it's plots) -$Legend->setPlotarea($Plotarea); - -// create a grid and assign it to the secondary Y axis -$GridY2 =& $Plotarea->addNew('bar_grid', IMAGE_GRAPH_AXIS_Y_SECONDARY); -$GridY2->setFillStyle( - Image_Graph::factory( - 'gradient', - array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'lightgrey') - ) -); - -// create a line plot using a random dataset -$Dataset1 =& Image_Graph::factory('random', array(8, 10, 100, true)); -$Plot1 =& $Plotarea->addNew('line', array(&$Dataset1)); -$Plot1->setLineColor('red'); - -// create an area plot using a random dataset -$Dataset2 =& Image_Graph::factory('random', array(8, 1, 10, true)); -$Plot2 =& $Plotarea->addNew( - 'Image_Graph_Plot_Area', - $Dataset2, - IMAGE_GRAPH_AXIS_Y_SECONDARY -); - -$Plot2->setLineColor('gray'); -$Plot2->setFillColor('blue@0.2'); - - // set the titles for the plots -$Plot1->setTitle('Primary Axis'); -$Plot2->setTitle('Secondary Axis'); - -$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); -$AxisX->setTitle('Oranges'); -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setTitle('Apples', 'vertical'); -$AxisYsecondary =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY); -$AxisYsecondary->setTitle('Pears', 'vertical2'); - -// output the Graph -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/simple.php b/includes/pear/Image/docs/examples/simple.php deleted file mode 100644 index c33d25fa..00000000 --- a/includes/pear/Image/docs/examples/simple.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ - -error_reporting(E_ALL); -include 'Image/Graph.php'; -$Graph =& Image_Graph::factory('graph', array(400, 300)); -$Plotarea =& $Graph->addNew('plotarea'); -$Dataset =& Image_Graph::factory('dataset'); -$Dataset->addPoint('Denmark', 10); -$Dataset->addPoint('Norway', 3); -$Dataset->addPoint('Sweden', 8); -$Dataset->addPoint('Finland', 5); -$Plot =& $Plotarea->addNew('bar', &$Dataset); -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/docs/examples/simple_graph.php b/includes/pear/Image/docs/examples/simple_graph.php deleted file mode 100644 index b48be524..00000000 --- a/includes/pear/Image/docs/examples/simple_graph.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ - -include('Image/Graph/Simple.php'); - -$Data = array( - 'Dogs' => 3, - 'Cats' => 1, - 'Parrots' => 4, - 'Mice' => 5 -); - -// create the graph -$Graph =& Image_Graph_Simple::factory( - 400, - 300, - 'Image_Graph_Plot_Smoothed_Area', - $Data, - 'Simple Graph Example', - 'gray', - 'blue@0.2', - 'Verdana' -); - -// output the Graph -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/small_pie_plot.php b/includes/pear/Image/docs/examples/small_pie_plot.php deleted file mode 100644 index e3fc30b5..00000000 --- a/includes/pear/Image/docs/examples/small_pie_plot.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(80, 80)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); -// create the plotareas -$Plotarea =& $Graph->addNew('plotarea'); - -$Plotarea->hideAxis(); - -// create the dataset -$Dataset =& Image_Graph::factory('random', array(10, 10, 20, true)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('Image_Graph_Plot_Pie', $Dataset); - -$Plot->setDiameter(-1); -$Plotarea->setPadding(0); - -// set a line color -$Plot->setLineColor('gray'); - -// set a standard fill style -$FillArray =& Image_Graph::factory('Image_Graph_Fill_Array'); -$Plot->setFillStyle($FillArray); -$FillArray->addColor('green@0.2'); -$FillArray->addColor('blue@0.2'); -$FillArray->addColor('yellow@0.2'); -$FillArray->addColor('red@0.2'); -$FillArray->addColor('orange@0.2'); - -$Graph->done(); -?> diff --git a/includes/pear/Image/docs/examples/vector_function.php b/includes/pear/Image/docs/examples/vector_function.php deleted file mode 100644 index f2e152d4..00000000 --- a/includes/pear/Image/docs/examples/vector_function.php +++ /dev/null @@ -1,62 +0,0 @@ - - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(8); - -$Graph->setFont($Font); - - -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Vector Function Chart Sample', 12)), - Image_Graph::vertical( - // create the plotarea with a normal linear axis as x-axis! - $Plotarea = Image_Graph::factory('plotarea', 'axis'), - $Legend = Image_Graph::factory('legend'), - 90 - ), - 5 - ) -); -$Legend->setPlotarea($Plotarea); - -function tcost($t) { return $t*cos($t); } -function tsint($t) { return $t*sin($t); } - -$GridX =& $Plotarea->addNew('line_grid', null, IMAGE_GRAPH_AXIS_X); -$GridY =& $Plotarea->addNew('line_grid', null, IMAGE_GRAPH_AXIS_Y); -$LineStyle =& Image_Graph::factory('Image_Graph_Line_Dashed', array('lightgrey', 'transparent')); -$GridX->setLineStyle($LineStyle); -$GridY->setLineStyle($LineStyle); - -$Dataset =& Image_Graph::factory('vector', array(0, 20, 'tcost', 'tsint', 200)); -// create the 1st plot as smoothed area chart using the 1st dataset -$Plot =& $Plotarea->addNew('line', array(&$Dataset)); -$Plot->setLineColor('red'); -$Plot->setTitle('f(t) = { t*cos(t), t*sin(t) }'); - -$AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); -$AxisY->setAxisIntersection(0); - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/README b/includes/pear/Image/tests/README deleted file mode 100644 index 5f6b7dc0..00000000 --- a/includes/pear/Image/tests/README +++ /dev/null @@ -1,12 +0,0 @@ -------------------------------------------------------------------------------- - These tests are not unit or regression tests. -------------------------------------------------------------------------------- - -This is because it is not possible to compare output from Image_Driver with an -expected "value" (i.e. is this graph equal to this graph). The problem is similar -to testing user interfaces. - -The provided test "cases" are visual test suites that renders Image_Driver output, -the output should then be viewed and checked for inconsistencies on a visual base, -fx. this line chart does not show as _expected_, this gradient fill does not fill -to the edges of the area, the text does not align properly, etc. \ No newline at end of file diff --git a/includes/pear/Image/tests/axis/category.php b/includes/pear/Image/tests/axis/category.php deleted file mode 100644 index 71085125..00000000 --- a/includes/pear/Image/tests/axis/category.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: category.php,v 1.4 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(400, 300)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Category Axis', 10)), - $Plotarea = Image_Graph::factory('plotarea', array('Image_Graph_Axis_Category', 'Image_Graph_Axis_Category')), - 5 - ) -); - -$DS =& Image_Graph::factory('dataset'); -$DS->addPoint('Germany', 'England'); -$DS->addPoint('Denmark', 'France'); -$DS->addPoint('Sweden', 'Denmark'); -$DS->addPoint('England', 'France'); -$DS->addPoint('Norway', 'Finland'); -$DS->addPoint('Denmark', 'Finland'); -$DS->addPoint('Iceland', 'Germany'); -$DS->addPoint('Norway', 'France'); - -$DS2 =& Image_Graph::factory('dataset'); -$DS2->addPoint('Sweden', 'France'); -$DS2->addPoint('Austria', 'Germany'); -$DS2->addPoint('Norway', 'Holland'); -$DS2->addPoint('Denmark', 'Germany'); -$DS2->addPoint('Sweden', 'Holland'); -$DS2->addPoint('Iceland', 'Denmark'); - -/* Expect x-axis to be ordered: - * Germany, Denmark, Sweden, England, Austria, Norway, Iceland - * - * Expect y-axis to be ordered: - * England, France, Denmark, Finland, Holland, Germany - * - * Special points are X = Austria and Y = Holland, which are expected to be - * "placed" before Norway and Germany respective (since that is the point at - * which they exist "before" in the dataset on their first occurence) - */ - -$Plot =& $Plotarea->addNew('line', $DS); -$Plot->setLineColor('red'); - -$Plot2 =& $Plotarea->addNew('line', $DS2); -$Plot2->setLineColor('blue'); - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/axis/intersection.php b/includes/pear/Image/tests/axis/intersection.php deleted file mode 100644 index dad11805..00000000 --- a/includes/pear/Image/tests/axis/intersection.php +++ /dev/null @@ -1,82 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: intersection.php,v 1.5 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Axis Intersection', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(3, 3)), - 5 - ) -); - -$DS[0] =& Image_Graph::factory('dataset', array(array('0' => 1, '1' => 2, '2' => 0))); -$DS[1] =& Image_Graph::factory('dataset', array(array('0' => -1, '1' => 2, '2' => 2))); -$DS[2] =& Image_Graph::factory('dataset', array(array('0' => 1, '1' => 3, '2' => 2))); - -for ($row = 0; $row < 3; $row++) { - for ($col = 0; $col < 3; $col++) { - if (isset($DS[$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - $AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); - $AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); - if ($row >= 1) { - $AxisY->setAxisIntersection(1); - $AxisY->setTitle("Intersect\n at x = 1"); - } else { - $AxisY->setTitle("Intersect\nat x = min"); - } - if ($row >= 2) { - $AxisX->setAxisIntersection(1); - $AxisX->setTitle('Intersect at y = 1'); - } else { - $AxisX->setTitle('Intersect at y = 0'); - } - $Plot =& $Plotarea->addNew('line', $DS[$col]); - $Plot->setLineColor('red'); - $Plotarea->setBackgroundColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/axis/intersection_secondary_axis.php b/includes/pear/Image/tests/axis/intersection_secondary_axis.php deleted file mode 100644 index da6df6ca..00000000 --- a/includes/pear/Image/tests/axis/intersection_secondary_axis.php +++ /dev/null @@ -1,89 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: intersection_secondary_axis.php,v 1.5 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(800, 600)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Secondary Axis Intersection', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(3, 3)), - 5 - ) -); - -$DS[0] =& Image_Graph::factory('dataset', array(array('0' => 1, '1' => 2, '2' => 0))); -$DS[1] =& Image_Graph::factory('dataset', array(array('0' => -1, '1' => 2, '2' => 1))); -$DS[2] =& Image_Graph::factory('dataset', array(array('0' => 1, '1' => 3, '2' => 2))); -$DS2[0] =& Image_Graph::factory('dataset', array(array('0' => -1, '1' => 2, '2' => 1))); -$DS2[1] =& Image_Graph::factory('dataset', array(array('0' => 1, '1' => 3, '2' => 2))); -$DS2[2] =& Image_Graph::factory('dataset', array(array('0' => 1, '1' => 2, '2' => 1))); - -for ($row = 0; $row < 3; $row++) { - for ($col = 0; $col < 3; $col++) { - if (isset($DS[$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - $AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); - $AxisY->setLineColor('silver'); - - $AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); - $AxisX->setAxisIntersection(($row < 1 ? 0 : 1), IMAGE_GRAPH_AXIS_Y_SECONDARY); - $AxisX->setTitle("Intersect at\ny2=" . ($row < 1 ? '0' : '1')); - - $Plot =& $Plotarea->addNew('line', $DS2[$col]); - $Plot->setLineColor('red@0.1'); - $Plot2 =& $Plotarea->addNew('line', $DS[$col], IMAGE_GRAPH_AXIS_Y_SECONDARY); - $Plot2->setLineColor('green'); - $Plotarea->setBackgroundColor('blue@0.2'); - - $AxisYsec =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y_SECONDARY); - if ($row > 1) { - $AxisYsec->setAxisIntersection(1); - $AxisYsec->setTitle("Intersect\nat x=1"); - } else { - $AxisYsec->setTitle("Intersect\nat x=max"); - } - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/axis/inversion.php b/includes/pear/Image/tests/axis/inversion.php deleted file mode 100644 index a3d01e6a..00000000 --- a/includes/pear/Image/tests/axis/inversion.php +++ /dev/null @@ -1,89 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: inversion.php,v 1.4 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 600)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Axis Inversion', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(4, 3)), - 5 - ) -); - -$DS[0] =& Image_Graph::factory('dataset', array(array('0' => 1, '1' => 2, '2' => 0))); -$DS[1] =& Image_Graph::factory('dataset', array(array('0' => -1, '1' => 2, '2' => 2))); -$DS[2] =& Image_Graph::factory('dataset', array(array('0' => 1, '1' => 3, '2' => 2))); - -for ($row = 0; $row < 4; $row++) { - for ($col = 0; $col < 3; $col++) { - if (isset($DS[$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - $AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); - $AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); - - if ($row >= 1) { - $AxisY->setInverted(true); - $AxisY->setTitle('Inverted Y', 'vertical'); - } else { - $AxisY->setTitle('Normal Y', 'vertical'); - } - - if ($row >= 2) { - $AxisX->setInverted(true); - $AxisX->setTitle('Inverted X'); - } else { - $AxisX->setTitle('Normal X'); - } - - if ($row >= 3) { - $AxisX->setAxisIntersection('max'); - $AxisX->setTitle('Inverted X at Bottom (set X intersection)'); - } - - $Plot =& $Plotarea->addNew('line', $DS[$col]); - $Plot->setLineColor('red'); - $Plotarea->setBackgroundColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/axis/labelinterval.php b/includes/pear/Image/tests/axis/labelinterval.php deleted file mode 100644 index 542ba6b6..00000000 --- a/includes/pear/Image/tests/axis/labelinterval.php +++ /dev/null @@ -1,99 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: labelinterval.php,v 1.4 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(800, 600)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 7 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Changing Axis Label Intervals (Bar Charts also test label distance)', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(4, 4)), - 5 - ) -); - -$DS[0] =& Image_Graph::factory('dataset', array(array(0 => 1, 1 => 2, 2 => 0, 3 => 1, 4 => 4))); -$DS[1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 1, 'E' => 4))); - -$DS[2] =& Image_Graph::factory('dataset', array(array(0 => 1, 1 => 2, 2 => -2, 3 => 1, 4 => 4))); -$DS[3] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => -2, 'D' => 1, 'E' => 4))); - -for ($row = 0; $row < 4; $row++) { - for ($col = 0; $col < 4; $col++) { - if (isset($DS[$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - $AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); - $AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); - - if ($row > 2) { - $AxisX->setLabelInterval(3); - $AxisX->setTitle('"Odd" interval'); - } elseif ($row > 0) { - $AxisX->setLabelInterval(2); - $AxisX->setTitle('Changed interval'); - } else { - $AxisX->setTitle('Default interval'); - } - - if ($row > 2) { - $AxisY->setLabelInterval(0.25); - $AxisY->setTitle('Small interval', 'vertical'); - } elseif ($row > 1) { - $AxisY->setLabelInterval(2); - $AxisY->setTitle('Changed interval', 'vertical'); - } else { - $AxisY->setTitle('Default interval', 'vertical'); - } - - if ($col > 1) { - $Plot =& $Plotarea->addNew('bar', $DS[$col]); - $Plot->setLineColor('gray'); - $Plot->setFillColor('blue@0.2'); - } else { - $Plot =& $Plotarea->addNew('line', $DS[$col]); - $Plot->setLineColor('red'); - } - - $Plotarea->setBackgroundColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/axis/logarithmic.php b/includes/pear/Image/tests/axis/logarithmic.php deleted file mode 100644 index fe66c64c..00000000 --- a/includes/pear/Image/tests/axis/logarithmic.php +++ /dev/null @@ -1,84 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: logarithmic.php,v 1.4 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Logarihtmic Axis', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2, false)), - 5 - ) -); - -$Matrix->setEntry(0, 0, Image_Graph::factory('plotarea', array('axis', 'axis'))); -$Matrix->setEntry(0, 1, Image_Graph::factory('plotarea', array('axis', 'axis_log'))); -$Matrix->setEntry(1, 0, Image_Graph::factory('plotarea', array('axis_log', 'axis'))); -$Matrix->setEntry(1, 1, Image_Graph::factory('plotarea', array('axis_log', 'axis_log'))); - -function sqr($x) { return $x * $x; } - -$DS =& Image_Graph::factory('function', array(1, 10, 'sqr', 9)); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X); - if (is_a($AxisX, 'Image_Graph_Axis_Logarithmic')) { - $AxisX->setTitle('Logarithmic'); - } else { - $AxisX->setTitle('Normal'); - } - - $AxisY =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); - if (is_a($AxisY, 'Image_Graph_Axis_Logarithmic')) { - $AxisY->setTitle('Logarithmic', 'vertical'); - } else { - $AxisY->setTitle('Normal', 'vertical'); - } - - $Plot =& $Plotarea->addNew('line', $DS); - $Plot->setLineColor('red'); - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/canvas_body.php b/includes/pear/Image/tests/canvas_body.php deleted file mode 100644 index 6371a56c..00000000 --- a/includes/pear/Image/tests/canvas_body.php +++ /dev/null @@ -1,326 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: canvas_body.php,v 1.4 2005/08/16 21:27:58 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -$canvas->addText(array('x' => 5, 'y' => 5, 'text' => 'Line')); - -$canvas->setLineColor('black'); -$canvas->line(array('x0' => 100, 'x1' => 195, 'y0' => 5, 'y1' => 5)); -$canvas->setLineColor('red'); -$canvas->line(array('x0' => 200, 'x1' => 295, 'y0' => 5, 'y1' => 5)); -$canvas->setLineColor('green'); -$canvas->line(array('x0' => 300, 'x1' => 395, 'y0' => 5, 'y1' => 5)); -$canvas->setLineColor('blue'); -$canvas->line(array('x0' => 400, 'x1' => 495, 'y0' => 5, 'y1' => 5)); - -$canvas->setLineColor(array('blue', 'red')); -$canvas->line(array('x0' => 100, 'x1' => 195, 'y0' => 10, 'y1' => 10)); - -$canvas->setLineColor(array('blue', 'blue', 'transparent')); -$canvas->line(array('x0' => 200, 'x1' => 295, 'y0' => 10, 'y1' => 10)); - -$canvas->setLineColor('yellow'); -$canvas->setLineThickness(2); -$canvas->line(array('x0' => 300, 'x1' => 395, 'y0' => 10, 'y1' => 10)); - -$canvas->setLineColor('red'); -$canvas->setLineThickness(4); -$canvas->line(array('x0' => 400, 'x1' => 495, 'y0' => 10, 'y1' => 10)); - -$canvas->setLineColor('black@0.4'); -$canvas->setLineThickness(4); -$canvas->line(array('x0' => 100, 'x1' => 220, 'y0' => 15, 'y1' => 15)); -$canvas->setLineColor('red@0.4'); -$canvas->setLineThickness(4); -$canvas->line(array('x0' => 200, 'x1' => 320, 'y0' => 15, 'y1' => 15)); -$canvas->setLineColor('green@0.4'); -$canvas->setLineThickness(4); -$canvas->line(array('x0' => 300, 'x1' => 420, 'y0' => 15, 'y1' => 15)); -$canvas->setLineColor('blue@0.4'); -$canvas->setLineThickness(4); -$canvas->line(array('x0' => 400, 'x1' => 495, 'y0' => 15, 'y1' => 15)); - -$canvas->addText(array('x' => 5, 'y' => 30, 'text' => 'Rectangle')); - -$canvas->setLineColor('black'); -$canvas->rectangle(array('x0' => 100, 'x1' => 150, 'y0' => 30, 'y1' => 80)); -$canvas->setLineColor('red'); -$canvas->rectangle(array('x0' => 155, 'x1' => 205, 'y0' => 30, 'y1' => 80)); -$canvas->setLineColor('green'); -$canvas->rectangle(array('x0' => 210, 'x1' => 260, 'y0' => 30, 'y1' => 80)); -$canvas->setLineColor('blue'); -$canvas->rectangle(array('x0' => 265, 'x1' => 315, 'y0' => 30, 'y1' => 80)); - -$canvas->setFillColor('black'); -$canvas->rectangle(array('x0' => 100, 'x1' => 150, 'y0' => 85, 'y1' => 135)); -$canvas->setLineColor('black'); -$canvas->setFillColor('red'); -$canvas->rectangle(array('x0' => 155, 'x1' => 205, 'y0' => 85, 'y1' => 135)); -$canvas->setLineColor('black'); -$canvas->setFillColor('green'); -$canvas->rectangle(array('x0' => 210, 'x1' => 260, 'y0' => 85, 'y1' => 135)); -$canvas->setLineColor('black'); -$canvas->setFillColor('blue'); -$canvas->rectangle(array('x0' => 265, 'x1' => 315, 'y0' => 85, 'y1' => 135)); - -$canvas->setLineColor('red'); -$canvas->setFillColor('red@0.3'); -$canvas->rectangle(array('x0' => 340, 'x1' => 400, 'y0' => 30, 'y1' => 90)); -$canvas->setLineColor('green'); -$canvas->setFillColor('green@0.3'); -$canvas->rectangle(array('x0' => 380, 'x1' => 440, 'y0' => 50, 'y1' => 110)); -$canvas->setLineColor('blue'); -$canvas->setFillColor('blue@0.3'); -$canvas->rectangle(array('x0' => 360, 'x1' => 420, 'y0' => 70, 'y1' => 130)); - -$canvas->addText(array('x' => 90, 'y' => 140, 'text' => "Circle / Ellipse", 'alignment' => array('horizontal' => 'right'))); - -$canvas->setLineColor('black'); -$canvas->ellipse(array('x' => 130, 'y' => 170, 'rx' => 30, 'ry' => 30)); -$canvas->setLineColor('red'); -$canvas->ellipse(array('x' => 195, 'y' => 170, 'rx' => 30, 'ry' => 30)); -$canvas->setLineColor('blue'); -$canvas->ellipse(array('x' => 250, 'y' => 170, 'rx' => 30, 'ry' => 30)); -$canvas->setLineColor('green'); -$canvas->ellipse(array('x' => 305, 'y' => 170, 'rx' => 30, 'ry' => 30)); - -$canvas->setFillColor('black'); -$canvas->ellipse(array('x' => 130, 'y' => 235, 'rx' => 30, 'ry' => 30)); -$canvas->setLineColor('black'); -$canvas->setFillColor('red'); -$canvas->ellipse(array('x' => 195, 'y' => 235, 'rx' => 30, 'ry' => 30)); -$canvas->setLineColor('black'); -$canvas->setFillColor('blue'); -$canvas->ellipse(array('x' => 250, 'y' => 235, 'rx' => 30, 'ry' => 30)); -$canvas->setLineColor('black'); -$canvas->setFillColor('green'); -$canvas->ellipse(array('x' => 305, 'y' => 235, 'rx' => 30, 'ry' => 30)); - -$canvas->setLineColor('brown'); -$canvas->setFillColor('brown@0.3'); -$canvas->ellipse(array('x' => 400, 'y' => 200, 'rx' => 40, 'ry' => 40)); -$canvas->setLineColor('orange'); -$canvas->setFillColor('orange@0.3'); -$canvas->ellipse(array('x' => 430, 'y' => 220, 'rx' => 30, 'ry' => 40)); -$canvas->setLineColor('purple'); -$canvas->setFillColor('purple@0.3'); -$canvas->ellipse(array('x' => 390, 'y' => 230, 'rx' => 40, 'ry' => 20)); - -$canvas->addText(array('x' => 5, 'y' => 270, 'text' => 'Pie slices')); - -$c = 0; -for ($i = 360; $i >= 45; $i -= 30) { - $canvas->setLineColor('black'); - $canvas->setFillColor('blue@' . sprintf('%0.1f', ((360 - $i) / 360))); - $canvas->pieslice( - array( - 'x' => 130 + $c * 55, - 'y' => 295, - 'rx' => 25, - 'ry' => 25, - 'v1' => 0, - 'v2' => $i - ) - ); - $c++; -} - -$canvas->addText(array('x' => 5, 'y' => 325, 'text' => 'Polygon')); - -$canvas->setLineColor('green'); -for ($i = 0; $i < 8; $i++) { - $canvas->addVertex(array('x' => 115 + $i * 50, 'y' => 330)); - $canvas->addVertex(array('x' => 100 + $i * 50, 'y' => 325)); - $canvas->addVertex(array('x' => 125 + $i * 50, 'y' => 350)); -} -$canvas->polygon(array('connect' => false)); - -$canvas->setLineColor('purple'); -$canvas->setFillColor('purple@0.3'); -for ($i = 0; $i < 8; $i++) { - $canvas->addVertex(array('x' => 100 + $i * 50, 'y' => 355)); - $canvas->addVertex(array('x' => 125 + $i * 50, 'y' => 380 + 2 * $i)); -} -$canvas->addVertex(array('x' => 550, 'y' => 355)); -for ($i = 4; $i >= 0; $i--) { - $canvas->addVertex(array('x' => 120 + $i * 100, 'y' => 430 + $i * 5)); - $canvas->addVertex(array('x' => 110 + $i * 100, 'y' => 405 - $i * 5)); -} -$canvas->polygon(array('connect' => true)); - -$canvas->addText(array('x' => 5, 'y' => 455, 'text' => 'Splines')); - -$points = array(); -$points[] = array( - 'x' => 100, 'y' => 470, - 'p1x' => 120, 'p1y' => 455, - 'p2x' => 150, 'p2y' => 460 -); - -$points[] = array( - 'x' => 170, 'y' => 490, - 'p1x' => 190, 'p1y' => 500, - 'p2x' => 200, 'p2y' => 510 -); - -$points[] = array( - 'x' => 210, 'y' => 540, - 'p1x' => 200, 'p1y' => 550, - 'p2x' => 160, 'p2y' => 560 -); - -$points[] = array( - 'x' => 120, 'y' => 480 -); - -// draw control points! not directly a canvas test! -foreach ($points as $point) { - if (isset($last)) { - $canvas->setLineColor('gray@0.2'); - $canvas->line(array('x0' => $last['p2x'], 'y0' => $last['p2y'], 'x1' => $point['x'], 'y1' => $point['y'])); - } - - $canvas->setLineColor('red'); - $canvas->ellipse(array('x' => $point['x'], 'y' => $point['y'], 'rx' => 3, 'ry' => 3)); - - if (isset($point['p1x'])) { - $canvas->setLineColor('green'); - $canvas->ellipse(array('x' => $point['p1x'], 'y' => $point['p1y'], 'rx' => 2, 'ry' => 2)); - $canvas->setLineColor('green'); - $canvas->ellipse(array('x' => $point['p2x'], 'y' => $point['p2y'], 'rx' => 2, 'ry' => 2)); - - $canvas->setLineColor('gray@0.2'); - $canvas->line(array('x0' => $point['x'], 'y0' => $point['y'], 'x1' => $point['p1x'], 'y1' => $point['p1y'])); - $canvas->setLineColor('gray@0.2'); - $canvas->line(array('x0' => $point['p1x'], 'y0' => $point['p1y'], 'x1' => $point['p2x'], 'y1' => $point['p2y'])); - - $last = $point; - } -} - -foreach ($points as $point) { - if (isset($point['p1x'])) { - $canvas->addSpline($point); - } else { - $canvas->addVertex($point); - } -} - -$canvas->setLineColor('black'); -$canvas->polygon(array('connect' => false)); - -$points = array(); -$points[] = array( - 'x' => 220, 'y' => 470, - 'p1x' => 240, 'p1y' => 455, - 'p2x' => 270, 'p2y' => 460 -); - -$points[] = array( - 'x' => 240, 'y' => 490, - 'p1x' => 310, 'p1y' => 460, - 'p2x' => 320, 'p2y' => 470 -); - -$points[] = array( - 'x' => 330, 'y' => 500, - 'p1x' => 320, 'p1y' => 550, - 'p2x' => 280, 'p2y' => 560 -); - -$points[] = array( - 'x' => 240, 'y' => 520, - 'p1x' => 230, 'p1y' => 490, - 'p2x' => 225, 'p2y' => 490 -); - -$points[] = array( - 'x' => 220, 'y' => 470 -); - -unset($last); -// draw control points! not directly a canvas test! -foreach ($points as $point) { - if (isset($last)) { - $canvas->setLineColor('gray@0.2'); - $canvas->line(array('x0' => $last['p2x'], 'y0' => $last['p2y'], 'x1' => $point['x'], 'y1' => $point['y'])); - } - - $canvas->setLineColor('red'); - $canvas->ellipse(array('x' => $point['x'], 'y' => $point['y'], 'rx' => 3, 'ry' => 3)); - - if (isset($point['p1x'])) { - $canvas->setLineColor('green'); - $canvas->ellipse(array('x' => $point['p1x'], 'y' => $point['p1y'], 'rx' => 2, 'ry' => 2)); - $canvas->setLineColor('green'); - $canvas->ellipse(array('x' => $point['p2x'], 'y' => $point['p2y'], 'rx' => 2, 'ry' => 2)); - - $canvas->setLineColor('gray@0.2'); - $canvas->line(array('x0' => $point['x'], 'y0' => $point['y'], 'x1' => $point['p1x'], 'y1' => $point['p1y'])); - $canvas->setLineColor('gray@0.2'); - $canvas->line(array('x0' => $point['p1x'], 'y0' => $point['p1y'], 'x1' => $point['p2x'], 'y1' => $point['p2y'])); - - $last = $point; - } -} - -foreach ($points as $point) { - if (isset($point['p1x'])) { - $canvas->addSpline($point); - } else { - $canvas->addVertex($point); - } -} - -$canvas->setLineColor('black'); -$canvas->setFillColor('red@0.2'); -$canvas->polygon(array('connect' => true)); - -$canvas->addText(array('x' => 375, 'y' => 455, 'text' => 'Image')); - -$canvas->image(array('x' => 445, 'y' => 455, 'filename' => './pear-icon.png', 'url' => 'http://pear.veggerby.dk/', 'target' => '_blank')); - -$canvas->image(array('x' => 445, 'y' => 495, 'filename' => './pear-icon.png', 'width' => 20, 'height' => 20)); - -$canvas->image(array('x' => 445, 'y' => 523, 'filename' => './pear-icon.png', 'width' => 40, 'height' => 40)); - -//$canvas->show(); -$type = basename($_SERVER['SCRIPT_NAME'], '.php'); -$canvas->toHtml( - array( - 'filename' => 'test' . $type . '.' . $type, - 'urlpath' => '', - 'filepath' => './', - 'width' => '100%', - 'height' => '100%' - ) -); - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/freetype.php b/includes/pear/Image/tests/freetype.php deleted file mode 100644 index 5e8718a8..00000000 --- a/includes/pear/Image/tests/freetype.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: freetype.php,v 1.2 2005/02/21 20:49:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -// SPECIFY HERE WHERE A TRUETYPE FONT CAN BE FOUND -$testFont = 'c:/windows/fonts/Arial.ttf'; - -if (!file_exists($testFont)) { - die('The font specified cannot be found (' . $testFont .')! Please specify an existing font'); -} - -// create a true color image (requires GD2) -$image = ImageCreateTrueColor(600, 200); -ImageAlphaBlending($image, true); - -// allocate some colors -$black = ImageColorAllocate($image, 0, 0, 0); -$red = ImageColorAllocate($image, 0xff, 0, 0); -$green = ImageColorAllocate($image, 0, 0xff, 0); -$blue = ImageColorAllocate($image, 0, 0, 0xff); -$white = ImageColorAllocate($image, 0xff, 0xff, 0xff); - -// create a frame -ImageFilledRectangle($image, 0, 0, 599, 199, $white); -ImageRectangle($image, 0, 0, 599, 199, $black); - -// output some text using the specified font -$y = 20; -$text = 'Your Freetype installation with GD works'; -for ($i = 12; $i <= 20; $i++) { - $box = ImageTTFBbox($i, 0, $testFont, $text); - $x = 300 - (max($box[0], $box[2], $box[4], $box[6]) - min($box[0], $box[2], $box[4], $box[6])) / 2; - ImageTTFText($image, $i, 0, $x, $y, $black, $testFont, $text); - $y += max($box[1], $box[3], $box[5], $box[7]) - min($box[1], $box[3], $box[5], $box[7]); -} - -// output the test image -header('Content-Type: image/png'); -ImagePNG($image); - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/gd.php b/includes/pear/Image/tests/gd.php deleted file mode 100644 index f673f74c..00000000 --- a/includes/pear/Image/tests/gd.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: gd.php,v 1.2 2005/02/21 20:49:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -// create a true color image (requires GD2) -$image = ImageCreateTrueColor(400, 300); -ImageAlphaBlending($image, true); - -// allocate some colors -$black = ImageColorAllocate($image, 0, 0, 0); -$red = ImageColorAllocate($image, 0xff, 0, 0); -$green = ImageColorAllocate($image, 0, 0xff, 0); -$blue = ImageColorAllocate($image, 0, 0, 0xff); -$white = ImageColorAllocate($image, 0xff, 0xff, 0xff); - -// create a frame -ImageFilledRectangle($image, 0, 0, 399, 299, $white); -ImageRectangle($image, 0, 0, 399, 299, $black); - -// draw some lines -ImageLine($image, 200, 50, 350, 150, $red); -ImageLine($image, 200, 60, 350, 160, $green); -ImageLine($image, 200, 70, 350, 170, $blue); - -// draw some overlapping alpha blended boxes -$redAlpha = ImageColorAllocateAlpha($image, 0xff, 0, 0, 75); -$blueAlpha = ImageColorAllocateAlpha($image, 0, 0xff, 0, 75); -$greenAlpha = ImageColorAllocateAlpha($image, 0, 0, 0xff, 75); - -ImageFilledRectangle($image, 50, 50, 90, 90, $redAlpha); -ImageFilledRectangle($image, 60, 80, 100, 120, $greenAlpha); -ImageFilledRectangle($image, 80, 60, 120, 100, $blueAlpha); - -// write some _default_ text -for ($font = 1; $font <= 5; $font++) { - ImageString($image, $font, 50, 150 + $font * 20, 'Testing GD output', $black); -} - -ImageString($image, 3, 51, 21, 'Congratulations! The GD2 installation works', $black); -ImageString($image, 3, 50, 20, 'Congratulations! The GD2 installation works', $red); - -// output the test image -header('Content-Type: image/png'); -ImagePNG($image); - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/gradients.php b/includes/pear/Image/tests/gradients.php deleted file mode 100644 index a3187cc1..00000000 --- a/includes/pear/Image/tests/gradients.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: gradients.php,v 1.2 2005/08/03 21:17:48 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -require_once 'Image/Canvas.php'; - -$canvas =& Image_Canvas::factory( - 'png', - array('width' => 605, 'height' => 350) -); - -$gradient = array( - 'type' => 'gradient', - 'start' => 'yellow', - 'end' => 'maroon' -); - -$directions = array('horizontal', 'vertical', 'horizontal_mirror', 'vertical_mirror', 'diagonal_tl_br', 'diagonal_bl_tr', 'radial'); - -$space = 10; -$size = 75; - -$canvas->setLineColor('black'); -$canvas->rectangle(array('x0' => 0, 'y0' => 0, 'x1' => $canvas->getWidth() - 1, 'y1' => $canvas->getHeight() - 1)); - -$i = 0; -foreach ($directions as $direction) { - $gradient['direction'] = $direction; - - $x = $space + ($i * ($size + $space)); - - $y = $space; - $canvas->setGradientFill($gradient); - $canvas->rectangle(array('x0' => $x, 'y0' => $y, 'x1' => $x + $size, 'y1' => $y + $size)); - - $y += $size + $space; - $canvas->setGradientFill($gradient); - $canvas->ellipse(array('x' => $x + $size / 2, 'y' => $y + $size / 2, 'rx' => $size / 2, 'ry' => $size / 2)); - - $y += $size + $space; - $canvas->setGradientFill($gradient); - $canvas->pieslice(array('x' => $x + $size / 2, 'y' => $y + $size / 2, 'rx' => $size / 2, 'ry' => $size / 2, 'v1' => 45, 'v2' => 270)); - - $y += $size + $space; - $points = array(); - $points[] = array('x' => $x + $size / 3, 'y' => $y); - $points[] = array('x' => $x + $size, 'y' => $y + $size / 2); - $points[] = array('x' => $x + $size / 3, 'y' => $y + 3 * $size / 4); - $points[] = array('x' => $x + $size / 5, 'y' => $y + $size); - $points[] = array('x' => $x, 'y' => $y + $size / 3); - $y += $size + $space; - $canvas->setGradientFill($gradient); - foreach ($points as $point) { - $canvas->addVertex($point); - } - $canvas->polygon(array('connect' => true)); - $i++; -} - -$canvas->show(); - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/imagemap.php b/includes/pear/Image/tests/imagemap.php deleted file mode 100644 index 31d81f77..00000000 --- a/includes/pear/Image/tests/imagemap.php +++ /dev/null @@ -1,180 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: imagemap.php,v 1.4 2005/08/10 20:01:05 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -require_once 'Image/Canvas.php'; - -$canvas =& Image_Canvas::factory( - 'png', - array('width' => 800, 'height' => 500, 'usemap' => true, 'antialias' => 'native') -); - -$canvas->setLineColor('black'); -$canvas->rectangle(array('x0' => 0, 'y0' => 0, 'x1' => $canvas->getWidth() - 1, 'y1' => $canvas->getHeight() - 1)); - - -$canvas->setLineColor('gray'); -$canvas->line( - array( - 'x0' => 450, - 'y0' => 50, - 'x1' => 550, - 'y1' => 100, - 'url' => 'http://pear.veggerby.dk/', - 'target' => '_blank', - 'alt' => 'Line', - 'mapsize' => 5 - ) -); - -$canvas->setLineColor('gray'); -$canvas->line( - array( - 'x0' => 600, - 'y0' => 125, - 'x1' => 700, - 'y1' => 50, - 'url' => 'http://pear.veggerby.dk/', - 'target' => '_blank', - 'alt' => 'Line', - 'mapsize' => 5 - ) -); - -$canvas->setLineColor('blue'); -$canvas->rectangle( - array( - 'x0' => 50, - 'y0' => 50, - 'x1' => 350, - 'y1' => 100, - 'url' => 'http://pear.veggerby.dk/', - 'target' => '_blank', - 'alt' => 'Rectangle' - ) -); - -$canvas->setLineColor('red'); -$canvas->ellipse( - array( - 'x' => 200, - 'y' => 200, - 'rx' => 75, - 'ry' => 75, - 'url' => 'http://pear.php.net/Image_Graph/', - 'alt' => 'Circle' - ) -); - -$canvas->setLineColor('brown'); -$canvas->ellipse( - array( - 'x' => 500, - 'y' => 200, - 'rx' => 100, - 'ry' => 75, - 'url' => 'http://pear.php.net/Image_Graph/', - 'alt' => 'Ellipse' - ) -); - -$canvas->setLineColor('green'); -for ($i = 0; $i < 8; $i++) { - $canvas->addVertex(array('x' => 115 + $i * 50, 'y' => 330, 'alt' => 'Vertex #' . $i * 3, 'url' => 'test?id=' . $i * 3)); - $canvas->addVertex(array('x' => 100 + $i * 50, 'y' => 325, 'alt' => 'Vertex #' . ($i * 3 + 1), 'url' => 'test?id=' . ($i * 3 + 1))); - $canvas->addVertex(array('x' => 125 + $i * 50, 'y' => 350, 'alt' => 'Vertex #' . ($i * 3 + 2), 'url' => 'test?id=' . ($i * 3 + 2))); -} -$canvas->polygon( - array( - 'connect' => false, - 'url' => 'http://php.net/', - 'alt' => 'Open polygon', - 'map_vertices' => true - ) -); - -$canvas->setLineColor('purple'); -for ($i = 0; $i < 8; $i++) { - $canvas->addVertex(array('x' => 100 + $i * 50, 'y' => 355)); - $canvas->addVertex(array('x' => 125 + $i * 50, 'y' => 380 + 2 * $i)); -} -$canvas->addVertex(array('x' => 550, 'y' => 355)); -for ($i = 4; $i >= 0; $i--) { - $canvas->addVertex(array('x' => 120 + $i * 100, 'y' => 430 + $i * 5)); - $canvas->addVertex(array('x' => 110 + $i * 100, 'y' => 405 - $i * 5)); -} -$canvas->polygon( - array( - 'connect' => true, - 'url' => 'http://pear.php.net/', - 'alt' => 'Closed polygon' - ) -); - -$canvas->setLineColor('orange'); -$canvas->pieslice( - array( - 'x' => 600, - 'y' => 400, - 'rx' => 50, - 'ry' => 50, - 'v1' => 10, - 'v2' => 350, - 'url' => 'http://www.dr.dk/', - 'alt' => 'Pieslice' - ) -); - -$canvas->setLineColor('silver'); -$canvas->pieslice( - array( - 'x' => 700, - 'y' => 300, - 'rx' => 100, - 'ry' => 50, - 'v1' => 45, - 'v2' => 275, - 'srx' => 25, - 'sry' => 10, - 'url' => 'http://www.dr.dk/', - 'alt' => 'Donut slice', - 'htmltags' => array( - 'onMouseOver' => 'alert("Hello, World!");' - ) - ) -); - -print $canvas->toHtml( - array( - 'filename' => 'imagemap.png', - 'filepath' => './', - 'urlpath' => '' - ) -); - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/jpg.php b/includes/pear/Image/tests/jpg.php deleted file mode 100644 index 05994d11..00000000 --- a/includes/pear/Image/tests/jpg.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: jpg.php,v 1.2 2005/08/03 21:17:48 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -// SPECIFY HERE WHERE A TRUETYPE FONT CAN BE FOUND -$testFont = 'c:/windows/fonts/Arial.ttf'; - -require_once 'Image/Canvas.php'; - -$canvas =& Image_Canvas::factory('jpg', array('width' => 600, 'height' => 600, 'quality' => 90)); - -require_once './canvas_body.php'; - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/lineends.php b/includes/pear/Image/tests/lineends.php deleted file mode 100644 index d21ff797..00000000 --- a/includes/pear/Image/tests/lineends.php +++ /dev/null @@ -1,85 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: lineends.php,v 1.3 2005/08/04 19:24:39 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -require_once 'Image/Canvas.php'; - -$font = array('name' => 'Verdana', 'size' => 10); - -$canvas =& Image_Canvas::factory( - 'png', - array('width' => 300, 'height' => 300) -); - -$shapes = array('arrow', 'box', 'diamond', 'arrow2', 'lollipop', 'line'); - -$j = 0; -for ($i = 0; $i < 360; $i += 30) { - $x0 = 150; - $y0 = 150; - if ($j >= count($shapes)) { - $j = 0; - } - $shape1 = $shapes[$j]; $j++; - - if ($j >= count($shapes)) { - $j = 0; - } - $shape2 = $shapes[$j]; $j++; - - $canvas->setLineColor('black'); - $canvas->line( - array( - 'x0' => $x0 + cos(deg2rad($i)) * 50, - 'y0' => $y0 - sin(deg2rad($i)) * 50, - 'x1' => $x0 + cos(deg2rad($i)) * 100, - 'y1' => $y0 - sin(deg2rad($i)) * 100, - 'end0' => $shape1, - 'size0' => 8, - 'color0' => 'red', - 'end1' => $shape2, - 'color1' => 'green', - 'size1' => 8 - ) - ); - $canvas->setFont($font); - $canvas->addText( - array( - 'x' => $x0 + cos(deg2rad($i)) * 125, - 'y' => $y0 - sin(deg2rad($i)) * 125, - 'text' => $i, - 'alignment' => array( - 'horizontal' => ((($i > 90) && ($i < 270)) ? 'right' : ((($i == 90) || ($i == 270)) ? 'center' : 'left')), - 'vertical' => (($i < 180) ? 'bottom' : ((($i == 0) || ($i == 180)) ? 'center' : 'top')), - ) - ) - ); -} -$canvas->show(); - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/pdf.php b/includes/pear/Image/tests/pdf.php deleted file mode 100644 index efc503e3..00000000 --- a/includes/pear/Image/tests/pdf.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: pdf.php,v 1.2 2005/08/03 21:17:48 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -// SPECIFY HERE WHERE A TRUETYPE FONT CAN BE FOUND -$testFont = 'c:/windows/fonts/Arial.ttf'; - -require_once 'Image/Canvas.php'; - -$canvas =& Image_Canvas::factory('pdf', array('page' => 'A4', 'align' => 'center', 'width' => 600, 'height' => 600)); - -require_once './canvas_body.php'; - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/pear-icon.png b/includes/pear/Image/tests/pear-icon.png deleted file mode 100644 index 26118f11..00000000 Binary files a/includes/pear/Image/tests/pear-icon.png and /dev/null differ diff --git a/includes/pear/Image/tests/plot/area.php b/includes/pear/Image/tests/plot/area.php deleted file mode 100644 index b7669f52..00000000 --- a/includes/pear/Image/tests/plot/area.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: area.php,v 1.5 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Area Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2)), - 5 - ) -); - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('area', $DS[$row][$col]); - $Plot->setLineColor('gray'); - $Plot->setFillColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/bar.php b/includes/pear/Image/tests/plot/bar.php deleted file mode 100644 index 7cec368c..00000000 --- a/includes/pear/Image/tests/plot/bar.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: bar.php,v 1.5 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Area Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2)), - 5 - ) -); - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('bar', $DS[$row][$col]); - $Plot->setLineColor('gray'); - $Plot->setFillColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/horizontal/area.php b/includes/pear/Image/tests/plot/horizontal/area.php deleted file mode 100644 index c68d37a9..00000000 --- a/includes/pear/Image/tests/plot/horizontal/area.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: area.php,v 1.1 2005/08/27 17:27:32 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Area Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2, false)), - 5 - ) -); - -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 2; $j++) { - $Matrix->setEntry( - $i, - $j, - Image_Graph::factory( - 'plotarea', - array('Image_Graph_Axis_Category', 'axis', 'horizontal') - ) - ); - } -} - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('area', $DS[$row][$col]); - $Plot->setLineColor('gray'); - $Plot->setFillColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/horizontal/bar.php b/includes/pear/Image/tests/plot/horizontal/bar.php deleted file mode 100644 index 83e12583..00000000 --- a/includes/pear/Image/tests/plot/horizontal/bar.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: bar.php,v 1.1 2005/08/27 17:27:32 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Area Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2, false)), - 5 - ) -); - -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 2; $j++) { - $Matrix->setEntry( - $i, - $j, - Image_Graph::factory( - 'plotarea', - array('Image_Graph_Axis_Category', 'axis', 'horizontal') - ) - ); - } -} - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('bar', $DS[$row][$col]); - $Plot->setLineColor('gray'); - $Plot->setFillColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/horizontal/impulse.php b/includes/pear/Image/tests/plot/horizontal/impulse.php deleted file mode 100644 index e8d8331c..00000000 --- a/includes/pear/Image/tests/plot/horizontal/impulse.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: impulse.php,v 1.1 2005/08/27 17:27:32 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Area Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2, false)), - 5 - ) -); - -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 2; $j++) { - $Matrix->setEntry( - $i, - $j, - Image_Graph::factory( - 'plotarea', - array('Image_Graph_Axis_Category', 'axis', 'horizontal') - ) - ); - } -} - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('impulse', $DS[$row][$col]); - $Plot->setLineColor('red'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/horizontal/line.php b/includes/pear/Image/tests/plot/horizontal/line.php deleted file mode 100644 index 84e5a3cf..00000000 --- a/includes/pear/Image/tests/plot/horizontal/line.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: line.php,v 1.1 2005/08/27 17:27:32 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Line Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2, false)), - 5 - ) -); - -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 2; $j++) { - $Matrix->setEntry( - $i, - $j, - Image_Graph::factory( - 'plotarea', - array('Image_Graph_Axis_Category', 'axis', 'horizontal') - ) - ); - } -} - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('line', $DS[$row][$col]); - $Plot->setLineColor('red'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/horizontal/step.php b/includes/pear/Image/tests/plot/horizontal/step.php deleted file mode 100644 index 8c817ce9..00000000 --- a/includes/pear/Image/tests/plot/horizontal/step.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: step.php,v 1.1 2005/08/27 17:27:32 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Area Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2, false)), - 5 - ) -); - -for ($i = 0; $i < 2; $i++) { - for ($j = 0; $j < 2; $j++) { - $Matrix->setEntry( - $i, - $j, - Image_Graph::factory( - 'plotarea', - array('Image_Graph_Axis_Category', 'axis', 'horizontal') - ) - ); - } -} - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('step', $DS[$row][$col]); - $Plot->setLineColor('gray'); - $Plot->setFillColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/impulse.php b/includes/pear/Image/tests/plot/impulse.php deleted file mode 100644 index f456ba71..00000000 --- a/includes/pear/Image/tests/plot/impulse.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: impulse.php,v 1.5 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Area Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2)), - 5 - ) -); - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('impulse', $DS[$row][$col]); - $Plot->setLineColor('red'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/line.php b/includes/pear/Image/tests/plot/line.php deleted file mode 100644 index 0a857f24..00000000 --- a/includes/pear/Image/tests/plot/line.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: line.php,v 1.5 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Line Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2)), - 5 - ) -); - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('line', $DS[$row][$col]); - $Plot->setLineColor('red'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/plot/step.php b/includes/pear/Image/tests/plot/step.php deleted file mode 100644 index fa9c21a3..00000000 --- a/includes/pear/Image/tests/plot/step.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: step.php,v 1.5 2005/08/03 21:21:58 nosey Exp $ - * @link http://pear.php.net/package/Image_Graph - */ - -require_once 'Image/Graph.php'; - -// create the graph -$Graph =& Image_Graph::factory('graph', array(600, 400)); -// add a TrueType font -$Font =& $Graph->addNew('ttf_font', 'Verdana'); -// set the font size to 11 pixels -$Font->setSize(7); - -$Graph->setFont($Font); - -// create the plotarea -$Graph->add( - Image_Graph::vertical( - Image_Graph::factory('title', array('Testing Area Plots', 10)), - $Matrix = Image_Graph::factory('Image_Graph_Layout_Matrix', array(2, 2)), - 5 - ) -); - -$DS[0][0] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => 2, 'C' => 0, 'D' => 4, 'E' => 3))); -$DS[0][1] =& Image_Graph::factory('dataset', array(array('A' => 1, 'B' => -2, 'C' => 1, 'D' => 3, 'E' => -1))); -$DS[1][0] =& Image_Graph::factory('dataset', array(array('A' => 2, 'B' => 3, 'C' => 1, 'D' => 4, 'E' => 2))); -$DS[1][1] =& Image_Graph::factory('dataset', array(array('A' => -1, 'B' => -3, 'C' => -2, 'D' => -4, 'E' => -1))); - -for ($row = 0; $row < 2; $row++) { - for ($col = 0; $col < 2; $col++) { - if (isset($DS[$row][$col])) { - $Plotarea =& $Matrix->getEntry($row, $col); - - $Plot =& $Plotarea->addNew('step', $DS[$row][$col]); - $Plot->setLineColor('gray'); - $Plot->setFillColor('blue@0.2'); - } - } -} - -$Graph->done(); -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/png.php b/includes/pear/Image/tests/png.php deleted file mode 100644 index 899a7125..00000000 --- a/includes/pear/Image/tests/png.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: png.php,v 1.2 2005/08/03 21:17:48 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -// SPECIFY HERE WHERE A TRUETYPE FONT CAN BE FOUND -$testFont = 'c:/windows/fonts/Arial.ttf'; - -require_once 'Image/Canvas.php'; - -$canvas =& Image_Canvas::factory('png', array('width' => 600, 'height' => 600)); - -require_once './canvas_body.php'; - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/svg.php b/includes/pear/Image/tests/svg.php deleted file mode 100644 index cc8a4b0e..00000000 --- a/includes/pear/Image/tests/svg.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: svg.php,v 1.2 2005/08/03 21:17:48 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -// SPECIFY HERE WHERE A TRUETYPE FONT CAN BE FOUND -$testFont = 'c:/windows/fonts/Arial.ttf'; - -require_once 'Image/Canvas.php'; - -$canvas =& Image_Canvas::factory('svg', array('width' => 600, 'height' => 600)); - -require_once './canvas_body.php'; - -?> \ No newline at end of file diff --git a/includes/pear/Image/tests/text.php b/includes/pear/Image/tests/text.php deleted file mode 100644 index b43f6707..00000000 --- a/includes/pear/Image/tests/text.php +++ /dev/null @@ -1,109 +0,0 @@ - - * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen - * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: text.php,v 1.2 2005/08/03 21:17:48 nosey Exp $ - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=212 - */ - -require_once 'Image/Canvas.php'; - -$canvas =& Image_Canvas::factory( - 'png', - array('width' => 300, 'height' => 200) -); - -$canvas->setLineColor('black'); -$canvas->rectangle(array('x0' => 0, 'y0' => 0, 'x1' => $canvas->getWidth() - 1, 'y1' => $canvas->getHeight() - 1)); - -$canvas->setLineColor('lightgrey@0.3'); -$canvas->rectangle(array('x0' => 10, 'y0' => 10, 'x1' => 290, 'y1' => 190)); -$canvas->setLineColor('lightgrey@0.3'); -$canvas->line(array('x0' => 10, 'y0' => 100, 'x1' => 290, 'y1' => 100)); -$canvas->setLineColor('lightgrey@0.3'); -$canvas->rectangle(array('x0' => 150, 'y0' => 10, 'x1' => 150, 'y1' => 190)); - -$font = array('name' => 'Verdana', 'size' => 10); - -$align = array( - array( - array('horizontal' => 'left', 'vertical' => 'top'), - array('horizontal' => 'center', 'vertical' => 'top'), - array('horizontal' => 'right', 'vertical' => 'top') - ), - array( - array('horizontal' => 'left', 'vertical' => 'center'), - array('horizontal' => 'center', 'vertical' => 'center'), - array('horizontal' => 'right', 'vertical' => 'center') - ), - array( - array('horizontal' => 'left', 'vertical' => 'bottom'), - array('horizontal' => 'center', 'vertical' => 'bottom'), - array('horizontal' => 'right', 'vertical' => 'bottom') - ) -); - -for ($row = 0; $row < 3; $row++) { - for ($col = 0; $col < 3; $col++) { - $x = 10 + $col * 140; - $y = 10 + $row * 90; - - switch ($row) { - case 0: - $text = 'Top'; - break; - case 1: - $text = 'Center'; - break; - case 2: - $text = 'Bottom'; - break; - } - switch ($col) { - case 0: - $text .= "\n" . 'Left'; - break; - case 1: - if ($row !== 1) { - $text .= "\n" . 'Center'; - } - break; - case 2: - $text .= "\n" . 'Right'; - break; - } - - $canvas->setLineColor('red'); - $canvas->line(array('x0' => $x - 5, 'y0' => $y, 'x1' => $x + 5, 'y1' => $y)); - $canvas->setLineColor('red'); - $canvas->line(array('x0' => $x, 'y0' => $y - 5, 'x1' => $x, 'y1' => $y + 5)); - - $canvas->setFont($font); - $canvas->addText(array('x' => $x, 'y' => $y, 'text' => $text, 'alignment' => $align[$row][$col])); - } -} - -$canvas->show(); - -?> \ No newline at end of file diff --git a/includes/pear/OS/Guess.php b/includes/pear/OS/Guess.php index 47411406..d266e701 100644 --- a/includes/pear/OS/Guess.php +++ b/includes/pear/OS/Guess.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Gregory Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Guess.php,v 1.20 2005/10/26 19:33:03 cellog Exp $ + * @version CVS: $Id: Guess.php,v 1.26 2008/01/03 20:26:34 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since PEAR 0.1 */ @@ -91,9 +91,9 @@ * @package PEAR * @author Stig Bakken * @author Gregory Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -201,11 +201,14 @@ class OS_Guess if ($glibc !== false) { return $glibc; // no need to run this multiple times } + $major = $minor = 0; include_once "System.php"; - if (!file_exists('/usr/bin/cpp') || !is_executable('/usr/bin/cpp')) { - // Use glibc's header file to - // get major and minor version number: - if ($features_file = @fopen('/usr/include/features.h', 'rb') ) { + // Use glibc's header file to + // get major and minor version number: + if (@file_exists('/usr/include/features.h') && + @is_readable('/usr/include/features.h')) { + if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) { + $features_file = fopen('/usr/include/features.h', 'rb'); while (!feof($features_file)) { $line = fgets($features_file, 8192); if (!$line || (strpos($line, '#define') === false)) { @@ -236,29 +239,27 @@ class OS_Guess return $glibc = ''; } return $glibc = 'glibc' . trim($glibc_major) . "." . trim($glibc_minor) ; + } // no cpp + $tmpfile = System::mktemp("glibctest"); + $fp = fopen($tmpfile, "w"); + fwrite($fp, "#include \n__GLIBC__ __GLIBC_MINOR__\n"); + fclose($fp); + $cpp = popen("/usr/bin/cpp $tmpfile", "r"); + while ($line = fgets($cpp, 1024)) { + if ($line{0} == '#' || trim($line) == '') { + continue; + } + if (list($major, $minor) = explode(' ', trim($line))) { + break; + } } - return $glibc = ''; - } - $tmpfile = System::mktemp("glibctest"); - $fp = fopen($tmpfile, "w"); - fwrite($fp, "#include \n__GLIBC__ __GLIBC_MINOR__\n"); - fclose($fp); - $cpp = popen("/usr/bin/cpp $tmpfile", "r"); - $major = $minor = 0; - while ($line = fgets($cpp, 1024)) { - if ($line{0} == '#' || trim($line) == '') { - continue; - } - if (list($major, $minor) = explode(' ', trim($line))) { - break; - } - } - pclose($cpp); - unlink($tmpfile); - if (!($major && $minor) && is_link('/lib/libc.so.6')) { + pclose($cpp); + unlink($tmpfile); + } // features.h + if (!($major && $minor) && @is_link('/lib/libc.so.6')) { // Let's try reading the libc.so.6 symlink - if (ereg('^libc-([.*])\.so$', basename(readlink('/lib/libc.so.6')), $matches)) { - list($major, $minor) = explode('.', $matches); + if (ereg('^libc-(.*)\.so$', basename(readlink('/lib/libc.so.6')), $matches)) { + list($major, $minor) = explode('.', $matches[1]); } } if (!($major && $minor)) { diff --git a/includes/pear/PEAR.php b/includes/pear/PEAR.php index ed7c8c55..4c24c600 100644 --- a/includes/pear/PEAR.php +++ b/includes/pear/PEAR.php @@ -18,9 +18,9 @@ * @author Stig Bakken * @author Tomas V.V.Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PEAR.php,v 1.96 2005/09/21 00:12:35 cellog Exp $ + * @version CVS: $Id: PEAR.php,v 1.104 2008/01/03 20:26:34 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -91,9 +91,9 @@ $GLOBALS['_PEAR_error_handler_stack'] = array(); * @author Stig Bakken * @author Tomas V.V. Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @see PEAR_Error * @since Class available since PHP 4.0.2 @@ -230,6 +230,12 @@ class PEAR function &getStaticProperty($class, $var) { static $properties; + if (!isset($properties[$class])) { + $properties[$class] = array(); + } + if (!array_key_exists($var, $properties[$class])) { + $properties[$class][$var] = null; + } return $properties[$class][$var]; } @@ -247,6 +253,12 @@ class PEAR */ function registerShutdownFunc($func, $args = array()) { + // if we are called statically, there is a potential + // that no shutdown func is registered. Bug #6445 + if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { + register_shutdown_function("_PEAR_call_destructors"); + $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; + } $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args); } @@ -553,13 +565,17 @@ class PEAR } else { $ec = 'PEAR_Error'; } - if ($skipmsg) { - $a = &new $ec($code, $mode, $options, $userinfo); - return $a; - } else { - $a = &new $ec($message, $code, $mode, $options, $userinfo); + if (intval(PHP_VERSION) < 5) { + // little non-eval hack to fix bug #12147 + include 'PEAR/FixPHP5PEARWarnings.php'; return $a; } + if ($skipmsg) { + $a = new $ec($code, $mode, $options, $userinfo); + } else { + $a = new $ec($message, $code, $mode, $options, $userinfo); + } + return $a; } // }}} @@ -761,7 +777,7 @@ function _PEAR_call_destructors() sizeof($_PEAR_destructor_object_list)) { reset($_PEAR_destructor_object_list); - if (@PEAR::getStaticProperty('PEAR', 'destructlifo')) { + if (PEAR::getStaticProperty('PEAR', 'destructlifo')) { $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list); } while (list($k, $objref) = each($_PEAR_destructor_object_list)) { @@ -800,9 +816,9 @@ function _PEAR_call_destructors() * @author Stig Bakken * @author Tomas V.V. Cox * @author Gregory Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/manual/en/core.pear.pear-error.php * @see PEAR::raiseError(), PEAR::throwError() * @since Class available since PHP 4.0.2 @@ -852,9 +868,10 @@ class PEAR_Error $this->code = $code; $this->mode = $mode; $this->userinfo = $userinfo; - if (function_exists("debug_backtrace")) { - if (@!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { - $this->backtrace = debug_backtrace(); + if (!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { + $this->backtrace = debug_backtrace(); + if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) { + unset($this->backtrace[0]['object']); } } if ($mode & PEAR_ERROR_CALLBACK) { @@ -1033,6 +1050,12 @@ class PEAR_Error } } + // }}} + // {{{ toString() + function __toString() + { + return $this->getMessage(); + } // }}} // {{{ toString() diff --git a/includes/pear/PEAR/Autoloader.php b/includes/pear/PEAR/Autoloader.php index d79545d3..07c4de10 100644 --- a/includes/pear/PEAR/Autoloader.php +++ b/includes/pear/PEAR/Autoloader.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Stig Bakken - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Autoloader.php,v 1.12 2005/03/21 00:51:26 cellog Exp $ + * @version CVS: $Id: Autoloader.php,v 1.14 2008/01/03 20:26:34 cellog Exp $ * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader * @since File available since Release 0.1 * @deprecated File deprecated in Release 1.4.0a1 @@ -48,9 +48,9 @@ require_once "PEAR.php"; * @category pear * @package PEAR * @author Stig Bakken - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader * @since File available since Release 0.1 * @deprecated File deprecated in Release 1.4.0a1 diff --git a/includes/pear/PEAR/Builder.php b/includes/pear/PEAR/Builder.php index dda183f5..f7986c00 100644 --- a/includes/pear/PEAR/Builder.php +++ b/includes/pear/PEAR/Builder.php @@ -14,11 +14,14 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Builder.php,v 1.26 2005/09/27 03:34:01 cellog Exp $ + * @version CVS: $Id: Builder.php,v 1.34 2008/05/12 23:43:21 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 + * + * TODO: log output parameters in PECL command line + * TODO: msdev path in configuration */ /** @@ -33,9 +36,9 @@ require_once 'PEAR/PackageFile.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since PHP 4.0.2 * @see http://pear.php.net/manual/en/core.ppm.pear-builder.php @@ -50,6 +53,10 @@ class PEAR_Builder extends PEAR_Common var $extensions_built = array(); + /** + * @var string Used for reporting when it is not possible to pass function + * via extra parameter, e.g. log, msdevCallback + */ var $current_callback = null; // used for msdev builds @@ -83,6 +90,7 @@ class PEAR_Builder extends PEAR_Common { if (is_object($descfile)) { $pkg = $descfile; + $descfile = $pkg->getPackageFile(); } else { $pf = &new PEAR_PackageFile($this->config, $this->debug); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); @@ -90,22 +98,31 @@ class PEAR_Builder extends PEAR_Common return $pkg; } } - $dir = dirname($pkg->getArchiveFile()); + $dir = dirname($descfile); $old_cwd = getcwd(); - if (!@chdir($dir)) { + if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { return $this->raiseError("could not chdir to $dir"); } + // packages that were in a .tar have the packagefile in this directory + $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); + if (file_exists($dir) && is_dir($vdir)) { + if (chdir($vdir)) { + $dir = getcwd(); + } else { + return $this->raiseError("could not chdir to " . realpath($vdir)); + } + } + $this->log(2, "building in $dir"); $dsp = $pkg->getPackage().'.dsp'; - if (!@is_file("$dir/$dsp")) { + if (!file_exists("$dir/$dsp")) { return $this->raiseError("The DSP $dsp does not exist."); } // XXX TODO: make release build type configurable - $command = 'msdev '.$dsp.' /MAKE "'.$info['package']. ' - Release"'; + $command = 'msdev '.$dsp.' /MAKE "'.$pkg->getPackage(). ' - Release"'; - $this->current_callback = $callback; $err = $this->_runCommand($command, array(&$this, 'msdevCallback')); if (PEAR::isError($err)) { return $err; @@ -147,7 +164,8 @@ class PEAR_Builder extends PEAR_Common } else { return $this->raiseError("Could not retrieve output information from $dsp."); } - if (@copy($outfile, "$dir/$out")) { + // realpath returns false if the file doesn't exist + if ($outfile && copy($outfile, "$dir/$out")) { $outfile = "$dir/$out"; } @@ -168,6 +186,7 @@ class PEAR_Builder extends PEAR_Common if (!$this->_firstline) $this->_firstline = $data; $this->_lastline = $data; + call_user_func($this->current_callback, $what, $data); } // }}} @@ -241,6 +260,7 @@ class PEAR_Builder extends PEAR_Common */ function build($descfile, $callback = null) { + $this->current_callback = $callback; if (PEAR_OS == "Windows") { return $this->_build_win32($descfile,$callback); } @@ -250,16 +270,23 @@ class PEAR_Builder extends PEAR_Common if (is_object($descfile)) { $pkg = $descfile; $descfile = $pkg->getPackageFile(); + if (is_a($pkg, 'PEAR_PackageFile_v1')) { + $dir = dirname($descfile); + } else { + $dir = $pkg->_config->get('temp_dir') . '/' . $pkg->getName(); + // automatically delete at session end + $this->addTempFile($dir); + } } else { $pf = &new PEAR_PackageFile($this->config); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); if (PEAR::isError($pkg)) { return $pkg; } + $dir = dirname($descfile); } - $dir = dirname($descfile); $old_cwd = getcwd(); - if (!@chdir($dir)) { + if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { return $this->raiseError("could not chdir to $dir"); } $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); @@ -268,7 +295,6 @@ class PEAR_Builder extends PEAR_Common } $dir = getcwd(); $this->log(2, "building in $dir"); - $this->current_callback = $callback; putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH')); $err = $this->_runCommand("phpize", array(&$this, 'phpizeCallback')); if (PEAR::isError($err)) { @@ -283,10 +309,11 @@ class PEAR_Builder extends PEAR_Common $configure_options = $pkg->getConfigureOptions(); if ($configure_options) { foreach ($configure_options as $o) { + $default = array_key_exists('default', $o) ? $o['default'] : null; list($r) = $this->ui->userDialog('build', array($o['prompt']), array('text'), - array(@$o['default'])); + array($default)); if (substr($o['name'], 0, 5) == 'with-' && ($r == 'yes' || $r == 'autodetect')) { $configure_command .= " --$o[name]"; @@ -326,12 +353,12 @@ class PEAR_Builder extends PEAR_Common $configure_command, $make_command, "$make_command INSTALL_ROOT=\"$inst_dir\" install", - "find \"$inst_dir\" -ls" + "find \"$inst_dir\" | xargs ls -dils" ); - if (!@chdir($build_dir)) { + if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) { return $this->raiseError("could not chdir to $build_dir"); } - putenv('PHP_PEAR_VERSION=1.4.5'); + putenv('PHP_PEAR_VERSION=1.7.2'); foreach ($to_run as $cmd) { $err = $this->_runCommand($cmd, $callback); if (PEAR::isError($err)) { @@ -412,7 +439,7 @@ class PEAR_Builder extends PEAR_Common function _runCommand($command, $callback = null) { $this->log(1, "running: $command"); - $pp = @popen("$command 2>&1", "r"); + $pp = popen("$command 2>&1", "r"); if (!$pp) { return $this->raiseError("failed to run `$command'"); } @@ -431,7 +458,11 @@ class PEAR_Builder extends PEAR_Common if ($callback && isset($olddbg)) { $callback[0]->debug = $olddbg; } - $exitcode = @pclose($pp); + if (is_resource($pp)) { + $exitcode = pclose($pp); + } else { + $exitcode = -1; + } return ($exitcode == 0); } diff --git a/includes/pear/PEAR/ChannelFile.php b/includes/pear/PEAR/ChannelFile.php index 86bcc3d4..46dd691b 100644 --- a/includes/pear/PEAR/ChannelFile.php +++ b/includes/pear/PEAR/ChannelFile.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ChannelFile.php,v 1.73 2005/08/21 05:01:37 cellog Exp $ + * @version CVS: $Id: ChannelFile.php,v 1.80 2008/01/03 20:26:34 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -150,9 +150,9 @@ $GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server'); * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -284,7 +284,7 @@ class PEAR_ChannelFile { if ($result !== true) { if ($result->getCode() == 1) { $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_XML_EXT, 'error', - array('error' => $error)); + array('error' => $result->getMessage())); } else { $this->_stack->push(PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER, 'error'); } @@ -324,6 +324,20 @@ class PEAR_ChannelFile { } return $a; } + + /** + * Unlike {@link fromArray()} this does not do any validation + * @param array + * @static + * @return PEAR_ChannelFile + */ + function &fromArrayWithErrors($data, $compatibility = false, + $stackClass = 'PEAR_ErrorStack') + { + $a = new PEAR_ChannelFile($compatibility, $stackClass); + $a->_fromArray($data); + return $a; + } /** * @param array @@ -377,21 +391,16 @@ class PEAR_ChannelFile { */ function fromXmlFile($descfile) { - if (!@is_file($descfile) || !is_readable($descfile) || - (!$fp = @fopen($descfile, 'r'))) { + if (!file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) || + (!$fp = fopen($descfile, 'r'))) { require_once 'PEAR.php'; return PEAR::raiseError("Unable to open $descfile"); } // read the whole thing so we only get one cdata callback // for each block of cdata - if (function_exists('file_get_contents')) { - fclose($fp); - $data = file_get_contents($descfile); - } else { - $data = fread($fp, filesize($descfile)); - fclose($fp); - } + fclose($fp); + $data = file_get_contents($descfile); return $this->fromXmlString($data); } @@ -664,8 +673,11 @@ class PEAR_ChannelFile { $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME); } if (!isset($info['validatepackage']['attribs']['version'])) { + $content = isset($info['validatepackage']['_content']) ? + $info['validatepackage']['_content'] : + null; $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION, - array('package' => @$info['validatepackage']['_content'])); + array('package' => $content)); } } if (isset($info['servers']['primary']['attribs']['port']) && @@ -699,7 +711,6 @@ class PEAR_ChannelFile { if (!isset($info['servers']['mirror'][0])) { $info['servers']['mirror'] = array($info['servers']['mirror']); } - $i = 0; foreach ($info['servers']['mirror'] as $mirror) { if (!isset($mirror['attribs']['host'])) { $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_HOST, @@ -1002,10 +1013,8 @@ class PEAR_ChannelFile { } else { return false; } - $server = $mirror; } else { $rest = $this->_channelInfo['servers']['primary']['rest']; - $server = $this->getServer(); } if (!isset($rest['baseurl'][0])) { $rest['baseurl'] = array($rest['baseurl']); @@ -1143,7 +1152,6 @@ class PEAR_ChannelFile { array('mirror' => $mirror)); return false; } - $setmirror = false; if (isset($this->_channelInfo['servers']['mirror'][0])) { foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { if ($mirror == $mir['attribs']['host']) { @@ -1176,7 +1184,6 @@ class PEAR_ChannelFile { array('mirror' => $mirror)); return false; } - $setmirror = false; if (isset($this->_channelInfo['servers']['mirror'][0])) { foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { if ($mirror == $mir['attribs']['host']) { @@ -1231,7 +1238,6 @@ class PEAR_ChannelFile { array('mirror' => $mirror)); return false; } - $setmirror = false; if (isset($this->_channelInfo['servers']['mirror'][0])) { foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { if ($mirror == $mir['attribs']['host']) { @@ -1343,6 +1349,7 @@ class PEAR_ChannelFile { if (isset($this->_channelInfo['name'])) { return $this->_channelInfo['name']; } + return ''; } /** @@ -1376,6 +1383,12 @@ class PEAR_ChannelFile { } $set = array('attribs' => array('version' => $version), '_content' => $name); if (!isset($this->_channelInfo['servers']['primary'][$type]['function'])) { + if (!isset($this->_channelInfo['servers'])) { + $this->_channelInfo['servers'] = array('primary' => + array($type => array())); + } elseif (!isset($this->_channelInfo['servers']['primary'])) { + $this->_channelInfo['servers']['primary'] = array($type => array()); + } $this->_channelInfo['servers']['primary'][$type]['function'] = $set; $this->_isValid = false; return true; @@ -1395,7 +1408,6 @@ class PEAR_ChannelFile { */ function addMirrorFunction($mirror, $type, $version, $name = '') { - $found = false; if (!isset($this->_channelInfo['servers']['mirror'])) { $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, array('mirror' => $mirror)); @@ -1440,7 +1452,6 @@ class PEAR_ChannelFile { function setBaseURL($resourceType, $url, $mirror = false) { if ($mirror) { - $found = false; if (!isset($this->_channelInfo['servers']['mirror'])) { $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, array('mirror' => $mirror)); @@ -1463,6 +1474,9 @@ class PEAR_ChannelFile { $setmirror = &$this->_channelInfo['servers']['primary']; } $set = array('attribs' => array('type' => $resourceType), '_content' => $url); + if (!isset($setmirror['rest'])) { + $setmirror['rest'] = array(); + } if (!isset($setmirror['rest']['baseurl'])) { $setmirror['rest']['baseurl'] = $set; $this->_isValid = false; diff --git a/includes/pear/PEAR/ChannelFile/Parser.php b/includes/pear/PEAR/ChannelFile/Parser.php index ed6f9802..88402439 100644 --- a/includes/pear/PEAR/ChannelFile/Parser.php +++ b/includes/pear/PEAR/ChannelFile/Parser.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Parser.php,v 1.3 2005/03/21 01:43:00 cellog Exp $ + * @version CVS: $Id: Parser.php,v 1.5 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -30,9 +30,9 @@ require_once 'PEAR/ChannelFile.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/includes/pear/PEAR/Command.php b/includes/pear/PEAR/Command.php index 89cb4f82..38fe69c9 100644 --- a/includes/pear/PEAR/Command.php +++ b/includes/pear/PEAR/Command.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Command.php,v 1.35 2005/11/01 05:39:23 cellog Exp $ + * @version CVS: $Id: Command.php,v 1.39 2008/01/03 20:26:34 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -34,6 +34,12 @@ require_once 'PEAR/XMLParser.php'; */ $GLOBALS['_PEAR_Command_commandlist'] = array(); +/** + * List of commands and their descriptions + * @var array command => description + */ +$GLOBALS['_PEAR_Command_commanddesc'] = array(); + /** * List of shortcuts to common commands. * @var array shortcut => command @@ -92,9 +98,9 @@ $GLOBALS['_PEAR_Command_objects'] = array(); * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -231,6 +237,9 @@ class PEAR_Command if ($dir === null) { $dir = dirname(__FILE__) . '/Command'; } + if (!is_dir($dir)) { + return PEAR::raiseError("registerCommands: opendir($dir) '$dir' does not exist or is not a directory"); + } $dp = @opendir($dir); if (empty($dp)) { return PEAR::raiseError("registerCommands: opendir($dir) failed"); diff --git a/includes/pear/PEAR/Command/Auth.php b/includes/pear/PEAR/Command/Auth.php index ea169131..005235b6 100644 --- a/includes/pear/PEAR/Command/Auth.php +++ b/includes/pear/PEAR/Command/Auth.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Auth.php,v 1.21 2005/04/13 04:29:15 cellog Exp $ + * @version CVS: $Id: Auth.php,v 1.31 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -34,9 +34,9 @@ require_once 'PEAR/Config.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -50,8 +50,9 @@ class PEAR_Command_Auth extends PEAR_Command_Common 'shortcut' => 'li', 'function' => 'doLogin', 'options' => array(), - 'doc' => ' -Log in to the remote server. To use remote functions in the installer + 'doc' => ' +Log in to a remote channel server. If is not supplied, +the default channel is used. To use remote functions in the installer that require any kind of privileges, you need to log in first. The username and password you enter here will be stored in your per-user PEAR configuration (~/.pearrc on Unix-like systems). After logging @@ -106,13 +107,23 @@ password from your user configuration.', function doLogin($command, $options, $params) { $reg = &$this->config->getRegistry(); - $channel = $this->config->get('default_channel'); + + // If a parameter is supplied, use that as the channel to log in to + if (isset($params[0])) { + $channel = $params[0]; + } else { + $channel = $this->config->get('default_channel'); + } + $chan = $reg->getChannel($channel); - $server = $this->config->get('preferred_mirror'); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } + $server = $this->config->get('preferred_mirror', null, $channel); $remote = &$this->config->getRemote(); - $username = $this->config->get('username'); + $username = $this->config->get('username', null, $channel); if (empty($username)) { - $username = @$_ENV['USER']; + $username = isset($_ENV['USER']) ? $_ENV['USER'] : null; } $this->ui->outputData("Logging in to $server.", $command); @@ -124,9 +135,14 @@ password from your user configuration.', ); $username = trim($username); $password = trim($password); - - $this->config->set('username', $username); - $this->config->set('password', $password); + + $ourfile = $this->config->getConfFile('user'); + if (!$ourfile) { + $ourfile = $this->config->getConfFile('system'); + } + + $this->config->set('username', $username, 'user', $channel); + $this->config->set('password', $password, 'user', $channel); if ($chan->supportsREST()) { $ok = true; @@ -137,7 +153,11 @@ password from your user configuration.', } if ($ok === true) { $this->ui->outputData("Logged in.", $command); - $this->config->store(); + // avoid changing any temporary settings changed with -d + $ourconfig = new PEAR_Config($ourfile, $ourfile); + $ourconfig->set('username', $username, 'user', $channel); + $ourconfig->set('password', $password, 'user', $channel); + $ourconfig->store(); } else { return $this->raiseError("Login failed!"); } @@ -166,6 +186,9 @@ password from your user configuration.', $reg = &$this->config->getRegistry(); $channel = $this->config->get('default_channel'); $chan = $reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } $server = $this->config->get('preferred_mirror'); $this->ui->outputData("Logging out from $server.", $command); $this->config->remove('username'); diff --git a/includes/pear/PEAR/Command/Auth.xml b/includes/pear/PEAR/Command/Auth.xml index bfc28da3..17e3b34c 100644 --- a/includes/pear/PEAR/Command/Auth.xml +++ b/includes/pear/PEAR/Command/Auth.xml @@ -4,8 +4,9 @@ li doLogin - -Log in to the remote server. To use remote functions in the installer + <channel name> +Log in to a remote channel server. <channel name> is not supplied, +the default channel is used. To use remote functions in the installer that require any kind of privileges, you need to log in first. The username and password you enter here will be stored in your per-user PEAR configuration (~/.pearrc on Unix-like systems). After logging diff --git a/includes/pear/PEAR/Command/Build.php b/includes/pear/PEAR/Command/Build.php index 8f0f3702..d6773100 100644 --- a/includes/pear/PEAR/Command/Build.php +++ b/includes/pear/PEAR/Command/Build.php @@ -15,9 +15,9 @@ * @author Stig Bakken * @author Tomas V.V.Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Build.php,v 1.12 2005/04/13 04:29:36 cellog Exp $ + * @version CVS: $Id: Build.php,v 1.14 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -35,9 +35,9 @@ require_once 'PEAR/Command/Common.php'; * @author Stig Bakken * @author Tomas V.V.Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ diff --git a/includes/pear/PEAR/Command/Channels.php b/includes/pear/PEAR/Command/Channels.php index 3eebcead..5de0d39b 100644 --- a/includes/pear/PEAR/Command/Channels.php +++ b/includes/pear/PEAR/Command/Channels.php @@ -16,9 +16,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Channels.php,v 1.42 2005/05/11 19:44:16 cellog Exp $ + * @version CVS: $Id: Channels.php,v 1.57 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -34,9 +34,9 @@ require_once 'PEAR/Command/Common.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -132,8 +132,13 @@ alias. 'function' => 'doDiscover', 'shortcut' => 'di', 'options' => array(), - 'doc' => ' -List the files in an installed package. + 'doc' => '[|] +Initialize a channel from its server and create a local channel.xml. +If is in the format ":@" then + and will be set as the login username/password for +. Use caution when passing the username/password in this way, as +it may allow other users on your computer to briefly view your username/ +password via the system\'s process list. ' ), ); @@ -185,133 +190,24 @@ List the files in an installed package. function doUpdateAll($command, $options, $params) { $reg = &$this->config->getRegistry(); - $savechannel = $this->config->get('default_channel'); - if (isset($options['channel'])) { - if (!$reg->channelExists($options['channel'])) { - return $this->raiseError('Unknown channel "' . $options['channel'] . '"'); - } - $this->config->set('default_channel', $options['channel']); - } else { - $this->config->set('default_channel', 'pear.php.net'); - } - $remote = &$this->config->getRemote(); - $channels = $remote->call('channel.listAll'); - if (PEAR::isError($channels)) { - $this->config->set('default_channel', $savechannel); - return $channels; - } - if (!is_array($channels) || isset($channels['faultCode'])) { - $this->config->set('default_channel', $savechannel); - return $this->raiseError("Incorrect channel listing returned from channel '$chan'"); - } - if (!count($channels)) { - $data = 'no updates available'; - } - $dl = &$this->getDownloader(); - if (!class_exists('System')) { - require_once 'System.php'; - } - $tmpdir = System::mktemp(array('-d')); + $channels = $reg->getChannels(); + + $success = true; foreach ($channels as $channel) { - $channel = $channel[0]; - $save = $channel; - if ($reg->channelExists($channel, true)) { - $this->ui->outputData("Updating channel \"$channel\"", $command); - $test = $reg->getChannel($channel, true); - if (!$test) { - $this->ui->outputData("Channel '$channel' is corrupt in registry!", $command); - $lastmodified = false; + if ($channel->getName() != '__uri') { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->doUpdate('channel-update', + $options, + array($channel->getName())); + if (PEAR::isError($err)) { + $this->ui->outputData($err->getMessage(), $command); + $success = false; } else { - $lastmodified = $test->lastModified(); - + $success &= $err; } - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $contents = $dl->downloadHttp('http://' . $test->getName() . '/channel.xml', - $this->ui, $tmpdir, null, $lastmodified); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($contents)) { - $this->ui->outputData('ERROR: Cannot retrieve channel.xml for channel "' . - $test->getName() . '"', $command); - continue; - } - if (!$contents) { - $this->ui->outputData("Channel \"$channel\" is up-to-date", $command); - continue; - } - list($contents, $lastmodified) = $contents; - $info = implode('', file($contents)); - if (!$info) { - $this->ui->outputData("Channel \"$channel\" is up-to-date", $command); - continue; - } - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - $channelinfo = new PEAR_ChannelFile; - $channelinfo->fromXmlString($info); - if ($channelinfo->getErrors()) { - $this->ui->outputData("Downloaded channel data from channel \"$channel\" " . - 'is corrupt, skipping', $command); - continue; - } - $channel = $channelinfo; - if ($channel->getName() != $save) { - $this->ui->outputData('ERROR: Security risk - downloaded channel ' . - 'definition file for channel "' - . $channel->getName() . ' from channel "' . $save . - '". To use anyway, use channel-update', $command); - continue; - } - $reg->updateChannel($channel, $lastmodified); - } else { - if ($reg->isAlias($channel)) { - $temp = &$reg->getChannel($channel); - $temp->setAlias($temp->getName(), true); // set the alias to the channel name - if ($reg->channelExists($temp->getName())) { - $this->ui->outputData('ERROR: existing channel "' . $temp->getName() . - '" is aliased to "' . $channel . '" already and cannot be ' . - 're-aliased to "' . $temp->getName() . '" because a channel with ' . - 'that name or alias already exists! Please re-alias and try ' . - 'again.', $command); - continue; - } - } - $this->ui->outputData("Adding new channel \"$channel\"", $command); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $contents = $dl->downloadHttp('http://' . $channel . '/channel.xml', - $this->ui, $tmpdir, null, false); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($contents)) { - $this->ui->outputData('ERROR: Cannot retrieve channel.xml for channel "' . - $channel . '"', $command); - continue; - } - list($contents, $lastmodified) = $contents; - $info = implode('', file($contents)); - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - $channelinfo = new PEAR_Channelfile; - $channelinfo->fromXmlString($info); - if ($channelinfo->getErrors()) { - $this->ui->outputData("Downloaded channel data from channel \"$channel\"" . - ' is corrupt, skipping', $command); - continue; - } - $channel = $channelinfo; - if ($channel->getName() != $save) { - $this->ui->outputData('ERROR: Security risk - downloaded channel ' . - 'definition file for channel "' - . $channel->getName() . '" from channel "' . $save . - '". To use anyway, use channel-update', $command); - continue; - } - $reg->addChannel($channel, $lastmodified); } } - $this->config->set('default_channel', $savechannel); - $this->ui->outputData('update-channels complete', $command); - return true; + return $success; } function doInfo($command, $options, $params) @@ -323,29 +219,30 @@ List the files in an installed package. $channel = strtolower($params[0]); if ($reg->channelExists($channel)) { $chan = $reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } } else { if (strpos($channel, '://')) { $downloader = &$this->getDownloader(); - if (!class_exists('System')) { - require_once 'System.php'; - } - $tmpdir = System::mktemp(array('-d')); + $tmpdir = $this->config->get('temp_dir'); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $loc = $downloader->downloadHttp($channel, $this->ui, $tmpdir); PEAR::staticPopErrorHandling(); if (PEAR::isError($loc)) { - return $this->raiseError('Cannot open "' . $channel . '"'); + return $this->raiseError('Cannot open "' . $channel . + '" (' . $loc->getMessage() . ')'); } else { $contents = implode('', file($loc)); } } else { - $fp = @fopen($params[0], 'r'); - if (!$fp) { - if (@file_exists($params[0])) { + if (file_exists($params[0])) { + $fp = fopen($params[0], 'r'); + if (!$fp) { return $this->raiseError('Cannot open "' . $params[0] . '"'); - } else { - return $this->raiseError('Unknown channel "' . $channel . '"'); } + } else { + return $this->raiseError('Unknown channel "' . $channel . '"'); } $contents = ''; while (!feof($fp)) { @@ -431,7 +328,7 @@ List the files in an installed package. $data['data'][] = array($mirror['attribs']['host']); $d['mirrors'] = $data; } - foreach ($mirrors as $mirror) { + foreach ($mirrors as $i => $mirror) { $data['data'] = array(); $data['caption'] = 'Mirror ' . $mirror['attribs']['host'] . ' Capabilities'; $data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base'); @@ -469,7 +366,7 @@ List the files in an installed package. } else { $data['data'][] = array('No supported protocols'); } - $d['mirrorprotocols'] = $data; + $d['mirrorprotocols' . $i] = $data; } } $this->ui->outputData($d, 'channel-info'); @@ -522,22 +419,38 @@ List the files in an installed package. } if (strpos($params[0], '://')) { $downloader = &$this->getDownloader(); - if (!class_exists('System')) { + $tmpdir = $this->config->get('temp_dir'); + if (!file_exists($tmpdir)) { require_once 'System.php'; + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = System::mkdir(array('-p', $tmpdir)); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($err)) { + return $this->raiseError('channel-add: temp_dir does not exist: "' . + $tmpdir . + '" - You can change this location with "pear config-set temp_dir"'); + } + } + if (!is_writable($tmpdir)) { + return $this->raiseError('channel-add: temp_dir is not writable: "' . + $tmpdir . + '" - You can change this location with "pear config-set temp_dir"'); } - $tmpdir = System::mktemp(array('-d')); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $loc = $downloader->downloadHttp($params[0], $this->ui, $tmpdir, null, false); PEAR::staticPopErrorHandling(); if (PEAR::isError($loc)) { - return $this->raiseError('channel-add: Cannot open "' . $params[0] . '"'); + return $this->raiseError('channel-add: Cannot open "' . $params[0] . + '" (' . $loc->getMessage() . ')'); } else { list($loc, $lastmodified) = $loc; $contents = implode('', file($loc)); } } else { - $lastmodified = false; - $fp = @fopen($params[0], 'r'); + $lastmodified = $fp = false; + if (file_exists($params[0])) { + $fp = fopen($params[0], 'r'); + } if (!$fp) { return $this->raiseError('channel-add: cannot open "' . $params[0] . '"'); } @@ -588,10 +501,23 @@ List the files in an installed package. function doUpdate($command, $options, $params) { - if (!class_exists('System')) { + $tmpdir = $this->config->get('temp_dir'); + if (!file_exists($tmpdir)) { require_once 'System.php'; + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = System::mkdir(array('-p', $tmpdir)); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($err)) { + return $this->raiseError('channel-add: temp_dir does not exist: "' . + $tmpdir . + '" - You can change this location with "pear config-set temp_dir"'); + } + } + if (!is_writable($tmpdir)) { + return $this->raiseError('channel-add: temp_dir is not writable: "' . + $tmpdir . + '" - You can change this location with "pear config-set temp_dir"'); } - $tmpdir = System::mktemp(array('-d')); $reg = &$this->config->getRegistry(); if (sizeof($params) != 1) { return $this->raiseError("No channel file specified"); @@ -600,7 +526,10 @@ List the files in an installed package. if ((!file_exists($params[0]) || is_dir($params[0])) && $reg->channelExists(strtolower($params[0]))) { $c = $reg->getChannel(strtolower($params[0])); - $this->ui->outputData('Retrieving channel.xml from remote server'); + if (PEAR::isError($c)) { + return $this->raiseError($c); + } + $this->ui->outputData("Updating channel \"$params[0]\"", $command); $dl = &$this->getDownloader(array()); // if force is specified, use a timestamp of "1" to force retrieval $lastmodified = isset($options['force']) ? false : $c->lastModified(); @@ -610,11 +539,11 @@ List the files in an installed package. PEAR::staticPopErrorHandling(); if (PEAR::isError($contents)) { return $this->raiseError('Cannot retrieve channel.xml for channel "' . - $c->getName() . '"'); + $c->getName() . '" (' . $contents->getMessage() . ')'); } list($contents, $lastmodified) = $contents; if (!$contents) { - $this->ui->outputData("Channel $params[0] channel.xml is up to date"); + $this->ui->outputData("Channel \"$params[0]\" is up to date"); return; } $contents = implode('', file($contents)); @@ -645,13 +574,17 @@ List the files in an installed package. $this->ui, $tmpdir, null, $lastmodified); PEAR::staticPopErrorHandling(); if (PEAR::isError($loc)) { - return $this->raiseError("Cannot open " . $params[0]); + return $this->raiseError("Cannot open " . $params[0] . + ' (' . $loc->getMessage() . ')'); } else { list($loc, $lastmodified) = $loc; $contents = implode('', file($loc)); } } else { - $fp = @fopen($params[0], 'r'); + $fp = false; + if (file_exists($params[0])) { + $fp = fopen($params[0], 'r'); + } if (!$fp) { return $this->raiseError("Cannot open " . $params[0]); } @@ -729,9 +662,9 @@ List the files in an installed package. 'already aliased to "' . strtolower($params[1]) . '", cannot re-alias'); } $chan = &$reg->getChannel($params[0]); - if (!$chan) { + if (PEAR::isError($chan)) { return $this->raiseError('Corrupt registry? Error retrieving channel "' . $params[0] . - '" information'); + '" information (' . $chan->getMessage() . ')'); } // make it a local alias if (!$chan->setAlias(strtolower($params[1]), true)) { @@ -743,28 +676,62 @@ List the files in an installed package. strtolower($params[1]) . '"'); } + /** + * The channel-discover command + * + * @param string $command command name + * @param array $options option_name => value + * @param array $params list of additional parameters. + * $params[0] should contain a string with either: + * - or + * - :@ + * @return null|PEAR_Error + */ function doDiscover($command, $options, $params) { $reg = &$this->config->getRegistry(); if (sizeof($params) != 1) { return $this->raiseError("No channel server specified"); } - if ($reg->channelExists($params[0])) { - if ($reg->isAlias($params[0])) { - return $this->raiseError("A channel alias named \"$params[0]\" " . - 'already exists, aliasing channel "' . $reg->channelName($params[0]) + + // Look for the possible input format ":@" + if (preg_match('/^(.+):(.+)@(.+)\\z/', $params[0], $matches)) { + $username = $matches[1]; + $password = $matches[2]; + $channel = $matches[3]; + } else { + $channel = $params[0]; + } + + if ($reg->channelExists($channel)) { + if ($reg->isAlias($channel)) { + return $this->raiseError("A channel alias named \"$channel\" " . + 'already exists, aliasing channel "' . $reg->channelName($channel) . '"'); } else { - return $this->raiseError("Channel \"$params[0]\" is already initialized"); + return $this->raiseError("Channel \"$channel\" is already initialized"); } } $this->pushErrorHandling(PEAR_ERROR_RETURN); - $err = $this->doAdd($command, $options, array('http://' . $params[0] . '/channel.xml')); + $err = $this->doAdd($command, $options, array('http://' . $channel . '/channel.xml')); $this->popErrorHandling(); if (PEAR::isError($err)) { - return $this->raiseError("Discovery of channel \"$params[0]\" failed"); + return $this->raiseError("Discovery of channel \"$channel\" failed (" . + $err->getMessage() . ')'); } - $this->ui->outputData("Discovery of channel \"$params[0]\" succeeded", $command); + + // Store username/password if they were given + // Arguably we should do a logintest on the channel here, but since + // that's awkward on a REST-based channel (even "pear login" doesn't + // do it for those), and XML-RPC is deprecated, it's fairly pointless. + if (isset($username)) { + $this->config->set('username', $username, 'user', $channel); + $this->config->set('password', $password, 'user', $channel); + $this->config->store(); + $this->ui->outputData("Stored login for channel \"$channel\" using username \"$username\"", $command); + } + + $this->ui->outputData("Discovery of channel \"$channel\" succeeded", $command); } } ?> diff --git a/includes/pear/PEAR/Command/Channels.xml b/includes/pear/PEAR/Command/Channels.xml index fc3739b3..e7c7b7fe 100644 --- a/includes/pear/PEAR/Command/Channels.xml +++ b/includes/pear/PEAR/Command/Channels.xml @@ -86,8 +86,13 @@ alias. doDiscover di - <package> -List the files in an installed package. + [<channel.xml>|<channel name>] +Initialize a channel from its server and create a local channel.xml. +If <channel name> is in the format "<username>:<password>@<channel>" then +<username> and <password> will be set as the login username/password for +<channel>. Use caution when passing the username/password in this way, as +it may allow other users on your computer to briefly view your username/ +password via the system's process list. - \ No newline at end of file + diff --git a/includes/pear/PEAR/Command/Common.php b/includes/pear/PEAR/Command/Common.php index 91c3b4dc..41595403 100644 --- a/includes/pear/PEAR/Command/Common.php +++ b/includes/pear/PEAR/Command/Common.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Common.php,v 1.29 2005/04/13 04:29:58 cellog Exp $ + * @version CVS: $Id: Common.php,v 1.36 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -33,9 +33,9 @@ require_once 'PEAR.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -74,7 +74,7 @@ class PEAR_Command_Common extends PEAR var $_deps_type_trans = array( 'pkg' => 'package', - 'extension' => 'extension', + 'ext' => 'extension', 'php' => 'PHP', 'prog' => 'external program', 'ldlib' => 'external library for linking', @@ -145,7 +145,12 @@ class PEAR_Command_Common extends PEAR if (isset($shortcuts[$command])) { $command = $shortcuts[$command]; } - return @$this->commands[$command]['options']; + if (isset($this->commands[$command]) && + isset($this->commands[$command]['options'])) { + return $this->commands[$command]['options']; + } else { + return null; + } } // }}} @@ -192,12 +197,19 @@ class PEAR_Command_Common extends PEAR function getHelp($command) { $config = &PEAR_Config::singleton(); - $help = @$this->commands[$command]['doc']; + if (!isset($this->commands[$command])) { + return "No such command \"$command\""; + } + $help = null; + if (isset($this->commands[$command]['doc'])) { + $help = $this->commands[$command]['doc']; + } if (empty($help)) { // XXX (cox) Fallback to summary if there is no doc (show both?) - if (!$help = @$this->commands[$command]['summary']) { + if (!isset($this->commands[$command]['summary'])) { return "No help for command \"$command\""; } + $help = $this->commands[$command]['summary']; } if (preg_match_all('/{config\s+([^\}]+)}/e', $help, $matches)) { foreach($matches[0] as $k => $v) { @@ -223,7 +235,7 @@ class PEAR_Command_Common extends PEAR $help = "Options:\n"; foreach ($this->commands[$command]['options'] as $k => $v) { if (isset($v['arg'])) { - if ($v['arg']{0} == '(') { + if ($v['arg'][0] == '(') { $arg = substr($v['arg'], 1, -1); $sapp = " [$arg]"; $lapp = "[=$arg]"; @@ -236,9 +248,9 @@ class PEAR_Command_Common extends PEAR } if (isset($v['shortopt'])) { $s = $v['shortopt']; - @$help .= " -$s$sapp, --$k$lapp\n"; + $help .= " -$s$sapp, --$k$lapp\n"; } else { - @$help .= " --$k$lapp\n"; + $help .= " --$k$lapp\n"; } $p = " "; $doc = rtrim(str_replace("\n", "\n$p", $v['doc'])); @@ -254,19 +266,21 @@ class PEAR_Command_Common extends PEAR function run($command, $options, $params) { - $func = @$this->commands[$command]['function']; - if (empty($func)) { + if (empty($this->commands[$command]['function'])) { // look for shortcuts foreach (array_keys($this->commands) as $cmd) { - if (@$this->commands[$cmd]['shortcut'] == $command) { - $command = $cmd; - $func = @$this->commands[$command]['function']; - if (empty($func)) { + if (isset($this->commands[$cmd]['shortcut']) && $this->commands[$cmd]['shortcut'] == $command) { + if (empty($this->commands[$cmd]['function'])) { return $this->raiseError("unknown command `$command'"); + } else { + $func = $this->commands[$cmd]['function']; } + $command = $cmd; break; } } + } else { + $func = $this->commands[$command]['function']; } return $this->$func($command, $options, $params); } @@ -274,4 +288,4 @@ class PEAR_Command_Common extends PEAR // }}} } -?> \ No newline at end of file +?> diff --git a/includes/pear/PEAR/Command/Config.php b/includes/pear/PEAR/Command/Config.php index 45fa8dc4..d8179d3a 100644 --- a/includes/pear/PEAR/Command/Config.php +++ b/includes/pear/PEAR/Command/Config.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Config.php,v 1.48 2005/09/24 04:25:33 cellog Exp $ + * @version CVS: $Id: Config.php,v 1.56 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -33,9 +33,9 @@ require_once 'PEAR/Command/Common.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -155,8 +155,14 @@ and uninstall). function doConfigShow($command, $options, $params) { + if (is_array($params)) { + $layer = isset($params[0]) ? $params[0] : NULL; + } else { + $layer = NULL; + } + // $params[0] -> the layer - if ($error = $this->_checkLayer(@$params[0])) { + if ($error = $this->_checkLayer($layer)) { return $this->raiseError("config-show:$error"); } $keys = $this->config->getKeys(); @@ -170,7 +176,7 @@ and uninstall). $data = array('caption' => 'Configuration (channel ' . $channel . '):'); foreach ($keys as $key) { $type = $this->config->getType($key); - $value = $this->config->get($key, @$params[0], $channel); + $value = $this->config->get($key, $layer, $channel); if ($type == 'password' && $value) { $value = '********'; } @@ -184,7 +190,7 @@ and uninstall). foreach ($this->config->getLayers() as $layer) { $data['data']['Config Files'][] = array(ucfirst($layer) . ' Configuration File', 'Filename' , $this->config->getConfFile($layer)); } - + $this->ui->outputData($data, $command); return true; } @@ -194,27 +200,38 @@ and uninstall). function doConfigGet($command, $options, $params) { - // $params[0] -> the parameter - // $params[1] -> the layer - if ($error = $this->_checkLayer(@$params[1])) { - return $this->raiseError("config-get:$error"); + if (!is_array($params)) { + $args_cnt = 0; + } else { + $args_cnt = count($params); } - $channel = isset($options['channel']) ? $options['channel'] : - $this->config->get('default_channel'); + + switch ($args_cnt) { + case 1: + $config_key = $params[0]; + $layer = NULL; + break; + case 2: + $config_key = $params[0]; + $layer = $params[1]; + if ($error = $this->_checkLayer($layer)) { + return $this->raiseError("config-get:$error"); + } + break; + case 0: + default: + return $this->raiseError("config-get expects 1 or 2 parameters"); + } + + $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel'); $reg = &$this->config->getRegistry(); + if (!$reg->channelExists($channel)) { return $this->raiseError('Channel "' . $channel . '" does not exist'); } - if (sizeof($params) < 1 || sizeof($params) > 2) { - return $this->raiseError("config-get expects 1 or 2 parameters"); - } else { - if (count($params) == 1) { - $layer = null; - } else { - $layer = $params[1]; - } - $this->ui->outputData($this->config->get($params[0], $layer, $channel), $command); - } + + $this->ui->outputData($this->config->get($config_key, $layer, $channel), $command); + return true; } @@ -231,7 +248,7 @@ and uninstall). $failmsg .= "config-set expects 2 or 3 parameters"; return PEAR::raiseError($failmsg); } - if ($error = $this->_checkLayer(@$params[2])) { + if (isset($params[2]) && ($error = $this->_checkLayer($params[2]))) { $failmsg .= $error; return PEAR::raiseError("config-set:$failmsg"); } @@ -333,10 +350,14 @@ and uninstall). $config->noRegistry(); $config->set('php_dir', $windows ? "$root\\pear\\php" : "$root/pear/php", 'user'); $config->set('data_dir', $windows ? "$root\\pear\\data" : "$root/pear/data"); + $config->set('www_dir', $windows ? "$root\\pear\\www" : "$root/pear/www"); + $config->set('cfg_dir', $windows ? "$root\\pear\\cfg" : "$root/pear/cfg"); $config->set('ext_dir', $windows ? "$root\\pear\\ext" : "$root/pear/ext"); $config->set('doc_dir', $windows ? "$root\\pear\\docs" : "$root/pear/docs"); $config->set('test_dir', $windows ? "$root\\pear\\tests" : "$root/pear/tests"); $config->set('cache_dir', $windows ? "$root\\pear\\cache" : "$root/pear/cache"); + $config->set('download_dir', $windows ? "$root\\pear\\download" : "$root/pear/download"); + $config->set('temp_dir', $windows ? "$root\\pear\\temp" : "$root/pear/temp"); $config->set('bin_dir', $windows ? "$root\\pear" : "$root/pear"); $config->writeConfigFile(); $this->_showConfig($config); @@ -372,7 +393,7 @@ and uninstall). array(ucfirst($layer) . ' Configuration File', 'Filename' , $config->getConfFile($layer)); } - + $this->ui->outputData($data, 'config-show'); return true; } diff --git a/includes/pear/PEAR/Command/Install.php b/includes/pear/PEAR/Command/Install.php index dd43ef32..fba43820 100644 --- a/includes/pear/PEAR/Command/Install.php +++ b/includes/pear/PEAR/Command/Install.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Install.php,v 1.109 2005/10/26 19:37:14 cellog Exp $ + * @version CVS: $Id: Install.php,v 1.141 2008/05/13 18:32:29 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -34,9 +34,9 @@ require_once 'PEAR/Command/Common.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -81,7 +81,12 @@ class PEAR_Command_Install extends PEAR_Command_Common 'installroot' => array( 'shortopt' => 'R', 'arg' => 'DIR', - 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', + 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM', + ), + 'packagingroot' => array( + 'shortopt' => 'P', + 'arg' => 'DIR', + 'doc' => 'root directory used when packaging files, like RPM packaging', ), 'ignore-errors' => array( 'doc' => 'force install even if there were errors', @@ -196,7 +201,7 @@ More than one package may be specified at once. '), 'upgrade-all' => array( 'summary' => 'Upgrade All Packages', - 'function' => 'doInstall', + 'function' => 'doUpgradeAll', 'shortcut' => 'ua', 'options' => array( 'nodeps' => array( @@ -218,7 +223,7 @@ More than one package may be specified at once. 'installroot' => array( 'shortopt' => 'R', 'arg' => 'DIR', - 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', + 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM', ), 'ignore-errors' => array( 'doc' => 'force install even if there were errors', @@ -333,77 +338,302 @@ Run post-installation scripts in package , if any exist. return $a; } + function enableExtension($binaries, $type) + { + if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) { + return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location'); + } + $ini = $this->_parseIni($phpini); + if (PEAR::isError($ini)) { + return $ini; + } + $line = 0; + if ($type == 'extsrc' || $type == 'extbin') { + $search = 'extensions'; + $enable = 'extension'; + } else { + $search = 'zend_extensions'; + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : ''; + $enable = 'zend_extension' . $debug . $ts; + } + foreach ($ini[$search] as $line => $extension) { + if (in_array($extension, $binaries, true) || in_array( + $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) { + // already enabled - assume if one is, all are + return true; + } + } + if ($line) { + $newini = array_slice($ini['all'], 0, $line); + } else { + $newini = array(); + } + foreach ($binaries as $binary) { + if ($ini['extension_dir']) { + $binary = basename($binary); + } + $newini[] = $enable . '="' . $binary . '"' . (OS_UNIX ? "\n" : "\r\n"); + } + $newini = array_merge($newini, array_slice($ini['all'], $line)); + $fp = @fopen($phpini, 'wb'); + if (!$fp) { + return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing'); + } + foreach ($newini as $line) { + fwrite($fp, $line); + } + fclose($fp); + return true; + } + + function disableExtension($binaries, $type) + { + if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) { + return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location'); + } + $ini = $this->_parseIni($phpini); + if (PEAR::isError($ini)) { + return $ini; + } + $line = 0; + if ($type == 'extsrc' || $type == 'extbin') { + $search = 'extensions'; + $enable = 'extension'; + } else { + $search = 'zend_extensions'; + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : ''; + $enable = 'zend_extension' . $debug . $ts; + } + $found = false; + foreach ($ini[$search] as $line => $extension) { + if (in_array($extension, $binaries, true) || in_array( + $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) { + $found = true; + break; + } + } + if (!$found) { + // not enabled + return true; + } + $fp = @fopen($phpini, 'wb'); + if (!$fp) { + return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing'); + } + if ($line) { + $newini = array_slice($ini['all'], 0, $line); + // delete the enable line + $newini = array_merge($newini, array_slice($ini['all'], $line + 1)); + } else { + $newini = array_slice($ini['all'], 1); + } + foreach ($newini as $line) { + fwrite($fp, $line); + } + fclose($fp); + return true; + } + + function _parseIni($filename) + { + if (file_exists($filename)) { + if (filesize($filename) > 300000) { + return PEAR::raiseError('php.ini "' . $filename . '" is too large, aborting'); + } + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; + $zend_extension_line = 'zend_extension' . $debug . $ts; + $all = @file($filename); + if (!$all) { + return PEAR::raiseError('php.ini "' . $filename .'" could not be read'); + } + $zend_extensions = $extensions = array(); + // assume this is right, but pull from the php.ini if it is found + $extension_dir = ini_get('extension_dir'); + foreach ($all as $linenum => $line) { + $line = trim($line); + if (!$line) { + continue; + } + if ($line[0] == ';') { + continue; + } + if (strtolower(substr($line, 0, 13)) == 'extension_dir') { + $line = trim(substr($line, 13)); + if ($line[0] == '=') { + $x = trim(substr($line, 1)); + $x = explode(';', $x); + $extension_dir = str_replace('"', '', array_shift($x)); + continue; + } + } + if (strtolower(substr($line, 0, 9)) == 'extension') { + $line = trim(substr($line, 9)); + if ($line[0] == '=') { + $x = trim(substr($line, 1)); + $x = explode(';', $x); + $extensions[$linenum] = str_replace('"', '', array_shift($x)); + continue; + } + } + if (strtolower(substr($line, 0, strlen($zend_extension_line))) == + $zend_extension_line) { + $line = trim(substr($line, strlen($zend_extension_line))); + if ($line[0] == '=') { + $x = trim(substr($line, 1)); + $x = explode(';', $x); + $zend_extensions[$linenum] = str_replace('"', '', array_shift($x)); + continue; + } + } + } + return array( + 'extensions' => $extensions, + 'zend_extensions' => $zend_extensions, + 'extension_dir' => $extension_dir, + 'all' => $all, + ); + } else { + return PEAR::raiseError('php.ini "' . $filename . '" does not exist'); + } + } + // {{{ doInstall() function doInstall($command, $options, $params) { + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } if (empty($this->installer)) { $this->installer = &$this->getInstaller($this->ui); } - if ($command == 'upgrade') { + if ($command == 'upgrade' || $command == 'upgrade-all') { $options['upgrade'] = true; + } else { + $packages = $params; + } + if (isset($options['installroot']) && isset($options['packagingroot'])) { + return $this->raiseError('ERROR: cannot use both --installroot and --packagingroot'); } $reg = &$this->config->getRegistry(); - if ($command == 'upgrade-all') { - $options['upgrade'] = true; - $reg = &$this->config->getRegistry(); - $savechannel = $this->config->get('default_channel'); - $params = array(); - foreach ($reg->listChannels() as $channel) { - if ($channel == '__uri') { + $instreg = &$reg; // instreg used to check if package is installed + if (isset($options['packagingroot']) && !isset($options['upgrade'])) { + $packrootphp_dir = $this->installer->_prependPath( + $this->config->get('php_dir', null, 'pear.php.net'), + $options['packagingroot']); + $instreg = new PEAR_Registry($packrootphp_dir); // other instreg! + + if ($this->config->get('verbose') > 2) { + $this->ui->outputData('using package root: ' . $options['packagingroot']); + } + } + $abstractpackages = array(); + $otherpackages = array(); + // parse params + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + foreach($params as $param) { + if (strpos($param, 'http://') === 0) { + $otherpackages[] = $param; + continue; + } + if (strpos($param, 'channel://') === false && @file_exists($param)) { + if (isset($options['force'])) { + $otherpackages[] = $param; continue; } - $this->config->set('default_channel', $channel); - $chan = &$reg->getChannel($channel); - if ($chan->supportsREST($this->config->get('preferred_mirror')) && - $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { - $dorest = true; - unset($remote); - } else { - $dorest = false; - $remote = &$this->config->getRemote($this->config); - } - $state = $this->config->get('preferred_state'); - $installed = array_flip($reg->listPackages($channel)); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - if ($dorest) { - $rest = &$this->config->getREST('1.0', array()); - $latest = $rest->listLatestUpgrades($base, $state, $installed, $channel, $reg); - } else { - if (empty($state) || $state == 'any') { - $latest = $remote->call("package.listLatestReleases"); - } else { - $latest = $remote->call("package.listLatestReleases", $state); - } - } - PEAR::staticPopErrorHandling(); - if (PEAR::isError($latest) || !is_array($latest)) { + $pkg = new PEAR_PackageFile($this->config); + $pf = $pkg->fromAnyFile($param, PEAR_VALIDATE_DOWNLOADING); + if (PEAR::isError($pf)) { + $otherpackages[] = $param; continue; } - foreach ($latest as $package => $info) { - $package = strtolower($package); - if (!isset($installed[$package])) { - // skip packages we don't have installed + if ($reg->packageExists($pf->getPackage(), $pf->getChannel()) && + version_compare($pf->getVersion(), + $reg->packageInfo($pf->getPackage(), 'version', $pf->getChannel()), + '<=')) { + if ($this->config->get('verbose')) { + $this->ui->outputData('Ignoring installed package ' . + $reg->parsedPackageNameToString( + array('package' => $pf->getPackage(), + 'channel' => $pf->getChannel()), true)); + } + continue; + } + $otherpackages[] = $param; + continue; + } + $e = $reg->parsePackageName($param, $this->config->get('default_channel')); + if (PEAR::isError($e)) { + $otherpackages[] = $param; + } else { + $abstractpackages[] = $e; + } + } + PEAR::staticPopErrorHandling(); + + // if there are any local package .tgz or remote static url, we can't + // filter. The filter only works for abstract packages + if (count($abstractpackages) && !isset($options['force'])) { + // when not being forced, only do necessary upgrades/installs + if (isset($options['upgrade'])) { + $abstractpackages = $this->_filterUptodatePackages($abstractpackages, + $command); + } else { + foreach ($abstractpackages as $i => $package) { + if (isset($package['group'])) { + // do not filter out install groups continue; } - $inst_version = $reg->packageInfo($package, 'version', $channel); - if (version_compare("$info[version]", "$inst_version", "le")) { - // installed version is up-to-date - continue; + if ($instreg->packageExists($package['package'], $package['channel'])) { + if ($this->config->get('verbose')) { + $this->ui->outputData('Ignoring installed package ' . + $reg->parsedPackageNameToString($package, true)); + } + unset($abstractpackages[$i]); } - $params[] = $reg->parsedPackageNameToString(array('package' => $package, - 'channel' => $channel)); - $this->ui->outputData(array('data' => "Will upgrade $package"), $command); } } - $this->config->set('default_channel', $savechannel); + $abstractpackages = + array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages); + } elseif (count($abstractpackages)) { + $abstractpackages = + array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages); } + + + $packages = array_merge($abstractpackages, $otherpackages); + if (!count($packages)) { + $this->ui->outputData('Nothing to ' . $command); + return true; + } + $this->downloader = &$this->getDownloader($this->ui, $options, $this->config); $errors = array(); + $binaries = array(); $downloaded = array(); - $downloaded = &$this->downloader->download($params); + $downloaded = &$this->downloader->download($packages); + if (PEAR::isError($downloaded)) { + return $this->raiseError($downloaded); + } $errors = $this->downloader->getErrorMsgs(); if (count($errors)) { + $err = array(); + $err['data'] = array(); foreach ($errors as $error) { $err['data'][] = array($error); } @@ -430,6 +660,7 @@ Run post-installation scripts in package , if any exist. return true; } $extrainfo = array(); + $binaries = array(); foreach ($downloaded as $param) { PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $info = $this->installer->install($param, $options); @@ -450,13 +681,16 @@ Run post-installation scripts in package , if any exist. } if (is_array($info)) { if ($param->getPackageType() == 'extsrc' || - $param->getPackageType() == 'extbin') { + $param->getPackageType() == 'extbin' || + $param->getPackageType() == 'zendextsrc' || + $param->getPackageType() == 'zendextbin') { $pkg = &$param->getPackageFile(); if ($instbin = $pkg->getInstalledBinary()) { - $instpkg = &$reg->getPackage($instbin, $pkg->getChannel()); + $instpkg = &$instreg->getPackage($instbin, $pkg->getChannel()); } else { - $instpkg = &$reg->getPackage($pkg->getPackage(), $pkg->getChannel()); + $instpkg = &$instreg->getPackage($pkg->getPackage(), $pkg->getChannel()); } + foreach ($instpkg->getFilelist() as $name => $atts) { $pinfo = pathinfo($atts['installed_as']); if (!isset($pinfo['extension']) || @@ -469,11 +703,37 @@ Run post-installation scripts in package , if any exist. $pinfo['extension'] == 'so' || // hp-ux $pinfo['extension'] == 'sl') { - $extrainfo[] = 'You should add "extension=' . $pinfo['basename'] - . '" to php.ini'; + $binaries[] = array($atts['installed_as'], $pinfo); break; } } + if (count($binaries)) { + foreach ($binaries as $pinfo) { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType()); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($ret)) { + $extrainfo[] = $ret->getMessage(); + if ($param->getPackageType() == 'extsrc' || + $param->getPackageType() == 'extbin') { + $exttype = 'extension'; + } else { + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : ''; + $exttype = 'zend_extension' . $debug . $ts; + } + $extrainfo[] = 'You should add "' . $exttype . '=' . + $pinfo[1]['basename'] . '" to php.ini'; + } else { + $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() . + ' enabled in php.ini'; + } + } + } } if ($this->config->get('verbose') > 0) { $channel = $param->getChannel(); @@ -515,28 +775,33 @@ Run post-installation scripts in package , if any exist. // explicitly chooses to install another group continue; } - $this->ui->outputData($param->getPackage() . ': Optional feature ' . + $extrainfo[] = $param->getPackage() . ': Optional feature ' . $group['attribs']['name'] . ' available (' . - $group['attribs']['hint'] . ')'); + $group['attribs']['hint'] . ')'; } - $extrainfo[] = 'To install use "pear install ' . - $param->getPackage() . '#featurename"'; + $extrainfo[] = $param->getPackage() . + ': To install optional features use "pear install ' . + $reg->parsedPackageNameToString( + array('package' => $param->getPackage(), + 'channel' => $param->getChannel()), true) . + '#featurename"'; } } - if (isset($options['installroot'])) { - $reg = &$this->config->getRegistry(); - } - $pkg = &$reg->getPackage($param->getPackage(), $param->getChannel()); - $pkg->setConfig($this->config); - if ($list = $pkg->listPostinstallScripts()) { - $pn = $reg->parsedPackageNameToString(array('channel' => - $param->getChannel(), 'package' => $param->getPackage()), true); - $extrainfo[] = $pn . ' has post-install scripts:'; - foreach ($list as $file) { - $extrainfo[] = $file; + $pkg = &$instreg->getPackage($param->getPackage(), $param->getChannel()); + // $pkg may be NULL if install is a 'fake' install via --packagingroot + if (is_object($pkg)) { + $pkg->setConfig($this->config); + if ($list = $pkg->listPostinstallScripts()) { + $pn = $reg->parsedPackageNameToString(array('channel' => + $param->getChannel(), 'package' => $param->getPackage()), true); + $extrainfo[] = $pn . ' has post-install scripts:'; + foreach ($list as $file) { + $extrainfo[] = $file; + } + $extrainfo[] = $param->getPackage() . + ': Use "pear run-scripts ' . $pn . '" to finish setup.'; + $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES'; } - $extrainfo[] = 'Use "pear run-scripts ' . $pn . '" to run'; - $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES'; } } else { return $this->raiseError("$command failed"); @@ -550,6 +815,33 @@ Run post-installation scripts in package , if any exist. return true; } + // }}} + // {{{ doUpgradeAll() + + function doUpgradeAll($command, $options, $params) + { + $reg = &$this->config->getRegistry(); + $toUpgrade = array(); + foreach ($reg->listChannels() as $channel) { + if ($channel == '__uri') { + continue; + } + + // parse name with channel + foreach ($reg->listPackages($channel) as $name) { + $toUpgrade[] = $reg->parsedPackageNameToString(array( + 'channel' => $channel, + 'package' => $name + )); + } + } + + $err = $this->doInstall('upgrade-all', $options, $toUpgrade); + if (PEAR::isError($err)) { + $this->ui->outputData($err->getMessage(), $command); + } + } + // }}} // {{{ doUninstall() @@ -569,6 +861,7 @@ Run post-installation scripts in package , if any exist. } $reg = &$this->config->getRegistry(); $newparams = array(); + $binaries = array(); $badparams = array(); foreach ($params as $pkg) { $channel = $this->config->get('default_channel'); @@ -607,7 +900,7 @@ Run post-installation scripts in package , if any exist. if (isset($parsed['group'])) { $group = $info->getDependencyGroup($parsed['group']); if ($group) { - $installed = &$reg->getInstalledGroup($group); + $installed = $reg->getInstalledGroup($group); if ($installed) { foreach ($installed as $i => $p) { $newparams[] = &$installed[$i]; @@ -627,6 +920,7 @@ Run post-installation scripts in package , if any exist. // for circular dependencies like subpackages $this->installer->setUninstallPackages($newparams); $params = array_merge($params, $badparams); + $binaries = array(); foreach ($params as $pkg) { $this->installer->pushErrorHandling(PEAR_ERROR_RETURN); if ($err = $this->installer->uninstall($pkg, $options)) { @@ -635,6 +929,58 @@ Run post-installation scripts in package , if any exist. $this->ui->outputData($err->getMessage(), $command); continue; } + if ($pkg->getPackageType() == 'extsrc' || + $pkg->getPackageType() == 'extbin' || + $pkg->getPackageType() == 'zendextsrc' || + $pkg->getPackageType() == 'zendextbin') { + if ($instbin = $pkg->getInstalledBinary()) { + continue; // this will be uninstalled later + } + + foreach ($pkg->getFilelist() as $name => $atts) { + $pinfo = pathinfo($atts['installed_as']); + if (!isset($pinfo['extension']) || + in_array($pinfo['extension'], array('c', 'h'))) { + continue; // make sure we don't match php_blah.h + } + if ((strpos($pinfo['basename'], 'php_') === 0 && + $pinfo['extension'] == 'dll') || + // most unices + $pinfo['extension'] == 'so' || + // hp-ux + $pinfo['extension'] == 'sl') { + $binaries[] = array($atts['installed_as'], $pinfo); + break; + } + } + if (count($binaries)) { + foreach ($binaries as $pinfo) { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType()); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($ret)) { + $extrainfo[] = $ret->getMessage(); + if ($pkg->getPackageType() == 'extsrc' || + $pkg->getPackageType() == 'extbin') { + $exttype = 'extension'; + } else { + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('Thread Safety.+enabled', $info) ? '_ts' : ''; + $exttype = 'zend_extension' . $debug . $ts; + } + $this->ui->outputData('Unable to remove "' . $exttype . '=' . + $pinfo[1]['basename'] . '" from php.ini', $command); + } else { + $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() . + ' disabled in php.ini', $command); + } + } + } + } $savepkg = $pkg; if ($this->config->get('verbose') > 0) { if (is_object($pkg)) { @@ -680,7 +1026,7 @@ Run post-installation scripts in package , if any exist. function doBundle($command, $options, $params) { $downloader = &$this->getDownloader($this->ui, array('force' => true, 'nodeps' => true, - 'soft' => true), $this->config); + 'soft' => true, 'downloadonly' => true), $this->config); $reg = &$this->config->getRegistry(); if (sizeof($params) < 1) { return $this->raiseError("Please supply the package you want to bundle"); @@ -699,11 +1045,20 @@ Run post-installation scripts in package , if any exist. $dest = $pwd; } } - $downloader->setDownloadDir($dest); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = $downloader->setDownloadDir($dest); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($err)) { + return PEAR::raiseError('download directory "' . $dest . + '" is not writeable.'); + } $result = &$downloader->download(array($params[0])); if (PEAR::isError($result)) { return $result; } + if (!isset($result[0])) { + return $this->raiseError('unable to unpack ' . $params[0]); + } $pkgfile = &$result[0]->getPackageFile(); $pkgname = $pkgfile->getName(); $pkgversion = $pkgfile->getVersion(); @@ -713,7 +1068,7 @@ Run post-installation scripts in package , if any exist. $orig = $pkgname . '-' . $pkgversion; $tar = &new Archive_Tar($pkgfile->getArchiveFile()); - if (!@$tar->extractModify($dest, $orig)) { + if (!$tar->extractModify($dest, $orig)) { return $this->raiseError('unable to unpack ' . $pkgfile->getArchiveFile()); } $this->ui->outputData("Package ready at '$dest'"); @@ -744,5 +1099,90 @@ Run post-installation scripts in package , if any exist. $this->ui->outputData('Install scripts complete', $command); return true; } + + /** + * Given a list of packages, filter out those ones that are already up to date + * + * @param $packages: packages, in parsed array format ! + * @return list of packages that can be upgraded + */ + function _filterUptodatePackages($packages, $command) + { + $reg = &$this->config->getRegistry(); + $latestReleases = array(); + + $ret = array(); + foreach($packages as $package) { + if (isset($package['group'])) { + $ret[] = $package; + continue; + } + $channel = $package['channel']; + $name = $package['package']; + + if (!$reg->packageExists($name, $channel)) { + $ret[] = $package; + continue; + } + if (!isset($latestReleases[$channel])) { + // fill in cache for this channel + $chan = &$reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } + if ($chan->supportsREST($this->config->get('preferred_mirror', + null, $channel)) && + $base = $chan->getBaseURL('REST1.0', + $this->config->get('preferred_mirror', + null, $channel))) + { + $dorest = true; + } else { + $dorest = false; + $remote = &$this->config->getRemote($this->config); + } + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + if ($dorest) { + $rest = &$this->config->getREST('1.0', array()); + $installed = array_flip($reg->listPackages($channel)); + $latest = $rest->listLatestUpgrades($base, + $this->config->get('preferred_state', null, $channel), $installed, + $channel, $reg); + } else { + $latest = $remote->call("package.listLatestReleases", + $this->config->get('preferred_state', null, $channel)); + unset($remote); + } + PEAR::staticPopErrorHandling(); + if (PEAR::isError($latest)) { + $this->ui->outputData('Error getting channel info from ' . $channel . + ': ' . $latest->getMessage()); + continue; + } + + $latestReleases[$channel] = array_change_key_case($latest); + } + + // check package for latest release + if (isset($latestReleases[$channel][strtolower($name)])) { + // if not set, up to date + $inst_version = $reg->packageInfo($name, 'version', $channel); + $channel_version = $latestReleases[$channel][strtolower($name)]['version']; + if (version_compare($channel_version, $inst_version, "le")) { + // installed version is up-to-date + continue; + } + // maintain BC + if ($command == 'upgrade-all') { + $this->ui->outputData(array('data' => 'Will upgrade ' . + $reg->parsedPackageNameToString($package)), $command); + } + $ret[] = $package; + } + } + + return $ret; + } + } ?> diff --git a/includes/pear/PEAR/Command/Install.xml b/includes/pear/PEAR/Command/Install.xml index ccb9ecf6..94044c26 100644 --- a/includes/pear/PEAR/Command/Install.xml +++ b/includes/pear/PEAR/Command/Install.xml @@ -35,8 +35,13 @@ R DIR - root directory used when installing files (ala PHP's INSTALL_ROOT) + root directory used when installing files (ala PHP's INSTALL_ROOT), use packagingroot for RPM + + P + DIR + root directory used when packaging files, like RPM packaging + force install even if there were errors diff --git a/includes/pear/PEAR/Command/Mirror.php b/includes/pear/PEAR/Command/Mirror.php index 2cb35dd7..f1256e0a 100644 --- a/includes/pear/PEAR/Command/Mirror.php +++ b/includes/pear/PEAR/Command/Mirror.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Alexander Merz - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Mirror.php,v 1.15 2005/05/04 04:39:04 cellog Exp $ + * @version CVS: $Id: Mirror.php,v 1.20 2008/04/11 01:16:40 dufuz Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.2.0 */ @@ -31,9 +31,9 @@ require_once 'PEAR/Command/Common.php'; * @category pear * @package PEAR * @author Alexander Merz - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.2.0 */ @@ -98,7 +98,7 @@ packages within preferred_state ({config preferred_state}) will be downloaded' * @param array $options the command options before the command * @param array $params the stuff after the command name * @return bool true if succesful - * @throw PEAR_Error + * @throw PEAR_Error */ function doDownloadAll($command, $options, $params) { @@ -113,10 +113,13 @@ packages within preferred_state ({config preferred_state}) will be downloaded' $this->config->set('default_channel', $channel); $this->ui->outputData('Using Channel ' . $this->config->get('default_channel')); $chan = $reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } if ($chan->supportsREST($this->config->get('preferred_mirror')) && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { $rest = &$this->config->getREST('1.0', array()); - $remoteInfo = array_flip($rest->listPackages($base)); + $remoteInfo = array_flip($rest->listPackages($base, $channel)); } else { $remote = &$this->config->getRemote(); $stable = ($this->config->get('preferred_state') == 'stable'); @@ -129,8 +132,11 @@ packages within preferred_state ({config preferred_state}) will be downloaded' if (PEAR::isError($cmd)) { return $cmd; } + $this->ui->outputData('Using Preferred State of ' . + $this->config->get('preferred_state')); + $this->ui->outputData('Gathering release information, please wait...'); /** - * Error handling not necessary, because already done by + * Error handling not necessary, because already done by * the download command */ PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); diff --git a/includes/pear/PEAR/Command/Package.php b/includes/pear/PEAR/Command/Package.php index 10eeb6a5..8eb16df7 100644 --- a/includes/pear/PEAR/Command/Package.php +++ b/includes/pear/PEAR/Command/Package.php @@ -16,9 +16,9 @@ * @author Stig Bakken * @author Martin Jansen * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Package.php,v 1.114 2005/10/26 19:14:14 cellog Exp $ + * @version CVS: $Id: Package.php,v 1.128 2008/03/29 21:06:58 dufuz Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -36,7 +36,7 @@ require_once 'PEAR/Command/Common.php'; * @author Stig Bakken * @author Martin Jansen * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/PEAR @@ -185,13 +185,18 @@ release), pass them as additional parameters. 'shortcut' => 'pd', 'options' => array(), 'doc' => ' -List all depencies the package has.' +List all dependencies the package has.' ), 'sign' => array( 'summary' => 'Sign a package distribution file', 'function' => 'doSign', 'shortcut' => 'si', - 'options' => array(), + 'options' => array( + 'verbose' => array( + 'shortopt' => 'v', + 'doc' => 'Display GnuPG output', + ), + ), 'doc' => ' Signs a package distribution (.tar or .tgz) file with GnuPG.', ), @@ -296,7 +301,7 @@ used for automated conversion or learning the format. if (!class_exists('PEAR_Common')) { require_once 'PEAR/Common.php'; } - if (!class_exists('PEAR/PackageFile.php')) { + if (!class_exists('PEAR_PackageFile')) { require_once 'PEAR/PackageFile.php'; } $a = &new PEAR_PackageFile($config, $debug, $tmpdir); @@ -369,10 +374,9 @@ used for automated conversion or learning the format. } else { $valid = $info->validate(PEAR_VALIDATE_PACKAGING); } - $err = array(); - $warn = array(); - if (!$valid) { - foreach ($info->getValidationWarnings() as $error) { + $err = $warn = array(); + if ($errors = $info->getValidationWarnings()) { + foreach ($errors as $error) { if ($error['level'] == 'warning') { $warn[] = $error['message']; } else { @@ -511,8 +515,11 @@ used for automated conversion or learning the format. $cmd .= ' diff'; // the rest of the options are passed right on to "cvs diff" foreach ($options as $option => $optarg) { - $arg = @$this->commands[$command]['options'][$option]['arg']; - $short = @$this->commands[$command]['options'][$option]['shortopt']; + $arg = $short = false; + if (isset($this->commands[$command]['options'][$option])) { + $arg = $this->commands[$command]['options'][$option]['arg']; + $short = $this->commands[$command]['options'][$option]['shortopt']; + } $cmd .= $short ? " -$short" : " --$option"; if ($arg && $optarg) { $cmd .= ($short ? '' : '=') . escapeshellarg($optarg); @@ -689,10 +696,8 @@ used for automated conversion or learning the format. } $tar = new Archive_Tar($params[0]); $tmpdir = System::mktemp('-d pearsign'); - if (!$tar->extractList('package2.xml package.sig', $tmpdir)) { - if (!$tar->extractList('package.xml package.sig', $tmpdir)) { - return $this->raiseError("failed to extract tar file"); - } + if (!$tar->extractList('package2.xml package.xml package.sig', $tmpdir)) { + return $this->raiseError("failed to extract tar file"); } if (file_exists("$tmpdir/package.sig")) { return $this->raiseError("package already signed"); @@ -701,11 +706,22 @@ used for automated conversion or learning the format. if (file_exists("$tmpdir/package2.xml")) { $packagexml = 'package2.xml'; } - @unlink("$tmpdir/package.sig"); + if (file_exists("$tmpdir/package.sig")) { + unlink("$tmpdir/package.sig"); + } + if (!file_exists("$tmpdir/$packagexml")) { + return $this->raiseError("Extracted file $tmpdir/$packagexml not found."); + } $input = $this->ui->userDialog($command, array('GnuPG Passphrase'), array('password')); - $gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output $tmpdir/package.sig $tmpdir/$packagexml 2>/dev/null", "w"); + if (!isset($input[0])) { + //use empty passphrase + $input[0] = ''; + } + + $devnull = (isset($options['verbose'])) ? '' : ' 2>/dev/null'; + $gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output $tmpdir/package.sig $tmpdir/$packagexml" . $devnull, "w"); if (!$gpg) { return $this->raiseError("gpg command failed"); } @@ -713,7 +729,11 @@ used for automated conversion or learning the format. if (pclose($gpg) || !file_exists("$tmpdir/package.sig")) { return $this->raiseError("gpg sign failed"); } - $tar->addModify("$tmpdir/package.sig", '', $tmpdir); + if (!$tar->addModify("$tmpdir/package.sig", '', $tmpdir)) { + return $this->raiseError('failed adding signature to file'); + } + + $this->ui->outputData("Package signed.", $command); return true; } @@ -731,355 +751,45 @@ used for automated conversion or learning the format. return $a; } + /** + * For unit testing purposes + */ + function &getCommandPackaging(&$ui, &$config) + { + if (!class_exists('PEAR_Command_Packaging')) { + if ($fp = @fopen('PEAR/Command/Packaging.php', 'r', true)) { + fclose($fp); + include_once 'PEAR/Command/Packaging.php'; + } + } + + if (class_exists('PEAR_Command_Packaging')) { + $a = &new PEAR_Command_Packaging($ui, $config); + } else { + $a = null; + } + return $a; + } + // {{{ doMakeRPM() - /* - - (cox) - - TODO: - - Fill the rpm dependencies in the template file. - - IDEAS: - - Instead of mapping the role to rpm vars, perhaps it's better - to use directly the pear cmd to install the files by itself - in %postrun so: - pear -d php_dir=%{_libdir}/php/pear -d test_dir=.. - */ - function doMakeRPM($command, $options, $params) { - require_once 'System.php'; - require_once 'Archive/Tar.php'; - if (sizeof($params) != 1) { - return $this->raiseError("bad parameter(s), try \"help $command\""); - } - if (!file_exists($params[0])) { - return $this->raiseError("file does not exist: $params[0]"); - } - $reg = &$this->config->getRegistry(); - $pkg = &$this->getPackageFile($this->config, $this->_debug); - $pf = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); - if (PEAR::isError($pf)) { - $u = $pf->getUserinfo(); - if (is_array($u)) { - foreach ($u as $err) { - if (is_array($err)) { - $err = $err['message']; - } - $this->ui->outputData($err); - } - } - return $this->raiseError("$params[0] is not a valid package"); - } - $tmpdir = System::mktemp(array('-d', 'pear2rpm')); - $instroot = System::mktemp(array('-d', 'pear2rpm')); - $tmp = $this->config->get('verbose'); - $this->config->set('verbose', 0); - $installer = $this->getInstaller($this->ui); - require_once 'PEAR/Downloader/Package.php'; - $pack = new PEAR_Downloader_Package($installer); - $pack->setPackageFile($pf); - $params[0] = &$pack; - $installer->setOptions(array('installroot' => $instroot, - 'nodeps' => true, 'soft' => true)); - $installer->setDownloadedPackages($params); - $info = $installer->install($params[0], - array('installroot' => $instroot, - 'nodeps' => true, 'soft' => true)); - $pkgdir = $pf->getPackage() . '-' . $pf->getVersion(); - $info['rpm_xml_dir'] = '/var/lib/pear'; - $this->config->set('verbose', $tmp); - if (isset($options['spec-template'])) { - $spec_template = $options['spec-template']; - } else { - $spec_template = '@DATA-DIR@/PEAR/template.spec'; - } - $info['possible_channel'] = ''; - $info['extra_config'] = ''; - if (isset($options['rpm-pkgname'])) { - $rpm_pkgname_format = $options['rpm-pkgname']; - } else { - if ($pf->getChannel() == 'pear.php.net' || $pf->getChannel() == 'pecl.php.net') { - $alias = 'PEAR'; - } else { - $chan = &$reg->getChannel($pf->getChannel()); - $alias = $chan->getAlias(); - $alias = strtoupper($alias); - $info['possible_channel'] = $pf->getChannel() . '/'; - } - $rpm_pkgname_format = $alias . '::%s'; - } - $info['extra_headers'] = ''; - $info['doc_files'] = ''; - $info['files'] = ''; - $info['package2xml'] = ''; - $info['rpm_package'] = sprintf($rpm_pkgname_format, $pf->getPackage()); - $srcfiles = 0; - foreach ($info['filelist'] as $name => $attr) { - if (!isset($attr['role'])) { - continue; - } - $name = preg_replace('![/:\\\\]!', '/', $name); - if ($attr['role'] == 'doc') { - $info['doc_files'] .= " $name"; - // Map role to the rpm vars - } else { - $c_prefix = '%{_libdir}/php/pear'; - switch ($attr['role']) { - case 'php': - $prefix = $c_prefix; - break; - case 'ext': - $prefix = '%{_libdir}/php'; - break; // XXX good place? - case 'src': - $srcfiles++; - $prefix = '%{_includedir}/php'; - break; // XXX good place? - case 'test': - $prefix = "$c_prefix/tests/" . $pf->getPackage(); - break; - case 'data': - $prefix = "$c_prefix/data/" . $pf->getPackage(); - break; - case 'script': - $prefix = '%{_bindir}'; - break; - default: // non-standard roles - $prefix = "$c_prefix/$attr[role]/" . $pf->getPackage(); - $info['extra_config'] .= - "\n -d {$attr[role]}_dir=$c_prefix/{$attr[role]} \\"; - $this->ui->outputData('WARNING: role "' . $attr['role'] . '" used, ' . - 'and will be installed in "' . $c_prefix . '/' . $attr['role'] . - '/' . $pf->getPackage() . - ' - hand-edit the final .spec if this is wrong', $command); - break; - } - $name = str_replace('\\', '/', $name); - $info['files'] .= "$prefix/$name\n"; - } - } - if ($srcfiles > 0) { - require_once 'OS/Guess.php'; - $os = new OS_Guess; - $arch = $os->getCpu(); + // Check to see if PEAR_Command_Packaging is installed, and + // transparently switch to use the "make-rpm-spec" command from it + // instead, if it does. Otherwise, continue to use the old version + // of "makerpm" supplied with this package (PEAR). + $packaging_cmd = $this->getCommandPackaging($this->ui, $this->config); + if ($packaging_cmd !== null) { + $this->ui->outputData('PEAR_Command_Packaging is installed; using '. + 'newer "make-rpm-spec" command instead'); + return $packaging_cmd->run('make-rpm-spec', $options, $params); } else { - $arch = 'noarch'; + $this->ui->outputData('WARNING: "pear makerpm" is no longer available; an '. + 'improved version is available via "pear make-rpm-spec", which '. + 'is available by installing PEAR_Command_Packaging'); } - $cfg = array('master_server', 'php_dir', 'ext_dir', 'doc_dir', - 'bin_dir', 'data_dir', 'test_dir'); - foreach ($cfg as $k) { - if ($k == 'master_server') { - $chan = $reg->getChannel($pf->getChannel()); - $info[$k] = $chan->getServer(); - continue; - } - $info[$k] = $this->config->get($k); - } - $info['arch'] = $arch; - $fp = @fopen($spec_template, "r"); - if (!$fp) { - return $this->raiseError("could not open RPM spec file template $spec_template: $php_errormsg"); - } - $info['package'] = $pf->getPackage(); - $info['version'] = $pf->getVersion(); - $info['release_license'] = $pf->getLicense(); - if ($pf->getDeps()) { - if ($pf->getPackagexmlVersion() == '1.0') { - $requires = $conflicts = array(); - foreach ($pf->getDeps() as $dep) { - if (isset($dep['optional']) && $dep['optional'] == 'yes') { - continue; - } - if ($dep['type'] != 'pkg') { - continue; - } - if (isset($dep['channel']) && $dep['channel'] != 'pear.php.net' && - $dep['channel'] != 'pecl.php.net') { - $chan = &$reg->getChannel($dep['channel']); - $package = strtoupper($chan->getAlias()) . '::' . $dep['name']; - } else { - $package = 'PEAR::' . $dep['name']; - } - $trans = array( - '>' => '>', - '<' => '<', - '>=' => '>=', - '<=' => '<=', - '=' => '=', - 'gt' => '>', - 'lt' => '<', - 'ge' => '>=', - 'le' => '<=', - 'eq' => '=', - ); - if ($dep['rel'] == 'has') { - $requires[] = $package; - } elseif ($dep['rel'] == 'not') { - $conflicts[] = $package; - } elseif ($dep['rel'] == 'ne') { - $conflicts[] = $package . ' = ' . $dep['version']; - } elseif (isset($trans[$dep['rel']])) { - $requires[] = $package . ' ' . $trans[$dep['rel']] . ' ' . $dep['version']; - } - } - if (count($requires)) { - $info['extra_headers'] .= 'Requires: ' . implode(', ', $requires) . "\n"; - } - if (count($conflicts)) { - $info['extra_headers'] .= 'Conflicts: ' . implode(', ', $conflicts) . "\n"; - } - } else { - $info['package2xml'] = '2'; // tell the spec to use package2.xml - $requires = $conflicts = array(); - $deps = $pf->getDeps(true); - if (isset($deps['required']['package'])) { - if (!isset($deps['required']['package'][0])) { - $deps['required']['package'] = array($deps['required']['package']); - } - foreach ($deps['required']['package'] as $dep) { - if ($dep['channel'] != 'pear.php.net' && $dep['channel'] != 'pecl.php.net') { - $chan = &$reg->getChannel($dep['channel']); - $package = strtoupper($chan->getAlias()) . '::' . $dep['name']; - } else { - $package = 'PEAR::' . $dep['name']; - } - if (isset($dep['conflicts']) && (isset($dep['min']) || - isset($dep['max']))) { - $deprange = array(); - if (isset($dep['min'])) { - $deprange[] = array($dep['min'],'>='); - } - if (isset($dep['max'])) { - $deprange[] = array($dep['max'], '<='); - } - if (isset($dep['exclude'])) { - if (!is_array($dep['exclude']) || - !isset($dep['exclude'][0])) { - $dep['exclude'] = array($dep['exclude']); - } - if (count($deprange)) { - $excl = $dep['exclude']; - // change >= to > if excluding the min version - // change <= to < if excluding the max version - for($i = 0; $i < count($excl); $i++) { - if (isset($deprange[0]) && - $excl[$i] == $deprange[0][0]) { - $deprange[0][1] = '<'; - unset($dep['exclude'][$i]); - } - if (isset($deprange[1]) && - $excl[$i] == $deprange[1][0]) { - $deprange[1][1] = '>'; - unset($dep['exclude'][$i]); - } - } - } - if (count($dep['exclude'])) { - $dep['exclude'] = array_values($dep['exclude']); - $newdeprange = array(); - // remove excludes that are outside the existing range - for ($i = 0; $i < count($dep['exclude']); $i++) { - if ($dep['exclude'][$i] < $dep['min'] || - $dep['exclude'][$i] > $dep['max']) { - unset($dep['exclude'][$i]); - } - } - $dep['exclude'] = array_values($dep['exclude']); - usort($dep['exclude'], 'version_compare'); - // take the remaining excludes and - // split the dependency into sub-ranges - $lastmin = $deprange[0]; - for ($i = 0; $i < count($dep['exclude']) - 1; $i++) { - $newdeprange[] = '(' . - $package . " {$lastmin[1]} {$lastmin[0]} and " . - $package . ' < ' . $dep['exclude'][$i] . ')'; - $lastmin = array($dep['exclude'][$i], '>'); - } - if (isset($dep['max'])) { - $newdeprange[] = '(' . $package . - " {$lastmin[1]} {$lastmin[0]} and " . - $package . ' < ' . $dep['max'] . ')'; - } - $conflicts[] = implode(' or ', $deprange); - } else { - $conflicts[] = $package . - " {$deprange[0][1]} {$deprange[0][0]}" . - (isset($deprange[1]) ? - " and $package {$deprange[1][1]} {$deprange[1][0]}" - : ''); - } - } - continue; - } - if (!isset($dep['min']) && !isset($dep['max']) && - !isset($dep['exclude'])) { - if (isset($dep['conflicts'])) { - $conflicts[] = $package; - } else { - $requires[] = $package; - } - } else { - if (isset($dep['min'])) { - $requires[] = $package . ' >= ' . $dep['min']; - } - if (isset($dep['max'])) { - $requires[] = $package . ' <= ' . $dep['max']; - } - if (isset($dep['exclude'])) { - $ex = $dep['exclude']; - if (!is_array($ex)) { - $ex = array($ex); - } - foreach ($ex as $ver) { - $conflicts[] = $package . ' = ' . $ver; - } - } - } - } - require_once 'Archive/Tar.php'; - $tar = new Archive_Tar($pf->getArchiveFile()); - $tar->pushErrorHandling(PEAR_ERROR_RETURN); - $a = $tar->extractInString('package2.xml'); - $tar->popErrorHandling(); - if ($a === null || PEAR::isError($a)) { - $info['package2xml'] = ''; - // this doesn't have a package.xml version 1.0 - $requires[] = 'PEAR::PEAR >= ' . - $deps['required']['pearinstaller']['min']; - } - if (count($requires)) { - $info['extra_headers'] .= 'Requires: ' . implode(', ', $requires) . "\n"; - } - if (count($conflicts)) { - $info['extra_headers'] .= 'Conflicts: ' . implode(', ', $conflicts) . "\n"; - } - } - } - } - - // remove the trailing newline - $info['extra_headers'] = trim($info['extra_headers']); - if (function_exists('file_get_contents')) { - fclose($fp); - $spec_contents = preg_replace('/@([a-z0-9_-]+)@/e', '$info["\1"]', - file_get_contents($spec_template)); - } else { - $spec_contents = preg_replace('/@([a-z0-9_-]+)@/e', '$info["\1"]', - fread($fp, filesize($spec_template))); - fclose($fp); - } - $spec_file = "$info[rpm_package]-$info[version].spec"; - $wp = fopen($spec_file, "wb"); - if (!$wp) { - return $this->raiseError("could not write RPM spec file $spec_file: $php_errormsg"); - } - fwrite($wp, $spec_contents); - fclose($wp); - $this->ui->outputData("Wrote RPM spec file $spec_file", $command); - return true; } diff --git a/includes/pear/PEAR/Command/Package.xml b/includes/pear/PEAR/Command/Package.xml index 69bc6267..e3f6a553 100644 --- a/includes/pear/PEAR/Command/Package.xml +++ b/includes/pear/PEAR/Command/Package.xml @@ -133,7 +133,7 @@ use the "slide" option to move the release tag. pd -List all depencies the package has. +List all dependencies the package has. Sign a package distribution file @@ -191,4 +191,4 @@ This is not the most intelligent conversion, and should only be used for automated conversion or learning the format. - \ No newline at end of file + diff --git a/includes/pear/PEAR/Command/Pickle.php b/includes/pear/PEAR/Command/Pickle.php index d360c091..d59396ac 100644 --- a/includes/pear/PEAR/Command/Pickle.php +++ b/includes/pear/PEAR/Command/Pickle.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 2005 The PHP Group + * @copyright 2005-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Pickle.php,v 1.4 2005/09/27 04:12:52 cellog Exp $ + * @version CVS: $Id: Pickle.php,v 1.8 2008/01/29 03:21:01 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.1 */ @@ -31,9 +31,9 @@ require_once 'PEAR/Command/Common.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 2005 The PHP Group + * @copyright 2005-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.1 */ @@ -63,8 +63,8 @@ disk in the current directory as "package.xml". Note that only simple package.xml 2.0 will be converted. package.xml 2.0 with: - dependency types other than required/optional PECL package/ext/php/pearinstaller - - more than one extsrcrelease - - extbinrelease, phprelease, or bundle release type + - more than one extsrcrelease or zendextsrcrelease + - zendextbinrelease, extbinrelease, phprelease, or bundle release type - dependency groups - ignore tags in release filelist - tasks other than replace @@ -115,7 +115,7 @@ generate both package.xml. if (!class_exists('PEAR_Common')) { require_once 'PEAR/Common.php'; } - if (!class_exists('PEAR/PackageFile.php')) { + if (!class_exists('PEAR_PackageFile')) { require_once 'PEAR/PackageFile.php'; } $a = &new PEAR_PackageFile($config, $debug, $tmpdir); @@ -156,7 +156,7 @@ generate both package.xml. require_once 'PEAR/PackageFile/v1.php'; $pf = new PEAR_PackageFile_v1; $pf->setConfig($this->config); - if (is_array($pf2->getPackageType() != 'extsrc')) { + if ($pf2->getPackageType() != 'extsrc' && $pf2->getPackageType() != 'zendextsrc') { return $this->raiseError('Cannot safely convert "' . $packagexml . '", is not an extension source package. Using a PEAR_PackageFileManager-based ' . 'script is an option'); @@ -307,7 +307,7 @@ generate both package.xml. $release = $pf2->getReleases(); if (isset($releases[0])) { return $this->raiseError('Cannot safely process "' . $packagexml . '" contains ' - . 'multiple extsrcrelease tags. Using a PEAR_PackageFileManager-based script ' . + . 'multiple extsrcrelease/zendextsrcrelease tags. Using a PEAR_PackageFileManager-based script ' . 'or the convert command is an option'); } if ($configoptions = $pf2->getConfigureOptions()) { diff --git a/includes/pear/PEAR/Command/Pickle.xml b/includes/pear/PEAR/Command/Pickle.xml index 550186fd..04c85bc7 100644 --- a/includes/pear/PEAR/Command/Pickle.xml +++ b/includes/pear/PEAR/Command/Pickle.xml @@ -26,8 +26,8 @@ an automatic conversion will be made to a package.xml 1.0. Note that only simple package.xml 2.0 will be converted. package.xml 2.0 with: - dependency types other than required/optional PECL package/ext/php/pearinstaller - - more than one extsrcrelease - - extbinrelease, phprelease, or bundle release type + - more than one extsrcrelease/zendextsrcrelease + - zendextbinrelease, extbinrelease, phprelease, or bundle release type - dependency groups - ignore tags in release filelist - tasks other than replace diff --git a/includes/pear/PEAR/Command/Registry.php b/includes/pear/PEAR/Command/Registry.php index 6e0b26dc..d2f1dd1b 100644 --- a/includes/pear/PEAR/Command/Registry.php +++ b/includes/pear/PEAR/Command/Registry.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Registry.php,v 1.68 2005/11/01 22:28:38 cellog Exp $ + * @version CVS: $Id: Registry.php,v 1.81 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -33,9 +33,9 @@ require_once 'PEAR/Command/Common.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -58,6 +58,10 @@ class PEAR_Command_Registry extends PEAR_Command_Common 'shortopt' => 'a', 'doc' => 'list installed packages from all channels', ), + 'channelinfo' => array( + 'shortopt' => 'i', + 'doc' => 'output fully channel-aware data, even on failure', + ), ), 'doc' => ' If invoked without parameters, this command lists the PEAR packages @@ -123,10 +127,33 @@ installed package.' function doList($command, $options, $params) { - if (isset($options['allchannels'])) { + $reg = &$this->config->getRegistry(); + $channelinfo = isset($options['channelinfo']); + if (isset($options['allchannels']) && !$channelinfo) { return $this->doListAll($command, array(), $params); } - $reg = &$this->config->getRegistry(); + if (isset($options['allchannels']) && $channelinfo) { + // allchannels with $channelinfo + unset($options['allchannels']); + $channels = $reg->getChannels(); + $errors = array(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + foreach ($channels as $channel) { + $options['channel'] = $channel->getName(); + $ret = $this->doList($command, $options, $params); + + if (PEAR::isError($ret)) { + $errors[] = $ret; + } + } + PEAR::staticPopErrorHandling(); + if (count($errors)) { + // for now, only give first error + return PEAR::raiseError($errors[0]); + } + return true; + } + if (count($params) == 1) { return $this->doFileList($command, $options, $params); } @@ -141,21 +168,46 @@ installed package.' } $installed = $reg->packageInfo(null, null, $channel); usort($installed, array(&$this, '_sortinfo')); - $i = $j = 0; + $data = array( 'caption' => 'Installed packages, channel ' . $channel . ':', 'border' => true, - 'headline' => array('Package', 'Version', 'State') + 'headline' => array('Package', 'Version', 'State'), + 'channel' => $channel, ); + if ($channelinfo) { + $data['headline'] = array('Channel', 'Package', 'Version', 'State'); + } + + if (count($installed) && !isset($data['data'])) { + $data['data'] = array(); + } + foreach ($installed as $package) { $pobj = $reg->getPackage(isset($package['package']) ? $package['package'] : $package['name'], $channel); - $data['data'][] = array($pobj->getPackage(), $pobj->getVersion(), + if ($channelinfo) { + $packageinfo = array($pobj->getChannel(), $pobj->getPackage(), $pobj->getVersion(), $pobj->getState() ? $pobj->getState() : null); + } else { + $packageinfo = array($pobj->getPackage(), $pobj->getVersion(), + $pobj->getState() ? $pobj->getState() : null); + } + $data['data'][] = $packageinfo; } - if (count($installed)==0) { - $data = '(no packages installed from channel ' . $channel . ')'; + if (count($installed) == 0) { + if (!$channelinfo) { + $data = '(no packages installed from channel ' . $channel . ')'; + } else { + $data = array( + 'caption' => 'Installed packages, channel ' . + $channel . ':', + 'border' => true, + 'channel' => $channel, + 'data' => '(no packages installed)', + ); + } } $this->ui->outputData($data, $command); return true; @@ -163,15 +215,18 @@ installed package.' function doListAll($command, $options, $params) { + // This duplicate code is deprecated over + // list --channelinfo, which gives identical + // output for list and list --allchannels. $reg = &$this->config->getRegistry(); $installed = $reg->packageInfo(null, null, null); foreach ($installed as $channel => $packages) { usort($packages, array($this, '_sortinfo')); - $i = $j = 0; $data = array( 'caption' => 'Installed packages, channel ' . $channel . ':', 'border' => true, - 'headline' => array('Package', 'Version', 'State') + 'headline' => array('Package', 'Version', 'State'), + 'channel' => $channel ); foreach ($packages as $package) { $pobj = $reg->getPackage(isset($package['package']) ? @@ -184,6 +239,7 @@ installed package.' 'caption' => 'Installed packages, channel ' . $channel . ':', 'border' => true, 'data' => array(array('(no packages installed)')), + 'channel' => $channel ); } $this->ui->outputData($data, $command); @@ -197,9 +253,12 @@ installed package.' return $this->raiseError('list-files expects 1 parameter'); } $reg = &$this->config->getRegistry(); + $fp = false; if (!is_dir($params[0]) && (file_exists($params[0]) || $fp = @fopen($params[0], 'r'))) { - @fclose($fp); + if ($fp) { + fclose($fp); + } if (!class_exists('PEAR_PackageFile')) { require_once 'PEAR/PackageFile.php'; } @@ -309,7 +368,10 @@ installed package.' function doShellTest($command, $options, $params) { - $this->pushErrorHandling(PEAR_ERROR_RETURN); + if (count($params) < 1) { + return PEAR::raiseError('ERROR, usage: pear shell-test packagename [[relation] version]'); + } + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $reg = &$this->config->getRegistry(); $info = $reg->parsePackageName($params[0], $this->config->get('default_channel')); if (PEAR::isError($info)) { @@ -342,7 +404,7 @@ installed package.' exit(1); } } else { - $this->popErrorHandling(); + PEAR::staticPopErrorHandling(); $this->raiseError("$command: expects 1 to 3 parameters"); exit(1); } @@ -356,10 +418,12 @@ installed package.' if (count($params) != 1) { return $this->raiseError('pear info expects 1 parameter'); } - $info = false; + $info = $fp = false; $reg = &$this->config->getRegistry(); - if ((@is_file($params[0]) && !is_dir($params[0])) || $fp = @fopen($params[0], 'r')) { - @fclose($fp); + if ((file_exists($params[0]) && is_file($params[0]) && !is_dir($params[0])) || $fp = @fopen($params[0], 'r')) { + if ($fp) { + fclose($fp); + } if (!class_exists('PEAR_PackageFile')) { require_once 'PEAR/PackageFile.php'; } @@ -524,7 +588,7 @@ installed package.' unset($info[$key]); $info['Last Modified'] = $hdate; } elseif ($key == '_lastversion') { - $info['Last Installed Version'] = $info[$key] ? $info[$key] : '- None -'; + $info['Previous Installed Version'] = $info[$key] ? $info[$key] : '- None -'; unset($info[$key]); } else { $info[$key] = trim($info[$key]); @@ -566,9 +630,15 @@ installed package.' case 'extsrc' : $release = 'PECL-style PHP extension (source code)'; break; + case 'zendextsrc' : + $release = 'PECL-style Zend extension (source code)'; + break; case 'extbin' : $release = 'PECL-style PHP extension (binary)'; break; + case 'zendextbin' : + $release = 'PECL-style Zend extension (binary)'; + break; case 'bundle' : $release = 'Package bundle (collection of packages)'; break; @@ -623,9 +693,12 @@ installed package.' } $info['Release Notes'] = $obj->getNotes(); if ($compat = $obj->getCompatible()) { + if (!isset($compat[0])) { + $compat = array($compat); + } $info['Compatible with'] = ''; foreach ($compat as $package) { - $info['Compatible with'] .= $package['channel'] . '/' . $package['package'] . + $info['Compatible with'] .= $package['channel'] . '/' . $package['name'] . "\nVersions >= " . $package['min'] . ', <= ' . $package['max']; if (isset($package['exclude'])) { if (is_array($package['exclude'])) { @@ -637,7 +710,7 @@ installed package.' $info['Not Compatible with'] .= "\n"; } $info['Not Compatible with'] .= $package['channel'] . '/' . - $package['package'] . "\nVersions " . $package['exclude']; + $package['name'] . "\nVersions " . $package['exclude']; } } } @@ -980,10 +1053,10 @@ installed package.' $info['package.xml version'] = '2.0'; if ($installed) { if ($obj->getLastModified()) { - $info['Last Modified'] = date('Y-m-d H:m', $obj->getLastModified()); + $info['Last Modified'] = date('Y-m-d H:i', $obj->getLastModified()); } $v = $obj->getLastInstalledVersion(); - $info['Last Installed Version'] = $v ? $v : '- None -'; + $info['Previous Installed Version'] = $v ? $v : '- None -'; } foreach ($info as $key => $value) { $data['data'][] = array($key, $value); diff --git a/includes/pear/PEAR/Command/Registry.xml b/includes/pear/PEAR/Command/Registry.xml index 57a55b9a..9f4e2149 100644 --- a/includes/pear/PEAR/Command/Registry.xml +++ b/includes/pear/PEAR/Command/Registry.xml @@ -13,6 +13,10 @@ a list installed packages from all channels + + i + output fully channel-aware data, even on failure + <package> If invoked without parameters, this command lists the PEAR packages diff --git a/includes/pear/PEAR/Command/Remote.php b/includes/pear/PEAR/Command/Remote.php index ee768de1..c4fa9088 100644 --- a/includes/pear/PEAR/Command/Remote.php +++ b/includes/pear/PEAR/Command/Remote.php @@ -15,9 +15,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Remote.php,v 1.86 2005/11/14 14:11:05 cellog Exp $ + * @version CVS: $Id: Remote.php,v 1.107 2008/04/11 01:16:40 dufuz Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -35,9 +35,9 @@ require_once 'PEAR/REST.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -58,7 +58,12 @@ Get details on a package from the server.', 'summary' => 'List Available Upgrades', 'function' => 'doListUpgrades', 'shortcut' => 'lu', - 'options' => array(), + 'options' => array( + 'channelinfo' => array( + 'shortopt' => 'i', + 'doc' => 'output fully channel-aware data, even on failure', + ), + ), 'doc' => '[preferred_state] List releases on the server of packages you have installed where a newer version is available with the same release state (stable etc.) @@ -90,7 +95,15 @@ latest stable release of each package.', 'shortopt' => 'c', 'doc' => 'specify a channel other than the default channel', 'arg' => 'CHAN', - ) + ), + 'allchannels' => array( + 'shortopt' => 'a', + 'doc' => 'search packages from all known channels', + ), + 'channelinfo' => array( + 'shortopt' => 'i', + 'doc' => 'output fully channel-aware data, even on failure', + ), ), 'doc' => '[packagename] [packageinfo] Lists all packages which match the search parameters. The first @@ -108,7 +121,11 @@ will be used to match any portion of the summary/description', 'shortopt' => 'c', 'doc' => 'specify a channel other than the default channel', 'arg' => 'CHAN', - ) + ), + 'channelinfo' => array( + 'shortopt' => 'i', + 'doc' => 'output fully channel-aware data, even on failure', + ), ), 'doc' => ' Lists the packages available on the configured server along with the @@ -158,8 +175,17 @@ parameter. function _checkChannelForStatus($channel, $chan) { + if (PEAR::isError($chan)) { + $this->raiseError($chan); + } + if (!is_a($chan, 'PEAR_ChannelFile')) { + return $this->raiseError('Internal corruption error: invalid channel "' . + $channel . '"'); + } $rest = new PEAR_REST($this->config); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $mirror = $this->config->get('preferred_mirror', null, + $channel); $a = $rest->downloadHttp('http://' . $channel . '/channel.xml', $chan->lastModified()); PEAR::staticPopErrorHandling(); @@ -184,15 +210,17 @@ parameter. if (PEAR::isError($parsed)) { return $this->raiseError('Invalid package name "' . $package . '"'); } - + $channel = $parsed['channel']; $this->config->set('default_channel', $channel); $chan = $reg->getChannel($channel); - $this->_checkChannelForStatus($channel, $chan); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } if ($chan->supportsREST($this->config->get('preferred_mirror')) && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { $rest = &$this->config->getREST('1.0', array()); - $info = $rest->packageInfo($base, $parsed['package']); + $info = $rest->packageInfo($base, $parsed['package'], $channel); } else { $r = &$this->config->getRemote(); $info = $r->call('package.info', $parsed['package']); @@ -233,7 +261,9 @@ parameter. } } $chan = $reg->getChannel($channel); - $this->_checkChannelForStatus($channel, $chan); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } $list_options = false; if ($this->config->get('preferred_state') == 'stable') { $list_options = true; @@ -242,11 +272,11 @@ parameter. $base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror'))) { // use faster list-all if available $rest = &$this->config->getREST('1.1', array()); - $available = $rest->listAll($base, $list_options); + $available = $rest->listAll($base, $list_options, true, false, false, $chan->getName()); } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { $rest = &$this->config->getREST('1.0', array()); - $available = $rest->listAll($base, $list_options); + $available = $rest->listAll($base, $list_options, true, false, false, $chan->getName()); } else { $r = &$this->config->getRemote(); if ($channel == 'pear.php.net') { @@ -265,6 +295,7 @@ parameter. 'caption' => 'Channel ' . $channel . ' Available packages:', 'border' => true, 'headline' => array('Package', 'Version'), + 'channel' => $channel ); if (count($available)==0) { $data = '(no packages available yet)'; @@ -299,16 +330,18 @@ parameter. $list_options = true; } $chan = $reg->getChannel($channel); - $this->_checkChannelForStatus($channel, $chan); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } if ($chan->supportsREST($this->config->get('preferred_mirror')) && $base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror'))) { // use faster list-all if available $rest = &$this->config->getREST('1.1', array()); - $available = $rest->listAll($base, $list_options, false); + $available = $rest->listAll($base, $list_options, false, false, false, $chan->getName()); } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { $rest = &$this->config->getREST('1.0', array()); - $available = $rest->listAll($base, $list_options, false); + $available = $rest->listAll($base, $list_options, false, false, false, $chan->getName()); } else { $r = &$this->config->getRemote(); if ($channel == 'pear.php.net') { @@ -323,10 +356,17 @@ parameter. return $this->raiseError('The package list could not be fetched from the remote server. Please try again. (Debug info: "' . $available->getMessage() . '")'); } $data = array( - 'caption' => 'All packages:', + 'caption' => 'All packages [Channel ' . $channel . ']:', 'border' => true, 'headline' => array('Package', 'Latest', 'Local'), + 'channel' => $channel, ); + if (isset($options['channelinfo'])) { + // add full channelinfo + $data['caption'] = 'Channel ' . $channel . ' All packages:'; + $data['headline'] = array('Channel', 'Package', 'Latest', 'Local', + 'Description', 'Dependencies'); + } $local_pkgs = $reg->listPackages($channel); foreach ($available as $name => $info) { @@ -360,13 +400,39 @@ parameter. if (isset($info['stable']) && !$info['stable']) { $info['stable'] = null; } - $data['data'][$info['category']][] = array( - $reg->channelAlias($channel) . '/' . $name, - @$info['stable'], - @$installed['version'], - @$desc, - @$info['deps'], + + if (isset($options['channelinfo'])) { + // add full channelinfo + if ($info['stable'] === $info['unstable']) { + $state = $info['state']; + } else { + $state = 'stable'; + } + $latest = $info['stable'].' ('.$state.')'; + $local = ''; + if (isset($installed['version'])) { + $inst_state = $reg->packageInfo($name, 'release_state', $channel); + $local = $installed['version'].' ('.$inst_state.')'; + } + + $packageinfo = array( + $channel, + $name, + $latest, + $local, + isset($desc) ? $desc : null, + isset($info['deps']) ? $info['deps'] : null, ); + } else { + $packageinfo = array( + $reg->channelAlias($channel) . '/' . $name, + isset($info['stable']) ? $info['stable'] : null, + isset($installed['version']) ? $installed['version'] : null, + isset($desc) ? $desc : null, + isset($info['deps']) ? $info['deps'] : null, + ); + } + $data['data'][$info['category']][] = $packageinfo; } if (isset($options['mode']) && in_array($options['mode'], array('notinstalled', 'upgrades'))) { @@ -401,8 +467,33 @@ parameter. return $this->raiseError('no valid search string supplied'); }; - $savechannel = $channel = $this->config->get('default_channel'); + $channelinfo = isset($options['channelinfo']); $reg = &$this->config->getRegistry(); + if (isset($options['allchannels'])) { + // search all channels + unset($options['allchannels']); + $channels = $reg->getChannels(); + $errors = array(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + foreach ($channels as $channel) { + if ($channel->getName() != '__uri') { + $options['channel'] = $channel->getName(); + $ret = $this->doSearch($command, $options, $params); + if (PEAR::isError($ret)) { + $errors[] = $ret; + } + } + } + PEAR::staticPopErrorHandling(); + if (count($errors) !== 0) { + // for now, only give first error + return PEAR::raiseError($errors[0]); + } + + return true; + } + + $savechannel = $channel = $this->config->get('default_channel'); $package = $params[0]; $summary = isset($params[1]) ? $params[1] : false; if (isset($options['channel'])) { @@ -415,50 +506,85 @@ parameter. } } $chan = $reg->getChannel($channel); - $this->_checkChannelForStatus($channel, $chan); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } if ($chan->supportsREST($this->config->get('preferred_mirror')) && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { $rest = &$this->config->getREST('1.0', array()); - $available = $rest->listAll($base, false, false, $package, $summary); + $available = $rest->listAll($base, false, false, $package, $summary, $chan->getName()); } else { $r = &$this->config->getRemote(); - $available = $r->call('package.search', $package, $summary, true, + $available = $r->call('package.search', $package, $summary, true, $this->config->get('preferred_state') == 'stable', true); } if (PEAR::isError($available)) { $this->config->set('default_channel', $savechannel); return $this->raiseError($available); } - if (!$available) { - return $this->raiseError('no packages found that match pattern "' . $package . '"'); + if (!$available && !$channelinfo) { + // clean exit when not found, no error ! + $data = 'no packages found that match pattern "' . $package . '", for channel '.$channel.'.'; + $this->ui->outputData($data); + $this->config->set('default_channel', $channel); + return true; + } + if ($channelinfo) { + $data = array( + 'caption' => 'Matched packages, channel ' . $channel . ':', + 'border' => true, + 'headline' => array('Channel', 'Package', 'Stable/(Latest)', 'Local'), + 'channel' => $channel + ); + } else { + $data = array( + 'caption' => 'Matched packages, channel ' . $channel . ':', + 'border' => true, + 'headline' => array('Package', 'Stable/(Latest)', 'Local'), + 'channel' => $channel + ); } - $data = array( - 'caption' => 'Matched packages, channel ' . $channel . ':', - 'border' => true, - 'headline' => array('Package', 'Stable/(Latest)', 'Local'), - ); + if (!$available && $channelinfo) { + unset($data['headline']); + $data['data'] = 'No packages found that match pattern "' . $package . '".'; + $available = array(); + } foreach ($available as $name => $info) { $installed = $reg->packageInfo($name, null, $channel); $desc = $info['summary']; if (isset($params[$name])) $desc .= "\n\n".$info['description']; - $unstable = ''; - if ($info['unstable']) { - $unstable = '/(' . $info['unstable'] . ' ' . $info['state'] . ')'; - } if (!isset($info['stable']) || !$info['stable']) { - $info['stable'] = 'none'; + $version_remote = 'none'; + } else { + if ($info['unstable']) { + $version_remote = $info['unstable']; + } else { + $version_remote = $info['stable']; + } + $version_remote .= ' ('.$info['state'].')'; } $version = is_array($installed['version']) ? $installed['version']['release'] : $installed['version']; - $data['data'][$info['category']][] = array( - $name, - $info['stable'] . $unstable, - $version, - $desc, + if ($channelinfo) { + $packageinfo = array( + $channel, + $name, + $version_remote, + $version, + $desc, ); + } else { + $packageinfo = array( + $name, + $version_remote, + $version, + $desc, + ); + } + $data['data'][$info['category']][] = $packageinfo; } $this->ui->outputData($data, $command); $this->config->set('default_channel', $channel); @@ -480,8 +606,20 @@ parameter. { // make certain that dependencies are ignored $options['downloadonly'] = 1; + + // eliminate error messages for preferred_state-related errors + /* TODO: Should be an option, but until now download does respect + prefered state */ + /* $options['ignorepreferred_state'] = 1; */ + // eliminate error messages for preferred_state-related errors + $downloader = &$this->getDownloader($options); - $downloader->setDownloadDir(getcwd()); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $e = $downloader->setDownloadDir(getcwd()); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($e)) { + return $this->raiseError('Current directory is not writeable, cannot download'); + } $errors = array(); $downloaded = array(); $err = $downloader->download($params); @@ -490,10 +628,9 @@ parameter. } $errors = $downloader->getErrorMsgs(); if (count($errors)) { - $errinfo = array(); - $errinfo['data'] = array($errors); - $errinfo['headline'] = 'Download Errors'; - $this->ui->outputData($errinfo); + foreach ($errors as $error) { + $this->ui->outputData($error); + } return $this->raiseError("$command failed"); } $downloaded = $downloader->getDownloadedPackages(); @@ -516,6 +653,9 @@ parameter. function doListUpgrades($command, $options, $params) { require_once 'PEAR/Common.php'; + if (isset($params[0]) && !is_array(PEAR_Common::betterStates($params[0]))) { + return $this->raiseError($params[0] . ' is not a valid state (stable/beta/alpha/devel/etc.) try "pear help list-upgrades"'); + } $savechannel = $channel = $this->config->get('default_channel'); $reg = &$this->config->getRegistry(); foreach ($reg->listChannels() as $channel) { @@ -534,7 +674,9 @@ parameter. } $caption = $channel . ' Available Upgrades'; $chan = $reg->getChannel($channel); - $this->_checkChannelForStatus($channel, $chan); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } if ($chan->supportsREST($this->config->get('preferred_mirror')) && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { $rest = &$this->config->getREST('1.0', array()); @@ -570,6 +712,7 @@ parameter. 'caption' => $caption, 'border' => 1, 'headline' => array('Channel', 'Package', 'Local', 'Remote', 'Size'), + 'channel' => $channel ); foreach ((array)$latest as $pkg => $info) { $package = strtolower($pkg); @@ -595,10 +738,22 @@ parameter. } $data['data'][] = array($channel, $pkg, "$inst_version ($inst_state)", "$version ($state)", $fs); } - if (empty($data['data'])) { - $this->ui->outputData('Channel ' . $channel . ': No upgrades available'); - } else { + if (isset($options['channelinfo'])) { + if (empty($data['data'])) { + unset($data['headline']); + if (count($inst) == 0) { + $data['data'] = '(no packages installed)'; + } else { + $data['data'] = '(no upgrades available)'; + } + } $this->ui->outputData($data, $command); + } else { + if (empty($data['data'])) { + $this->ui->outputData('Channel ' . $channel . ': No upgrades available'); + } else { + $this->ui->outputData($data, $command); + } } } $this->config->set('default_channel', $savechannel); @@ -613,6 +768,9 @@ parameter. $cache_dir = $this->config->get('cache_dir'); $verbose = $this->config->get('verbose'); $output = ''; + if (!file_exists($cache_dir) || !is_dir($cache_dir)) { + return $this->raiseError("$cache_dir does not exist or is not a directory"); + } if (!($dp = @opendir($cache_dir))) { return $this->raiseError("opendir($cache_dir) failed: $php_errormsg"); } @@ -621,17 +779,22 @@ parameter. } $num = 0; while ($ent = readdir($dp)) { - if (preg_match('/^xmlrpc_cache_[a-z0-9]{32}$/', $ent) || - preg_match('/rest.cache(file|id)$/', $ent)) { + if (preg_match('/^xmlrpc_cache_[a-z0-9]{32}\\z/', $ent) || + preg_match('/rest.cache(file|id)\\z/', $ent)) { $path = $cache_dir . DIRECTORY_SEPARATOR . $ent; - $ok = @unlink($path); + if (file_exists($path)) { + $ok = @unlink($path); + } else { + $ok = false; + $php_errormsg = ''; + } if ($ok) { if ($verbose >= 2) { $output .= "deleted $path\n"; } $num++; } elseif ($verbose >= 1) { - $output .= "failed to delete $path\n"; + $output .= "failed to delete $path $php_errormsg\n"; } } } diff --git a/includes/pear/PEAR/Command/Remote.xml b/includes/pear/PEAR/Command/Remote.xml index 7c43a885..d06f2227 100644 --- a/includes/pear/PEAR/Command/Remote.xml +++ b/includes/pear/PEAR/Command/Remote.xml @@ -27,6 +27,10 @@ or the state passed as the second parameter. specify a channel other than the default channel CHAN + + i + output fully channel-aware data, even on failure + Lists the packages available on the configured server along with the @@ -42,6 +46,14 @@ latest stable release of each package. specify a channel other than the default channel CHAN + + a + search packages from all known channels + + + i + output fully channel-aware data, even on failure + [packagename] [packageinfo] Lists all packages which match the search parameters. The first @@ -59,6 +71,10 @@ will be used to match any portion of the summary/description specify a channel other than the default channel CHAN + + i + output fully channel-aware data, even on failure + Lists the packages available on the configured server along with the diff --git a/includes/pear/PEAR/Command/Test.php b/includes/pear/PEAR/Command/Test.php index 8b778613..4cf40f61 100644 --- a/includes/pear/PEAR/Command/Test.php +++ b/includes/pear/PEAR/Command/Test.php @@ -15,9 +15,9 @@ * @author Stig Bakken * @author Martin Jansen * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Test.php,v 1.5 2005/08/31 07:18:46 pajoye Exp $ + * @version CVS: $Id: Test.php,v 1.27 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -35,9 +35,9 @@ require_once 'PEAR/Command/Common.php'; * @author Stig Bakken * @author Martin Jansen * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -77,6 +77,24 @@ class PEAR_Command_Test extends PEAR_Command_Common 'shortopt' => 'p', 'doc' => 'Treat parameters as installed packages from which to run tests', ), + 'phpunit' => array( + 'shortopt' => 'u', + 'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests +If none is found, all .phpt tests will be tried instead.', + ), + 'tapoutput' => array( + 'shortopt' => 't', + 'doc' => 'Output run-tests.log in TAP-compliant format', + ), + 'cgi' => array( + 'shortopt' => 'c', + 'doc' => 'CGI php executable (needed for tests with POST/GET section)', + 'arg' => 'PHPCGI', + ), + 'coverage' => array( + 'shortopt' => 'x', + 'doc' => 'Generate a code coverage report (requires Xdebug 2.0.0+)', + ), ), 'doc' => '[testfile|dir ...] Run regression tests with PHP\'s regression testing script (run-tests.php).', @@ -103,18 +121,16 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).', function doRunTests($command, $options, $params) { + if (isset($options['phpunit']) && isset($options['tapoutput'])) { + return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time'); + } require_once 'PEAR/Common.php'; - require_once 'PEAR/RunTest.php'; require_once 'System.php'; $log = new PEAR_Common; $log->ui = &$this->ui; // slightly hacky, but it will work - $run = new PEAR_RunTest($log, $options); $tests = array(); - if (isset($options['recur'])) { - $depth = 4; - } else { - $depth = 1; - } + $depth = isset($options['recur']) ? 4 : 1; + if (!count($params)) { $params[] = '.'; } @@ -127,79 +143,140 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).', if (PEAR::isError($pname)) { return $this->raiseError($pname); } + $package = &$reg->getPackage($pname['package'], $pname['channel']); if (!$package) { return PEAR::raiseError('Unknown package "' . $reg->parsedPackageNameToString($pname) . '"'); } + $filelist = $package->getFilelist(); foreach ($filelist as $name => $atts) { if (isset($atts['role']) && $atts['role'] != 'test') { continue; } - if (!preg_match('/\.phpt$/', $name)) { + + if (isset($options['phpunit']) && preg_match('/AllTests\.php\\z/i', $name)) { + $params[] = $atts['installed_as']; + continue; + } elseif (!preg_match('/\.phpt\\z/', $name)) { continue; } $params[] = $atts['installed_as']; } } } + foreach ($params as $p) { if (is_dir($p)) { + if (isset($options['phpunit'])) { + $dir = System::find(array($p, '-type', 'f', + '-maxdepth', $depth, + '-name', 'AllTests.php')); + if (count($dir)) { + foreach ($dir as $p) { + $p = realpath($p); + if (!count($tests) || + (count($tests) && strlen($p) < strlen($tests[0]))) { + // this is in a higher-level directory, use this one instead. + $tests = array($p); + } + } + } + continue; + } $dir = System::find(array($p, '-type', 'f', '-maxdepth', $depth, '-name', '*.phpt')); $tests = array_merge($tests, $dir); } else { - if (!@file_exists($p)) { - if (!preg_match('/\.phpt$/', $p)) { - $p .= '.phpt'; + if (isset($options['phpunit'])) { + if (preg_match('/AllTests\.php\\z/i', $p)) { + $p = realpath($p); + if (!count($tests) || + (count($tests) && strlen($p) < strlen($tests[0]))) { + // this is in a higher-level directory, use this one instead. + $tests = array($p); + } } - $dir = System::find(array(dirname($p), '-type', 'f', - '-maxdepth', $depth, - '-name', $p)); - $tests = array_merge($tests, $dir); - } else { - $tests[] = $p; + continue; } + + if (file_exists($p) && preg_match('/\.phpt$/', $p)) { + $tests[] = $p; + continue; + } + + if (!preg_match('/\.phpt\\z/', $p)) { + $p .= '.phpt'; + } + $dir = System::find(array(dirname($p), '-type', 'f', + '-maxdepth', $depth, + '-name', $p)); + $tests = array_merge($tests, $dir); } } + $ini_settings = ''; if (isset($options['ini'])) { $ini_settings .= $options['ini']; } + if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) { $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}"; } + if ($ini_settings) { $this->ui->outputData('Using INI settings: "' . $ini_settings . '"'); } $skipped = $passed = $failed = array(); - $this->ui->outputData('Running ' . count($tests) . ' tests', $command); + $tests_count = count($tests); + $this->ui->outputData('Running ' . $tests_count . ' tests', $command); $start = time(); - if (isset($options['realtimelog'])) { - @unlink('run-tests.log'); + if (isset($options['realtimelog']) && file_exists('run-tests.log')) { + unlink('run-tests.log'); } + + if (isset($options['tapoutput'])) { + $tap = '1..' . $tests_count . "\n"; + } + + require_once 'PEAR/RunTest.php'; + $run = new PEAR_RunTest($log, $options); + $run->tests_count = $tests_count; + + if (isset($options['coverage']) && extension_loaded('xdebug')){ + $run->xdebug_loaded = true; + } else { + $run->xdebug_loaded = false; + } + + $j = $i = 1; foreach ($tests as $t) { if (isset($options['realtimelog'])) { $fp = @fopen('run-tests.log', 'a'); if ($fp) { - fwrite($fp, "Running test $t..."); + fwrite($fp, "Running test [$i / $tests_count] $t..."); fclose($fp); } } PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $result = $run->run($t, $ini_settings); + if (isset($options['phpunit'])) { + $result = $run->runPHPUnit($t, $ini_settings); + } else { + $result = $run->run($t, $ini_settings, $j); + } PEAR::staticPopErrorHandling(); if (PEAR::isError($result)) { - $this->ui->log(0, $result->getMessage()); + $this->ui->log($result->getMessage()); continue; } - if (OS_WINDOWS) { - for($i=0;$i<2000;$i++) { - $i = $i; // delay - race conditions on windows - } + + if (isset($options['tapoutput'])) { + $tap .= $result[0] . ' ' . $i . $result[1] . "\n"; + continue; } + if (isset($options['realtimelog'])) { $fp = @fopen('run-tests.log', 'a'); if ($fp) { @@ -207,6 +284,7 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).', fclose($fp); } } + if ($result == 'FAILED') { $failed[] = $t; } @@ -216,28 +294,40 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).', if ($result == 'SKIPPED') { $skipped[] = $t; } + + $j++; } + $total = date('i:s', time() - $start); - if (count($failed)) { - $output = "TOTAL TIME: $total\n"; - $output .= count($passed) . " PASSED TESTS\n"; - $output .= count($skipped) . " SKIPPED TESTS\n"; - $output .= count($failed) . " FAILED TESTS:\n"; - foreach ($failed as $failure) { - $output .= $failure . "\n"; - } - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - } else { - $fp = @fopen('run-tests.log', 'w'); - } + if (isset($options['tapoutput'])) { + $fp = @fopen('run-tests.log', 'w'); if ($fp) { - fwrite($fp, $output, strlen($output)); + fwrite($fp, $tap, strlen($tap)); fclose($fp); - $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command); + $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') . + '"', $command); + } + } else { + if (count($failed)) { + $output = "TOTAL TIME: $total\n"; + $output .= count($passed) . " PASSED TESTS\n"; + $output .= count($skipped) . " SKIPPED TESTS\n"; + $output .= count($failed) . " FAILED TESTS:\n"; + foreach ($failed as $failure) { + $output .= $failure . "\n"; + } + + $mode = isset($options['realtimelog']) ? 'a' : 'w'; + $fp = @fopen('run-tests.log', $mode); + + if ($fp) { + fwrite($fp, $output, strlen($output)); + fclose($fp); + $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command); + } + } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) { + @unlink('run-tests.log'); } - } elseif (@file_exists('run-tests.log') && !@is_dir('run-tests.log')) { - @unlink('run-tests.log'); } $this->ui->outputData('TOTAL TIME: ' . $total); $this->ui->outputData(count($passed) . ' PASSED TESTS', $command); @@ -252,6 +342,4 @@ Run regression tests with PHP\'s regression testing script (run-tests.php).', return true; } // }}} -} - -?> +} \ No newline at end of file diff --git a/includes/pear/PEAR/Command/Test.xml b/includes/pear/PEAR/Command/Test.xml index 30659bcd..68e8f538 100644 --- a/includes/pear/PEAR/Command/Test.xml +++ b/includes/pear/PEAR/Command/Test.xml @@ -29,6 +29,24 @@ p Treat parameters as installed packages from which to run tests + + u + Search parameters for AllTests.php, and use that to run phpunit-based tests. +If none is found, all .phpt tests will be tried instead. + + + t + Output run-tests.log in TAP-compliant format + + + c + CGI php executable (needed for tests with POST/GET section) + PHPCGI + + + x + Generate a code coverage report (requires Xdebug 2.0.0+) + [testfile|dir ...] Run regression tests with PHP's regression testing script (run-tests.php). diff --git a/includes/pear/PEAR/Common.php b/includes/pear/PEAR/Common.php index d7b1361f..73ec384f 100644 --- a/includes/pear/PEAR/Common.php +++ b/includes/pear/PEAR/Common.php @@ -15,9 +15,9 @@ * @author Stig Bakken * @author Tomas V. V. Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Common.php,v 1.152 2005/11/12 02:26:59 cellog Exp $ + * @version CVS: $Id: Common.php,v 1.160 2008/01/03 20:26:34 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1.0 * @deprecated File deprecated since Release 1.4.0a1 @@ -35,32 +35,32 @@ require_once 'PEAR.php'; */ define('PEAR_COMMON_ERROR_INVALIDPHP', 1); define('_PEAR_COMMON_PACKAGE_NAME_PREG', '[A-Za-z][a-zA-Z0-9_]+'); -define('PEAR_COMMON_PACKAGE_NAME_PREG', '/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '$/'); +define('PEAR_COMMON_PACKAGE_NAME_PREG', '/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/'); // this should allow: 1, 1.0, 1.0RC1, 1.0dev, 1.0dev123234234234, 1.0a1, 1.0b1, 1.0pl1 define('_PEAR_COMMON_PACKAGE_VERSION_PREG', '\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?'); -define('PEAR_COMMON_PACKAGE_VERSION_PREG', '/^' . _PEAR_COMMON_PACKAGE_VERSION_PREG . '$/i'); +define('PEAR_COMMON_PACKAGE_VERSION_PREG', '/^' . _PEAR_COMMON_PACKAGE_VERSION_PREG . '\\z/i'); // XXX far from perfect :-) define('_PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '(' . _PEAR_COMMON_PACKAGE_NAME_PREG . ')(-([.0-9a-zA-Z]+))?'); define('PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_PACKAGE_DOWNLOAD_PREG . - '$/'); + '\\z/'); -define('_PEAR_CHANNELS_NAME_PREG', '[A-Za-z][a-zA-Z0-9_\.]+'); -define('PEAR_CHANNELS_NAME_PREG', '/^' . _PEAR_CHANNELS_NAME_PREG . '$/'); +define('_PEAR_CHANNELS_NAME_PREG', '[A-Za-z][a-zA-Z0-9\.]+'); +define('PEAR_CHANNELS_NAME_PREG', '/^' . _PEAR_CHANNELS_NAME_PREG . '\\z/'); // this should allow any dns or IP address, plus a path - NO UNDERSCORES ALLOWED -define('_PEAR_CHANNELS_SERVER_PREG', '[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*(\/[a-zA-Z0-9-]+)*'); -define('PEAR_CHANNELS_SERVER_PREG', '/^' . _PEAR_CHANNELS_SERVER_PREG . '$/i'); +define('_PEAR_CHANNELS_SERVER_PREG', '[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*(\/[a-zA-Z0-9\-]+)*'); +define('PEAR_CHANNELS_SERVER_PREG', '/^' . _PEAR_CHANNELS_SERVER_PREG . '\\z/i'); define('_PEAR_CHANNELS_PACKAGE_PREG', '(' ._PEAR_CHANNELS_SERVER_PREG . ')\/(' . _PEAR_COMMON_PACKAGE_NAME_PREG . ')'); -define('PEAR_CHANNELS_PACKAGE_PREG', '/^' . _PEAR_CHANNELS_PACKAGE_PREG . '$/i'); +define('PEAR_CHANNELS_PACKAGE_PREG', '/^' . _PEAR_CHANNELS_PACKAGE_PREG . '\\z/i'); define('_PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '(' . _PEAR_CHANNELS_NAME_PREG . ')::(' . _PEAR_COMMON_PACKAGE_NAME_PREG . ')(-([.0-9a-zA-Z]+))?'); -define('PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_CHANNEL_DOWNLOAD_PREG . '$/'); +define('PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_CHANNEL_DOWNLOAD_PREG . '\\z/'); /** * List of temporary files and directories registered by @@ -126,9 +126,9 @@ $GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'p * @author Stig Bakken * @author Tomas V. V. Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 * @deprecated This class will disappear, and its components will be spread @@ -159,7 +159,7 @@ class PEAR_Common extends PEAR /** * Configuration object (PEAR_Config). - * @var object + * @var PEAR_Config */ var $config = null; @@ -453,7 +453,9 @@ class PEAR_Common extends PEAR unset($arr['dependencies']); unset($arr['phprelease']); unset($arr['extsrcrelease']); + unset($arr['zendextsrcrelease']); unset($arr['extbinrelease']); + unset($arr['zendextbinrelease']); unset($arr['bundle']); unset($arr['lead']); unset($arr['developer']); @@ -660,13 +662,8 @@ class PEAR_Common extends PEAR if (!$fp = @fopen($file, "r")) { return false; } - if (function_exists('file_get_contents')) { - fclose($fp); - $contents = file_get_contents($file); - } else { - $contents = fread($fp, filesize($file)); - fclose($fp); - } + fclose($fp); + $contents = file_get_contents($file); $tokens = token_get_all($contents); /* for ($i = 0; $i < sizeof($tokens); $i++) { diff --git a/includes/pear/PEAR/Config.php b/includes/pear/PEAR/Config.php index 3989bf61..fe37037e 100644 --- a/includes/pear/PEAR/Config.php +++ b/includes/pear/PEAR/Config.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Config.php,v 1.122 2005/11/03 04:52:26 cellog Exp $ + * @version CVS: $Id: Config.php,v 1.146 2008/05/14 04:16:08 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -84,7 +84,7 @@ if (getenv('PHP_PEAR_HTTP_PROXY')) { if (getenv('PHP_PEAR_INSTALL_DIR')) { define('PEAR_CONFIG_DEFAULT_PHP_DIR', getenv('PHP_PEAR_INSTALL_DIR')); } else { - if (@is_dir($PEAR_INSTALL_DIR)) { + if (file_exists($PEAR_INSTALL_DIR) && is_dir($PEAR_INSTALL_DIR)) { define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR); } else { @@ -98,7 +98,8 @@ if (getenv('PHP_PEAR_EXTENSION_DIR')) { } else { if (ini_get('extension_dir')) { define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); - } elseif (defined('PEAR_EXTENSION_DIR') && @is_dir(PEAR_EXTENSION_DIR)) { + } elseif (defined('PEAR_EXTENSION_DIR') && + file_exists(PEAR_EXTENSION_DIR) && is_dir(PEAR_EXTENSION_DIR)) { define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR); } elseif (defined('PHP_EXTENSION_DIR')) { define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR); @@ -130,6 +131,22 @@ if (getenv('PHP_PEAR_DATA_DIR')) { $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data'); } +// Default for cfg_dir +if (getenv('PHP_PEAR_CFG_DIR')) { + define('PEAR_CONFIG_DEFAULT_CFG_DIR', getenv('PHP_PEAR_CFG_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_CFG_DIR', + $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'cfg'); +} + +// Default for www_dir +if (getenv('PHP_PEAR_WWW_DIR')) { + define('PEAR_CONFIG_DEFAULT_WWW_DIR', getenv('PHP_PEAR_WWW_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_WWW_DIR', + $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www'); +} + // Default for test_dir if (getenv('PHP_PEAR_TEST_DIR')) { define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR')); @@ -138,6 +155,15 @@ if (getenv('PHP_PEAR_TEST_DIR')) { $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests'); } +// Default for temp_dir +if (getenv('PHP_PEAR_TEMP_DIR')) { + define('PEAR_CONFIG_DEFAULT_TEMP_DIR', getenv('PHP_PEAR_TEMP_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_TEMP_DIR', + System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . + DIRECTORY_SEPARATOR . 'temp'); +} + // Default for cache_dir if (getenv('PHP_PEAR_CACHE_DIR')) { define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR')); @@ -147,6 +173,15 @@ if (getenv('PHP_PEAR_CACHE_DIR')) { DIRECTORY_SEPARATOR . 'cache'); } +// Default for download_dir +if (getenv('PHP_PEAR_DOWNLOAD_DIR')) { + define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', getenv('PHP_PEAR_DOWNLOAD_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', + System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . + DIRECTORY_SEPARATOR . 'download'); +} + // Default for php_bin if (getenv('PHP_PEAR_PHP_BIN')) { define('PEAR_CONFIG_DEFAULT_PHP_BIN', getenv('PHP_PEAR_PHP_BIN')); @@ -214,9 +249,9 @@ if (getenv('PHP_PEAR_SIG_KEYDIR')) { * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -262,9 +297,9 @@ class PEAR_Config extends PEAR * @access private */ var $_channelConfigInfo = array( - 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir', - 'test_dir', 'php_bin', 'username', 'password', 'verbose', - 'preferred_state', 'umask', 'preferred_mirror', + 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir', 'cfg_dir', + 'test_dir', 'www_dir', 'php_bin', 'username', 'password', 'verbose', + 'preferred_state', 'umask', 'preferred_mirror', 'php_ini' ); /** @@ -398,6 +433,20 @@ class PEAR_Config extends PEAR 'prompt' => 'PEAR data directory', 'group' => 'File Locations (Advanced)', ), + 'cfg_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_CFG_DIR, + 'doc' => 'directory where modifiable configuration files are installed', + 'prompt' => 'PEAR configuration file directory', + 'group' => 'File Locations (Advanced)', + ), + 'www_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_WWW_DIR, + 'doc' => 'directory where www frontend files (html/js) are installed', + 'prompt' => 'PEAR www files directory', + 'group' => 'File Locations (Advanced)', + ), 'test_dir' => array( 'type' => 'directory', 'default' => PEAR_CONFIG_DEFAULT_TEST_DIR, @@ -412,6 +461,20 @@ class PEAR_Config extends PEAR 'prompt' => 'PEAR Installer cache directory', 'group' => 'File Locations (Advanced)', ), + 'temp_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_TEMP_DIR, + 'doc' => 'directory which is used for all temp files', + 'prompt' => 'PEAR Installer temp directory', + 'group' => 'File Locations (Advanced)', + ), + 'download_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR, + 'doc' => 'directory which is used for all downloaded files', + 'prompt' => 'PEAR Installer download directory', + 'group' => 'File Locations (Advanced)', + ), 'php_bin' => array( 'type' => 'file', 'default' => PEAR_CONFIG_DEFAULT_PHP_BIN, @@ -419,6 +482,13 @@ class PEAR_Config extends PEAR 'prompt' => 'PHP CLI/CGI binary', 'group' => 'File Locations (Advanced)', ), + 'php_ini' => array( + 'type' => 'file', + 'default' => '', + 'doc' => 'location of php.ini in which to enable PECL extensions on install', + 'prompt' => 'php.ini location', + 'group' => 'File Locations (Advanced)', + ), // Maintainers 'username' => array( 'type' => 'string', @@ -543,7 +613,7 @@ class PEAR_Config extends PEAR $this->layers = array_keys($this->configuration); $this->files['user'] = $user_file; $this->files['system'] = $system_file; - if ($user_file && @file_exists($user_file)) { + if ($user_file && file_exists($user_file)) { $this->pushErrorHandling(PEAR_ERROR_RETURN); $this->readConfigFile($user_file, 'user', $strict); $this->popErrorHandling(); @@ -552,7 +622,7 @@ class PEAR_Config extends PEAR } } - if ($system_file && @file_exists($system_file)) { + if ($system_file && file_exists($system_file)) { $this->mergeConfigFile($system_file, false, 'system', $strict); if ($this->_errorsFound > 0) { return; @@ -573,12 +643,31 @@ class PEAR_Config extends PEAR } $this->_registry['default'] = &new PEAR_Registry($this->configuration['default']['php_dir']); - $this->_registry['default']->setConfig($this); + $this->_registry['default']->setConfig($this, false); $this->_regInitialized['default'] = false; //$GLOBALS['_PEAR_Config_instance'] = &$this; } // }}} + /** + * Return the default locations of user and system configuration files + * @static + */ + function getDefaultConfigFiles() + { + $sl = DIRECTORY_SEPARATOR; + if (OS_WINDOWS) { + return array( + 'user' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini', + 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pearsys.ini' + ); + } else { + return array( + 'user' => getenv('HOME') . $sl . '.pearrc', + 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.conf' + ); + } + } // {{{ singleton([file], [defaults_file]) /** @@ -670,7 +759,7 @@ class PEAR_Config extends PEAR $this->_setupChannels(); if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { $this->_registry[$layer] = &new PEAR_Registry($phpdir); - $this->_registry[$layer]->setConfig($this); + $this->_registry[$layer]->setConfig($this, false); $this->_regInitialized[$layer] = false; } else { unset($this->_registry[$layer]); @@ -687,17 +776,15 @@ class PEAR_Config extends PEAR function readFTPConfigFile($path) { do { // poor man's try - if (!class_exists('Net_FTP')) { + if (!class_exists('PEAR_FTP')) { if (!class_exists('PEAR_Common')) { require_once 'PEAR/Common.php'; } - if (PEAR_Common::isIncludeable('Net/FTP.php')) { - include_once 'Net/FTP.php'; + if (PEAR_Common::isIncludeable('PEAR/FTP.php')) { + require_once 'PEAR/FTP.php'; } } - if (class_exists('Net_FTP') && - (class_exists('PEAR_FTP') || PEAR_Common::isIncludeable('PEAR/FTP.php'))) { - require_once 'PEAR/FTP.php'; + if (class_exists('PEAR_FTP')) { $this->_ftp = &new PEAR_FTP; $this->_ftp->pushErrorHandling(PEAR_ERROR_RETURN); $e = $this->_ftp->init($path); @@ -743,7 +830,7 @@ class PEAR_Config extends PEAR return true; } } else { - return PEAR::raiseError('Net_FTP must be installed to use remote config'); + return PEAR::raiseError('PEAR_RemoteInstaller must be installed to use remote config'); } } while (false); // poor man's catch unset($this->files['ftp']); @@ -760,7 +847,7 @@ class PEAR_Config extends PEAR $set = array_flip(array_values($this->_channels)); foreach ($this->configuration as $layer => $data) { $i = 1000; - if (isset($data['__channels'])) { + if (isset($data['__channels']) && is_array($data['__channels'])) { foreach ($data['__channels'] as $channel => $info) { $set[$channel] = $i++; } @@ -830,7 +917,7 @@ class PEAR_Config extends PEAR $this->_setupChannels(); if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { $this->_registry[$layer] = &new PEAR_Registry($phpdir); - $this->_registry[$layer]->setConfig($this); + $this->_registry[$layer]->setConfig($this, false); $this->_regInitialized[$layer] = false; } else { unset($this->_registry[$layer]); @@ -904,16 +991,16 @@ class PEAR_Config extends PEAR if (!@System::mkDir($opt)) { return $this->raiseError("could not create directory: " . dirname($file)); } - if (@is_file($file) && !@is_writeable($file)) { + if (file_exists($file) && is_file($file) && !is_writeable($file)) { return $this->raiseError("no write access to $file!"); } $fp = @fopen($file, "w"); if (!$fp) { - return $this->raiseError("PEAR_Config::writeConfigFile fopen('$file','w') failed"); + return $this->raiseError("PEAR_Config::writeConfigFile fopen('$file','w') failed ($php_errormsg)"); } $contents = "#PEAR_Config 0.9\n" . serialize($data); if (!@fwrite($fp, $contents)) { - return $this->raiseError("PEAR_Config::writeConfigFile: fwrite failed"); + return $this->raiseError("PEAR_Config::writeConfigFile: fwrite failed ($php_errormsg)"); } return true; } @@ -933,20 +1020,18 @@ class PEAR_Config extends PEAR */ function _readConfigDataFrom($file) { - $fp = @fopen($file, "r"); + $fp = false; + if (file_exists($file)) { + $fp = @fopen($file, "r"); + } if (!$fp) { return $this->raiseError("PEAR_Config::readConfigFile fopen('$file','r') failed"); } $size = filesize($file); $rt = get_magic_quotes_runtime(); set_magic_quotes_runtime(0); - if (function_exists('file_get_contents')) { - fclose($fp); - $contents = file_get_contents($file); - } else { - $contents = @fread($fp, $size); - fclose($fp); - } + fclose($fp); + $contents = file_get_contents($file); if (empty($contents)) { return $this->raiseError('Configuration file "' . $file . '" is empty'); } @@ -1011,12 +1096,18 @@ class PEAR_Config extends PEAR // }}} /** + * @param string Configuration class name, used for detecting duplicate calls * @param array information on a role as parsed from its xml file * @return true|PEAR_Error * @access private */ - function _addConfigVars($vars) + function _addConfigVars($class, $vars) { + static $called = array(); + if (isset($called[$class])) { + return; + } + $called[$class] = 1; if (count($vars) > 3) { return $this->raiseError('Roles can only define 3 new config variables or less'); } @@ -1085,6 +1176,8 @@ class PEAR_Config extends PEAR '" already exists'); } $this->configuration_info[$name] = $var; + // fix bug #7351: setting custom config variable in a channel fails + $this->_channelConfigInfo[] = $name; } return true; } @@ -1265,6 +1358,9 @@ class PEAR_Config extends PEAR $reg = &$this->getRegistry(); if (is_object($reg)) { $chan = &$reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $channel; + } if (!$chan->getMirror($test) && $chan->getName() != $test) { return $channel; // mirror does not exist } @@ -1286,6 +1382,9 @@ class PEAR_Config extends PEAR $reg = &$this->getRegistry(); if (is_object($reg)) { $chan = &$reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $channel; + } if (!$chan->getMirror($test) && $chan->getName() != $test) { return $channel; // mirror does not exist } @@ -1329,13 +1428,16 @@ class PEAR_Config extends PEAR $reg = &$this->getRegistry($layer); if (is_object($reg)) { $chan = &$reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $channel; + } if (!$chan->getMirror($ret) && $chan->getName() != $ret) { return $channel; // mirror does not exist } } return $ret; } - if ($channel == $this->getDefaultChannel($layer)) { + if ($channel != $this->getDefaultChannel($layer)) { return $channel; // we must use the channel name as the preferred mirror // if the user has not chosen an alternate } else { @@ -1383,12 +1485,15 @@ class PEAR_Config extends PEAR $reg = &$this->getRegistry($layer); if (is_object($reg)) { $chan = &$reg->getChannel($channel ? $channel : 'pear.php.net'); + if (PEAR::isError($chan)) { + return false; + } if (!$chan->getMirror($value) && $chan->getName() != $value) { return false; // mirror does not exist } } } - if (empty($this->configuration_info[$key])) { + if (!isset($this->configuration_info[$key])) { return false; } extract($this->configuration_info[$key]); @@ -1453,7 +1558,7 @@ class PEAR_Config extends PEAR $value != $this->_registry[$layer]->install_dir) { $this->_registry[$layer] = &new PEAR_Registry($value); $this->_regInitialized[$layer] = false; - $this->_registry[$layer]->setConfig($this); + $this->_registry[$layer]->setConfig($this, false); } } return true; @@ -1479,7 +1584,7 @@ class PEAR_Config extends PEAR if (!is_object($this->_registry[$layer])) { if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) { $this->_registry[$layer] = &new PEAR_Registry($phpdir); - $this->_registry[$layer]->setConfig($this); + $this->_registry[$layer]->setConfig($this, false); $this->_regInitialized[$layer] = false; } else { unset($this->_registry[$layer]); @@ -1518,6 +1623,9 @@ class PEAR_Config extends PEAR continue; } foreach ($this->layers as $layer) { + if (!isset($this->configuration[$layer]['__channels'])) { + $this->configuration[$layer]['__channels'] = array(); + } if (!isset($this->configuration[$layer]['__channels'][$channel]) || !is_array($this->configuration[$layer]['__channels'][$channel])) { $this->configuration[$layer]['__channels'][$channel] = array(); @@ -1941,7 +2049,8 @@ class PEAR_Config extends PEAR return $a; } else { // only go here if null was passed in - die("CRITICAL ERROR: Registry could not be initialized from any value"); + echo "CRITICAL ERROR: Registry could not be initialized from any value"; + exit(1); } } /** @@ -1959,7 +2068,7 @@ class PEAR_Config extends PEAR } $this->_registry[$layer] = &$reg; if (is_object($reg)) { - $this->_registry[$layer]->setConfig($this); + $this->_registry[$layer]->setConfig($this, false); } return true; } @@ -2044,7 +2153,7 @@ class PEAR_Config extends PEAR } $this->_registry[$layer] = &new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net')); - $this->_registry[$layer]->setConfig($this); + $this->_registry[$layer]->setConfig($this, false); $this->_regInitialized[$layer] = false; } } diff --git a/includes/pear/PEAR/Dependency.php b/includes/pear/PEAR/Dependency.php index b5f54d02..0265f6f7 100644 --- a/includes/pear/PEAR/Dependency.php +++ b/includes/pear/PEAR/Dependency.php @@ -1,24 +1,27 @@ | -// | Stig Bakken | -// +----------------------------------------------------------------------+ -// -// THIS FILE IS DEPRECATED IN FAVOR OF DEPENDENCY2.PHP, AND IS NOT USED IN THE INSTALLER -// $Id: Dependency.php,v 1.40 2005/02/02 04:57:23 cellog Exp $ +/** + * PEAR_Dependency + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * THIS FILE IS DEPRECATED IN FAVOR OF DEPENDENCY2.PHP, AND IS NOT USED IN THE INSTALLER + * + * @category pear + * @package PEAR + * @author Tomas V.V.Cox + * @author Stig Bakken + * @copyright 1997-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: Dependency.php,v 1.43 2008/01/03 20:26:34 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ require_once "PEAR.php"; require_once "OS/Guess.php"; @@ -365,7 +368,7 @@ class PEAR_Dependency $path_elements = explode(PATH_SEPARATOR, getenv('PATH')); foreach ($path_elements as $dir) { $file = $dir . DIRECTORY_SEPARATOR . $program . $exe_suffix; - if (@file_exists($file) && @is_executable($file)) { + if (file_exists($file) && is_executable($file)) { return false; } } diff --git a/includes/pear/PEAR/Dependency2.php b/includes/pear/PEAR/Dependency2.php index 13d2fbb8..802e9bfa 100644 --- a/includes/pear/PEAR/Dependency2.php +++ b/includes/pear/PEAR/Dependency2.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Dependency2.php,v 1.48 2005/10/29 21:23:19 cellog Exp $ + * @version CVS: $Id: Dependency2.php,v 1.56 2008/01/03 20:26:35 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -35,9 +35,9 @@ require_once 'PEAR/Validate.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -85,11 +85,18 @@ class PEAR_Dependency2 $state = PEAR_VALIDATE_INSTALLING) { $this->_config = &$config; - $this->_registry = &$config->getRegistry(); if (!class_exists('PEAR_DependencyDB')) { require_once 'PEAR/DependencyDB.php'; } + if (isset($installoptions['packagingroot'])) { + // make sure depdb is in the right location + $config->setInstallRoot($installoptions['packagingroot']); + } + $this->_registry = &$config->getRegistry(); $this->_dependencydb = &PEAR_DependencyDB::singleton($config); + if (isset($installoptions['packagingroot'])) { + $config->setInstallRoot(false); + } $this->_options = $installoptions; $this->_state = $state; if (!class_exists('OS_Guess')) { @@ -518,7 +525,7 @@ class PEAR_Dependency2 */ function getPEARVersion() { - return '1.4.5'; + return '1.7.2'; } function validatePearinstallerDependency($dep) @@ -860,53 +867,185 @@ class PEAR_Dependency2 $dp->setPackageFile($downloaded[$i]); $params[$i] = &$dp; } - $deps = $this->_dependencydb->getDependentPackageDependencies($this->_currentPackage); - $fail = false; - if ($deps) { - foreach ($deps as $channel => $info) { - foreach ($info as $package => $ds) { - foreach ($ds as $d) { - $d['dep']['package'] = $d['dep']['name']; - $checker = &new PEAR_Dependency2($this->_config, $this->_options, - array('channel' => $channel, 'package' => $package), $this->_state); - $dep = $d['dep']; - $required = $d['type'] == 'required'; - $ret = $checker->_validatePackageUninstall($dep, $required, $params, $dl); - if (is_array($ret)) { - $dl->log(0, $ret[0]); - } elseif (PEAR::isError($ret)) { - $dl->log(0, $ret->getMessage()); - $fail = true; + // check cache + $memyselfandI = strtolower($this->_currentPackage['channel']) . '/' . + strtolower($this->_currentPackage['package']); + if (isset($dl->___uninstall_package_cache)) { + $badpackages = $dl->___uninstall_package_cache; + if (isset($badpackages[$memyselfandI]['warnings'])) { + foreach ($badpackages[$memyselfandI]['warnings'] as $warning) { + $dl->log(0, $warning[0]); + } + } + if (isset($badpackages[$memyselfandI]['errors'])) { + foreach ($badpackages[$memyselfandI]['errors'] as $error) { + if (is_array($error)) { + $dl->log(0, $error[0]); + } else { + $dl->log(0, $error->getMessage()); + } + } + if (isset($this->_options['nodeps']) || isset($this->_options['force'])) { + return $this->warning( + 'warning: %s should not be uninstalled, other installed packages depend ' . + 'on this package'); + } else { + return $this->raiseError( + '%s cannot be uninstalled, other installed packages depend on this package'); + } + } + return true; + } + // first, list the immediate parents of each package to be uninstalled + $perpackagelist = array(); + $allparents = array(); + foreach ($params as $i => $param) { + $a = array('channel' => strtolower($param->getChannel()), + 'package' => strtolower($param->getPackage())); + $deps = $this->_dependencydb->getDependentPackages($a); + if ($deps) { + foreach ($deps as $d) { + $pardeps = $this->_dependencydb->getDependencies($d); + foreach ($pardeps as $dep) { + if (strtolower($dep['dep']['channel']) == $a['channel'] && + strtolower($dep['dep']['name']) == $a['package']) { + if (!isset($perpackagelist[$a['channel'] . '/' . $a['package']])) { + $perpackagelist[$a['channel'] . '/' . $a['package']] = array(); + } + $perpackagelist[$a['channel'] . '/' . $a['package']][] + = array($d['channel'] . '/' . $d['package'], $dep); + if (!isset($allparents[$d['channel'] . '/' . $d['package']])) { + $allparents[$d['channel'] . '/' . $d['package']] = array(); + } + if (!isset($allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']])) { + $allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']] = array(); + } + $allparents[$d['channel'] . '/' . $d['package']] + [$a['channel'] . '/' . $a['package']][] + = array($d, $dep); } } } } } - if ($fail) { - if (isset($this->_options['nodeps']) || isset($this->_options['force'])) { - return $this->warning( - 'warning: %s should not be uninstalled, other installed packages depend ' . - 'on this package'); - } else { - return $this->raiseError( - '%s cannot be uninstalled, other installed packages depend on this package'); + // next, remove any packages from the parents list that are not installed + $remove = array(); + foreach ($allparents as $parent => $d1) { + foreach ($d1 as $d) { + if ($this->_registry->packageExists($d[0][0]['package'], $d[0][0]['channel'])) { + continue; + } + $remove[$parent] = true; + } + } + // next remove any packages from the parents list that are not passed in for + // uninstallation + foreach ($allparents as $parent => $d1) { + foreach ($d1 as $d) { + foreach ($params as $param) { + if (strtolower($param->getChannel()) == $d[0][0]['channel'] && + strtolower($param->getPackage()) == $d[0][0]['package']) { + // found it + continue 3; + } + } + $remove[$parent] = true; + } + } + // remove all packages whose dependencies fail + // save which ones failed for error reporting + $badchildren = array(); + do { + $fail = false; + foreach ($remove as $package => $unused) { + if (!isset($allparents[$package])) { + continue; + } + foreach ($allparents[$package] as $kid => $d1) { + foreach ($d1 as $depinfo) { + if ($depinfo[1]['type'] != 'optional') { + if (isset($badchildren[$kid])) { + continue; + } + $badchildren[$kid] = true; + $remove[$kid] = true; + $fail = true; + continue 2; + } + } + } + if ($fail) { + // start over, we removed some children + continue 2; + } + } + } while ($fail); + // next, construct the list of packages that can't be uninstalled + $badpackages = array(); + $save = $this->_currentPackage; + foreach ($perpackagelist as $package => $packagedeps) { + foreach ($packagedeps as $parent) { + if (!isset($remove[$parent[0]])) { + continue; + } + $packagename = $this->_registry->parsePackageName($parent[0]); + $packagename['channel'] = $this->_registry->channelAlias($packagename['channel']); + $pa = $this->_registry->getPackage($packagename['package'], $packagename['channel']); + $packagename['package'] = $pa->getPackage(); + $this->_currentPackage = $packagename; + // parent is not present in uninstall list, make sure we can actually + // uninstall it (parent dep is optional) + $parentname['channel'] = $this->_registry->channelAlias($parent[1]['dep']['channel']); + $pa = $this->_registry->getPackage($parent[1]['dep']['name'], $parent[1]['dep']['channel']); + $parentname['package'] = $pa->getPackage(); + $parent[1]['dep']['package'] = $parentname['package']; + $parent[1]['dep']['channel'] = $parentname['channel']; + if ($parent[1]['type'] == 'optional') { + $test = $this->_validatePackageUninstall($parent[1]['dep'], false, $dl); + if ($test !== true) { + $badpackages[$package]['warnings'][] = $test; + } + } else { + $test = $this->_validatePackageUninstall($parent[1]['dep'], true, $dl); + if ($test !== true) { + $badpackages[$package]['errors'][] = $test; + } + } + } + } + $this->_currentPackage = $save; + $dl->___uninstall_package_cache = $badpackages; + if (isset($badpackages[$memyselfandI])) { + if (isset($badpackages[$memyselfandI]['warnings'])) { + foreach ($badpackages[$memyselfandI]['warnings'] as $warning) { + $dl->log(0, $warning[0]); + } + } + if (isset($badpackages[$memyselfandI]['errors'])) { + foreach ($badpackages[$memyselfandI]['errors'] as $error) { + if (is_array($error)) { + $dl->log(0, $error[0]); + } else { + $dl->log(0, $error->getMessage()); + } + } + if (isset($this->_options['nodeps']) || isset($this->_options['force'])) { + return $this->warning( + 'warning: %s should not be uninstalled, other installed packages depend ' . + 'on this package'); + } else { + return $this->raiseError( + '%s cannot be uninstalled, other installed packages depend on this package'); + } } } return true; } - function _validatePackageUninstall($dep, $required, $params, &$dl) + function _validatePackageUninstall($dep, $required, $dl) { - $dep['package'] = $dep['name']; $depname = $this->_registry->parsedPackageNameToString($dep, true); - $found = false; - foreach ($params as $param) { - if ($param->isEqual($this->_currentPackage)) { - $found = true; - break; - } - } - $version = $this->_registry->packageinfo($dep['name'], 'version', + $version = $this->_registry->packageinfo($dep['package'], 'version', $dep['channel']); if (!$version) { return true; @@ -923,15 +1062,15 @@ class PEAR_Dependency2 if (!isset($dep['min']) && !isset($dep['max'])) { if ($required) { if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s' . $extra . ' is required by installed package "' . - $depname . '"'); + return $this->raiseError('"' . $depname . '" is required by ' . + 'installed package %s' . $extra); } else { - return $this->warning('warning: %s' . $extra . - ' is required by installed package "' . $depname . '"'); + return $this->warning('warning: "' . $depname . '" is required by ' . + 'installed package %s' . $extra); } } else { - return $this->warning('%s' . $extra . - ' can be optionally used by installed package "' . $depname . '"'); + return $this->warning('"' . $depname . '" can be optionally used by ' . + 'installed package %s' . $extra); } } $fail = false; @@ -945,54 +1084,19 @@ class PEAR_Dependency2 $fail = true; } } - if ($fail) { - if ($found) { - if (!isset($dl->___checked[$this->_currentPackage['channel']] - [$this->_currentPackage['package']])) { - $dl->___checked[$this->_currentPackage['channel']] - [$this->_currentPackage['package']] = true; - $deps = $this->_dependencydb->getDependentPackageDependencies( - $this->_currentPackage); - if ($deps) { - foreach ($deps as $channel => $info) { - foreach ($info as $package => $ds) { - foreach ($ds as $d) { - $d['dep']['package'] = $d['dep']['name']; - $checker = &new PEAR_Dependency2($this->_config, $this->_options, - array('channel' => $channel, 'package' => $package), - $this->_state); - $dep = $d['dep']; - $required = $d['type'] == 'required'; - $ret = $checker->_validatePackageUninstall($dep, $required, $params, - $dl); - if (PEAR::isError($ret)) { - $fail = true; - break 3; - } - } - } - $fail = false; - } - } - } else { - return true; - } - } - if (!$fail) { - return true; - } - if ($required) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError($depname . $extra . ' is required by installed package' . - ' "%s"'); - } else { - return $this->warning('warning: ' . $depname . $extra . - ' is required by installed package "%s"'); - } + // we re-use this variable, preserve the original value + $saverequired = $required; + if ($required) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError($depname . $extra . ' is required by installed package' . + ' "%s"'); } else { - return $this->warning($depname . $extra . ' can be optionally used by installed package' . - ' "%s"'); + return $this->raiseError('warning: ' . $depname . $extra . + ' is required by installed package "%s"'); } + } else { + return $this->warning($depname . $extra . ' can be optionally used by installed package' . + ' "%s"'); } return true; } diff --git a/includes/pear/PEAR/DependencyDB.php b/includes/pear/PEAR/DependencyDB.php index 6e9c4273..f79ae81e 100644 --- a/includes/pear/PEAR/DependencyDB.php +++ b/includes/pear/PEAR/DependencyDB.php @@ -14,9 +14,9 @@ * @package PEAR * @author Tomas V. V. Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: DependencyDB.php,v 1.29 2005/09/15 20:10:11 cellog Exp $ + * @version CVS: $Id: DependencyDB.php,v 1.37 2008/01/03 20:26:35 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -27,15 +27,16 @@ require_once 'PEAR.php'; require_once 'PEAR/Config.php'; +$GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array(); /** * Track dependency relationships between installed packages * @category pear * @package PEAR * @author Greg Beaver * @author Tomas V.V.Cox - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -137,12 +138,12 @@ class PEAR_DependencyDB function hasWriteAccess() { - if (!@file_exists($this->_depdb)) { + if (!file_exists($this->_depdb)) { $dir = $this->_depdb; while ($dir && $dir != '.') { $dir = dirname($dir); // cd .. - if ($dir != '.' && @file_exists($dir)) { - if (@is_writeable($dir)) { + if ($dir != '.' && file_exists($dir)) { + if (is_writeable($dir)) { return true; } else { return false; @@ -151,7 +152,7 @@ class PEAR_DependencyDB } return false; } - return @is_writeable($this->_depdb); + return is_writeable($this->_depdb); } // {{{ assertDepsDB() @@ -226,6 +227,12 @@ class PEAR_DependencyDB foreach ($temp as $dep) { if (strtolower($dep['dep']['channel']) == strtolower($channel) && strtolower($dep['dep']['name']) == strtolower($package)) { + if (!isset($dependencies[$info['channel']])) { + $dependencies[$info['channel']] = array(); + } + if (!isset($dependencies[$info['channel']][$info['package']])) { + $dependencies[$info['channel']][$info['package']] = array(); + } $dependencies[$info['channel']][$info['package']][] = $dep; } } @@ -290,16 +297,36 @@ class PEAR_DependencyDB return false; } foreach ($this->_cache['dependencies'][$channel][$package] as $info) { + if (isset($info['dep']['uri'])) { + if (is_object($child)) { + if ($info['dep']['uri'] == $child->getURI()) { + return true; + } + } elseif (isset($child['uri'])) { + if ($info['dep']['uri'] == $child['uri']) { + return true; + } + } + return false; + } if (strtolower($info['dep']['channel']) == strtolower($depchannel) && strtolower($info['dep']['name']) == strtolower($deppackage)) { return true; } } foreach ($this->_cache['dependencies'][$channel][$package] as $info) { - if ($this->_dependsOn(array( - 'channel' => $info['dep']['channel'], - 'package' => $info['dep']['name']), $child, $checked)) { - return true; + if (isset($info['dep']['uri'])) { + if ($this->_dependsOn(array( + 'uri' => $info['dep']['uri'], + 'package' => $info['dep']['name']), $child, $checked)) { + return true; + } + } else { + if ($this->_dependsOn(array( + 'channel' => $info['dep']['channel'], + 'package' => $info['dep']['name']), $child, $checked)) { + return true; + } } } return false; @@ -394,9 +421,15 @@ class PEAR_DependencyDB return $depdb; } $packages = $this->_registry->listAllPackages(); + if (PEAR::isError($packages)) { + return $packages; + } foreach ($packages as $channel => $ps) { foreach ($ps as $package) { $package = $this->_registry->getPackage($package, $channel); + if (PEAR::isError($package)) { + return $package; + } $this->_setPackageDeps($depdb, $package); } } @@ -424,8 +457,11 @@ class PEAR_DependencyDB $open_mode = 'w'; // XXX People reported problems with LOCK_SH and 'w' if ($mode === LOCK_SH) { - if (@!is_file($this->_lockfile)) { + if (!file_exists($this->_lockfile)) { touch($this->_lockfile); + } elseif (!is_file($this->_lockfile)) { + return PEAR::raiseError('could not create Dependency lock file, ' . + 'it exists and is not a regular file'); } $open_mode = 'r'; } @@ -484,13 +520,8 @@ class PEAR_DependencyDB $rt = get_magic_quotes_runtime(); set_magic_quotes_runtime(0); clearstatcache(); - if (function_exists('file_get_contents')) { - fclose($fp); - $data = unserialize(file_get_contents($this->_depdb)); - } else { - $data = unserialize(fread($fp, filesize($this->_depdb))); - fclose($fp); - } + fclose($fp); + $data = unserialize(file_get_contents($this->_depdb)); set_magic_quotes_runtime($rt); $this->_cache = $data; return $data; @@ -540,6 +571,15 @@ class PEAR_DependencyDB if (!$deps) { return; } + if (!is_array($data)) { + $data = array(); + } + if (!isset($data['dependencies'])) { + $data['dependencies'] = array(); + } + if (!isset($data['dependencies'][strtolower($pkg->getChannel())])) { + $data['dependencies'][strtolower($pkg->getChannel())] = array(); + } $data['dependencies'][strtolower($pkg->getChannel())][strtolower($pkg->getPackage())] = array(); if (isset($deps['required']['package'])) { @@ -628,6 +668,15 @@ class PEAR_DependencyDB } else { $depchannel = '__uri'; } + if (!isset($data['dependencies'])) { + $data['dependencies'] = array(); + } + if (!isset($data['dependencies'][strtolower($pkg->getChannel())])) { + $data['dependencies'][strtolower($pkg->getChannel())] = array(); + } + if (!isset($data['dependencies'][strtolower($pkg->getChannel())][strtolower($pkg->getPackage())])) { + $data['dependencies'][strtolower($pkg->getChannel())][strtolower($pkg->getPackage())] = array(); + } $data['dependencies'][strtolower($pkg->getChannel())][strtolower($pkg->getPackage())][] = $info; if (isset($data['packages'][strtolower($depchannel)][strtolower($dep['name'])])) { @@ -646,6 +695,15 @@ class PEAR_DependencyDB 'package' => strtolower($pkg->getPackage())); } } else { + if (!isset($data['packages'])) { + $data['packages'] = array(); + } + if (!isset($data['packages'][strtolower($depchannel)])) { + $data['packages'][strtolower($depchannel)] = array(); + } + if (!isset($data['packages'][strtolower($depchannel)][strtolower($dep['name'])])) { + $data['packages'][strtolower($depchannel)][strtolower($dep['name'])] = array(); + } $data['packages'][strtolower($depchannel)][strtolower($dep['name'])][] = array('channel' => strtolower($pkg->getChannel()), 'package' => strtolower($pkg->getPackage())); diff --git a/includes/pear/PEAR/Downloader.php b/includes/pear/PEAR/Downloader.php index cc9049e0..c70a07b1 100644 --- a/includes/pear/PEAR/Downloader.php +++ b/includes/pear/PEAR/Downloader.php @@ -16,9 +16,9 @@ * @author Stig Bakken * @author Tomas V. V. Cox * @author Martin Jansen - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Downloader.php,v 1.94 2005/10/29 21:23:19 cellog Exp $ + * @version CVS: $Id: Downloader.php,v 1.138 2008/04/11 01:16:40 dufuz Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.3.0 */ @@ -43,9 +43,9 @@ define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2); * @author Stig Bakken * @author Tomas V. V. Cox * @author Martin Jansen - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.3.0 */ @@ -132,7 +132,7 @@ class PEAR_Downloader extends PEAR_Common * @access private */ var $_errorStack = array(); - + /** * @var boolean * @access private @@ -182,7 +182,8 @@ class PEAR_Downloader extends PEAR_Common if (!count($unused)) { continue; } - @array_walk($this->_installed[$key], 'strtolower'); + $strtolower = create_function('$a','return strtolower($a);'); + array_walk($this->_installed[$key], $strtolower); } } } @@ -208,12 +209,12 @@ class PEAR_Downloader extends PEAR_Common return false; } list($a, $lastmodified) = $a; - if (!class_exists('PEAR/ChannelFile.php')) { + if (!class_exists('PEAR_ChannelFile')) { require_once 'PEAR/ChannelFile.php'; } $b = new PEAR_ChannelFile; if ($b->fromXmlFile($a)) { - @unlink($a); + unlink($a); if ($this->config->get('auto_discover')) { $this->_registry->addChannel($b, $lastmodified); $alias = $b->getName(); @@ -225,7 +226,7 @@ class PEAR_Downloader extends PEAR_Common } return true; } - @unlink($a); + unlink($a); return false; } @@ -252,7 +253,7 @@ class PEAR_Downloader extends PEAR_Common */ function &getDependency2Object(&$c, $i, $p, $s) { - if (!class_exists('PEAR/Dependency2.php')) { + if (!class_exists('PEAR_Dependency2')) { require_once 'PEAR/Dependency2.php'; } $z = &new PEAR_Dependency2($c, $i, $p, $s); @@ -278,6 +279,10 @@ class PEAR_Downloader extends PEAR_Common PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $err = $params[$i]->initialize($param); PEAR::staticPopErrorHandling(); + if (!$err) { + // skip parameters that were missed by preferred_state + continue; + } if (PEAR::isError($err)) { if (!isset($this->_options['soft'])) { $this->log(0, $err->getMessage()); @@ -289,34 +294,58 @@ class PEAR_Downloader extends PEAR_Common $this->pushError('Package "' . $param . '" is not valid', PEAR_INSTALLER_SKIPPED); } else { - if ($params[$i] && !isset($channelschecked[$params[$i]->getChannel()]) && - !isset($this->_options['offline'])) { - $channelschecked[$params[$i]->getChannel()] = true; - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - if (!class_exists('System')) { - require_once 'System.php'; + do { + if ($params[$i] && $params[$i]->getType() == 'local') { + // bug #7090 + // skip channel.xml check for local packages + break; } - $curchannel = &$this->_registry->getChannel($params[$i]->getChannel()); - $a = $this->downloadHttp('http://' . $params[$i]->getChannel() . - '/channel.xml', $this->ui, - System::mktemp(array('-d')), null, $curchannel->lastModified()); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($a) || !$a) { - continue; + if ($params[$i] && !isset($channelschecked[$params[$i]->getChannel()]) && + !isset($this->_options['offline'])) { + $channelschecked[$params[$i]->getChannel()] = true; + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + if (!class_exists('System')) { + require_once 'System.php'; + } + $curchannel = &$this->_registry->getChannel($params[$i]->getChannel()); + if (PEAR::isError($curchannel)) { + PEAR::staticPopErrorHandling(); + return $this->raiseError($curchannel); + } + if (PEAR::isError($dir = $this->getDownloadDir())) { + PEAR::staticPopErrorHandling(); + break; + } + $mirror = $this->config->get('preferred_mirror', null, + $params[$i]->getChannel()); + $a = $this->downloadHttp('http://' . $mirror . + '/channel.xml', $this->ui, $dir, null, $curchannel->lastModified()); + + PEAR::staticPopErrorHandling(); + if (PEAR::isError($a) || !$a) { + break; + } + $this->log(0, 'WARNING: channel "' . $params[$i]->getChannel() . '" has ' . + 'updated its protocols, use "channel-update ' . $params[$i]->getChannel() . + '" to update'); } - $this->log(0, 'WARNING: channel "' . $params[$i]->getChannel() . '" has ' . - 'updated its protocols, use "channel-update ' . $params[$i]->getChannel() . - '" to update'); - } + } while (false); if ($params[$i] && !isset($this->_options['downloadonly'])) { - $checkdir = $this->config->get('php_dir', null, $params[$i]->getChannel()); + if (isset($this->_options['packagingroot'])) { + $checkdir = $this->_prependPath( + $this->config->get('php_dir', null, $params[$i]->getChannel()), + $this->_options['packagingroot']); + } else { + $checkdir = $this->config->get('php_dir', + null, $params[$i]->getChannel()); + } while ($checkdir && $checkdir != '/' && !file_exists($checkdir)) { $checkdir = dirname($checkdir); } if ($checkdir == '.') { $checkdir = '/'; } - if (!@is_writeable($checkdir)) { + if (!is_writeable($checkdir)) { return PEAR::raiseError('Cannot install, php_dir for channel "' . $params[$i]->getChannel() . '" is not writeable by the current user'); } @@ -334,6 +363,9 @@ class PEAR_Downloader extends PEAR_Common while ($reverify) { $reverify = false; foreach ($params as $i => $param) { + //PHP Bug 40768 / PEAR Bug #10944 + //Nested foreaches fail in PHP 5.2.1 + key($params); $ret = $params[$i]->detectDependencies($params); if (PEAR::isError($ret)) { $reverify = true; @@ -355,6 +387,18 @@ class PEAR_Downloader extends PEAR_Common return $a; } while (PEAR_Downloader_Package::mergeDependencies($params)); + PEAR_Downloader_Package::removeDuplicates($params, true); + $errorparams = array(); + if (PEAR_Downloader_Package::detectStupidDuplicates($params, $errorparams)) { + if (count($errorparams)) { + foreach ($errorparams as $param) { + $name = $this->_registry->parsedPackageNameToString($param->getParsedPackage()); + $this->pushError('Duplicate package ' . $name . ' found', PEAR_INSTALLER_FAILED); + } + $a = array(); + return $a; + } + } PEAR_Downloader_Package::removeInstalled($params); if (!count($params)) { $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED); @@ -374,6 +418,7 @@ class PEAR_Downloader extends PEAR_Common if (isset($this->_options['pretend'])) { return $params; } + $somefailed = false; foreach ($params as $i => $package) { PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $pf = &$params[$i]->download(); @@ -386,6 +431,7 @@ class PEAR_Downloader extends PEAR_Common true) . '"'); } + $somefailed = true; continue; } $newparams[] = &$params[$i]; @@ -393,6 +439,17 @@ class PEAR_Downloader extends PEAR_Common 'info' => &$pf, 'pkg' => $pf->getPackage()); } + if ($somefailed) { + // remove params that did not download successfully + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->analyzeDependencies($newparams, true); + PEAR::popErrorHandling(); + if (!count($newparams)) { + $this->pushError('Download failed', PEAR_INSTALLER_FAILED); + $a = array(); + return $a; + } + } $this->_downloadedPackages = $ret; return $newparams; } @@ -400,7 +457,7 @@ class PEAR_Downloader extends PEAR_Common /** * @param array all packages to be installed */ - function analyzeDependencies(&$params) + function analyzeDependencies(&$params, $force = false) { $hasfailed = $failed = false; if (isset($this->_options['downloadonly'])) { @@ -436,7 +493,7 @@ class PEAR_Downloader extends PEAR_Common } continue; } - if (!$reset && $param->alreadyValidated()) { + if (!$reset && $param->alreadyValidated() && !$force) { continue; } if (count($deps)) { @@ -622,7 +679,12 @@ class PEAR_Downloader extends PEAR_Common return $this->_downloadDir; } $downloaddir = $this->config->get('download_dir'); - if (empty($downloaddir)) { + if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) { + if (is_dir($downloaddir) && !is_writable($downloaddir)) { + $this->log(0, 'WARNING: configuration download directory "' . $downloaddir . + '" is not writeable. Change download_dir config variable to ' . + 'a writeable dir to avoid this warning'); + } if (!class_exists('System')) { require_once 'System.php'; } @@ -631,11 +693,26 @@ class PEAR_Downloader extends PEAR_Common } $this->log(3, '+ tmp dir created at ' . $downloaddir); } + if (!is_writable($downloaddir)) { + if (PEAR::isError(System::mkdir(array('-p', $downloaddir))) || + !is_writable($downloaddir)) { + return PEAR::raiseError('download directory "' . $downloaddir . + '" is not writeable. Change download_dir config variable to ' . + 'a writeable dir'); + } + } return $this->_downloadDir = $downloaddir; } function setDownloadDir($dir) { + if (!@is_writable($dir)) { + if (PEAR::isError(System::mkdir(array('-p', $dir)))) { + return PEAR::raiseError('download directory "' . $dir . + '" is not writeable. Change download_dir config variable to ' . + 'a writeable dir'); + } + } $this->_downloadDir = $dir; } @@ -703,22 +780,37 @@ class PEAR_Downloader extends PEAR_Common break; } } + $this->configSet('default_channel', $curchannel); return PEAR::raiseError('Unknown remote channel: ' . $remotechannel); } while (false); } $chan = &$this->_registry->getChannel($parr['channel']); + if (PEAR::isError($chan)) { + return $chan; + } + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $version = $this->_registry->packageInfo($parr['package'], 'version', $parr['channel']); + PEAR::staticPopErrorHandling(); + $base2 = false; if ($chan->supportsREST($this->config->get('preferred_mirror')) && - $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { - $rest = &$this->config->getREST('1.0', $this->_options); - if (!isset($parr['version']) && !isset($parr['state']) && $version - && !isset($this->_options['downloadonly'])) { - $url = $rest->getDownloadURL($base, $parr, $state, $version); + (($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror'))) || + ($base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))))) { + if ($base2) { + $rest = &$this->config->getREST('1.3', $this->_options); + $base = $base2; } else { - $url = $rest->getDownloadURL($base, $parr, $state, false); + $rest = &$this->config->getREST('1.0', $this->_options); + } + if (!isset($parr['version']) && !isset($parr['state']) && $version + && !PEAR::isError($version) + && !isset($this->_options['downloadonly'])) { + $url = $rest->getDownloadURL($base, $parr, $state, $version, $chan->getName()); + } else { + $url = $rest->getDownloadURL($base, $parr, $state, false, $chan->getName()); } if (PEAR::isError($url)) { + $this->configSet('default_channel', $curchannel); return $url; } if ($parr['channel'] != $curchannel) { @@ -732,6 +824,17 @@ class PEAR_Downloader extends PEAR_Common return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' . 'this should never happen'); } + if (!isset($this->_options['force']) && + !isset($this->_options['downloadonly']) && + $version && + !PEAR::isError($version) && + !isset($parr['group'])) { + if (version_compare($version, $url['version'], '>=')) { + return PEAR::raiseError($this->_registry->parsedPackageNameToString( + $parr, true) . ' is already installed and is newer than detected ' . + 'release version ' . $url['version'], -976); + } + } if (isset($url['info']['required']) || $url['compatible']) { require_once 'PEAR/PackageFile/v2.php'; $pf = new PEAR_PackageFile_v2; @@ -745,6 +848,9 @@ class PEAR_Downloader extends PEAR_Common } $pf->setRawPackage($url['package']); $pf->setDeps($url['info']); + if ($url['compatible']) { + $pf->setCompatible($url['compatible']); + } $pf->setRawState($url['stability']); $url['info'] = &$pf; if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) { @@ -787,8 +893,13 @@ class PEAR_Downloader extends PEAR_Common if (isset($this->_options['downloadonly'])) { $pkg = &$this->getPackagefileObject($this->config, $this->debug); } else { - $pkg = &$this->getPackagefileObject($this->config, $this->debug, - $this->getDownloadDir()); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + if (PEAR::isError($dir = $this->getDownloadDir())) { + PEAR::staticPopErrorHandling(); + return $dir; + } + PEAR::staticPopErrorHandling(); + $pkg = &$this->getPackagefileObject($this->config, $this->debug, $dir); } PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $pinfo = &$pkg->fromXmlString($url['info'], PEAR_VALIDATE_DOWNLOADING, 'remote'); @@ -823,34 +934,66 @@ class PEAR_Downloader extends PEAR_Common { $xsdversion = isset($dep['rel']) ? '1.0' : '2.0'; $curchannel = $this->config->get('default_channel'); - if (isset($dep['channel'])) { - $remotechannel = $dep['channel']; + if (isset($dep['uri'])) { + $xsdversion = '2.0'; + $chan = &$this->_registry->getChannel('__uri'); + if (PEAR::isError($chan)) { + return $chan; + } + $version = $this->_registry->packageInfo($dep['name'], 'version', '__uri'); + $this->configSet('default_channel', '__uri'); } else { - $remotechannel = 'pear.php.net'; - } - if (!$this->_registry->channelExists($remotechannel)) { - do { - if ($this->config->get('auto_discover')) { - if ($this->discover($remotechannel)) { - break; + if (isset($dep['channel'])) { + $remotechannel = $dep['channel']; + } else { + $remotechannel = 'pear.php.net'; + } + if (!$this->_registry->channelExists($remotechannel)) { + do { + if ($this->config->get('auto_discover')) { + if ($this->discover($remotechannel)) { + break; + } } - } - return PEAR::raiseError('Unknown remote channel: ' . $remotechannel); - } while (false); + return PEAR::raiseError('Unknown remote channel: ' . $remotechannel); + } while (false); + } + $chan = &$this->_registry->getChannel($remotechannel); + if (PEAR::isError($chan)) { + return $chan; + } + $version = $this->_registry->packageInfo($dep['name'], 'version', + $remotechannel); + $this->configSet('default_channel', $remotechannel); } - $this->configSet('default_channel', $remotechannel); $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state'); if (isset($parr['state']) && isset($parr['version'])) { unset($parr['state']); } - $chan = &$this->_registry->getChannel($remotechannel); - $version = $this->_registry->packageInfo($dep['name'], 'version', - $remotechannel); - if ($chan->supportsREST($this->config->get('preferred_mirror')) && + if (isset($dep['uri'])) { + $info = &$this->newDownloaderPackage($this); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = $info->initialize($dep); + PEAR::staticPopErrorHandling(); + if (!$err) { + // skip parameters that were missed by preferred_state + return PEAR::raiseError('Cannot initialize dependency'); + } + if (PEAR::isError($err)) { + if (!isset($this->_options['soft'])) { + $this->log(0, $err->getMessage()); + } + if (is_object($info)) { + $param = $info->getChannel() . '/' . $info->getPackage(); + } + return PEAR::raiseError('Package "' . $param . '" is not valid'); + } + return $info; + } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) && $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { $rest = &$this->config->getREST('1.0', $this->_options); $url = $rest->getDepDownloadURL($base, $xsdversion, $dep, $parr, - $state, $version); + $state, $version, $chan->getName()); if (PEAR::isError($url)) { return $url; } @@ -879,6 +1022,9 @@ class PEAR_Downloader extends PEAR_Common } $pf->setRawPackage($url['package']); $pf->setDeps($url['info']); + if ($url['compatible']) { + $pf->setCompatible($url['compatible']); + } $pf->setRawState($url['stability']); $url['info'] = &$pf; if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) { @@ -903,7 +1049,7 @@ class PEAR_Downloader extends PEAR_Common } else { $url = $this->_remote->call('package.getDepDownloadURL', $xsdversion, $dep, $parr, $state); } - if ($parr['channel'] != $curchannel) { + if ($this->config->get('default_channel') != $curchannel) { $this->configSet('default_channel', $curchannel); } if (!is_array($url)) { @@ -951,6 +1097,9 @@ class PEAR_Downloader extends PEAR_Common $package = "http://pear.php.net/get/$package"; } else { $chan = $this->_registry->getChannel($channel); + if (PEAR::isError($chan)) { + return ''; + } $package = "http://" . $chan->getServer() . "/get/$package"; } if (!extension_loaded("zlib")) { @@ -999,7 +1148,12 @@ class PEAR_Downloader extends PEAR_Common $bytes += $params; break; case 'start': - $this->log(1, "Starting to download {$params[0]} (".number_format($params[1], 0, '', ',')." bytes)"); + if($params[1] == -1) { + $length = "Unknown size"; + } else { + $length = number_format($params[1], 0, '', ',')." bytes"; + } + $this->log(1, "Starting to download {$params[0]} ($length)"); break; } if (method_exists($this->ui, '_downloadCallback')) @@ -1058,126 +1212,240 @@ class PEAR_Downloader extends PEAR_Common */ function sortPkgDeps(&$packages, $uninstall = false) { - $uninstall ? + $uninstall ? $this->sortPackagesForUninstall($packages) : $this->sortPackagesForInstall($packages); } - function _getDepTreeDP($package, $packages, &$deps, &$checked) - { - $pf = $package->getPackageFile(); - $checked[strtolower($package->getChannel())][strtolower($package->getPackage())] - = true; - $pdeps = $pf->getDeps(true); - if (!$pdeps) { - return; - } - if ($pf->getPackagexmlVersion() == '1.0') { - foreach ($pdeps as $dep) { - if ($dep['type'] != 'pkg') { - continue; - } - $deps['pear.php.net'][strtolower($dep['name'])] = true; - foreach ($packages as $p) { - $dep['channel'] = 'pear.php.net'; - $dep['package'] = $dep['name']; - if ($p->isEqual($dep)) { - if (!isset($checked[strtolower($p->getChannel())] - [strtolower($p->getPackage())])) { - // add the dependency's dependencies to the tree - $this->_getDepTreeDP($p, $packages, $deps, $checked); - } - } - } - } - } else { - $tdeps = array(); - if (isset($pdeps['required']['package'])) { - $t = $pdeps['required']['package']; - if (!isset($t[0])) { - $t = array($t); - } - $tdeps = array_merge($tdeps, $t); - } - if (isset($pdeps['required']['subpackage'])) { - $t = $pdeps['required']['subpackage']; - if (!isset($t[0])) { - $t = array($t); - } - $tdeps = array_merge($tdeps, $t); - } - if (isset($pdeps['optional']['package'])) { - $t = $pdeps['optional']['package']; - if (!isset($t[0])) { - $t = array($t); - } - $tdeps = array_merge($tdeps, $t); - } - if (isset($pdeps['optional']['subpackage'])) { - $t = $pdeps['optional']['subpackage']; - if (!isset($t[0])) { - $t = array($t); - } - $tdeps = array_merge($tdeps, $t); - } - if (isset($pdeps['group'])) { - if (!isset($pdeps['group'][0])) { - $pdeps['group'] = array($pdeps['group']); - } - foreach ($pdeps['group'] as $group) { - if (isset($group['package'])) { - $t = $group['package']; - if (!isset($t[0])) { - $t = array($t); - } - $tdeps = array_merge($tdeps, $t); - } - if (isset($group['subpackage'])) { - $t = $group['subpackage']; - if (!isset($t[0])) { - $t = array($t); - } - $tdeps = array_merge($tdeps, $t); - } - } - } - foreach ($tdeps as $dep) { - if (!isset($dep['channel'])) { - $depchannel = '__uri'; - } else { - $depchannel = $dep['channel']; - } - $deps[$depchannel][strtolower($dep['name'])] = true; - foreach ($packages as $p) { - $dep['channel'] = $depchannel; - $dep['package'] = $dep['name']; - if ($p->isEqual($dep)) { - if (!isset($checked[strtolower($p->getChannel())] - [strtolower($p->getPackage())])) { - // add the dependency's dependencies to the tree - $this->_getDepTreeDP($p, $packages, $deps, $checked); - } - } - } - } - } - } - /** * Sort a list of arrays of array(downloaded packagefilename) by dependency. * - * It also removes duplicate dependencies + * This uses the topological sort method from graph theory, and the + * Structures_Graph package to properly sort dependencies for installation. * @param array an array of downloaded PEAR_Downloader_Packages * @return array array of array(packagefilename, package.xml contents) */ function sortPackagesForInstall(&$packages) { + require_once 'Structures/Graph.php'; + require_once 'Structures/Graph/Node.php'; + require_once 'Structures/Graph/Manipulator/TopologicalSorter.php'; + $depgraph = new Structures_Graph(true); + $nodes = array(); + $reg = &$this->config->getRegistry(); foreach ($packages as $i => $package) { - $checked = $deps = array(); - $this->_getDepTreeDP($packages[$i], $packages, $deps, $checked); - $this->_depTree[$package->getChannel()][$package->getPackage()] = $deps; + $pname = $reg->parsedPackageNameToString( + array( + 'channel' => $package->getChannel(), + 'package' => strtolower($package->getPackage()), + )); + $nodes[$pname] = new Structures_Graph_Node; + $nodes[$pname]->setData($packages[$i]); + $depgraph->addNode($nodes[$pname]); + } + $deplinks = array(); + foreach ($nodes as $package => $node) { + $pf = &$node->getData(); + $pdeps = $pf->getDeps(true); + if (!$pdeps) { + continue; + } + if ($pf->getPackagexmlVersion() == '1.0') { + foreach ($pdeps as $dep) { + if ($dep['type'] != 'pkg' || + (isset($dep['optional']) && $dep['optional'] == 'yes')) { + continue; + } + $dname = $reg->parsedPackageNameToString( + array( + 'channel' => 'pear.php.net', + 'package' => strtolower($dep['name']), + )); + if (isset($nodes[$dname])) + { + if (!isset($deplinks[$dname])) { + $deplinks[$dname] = array(); + } + $deplinks[$dname][$package] = 1; + // dependency is in installed packages + continue; + } + $dname = $reg->parsedPackageNameToString( + array( + 'channel' => 'pecl.php.net', + 'package' => strtolower($dep['name']), + )); + if (isset($nodes[$dname])) + { + if (!isset($deplinks[$dname])) { + $deplinks[$dname] = array(); + } + $deplinks[$dname][$package] = 1; + // dependency is in installed packages + continue; + } + } + } else { + // the only ordering we care about is: + // 1) subpackages must be installed before packages that depend on them + // 2) required deps must be installed before packages that depend on them + if (isset($pdeps['required']['subpackage'])) { + $t = $pdeps['required']['subpackage']; + if (!isset($t[0])) { + $t = array($t); + } + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + if (isset($pdeps['group'])) { + if (!isset($pdeps['group'][0])) { + $pdeps['group'] = array($pdeps['group']); + } + foreach ($pdeps['group'] as $group) { + if (isset($group['subpackage'])) { + $t = $group['subpackage']; + if (!isset($t[0])) { + $t = array($t); + } + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + } + } + if (isset($pdeps['optional']['subpackage'])) { + $t = $pdeps['optional']['subpackage']; + if (!isset($t[0])) { + $t = array($t); + } + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + if (isset($pdeps['required']['package'])) { + $t = $pdeps['required']['package']; + if (!isset($t[0])) { + $t = array($t); + } + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + if (isset($pdeps['group'])) { + if (!isset($pdeps['group'][0])) { + $pdeps['group'] = array($pdeps['group']); + } + foreach ($pdeps['group'] as $group) { + if (isset($group['package'])) { + $t = $group['package']; + if (!isset($t[0])) { + $t = array($t); + } + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + } + } + } + } + $this->_detectDepCycle($deplinks); + foreach ($deplinks as $dependent => $parents) { + foreach ($parents as $parent => $unused) { + $nodes[$dependent]->connectTo($nodes[$parent]); + } + } + $installOrder = Structures_Graph_Manipulator_TopologicalSorter::sort($depgraph); + $ret = array(); + for ($i = 0; $i < count($installOrder); $i++) { + foreach ($installOrder[$i] as $index => $sortedpackage) { + $data = &$installOrder[$i][$index]->getData(); + $ret[] = &$nodes[$reg->parsedPackageNameToString( + array( + 'channel' => $data->getChannel(), + 'package' => strtolower($data->getPackage()), + ))]->getData(); + } + } + $packages = $ret; + return; + } + + /** + * Detect recursive links between dependencies and break the cycles + * + * @param array + * @access private + */ + function _detectDepCycle(&$deplinks) + { + do { + $keepgoing = false; + foreach ($deplinks as $dep => $parents) { + foreach ($parents as $parent => $unused) { + // reset the parent cycle detector + $this->_testCycle(null, null, null); + if ($this->_testCycle($dep, $deplinks, $parent)) { + $keepgoing = true; + unset($deplinks[$dep][$parent]); + if (count($deplinks[$dep]) == 0) { + unset($deplinks[$dep]); + } + continue 3; + } + } + } + } while ($keepgoing); + } + + function _testCycle($test, $deplinks, $dep) + { + static $visited = array(); + if ($test === null) { + $visited = array(); + return; + } + // this happens when a parent has a dep cycle on another dependency + // but the child is not part of the cycle + if (isset($visited[$dep])) { + return false; + } + $visited[$dep] = 1; + if ($test == $dep) { + return true; + } + if (isset($deplinks[$dep])) { + if (in_array($test, array_keys($deplinks[$dep]), true)) { + return true; + } + foreach ($deplinks[$dep] as $parent => $unused) { + if ($this->_testCycle($test, $deplinks, $parent)) { + return true; + } + } + } + return false; + } + + /** + * Set up the dependency for installation parsing + * + * @param array $t dependency information + * @param PEAR_Registry $reg + * @param array $deplinks list of dependency links already established + * @param array $nodes all existing package nodes + * @param string $package parent package name + * @access private + */ + function _setupGraph($t, $reg, &$deplinks, &$nodes, $package) + { + foreach ($t as $dep) { + $depchannel = !isset($dep['channel']) ? + '__uri': $dep['channel']; + $dname = $reg->parsedPackageNameToString( + array( + 'channel' => $depchannel, + 'package' => strtolower($dep['name']), + )); + if (isset($nodes[$dname])) + { + if (!isset($deplinks[$dname])) { + $deplinks[$dname] = array(); + } + $deplinks[$dname][$package] = 1; + } } - usort($packages, array(&$this, '_sortInstall')); } function _dependsOn($a, $b) @@ -1265,6 +1533,7 @@ class PEAR_Downloader extends PEAR_Common * @param false|string|array $lastmodified header values to check against for caching * use false to return the header values from this download * @param false|array $accept Accept headers to send + * @param false|string $channel Channel to use for retrieving authentication * @return string|array Returns the full path of the downloaded file or a PEAR * error on failure. If the error is caused by * socket-related errors, the error object will @@ -1275,8 +1544,12 @@ class PEAR_Downloader extends PEAR_Common * @access public */ function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null, - $accept = false) + $accept = false, $channel = false) { + static $redirect = 0; + // allways reset , so we are clean case of error + $wasredirect = $redirect; + $redirect = 0; if ($callback) { call_user_func($callback, 'setup', array(&$ui)); } @@ -1287,9 +1560,9 @@ class PEAR_Downloader extends PEAR_Common if (!isset($info['host'])) { return PEAR::raiseError('Cannot download from non-URL "' . $url . '"'); } else { - $host = @$info['host']; - $port = @$info['port']; - $path = @$info['path']; + $host = isset($info['host']) ? $info['host'] : null; + $port = isset($info['port']) ? $info['port'] : null; + $path = isset($info['path']) ? $info['path'] : null; } if (isset($this)) { $config = &$this->config; @@ -1297,19 +1570,16 @@ class PEAR_Downloader extends PEAR_Common $config = &PEAR_Config::singleton(); } $proxy_host = $proxy_port = $proxy_user = $proxy_pass = ''; - if ($config->get('http_proxy')&& + if ($config->get('http_proxy') && $proxy = parse_url($config->get('http_proxy'))) { - $proxy_host = @$proxy['host']; + $proxy_host = isset($proxy['host']) ? $proxy['host'] : null; if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') { $proxy_host = 'ssl://' . $proxy_host; } - $proxy_port = @$proxy['port']; - $proxy_user = @$proxy['user']; - $proxy_pass = @$proxy['pass']; + $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080; + $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null; + $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null; - if ($proxy_port == '') { - $proxy_port = 8080; - } if ($callback) { call_user_func($callback, 'message', "Using HTTP proxy $host:$port"); } @@ -1349,8 +1619,10 @@ class PEAR_Downloader extends PEAR_Common } if ($lastmodified === false || $lastmodified) { $request = "GET $path HTTP/1.1\r\n"; + $request .= "Host: $host:$port\r\n"; } else { $request = "GET $path HTTP/1.0\r\n"; + $request .= "Host: $host\r\n"; } } $ifmodifiedsince = ''; @@ -1364,11 +1636,11 @@ class PEAR_Downloader extends PEAR_Common } else { $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : ''); } - $request .= "Host: $host:$port\r\n" . $ifmodifiedsince . - "User-Agent: PEAR/1.4.5/PHP/" . PHP_VERSION . "\r\n"; + $request .= $ifmodifiedsince . "User-Agent: PEAR/1.7.2/PHP/" . + PHP_VERSION . "\r\n"; if (isset($this)) { // only pass in authentication for non-static calls - $username = $config->get('username'); - $password = $config->get('password'); + $username = $config->get('username', null, $channel); + $password = $config->get('password', null, $channel); if ($username && $password) { $tmp = base64_encode("$username:$password"); $request .= "Authorization: Basic $tmp\r\n"; @@ -1385,20 +1657,35 @@ class PEAR_Downloader extends PEAR_Common $request .= "\r\n"; fwrite($fp, $request); $headers = array(); + $reply = 0; while (trim($line = fgets($fp, 1024))) { - if (preg_match('/^([^:]+):\s+(.*)\s*$/', $line, $matches)) { + if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) { $headers[strtolower($matches[1])] = trim($matches[2]); } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) { - if ($matches[1] == 304 && ($lastmodified || ($lastmodified === false))) { + $reply = (int) $matches[1]; + if ($reply == 304 && ($lastmodified || ($lastmodified === false))) { return false; } - if ($matches[1] != 200) { + if (! in_array($reply, array(200, 301, 302, 303, 305, 307))) { return PEAR::raiseError("File http://$host:$port$path not valid (received: $line)"); } } } + if ($reply != 200) { + if (isset($headers['location'])) { + if ($wasredirect < 5) { + $redirect = $wasredirect + 1; + return $this->downloadHttp($headers['location'], + $ui, $save_dir, $callback, $lastmodified, $accept); + } else { + return PEAR::raiseError("File http://$host:$port$path not valid (redirection looped more than 5 times)"); + } + } else { + return PEAR::raiseError("File http://$host:$port$path not valid (redirected but no location)"); + } + } if (isset($headers['content-disposition']) && - preg_match('/\sfilename=\"([^;]*\S)\"\s*(;|$)/', $headers['content-disposition'], $matches)) { + preg_match('/\sfilename=\"([^;]*\S)\"\s*(;|\\z)/', $headers['content-disposition'], $matches)) { $save_as = basename($matches[1]); } else { $save_as = basename($url); @@ -1426,7 +1713,7 @@ class PEAR_Downloader extends PEAR_Common if ($callback) { call_user_func($callback, 'start', array(basename($dest_file), $length)); } - while ($data = @fread($fp, 1024)) { + while ($data = fread($fp, 1024)) { $bytes += strlen($data); if ($callback) { call_user_func($callback, 'bytesread', $bytes); @@ -1462,4 +1749,4 @@ class PEAR_Downloader extends PEAR_Common } // }}} -?> \ No newline at end of file +?> diff --git a/includes/pear/PEAR/Downloader/Package.php b/includes/pear/PEAR/Downloader/Package.php index c16e29db..90eaa2d2 100644 --- a/includes/pear/PEAR/Downloader/Package.php +++ b/includes/pear/PEAR/Downloader/Package.php @@ -13,12 +13,22 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Package.php,v 1.88 2005/10/29 22:09:45 cellog Exp $ + * @version CVS: $Id: Package.php,v 1.113 2008/03/29 14:18:36 dufuz Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ +/** + * Error code when parameter initialization fails because no releases + * exist within preferred_state, but releases do exist + */ +define('PEAR_DOWNLOADER_PACKAGE_STATE', -1003); +/** + * Error code when parameter initialization fails because no releases + * exist that will work with the existing PHP version + */ +define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004); /** * Coordinates download parameters and manages their dependencies * prior to downloading them. @@ -42,9 +52,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -62,6 +72,11 @@ class PEAR_Downloader_Package * @var PEAR_Registry */ var $_registry; + /** + * Used to implement packagingroot properly + * @var PEAR_Registry + */ + var $_installRegistry; /** * @var PEAR_PackageFile_v1|PEAR_PackageFile|v2 */ @@ -117,13 +132,21 @@ class PEAR_Downloader_Package var $_validated = false; /** - * @param PEAR_Config + * @param PEAR_Downloader */ function PEAR_Downloader_Package(&$downloader) { $this->_downloader = &$downloader; $this->_config = &$this->_downloader->config; $this->_registry = &$this->_config->getRegistry(); + $options = $downloader->getOptions(); + if (isset($options['packagingroot'])) { + $this->_config->setInstallRoot($options['packagingroot']); + $this->_installRegistry = &$this->_config->getRegistry(); + $this->_config->setInstallRoot(false); + } else { + $this->_installRegistry = &$this->_registry; + } $this->_valid = $this->_analyzed = false; } @@ -134,7 +157,7 @@ class PEAR_Downloader_Package * This is the heart of the PEAR_Downloader_Package(), and is used in * {@link PEAR_Downloader::download()} * @param string - * @return void|PEAR_Error + * @return bool|PEAR_Error */ function initialize($param) { @@ -161,6 +184,10 @@ class PEAR_Downloader_Package } $err = $this->_fromString($param); if (PEAR::isError($err) || !$this->_valid) { + if (PEAR::isError($err) && + $err->getCode() == PEAR_DOWNLOADER_PACKAGE_STATE) { + return false; // instruct the downloader to silently skip + } if (isset($this->_type) && $this->_type == 'local' && PEAR::isError($origErr)) { if (is_array($origErr->getUserInfo())) { @@ -196,6 +223,7 @@ class PEAR_Downloader_Package } } } + return true; } /** @@ -252,7 +280,7 @@ class PEAR_Downloader_Package return $this->_downloader; } - function getType() + function getType() { return $this->_type; } @@ -345,8 +373,8 @@ class PEAR_Downloader_Package foreach ($params as $i => $param) { // remove self if already installed with this version // this does not need any pecl magic - we only remove exact matches - if ($param->_registry->packageExists($param->getPackage(), $param->getChannel())) { - if (version_compare($param->_registry->packageInfo($param->getPackage(), 'version', + if ($param->_installRegistry->packageExists($param->getPackage(), $param->getChannel())) { + if (version_compare($param->_installRegistry->packageInfo($param->getPackage(), 'version', $param->getChannel()), $param->getVersion(), '==')) { if (!isset($options['force'])) { $info = $param->getParsedPackage(); @@ -356,7 +384,7 @@ class PEAR_Downloader_Package $param->_downloader->log(1, 'Skipping package "' . $param->getShortName() . '", already installed as version ' . - $param->_registry->packageInfo($param->getPackage(), + $param->_installRegistry->packageInfo($param->getPackage(), 'version', $param->getChannel())); } $params[$i] = false; @@ -367,7 +395,7 @@ class PEAR_Downloader_Package $param->_downloader->log(1, 'Skipping package "' . $param->getShortName() . '", already installed as version ' . - $param->_registry->packageInfo($param->getPackage(), 'version', + $param->_installRegistry->packageInfo($param->getPackage(), 'version', $param->getChannel())); $params[$i] = false; } @@ -430,7 +458,9 @@ class PEAR_Downloader_Package } if (!($ret = $this->_detect2Dep($dep, $pname, 'optional', $params))) { $dep['package'] = $dep['name']; - if (@$skipnames[count($skipnames) - 1] == + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == $this->_registry->parsedPackageNameToString($dep, true)) { array_pop($skipnames); } @@ -551,7 +581,7 @@ class PEAR_Downloader_Package } $dep['package'] = $dep['name']; $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params, $group == 'optional' && - !isset($options['alldeps'])); + !isset($options['alldeps']), true); PEAR::popErrorHandling(); if (PEAR::isError($ret)) { if (!isset($options['soft'])) { @@ -569,7 +599,7 @@ class PEAR_Downloader_Package // we can't determine whether upgrade is necessary until we know what // version would be downloaded if (!isset($options['force']) && $this->isInstalled($ret, $oper)) { - $version = $this->_registry->packageInfo($dep['name'], 'version', + $version = $this->_installRegistry->packageInfo($dep['name'], 'version', $dep['channel']); $dep['package'] = $dep['name']; if (!isset($options['soft'])) { @@ -645,7 +675,7 @@ class PEAR_Downloader_Package $chan = 'pecl.php.net'; $url = $this->_downloader->_getDepPackageDownloadUrl($newdep, $pname); - $obj = &$this->_registry->getPackage($dep['name']); + $obj = &$this->_installRegistry->getPackage($dep['name']); if (PEAR::isError($url)) { PEAR::popErrorHandling(); if ($obj !== null && $this->isInstalled($obj, $dep['rel'])) { @@ -659,7 +689,9 @@ class PEAR_Downloader_Package $this->_registry->parsedPackageNameToString($dep, true) . '", already installed as version ' . $obj->getVersion()); } - if (@$skipnames[count($skipnames) - 1] == + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == $this->_registry->parsedPackageNameToString($dep, true)) { array_pop($skipnames); } @@ -667,8 +699,7 @@ class PEAR_Downloader_Package } else { if (isset($dep['optional']) && $dep['optional'] == 'yes') { $this->_downloader->log(2, $this->getShortName() . - ': Skipping ' . $group - . ' dependency "' . + ': Skipping optional dependency "' . $this->_registry->parsedPackageNameToString($dep, true) . '", no releases exist'); continue; @@ -724,10 +755,10 @@ class PEAR_Downloader_Package 'optional'; $dep['package'] = $dep['name']; if (isset($newdep)) { - $version = $this->_registry->packageInfo($newdep['name'], 'version', + $version = $this->_installRegistry->packageInfo($newdep['name'], 'version', $newdep['channel']); } else { - $version = $this->_registry->packageInfo($dep['name'], 'version'); + $version = $this->_installRegistry->packageInfo($dep['name'], 'version'); } $dep['version'] = $url['version']; if (!isset($options['soft'])) { @@ -736,7 +767,9 @@ class PEAR_Downloader_Package $this->_registry->parsedPackageNameToString($dep, true) . '", already installed as version ' . $version); } - if (@$skipnames[count($skipnames) - 1] == + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == $this->_registry->parsedPackageNameToString($dep, true)) { array_pop($skipnames); } @@ -752,7 +785,7 @@ class PEAR_Downloader_Package $dep['package'] = $dep['name']; $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params, isset($dep['optional']) && $dep['optional'] == 'yes' && - !isset($options['alldeps'])); + !isset($options['alldeps']), true); PEAR::popErrorHandling(); if (PEAR::isError($ret)) { if (!isset($options['soft'])) { @@ -794,7 +827,7 @@ class PEAR_Downloader_Package } function getParsedPackage() - { + { if (isset($this->_packagefile) || isset($this->_parsedname)) { return array('channel' => $this->getChannel(), 'package' => $this->getPackage(), @@ -937,7 +970,11 @@ class PEAR_Downloader_Package if (isset($this->_packagefile)) { return $this->_packagefile->isExtension($name); } elseif (isset($this->_downloadURL['info'])) { - return $this->_downloadURL['info']->getProvidesExtension() == $name; + if ($this->_downloadURL['info']->getPackagexmlVersion() == '2.0') { + return $this->_downloadURL['info']->getProvidesExtension() == $name; + } else { + return false; + } } else { return false; } @@ -946,13 +983,15 @@ class PEAR_Downloader_Package function getDeps() { if (isset($this->_packagefile)) { - if ($this->_packagefile->getPackagexmlVersion() == '2.0') { + $ver = $this->_packagefile->getPackagexmlVersion(); + if (version_compare($ver, '2.0', '>=')) { return $this->_packagefile->getDeps(true); } else { return $this->_packagefile->getDeps(); } } elseif (isset($this->_downloadURL['info'])) { - if ($this->_downloadURL['info']->getPackagexmlVersion() == '2.0') { + $ver = $this->_downloadURL['info']->getPackagexmlVersion(); + if (version_compare($ver, '2.0', '>=')) { return $this->_downloadURL['info']->getDeps(true); } else { return $this->_downloadURL['info']->getDeps(); @@ -987,8 +1026,10 @@ class PEAR_Downloader_Package } } else { if (isset($param['uri'])) { - $param['channel'] = '__uri'; - $param['package'] = $param['dep']['name']; + if ($this->getChannel() != '__uri') { + return false; + } + return $param['uri'] == $this->getURI(); } $package = isset($param['package']) ? $param['package'] : $param['info']->getPackage(); @@ -1075,21 +1116,21 @@ class PEAR_Downloader_Package } } $options = $this->_downloader->getOptions(); - $test = $this->_registry->packageExists($package, $channel); + $test = $this->_installRegistry->packageExists($package, $channel); if (!$test && $channel == 'pecl.php.net') { // do magic to allow upgrading from old pecl packages to new ones - $test = $this->_registry->packageExists($package, 'pear.php.net'); + $test = $this->_installRegistry->packageExists($package, 'pear.php.net'); $channel = 'pear.php.net'; } if ($test) { if (isset($dep['uri'])) { - if ($this->_registry->packageInfo($package, 'uri', '__uri') == $dep['uri']) { + if ($this->_installRegistry->packageInfo($package, 'uri', '__uri') == $dep['uri']) { return true; } } if (isset($options['upgrade'])) { if ($oper == 'has') { - if (version_compare($this->_registry->packageInfo( + if (version_compare($this->_installRegistry->packageInfo( $package, 'version', $channel), $dep['version'], '>=')) { return true; @@ -1097,7 +1138,7 @@ class PEAR_Downloader_Package return false; } } else { - if (version_compare($this->_registry->packageInfo( + if (version_compare($this->_installRegistry->packageInfo( $package, 'version', $channel), $dep['version'], '>=')) { return true; @@ -1110,11 +1151,55 @@ class PEAR_Downloader_Package return false; } + /** + * Detect duplicate package names with differing versions + * + * If a user requests to install Date 1.4.6 and Date 1.4.7, + * for instance, this is a logic error. This method + * detects this situation. + * + * @param array $params array of PEAR_Downloader_Package objects + * @param array $errorparams empty array + * @return array array of stupid duplicated packages in PEAR_Downloader_Package obejcts + */ + function detectStupidDuplicates($params, &$errorparams) + { + $existing = array(); + foreach ($params as $i => $param) { + $package = $param->getPackage(); + $channel = $param->getChannel(); + $group = $param->getGroup(); + if (!isset($existing[$channel . '/' . $package])) { + $existing[$channel . '/' . $package] = array(); + } + if (!isset($existing[$channel . '/' . $package][$group])) { + $existing[$channel . '/' . $package][$group] = array(); + } + $existing[$channel . '/' . $package][$group][] = $i; + } + + $indices = array(); + foreach ($existing as $package => $groups) { + foreach ($groups as $group => $dupes) { + if (count($dupes) > 1) { + $indices = $indices + $dupes; + } + } + } + + $indices = array_unique($indices); + foreach ($indices as $index) { + $errorparams[] = $params[$index]; + } + return count($errorparams); + } + /** * @param array + * @param bool ignore install groups - for final removal of dupe packages * @static */ - function removeDuplicates(&$params) + function removeDuplicates(&$params, $ignoreGroups = false) { $pnames = array(); foreach ($params as $i => $param) { @@ -1122,8 +1207,13 @@ class PEAR_Downloader_Package continue; } if ($param->getPackage()) { + if ($ignoreGroups) { + $group = ''; + } else { + $group = $param->getGroup(); + } $pnames[$i] = $param->getChannel() . '/' . - $param->getPackage() . '-' . $param->getVersion() . '#' . $param->getGroup(); + $param->getPackage() . '-' . $param->getVersion() . '#' . $group; } } $pnames = array_unique($pnames); @@ -1138,8 +1228,13 @@ class PEAR_Downloader_Package $unset[] = $i; continue; } + if ($ignoreGroups) { + $group = ''; + } else { + $group = $param->getGroup(); + } if (!isset($testp[$param->getChannel() . '/' . $param->getPackage() . '-' . - $param->getVersion() . '#' . $param->getGroup()])) { + $param->getVersion() . '#' . $group])) { $unset[] = $i; } } @@ -1188,7 +1283,10 @@ class PEAR_Downloader_Package $filecontents = $pf->getFileContents($file); $dl = &$param->getDownloader(); $options = $dl->getOptions(); - $fp = @fopen($dl->getDownloadDir() . DIRECTORY_SEPARATOR . $file, 'wb'); + if (PEAR::isError($dir = $dl->getDownloadDir())) { + return $dir; + } + $fp = @fopen($dir . DIRECTORY_SEPARATOR . $file, 'wb'); if (!$fp) { continue; } @@ -1199,7 +1297,11 @@ class PEAR_Downloader_Package } $obj = &new PEAR_Downloader_Package($params[$i]->getDownloader()); PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $e = $obj->_fromFile($a = $dl->getDownloadDir() . DIRECTORY_SEPARATOR . $file); + if (PEAR::isError($dir = $dl->getDownloadDir())) { + PEAR::popErrorHandling(); + return $dir; + } + $e = $obj->_fromFile($a = $dir . DIRECTORY_SEPARATOR . $file); PEAR::popErrorHandling(); if (PEAR::isError($e)) { if (!isset($options['soft'])) { @@ -1309,38 +1411,46 @@ class PEAR_Downloader_Package */ function _fromFile(&$param) { - if (is_string($param) && !@is_file($param)) { - $test = explode('#', $param); - $group = array_pop($test); - if (@is_file(implode('#', $test))) { - $this->setGroup($group); - $param = implode('#', $test); - $this->_explicitGroup = true; + $saveparam = $param; + if (is_string($param)) { + if (!@file_exists($param)) { + $test = explode('#', $param); + $group = array_pop($test); + if (@file_exists(implode('#', $test))) { + $this->setGroup($group); + $param = implode('#', $test); + $this->_explicitGroup = true; + } + } + if (@is_file($param)) { + $this->_type = 'local'; + $options = $this->_downloader->getOptions(); + if (isset($options['downloadonly'])) { + $pkg = &$this->getPackagefileObject($this->_config, + $this->_downloader->_debug); + } else { + if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) { + return $dir; + } + $pkg = &$this->getPackagefileObject($this->_config, + $this->_downloader->_debug, $dir); + } + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING); + PEAR::popErrorHandling(); + if (PEAR::isError($pf)) { + $this->_valid = false; + $param = $saveparam; + return $pf; + } + $this->_packagefile = &$pf; + if (!$this->getGroup()) { + $this->setGroup('default'); // install the default dependency group + } + return $this->_valid = true; } } - if (@is_file($param)) { - $this->_type = 'local'; - $options = $this->_downloader->getOptions(); - if (isset($options['downloadonly'])) { - $pkg = &$this->getPackagefileObject($this->_config, - $this->_downloader->_debug); - } else { - $pkg = &$this->getPackagefileObject($this->_config, - $this->_downloader->_debug, $this->_downloader->getDownloadDir()); - } - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING); - PEAR::popErrorHandling(); - if (PEAR::isError($pf)) { - $this->_valid = false; - return $pf; - } - $this->_packagefile = &$pf; - if (!$this->getGroup()) { - $this->setGroup('default'); // install the default dependency group - } - return $this->_valid = true; - } + $param = $saveparam; return $this->_valid = false; } @@ -1353,15 +1463,20 @@ class PEAR_Downloader_Package $callback = $this->_downloader->ui ? array(&$this->_downloader, '_downloadCallback') : null; $this->_downloader->pushErrorHandling(PEAR_ERROR_RETURN); + if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) { + $this->_downloader->popErrorHandling(); + return $dir; + } + $this->_downloader->log(3, 'Downloading "' . $param . '"'); $file = $this->_downloader->downloadHttp($param, $this->_downloader->ui, - $this->_downloader->getDownloadDir(), $callback); + $dir, $callback, null, false, $this->getChannel()); $this->_downloader->popErrorHandling(); if (PEAR::isError($file)) { if (!empty($saveparam)) { $saveparam = ", cannot download \"$saveparam\""; } $err = PEAR::raiseError('Could not download from "' . $param . - '"' . $saveparam); + '"' . $saveparam . ' (' . $file->getMessage() . ')'); return $err; } if ($this->_rawpackagefile) { @@ -1391,8 +1506,11 @@ class PEAR_Downloader_Package if (isset($options['downloadonly'])) { $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug); } else { + if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) { + return $dir; + } $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug, - $this->_downloader->getDownloadDir()); + $dir); } PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $pf = &$pkg->fromAnyFile($file, PEAR_VALIDATE_INSTALLING); @@ -1500,7 +1618,7 @@ class PEAR_Downloader_Package } $info = $this->_downloader->_getPackageDownloadUrl($pname); if (PEAR::isError($info)) { - if ($pname['channel'] == 'pear.php.net') { + if ($info->getCode() != -976 && $pname['channel'] == 'pear.php.net') { // try pecl $pname['channel'] = 'pecl.php.net'; if ($test = $this->_downloader->_getPackageDownloadUrl($pname)) { @@ -1509,7 +1627,11 @@ class PEAR_Downloader_Package $this->_registry->parsedPackageNameToString($pname, true) . ' can be installed with "pecl install ' . $pname['package'] . '"'); + } else { + $pname['channel'] = 'pear.php.net'; } + } else { + $pname['channel'] = 'pear.php.net'; } } return $info; @@ -1532,9 +1654,11 @@ class PEAR_Downloader_Package * @param array name information of the package * @param array|null packages to be downloaded * @param bool is this an optional dependency? + * @param bool is this any kind of dependency? * @access private */ - function _analyzeDownloadURL($info, $param, $pname, $params = null, $optional = false) + function _analyzeDownloadURL($info, $param, $pname, $params = null, $optional = false, + $isdependency = false) { if (!is_string($param) && PEAR_Downloader_Package::willDownload($param, $params)) { return false; @@ -1569,6 +1693,16 @@ class PEAR_Downloader_Package } } if (!isset($info['url'])) { + if ($this->isInstalled($info)) { + if ($isdependency && version_compare($info['version'], + $this->_registry->packageInfo($info['info']->getPackage(), + 'version', $info['info']->getChannel()), '<=')) { + // ignore bogus errors of "failed to download dependency" + // if it is already installed and the one that would be + // downloaded is older or the same version (Bug #7219) + return false; + } + } $instead = ', will instead download version ' . $info['version'] . ', stability "' . $info['info']->getState() . '"'; // releases exist, but we failed to get any @@ -1620,6 +1754,21 @@ class PEAR_Downloader_Package 'channel' => $pname['channel'], 'version' => $info['version'])); } else { + if (isset($info['php']) && $info['php']) { + $err = PEAR::raiseError('Failed to download ' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], + 'package' => $pname['package']), + true) . + ', latest release is version ' . $info['php']['v'] . + ', but it requires PHP version "' . + $info['php']['m'] . '", use "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], 'package' => $pname['package'], + 'version' => $info['php']['v'])) . '" to install', + PEAR_DOWNLOADER_PACKAGE_PHPVERSION); + return $err; + } // construct helpful error message if (isset($pname['version'])) { $vs = ', version "' . $pname['version'] . '"'; @@ -1659,6 +1808,22 @@ class PEAR_Downloader_Package $vs = ' within preferred state "' . $this->_downloader->config->get( 'preferred_state') . '"'; } + $options = $this->_downloader->getOptions(); + // this is only set by the "download-all" command + if (isset($options['ignorepreferred_state'])) { + $err = PEAR::raiseError( + 'Failed to download ' . $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], 'package' => $pname['package']), + true) + . $vs . + ', latest release is version ' . $info['version'] . + ', stability "' . $info['info']->getState() . '", use "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], 'package' => $pname['package'], + 'version' => $info['version'])) . '" to install', + PEAR_DOWNLOADER_PACKAGE_STATE); + return $err; + } $err = PEAR::raiseError( 'Failed to download ' . $this->_registry->parsedPackageNameToString( array('channel' => $pname['channel'], 'package' => $pname['package']), @@ -1672,6 +1837,16 @@ class PEAR_Downloader_Package return $err; } } + if (isset($info['deprecated']) && $info['deprecated']) { + $this->_downloader->log(0, + 'WARNING: "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $info['info']->getChannel(), + 'package' => $info['info']->getPackage()), true) . + '" is deprecated in favor of "' . + $this->_registry->parsedPackageNameToString($info['deprecated'], true) . + '"'); + } return $info; } } diff --git a/includes/pear/PEAR/ErrorStack.php b/includes/pear/PEAR/ErrorStack.php index 34ff3658..ad049011 100644 --- a/includes/pear/PEAR/ErrorStack.php +++ b/includes/pear/PEAR/ErrorStack.php @@ -21,9 +21,9 @@ * @category Debugging * @package PEAR_ErrorStack * @author Greg Beaver - * @copyright 2004-2005 Greg Beaver + * @copyright 2004-2008 Greg Beaver * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ErrorStack.php,v 1.21 2005/09/04 23:29:50 cellog Exp $ + * @version CVS: $Id: ErrorStack.php,v 1.28 2008/01/03 20:26:35 cellog Exp $ * @link http://pear.php.net/package/PEAR_ErrorStack */ @@ -132,12 +132,12 @@ define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2); * $local_stack = new PEAR_ErrorStack('MyPackage'); * * @author Greg Beaver - * @version 1.4.5 + * @version 1.7.2 * @package PEAR_ErrorStack * @category Debugging - * @copyright 2004-2005 Greg Beaver + * @copyright 2004-2008 Greg Beaver * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ErrorStack.php,v 1.21 2005/09/04 23:29:50 cellog Exp $ + * @version CVS: $Id: ErrorStack.php,v 1.28 2008/01/03 20:26:35 cellog Exp $ * @link http://pear.php.net/package/PEAR_ErrorStack */ class PEAR_ErrorStack { @@ -476,19 +476,10 @@ class PEAR_ErrorStack { * @param array $backtrace Protected parameter: use this to pass in the * {@link debug_backtrace()} that should be used * to find error context - * @return PEAR_Error|array|Exception - * if compatibility mode is on, a PEAR_Error is also - * thrown. If the class Exception exists, then one - * is returned to allow code like: - * - * throw ($stack->push(MY_ERROR_CODE, 'error', array('username' => 'grob'))); - * + * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also + * thrown. If a PEAR_Error is returned, the userinfo + * property is set to the following array: * - * The errorData property of the exception class will be set to the array - * that would normally be returned. If a PEAR_Error is returned, the userinfo - * property is set to the array - * - * Otherwise, an array is returned in this format: * * array( * 'code' => $code, @@ -501,6 +492,8 @@ class PEAR_ErrorStack { * //['repackage' => $err] repackaged error array/Exception class * ); * + * + * Normally, the previous array is returned. */ function push($code, $level = 'error', $params = array(), $msg = false, $repackage = false, $backtrace = false) @@ -575,6 +568,9 @@ class PEAR_ErrorStack { } if ($push) { array_unshift($this->_errors, $err); + if (!isset($this->_errorsByLevel[$err['level']])) { + $this->_errorsByLevel[$err['level']] = array(); + } $this->_errorsByLevel[$err['level']][] = &$this->_errors[0]; } if ($log) { @@ -606,13 +602,8 @@ class PEAR_ErrorStack { * @param array $backtrace Protected parameter: use this to pass in the * {@link debug_backtrace()} that should be used * to find error context - * @return PEAR_Error|null|Exception - * if compatibility mode is on, a PEAR_Error is also - * thrown. If the class Exception exists, then one - * is returned to allow code like: - * - * throw ($stack->push(MY_ERROR_CODE, 'error', array('username' => 'grob'))); - * + * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also + * thrown. see docs for {@link push()} * @static */ function staticPush($package, $code, $level = 'error', $params = array(), @@ -673,9 +664,33 @@ class PEAR_ErrorStack { */ function pop() { - return @array_shift($this->_errors); + $err = @array_shift($this->_errors); + if (!is_null($err)) { + @array_pop($this->_errorsByLevel[$err['level']]); + if (!count($this->_errorsByLevel[$err['level']])) { + unset($this->_errorsByLevel[$err['level']]); + } + } + return $err; } - + + /** + * Pop an error off of the error stack, static method + * + * @param string package name + * @return boolean + * @since PEAR1.5.0a1 + */ + function staticPop($package) + { + if ($package) { + if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { + return false; + } + return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->pop(); + } + } + /** * Determine whether there are any errors on the stack * @param string|array Level name. Use to determine if any errors @@ -842,7 +857,7 @@ class PEAR_ErrorStack { 'line' => $filebacktrace['line']); // rearrange for eval'd code or create function errors if (strpos($filebacktrace['file'], '(') && - preg_match(';^(.*?)\((\d+)\) : (.*?)$;', $filebacktrace['file'], + preg_match(';^(.*?)\((\d+)\) : (.*?)\\z;', $filebacktrace['file'], $matches)) { $ret['file'] = $matches[1]; $ret['line'] = $matches[2] + 0; diff --git a/includes/pear/PEAR/Exception.php b/includes/pear/PEAR/Exception.php index e376b82e..b3d75b20 100644 --- a/includes/pear/PEAR/Exception.php +++ b/includes/pear/PEAR/Exception.php @@ -17,9 +17,9 @@ * @author Hans Lellelid * @author Bertrand Mansion * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Exception.php,v 1.22 2005/09/13 04:56:41 cellog Exp $ + * @version CVS: $Id: Exception.php,v 1.29 2008/01/03 20:26:35 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.3.3 */ @@ -93,9 +93,9 @@ * @author Hans Lellelid * @author Bertrand Mansion * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.3.3 * @@ -112,19 +112,31 @@ class PEAR_Exception extends Exception /** * Supported signatures: - * PEAR_Exception(string $message); - * PEAR_Exception(string $message, int $code); - * PEAR_Exception(string $message, Exception $cause); - * PEAR_Exception(string $message, Exception $cause, int $code); - * PEAR_Exception(string $message, array $causes); - * PEAR_Exception(string $message, array $causes, int $code); + * - PEAR_Exception(string $message); + * - PEAR_Exception(string $message, int $code); + * - PEAR_Exception(string $message, Exception $cause); + * - PEAR_Exception(string $message, Exception $cause, int $code); + * - PEAR_Exception(string $message, PEAR_Error $cause); + * - PEAR_Exception(string $message, PEAR_Error $cause, int $code); + * - PEAR_Exception(string $message, array $causes); + * - PEAR_Exception(string $message, array $causes, int $code); + * @param string exception message + * @param int|Exception|PEAR_Error|array|null exception cause + * @param int|null exception code or null */ public function __construct($message, $p2 = null, $p3 = null) { if (is_int($p2)) { $code = $p2; $this->cause = null; - } elseif ($p2 instanceof Exception || is_array($p2)) { + } elseif (is_object($p2) || is_array($p2)) { + // using is_object allows both Exception and PEAR_Error + if (is_object($p2) && !($p2 instanceof Exception)) { + if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) { + throw new PEAR_Exception('exception cause must be Exception, ' . + 'array, or PEAR_Error'); + } + } $code = $p3; if (is_array($p2) && isset($p2['message'])) { // fix potential problem of passing in a single warning @@ -242,11 +254,15 @@ class PEAR_Exception extends Exception if ($this->cause instanceof PEAR_Exception) { $this->cause->getCauseMessage($causes); } elseif ($this->cause instanceof Exception) { - $causes[] = array('class' => get_class($cause), - 'message' => $cause->getMessage(), - 'file' => $cause->getFile(), - 'line' => $cause->getLine()); - + $causes[] = array('class' => get_class($this->cause), + 'message' => $this->cause->getMessage(), + 'file' => $this->cause->getFile(), + 'line' => $this->cause->getLine()); + } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) { + $causes[] = array('class' => get_class($this->cause), + 'message' => $this->cause->getMessage(), + 'file' => 'unknown', + 'line' => 'unknown'); } elseif (is_array($this->cause)) { foreach ($this->cause as $cause) { if ($cause instanceof PEAR_Exception) { @@ -256,6 +272,11 @@ class PEAR_Exception extends Exception 'message' => $cause->getMessage(), 'file' => $cause->getFile(), 'line' => $cause->getLine()); + } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) { + $causes[] = array('class' => get_class($cause), + 'message' => $cause->getMessage(), + 'file' => 'unknown', + 'line' => 'unknown'); } elseif (is_array($cause) && isset($cause['message'])) { // PEAR_ErrorStack warning $causes[] = array( diff --git a/includes/pear/PEAR/FixPHP5PEARWarnings.php b/includes/pear/PEAR/FixPHP5PEARWarnings.php new file mode 100644 index 00000000..be5dc3ce --- /dev/null +++ b/includes/pear/PEAR/FixPHP5PEARWarnings.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/includes/pear/PEAR/Frontend.php b/includes/pear/PEAR/Frontend.php index f4554a80..bf7d4ba6 100644 --- a/includes/pear/PEAR/Frontend.php +++ b/includes/pear/PEAR/Frontend.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Frontend.php,v 1.4 2005/04/13 04:17:45 cellog Exp $ + * @version CVS: $Id: Frontend.php,v 1.13 2008/01/03 20:26:35 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -34,12 +34,13 @@ $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null; /** * Singleton-based frontend for PEAR user input/output + * * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -64,6 +65,15 @@ class PEAR_Frontend extends PEAR } } + /** + * Set the frontend class that will be used by calls to {@link singleton()} + * + * Frontends are expected to conform to the PEAR naming standard of + * _ => DIRECTORY_SEPARATOR (PEAR_Frontend_CLI is in PEAR/Frontend/CLI.php) + * @param string $uiclass full class name + * @return PEAR_Frontend + * @static + */ function &setFrontendClass($uiclass) { if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) && @@ -80,7 +90,7 @@ class PEAR_Frontend extends PEAR $obj = &new $uiclass; // quick test to see if this class implements a few of the most // important frontend methods - if (method_exists($obj, 'userConfirm')) { + if (is_a($obj, 'PEAR_Frontend')) { $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$obj; $GLOBALS['_PEAR_FRONTEND_CLASS'] = $uiclass; return $obj; @@ -93,6 +103,30 @@ class PEAR_Frontend extends PEAR return $err; } + /** + * Set the frontend class that will be used by calls to {@link singleton()} + * + * Frontends are expected to be a descendant of PEAR_Frontend + * @param PEAR_Frontend + * @return PEAR_Frontend + * @static + */ + function &setFrontendObject($uiobject) + { + if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) && + is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], get_class($uiobject))) { + return $GLOBALS['_PEAR_FRONTEND_SINGLETON']; + } + if (!is_a($uiobject, 'PEAR_Frontend')) { + $err = PEAR::raiseError('not a valid frontend class: (' . + get_class($uiobject) . ')'); + return $err; + } + $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$uiobject; + $GLOBALS['_PEAR_FRONTEND_CLASS'] = get_class($uiobject); + return $uiobject; + } + /** * @param string $path relative or absolute include path * @return boolean @@ -103,15 +137,10 @@ class PEAR_Frontend extends PEAR if (file_exists($path) && is_readable($path)) { return true; } - $ipath = explode(PATH_SEPARATOR, ini_get('include_path')); - foreach ($ipath as $include) { - $test = realpath($include . DIRECTORY_SEPARATOR . $path); - if (!$test) { // support wrappers like phar (realpath just don't work with them) - $test = $include . DIRECTORY_SEPARATOR . $path; - } - if (file_exists($test) && is_readable($test)) { - return true; - } + $fp = @fopen($path, 'r', true); + if ($fp) { + fclose($fp); + return true; } return false; } @@ -135,7 +164,59 @@ class PEAR_Frontend extends PEAR $GLOBALS['_PEAR_Common_tempfiles'][] = $file; } - function log($level, $msg, $append_crlf = true) + /** + * Log an action + * + * @param string $msg the message to log + * @param boolean $append_crlf + * @return boolean true + * @abstract + */ + function log($msg, $append_crlf = true) + { + } + + /** + * Run a post-installation script + * + * @param array $scripts array of post-install scripts + * @abstract + */ + function runPostinstallScripts(&$scripts) + { + } + + /** + * Display human-friendly output formatted depending on the + * $command parameter. + * + * This should be able to handle basic output data with no command + * @param mixed $data data structure containing the information to display + * @param string $command command from which this method was called + * @abstract + */ + function outputData($data, $command = '_default') + { + } + + /** + * Display a modal form dialog and return the given input + * + * A frontend that requires multiple requests to retrieve and process + * data must take these needs into account, and implement the request + * handling code. + * @param string $command command from which this method was called + * @param array $prompts associative array. keys are the input field names + * and values are the description + * @param array $types array of input field types (text, password, + * etc.) keys have to be the same like in $prompts + * @param array $defaults array of default values. again keys have + * to be the same like in $prompts. Do not depend + * on a default value being set. + * @return array input sent by the user + * @abstract + */ + function userDialog($command, $prompts, $types = array(), $defaults = array()) { } } diff --git a/includes/pear/PEAR/Frontend/CLI.php b/includes/pear/PEAR/Frontend/CLI.php index 240afe8a..0655aba1 100644 --- a/includes/pear/PEAR/Frontend/CLI.php +++ b/includes/pear/PEAR/Frontend/CLI.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: CLI.php,v 1.56 2005/10/19 04:11:26 cellog Exp $ + * @version CVS: $Id: CLI.php,v 1.68 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -31,9 +31,9 @@ require_once 'PEAR/Frontend.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -143,7 +143,19 @@ class PEAR_Frontend_CLI extends PEAR_Frontend continue; } } - @$this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]"); + if (!isset($frame['class'])) { + $frame['class'] = ''; + } + if (!isset($frame['type'])) { + $frame['type'] = ''; + } + if (!isset($frame['function'])) { + $frame['function'] = ''; + } + if (!isset($frame['line'])) { + $frame['line'] = ''; + } + $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]"); } } } @@ -309,50 +321,43 @@ class PEAR_Frontend_CLI extends PEAR_Frontend $answers[$param['name']] = ''; } } + $tried = false; do { - $ok = array('yesno' => 'no'); - do { - $answers = $this->userDialog('', $prompts, $types, $answers); - } while (count(array_filter($answers)) != count($prompts)); - $this->outputData('Your choices:'); - foreach ($prompts as $name => $prompt) { - $this->outputData($prompt . ': ' . $answers[$name]); + if ($tried) { + $i = 1; + foreach ($answers as $var => $value) { + if (!strlen($value)) { + echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n"); + } + $i++; + } } - $ok = $this->userDialog('', - array( - 'yesno' => 'These Choices OK? (use "abort" to halt)' - ), - array( - 'yesno' => 'string', - ), - array( - 'yesno' => 'yes' - ) - ); - if ($ok['yesno'] == 'abort') { - return false; - } - } while ($ok['yesno'] != 'yes'); + $answers = $this->userDialog('', $prompts, $types, $answers); + $tried = true; + } while (is_array($answers) && count(array_filter($answers)) != count($prompts)); return $answers; } // {{{ userDialog(prompt, [type], [default]) - function userDialog($command, $prompts, $types = array(), $defaults = array()) + function userDialog($command, $prompts, $types = array(), $defaults = array(), + $screensize = 20) { - $result = array(); - if (is_array($prompts)) { - // php 5.0.0 inexplicably breaks BC with this behavior - // now reading from STDIN is the intended syntax - if (version_compare(phpversion(), '5.0.0', '<')) { - $fp = fopen("php://stdin", "r"); - } + if (!is_array($prompts)) { + return array(); + } + $testprompts = array_keys($prompts); + $result = $defaults; + if (!defined('STDIN')) { + $fp = fopen('php://stdin', 'r'); + } else { + $fp = STDIN; + } + reset($prompts); + if (count($prompts) == 1 && $types[key($prompts)] == 'yesno') { foreach ($prompts as $key => $prompt) { $type = $types[$key]; $default = @$defaults[$key]; - if ($type == 'password') { - system('stty -echo'); - } - print "$this->lp$prompt "; + print "$prompt "; if ($default) { print "[$default] "; } @@ -365,19 +370,55 @@ class PEAR_Frontend_CLI extends PEAR_Frontend } $line = fgets(STDIN, 2048); } - if ($type == 'password') { - system('stty echo'); - print "\n"; - } if ($default && trim($line) == "") { $result[$key] = $default; } else { $result[$key] = trim($line); } } - if (version_compare(phpversion(), '5.0.0', '<')) { - fclose($fp); + return $result; + } + while (true) { + $descLength = max(array_map('strlen', $prompts)); + $descFormat = "%-{$descLength}s"; + $last = count($prompts); + + $i = 0; + foreach ($prompts as $n => $var) { + printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], isset($result[$n]) ? + $result[$n] : null); } + + print "\n1-$last, 'all', 'abort', or Enter to continue: "; + $tmp = trim(fgets($fp, 1024)); + if (empty($tmp)) { + break; + } + if ($tmp == 'abort') { + return false; + } + if (isset($testprompts[(int)$tmp - 1])) { + $var = $testprompts[(int)$tmp - 1]; + $desc = $prompts[$var]; + $current = @$result[$var]; + print "$desc [$current] : "; + $tmp = trim(fgets($fp, 1024)); + if (trim($tmp) !== '') { + $result[$var] = trim($tmp); + } + } elseif ($tmp == 'all') { + foreach ($prompts as $var => $desc) { + $current = $result[$var]; + print "$desc [$current] : "; + $tmp = trim(fgets($fp, 1024)); + if (trim($tmp) !== '') { + $result[$var] = trim($tmp); + } + } + } + } + if (!defined('STDIN')) { + fclose($fp); } return $result; } @@ -455,12 +496,17 @@ class PEAR_Frontend_CLI extends PEAR_Frontend } else { $w = strlen($col); } - if ($w > @$this->params['widest'][$i]) { + + if (isset($this->params['widest'][$i])) { + if ($w > $this->params['widest'][$i]) { + $this->params['widest'][$i] = $w; + } + } else { $this->params['widest'][$i] = $w; } $tmp = count_chars($columns[$i], 1); // handle unix, mac and windows formats - $lines = (isset($tmp[10]) ? $tmp[10] : @$tmp[13]) + 1; + $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1; if ($lines > $highest) { $highest = $lines; } @@ -626,6 +672,10 @@ class PEAR_Frontend_CLI extends PEAR_Frontend $this->_endTable(); break; case 'list-all': + if (!isset($data['data'])) { + $this->_displayLine('No packages in channel'); + break; + } $this->_startTable($data); if (isset($data['headline']) && is_array($data['headline'])) { $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); @@ -662,6 +712,7 @@ class PEAR_Frontend_CLI extends PEAR_Frontend $this->_endTable(); break; case 'remote-info': + $d = $data; $data = array( 'caption' => 'Package details:', 'border' => false, @@ -675,6 +726,12 @@ class PEAR_Frontend_CLI extends PEAR_Frontend array("Description", $data['description']), ), ); + if (isset($d['deprecated']) && $d['deprecated']) { + $conf = &PEAR_Config::singleton(); + $reg = $conf->getRegistry(); + $name = $reg->parsedPackageNameToString($d['deprecated'], true); + $data['data'][] = array('Deprecated! use', $name); + } default: { if (is_array($data)) { $this->_startTable($data); diff --git a/includes/pear/PEAR/Installer.php b/includes/pear/PEAR/Installer.php index a92046a4..d3f31621 100644 --- a/includes/pear/PEAR/Installer.php +++ b/includes/pear/PEAR/Installer.php @@ -16,9 +16,9 @@ * @author Tomas V.V. Cox * @author Martin Jansen * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Installer.php,v 1.222 2005/11/12 06:42:33 cellog Exp $ + * @version CVS: $Id: Installer.php,v 1.253 2008/05/13 22:46:07 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -40,9 +40,9 @@ define('PEAR_INSTALLER_NOBINARY', -240); * @author Tomas V.V. Cox * @author Martin Jansen * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -239,6 +239,10 @@ class PEAR_Installer extends PEAR_Downloader $channel = $this->pkginfo->getChannel(); // {{{ assemble the destination paths switch ($atts['role']) { + case 'src': + case 'extsrc': + $this->source_files++; + return; case 'doc': case 'data': case 'test': @@ -253,10 +257,6 @@ class PEAR_Installer extends PEAR_Downloader case 'script': $dest_dir = $this->config->get('bin_dir', null, $channel); break; - case 'src': - case 'extsrc': - $this->source_files++; - return; default: return $this->raiseError("Invalid role `$atts[role]' for file $file"); } @@ -282,154 +282,181 @@ class PEAR_Installer extends PEAR_Downloader DIRECTORY_SEPARATOR), array($dest_file, $orig_file)); $final_dest_file = $installed_as = $dest_file; + if (isset($this->_options['packagingroot'])) { + $installedas_dest_dir = dirname($final_dest_file); + $installedas_dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); + $final_dest_file = $this->_prependPath($final_dest_file, + $this->_options['packagingroot']); + } else { + $installedas_dest_dir = dirname($final_dest_file); + $installedas_dest_file = $installedas_dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); + } $dest_dir = dirname($final_dest_file); $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); + if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) { + return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED); + } // }}} - if (!@is_dir($dest_dir)) { + if (empty($this->_options['register-only']) && + (!file_exists($dest_dir) || !is_dir($dest_dir))) { if (!$this->mkDirHier($dest_dir)) { return $this->raiseError("failed to mkdir $dest_dir", PEAR_INSTALLER_FAILED); } $this->log(3, "+ mkdir $dest_dir"); } - if (empty($atts['replacements'])) { - if (!file_exists($orig_file)) { - return $this->raiseError("file $orig_file does not exist", - PEAR_INSTALLER_FAILED); - } - if (!@copy($orig_file, $dest_file)) { - return $this->raiseError("failed to write $dest_file", - PEAR_INSTALLER_FAILED); - } - $this->log(3, "+ cp $orig_file $dest_file"); - if (isset($atts['md5sum'])) { - $md5sum = md5_file($dest_file); - } - } else { - // {{{ file with replacements - if (!file_exists($orig_file)) { - return $this->raiseError("file does not exist", - PEAR_INSTALLER_FAILED); - } - if (function_exists('file_get_contents')) { - $contents = file_get_contents($orig_file); + // pretty much nothing happens if we are only registering the install + if (empty($this->_options['register-only'])) { + if (empty($atts['replacements'])) { + if (!file_exists($orig_file)) { + return $this->raiseError("file $orig_file does not exist", + PEAR_INSTALLER_FAILED); + } + if (!@copy($orig_file, $dest_file)) { + return $this->raiseError("failed to write $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + $this->log(3, "+ cp $orig_file $dest_file"); + if (isset($atts['md5sum'])) { + $md5sum = md5_file($dest_file); + } } else { - $fp = fopen($orig_file, "r"); - $contents = @fread($fp, filesize($orig_file)); - fclose($fp); - } - if ($contents === false) { - $contents = ''; - } - if (isset($atts['md5sum'])) { - $md5sum = md5($contents); - } - $subst_from = $subst_to = array(); - foreach ($atts['replacements'] as $a) { - $to = ''; - if ($a['type'] == 'php-const') { - if (preg_match('/^[a-z0-9_]+$/i', $a['to'])) { - eval("\$to = $a[to];"); - } else { - if (!isset($options['soft'])) { - $this->log(0, "invalid php-const replacement: $a[to]"); + // {{{ file with replacements + if (!file_exists($orig_file)) { + return $this->raiseError("file does not exist", + PEAR_INSTALLER_FAILED); + } + $contents = file_get_contents($orig_file); + if ($contents === false) { + $contents = ''; + } + if (isset($atts['md5sum'])) { + $md5sum = md5($contents); + } + $subst_from = $subst_to = array(); + foreach ($atts['replacements'] as $a) { + $to = ''; + if ($a['type'] == 'php-const') { + if (preg_match('/^[a-z0-9_]+\\z/i', $a['to'])) { + eval("\$to = $a[to];"); + } else { + if (!isset($options['soft'])) { + $this->log(0, "invalid php-const replacement: $a[to]"); + } + continue; } - continue; - } - } elseif ($a['type'] == 'pear-config') { - if ($a['to'] == 'master_server') { - $chan = $this->_registry->getChannel($channel); - if ($chan) { - $to = $chan->getServer(); + } elseif ($a['type'] == 'pear-config') { + if ($a['to'] == 'master_server') { + $chan = $this->_registry->getChannel($channel); + if (!PEAR::isError($chan)) { + $to = $chan->getServer(); + } else { + $to = $this->config->get($a['to'], null, $channel); + } } else { $to = $this->config->get($a['to'], null, $channel); } - } else { - $to = $this->config->get($a['to'], null, $channel); - } - if (is_null($to)) { - if (!isset($options['soft'])) { - $this->log(0, "invalid pear-config replacement: $a[to]"); + if (is_null($to)) { + if (!isset($options['soft'])) { + $this->log(0, "invalid pear-config replacement: $a[to]"); + } + continue; } - continue; - } - } elseif ($a['type'] == 'package-info') { - if ($t = $this->pkginfo->packageInfo($a['to'])) { - $to = $t; - } else { - if (!isset($options['soft'])) { - $this->log(0, "invalid package-info replacement: $a[to]"); + } elseif ($a['type'] == 'package-info') { + if ($t = $this->pkginfo->packageInfo($a['to'])) { + $to = $t; + } else { + if (!isset($options['soft'])) { + $this->log(0, "invalid package-info replacement: $a[to]"); + } + continue; } - continue; + } + if (!is_null($to)) { + $subst_from[] = $a['from']; + $subst_to[] = $to; } } - if (!is_null($to)) { - $subst_from[] = $a['from']; - $subst_to[] = $to; + $this->log(3, "doing ".sizeof($subst_from)." substitution(s) for $final_dest_file"); + if (sizeof($subst_from)) { + $contents = str_replace($subst_from, $subst_to, $contents); } - } - $this->log(3, "doing ".sizeof($subst_from)." substitution(s) for $final_dest_file"); - if (sizeof($subst_from)) { - $contents = str_replace($subst_from, $subst_to, $contents); - } - $wp = @fopen($dest_file, "wb"); - if (!is_resource($wp)) { - return $this->raiseError("failed to create $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - if (fwrite($wp, $contents) === false) { - return $this->raiseError("failed writing to $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - fclose($wp); - // }}} - } - // {{{ check the md5 - if (isset($md5sum)) { - if (strtolower($md5sum) == strtolower($atts['md5sum'])) { - $this->log(2, "md5sum ok: $final_dest_file"); - } else { - if (empty($options['force'])) { - // delete the file - @unlink($dest_file); - if (!isset($options['ignore-errors'])) { - return $this->raiseError("bad md5sum for file $final_dest_file", + $wp = @fopen($dest_file, "wb"); + if (!is_resource($wp)) { + return $this->raiseError("failed to create $dest_file: $php_errormsg", PEAR_INSTALLER_FAILED); + } + if (@fwrite($wp, $contents) === false) { + return $this->raiseError("failed writing to $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + fclose($wp); + // }}} + } + // {{{ check the md5 + if (isset($md5sum)) { + if (strtolower($md5sum) === strtolower($atts['md5sum'])) { + $this->log(2, "md5sum ok: $final_dest_file"); + } else { + if (empty($options['force'])) { + // delete the file + if (file_exists($dest_file)) { + unlink($dest_file); + } + if (!isset($options['ignore-errors'])) { + return $this->raiseError("bad md5sum for file $final_dest_file", + PEAR_INSTALLER_FAILED); + } else { + if (!isset($options['soft'])) { + $this->log(0, "warning : bad md5sum for file $final_dest_file"); + } + } } else { if (!isset($options['soft'])) { $this->log(0, "warning : bad md5sum for file $final_dest_file"); } } + } + } + // }}} + // {{{ set file permissions + if (!OS_WINDOWS) { + if ($atts['role'] == 'script') { + $mode = 0777 & ~(int)octdec($this->config->get('umask')); + $this->log(3, "+ chmod +x $dest_file"); } else { - if (!isset($options['soft'])) { - $this->log(0, "warning : bad md5sum for file $final_dest_file"); + $mode = 0666 & ~(int)octdec($this->config->get('umask')); + } + if ($atts['role'] != 'src') { + $this->addFileOperation("chmod", array($mode, $dest_file)); + if (!@chmod($dest_file, $mode)) { + if (!isset($options['soft'])) { + $this->log(0, "failed to change mode of $dest_file: $php_errormsg"); + } } } } - } - // }}} - // {{{ set file permissions - if (!OS_WINDOWS) { - if ($atts['role'] == 'script') { - $mode = 0777 & ~(int)octdec($this->config->get('umask')); - $this->log(3, "+ chmod +x $dest_file"); + // }}} + if ($atts['role'] == 'src') { + rename($dest_file, $final_dest_file); + $this->log(2, "renamed source file $dest_file to $final_dest_file"); } else { - $mode = 0666 & ~(int)octdec($this->config->get('umask')); - } - $this->addFileOperation("chmod", array($mode, $dest_file)); - if (!@chmod($dest_file, $mode)) { - if (!isset($options['soft'])) { - $this->log(0, "failed to change mode of $dest_file"); - } + $this->addFileOperation("rename", array($dest_file, $final_dest_file, + $atts['role'] == 'ext')); } } - // }}} - $this->addFileOperation("rename", array($dest_file, $final_dest_file, - $atts['role'] == 'ext')); // Store the full path where the file was installed for easy unistall - $this->addFileOperation("installed_as", array($file, $installed_as, - $save_destdir, dirname(substr($dest_file, strlen($save_destdir))))); + if ($atts['role'] != 'script') { + $loc = $this->config->get($atts['role'] . '_dir'); + } else { + $loc = $this->config->get('bin_dir'); + } + if ($atts['role'] != 'src') { + $this->addFileOperation("installed_as", array($file, $installed_as, + $loc, + dirname(substr($installedas_dest_file, strlen($loc))))); + } //$this->log(2, "installed: $dest_file"); return PEAR_INSTALLER_OK; @@ -446,8 +473,9 @@ class PEAR_Installer extends PEAR_Downloader * @param array options from command-line * @access private */ - function _installFile2(&$pkg, $file, $atts, $tmp_path, $options) + function _installFile2(&$pkg, $file, &$real_atts, $tmp_path, $options) { + $atts = $real_atts; if (!isset($this->_registry)) { $this->_registry = &$this->config->getRegistry(); } @@ -473,122 +501,144 @@ class PEAR_Installer extends PEAR_Downloader } else { list($save_destdir, $dest_dir, $dest_file, $orig_file) = $info; } + if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) { + return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED); + } $final_dest_file = $installed_as = $dest_file; + if (isset($this->_options['packagingroot'])) { + $final_dest_file = $this->_prependPath($final_dest_file, + $this->_options['packagingroot']); + } $dest_dir = dirname($final_dest_file); $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); // }}} - if (!@is_dir($dest_dir)) { - if (!$this->mkDirHier($dest_dir)) { - return $this->raiseError("failed to mkdir $dest_dir", - PEAR_INSTALLER_FAILED); + if (empty($this->_options['register-only'])) { + if (!file_exists($dest_dir) || !is_dir($dest_dir)) { + if (!$this->mkDirHier($dest_dir)) { + return $this->raiseError("failed to mkdir $dest_dir", + PEAR_INSTALLER_FAILED); + } + $this->log(3, "+ mkdir $dest_dir"); } - $this->log(3, "+ mkdir $dest_dir"); } $attribs = $atts['attribs']; unset($atts['attribs']); - if (!count($atts)) { // no tasks - if (!file_exists($orig_file)) { - return $this->raiseError("file $orig_file does not exist", - PEAR_INSTALLER_FAILED); - } - if (!@copy($orig_file, $dest_file)) { - return $this->raiseError("failed to write $dest_file", - PEAR_INSTALLER_FAILED); - } - $this->log(3, "+ cp $orig_file $dest_file"); - if (isset($attribs['md5sum'])) { - $md5sum = md5_file($dest_file); - } - } else { // file with tasks - if (!file_exists($orig_file)) { - return $this->raiseError("file $orig_file does not exist", - PEAR_INSTALLER_FAILED); - } - if (function_exists('file_get_contents')) { + // pretty much nothing happens if we are only registering the install + if (empty($this->_options['register-only'])) { + if (!count($atts)) { // no tasks + if (!file_exists($orig_file)) { + return $this->raiseError("file $orig_file does not exist", + PEAR_INSTALLER_FAILED); + } + if (!@copy($orig_file, $dest_file)) { + return $this->raiseError("failed to write $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + $this->log(3, "+ cp $orig_file $dest_file"); + if (isset($attribs['md5sum'])) { + $md5sum = md5_file($dest_file); + } + } else { // file with tasks + if (!file_exists($orig_file)) { + return $this->raiseError("file $orig_file does not exist", + PEAR_INSTALLER_FAILED); + } $contents = file_get_contents($orig_file); - } else { - $fp = fopen($orig_file, "r"); - $contents = @fread($fp, filesize($orig_file)); // filesize can be 0 - fclose($fp); - } - if ($contents === false) { - $contents = ''; - } - if (isset($attribs['md5sum'])) { - $md5sum = md5($contents); - } - foreach ($atts as $tag => $raw) { - $tag = str_replace($pkg->getTasksNs() . ':', '', $tag); - $task = "PEAR_Task_$tag"; - $task = &new $task($this->config, $this, PEAR_TASK_INSTALL); - if (!$task->isScript()) { // scripts are only handled after installation - $task->init($raw, $attribs, $pkg->getLastInstalledVersion()); - $res = $task->startSession($pkg, $contents, $final_dest_file); - if ($res === false) { - continue; // skip this file + if ($contents === false) { + $contents = ''; + } + if (isset($attribs['md5sum'])) { + $md5sum = md5($contents); + } + foreach ($atts as $tag => $raw) { + $tag = str_replace(array($pkg->getTasksNs() . ':', '-'), + array('', '_'), $tag); + $task = "PEAR_Task_$tag"; + $task = &new $task($this->config, $this, PEAR_TASK_INSTALL); + if (!$task->isScript()) { // scripts are only handled after installation + $task->init($raw, $attribs, $pkg->getLastInstalledVersion()); + $res = $task->startSession($pkg, $contents, $final_dest_file); + if ($res === false) { + continue; // skip this file + } + if (PEAR::isError($res)) { + return $res; + } + $contents = $res; // save changes } - if (PEAR::isError($res)) { - return $res; - } - $contents = $res; // save changes - } - $wp = @fopen($dest_file, "wb"); - if (!is_resource($wp)) { - return $this->raiseError("failed to create $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - if (fwrite($wp, $contents) === false) { - return $this->raiseError("failed writing to $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - fclose($wp); - } - } - // {{{ check the md5 - if (isset($md5sum)) { - if (strtolower($md5sum) == strtolower($attribs['md5sum'])) { - $this->log(2, "md5sum ok: $final_dest_file"); - } else { - if (empty($options['force'])) { - // delete the file - @unlink($dest_file); - if (!isset($options['ignore-errors'])) { - return $this->raiseError("bad md5sum for file $final_dest_file", + $wp = @fopen($dest_file, "wb"); + if (!is_resource($wp)) { + return $this->raiseError("failed to create $dest_file: $php_errormsg", PEAR_INSTALLER_FAILED); + } + if (fwrite($wp, $contents) === false) { + return $this->raiseError("failed writing to $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + fclose($wp); + } + } + // {{{ check the md5 + if (isset($md5sum)) { + if (strtolower($md5sum) === strtolower($attribs['md5sum'])) { + $this->log(2, "md5sum ok: $final_dest_file"); + } else { + if (empty($options['force'])) { + // delete the file + if (file_exists($dest_file)) { + unlink($dest_file); + } + if (!isset($options['ignore-errors'])) { + return $this->raiseError("bad md5sum for file $final_dest_file", + PEAR_INSTALLER_FAILED); + } else { + if (!isset($options['soft'])) { + $this->log(0, "warning : bad md5sum for file $final_dest_file"); + } + } } else { if (!isset($options['soft'])) { $this->log(0, "warning : bad md5sum for file $final_dest_file"); } } + } + } else { + $real_atts['attribs']['md5sum'] = md5_file($dest_file); + } + // }}} + // {{{ set file permissions + if (!OS_WINDOWS) { + if ($role->isExecutable()) { + $mode = 0777 & ~(int)octdec($this->config->get('umask')); + $this->log(3, "+ chmod +x $dest_file"); } else { - if (!isset($options['soft'])) { - $this->log(0, "warning : bad md5sum for file $final_dest_file"); + $mode = 0666 & ~(int)octdec($this->config->get('umask')); + } + if ($attribs['role'] != 'src') { + $this->addFileOperation("chmod", array($mode, $dest_file)); + if (!@chmod($dest_file, $mode)) { + if (!isset($options['soft'])) { + $this->log(0, "failed to change mode of $dest_file: $php_errormsg"); + } } } } - } - // }}} - // {{{ set file permissions - if (!OS_WINDOWS) { - if ($role->isExecutable()) { - $mode = 0777 & ~(int)octdec($this->config->get('umask')); - $this->log(3, "+ chmod +x $dest_file"); + // }}} + if ($attribs['role'] == 'src') { + rename($dest_file, $final_dest_file); + $this->log(2, "renamed source file $dest_file to $final_dest_file"); } else { - $mode = 0666 & ~(int)octdec($this->config->get('umask')); - } - $this->addFileOperation("chmod", array($mode, $dest_file)); - if (!@chmod($dest_file, $mode)) { - if (!isset($options['soft'])) { - $this->log(0, "failed to change mode of $dest_file"); - } + $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension())); } } - // }}} - $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension())); // Store the full path where the file was installed for easy uninstall - $this->addFileOperation("installed_as", array($file, $installed_as, - $save_destdir, dirname(substr($dest_file, strlen($save_destdir))))); + if ($attribs['role'] != 'src') { + $loc = $this->config->get($role->getLocationConfig(), null, $channel); + $this->addFileOperation("installed_as", array($file, $installed_as, + $loc, + dirname(substr($installed_as, strlen($loc))))); + } //$this->log(2, "installed: $dest_file"); return PEAR_INSTALLER_OK; @@ -685,7 +735,8 @@ class PEAR_Installer extends PEAR_Downloader } else { // make sure the file to be deleted can be opened for writing $fp = false; - if (!is_dir($data[0]) && !($fp = @fopen($data[0], 'a'))) { + if (!is_dir($data[0]) && + (!is_writable($data[0]) || !($fp = @fopen($data[0], 'a')))) { $errors[] = "permission denied ($type): $data[0]"; } elseif ($fp) { fclose($fp); @@ -710,19 +761,37 @@ class PEAR_Installer extends PEAR_Downloader } $this->_dirtree = array(); // {{{ really commit the transaction - foreach ($this->file_operations as $tr) { + foreach ($this->file_operations as $i => $tr) { + if (!$tr) { + // support removal of non-existing backups + continue; + } list($type, $data) = $tr; switch ($type) { case 'backup': - @copy($data[0], $data[0] . '.bak'); + if (!file_exists($data[0])) { + $this->file_operations[$i] = false; + break; + } + if (!@copy($data[0], $data[0] . '.bak')) { + $this->log(1, 'Could not copy ' . $data[0] . ' to ' . $data[0] . + '.bak ' . $php_errormsg); + return false; + } $this->log(3, "+ backup $data[0] to $data[0].bak"); break; case 'removebackup': - @unlink($data[0] . '.bak'); - $this->log(3, "+ rm backup of $data[0] ($data[0].bak)"); + if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) { + unlink($data[0] . '.bak'); + $this->log(3, "+ rm backup of $data[0] ($data[0].bak)"); + } break; case 'rename': - $test = @unlink($data[1]); + if (file_exists($data[1])) { + $test = @unlink($data[1]); + } else { + $test = null; + } if (!$test && file_exists($data[1])) { if ($data[2]) { $extra = ', this extension must be installed manually. Rename to "' . @@ -738,21 +807,58 @@ class PEAR_Installer extends PEAR_Downloader return false; } } - @rename($data[0], $data[1]); + // permissions issues with rename - copy() is far superior + $perms = @fileperms($data[0]); + if (!@copy($data[0], $data[1])) { + $this->log(1, 'Could not rename ' . $data[0] . ' to ' . $data[1] . + ' ' . $php_errormsg); + return false; + } + // copy over permissions, otherwise they are lost + @chmod($data[1], $perms); + @unlink($data[0]); $this->log(3, "+ mv $data[0] $data[1]"); break; case 'chmod': - @chmod($data[1], $data[0]); + if (!@chmod($data[1], $data[0])) { + $this->log(1, 'Could not chmod ' . $data[1] . ' to ' . + decoct($data[0]) . ' ' . $php_errormsg); + return false; + } $octmode = decoct($data[0]); $this->log(3, "+ chmod $octmode $data[1]"); break; case 'delete': - @unlink($data[0]); - $this->log(3, "+ rm $data[0]"); + if (file_exists($data[0])) { + if (!@unlink($data[0])) { + $this->log(1, 'Could not delete ' . $data[0] . ' ' . + $php_errormsg); + return false; + } + $this->log(3, "+ rm $data[0]"); + } break; case 'rmdir': - @rmdir($data[0]); - $this->log(3, "+ rmdir $data[0]"); + if (file_exists($data[0])) { + do { + $testme = opendir($data[0]); + while (false !== ($entry = readdir($testme))) { + if ($entry == '.' || $entry == '..') { + continue; + } + closedir($testme); + break 2; // this directory is not empty and can't be + // deleted + } + closedir($testme); + if (!@rmdir($data[0])) { + $this->log(1, 'Could not rmdir ' . $data[0] . ' ' . + $php_errormsg); + return false; + } + $this->log(3, "+ rmdir $data[0]"); + } while (false); + } break; case 'installed_as': $this->pkginfo->setInstalledAs($data[0], $data[1]); @@ -760,8 +866,8 @@ class PEAR_Installer extends PEAR_Downloader $this->_dirtree[dirname($data[1])] = true; $this->pkginfo->setDirtree(dirname($data[1])); - while(!empty($data[3]) && $data[3] != '/' && $data[3] != '\\' - && $data[3] != '.') { + while(!empty($data[3]) && dirname($data[3]) != $data[3] && + $data[3] != '/' && $data[3] != '\\') { $this->pkginfo->setDirtree($pp = $this->_prependPath($data[3], $data[2])); $this->_dirtree[$pp] = true; @@ -789,11 +895,19 @@ class PEAR_Installer extends PEAR_Downloader switch ($type) { case 'backup': if (file_exists($data[0] . '.bak')) { - @unlink($data[0]); + if (file_exists($data[0] && is_writable($data[0]))) { + unlink($data[0]); + } @copy($data[0] . '.bak', $data[0]); $this->log(3, "+ restore $data[0] from $data[0].bak"); } break; + case 'removebackup': + if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) { + unlink($data[0] . '.bak'); + $this->log(3, "+ rm backup of $data[0] ($data[0].bak)"); + } + break; case 'rename': @unlink($data[0]); $this->log(3, "+ rm $data[0]"); @@ -973,33 +1087,58 @@ class PEAR_Installer extends PEAR_Downloader if (realpath($descfile) != realpath($pkgfile)) { $tar = new Archive_Tar($pkgfile); - if (!@$tar->extract($tmpdir)) { + if (!$tar->extract($tmpdir)) { return $this->raiseError("unable to unpack $pkgfile"); } } $pkgname = $pkg->getName(); $channel = $pkg->getChannel(); + if (isset($this->_options['packagingroot'])) { + $regdir = $this->_prependPath( + $this->config->get('php_dir', null, 'pear.php.net'), + $this->_options['packagingroot']); + $packrootphp_dir = $this->_prependPath( + $this->config->get('php_dir', null, $channel), + $this->_options['packagingroot']); + } if (isset($options['installroot'])) { $this->config->setInstallRoot($options['installroot']); $this->_registry = &$this->config->getRegistry(); + $installregistry = &$this->_registry; $this->installroot = ''; // all done automagically now + $php_dir = $this->config->get('php_dir', null, $channel); } else { $this->config->setInstallRoot(false); $this->_registry = &$this->config->getRegistry(); + if (isset($this->_options['packagingroot'])) { + $installregistry = &new PEAR_Registry($regdir); + if (!$installregistry->channelExists($channel, true)) { + // we need to fake a channel-discover of this channel + $chanobj = $this->_registry->getChannel($channel, true); + $installregistry->addChannel($chanobj); + } + $php_dir = $packrootphp_dir; + } else { + $installregistry = &$this->_registry; + $php_dir = $this->config->get('php_dir', null, $channel); + } $this->installroot = ''; } - $php_dir = $this->config->get('php_dir', null, $channel); // {{{ checks to do when not in "force" mode - if (empty($options['force']) && @is_dir($this->config->get('php_dir'))) { + if (empty($options['force']) && + (file_exists($this->config->get('php_dir')) && + is_dir($this->config->get('php_dir')))) { $testp = $channel == 'pear.php.net' ? $pkgname : array($channel, $pkgname); $instfilelist = $pkg->getInstallationFileList(true); if (PEAR::isError($instfilelist)) { return $instfilelist; } - $test = $this->_registry->checkFileMap($instfilelist, $testp, '1.1'); + // ensure we have the most accurate registry + $installregistry->flushFileMap(); + $test = $installregistry->checkFileMap($instfilelist, $testp, '1.1'); if (PEAR::isError($test)) { return $test; } @@ -1014,7 +1153,7 @@ class PEAR_Installer extends PEAR_Downloader } if ($found) { // subpackages can conflict with earlier versions of parent packages - $parentreg = $this->_registry->packageInfo($param->getPackage(), null, $param->getChannel()); + $parentreg = $installregistry->packageInfo($param->getPackage(), null, $param->getChannel()); $tmp = $test; foreach ($tmp as $file => $info) { if (is_array($info)) { @@ -1035,7 +1174,7 @@ class PEAR_Installer extends PEAR_Downloader } $pfk = &new PEAR_PackageFile($this->config); $parentpkg = &$pfk->fromArray($parentreg); - $this->_registry->updatePackage2($parentpkg); + $installregistry->updatePackage2($parentpkg); } if ($param->getChannel() == 'pecl.php.net' && isset($options['upgrade'])) { $tmp = $test; @@ -1077,12 +1216,12 @@ class PEAR_Installer extends PEAR_Downloader if (empty($options['upgrade']) && empty($options['soft'])) { // checks to do only when installing new packages if ($channel == 'pecl.php.net') { - $test = $this->_registry->packageExists($pkgname, $channel); + $test = $installregistry->packageExists($pkgname, $channel); if (!$test) { - $test = $this->_registry->packageExists($pkgname, 'pear.php.net'); + $test = $installregistry->packageExists($pkgname, 'pear.php.net'); } } else { - $test = $this->_registry->packageExists($pkgname, $channel); + $test = $installregistry->packageExists($pkgname, $channel); } if (empty($options['force']) && $test) { return $this->raiseError("$channel/$pkgname is already installed"); @@ -1090,16 +1229,16 @@ class PEAR_Installer extends PEAR_Downloader } else { $usechannel = $channel; if ($channel == 'pecl.php.net') { - $test = $this->_registry->packageExists($pkgname, $channel); + $test = $installregistry->packageExists($pkgname, $channel); if (!$test) { - $test = $this->_registry->packageExists($pkgname, 'pear.php.net'); + $test = $installregistry->packageExists($pkgname, 'pear.php.net'); $usechannel = 'pear.php.net'; } } else { - $test = $this->_registry->packageExists($pkgname, $channel); + $test = $installregistry->packageExists($pkgname, $channel); } if ($test) { - $v1 = $this->_registry->packageInfo($pkgname, 'version', $usechannel); + $v1 = $installregistry->packageInfo($pkgname, 'version', $usechannel); $v2 = $pkg->getVersion(); $cmp = version_compare("$v1", "$v2", 'gt'); if (empty($options['force']) && !version_compare("$v2", "$v1", 'gt')) { @@ -1131,74 +1270,77 @@ class PEAR_Installer extends PEAR_Downloader $this->source_files = 0; $savechannel = $this->config->get('default_channel'); - if (empty($options['register-only'])) { - if (!is_dir($php_dir)) { - if (PEAR::isError(System::mkdir(array('-p'), $php_dir))) { - return $this->raiseError("no installation destination directory '$php_dir'\n"); - } + if (empty($options['register-only']) && !is_dir($php_dir)) { + if (PEAR::isError(System::mkdir(array('-p'), $php_dir))) { + return $this->raiseError("no installation destination directory '$php_dir'\n"); } + } - $tmp_path = dirname($descfile); - if (substr($pkgfile, -4) != '.xml') { - $tmp_path .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion(); - } + $tmp_path = dirname($descfile); + if (substr($pkgfile, -4) != '.xml') { + $tmp_path .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion(); + } - $this->configSet('default_channel', $channel); - // {{{ install files - - if ($pkg->getPackagexmlVersion() == '2.0') { - $filelist = $pkg->getInstallationFilelist(); - if (PEAR::isError($filelist)) { - return $filelist; - } + $this->configSet('default_channel', $channel); + // {{{ install files + + $ver = $pkg->getPackagexmlVersion(); + if (version_compare($ver, '2.0', '>=')) { + $filelist = $pkg->getInstallationFilelist(); + } else { + $filelist = $pkg->getFileList(); + } + if (PEAR::isError($filelist)) { + return $filelist; + } + $p = &$installregistry->getPackage($pkgname, $channel); + if (empty($options['register-only']) && $p) { + $dirtree = $p->getDirTree(); + } else { + $dirtree = false; + } + $pkg->resetFilelist(); + $pkg->setLastInstalledVersion($installregistry->packageInfo($pkg->getPackage(), + 'version', $pkg->getChannel())); + foreach ($filelist as $file => $atts) { + if ($pkg->getPackagexmlVersion() == '1.0') { + $this->expectError(PEAR_INSTALLER_FAILED); + $res = $this->_installFile($file, $atts, $tmp_path, $options); + $this->popExpect(); } else { - $filelist = $pkg->getFileList(); + $this->expectError(PEAR_INSTALLER_FAILED); + $res = $this->_installFile2($pkg, $file, $atts, $tmp_path, $options); + $this->popExpect(); } - if (PEAR::isError($filelist)) { - return $filelist; - } - $pkg->resetFilelist(); - $pkg->setLastInstalledVersion($this->_registry->packageInfo($pkg->getPackage(), - 'version', $pkg->getChannel())); - foreach ($filelist as $file => $atts) { - if ($pkg->getPackagexmlVersion() == '1.0') { - $this->expectError(PEAR_INSTALLER_FAILED); - $res = $this->_installFile($file, $atts, $tmp_path, $options); - $this->popExpect(); + if (PEAR::isError($res)) { + if (empty($options['ignore-errors'])) { + $this->rollbackFileTransaction(); + if ($res->getMessage() == "file does not exist") { + $this->raiseError("file $file in package.xml does not exist"); + } + return $this->raiseError($res); } else { - $this->expectError(PEAR_INSTALLER_FAILED); - $res = $this->_installFile2($pkg, $file, $atts, $tmp_path, $options); - $this->popExpect(); - } - if (PEAR::isError($res)) { - if (empty($options['ignore-errors'])) { - $this->rollbackFileTransaction(); - if ($res->getMessage() == "file does not exist") { - $this->raiseError("file $file in package.xml does not exist"); - } - return $this->raiseError($res); - } else { - if (!isset($options['soft'])) { - $this->log(0, "Warning: " . $res->getMessage()); - } + if (!isset($options['soft'])) { + $this->log(0, "Warning: " . $res->getMessage()); } } - if ($res == PEAR_INSTALLER_OK) { - // Register files that were installed - $pkg->installedFile($file, $atts); - } } - // }}} - - // {{{ compile and install source files - if ($this->source_files > 0 && empty($options['nobuild'])) { - if (PEAR::isError($err = - $this->_compileSourceFiles($savechannel, $pkg))) { - return $err; - } + $real = isset($atts['attribs']) ? $atts['attribs'] : $atts; + if ($res == PEAR_INSTALLER_OK && $real['role'] != 'src') { + // Register files that were installed + $pkg->installedFile($file, $atts); } - // }}} } + // }}} + + // {{{ compile and install source files + if ($this->source_files > 0 && empty($options['nobuild'])) { + if (PEAR::isError($err = + $this->_compileSourceFiles($savechannel, $pkg))) { + return $err; + } + } + // }}} if (isset($backedup)) { $this->_removeBackups($backedup); @@ -1218,39 +1360,48 @@ class PEAR_Installer extends PEAR_Downloader // if 'force' is used, replace the info in registry $usechannel = $channel; if ($channel == 'pecl.php.net') { - $test = $this->_registry->packageExists($pkgname, $channel); + $test = $installregistry->packageExists($pkgname, $channel); if (!$test) { - $test = $this->_registry->packageExists($pkgname, 'pear.php.net'); + $test = $installregistry->packageExists($pkgname, 'pear.php.net'); $usechannel = 'pear.php.net'; } } else { - $test = $this->_registry->packageExists($pkgname, $channel); + $test = $installregistry->packageExists($pkgname, $channel); } if (!empty($options['force']) && $test) { - $oldversion = $this->_registry->packageInfo($pkgname, 'version', $usechannel); - $this->_registry->deletePackage($pkgname, $usechannel); + $oldversion = $installregistry->packageInfo($pkgname, 'version', $usechannel); + $installregistry->deletePackage($pkgname, $usechannel); } - $ret = $this->_registry->addPackage2($pkg); + $ret = $installregistry->addPackage2($pkg); } else { + if ($dirtree) { + $this->startFileTransaction(); + // attempt to delete empty directories + uksort($dirtree, array($this, '_sortDirs')); + foreach($dirtree as $dir => $notused) { + $this->addFileOperation('rmdir', array($dir)); + } + $this->commitFileTransaction(); + } $usechannel = $channel; if ($channel == 'pecl.php.net') { - $test = $this->_registry->packageExists($pkgname, $channel); + $test = $installregistry->packageExists($pkgname, $channel); if (!$test) { - $test = $this->_registry->packageExists($pkgname, 'pear.php.net'); + $test = $installregistry->packageExists($pkgname, 'pear.php.net'); $usechannel = 'pear.php.net'; } } else { - $test = $this->_registry->packageExists($pkgname, $channel); + $test = $installregistry->packageExists($pkgname, $channel); } // new: upgrade installs a package if it isn't installed if (!$test) { - $ret = $this->_registry->addPackage2($pkg); + $ret = $installregistry->addPackage2($pkg); } else { if ($usechannel != $channel) { - $this->_registry->deletePackage($pkgname, $usechannel); - $ret = $this->_registry->addPackage2($pkg); + $installregistry->deletePackage($pkgname, $usechannel); + $ret = $installregistry->addPackage2($pkg); } else { - $ret = $this->_registry->updatePackage2($pkg); + $ret = $installregistry->updatePackage2($pkg); } $installphase = 'upgrade'; } @@ -1303,28 +1454,39 @@ class PEAR_Installer extends PEAR_Downloader $role = 'src'; } $dest = $ext['dest']; - $this->log(1, "Installing '$ext[file]'"); - $copyto = $this->_prependPath($dest, $this->installroot); + $packagingroot = ''; + if (isset($this->_options['packagingroot'])) { + $packagingroot = $this->_options['packagingroot']; + } + $copyto = $this->_prependPath($dest, $packagingroot); + if ($copyto != $dest) { + $this->log(1, "Installing '$dest' as '$copyto'"); + } else { + $this->log(1, "Installing '$dest'"); + } $copydir = dirname($copyto); - if (!@is_dir($copydir)) { - if (!$this->mkDirHier($copydir)) { - return $this->raiseError("failed to mkdir $copydir", - PEAR_INSTALLER_FAILED); + // pretty much nothing happens if we are only registering the install + if (empty($this->_options['register-only'])) { + if (!file_exists($copydir) || !is_dir($copydir)) { + if (!$this->mkDirHier($copydir)) { + return $this->raiseError("failed to mkdir $copydir", + PEAR_INSTALLER_FAILED); + } + $this->log(3, "+ mkdir $copydir"); } - $this->log(3, "+ mkdir $copydir"); - } - if (!@copy($ext['file'], $copyto)) { - return $this->raiseError("failed to write $copyto", PEAR_INSTALLER_FAILED); - } - $this->log(3, "+ cp $ext[file] $copyto"); - if (!OS_WINDOWS) { - $mode = 0666 & ~(int)octdec($this->config->get('umask')); - $this->addFileOperation('chmod', array($mode, $copyto)); - if (!@chmod($copyto, $mode)) { - $this->log(0, "failed to change mode of $copyto"); + if (!@copy($ext['file'], $copyto)) { + return $this->raiseError("failed to write $copyto ($php_errormsg)", PEAR_INSTALLER_FAILED); + } + $this->log(3, "+ cp $ext[file] $copyto"); + $this->addFileOperation('rename', array($ext['file'], $copyto)); + if (!OS_WINDOWS) { + $mode = 0666 & ~(int)octdec($this->config->get('umask')); + $this->addFileOperation('chmod', array($mode, $copyto)); + if (!@chmod($copyto, $mode)) { + $this->log(0, "failed to change mode of $copyto ($php_errormsg)"); + } } } - $this->addFileOperation('rename', array($ext['file'], $copyto)); if ($filelist->getPackageXmlVersion() == '1.0') { $filelist->installedFile($bn, array( @@ -1364,6 +1526,7 @@ class PEAR_Installer extends PEAR_Downloader * @param array Command-line options. Possibilities include: * * - installroot: base installation dir, if not the default + * - register-only : update registry but don't remove files * - nodeps: do not process dependencies of other packages to ensure * uninstallation does not break things */ @@ -1428,47 +1591,56 @@ class PEAR_Installer extends PEAR_Downloader $this->log(0, $e[0]); } } - // {{{ Delete the files - $this->startFileTransaction(); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - if (PEAR::isError($err = $this->_deletePackageFiles($package, $channel))) { - PEAR::popErrorHandling(); - $this->rollbackFileTransaction(); - $this->configSet('default_channel', $savechannel); - if (!isset($options['ignore-errors'])) { - return $this->raiseError($err); - } else { - if (!isset($options['soft'])) { - $this->log(0, 'WARNING: ' . $err->getMessage()); - } - } - } else { - PEAR::popErrorHandling(); - } - if (!$this->commitFileTransaction()) { - $this->rollbackFileTransaction(); - if (!isset($options['ignore-errors'])) { - return $this->raiseError("uninstall failed"); - } elseif (!isset($options['soft'])) { - $this->log(0, 'WARNING: uninstall failed'); - } - } else { + $this->pkginfo = &$pkg; + // pretty much nothing happens if we are only registering the uninstall + if (empty($options['register-only'])) { + // {{{ Delete the files $this->startFileTransaction(); - if ($dirtree = $pkg->getDirTree()) { - // attempt to delete empty directories - uksort($dirtree, array($this, '_sortDirs')); - foreach($dirtree as $dir => $notused) { - $this->addFileOperation('rmdir', array($dir)); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + if (PEAR::isError($err = $this->_deletePackageFiles($package, $channel))) { + PEAR::popErrorHandling(); + $this->rollbackFileTransaction(); + $this->configSet('default_channel', $savechannel); + if (!isset($options['ignore-errors'])) { + return $this->raiseError($err); + } else { + if (!isset($options['soft'])) { + $this->log(0, 'WARNING: ' . $err->getMessage()); + } } } else { - $this->configSet('default_channel', $savechannel); - return $this->_registry->deletePackage($package, $channel); + PEAR::popErrorHandling(); } if (!$this->commitFileTransaction()) { $this->rollbackFileTransaction(); + if (!isset($options['ignore-errors'])) { + return $this->raiseError("uninstall failed"); + } elseif (!isset($options['soft'])) { + $this->log(0, 'WARNING: uninstall failed'); + } + } else { + $this->startFileTransaction(); + if ($dirtree = $pkg->getDirTree()) { + // attempt to delete empty directories + uksort($dirtree, array($this, '_sortDirs')); + foreach($dirtree as $dir => $notused) { + $this->addFileOperation('rmdir', array($dir)); + } + } else { + $this->configSet('default_channel', $savechannel); + return $this->_registry->deletePackage($package, $channel); + } + if (!$this->commitFileTransaction()) { + $this->rollbackFileTransaction(); + if (!isset($options['ignore-errors'])) { + return $this->raiseError("uninstall failed"); + } elseif (!isset($options['soft'])) { + $this->log(0, 'WARNING: uninstall failed'); + } + } } + // }}} } - // }}} $this->configSet('default_channel', $savechannel); // Register that the package is no longer installed @@ -1539,16 +1711,11 @@ class PEAR_Installer extends PEAR_Downloader // {{{ md5_file() utility function if (!function_exists("md5_file")) { function md5_file($filename) { - $fp = fopen($filename, "r"); - if (!$fp) return null; - if (function_exists('file_get_contents')) { - fclose($fp); - $contents = file_get_contents($filename); - } else { - $contents = fread($fp, filesize($filename)); - fclose($fp); + if (!$fd = @fopen($file, 'r')) { + return false; } - return md5($contents); + fclose($fd); + return md5(file_get_contents($filename)); } } // }}} diff --git a/includes/pear/PEAR/Installer/Role.php b/includes/pear/PEAR/Installer/Role.php index c3b8d7a2..3b50db3c 100644 --- a/includes/pear/PEAR/Installer/Role.php +++ b/includes/pear/PEAR/Installer/Role.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Role.php,v 1.12 2005/11/01 06:18:14 cellog Exp $ + * @version CVS: $Id: Role.php,v 1.20 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -25,14 +25,13 @@ */ require_once 'PEAR/Installer/Role/Common.php'; require_once 'PEAR/XMLParser.php'; -//$GLOBALS['_PEAR_INSTALLER_ROLES'] = array(); /** * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -55,7 +54,7 @@ class PEAR_Installer_Role if (!$info['config_vars']) { continue; } - $config->_addConfigVars($info['config_vars']); + $config->_addConfigVars($class, $info['config_vars']); } } @@ -86,8 +85,7 @@ class PEAR_Installer_Role /** * Get a list of file roles that are valid for the particular release type. * - * For instance, src files serve no purpose in regular php releases. php files - * serve no purpose in extsrc or extbin releases + * For instance, src files serve no purpose in regular php releases. * @param string * @param bool clear cache * @return array @@ -134,6 +132,7 @@ class PEAR_Installer_Role unset($ret); } if (!isset($ret)) { + $ret = array(); foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { if ($okreleases['installable']) { $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); @@ -163,6 +162,7 @@ class PEAR_Installer_Role unset($ret); } if (!isset($ret)) { + $ret = array(); foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { if ($okreleases['honorsbaseinstall']) { $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); @@ -189,6 +189,7 @@ class PEAR_Installer_Role unset($ret); } if (!isset($ret)) { + $ret = array(); foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { if ($okreleases['phpfile']) { $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); @@ -212,13 +213,17 @@ class PEAR_Installer_Role */ function registerRoles($dir = null) { + $GLOBALS['_PEAR_INSTALLER_ROLES'] = array(); $parser = new PEAR_XMLParser; if ($dir === null) { $dir = dirname(__FILE__) . '/Role'; } + if (!file_exists($dir) || !is_dir($dir)) { + return PEAR::raiseError("registerRoles: opendir($dir) failed: does not exist/is not directory"); + } $dp = @opendir($dir); if (empty($dp)) { - return PEAR::raiseError("registerRoles: opendir($dir) failed"); + return PEAR::raiseError("registerRoles: opendir($dir) failed: $php_errmsg"); } while ($entry = readdir($dp)) { if ($entry{0} == '.' || substr($entry, -4) != '.xml') { @@ -226,7 +231,7 @@ class PEAR_Installer_Role } $class = "PEAR_Installer_Role_".substr($entry, 0, -4); // List of roles - if (empty($GLOBALS['_PEAR_INSTALLER_ROLES'][$class])) { + if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'][$class])) { $file = "$dir/$entry"; $parser->parse(file_get_contents($file)); $data = $parser->getData(); @@ -236,7 +241,7 @@ class PEAR_Installer_Role $GLOBALS['_PEAR_INSTALLER_ROLES'][$class] = $data; } } - @closedir($dp); + closedir($dp); ksort($GLOBALS['_PEAR_INSTALLER_ROLES']); PEAR_Installer_Role::getBaseinstallRoles(true); PEAR_Installer_Role::getInstallableRoles(true); diff --git a/includes/pear/PEAR/Installer/Role/Cfg.php b/includes/pear/PEAR/Installer/Role/Cfg.php new file mode 100644 index 00000000..1f85ebb5 --- /dev/null +++ b/includes/pear/PEAR/Installer/Role/Cfg.php @@ -0,0 +1,108 @@ + + * @copyright 2007-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: Cfg.php,v 1.8 2008/05/14 21:26:30 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.7.0 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 2007-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: 1.7.2 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.7.0 + */ +class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common +{ + /** + * @var PEAR_Installer + */ + var $installer; + /** + * the md5 of the original file + * + * @var unknown_type + */ + var $md5 = null; + /** + * Do any unusual setup here + * @param PEAR_Installer + * @param PEAR_PackageFile_v2 + * @param array file attributes + * @param string file name + */ + function setup(&$installer, $pkg, $atts, $file) + { + $this->installer = &$installer; + $reg = &$this->installer->config->getRegistry(); + $package = $reg->getPackage($pkg->getPackage(), $pkg->getChannel()); + if ($package) { + $filelist = $package->getFilelist(); + if (isset($filelist[$file]) && isset($filelist[$file]['md5sum'])) { + $this->md5 = $filelist[$file]['md5sum']; + } + } + } + + function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null) + { + $test = parent::processInstallation($pkg, $atts, $file, $tmp_path, $layer); + if (@file_exists($test[2]) && @file_exists($test[3])) { + $md5 = md5_file($test[2]); + // configuration has already been installed, check for mods + if ($md5 !== $this->md5 && $md5 !== md5_file($test[3])) { + // configuration has been modified, so save our version as + // configfile-version + $old = $test[2]; + $test[2] .= '.new-' . $pkg->getVersion(); + // backup original and re-install it + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $tmpcfg = $this->config->get('temp_dir'); + $newloc = System::mkdir(array('-p', $tmpcfg)); + if (!$newloc) { + // try temp_dir + $newloc = System::mktemp(array('-d')); + if (!$newloc || PEAR::isError($newloc)) { + PEAR::popErrorHandling(); + return PEAR::raiseError('Could not save existing configuration file '. + $old . ', unable to install. Please set temp_dir ' . + 'configuration variable to a writeable location and try again'); + } + } else { + $newloc = $tmpcfg; + } + $temp_file = $newloc . DIRECTORY_SEPARATOR . uniqid('savefile'); + if (!@copy($old, $temp_file)) { + PEAR::popErrorHandling(); + return PEAR::raiseError('Could not save existing configuration file '. + $old . ', unable to install. Please set temp_dir ' . + 'configuration variable to a writeable location and try again'); + } + PEAR::popErrorHandling(); + $this->installer->log(0, "WARNING: configuration file $old is being installed as $test[2], you should manually merge in changes to the existing configuration file"); + $this->installer->addFileOperation('rename', array($temp_file, $old, false)); + $this->installer->addFileOperation('delete', array($temp_file)); + } + } + return $test; + } +} +?> diff --git a/includes/pear/PEAR/Installer/Role/Cfg.xml b/includes/pear/PEAR/Installer/Role/Cfg.xml new file mode 100644 index 00000000..7a415dc4 --- /dev/null +++ b/includes/pear/PEAR/Installer/Role/Cfg.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + cfg_dir + + 1 + + + + + \ No newline at end of file diff --git a/includes/pear/PEAR/Installer/Role/Common.php b/includes/pear/PEAR/Installer/Role/Common.php index fd01521b..32cd8217 100644 --- a/includes/pear/PEAR/Installer/Role/Common.php +++ b/includes/pear/PEAR/Installer/Role/Common.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Common.php,v 1.9 2005/11/01 22:28:42 cellog Exp $ + * @version CVS: $Id: Common.php,v 1.12 2006/10/19 23:55:32 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -28,9 +28,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -94,13 +94,13 @@ class PEAR_Installer_Role_Common } } elseif ($roleInfo['unusualbaseinstall']) { $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], - null, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage(); + $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage(); if (!empty($atts['baseinstalldir'])) { $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir']; } } else { $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], - null, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage(); + $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage(); } if (dirname($file) != '.' && empty($atts['install-as'])) { $dest_dir .= DIRECTORY_SEPARATOR . dirname($file); diff --git a/includes/pear/PEAR/Installer/Role/Data.php b/includes/pear/PEAR/Installer/Role/Data.php index 9811e464..394f68ce 100644 --- a/includes/pear/PEAR/Installer/Role/Data.php +++ b/includes/pear/PEAR/Installer/Role/Data.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Data.php,v 1.5 2005/11/01 22:28:42 cellog Exp $ + * @version CVS: $Id: Data.php,v 1.7 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -24,9 +24,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/includes/pear/PEAR/Installer/Role/Data.xml b/includes/pear/PEAR/Installer/Role/Data.xml index 4382b707..eae63720 100644 --- a/includes/pear/PEAR/Installer/Role/Data.xml +++ b/includes/pear/PEAR/Installer/Role/Data.xml @@ -2,6 +2,8 @@ php extsrc extbin + zendextsrc + zendextbin 1 data_dir diff --git a/includes/pear/PEAR/Installer/Role/Doc.php b/includes/pear/PEAR/Installer/Role/Doc.php index e38311d2..b974dc68 100644 --- a/includes/pear/PEAR/Installer/Role/Doc.php +++ b/includes/pear/PEAR/Installer/Role/Doc.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Doc.php,v 1.5 2005/11/01 22:28:42 cellog Exp $ + * @version CVS: $Id: Doc.php,v 1.7 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -24,9 +24,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/includes/pear/PEAR/Installer/Role/Doc.xml b/includes/pear/PEAR/Installer/Role/Doc.xml index 0c593ef3..173afba0 100644 --- a/includes/pear/PEAR/Installer/Role/Doc.xml +++ b/includes/pear/PEAR/Installer/Role/Doc.xml @@ -2,6 +2,8 @@ php extsrc extbin + zendextsrc + zendextbin 1 doc_dir diff --git a/includes/pear/PEAR/Installer/Role/Ext.php b/includes/pear/PEAR/Installer/Role/Ext.php index c1ca4f1b..38c0e9af 100644 --- a/includes/pear/PEAR/Installer/Role/Ext.php +++ b/includes/pear/PEAR/Installer/Role/Ext.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Ext.php,v 1.5 2005/11/01 22:28:42 cellog Exp $ + * @version CVS: $Id: Ext.php,v 1.7 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -24,9 +24,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/includes/pear/PEAR/Installer/Role/Ext.xml b/includes/pear/PEAR/Installer/Role/Ext.xml index d5c1c485..e2940fe1 100644 --- a/includes/pear/PEAR/Installer/Role/Ext.xml +++ b/includes/pear/PEAR/Installer/Role/Ext.xml @@ -1,5 +1,6 @@ extbin + zendextbin 1 ext_dir 1 diff --git a/includes/pear/PEAR/Installer/Role/Php.php b/includes/pear/PEAR/Installer/Role/Php.php index 93c4ff7d..f232b723 100644 --- a/includes/pear/PEAR/Installer/Role/Php.php +++ b/includes/pear/PEAR/Installer/Role/Php.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Php.php,v 1.6 2005/11/01 22:28:42 cellog Exp $ + * @version CVS: $Id: Php.php,v 1.8 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -24,9 +24,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/includes/pear/PEAR/Installer/Role/Php.xml b/includes/pear/PEAR/Installer/Role/Php.xml index 037c2a11..6b9a0e67 100644 --- a/includes/pear/PEAR/Installer/Role/Php.xml +++ b/includes/pear/PEAR/Installer/Role/Php.xml @@ -2,6 +2,8 @@ php extsrc extbin + zendextsrc + zendextbin 1 php_dir 1 diff --git a/includes/pear/PEAR/Installer/Role/Script.php b/includes/pear/PEAR/Installer/Role/Script.php index 82882028..b8affdbb 100644 --- a/includes/pear/PEAR/Installer/Role/Script.php +++ b/includes/pear/PEAR/Installer/Role/Script.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Script.php,v 1.5 2005/11/01 22:28:42 cellog Exp $ + * @version CVS: $Id: Script.php,v 1.7 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -24,9 +24,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/includes/pear/PEAR/Installer/Role/Script.xml b/includes/pear/PEAR/Installer/Role/Script.xml index bc2df176..e732cf2a 100644 --- a/includes/pear/PEAR/Installer/Role/Script.xml +++ b/includes/pear/PEAR/Installer/Role/Script.xml @@ -2,6 +2,8 @@ php extsrc extbin + zendextsrc + zendextbin 1 bin_dir 1 diff --git a/includes/pear/PEAR/Installer/Role/Src.php b/includes/pear/PEAR/Installer/Role/Src.php index 9ba2e05d..68d07e4d 100644 --- a/includes/pear/PEAR/Installer/Role/Src.php +++ b/includes/pear/PEAR/Installer/Role/Src.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Src.php,v 1.5 2005/11/01 22:28:42 cellog Exp $ + * @version CVS: $Id: Src.php,v 1.7 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -24,9 +24,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/includes/pear/PEAR/Installer/Role/Src.xml b/includes/pear/PEAR/Installer/Role/Src.xml index c2fb4d18..10348340 100644 --- a/includes/pear/PEAR/Installer/Role/Src.xml +++ b/includes/pear/PEAR/Installer/Role/Src.xml @@ -1,7 +1,8 @@ extsrc - - + zendextsrc + 1 + temp_dir diff --git a/includes/pear/PEAR/Installer/Role/Test.php b/includes/pear/PEAR/Installer/Role/Test.php index 48e50ea1..63979b93 100644 --- a/includes/pear/PEAR/Installer/Role/Test.php +++ b/includes/pear/PEAR/Installer/Role/Test.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Test.php,v 1.5 2005/11/01 22:28:42 cellog Exp $ + * @version CVS: $Id: Test.php,v 1.7 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -24,9 +24,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ diff --git a/includes/pear/PEAR/Installer/Role/Test.xml b/includes/pear/PEAR/Installer/Role/Test.xml index dd486426..51d5b894 100644 --- a/includes/pear/PEAR/Installer/Role/Test.xml +++ b/includes/pear/PEAR/Installer/Role/Test.xml @@ -2,6 +2,8 @@ php extsrc extbin + zendextsrc + zendextbin 1 test_dir diff --git a/includes/pear/PEAR/Installer/Role/Www.php b/includes/pear/PEAR/Installer/Role/Www.php new file mode 100644 index 00000000..801097f9 --- /dev/null +++ b/includes/pear/PEAR/Installer/Role/Www.php @@ -0,0 +1,34 @@ + + * @copyright 2007-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: Www.php,v 1.2 2008/01/03 20:26:36 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.7.0 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 2007-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: 1.7.2 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.7.0 + */ +class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {} +?> \ No newline at end of file diff --git a/includes/pear/PEAR/Installer/Role/Www.xml b/includes/pear/PEAR/Installer/Role/Www.xml new file mode 100644 index 00000000..7598be38 --- /dev/null +++ b/includes/pear/PEAR/Installer/Role/Www.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + www_dir + 1 + + + + + + \ No newline at end of file diff --git a/includes/pear/PEAR/PackageFile.php b/includes/pear/PEAR/PackageFile.php index 783017ec..0dc42e97 100644 --- a/includes/pear/PEAR/PackageFile.php +++ b/includes/pear/PEAR/PackageFile.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PackageFile.php,v 1.31 2005/09/15 20:42:25 cellog Exp $ + * @version CVS: $Id: PackageFile.php,v 1.41 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -39,9 +39,9 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2); * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -186,9 +186,9 @@ class PEAR_PackageFile function &fromXmlString($data, $state, $file, $archive = false) { if (preg_match('/]+version="([0-9]+\.[0-9]+)"/', $data, $packageversion)) { - if (!in_array($packageversion[1], array('1.0', '2.0'))) { + if (!in_array($packageversion[1], array('1.0', '2.0', '2.1'))) { return PEAR::raiseError('package.xml version "' . $packageversion[1] . - '" is not supported, only 1.0 and 2.0 are supported.'); + '" is not supported, only 1.0, 2.0, and 2.1 are supported.'); } $object = &$this->parserFactory($packageversion[1]); if ($this->_logger) { @@ -306,7 +306,8 @@ class PEAR_PackageFile $tar->popErrorHandling(); } if (!is_array($content)) { - if (is_string($file) && strlen($file < 255) && !@is_file($file)) { + if (is_string($file) && strlen($file < 255) && + (!file_exists($file) || !@is_file($file))) { $ret = PEAR::raiseError("could not open file \"$file\""); return $ret; } @@ -332,7 +333,7 @@ class PEAR_PackageFile $xml = $name; break; } elseif (ereg('package.xml$', $name, $match)) { - $xml = $match[0]; + $xml = $name; break; } } @@ -342,15 +343,48 @@ class PEAR_PackageFile $tmpdir = System::mkTemp(array('-d', 'pear')); PEAR_PackageFile::addTempFile($tmpdir); } + $this->_extractErrors(); + PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors')); if (!$xml || !$tar->extractList(array($xml), $tmpdir)) { + $extra = implode("\n", $this->_extractErrors()); + if ($extra) { + $extra = ' ' . $extra; + } + PEAR::staticPopErrorHandling(); $ret = PEAR::raiseError('could not extract the package.xml file from "' . - $origfile . '"'); + $origfile . '"' . $extra); return $ret; } + PEAR::staticPopErrorHandling(); $ret = &PEAR_PackageFile::fromPackageFile("$tmpdir/$xml", $state, $origfile); return $ret; } + /** + * helper for extracting Archive_Tar errors + * @var array + * @access private + */ + var $_extractErrors = array(); + + /** + * helper callback for extracting Archive_Tar errors + * + * @param PEAR_Error|null $err + * @return array + * @access private + */ + function _extractErrors($err = null) + { + static $errors = array(); + if ($err === null) { + $e = $errors; + $errors = array(); + return $e; + } + $errors[] = $err->getMessage(); + } + /** * Create a PEAR_PackageFile_v* from a package.xml file. * @@ -366,24 +400,16 @@ class PEAR_PackageFile function &fromPackageFile($descfile, $state, $archive = false) { if (is_string($descfile) && strlen($descfile) < 255 && - !@is_file($descfile) || !is_readable($descfile) || - (!$fp = @fopen($descfile, 'r'))) { + (!file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) || + (!$fp = @fopen($descfile, 'r')))) { $a = PEAR::raiseError("Unable to open $descfile"); return $a; } // read the whole thing so we only get one cdata callback // for each block of cdata - if (function_exists('file_get_contents')) { - @fclose($fp); - $data = file_get_contents($descfile); - } else { - $data = ''; - while (!feof($fp)) { - $data .= @fread($fp, 8192); - } - fclose($fp); - } + fclose($fp); + $data = file_get_contents($descfile); $ret = &PEAR_PackageFile::fromXmlString($data, $state, $descfile, $archive); return $ret; } @@ -404,6 +430,18 @@ class PEAR_PackageFile */ function &fromAnyFile($info, $state) { + if (is_dir($info)) { + $dir_name = realpath($info); + if (file_exists($dir_name . '/package.xml')) { + $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package.xml', $state); + } elseif (file_exists($dir_name . '/package2.xml')) { + $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package2.xml', $state); + } else { + $info = PEAR::raiseError("No package definition found in '$info' directory"); + } + return $info; + } + $fp = false; if (is_string($info) && strlen($info) < 255 && (file_exists($info) || ($fp = @fopen($info, 'r')))) { @@ -433,4 +471,4 @@ class PEAR_PackageFile } } -?> \ No newline at end of file +?> diff --git a/includes/pear/PEAR/PackageFile/Generator/v1.php b/includes/pear/PEAR/PackageFile/Generator/v1.php index 3677b204..e6c5c94c 100644 --- a/includes/pear/PEAR/PackageFile/Generator/v1.php +++ b/includes/pear/PEAR/PackageFile/Generator/v1.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: v1.php,v 1.69 2005/09/25 03:48:59 cellog Exp $ + * @version CVS: $Id: v1.php,v 1.74 2008/01/03 20:26:37 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -33,9 +33,9 @@ require_once 'PEAR/PackageFile/v2.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -52,7 +52,7 @@ class PEAR_PackageFile_Generator_v1 function getPackagerVersion() { - return '1.4.5'; + return '1.7.2'; } /** @@ -206,7 +206,7 @@ class PEAR_PackageFile_Generator_v1 ); $ret = "\n"; $ret .= "\n"; - $ret .= "\n" . + $ret .= "\n" . " $pkginfo[package]"; if (isset($pkginfo['extends'])) { $ret .= "\n$pkginfo[extends]"; @@ -321,7 +321,10 @@ class PEAR_PackageFile_Generator_v1 $ret .= $this->recursiveXmlFilelist($pkginfo['filelist']); } else { foreach ($pkginfo['filelist'] as $file => $fa) { - @$ret .= "$indent _fixXmlEncoding($fa['baseinstalldir']) . '"'; @@ -348,7 +351,7 @@ class PEAR_PackageFile_Generator_v1 } $ret .= "/>\n"; } - @$ret .= "$indent \n"; + $ret .= "$indent \n"; } } } @@ -680,7 +683,9 @@ class PEAR_PackageFile_Generator_v1 } $ret = new $class; $ret->setConfig($this->_packagefile->_config); - $ret->setLogger($this->_packagefile->_logger); + if (isset($this->_packagefile->_logger) && is_object($this->_packagefile->_logger)) { + $ret->setLogger($this->_packagefile->_logger); + } $ret->fromArray($arr); return $ret; } @@ -695,7 +700,7 @@ class PEAR_PackageFile_Generator_v1 $peardep = array('pearinstaller' => array('min' => '1.4.0b1')); // this is a lot safer $required = $optional = array(); - $release['dependencies'] = array(); + $release['dependencies'] = array('required' => array()); if ($this->_packagefile->hasDeps()) { foreach ($this->_packagefile->getDeps() as $dep) { if (!isset($dep['optional']) || $dep['optional'] == 'no') { diff --git a/includes/pear/PEAR/PackageFile/Generator/v2.php b/includes/pear/PEAR/PackageFile/Generator/v2.php index 0631b4a2..fb8d2f97 100644 --- a/includes/pear/PEAR/PackageFile/Generator/v2.php +++ b/includes/pear/PEAR/PackageFile/Generator/v2.php @@ -14,9 +14,9 @@ * @package PEAR * @author Greg Beaver * @author Stephan Schmidt (original XML_Serializer code) - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: v2.php,v 1.32 2005/10/02 06:29:24 cellog Exp $ + * @version CVS: $Id: v2.php,v 1.39 2008/05/13 05:29:24 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -33,9 +33,9 @@ require_once 'System.php'; * @package PEAR * @author Greg Beaver * @author Stephan Schmidt (original XML_Serializer code) - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -61,7 +61,7 @@ class PEAR_PackageFile_Generator_v2 'indentAttributes' => false, // indent the attributes, if set to '_auto', it will indent attributes so they all start at the same column 'mode' => 'simplexml', // use 'simplexml' to use parent name as tagname if transforming an indexed array 'addDoctype' => false, // add a doctype declaration - 'doctype' => null, // supply a string or an array with id and uri ({@see XML_Util::getDoctypeDeclaration()} + 'doctype' => null, // supply a string or an array with id and uri ({@see PEAR_PackageFile_Generator_v2_PEAR_PackageFile_Generator_v2_XML_Util::getDoctypeDeclaration()} 'rootName' => 'package', // name of the root tag 'rootAttributes' => array( 'version' => '2.0', @@ -114,7 +114,7 @@ http://pear.php.net/dtd/package-2.0.xsd', */ function getPackagerVersion() { - return '1.4.5'; + return '1.7.2'; } /** @@ -213,19 +213,16 @@ http://pear.php.net/dtd/package-2.0.xsd', if (!file_exists($file)) { return $packager->raiseError("File does not exist: $fname"); } else { + $origperms = fileperms($file); $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname; unset($orig['attribs']); if (count($orig)) { // file with tasks // run any package-time tasks - if (function_exists('file_get_contents')) { - $contents = file_get_contents($file); - } else { - $fp = fopen($file, "r"); - $contents = @fread($fp, filesize($file)); - fclose($fp); - } + $contents = file_get_contents($file); foreach ($orig as $tag => $raw) { - $tag = str_replace($this->_packagefile->getTasksNs() . ':', '', $tag); + $tag = str_replace( + array($this->_packagefile->getTasksNs() . ':', '-'), + array('', '_'), $tag); $task = "PEAR_Task_$tag"; $task = &new $task($this->_packagefile->_config, $this->_packagefile->_logger, @@ -249,6 +246,7 @@ http://pear.php.net/dtd/package-2.0.xsd', System::mkdir(array('-p', dirname($tfile))); copy($file, $tfile); } + chmod($tfile, $origperms); $filelist[$i++] = $tfile; $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($tfile), $i - 1); $packager->log(2, "Adding file $fname"); @@ -358,7 +356,7 @@ http://pear.php.net/dtd/package-2.0.xsd', } $this->options['beautifyFilelist'] = true; } - $arr['attribs']['packagerversion'] = '1.4.5'; + $arr['attribs']['packagerversion'] = '1.7.2'; if ($this->serialize($arr, $options)) { return $this->_serializedData . "\n"; } @@ -537,7 +535,7 @@ http://pear.php.net/dtd/package-2.0.xsd', // add doctype declaration if ($this->options['addDoctype'] === true) { - $this->_serializedData = XML_Util::getDoctypeDeclaration($tagName, $this->options['doctype']) + $this->_serializedData = PEAR_PackageFile_Generator_v2_XML_Util::getDoctypeDeclaration($tagName, $this->options['doctype']) . $this->options['linebreak'] . $this->_serializedData; } @@ -550,7 +548,7 @@ http://pear.php.net/dtd/package-2.0.xsd', } else { $encoding = null; } - $this->_serializedData = XML_Util::getXMLDeclaration('1.0', $encoding) + $this->_serializedData = PEAR_PackageFile_Generator_v2_XML_Util::getXMLDeclaration('1.0', $encoding) . $this->options['linebreak'] . $this->_serializedData; } @@ -613,7 +611,7 @@ http://pear.php.net/dtd/package-2.0.xsd', * @param string $tagName name of the root tag * @param array $attributes attributes for the root tag * @return string $string serialized data - * @uses XML_Util::isValidName() to check, whether key has to be substituted + * @uses PEAR_PackageFile_Generator_v2_XML_Util::isValidName() to check, whether key has to be substituted */ function _serializeArray(&$array, $tagName = null, $attributes = array()) { @@ -695,7 +693,7 @@ http://pear.php.net/dtd/package-2.0.xsd', if ($this->options['scalarAsAttributes'] === true) { foreach ($array as $key => $value) { - if (is_scalar($value) && (XML_Util::isValidName($key) === true)) { + if (is_scalar($value) && (PEAR_PackageFile_Generator_v2_XML_Util::isValidName($key) === true)) { unset($array[$key]); $attributes[$this->options['prependAttributes'].$key] = $value; } @@ -722,7 +720,7 @@ http://pear.php.net/dtd/package-2.0.xsd', // copy key $origKey = $key; // key cannot be used as tagname => use default tag - $valid = XML_Util::isValidName($key); + $valid = PEAR_PackageFile_Generator_v2_XML_Util::isValidName($key); if (PEAR::isError($valid)) { if ($this->options['classAsTagName'] && is_object($value)) { $key = get_class($value); @@ -842,31 +840,23 @@ http://pear.php.net/dtd/package-2.0.xsd', if (is_scalar($tag['content']) || is_null($tag['content'])) { if ($this->options['encoding'] == 'UTF-8' && version_compare(phpversion(), '5.0.0', 'lt')) { - $encoding = XML_UTIL_ENTITIES_UTF8_XML; + $encoding = PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_UTF8_XML; } else { - $encoding = XML_UTIL_ENTITIES_XML; + $encoding = PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML; } - $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options['linebreak'], $encoding); + $tag = PEAR_PackageFile_Generator_v2_XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options['linebreak'], $encoding); } elseif (is_array($tag['content'])) { $tag = $this->_serializeArray($tag['content'], $tag['qname'], $tag['attributes']); } elseif (is_object($tag['content'])) { $tag = $this->_serializeObject($tag['content'], $tag['qname'], $tag['attributes']); } elseif (is_resource($tag['content'])) { settype($tag['content'], 'string'); - $tag = XML_Util::createTagFromArray($tag, $replaceEntities); + $tag = PEAR_PackageFile_Generator_v2_XML_Util::createTagFromArray($tag, $replaceEntities); } return $tag; } } -//foreach (explode(PATH_SEPARATOR, ini_get('include_path')) as $path) { -// $t = $path . DIRECTORY_SEPARATOR . 'XML' . DIRECTORY_SEPARATOR . -// 'Util'; -// if (file_exists($t) && is_readable($t)) { -// include_once 'XML/Util'; -// } -//} -//if (!class_exists('XML_Util')) { // well, it's one way to do things without extra deps ... /* vim: set expandtab tabstop=4 shiftwidth=4: */ // +----------------------------------------------------------------------+ @@ -885,76 +875,79 @@ http://pear.php.net/dtd/package-2.0.xsd', // | Authors: Stephan Schmidt | // +----------------------------------------------------------------------+ // -// $Id: v2.php,v 1.32 2005/10/02 06:29:24 cellog Exp $ +// $Id: v2.php,v 1.39 2008/05/13 05:29:24 cellog Exp $ /** * error code for invalid chars in XML name */ -define("XML_UTIL_ERROR_INVALID_CHARS", 51); +define("PEAR_PackageFile_Generator_v2_XML_Util_ERROR_INVALID_CHARS", 51); /** * error code for invalid chars in XML name */ -define("XML_UTIL_ERROR_INVALID_START", 52); +define("PEAR_PackageFile_Generator_v2_XML_Util_ERROR_INVALID_START", 52); /** * error code for non-scalar tag content */ -define("XML_UTIL_ERROR_NON_SCALAR_CONTENT", 60); +define("PEAR_PackageFile_Generator_v2_XML_Util_ERROR_NON_SCALAR_CONTENT", 60); /** * error code for missing tag name */ -define("XML_UTIL_ERROR_NO_TAG_NAME", 61); +define("PEAR_PackageFile_Generator_v2_XML_Util_ERROR_NO_TAG_NAME", 61); /** * replace XML entities */ -define("XML_UTIL_REPLACE_ENTITIES", 1); +define("PEAR_PackageFile_Generator_v2_XML_Util_REPLACE_ENTITIES", 1); /** * embedd content in a CData Section */ -define("XML_UTIL_CDATA_SECTION", 2); +define("PEAR_PackageFile_Generator_v2_XML_Util_CDATA_SECTION", 2); /** * do not replace entitites */ -define("XML_UTIL_ENTITIES_NONE", 0); +define("PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_NONE", 0); /** * replace all XML entitites * This setting will replace <, >, ", ' and & */ -define("XML_UTIL_ENTITIES_XML", 1); +define("PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML", 1); /** * replace only required XML entitites * This setting will replace <, " and & */ -define("XML_UTIL_ENTITIES_XML_REQUIRED", 2); +define("PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML_REQUIRED", 2); /** * replace HTML entitites * @link http://www.php.net/htmlentities */ -define("XML_UTIL_ENTITIES_HTML", 3); +define("PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_HTML", 3); /** * replace all XML entitites, and encode from ISO-8859-1 to UTF-8 * This setting will replace <, >, ", ' and & */ -define("XML_UTIL_ENTITIES_UTF8_XML", 4); +define("PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_UTF8_XML", 4); /** * utility class for working with XML documents + * + * customized version of XML_Util 0.6.0 * * @category XML - * @package XML_Util + * @package PEAR * @version 0.6.0 * @author Stephan Schmidt + * @author Gregory Beaver */ -class XML_Util { +class PEAR_PackageFile_Generator_v2_XML_Util { /** * return API version @@ -978,19 +971,19 @@ class XML_Util { * require_once 'XML/Util.php'; * * // replace XML entites: - * $string = XML_Util::replaceEntities("This string contains < & >."); + * $string = PEAR_PackageFile_Generator_v2_XML_Util::replaceEntities("This string contains < & >."); * * * @access public * @static * @param string string where XML special chars should be replaced - * @param integer setting for entities in attribute values (one of XML_UTIL_ENTITIES_XML, XML_UTIL_ENTITIES_XML_REQUIRED, XML_UTIL_ENTITIES_HTML) + * @param integer setting for entities in attribute values (one of PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML, PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML_REQUIRED, PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_HTML) * @return string string with replaced chars */ - function replaceEntities($string, $replaceEntities = XML_UTIL_ENTITIES_XML) + function replaceEntities($string, $replaceEntities = PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML) { switch ($replaceEntities) { - case XML_UTIL_ENTITIES_UTF8_XML: + case PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_UTF8_XML: return strtr(utf8_encode($string),array( '&' => '&', '>' => '>', @@ -998,7 +991,7 @@ class XML_Util { '"' => '"', '\'' => ''' )); break; - case XML_UTIL_ENTITIES_XML: + case PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML: return strtr($string,array( '&' => '&', '>' => '>', @@ -1006,13 +999,13 @@ class XML_Util { '"' => '"', '\'' => ''' )); break; - case XML_UTIL_ENTITIES_XML_REQUIRED: + case PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML_REQUIRED: return strtr($string,array( '&' => '&', '<' => '<', '"' => '"' )); break; - case XML_UTIL_ENTITIES_HTML: + case PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_HTML: return htmlspecialchars($string); break; } @@ -1026,7 +1019,7 @@ class XML_Util { * require_once 'XML/Util.php'; * * // get an XML declaration: - * $xmlDecl = XML_Util::getXMLDeclaration("1.0", "UTF-8", true); + * $xmlDecl = PEAR_PackageFile_Generator_v2_XML_Util::getXMLDeclaration("1.0", "UTF-8", true); * * * @access public @@ -1035,7 +1028,7 @@ class XML_Util { * @param string $encoding character encoding * @param boolean $standAlone document is standalone (or not) * @return string $decl xml declaration - * @uses XML_Util::attributesToString() to serialize the attributes of the XML declaration + * @uses PEAR_PackageFile_Generator_v2_XML_Util::attributesToString() to serialize the attributes of the XML declaration */ function getXMLDeclaration($version = "1.0", $encoding = null, $standalone = null) { @@ -1051,7 +1044,7 @@ class XML_Util { $attributes["standalone"] = $standalone ? "yes" : "no"; } - return sprintf("", XML_Util::attributesToString($attributes, false)); + return sprintf("", PEAR_PackageFile_Generator_v2_XML_Util::attributesToString($attributes, false)); } /** @@ -1061,7 +1054,7 @@ class XML_Util { * require_once 'XML/Util.php'; * * // get a doctype declaration: - * $xmlDecl = XML_Util::getDocTypeDeclaration("rootTag","myDocType.dtd"); + * $xmlDecl = PEAR_PackageFile_Generator_v2_XML_Util::getDocTypeDeclaration("rootTag","myDocType.dtd"); * * * @access public @@ -1101,7 +1094,7 @@ class XML_Util { * "argh" => "tomato" * ); * - * $attList = XML_Util::attributesToString($att); + * $attList = PEAR_PackageFile_Generator_v2_XML_Util::attributesToString($att); * * * @access public @@ -1111,12 +1104,12 @@ class XML_Util { * @param boolean $multiline use linebreaks, if more than one attribute is given * @param string $indent string used for indentation of multiline attributes * @param string $linebreak string used for linebreaks of multiline attributes - * @param integer $entities setting for entities in attribute values (one of XML_UTIL_ENTITIES_NONE, XML_UTIL_ENTITIES_XML, XML_UTIL_ENTITIES_XML_REQUIRED, XML_UTIL_ENTITIES_HTML) + * @param integer $entities setting for entities in attribute values (one of PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_NONE, PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML, PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML_REQUIRED, PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_HTML) * @return string string representation of the attributes - * @uses XML_Util::replaceEntities() to replace XML entities in attribute values + * @uses PEAR_PackageFile_Generator_v2_XML_Util::replaceEntities() to replace XML entities in attribute values * @todo allow sort also to be an options array */ - function attributesToString($attributes, $sort = true, $multiline = false, $indent = ' ', $linebreak = "\n", $entities = XML_UTIL_ENTITIES_XML) + function attributesToString($attributes, $sort = true, $multiline = false, $indent = ' ', $linebreak = "\n", $entities = PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML) { /** * second parameter may be an array @@ -1147,16 +1140,16 @@ class XML_Util { } if( !$multiline || count($attributes) == 1) { foreach ($attributes as $key => $value) { - if ($entities != XML_UTIL_ENTITIES_NONE) { - $value = XML_Util::replaceEntities($value, $entities); + if ($entities != PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_NONE) { + $value = PEAR_PackageFile_Generator_v2_XML_Util::replaceEntities($value, $entities); } $string .= ' '.$key.'="'.$value.'"'; } } else { $first = true; foreach ($attributes as $key => $value) { - if ($entities != XML_UTIL_ENTITIES_NONE) { - $value = XML_Util::replaceEntities($value, $entities); + if ($entities != PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_NONE) { + $value = PEAR_PackageFile_Generator_v2_XML_Util::replaceEntities($value, $entities); } if ($first) { $string .= " ".$key.'="'.$value.'"'; @@ -1173,14 +1166,14 @@ class XML_Util { /** * create a tag * - * This method will call XML_Util::createTagFromArray(), which + * This method will call PEAR_PackageFile_Generator_v2_XML_Util::createTagFromArray(), which * is more flexible. * * * require_once 'XML/Util.php'; * * // create an XML tag: - * $tag = XML_Util::createTag("myNs:myTag", array("foo" => "bar"), "This is inside the tag", "http://www.w3c.org/myNs#"); + * $tag = PEAR_PackageFile_Generator_v2_XML_Util::createTag("myNs:myTag", array("foo" => "bar"), "This is inside the tag", "http://www.w3c.org/myNs#"); * * * @access public @@ -1195,10 +1188,10 @@ class XML_Util { * @param string $linebreak string used for linebreaks * @param string $encoding encoding that should be used to translate content * @return string $string XML tag - * @see XML_Util::createTagFromArray() - * @uses XML_Util::createTagFromArray() to create the tag + * @see PEAR_PackageFile_Generator_v2_XML_Util::createTagFromArray() + * @uses PEAR_PackageFile_Generator_v2_XML_Util::createTagFromArray() to create the tag */ - function createTag($qname, $attributes = array(), $content = null, $namespaceUri = null, $replaceEntities = XML_UTIL_REPLACE_ENTITIES, $multiline = false, $indent = "_auto", $linebreak = "\n", $encoding = XML_UTIL_ENTITIES_XML) + function createTag($qname, $attributes = array(), $content = null, $namespaceUri = null, $replaceEntities = PEAR_PackageFile_Generator_v2_XML_Util_REPLACE_ENTITIES, $multiline = false, $indent = "_auto", $linebreak = "\n", $encoding = PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML) { $tag = array( "qname" => $qname, @@ -1215,7 +1208,7 @@ class XML_Util { $tag["namespaceUri"] = $namespaceUri; } - return XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $linebreak, $encoding); + return PEAR_PackageFile_Generator_v2_XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $linebreak, $encoding); } /** @@ -1242,7 +1235,7 @@ class XML_Util { * "content" => "I'm inside the tag", * ); * // creating a tag with qualified name and namespaceUri - * $string = XML_Util::createTagFromArray($tag); + * $string = PEAR_PackageFile_Generator_v2_XML_Util::createTagFromArray($tag); * * * @access public @@ -1253,18 +1246,18 @@ class XML_Util { * @param string $indent string used to indent attributes (_auto indents attributes so they start at the same column) * @param string $linebreak string used for linebreaks * @return string $string XML tag - * @see XML_Util::createTag() - * @uses XML_Util::attributesToString() to serialize the attributes of the tag - * @uses XML_Util::splitQualifiedName() to get local part and namespace of a qualified name + * @see PEAR_PackageFile_Generator_v2_XML_Util::createTag() + * @uses PEAR_PackageFile_Generator_v2_XML_Util::attributesToString() to serialize the attributes of the tag + * @uses PEAR_PackageFile_Generator_v2_XML_Util::splitQualifiedName() to get local part and namespace of a qualified name */ - function createTagFromArray($tag, $replaceEntities = XML_UTIL_REPLACE_ENTITIES, $multiline = false, $indent = "_auto", $linebreak = "\n", $encoding = XML_UTIL_ENTITIES_XML) + function createTagFromArray($tag, $replaceEntities = PEAR_PackageFile_Generator_v2_XML_Util_REPLACE_ENTITIES, $multiline = false, $indent = "_auto", $linebreak = "\n", $encoding = PEAR_PackageFile_Generator_v2_XML_Util_ENTITIES_XML) { if (isset($tag["content"]) && !is_scalar($tag["content"])) { - return XML_Util::raiseError( "Supplied non-scalar value as tag content", XML_UTIL_ERROR_NON_SCALAR_CONTENT ); + return PEAR_PackageFile_Generator_v2_XML_Util::raiseError( "Supplied non-scalar value as tag content", PEAR_PackageFile_Generator_v2_XML_Util_ERROR_NON_SCALAR_CONTENT ); } if (!isset($tag['qname']) && !isset($tag['localPart'])) { - return XML_Util::raiseError( 'You must either supply a qualified name (qname) or local tag name (localPart).', XML_UTIL_ERROR_NO_TAG_NAME ); + return PEAR_PackageFile_Generator_v2_XML_Util::raiseError( 'You must either supply a qualified name (qname) or local tag name (localPart).', PEAR_PackageFile_Generator_v2_XML_Util_ERROR_NO_TAG_NAME ); } // if no attributes hav been set, use empty attributes @@ -1282,7 +1275,7 @@ class XML_Util { } // namespace URI is set, but no namespace } elseif (isset($tag["namespaceUri"]) && !isset($tag["namespace"])) { - $parts = XML_Util::splitQualifiedName($tag["qname"]); + $parts = PEAR_PackageFile_Generator_v2_XML_Util::splitQualifiedName($tag["qname"]); $tag["localPart"] = $parts["localPart"]; if (isset($parts["namespace"])) { $tag["namespace"] = $parts["namespace"]; @@ -1307,14 +1300,14 @@ class XML_Util { } // create attribute list - $attList = XML_Util::attributesToString($tag["attributes"], true, $multiline, $indent, $linebreak ); + $attList = PEAR_PackageFile_Generator_v2_XML_Util::attributesToString($tag["attributes"], true, $multiline, $indent, $linebreak ); if (!isset($tag["content"]) || (string)$tag["content"] == '') { $tag = sprintf("<%s%s />", $tag["qname"], $attList); } else { - if ($replaceEntities == XML_UTIL_REPLACE_ENTITIES) { - $tag["content"] = XML_Util::replaceEntities($tag["content"], $encoding); - } elseif ($replaceEntities == XML_UTIL_CDATA_SECTION) { - $tag["content"] = XML_Util::createCDataSection($tag["content"]); + if ($replaceEntities == PEAR_PackageFile_Generator_v2_XML_Util_REPLACE_ENTITIES) { + $tag["content"] = PEAR_PackageFile_Generator_v2_XML_Util::replaceEntities($tag["content"], $encoding); + } elseif ($replaceEntities == PEAR_PackageFile_Generator_v2_XML_Util_CDATA_SECTION) { + $tag["content"] = PEAR_PackageFile_Generator_v2_XML_Util::createCDataSection($tag["content"]); } $tag = sprintf("<%s%s>%s", $tag["qname"], $attList, $tag["content"], $tag["qname"] ); } @@ -1328,7 +1321,7 @@ class XML_Util { * require_once 'XML/Util.php'; * * // create an XML start element: - * $tag = XML_Util::createStartElement("myNs:myTag", array("foo" => "bar") ,"http://www.w3c.org/myNs#"); + * $tag = PEAR_PackageFile_Generator_v2_XML_Util::createStartElement("myNs:myTag", array("foo" => "bar") ,"http://www.w3c.org/myNs#"); * * * @access public @@ -1340,7 +1333,7 @@ class XML_Util { * @param string $indent string used to indent attributes (_auto indents attributes so they start at the same column) * @param string $linebreak string used for linebreaks * @return string $string XML start element - * @see XML_Util::createEndElement(), XML_Util::createTag() + * @see PEAR_PackageFile_Generator_v2_XML_Util::createEndElement(), PEAR_PackageFile_Generator_v2_XML_Util::createTag() */ function createStartElement($qname, $attributes = array(), $namespaceUri = null, $multiline = false, $indent = '_auto', $linebreak = "\n") { @@ -1350,7 +1343,7 @@ class XML_Util { } if ($namespaceUri != null) { - $parts = XML_Util::splitQualifiedName($qname); + $parts = PEAR_PackageFile_Generator_v2_XML_Util::splitQualifiedName($qname); } // check for multiline attributes @@ -1371,7 +1364,7 @@ class XML_Util { } // create attribute list - $attList = XML_Util::attributesToString($attributes, true, $multiline, $indent, $linebreak); + $attList = PEAR_PackageFile_Generator_v2_XML_Util::attributesToString($attributes, true, $multiline, $indent, $linebreak); $element = sprintf("<%s%s>", $qname, $attList); return $element; } @@ -1383,14 +1376,14 @@ class XML_Util { * require_once 'XML/Util.php'; * * // create an XML start element: - * $tag = XML_Util::createEndElement("myNs:myTag"); + * $tag = PEAR_PackageFile_Generator_v2_XML_Util::createEndElement("myNs:myTag"); * * * @access public * @static * @param string $qname qualified tagname (including namespace) * @return string $string XML end element - * @see XML_Util::createStartElement(), XML_Util::createTag() + * @see PEAR_PackageFile_Generator_v2_XML_Util::createStartElement(), PEAR_PackageFile_Generator_v2_XML_Util::createTag() */ function createEndElement($qname) { @@ -1405,7 +1398,7 @@ class XML_Util { * require_once 'XML/Util.php'; * * // create an XML start element: - * $tag = XML_Util::createComment("I am a comment"); + * $tag = PEAR_PackageFile_Generator_v2_XML_Util::createComment("I am a comment"); * * * @access public @@ -1426,7 +1419,7 @@ class XML_Util { * require_once 'XML/Util.php'; * * // create a CData section - * $tag = XML_Util::createCDataSection("I am content."); + * $tag = PEAR_PackageFile_Generator_v2_XML_Util::createCDataSection("I am content."); * * * @access public @@ -1446,7 +1439,7 @@ class XML_Util { * require_once 'XML/Util.php'; * * // split qualified tag - * $parts = XML_Util::splitQualifiedName("xslt:stylesheet"); + * $parts = PEAR_PackageFile_Generator_v2_XML_Util::splitQualifiedName("xslt:stylesheet"); * * the returned array will contain two elements: *
@@ -1491,8 +1484,8 @@ class XML_Util {
     * require_once 'XML/Util.php';
     * 
     * // verify tag name
-    * $result = XML_Util::isValidName("invalidTag?");
-    * if (XML_Util::isError($result)) {
+    * $result = PEAR_PackageFile_Generator_v2_XML_Util::isValidName("invalidTag?");
+    * if (PEAR_PackageFile_Generator_v2_XML_Util::isError($result)) {
     *    print "Invalid XML name: " . $result->getMessage();
     * }
     * 
@@ -1506,20 +1499,20 @@ class XML_Util {
     function isValidName($string)
     {
         // check for invalid chars
-        if (!preg_match("/^[[:alnum:]_\-.]$/", $string{0})) {
-            return XML_Util::raiseError( "XML names may only start with letter or underscore", XML_UTIL_ERROR_INVALID_START );
+        if (!preg_match("/^[[:alnum:]_\-.]\\z/", $string{0})) {
+            return PEAR_PackageFile_Generator_v2_XML_Util::raiseError( "XML names may only start with letter or underscore", PEAR_PackageFile_Generator_v2_XML_Util_ERROR_INVALID_START );
         }
         
         // check for invalid chars
-        if (!preg_match("/^([a-zA-Z_]([a-zA-Z0-9_\-\.]*)?:)?[a-zA-Z_]([a-zA-Z0-9_\-\.]+)?$/", $string)) {
-            return XML_Util::raiseError( "XML names may only contain alphanumeric chars, period, hyphen, colon and underscores", XML_UTIL_ERROR_INVALID_CHARS );
+        if (!preg_match("/^([a-zA-Z_]([a-zA-Z0-9_\-\.]*)?:)?[a-zA-Z_]([a-zA-Z0-9_\-\.]+)?\\z/", $string)) {
+            return PEAR_PackageFile_Generator_v2_XML_Util::raiseError( "XML names may only contain alphanumeric chars, period, hyphen, colon and underscores", PEAR_PackageFile_Generator_v2_XML_Util_ERROR_INVALID_CHARS );
          }
         // XML name is valid
         return true;
     }
 
    /**
-    * replacement for XML_Util::raiseError
+    * replacement for PEAR_PackageFile_Generator_v2_XML_Util::raiseError
     *
     * Avoids the necessity to always require
     * PEAR.php
@@ -1535,5 +1528,4 @@ class XML_Util {
         return PEAR::raiseError($msg, $code);
     }
 }
-//} // if (!class_exists('XML_Util'))
 ?>
\ No newline at end of file
diff --git a/includes/pear/PEAR/PackageFile/Parser/v1.php b/includes/pear/PEAR/PackageFile/Parser/v1.php
index eea8760b..1134dc60 100644
--- a/includes/pear/PEAR/PackageFile/Parser/v1.php
+++ b/includes/pear/PEAR/PackageFile/Parser/v1.php
@@ -13,9 +13,9 @@
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: v1.php,v 1.20 2005/09/25 03:49:00 cellog Exp $
+ * @version    CVS: $Id: v1.php,v 1.27 2008/01/03 20:55:16 cellog Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 1.4.0a1
  */
@@ -28,7 +28,7 @@ require_once 'PEAR/PackageFile/v1.php';
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  * @version    Release: @PEAR-VER@
  * @link       http://pear.php.net/package/PEAR
@@ -66,14 +66,15 @@ class PEAR_PackageFile_Parser_v1
      * @param string contents of package.xml file, version 1.0
      * @return bool success of parsing
      */
-    function parse($data, $file, $archive = false)
+    function &parse($data, $file, $archive = false)
     {
         if (!extension_loaded('xml')) {
             return PEAR::raiseError('Cannot create xml parser for parsing package.xml, no xml extension');
         }
-        $xp = @xml_parser_create();
+        $xp = xml_parser_create();
         if (!$xp) {
-            return PEAR::raiseError('Cannot create xml parser for parsing package.xml');
+            $a = &PEAR::raiseError('Cannot create xml parser for parsing package.xml');
+            return $a;
         }
         xml_set_object($xp, $this);
         xml_set_element_handler($xp, '_element_start_1_0', '_element_end_1_0');
@@ -96,8 +97,9 @@ class PEAR_PackageFile_Parser_v1
             $code = xml_get_error_code($xp);
             $line = xml_get_current_line_number($xp);
             xml_parser_free($xp);
-            return PEAR::raiseError(sprintf("XML error: %s at line %d",
+            $a = &PEAR::raiseError(sprintf("XML error: %s at line %d",
                            $str = xml_error_string($code), $line), 2);
+            return $a;
         }
 
         xml_parser_free($xp);
@@ -132,6 +134,8 @@ class PEAR_PackageFile_Parser_v1
         foreach (explode("\n", $str) as $line) {
             if (substr($line, 0, $indent_len) == $indent) {
                 $data .= substr($line, $indent_len) . "\n";
+            } elseif (trim(substr($line, 0, $indent_len))) {
+                $data .= ltrim($line);
             }
         }
         return $data;
@@ -167,7 +171,7 @@ class PEAR_PackageFile_Parser_v1
                 if (array_key_exists('name', $attribs) && $attribs['name'] != '/') {
                     $attribs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
                         $attribs['name']);
-                    if (strrpos($attribs['name'], '/') == strlen($attribs['name']) - 1) {
+                    if (strrpos($attribs['name'], '/') === strlen($attribs['name']) - 1) {
                         $attribs['name'] = substr($attribs['name'], 0,
                             strlen($attribs['name']) - 1);
                     }
diff --git a/includes/pear/PEAR/PackageFile/Parser/v2.php b/includes/pear/PEAR/PackageFile/Parser/v2.php
index df905553..7cbc5851 100644
--- a/includes/pear/PEAR/PackageFile/Parser/v2.php
+++ b/includes/pear/PEAR/PackageFile/Parser/v2.php
@@ -13,9 +13,9 @@
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: v2.php,v 1.17 2005/09/25 03:49:00 cellog Exp $
+ * @version    CVS: $Id: v2.php,v 1.21 2008/01/03 20:26:37 cellog Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 1.4.0a1
  */
@@ -29,7 +29,7 @@ require_once 'PEAR/PackageFile/v2.php';
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  * @version    Release: @PEAR-VER@
  * @link       http://pear.php.net/package/PEAR
@@ -70,6 +70,8 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
         foreach (explode("\n", $str) as $line) {
             if (substr($line, 0, $indent_len) == $indent) {
                 $data .= substr($line, $indent_len) . "\n";
+            } else {
+                $data .= $line . "\n";
             }
         }
         return $data;
@@ -97,7 +99,7 @@ class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
      *               a subclass
      * @return PEAR_PackageFile_v2
      */
-    function parse($data, $file, $archive = false, $class = 'PEAR_PackageFile_v2')
+    function &parse($data, $file, $archive = false, $class = 'PEAR_PackageFile_v2')
     {
         if (PEAR::isError($err = parent::parse($data, $file))) {
             return $err;
diff --git a/includes/pear/PEAR/PackageFile/v1.php b/includes/pear/PEAR/PackageFile/v1.php
index 15e8b116..d2895507 100644
--- a/includes/pear/PEAR/PackageFile/v1.php
+++ b/includes/pear/PEAR/PackageFile/v1.php
@@ -13,9 +13,9 @@
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: v1.php,v 1.67 2005/10/27 05:07:24 cellog Exp $
+ * @version    CVS: $Id: v1.php,v 1.74 2008/01/03 20:26:36 cellog Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 1.4.0a1
  */
@@ -279,9 +279,9 @@ define('PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME', 52);
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 1.4.5
+ * @version    Release: 1.7.2
  * @link       http://pear.php.net/package/PEAR
  * @since      Class available since Release 1.4.0a1
  */
@@ -457,6 +457,9 @@ class PEAR_PackageFile_v1
 
     function setDirtree($path)
     {
+        if (!isset($this->_packageInfo['dirtree'])) {
+            $this->_packageInfo['dirtree'] = array();
+        }
         $this->_packageInfo['dirtree'][$path] = true;
     }
 
@@ -858,6 +861,11 @@ class PEAR_PackageFile_v1
         return false;
     }
 
+    function getProvidesExtension()
+    {
+        return false;
+    }
+
     function addFile($dir, $file, $attrs)
     {
         $dir = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), $dir);
@@ -1192,14 +1200,33 @@ class PEAR_PackageFile_v1
                     $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE,
                         array('file' => $file, 'role' => $fa['role'], 'roles' => PEAR_Common::getFileRoles()));
                 }
-                if ($file{0} == '.' && $file{1} == '/') {
+                if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', str_replace('\\', '/', $file))) {
+                    // file contains .. parent directory or . cur directory references
                     $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
                         array('file' => $file));
                 }
+                if (isset($fa['install-as']) &&
+                      preg_match('~/\.\.?(/|\\z)|^\.\.?/~', 
+                                 str_replace('\\', '/', $fa['install-as']))) {
+                    // install-as contains .. parent directory or . cur directory references
+                    $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
+                        array('file' => $file . ' [installed as ' . $fa['install-as'] . ']'));
+                }
+                if (isset($fa['baseinstalldir']) &&
+                      preg_match('~/\.\.?(/|\\z)|^\.\.?/~', 
+                                 str_replace('\\', '/', $fa['baseinstalldir']))) {
+                    // install-as contains .. parent directory or . cur directory references
+                    $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
+                        array('file' => $file . ' [baseinstalldir ' . $fa['baseinstalldir'] . ']'));
+                }
             }
         }
         if (isset($this->_registry) && $this->_isValid) {
             $chan = $this->_registry->getChannel('pear.php.net');
+            if (PEAR::isError($chan)) {
+                $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $chan->getMessage());
+                return $this->_isValid = 0;
+            }
             $validator = $chan->getValidationObject();
             $validator->setPackageFile($this);
             $validator->validate($state);
@@ -1349,13 +1376,8 @@ class PEAR_PackageFile_v1
         if (!$fp = @fopen($file, "r")) {
             return false;
         }
-        if (function_exists('file_get_contents')) {
-            fclose($fp);
-            $contents = file_get_contents($file);
-        } else {
-            $contents = @fread($fp, filesize($file));
-            fclose($fp);
-        }
+        fclose($fp);
+        $contents = file_get_contents($file);
         $tokens = token_get_all($contents);
 /*
         for ($i = 0; $i < sizeof($tokens); $i++) {
diff --git a/includes/pear/PEAR/PackageFile/v2.php b/includes/pear/PEAR/PackageFile/v2.php
index 12e119e8..4638a77f 100644
--- a/includes/pear/PEAR/PackageFile/v2.php
+++ b/includes/pear/PEAR/PackageFile/v2.php
@@ -13,9 +13,9 @@
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: v2.php,v 1.120 2005/11/14 14:06:17 cellog Exp $
+ * @version    CVS: $Id: v2.php,v 1.143 2008/05/13 05:28:51 cellog Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 1.4.0a1
  */
@@ -27,9 +27,9 @@ require_once 'PEAR/ErrorStack.php';
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 1.4.5
+ * @version    Release: 1.7.2
  * @link       http://pear.php.net/package/PEAR
  * @since      Class available since Release 1.4.0a1
  */
@@ -121,12 +121,17 @@ class PEAR_PackageFile_v2
      *
      * - package name
      * - channel name
-     * - dependencies 
+     * - dependencies
      * @var boolean
      * @access private
      */
     var $_incomplete = true;
 
+    /**
+     * @var PEAR_PackageFile_v2_Validator
+     */
+    var $_v2Validator;
+
     /**
      * The constructor merely sets up the private error stack
      */
@@ -186,23 +191,24 @@ class PEAR_PackageFile_v2
             $a = false;
             return $a;
         }
-        if ($this->getPackageType() == 'extsrc') {
+        if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
+            $releasetype = $this->getPackageType() . 'release';
             if (!is_array($installer->getInstallPackages())) {
                 $a = false;
                 return $a;
             }
             foreach ($installer->getInstallPackages() as $p) {
                 if ($p->isExtension($this->_packageInfo['providesextension'])) {
-                    if ($p->getPackageType() != 'extsrc') {
+                    if ($p->getPackageType() != 'extsrc' && $p->getPackageType() != 'zendextsrc') {
                         $a = false;
                         return $a; // the user probably downloaded it separately
                     }
                 }
             }
-            if (isset($this->_packageInfo['extsrcrelease']['binarypackage'])) {
+            if (isset($this->_packageInfo[$releasetype]['binarypackage'])) {
                 $installer->log(0, 'Attempting to download binary version of extension "' .
                     $this->_packageInfo['providesextension'] . '"');
-                $params = $this->_packageInfo['extsrcrelease']['binarypackage'];
+                $params = $this->_packageInfo[$releasetype]['binarypackage'];
                 if (!is_array($params) || !isset($params[0])) {
                     $params = array($params);
                 }
@@ -259,7 +265,8 @@ class PEAR_PackageFile_v2
      */
     function getProvidesExtension()
     {
-        if (in_array($this->getPackageType(), array('extsrc', 'extbin'))) {
+        if (in_array($this->getPackageType(),
+              array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) {
             if (isset($this->_packageInfo['providesextension'])) {
                 return $this->_packageInfo['providesextension'];
             }
@@ -273,7 +280,8 @@ class PEAR_PackageFile_v2
      */
     function isExtension($extension)
     {
-        if (in_array($this->getPackageType(), array('extsrc', 'extbin'))) {
+        if (in_array($this->getPackageType(),
+              array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) {
             return $this->_packageInfo['providesextension'] == $extension;
         }
         return false;
@@ -465,6 +473,9 @@ class PEAR_PackageFile_v2
      */
     function setRawState($state)
     {
+        if (!isset($this->_packageInfo['stability'])) {
+            $this->_packageInfo['stability'] = array();
+        }
         $this->_packageInfo['stability']['release'] = $state;
     }
 
@@ -598,6 +609,10 @@ class PEAR_PackageFile_v2
         $common->debug = $this->_config->get('verbose');
         $this->_scripts = array();
         foreach ($taskfiles as $name => $tasks) {
+            if (!isset($filelist[$name])) {
+                // file was not installed due to installconditions
+                continue;
+            }
             $atts = $filelist[$name];
             foreach ($tasks as $tag => $raw) {
                 $taskname = $this->getTask($tag);
@@ -658,12 +673,17 @@ class PEAR_PackageFile_v2
             if (isset($this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'])) {
                 if (isset($this->_packageInfo['contents']['dir']['file'][0])) {
                     foreach ($this->_packageInfo['contents']['dir']['file'] as $i => $file) {
+                        if (isset($file['attribs']['baseinstalldir'])) {
+                            continue;
+                        }
                         $this->_packageInfo['contents']['dir']['file'][$i]['attribs']['baseinstalldir']
                             = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
                     }
                 } else {
-                    $this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir']
-                        = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
+                    if (!isset($this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir'])) {
+                       $this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir']
+                            = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
+                    }
                 }
             }
         }
@@ -705,7 +725,7 @@ class PEAR_PackageFile_v2
             foreach ($dir['file'] as $file) {
                 $attrs = $file['attribs'];
                 $name = $attrs['name'];
-                if ($baseinstall) {
+                if ($baseinstall && !isset($attrs['baseinstalldir'])) {
                     $attrs['baseinstalldir'] = $baseinstall;
                 }
                 $attrs['name'] = empty($path) ? $name : $path . '/' . $name;
@@ -725,7 +745,7 @@ class PEAR_PackageFile_v2
 
     function setLogger(&$logger)
     {
-        if ($logger && (!is_object($logger) || !method_exists($logger, 'log'))) {
+        if (!is_object($logger) || !method_exists($logger, 'log')) {
             return PEAR::raiseError('Logger must be compatible with PEAR_Common::log');
         }
         $this->_logger = &$logger;
@@ -739,6 +759,14 @@ class PEAR_PackageFile_v2
         $this->_packageInfo['dependencies'] = $deps;
     }
 
+    /**
+     * WARNING - do not use this function directly unless you know what you're doing
+     */
+    function setCompatible($compat)
+    {
+        $this->_packageInfo['compatible'] = $compat;
+    }
+
     function setPackagefile($file, $archive = false)
     {
         $this->_packageFile = $file;
@@ -909,7 +937,7 @@ class PEAR_PackageFile_v2
 
     function getMaintainers($raw = false)
     {
-        if (!$this->_isValid && !$this->validate()) {
+        if (!isset($this->_packageInfo['lead'])) {
             return false;
         }
         if ($raw) {
@@ -1013,8 +1041,8 @@ class PEAR_PackageFile_v2
                 array('time', 'version',
                     'stability', 'license', 'notes', 'contents', 'compatible',
                     'dependencies', 'providesextension', 'srcpackage', 'srcuri',
-                    'phprelease', 'extsrcrelease',
-                    'extbinrelease', 'bundle', 'changelog'), array(), 'date');
+                    'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease',
+                    'zendextbinrelease', 'bundle', 'changelog'), array(), 'date');
         }
         $this->_packageInfo['date'] = $date;
         $this->_isValid = 0;
@@ -1029,8 +1057,8 @@ class PEAR_PackageFile_v2
                     array('version',
                     'stability', 'license', 'notes', 'contents', 'compatible',
                     'dependencies', 'providesextension', 'srcpackage', 'srcuri',
-                    'phprelease', 'extsrcrelease',
-                    'extbinrelease', 'bundle', 'changelog'), $time, 'time');
+                    'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease',
+                    'zendextbinrelease', 'bundle', 'changelog'), $time, 'time');
         }
         $this->_packageInfo['time'] = $time;
     }
@@ -1144,6 +1172,9 @@ class PEAR_PackageFile_v2
         $this->flattenFilelist();
         if ($contents = $this->getContents()) {
             $ret = array();
+            if (!isset($contents['dir'])) {
+                return false;
+            }
             if (!isset($contents['dir']['file'][0])) {
                 $contents['dir']['file'] = array($contents['dir']['file']);
             }
@@ -1169,12 +1200,12 @@ class PEAR_PackageFile_v2
      */
     function getConfigureOptions()
     {
-        if ($this->getPackageType() != 'extsrc') {
+        if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') {
             return false;
         }
         $releases = $this->getReleases();
         if (isset($releases[0])) {
-            $releases = $release[0];
+            $releases = $releases[0];
         }
         if (isset($releases['configureoption'])) {
             if (!isset($releases['configureoption'][0])) {
@@ -1378,6 +1409,9 @@ class PEAR_PackageFile_v2
 
     function setDirtree($path)
     {
+        if (!isset($this->_packageInfo['dirtree'])) {
+            $this->_packageInfo['dirtree'] = array();
+        }
         $this->_packageInfo['dirtree'][$path] = true;
     }
 
@@ -1535,7 +1569,7 @@ class PEAR_PackageFile_v2
                         if (strtolower($dep['name']) == strtolower($package) &&
                               $depchannel == $channel) {
                             return true;
-                        }  
+                        }
                     }
                 }
             }
@@ -1553,7 +1587,7 @@ class PEAR_PackageFile_v2
                             if (strtolower($dep['name']) == strtolower($package) &&
                                   $depchannel == $channel) {
                                 return true;
-                            }  
+                            }
                         }
                     }
                 }
@@ -1613,7 +1647,8 @@ class PEAR_PackageFile_v2
                 );
             foreach (array('required', 'optional') as $type) {
                 $optional = ($type == 'optional') ? 'yes' : 'no';
-                if (!isset($this->_packageInfo['dependencies'][$type])) {
+                if (!isset($this->_packageInfo['dependencies'][$type])
+                    || empty($this->_packageInfo['dependencies'][$type])) {
                     continue;
                 }
                 foreach ($this->_packageInfo['dependencies'][$type] as $dtype => $deps) {
@@ -1648,6 +1683,7 @@ class PEAR_PackageFile_v2
                             if (!isset($dep['min']) &&
                                   !isset($dep['max'])) {
                                 $s['rel'] = 'has';
+                                $s['optional'] = $optional;
                             } elseif (isset($dep['min']) &&
                                   isset($dep['max'])) {
                                 $s['rel'] = 'ge';
@@ -1666,14 +1702,24 @@ class PEAR_PackageFile_v2
                                 $s1['optional'] = $optional;
                                 $ret[] = $s1;
                             } elseif (isset($dep['min'])) {
-                                $s['rel'] = 'ge';
+                                if (isset($dep['exclude']) &&
+                                      $dep['exclude'] == $dep['min']) {
+                                    $s['rel'] = 'gt';
+                                } else {
+                                    $s['rel'] = 'ge';
+                                }
                                 $s['version'] = $dep['min'];
                                 $s['optional'] = $optional;
                                 if ($dtype != 'php') {
                                     $s['name'] = $dep['name'];
                                 }
                             } elseif (isset($dep['max'])) {
-                                $s['rel'] = 'le';
+                                if (isset($dep['exclude']) &&
+                                      $dep['exclude'] == $dep['max']) {
+                                    $s['rel'] = 'lt';
+                                } else {
+                                    $s['rel'] = 'le';
+                                }
                                 $s['version'] = $dep['max'];
                                 $s['optional'] = $optional;
                                 if ($dtype != 'php') {
@@ -1693,7 +1739,7 @@ class PEAR_PackageFile_v2
     }
 
     /**
-     * @return php|extsrc|extbin|bundle|false
+     * @return php|extsrc|extbin|zendextsrc|zendextbin|bundle|false
      */
     function getPackageType()
     {
@@ -1706,6 +1752,12 @@ class PEAR_PackageFile_v2
         if (isset($this->_packageInfo['extbinrelease'])) {
             return 'extbin';
         }
+        if (isset($this->_packageInfo['zendextsrcrelease'])) {
+            return 'zendextsrc';
+        }
+        if (isset($this->_packageInfo['zendextbinrelease'])) {
+            return 'zendextbin';
+        }
         if (isset($this->_packageInfo['bundle'])) {
             return 'bundle';
         }
@@ -1745,6 +1797,12 @@ class PEAR_PackageFile_v2
 
     function getPackagexmlVersion()
     {
+        if (isset($this->_packageInfo['zendextsrcrelease'])) {
+            return '2.1';
+        }
+        if (isset($this->_packageInfo['zendextbinrelease'])) {
+            return '2.1';
+        }
         return '2.0';
     }
 
@@ -1753,7 +1811,8 @@ class PEAR_PackageFile_v2
      */
     function getSourcePackage()
     {
-        if (isset($this->_packageInfo['extbinrelease'])) {
+        if (isset($this->_packageInfo['extbinrelease']) ||
+              isset($this->_packageInfo['zendextbinrelease'])) {
             return array('channel' => $this->_packageInfo['srcchannel'],
                          'package' => $this->_packageInfo['srcpackage']);
         }
@@ -1837,7 +1896,8 @@ class PEAR_PackageFile_v2
 
     function analyzeSourceCode($file, $string = false)
     {
-        if (!isset($this->_v2Validator)) {
+        if (!isset($this->_v2Validator) ||
+              !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) {
             if (!class_exists('PEAR_PackageFile_v2_Validator')) {
                 require_once 'PEAR/PackageFile/v2/Validator.php';
             }
@@ -1851,7 +1911,8 @@ class PEAR_PackageFile_v2
         if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) {
             return false;
         }
-        if (!isset($this->_v2Validator)) {
+        if (!isset($this->_v2Validator) ||
+              !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) {
             if (!class_exists('PEAR_PackageFile_v2_Validator')) {
                 require_once 'PEAR/PackageFile/v2/Validator.php';
             }
@@ -1893,16 +1954,16 @@ class PEAR_PackageFile_v2
         $this->getTasksNs();
         // transform all '-' to '/' and 'tasks:' to '' so tasks:replace becomes replace
         $task = str_replace(array($this->_tasksNs . ':', '-'), array('', ' '), $task);
-        $task = str_replace(' ', '/', ucwords($task));
-        $ps = (strtolower(substr(PHP_OS, 0, 3)) == 'win') ? ';' : ':';
-        foreach (explode($ps, ini_get('include_path')) as $path) {
-            if (file_exists($path . "/PEAR/Task/$task.php")) {
-                include_once "PEAR/Task/$task.php";
-                $task = str_replace('/', '_', $task);
-                if (class_exists("PEAR_Task_$task")) {
-                    return "PEAR_Task_$task";
-                }
-            }
+        $taskfile = str_replace(' ', '/', ucwords($task));
+        $task = str_replace(array(' ', '/'), '_', ucwords($task));
+        if (class_exists("PEAR_Task_$task")) {
+            return "PEAR_Task_$task";
+        }
+        $fp = @fopen("PEAR/Task/$taskfile.php", 'r', true);
+        if ($fp) {
+            fclose($fp);
+            require_once "PEAR/Task/$taskfile.php";
+            return "PEAR_Task_$task";
         }
         return false;
     }
diff --git a/includes/pear/PEAR/PackageFile/v2/Validator.php b/includes/pear/PEAR/PackageFile/v2/Validator.php
index 4db03546..10efbbb6 100644
--- a/includes/pear/PEAR/PackageFile/v2/Validator.php
+++ b/includes/pear/PEAR/PackageFile/v2/Validator.php
@@ -1,27 +1,35 @@
                                  |
-// |                                                                      |
-// +----------------------------------------------------------------------+
-//
-// $Id: Validator.php,v 1.82 2005/10/27 05:07:24 cellog Exp $
+/**
+ * PEAR_PackageFile_v2, package.xml version 2.0, read/write version
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category   pear
+ * @package    PEAR
+ * @author     Greg Beaver 
+ * @copyright  1997-2008 The PHP Group
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    CVS: $Id: Validator.php,v 1.106 2008/03/28 22:23:41 dufuz Exp $
+ * @link       http://pear.php.net/package/PEAR
+ * @since      File available since Release 1.4.0a8
+ */
 /**
  * Private validation class used by PEAR_PackageFile_v2 - do not use directly, its
  * sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller
- * @author Greg Beaver 
+ * @category   pear
+ * @package    PEAR
+ * @author     Greg Beaver 
+ * @copyright  1997-2008 The PHP Group
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: 1.7.2
+ * @link       http://pear.php.net/package/PEAR
+ * @since      Class available since Release 1.4.0a8
  * @access private
  */
 class PEAR_PackageFile_v2_Validator
@@ -42,6 +50,10 @@ class PEAR_PackageFile_v2_Validator
      * @var int
      */
     var $_isValid = 0;
+    /**
+     * @var int
+     */
+    var $_filesValid = 0;
     /**
      * @var int
      */
@@ -66,7 +78,9 @@ class PEAR_PackageFile_v2_Validator
             return false;
         }
         if (!isset($this->_packageInfo['attribs']['version']) ||
-              $this->_packageInfo['attribs']['version'] != '2.0') {
+              ($this->_packageInfo['attribs']['version'] != '2.0' &&
+               $this->_packageInfo['attribs']['version'] != '2.1')
+        ) {
             $this->_noPackageVersion();
         }
         $structure =
@@ -95,10 +109,21 @@ class PEAR_PackageFile_v2_Validator
                          // needs a certain package installed in order to implement a role or task
             '*providesextension',
             '*srcpackage|*srcuri',
-            '+phprelease|+extsrcrelease|+extbinrelease|bundle', //special validation needed
+            '+phprelease|+extsrcrelease|+extbinrelease|' .
+                '+zendextsrcrelease|+zendextbinrelease|bundle', //special validation needed
             '*changelog',
         );
         $test = $this->_packageInfo;
+        if (isset($test['dependencies']) &&
+              isset($test['dependencies']['required']) &&
+              isset($test['dependencies']['required']['pearinstaller']) &&
+              isset($test['dependencies']['required']['pearinstaller']['min']) &&
+              version_compare('1.7.2',
+                $test['dependencies']['required']['pearinstaller']['min'], '<')
+        ) {
+            $this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
+            return false;
+        }
         // ignore post-installation array fields
         if (array_key_exists('filelist', $test)) {
             unset($test['filelist']);
@@ -115,18 +140,13 @@ class PEAR_PackageFile_v2_Validator
         if (array_key_exists('_lastversion', $test)) {
             unset($test['_lastversion']);
         }
-        if (!$this->_stupidSchemaValidate($structure,
-                                          $test, '')) {
+        if (!$this->_stupidSchemaValidate($structure, $test, '')) {
             return false;
         }
         if (empty($this->_packageInfo['name'])) {
             $this->_tagCannotBeEmpty('name');
         }
-        if (isset($this->_packageInfo['uri'])) {
-            $test = 'uri';
-        } else {
-            $test = 'channel';
-        }
+        $test = isset($this->_packageInfo['uri']) ? 'uri' :'channel';
         if (empty($this->_packageInfo[$test])) {
             $this->_tagCannotBeEmpty($test);
         }
@@ -159,6 +179,9 @@ class PEAR_PackageFile_v2_Validator
             $this->_validateCompatible();
         }
         if (!isset($this->_packageInfo['bundle'])) {
+            if (empty($this->_packageInfo['contents'])) {
+                $this->_tagCannotBeEmpty('contents');
+            }
             if (!isset($this->_packageInfo['contents']['dir'])) {
                 $this->_filelistMustContainDir('contents');
                 return false;
@@ -218,11 +241,16 @@ class PEAR_PackageFile_v2_Validator
         if ($fail) {
             return false;
         }
+        $list = $this->_packageInfo['contents'];
+        if (isset($list['dir']) && is_array($list['dir']) && isset($list['dir'][0])) {
+            $this->_multipleToplevelDirNotAllowed();
+            return $this->_isValid = 0;
+        }
         $this->_validateFilelist();
         $this->_validateRelease();
         if (!$this->_stack->hasErrors()) {
             $chan = $this->_pf->_registry->getChannel($this->_pf->getChannel(), true);
-            if (!$chan) {
+            if (PEAR::isError($chan)) {
                 $this->_unknownChannel($this->_pf->getChannel());
             } else {
                 $valpack = $chan->getValidationPackage();
@@ -417,6 +445,7 @@ class PEAR_PackageFile_v2_Validator
     {
         $ret = array();
         if (count($pieces = explode('|', $key)) > 1) {
+            $ret['choices'] = array();
             foreach ($pieces as $piece) {
                 $ret['choices'][] = $this->_processStructure($piece);
             }
@@ -442,21 +471,21 @@ class PEAR_PackageFile_v2_Validator
         $a = $this->_stupidSchemaValidate($structure, $this->_packageInfo['version'], '');
         $a &= $this->_stupidSchemaValidate($structure, $this->_packageInfo['stability'], '');
         if ($a) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $this->_packageInfo['version']['release'])) {
                 $this->_invalidVersion('release', $this->_packageInfo['version']['release']);
             }
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $this->_packageInfo['version']['api'])) {
                 $this->_invalidVersion('api', $this->_packageInfo['version']['api']);
             }
             if (!in_array($this->_packageInfo['stability']['release'],
                   array('snapshot', 'devel', 'alpha', 'beta', 'stable'))) {
-                $this->_invalidState('release', $this->_packageinfo['stability']['release']);
+                $this->_invalidState('release', $this->_packageInfo['stability']['release']);
             }
             if (!in_array($this->_packageInfo['stability']['api'],
                   array('devel', 'alpha', 'beta', 'stable'))) {
-                $this->_invalidState('api', $this->_packageinfo['stability']['api']);
+                $this->_invalidState('api', $this->_packageInfo['stability']['api']);
             }
         }
     }
@@ -495,17 +524,29 @@ class PEAR_PackageFile_v2_Validator
         $type = $installcondition ? '' : '';
         $this->_stupidSchemaValidate($structure, $dep, $type);
         if (isset($dep['min'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
                   $dep['min'])) {
                 $this->_invalidVersion($type . '', $dep['min']);
             }
         }
         if (isset($dep['max'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
                   $dep['max'])) {
                 $this->_invalidVersion($type . '', $dep['max']);
             }
         }
+        if (isset($dep['exclude'])) {
+            if (!is_array($dep['exclude'])) {
+                $dep['exclude'] = array($dep['exclude']);
+            }
+            foreach ($dep['exclude'] as $exclude) {
+                if (!preg_match(
+                     '/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
+                     $exclude)) {
+                    $this->_invalidVersion($type . '', $exclude);
+                }
+            }
+        }
     }
 
     function _validatePearinstallerDep($dep)
@@ -518,21 +559,21 @@ class PEAR_PackageFile_v2_Validator
         );
         $this->_stupidSchemaValidate($structure, $dep, '');
         if (isset($dep['min'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $dep['min'])) {
                 $this->_invalidVersion('',
                     $dep['min']);
             }
         }
         if (isset($dep['max'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $dep['max'])) {
                 $this->_invalidVersion('',
                     $dep['max']);
             }
         }
         if (isset($dep['recommended'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $dep['recommended'])) {
                 $this->_invalidVersion('',
                     $dep['recommended']);
@@ -543,7 +584,7 @@ class PEAR_PackageFile_v2_Validator
                 $dep['exclude'] = array($dep['exclude']);
             }
             foreach ($dep['exclude'] as $exclude) {
-                if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+                if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                       $exclude)) {
                     $this->_invalidVersion('',
                         $exclude);
@@ -605,19 +646,19 @@ class PEAR_PackageFile_v2_Validator
             $this->_DepchannelCannotBeUri('' . $group . $type);
         }
         if (isset($dep['min'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $dep['min'])) {
                 $this->_invalidVersion('' . $group . $type . '', $dep['min']);
             }
         }
         if (isset($dep['max'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $dep['max'])) {
                 $this->_invalidVersion('' . $group . $type . '', $dep['max']);
             }
         }
         if (isset($dep['recommended'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $dep['recommended'])) {
                 $this->_invalidVersion('' . $group . $type . '',
                     $dep['recommended']);
@@ -628,7 +669,7 @@ class PEAR_PackageFile_v2_Validator
                 $dep['exclude'] = array($dep['exclude']);
             }
             foreach ($dep['exclude'] as $exclude) {
-                if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+                if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                       $exclude)) {
                     $this->_invalidVersion('' . $group . $type . '',
                         $exclude);
@@ -641,10 +682,10 @@ class PEAR_PackageFile_v2_Validator
     {
         $this->_validatePackageDep($dep, $group, '');
         if (isset($dep['providesextension'])) {
-            $this->_subpackageCannotProvideExtension(@$dep['name']);
+            $this->_subpackageCannotProvideExtension(isset($dep['name']) ? $dep['name'] : '');
         }
         if (isset($dep['conflicts'])) {
-            $this->_subpackagesCannotConflict(@$dep['name']);
+            $this->_subpackagesCannotConflict(isset($dep['name']) ? $dep['name'] : '');
         }
     }
 
@@ -677,19 +718,19 @@ class PEAR_PackageFile_v2_Validator
         }
         $this->_stupidSchemaValidate($structure, $dep, $type);
         if (isset($dep['min'])) {
-            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+            if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                   $dep['min'])) {
                 $this->_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_stupidSchemaValidate($required, $package, $type);
             if (is_array($package) && array_key_exists('min', $package)) {
-                if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?$/',
+                if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
                       $package['min'])) {
                     $this->_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '' : $unknown;
         } else {
             $dirname = '';
+            if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
+                          str_replace('\\', '/', $list['attribs']['name']))) {
+                // file contains .. parent directory or . cur directory
+                $this->_invalidDirName($list['attribs']['name']);
+            }
         }
         $res = $this->_stupidSchemaValidate($struc, $list, $dirname);
         if ($allowignore && $res) {
+            $ignored_or_installed = array();
             $this->_pf->getFilelist();
             $fcontents = $this->_pf->getContents();
             $filelist = array();
@@ -990,6 +1037,20 @@ class PEAR_PackageFile_v2_Validator
                 foreach ($list['install'] as $file) {
                     if (!isset($filelist[$file['attribs']['name']])) {
                         $this->_notInContents($file['attribs']['name'], 'install');
+                        continue;
+                    }
+                    if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) {
+                        $this->_multipleInstallAs($file['attribs']['name']);
+                    }
+                    if (!isset($ignored_or_installed[$file['attribs']['name']])) {
+                        $ignored_or_installed[$file['attribs']['name']] = array();
+                    }
+                    $ignored_or_installed[$file['attribs']['name']][] = 1;
+                    if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
+                                  str_replace('\\', '/', $file['attribs']['as']))) {
+                        // file contains .. parent directory or . cur directory references
+                        $this->_invalidFileInstallAs($file['attribs']['name'],
+                            $file['attribs']['as']);
                     }
                 }
             }
@@ -1000,22 +1061,36 @@ class PEAR_PackageFile_v2_Validator
                 foreach ($list['ignore'] as $file) {
                     if (!isset($filelist[$file['attribs']['name']])) {
                         $this->_notInContents($file['attribs']['name'], 'ignore');
+                        continue;
+                    }
+                    if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) {
+                        $this->_ignoreAndInstallAs($file['attribs']['name']);
                     }
                 }
             }
         }
         if (!$allowignore && isset($list['file'])) {
+            if (is_string($list['file'])) {
+                $this->_oldStyleFileNotAllowed();
+                return false;
+            }
             if (!isset($list['file'][0])) {
                 // single file
                 $list['file'] = array($list['file']);
             }
             foreach ($list['file'] as $i => $file)
             {
-                if (isset($file['attribs']) && isset($file['attribs']['name']) &&
-                      $file['attribs']['name']{0} == '.' &&
-                        $file['attribs']['name']{1} == '/') {
-                    // name is something like "./doc/whatever.txt"
-                    $this->_invalidFileName($file['attribs']['name']);
+                if (isset($file['attribs']) && isset($file['attribs']['name'])) {
+                    if ($file['attribs']['name']{0} == '.' &&
+                          $file['attribs']['name']{1} == '/') {
+                        // name is something like "./doc/whatever.txt"
+                        $this->_invalidFileName($file['attribs']['name'], $dirname);
+                    }
+                    if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
+                                  str_replace('\\', '/', $file['attribs']['name']))) {
+                        // file contains .. parent directory or . cur directory
+                        $this->_invalidFileName($file['attribs']['name'], $dirname);
+                    }
                 }
                 if (isset($file['attribs']) && isset($file['attribs']['role'])) {
                     if (!$this->_validateRole($file['attribs']['role'])) {
@@ -1064,7 +1139,8 @@ class PEAR_PackageFile_v2_Validator
                                 $ret = call_user_func(array($tagClass, 'validateXml'),
                                     $this->_pf, $v, $this->_pf->_config, $save);
                                 if (is_array($ret)) {
-                                    $this->_invalidTask($task, $ret, @$save['name']);
+                                    $this->_invalidTask($task, $ret, isset($save['name']) ?
+                                        $save['name'] : '');
                                 }
                             }
                         } else {
@@ -1164,64 +1240,68 @@ class PEAR_PackageFile_v2_Validator
                 ), $rel, '');
             }
         }
-        if (isset($this->_packageInfo['extsrcrelease'])) {
-            $release = 'extsrcrelease';
-            if (!isset($this->_packageInfo['providesextension'])) {
-                $this->_mustProvideExtension($release);
-            }
-            if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) {
-                $this->_cannotHaveSrcpackage($release);
-            }
-            $releases = $this->_packageInfo['extsrcrelease'];
-            if (!is_array($releases)) {
-                return true;
-            }
-            if (!isset($releases[0])) {
-                $releases = array($releases);
-            }
-            foreach ($releases as $rel) {
-                $this->_stupidSchemaValidate(array(
-                    '*installconditions',
-                    '*configureoption->name->prompt->?default',
-                    '*binarypackage',
-                    '*filelist',
-                ), $rel, '');
-                if (isset($rel['binarypackage'])) {
-                    if (!is_array($rel['binarypackage']) || !isset($rel['binarypackage'][0])) {
-                        $rel['binarypackage'] = array($rel['binarypackage']);
-                    }
-                    foreach ($rel['binarypackage'] as $bin) {
-                        if (!is_string($bin)) {
-                            $this->_binaryPackageMustBePackagename();
+        foreach (array('', 'zend') as $prefix) {
+            $releasetype = $prefix . 'extsrcrelease';
+            if (isset($this->_packageInfo[$releasetype])) {
+                $release = $releasetype;
+                if (!isset($this->_packageInfo['providesextension'])) {
+                    $this->_mustProvideExtension($release);
+                }
+                if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) {
+                    $this->_cannotHaveSrcpackage($release);
+                }
+                $releases = $this->_packageInfo[$releasetype];
+                if (!is_array($releases)) {
+                    return true;
+                }
+                if (!isset($releases[0])) {
+                    $releases = array($releases);
+                }
+                foreach ($releases as $rel) {
+                    $this->_stupidSchemaValidate(array(
+                        '*installconditions',
+                        '*configureoption->name->prompt->?default',
+                        '*binarypackage',
+                        '*filelist',
+                    ), $rel, '<' . $releasetype . '>');
+                    if (isset($rel['binarypackage'])) {
+                        if (!is_array($rel['binarypackage']) || !isset($rel['binarypackage'][0])) {
+                            $rel['binarypackage'] = array($rel['binarypackage']);
+                        }
+                        foreach ($rel['binarypackage'] as $bin) {
+                            if (!is_string($bin)) {
+                                $this->_binaryPackageMustBePackagename();
+                            }
                         }
                     }
                 }
             }
-        }
-        if (isset($this->_packageInfo['extbinrelease'])) {
-            $release = 'extbinrelease';
-            if (!isset($this->_packageInfo['providesextension'])) {
-                $this->_mustProvideExtension($release);
-            }
-            if (isset($this->_packageInfo['channel']) &&
-                  !isset($this->_packageInfo['srcpackage'])) {
-                $this->_mustSrcPackage($release);
-            }
-            if (isset($this->_packageInfo['uri']) && !isset($this->_packageInfo['srcuri'])) {
-                $this->_mustSrcuri($release);
-            }
-            $releases = $this->_packageInfo['extbinrelease'];
-            if (!is_array($releases)) {
-                return true;
-            }
-            if (!isset($releases[0])) {
-                $releases = array($releases);
-            }
-            foreach ($releases as $rel) {
-                $this->_stupidSchemaValidate(array(
-                    '*installconditions',
-                    '*filelist',
-                ), $rel, '');
+            $releasetype = 'extbinrelease';
+            if (isset($this->_packageInfo[$releasetype])) {
+                $release = $releasetype;
+                if (!isset($this->_packageInfo['providesextension'])) {
+                    $this->_mustProvideExtension($release);
+                }
+                if (isset($this->_packageInfo['channel']) &&
+                      !isset($this->_packageInfo['srcpackage'])) {
+                    $this->_mustSrcPackage($release);
+                }
+                if (isset($this->_packageInfo['uri']) && !isset($this->_packageInfo['srcuri'])) {
+                    $this->_mustSrcuri($release);
+                }
+                $releases = $this->_packageInfo[$releasetype];
+                if (!is_array($releases)) {
+                    return true;
+                }
+                if (!isset($releases[0])) {
+                    $releases = array($releases);
+                }
+                foreach ($releases as $rel) {
+                    $this->_stupidSchemaValidate(array(
+                        '*installconditions',
+                        '*filelist',
+                    ), $rel, '<' . $releasetype . '>');
+                }
             }
         }
         if (isset($this->_packageInfo['bundle'])) {
@@ -1250,7 +1330,7 @@ class PEAR_PackageFile_v2_Validator
             }
             if (is_array($rel) && array_key_exists('filelist', $rel)) {
                 if ($rel['filelist']) {
-                    
+
                     $this->_validateFilelist($rel['filelist'], true);
                 }
             }
@@ -1266,6 +1346,14 @@ class PEAR_PackageFile_v2_Validator
         return in_array($role, PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType()));
     }
 
+    function _pearVersionTooLow($version)
+    {
+        $this->_stack->push(__FUNCTION__, 'error',
+            array('version' => $version),
+            'This package.xml requires PEAR version %version% to parse properly, we are ' .
+            'version 1.7.2');
+    }
+
     function _invalidTagOrder($oktags, $actual, $root)
     {
         $this->_stack->push(__FUNCTION__, 'error',
@@ -1277,7 +1365,7 @@ class PEAR_PackageFile_v2_Validator
     {
         $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
             '<%type%> is not allowed inside global , only inside ' .
-            '/, use  and  only');
+            '//, use  and  only');
     }
 
     function _fileNotAllowed($type)
@@ -1287,6 +1375,13 @@ class PEAR_PackageFile_v2_Validator
             ', use  and  only');
     }
 
+    function _oldStyleFileNotAllowed()
+    {
+        $this->_stack->push(__FUNCTION__, 'error', array(),
+            'Old-style name is not allowed.  Use' .
+            '');
+    }
+
     function _tagMissingAttribute($tag, $attr, $context)
     {
         $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag,
@@ -1319,7 +1414,21 @@ class PEAR_PackageFile_v2_Validator
     {
         $this->_stack->push(__FUNCTION__, 'error', array(
             'file' => $file),
-            'File "%file%" cannot begin with "."');
+            'File "%file%" in directory "%dir%" cannot begin with "./" or contain ".."');
+    }
+
+    function _invalidFileInstallAs($file, $as)
+    {
+        $this->_stack->push(__FUNCTION__, 'error', array(
+            'file' => $file, 'as' => $as),
+            'File "%file%"  cannot contain "./" or contain ".."');
+    }
+
+    function _invalidDirName($dir)
+    {
+        $this->_stack->push(__FUNCTION__, 'error', array(
+            'dir' => $file),
+            'Directory "%dir%" cannot begin with "./" or contain ".."');
     }
 
     function _filelistCannotContainFile($filelist)
@@ -1481,7 +1590,7 @@ class PEAR_PackageFile_v2_Validator
     function _cannotProvideExtension($release)
     {
         $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
-            '<%release%> packages cannot use , only extbinrelease and extsrcrelease can provide a PHP extension');
+            '<%release%> packages cannot use , only extbinrelease, extsrcrelease, zendextsrcrelease, and zendextbinrelease can provide a PHP extension');
     }
 
     function _mustProvideExtension($release)
@@ -1499,13 +1608,13 @@ class PEAR_PackageFile_v2_Validator
     function _mustSrcPackage($release)
     {
         $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
-            ' packages must specify a source code package with ');
+            '/ packages must specify a source code package with ');
     }
 
     function _mustSrcuri($release)
     {
         $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
-            ' packages must specify a source code package with ');
+            '/ packages must specify a source code package with ');
     }
 
     function _uriDepsCannotHaveVersioning($type)
@@ -1539,7 +1648,7 @@ class PEAR_PackageFile_v2_Validator
     {
         $this->_stack->push(__FUNCTION__, 'error', array(),
             ' tags must contain the name of a package that is ' .
-            'a compiled version of this extsrc package');
+            'a compiled version of this extsrc/zendextsrc package');
     }
 
     function _fileNotFound($file)
@@ -1563,13 +1672,13 @@ class PEAR_PackageFile_v2_Validator
     function _usesroletaskMustHaveChannelOrUri($role, $tag)
     {
         $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag),
-            '<%tag%> must contain either , or  and ');
+            '<%tag%> for role "%role%" must contain either , or  and ');
     }
 
     function _usesroletaskMustHavePackage($role, $tag)
     {
         $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag),
-            '<%tag%> must contain ');
+            '<%tag%> for role "%role%" must contain ');
     }
 
     function _usesroletaskMustHaveRoleTask($tag, $type)
@@ -1586,10 +1695,29 @@ class PEAR_PackageFile_v2_Validator
 
     function _invalidDepGroupName($name)
     {
-        $this->_stack->push(__FUNCTION__, 'error', array('group' => $name),
+        $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
             'Invalid dependency group name "%name%"');
     }
 
+    function _multipleToplevelDirNotAllowed()
+    {
+        $this->_stack->push(__FUNCTION__, 'error', array(),
+            'Multiple top-level  tags are not allowed.  Enclose them ' .
+                'in a ');
+    }
+
+    function _multipleInstallAs($file)
+    {
+        $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
+            'Only one  tag is allowed for file "%file%"');
+    }
+
+    function _ignoreAndInstallAs($file)
+    {
+        $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
+            'Cannot have both  and  tags for file "%file%"');
+    }
+
     function _analyzeBundledPackages()
     {
         if (!$this->_isValid) {
@@ -1602,8 +1730,9 @@ class PEAR_PackageFile_v2_Validator
             return false;
         }
         $dir_prefix = dirname($this->_pf->_packageFile);
+        $common = new PEAR_Common;
         $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') :
-            array('PEAR_Common', 'log');
+            array($common, 'log');
         $info = $this->_pf->getContents();
         $info = $info['bundledpackage'];
         if (!is_array($info)) {
@@ -1650,6 +1779,10 @@ class PEAR_PackageFile_v2_Validator
         $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') :
             array(&$common, 'log');
         $info = $this->_pf->getContents();
+        if (!$info || !isset($info['dir']['file'])) {
+            $this->_tagCannotBeEmpty('contents>_stack->push(__FUNCTION__, 'error', array('file' => $file),
+                'Parser error: token_get_all() function must exist to analyze source code, PHP may have been compiled with --disable-tokenizer');
             return false;
         }
         if (!defined('T_DOC_COMMENT')) {
@@ -1726,15 +1861,20 @@ class PEAR_PackageFile_v2_Validator
             if (!$fp = @fopen($file, "r")) {
                 return false;
             }
-            if (function_exists('file_get_contents')) {
-                fclose($fp);
-                $contents = file_get_contents($file);
-            } else {
-                $contents = @fread($fp, filesize($file));
-                fclose($fp);
-            }
+            fclose($fp);
+            $contents = file_get_contents($file);
+        }
+
+        // Silence this function so we can catch PHP Warnings and show our own custom message
+        $tokens = @token_get_all($contents);
+        if (isset($php_errormsg)) {
+            $pn = $this->_pf->getPackage();
+            $this->_stack->push(__FUNCTION__, 'warning',
+                    array('file' => $file, 'package' => $pn),
+                    'in %file%: Could not process file for unkown reasons,' .
+                    ' possibly a PHP parse error in %file% from %package%');
+
         }
-        $tokens = token_get_all($contents);
 /*
         for ($i = 0; $i < sizeof($tokens); $i++) {
             @list($token, $data) = $tokens[$i];
@@ -1831,7 +1971,7 @@ class PEAR_PackageFile_v2_Validator
                     if (version_compare(zend_version(), '2.0', '<')) {
                         if (in_array(strtolower($data),
                             array('public', 'private', 'protected', 'abstract',
-                                  'interface', 'implements', 'throw') 
+                                  'interface', 'implements', 'throw')
                                  )) {
                             $this->_stack->push(__FUNCTION__, 'warning', array(
                                 'file' => $file),
diff --git a/includes/pear/PEAR/PackageFile/v2/rw.php b/includes/pear/PEAR/PackageFile/v2/rw.php
index 5f04868a..383042bd 100644
--- a/includes/pear/PEAR/PackageFile/v2/rw.php
+++ b/includes/pear/PEAR/PackageFile/v2/rw.php
@@ -13,9 +13,9 @@
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: rw.php,v 1.12 2005/09/27 03:34:02 cellog Exp $
+ * @version    CVS: $Id: rw.php,v 1.22 2008/01/18 22:47:49 cellog Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 1.4.0a8
  */
@@ -27,9 +27,9 @@ require_once 'PEAR/PackageFile/v2.php';
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 1.4.5
+ * @version    Release: 1.7.2
  * @link       http://pear.php.net/package/PEAR
  * @since      Class available since Release 1.4.0a8
  */
@@ -41,12 +41,14 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
      */
     function setProvidesExtension($extension)
     {
-        if (in_array($this->getPackageType(), array('extsrc', 'extbin'))) {
+        if (in_array($this->getPackageType(),
+              array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) {
             if (!isset($this->_packageInfo['providesextension'])) {
                 // ensure that the channel tag is set up in the right location
                 $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
                     array('usesrole', 'usestask', 'srcpackage', 'srcuri', 'phprelease',
-                    'extsrcrelease', 'extbinrelease', 'bundle', 'changelog'),
+                    'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
+                    'bundle', 'changelog'),
                     $extension, 'providesextension');
             }
             $this->_packageInfo['providesextension'] = $extension;
@@ -77,6 +79,29 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_packageInfo['name'] = $package;
     }
 
+    /**
+     * set this as a package.xml version 2.1
+     * @access private
+     */
+    function _setPackageVersion2_1()
+    {
+        $info = array(
+                                 'version' => '2.1',
+                                 'xmlns' => 'http://pear.php.net/dtd/package-2.1',
+                                 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0',
+                                 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
+                                 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0
+    http://pear.php.net/dtd/tasks-1.0.xsd
+    http://pear.php.net/dtd/package-2.1
+    http://pear.php.net/dtd/package-2.1.xsd',
+                             );
+        if (!isset($this->_packageInfo['attribs'])) {
+            $this->_packageInfo = array_merge(array('attribs' => $info), $this->_packageInfo);
+        } else {
+            $this->_packageInfo['attribs'] = $info;
+        }
+    }
+
     function setUri($uri)
     {
         unset($this->_packageInfo['channel']);
@@ -88,7 +113,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                 'developer', 'contributor', 'helper', 'date', 'time', 'version',
                 'stability', 'license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'), $uri, 'uri');
         }
         $this->_packageInfo['uri'] = $uri;
@@ -105,7 +130,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                 'developer', 'contributor', 'helper', 'date', 'time', 'version',
                 'stability', 'license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'), $channel, 'channel');
         }
         $this->_packageInfo['channel'] = $channel;
@@ -121,7 +146,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                 'developer', 'contributor', 'helper', 'date', 'time', 'version',
                 'stability', 'license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'), $extends, 'extends');
         }
         $this->_packageInfo['extends'] = $extends;
@@ -137,7 +162,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                 'developer', 'contributor', 'helper', 'date', 'time', 'version',
                 'stability', 'license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'), $summary, 'summary');
         }
         $this->_packageInfo['summary'] = $summary;
@@ -153,7 +178,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                 'developer', 'contributor', 'helper', 'date', 'time', 'version',
                 'stability', 'license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'), $desc, 'description');
         }
         $this->_packageInfo['description'] = $desc;
@@ -185,7 +210,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                     'stability', 'license', 'notes', 'contents', 'compatible',
                     'dependencies', 'providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease',
-                    'extbinrelease', 'bundle', 'changelog');
+                    'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog');
             foreach (array('lead', 'developer', 'contributor', 'helper') as $testrole) {
                 array_shift($testarr);
                 if ($role == $testrole) {
@@ -240,7 +265,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                 $this->_packageInfo[$role] = array_values($this->_packageInfo[$role]);
             }
         }
-        $this->addMaintainer($newrole, $handle, $name, $email);
+        $this->addMaintainer($newrole, $handle, $name, $email, $active);
         $this->_isValid = 0;
     }
 
@@ -292,7 +317,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $version, array(
             'version' => array('stability', 'license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'),
             'release' => array('api')));
         $this->_isValid = 0;
@@ -307,7 +332,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $version, array(
             'version' => array('stability', 'license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'),
             'api' => array()));
         $this->_isValid = 0;
@@ -325,7 +350,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $state, array(
             'stability' => array('license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'),
             'release' => array('api')));
         $this->_isValid = 0;
@@ -343,7 +368,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $state, array(
             'stability' => array('license', 'notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'),
             'api' => array()));
         $this->_isValid = 0;
@@ -356,7 +381,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
                 array('notes', 'contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'), 0, 'license');
         }
         if ($uri || $filesource) {
@@ -382,7 +407,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
                 array('contents', 'compatible',
                 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
-                'phprelease', 'extsrcrelease',
+                'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
                 'extbinrelease', 'bundle', 'changelog'), $notes, 'notes');
         }
         $this->_packageInfo['notes'] = $notes;
@@ -429,7 +454,8 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                 array('compatible',
                     'dependencies', 'providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease',
-                    'extbinrelease', 'bundle', 'changelog'), array(), 'contents');
+                    'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
+                    'bundle', 'changelog'), array(), 'contents');
         }
         if ($this->getPackageType() != 'bundle') {
             $this->_packageInfo['contents'] = 
@@ -437,6 +463,8 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             if ($baseinstall) {
                 $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'] = $baseinstall;
             }
+        } else {
+            $this->_packageInfo['contents'] = array('bundledpackage' => array());
         }
     }
 
@@ -453,7 +481,8 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $path, array(
                 'contents' => array('compatible', 'dependencies', 'providesextension',
                 'usesrole', 'usestask', 'srcpackage', 'srcuri', 'phprelease',
-                'extsrcrelease', 'extbinrelease', 'bundle', 'changelog'),
+                'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
+                'bundle', 'changelog'),
                 'bundledpackage' => array()));
     }
 
@@ -546,7 +575,8 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
                 array('compatible', 'dependencies', 'providesextension', 'usesrole', 'usestask',
                 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease',
-                'extbinrelease', 'bundle', 'changelog'), array(), 'contents');
+                'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
+                'bundle', 'changelog'), array(), 'contents');
         }
         if (isset($this->_packageInfo['contents']['dir']['file'])) {
             if (!isset($this->_packageInfo['contents']['dir']['file'][0])) {
@@ -584,7 +614,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array(
                 'compatible' => array('dependencies', 'providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog')
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog')
             ));
     }
 
@@ -614,7 +644,8 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_isValid = 0;
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array(
                 'usesrole' => array('usestask', 'srcpackage', 'srcuri',
-                    'phprelease', 'extsrcrelease', 'extbinrelease', 'bundle', 'changelog')
+                    'phprelease', 'extsrcrelease', 'extbinrelease',
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog')
             ));
     }
 
@@ -645,7 +676,8 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         $this->_isValid = 0;
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array(
                 'usestask' => array('srcpackage', 'srcuri',
-                    'phprelease', 'extsrcrelease', 'extbinrelease', 'bundle', 'changelog')
+                    'phprelease', 'extsrcrelease', 'extbinrelease',
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog')
             ));
     }
 
@@ -667,7 +699,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                 array(
                     'dependencies' => array('providesextension', 'usesrole', 'usestask',
                         'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                        'bundle', 'changelog')));
+                        'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog')));
         }
         $this->_packageInfo['dependencies'] = array();
     }
@@ -703,7 +735,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 'required' => array('optional', 'group'),
                 'php' => array('pearinstaller', 'package', 'subpackage', 'extension', 'os', 'arch')
             ));
@@ -745,7 +777,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 'required' => array('optional', 'group'),
                 'pearinstaller' => array('package', 'subpackage', 'extension', 'os', 'arch')
             ));
@@ -756,24 +788,21 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
      * @param string package name
      * @param string package channel
      * @param string extension this package provides, if any
+     * @param string|false minimum version required
+     * @param string|false maximum version allowed
+     * @param array|false versions to exclude from installation
      */
-    function addConflictingPackageDepWithChannel($name, $channel, $providesextension = false)
+    function addConflictingPackageDepWithChannel($name, $channel,
+                $providesextension = false, $min = false, $max = false, $exclude = false)
     {
         $this->_isValid = 0;
-        $dep =
-            array(
-                'name' => $name,
-                'channel' => $channel,
-                'conflicts' => '',
-            );
-        if ($providesextension) {
-            $dep['providesextension'] = $providesextension;
-        }
+        $dep = $this->_constructDep($name, $channel, false, $min, $max, false,
+            $exclude, $providesextension, false, true);
         $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 'required' => array('optional', 'group'),
                 'package' => array('subpackage', 'extension', 'os', 'arch')
             ));
@@ -801,7 +830,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 'required' => array('optional', 'group'),
                 'package' => array('subpackage', 'extension', 'os', 'arch')
             ));
@@ -815,7 +844,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 'group' => array(),
             ));
     }
@@ -831,11 +860,13 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
      * @param string extension this package provides, if any
      * @param bool if true, tells the installer to ignore the default optional dependency group
      *             when installing this package
+     * @param bool if true, tells the installer to negate this dependency (conflicts)
      * @return array
      * @access private
      */
     function _constructDep($name, $channel, $uri, $min, $max, $recommended, $exclude,
-                           $providesextension = false, $nodefault = false)
+                           $providesextension = false, $nodefault = false,
+                           $conflicts = false)
     {
         $dep =
             array(
@@ -861,6 +892,9 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             }
             $dep['exclude'] = $exclude;
         }
+        if ($conflicts) {
+            $dep['conflicts'] = '';
+        }
         if ($nodefault) {
             $dep['nodefault'] = '';
         }
@@ -1000,6 +1034,9 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
                                       $recommended = false, $exclude = false,
                                       $providesextension = false, $nodefault = false)
     {
+        if (!in_array($type, array('optional', 'required'), true)) {
+            $type = 'required';
+        }
         $this->_isValid = 0;
         $arr = array('optional', 'group');
         if ($type != 'required') {
@@ -1011,7 +1048,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 $type => $arr,
                 'package' => array('subpackage', 'extension', 'os', 'arch')
             ));
@@ -1039,7 +1076,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 $type => $arr,
                 'package' => array('subpackage', 'extension', 'os', 'arch')
             ));
@@ -1071,7 +1108,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 $type => $arr,
                 'subpackage' => array('extension', 'os', 'arch')
             ));
@@ -1096,7 +1133,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 $type => $arr,
                 'subpackage' => array('extension', 'os', 'arch')
             ));
@@ -1123,7 +1160,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 $type => $arr,
                 'extension' => array('os', 'arch')
             ));
@@ -1144,7 +1181,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 'required' => array('optional', 'group'),
                 'os' => array('arch')
             ));
@@ -1165,7 +1202,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             array(
                 'dependencies' => array('providesextension', 'usesrole', 'usestask',
                     'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
-                    'bundle', 'changelog'),
+                    'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
                 'required' => array('optional', 'group'),
                 'arch' => array()
             ));
@@ -1177,20 +1214,27 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
      * - a php package is a PEAR-style package
      * - an extbin package is a PECL-style extension binary
      * - an extsrc package is a PECL-style source for a binary
+     * - an zendextbin package is a PECL-style zend extension binary
+     * - an zendextsrc package is a PECL-style source for a zend extension binary
      * - a bundle package is a collection of other pre-packaged packages
-     * @param php|extbin|extsrc|bundle
+     * @param php|extbin|extsrc|zendextsrc|zendextbin|bundle
      * @return bool success
      */
     function setPackageType($type)
     {
         $this->_isValid = 0;
-        if (!in_array($type, array('php', 'extbin', 'extsrc', 'bundle'))) {
+        if (!in_array($type, array('php', 'extbin', 'extsrc', 'zendextsrc',
+                                   'zendextbin', 'bundle'))) {
             return false;
         }
+        if (in_array($type, array('zendextsrc', 'zendextbin'))) {
+            $this->_setPackageVersion2_1();
+        }
         if ($type != 'bundle') {
             $type .= 'release';
         }
-        foreach (array('phprelease', 'extbinrelease', 'extsrcrelease', 'bundle') as $test) {
+        foreach (array('phprelease', 'extbinrelease', 'extsrcrelease',
+                       'zendextsrcrelease', 'zendextbinrelease', 'bundle') as $test) {
             unset($this->_packageInfo[$test]);
         }
         if (!isset($this->_packageInfo[$type])) {
@@ -1227,7 +1271,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
     {
         if ($p = $this->getPackageType()) {
             if ($strict) {
-                if ($p == 'extsrc') {
+                if ($p == 'extsrc' || $p == 'zendextsrc') {
                     $a = null;
                     return $a;
                 }
@@ -1292,7 +1336,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
      */
     function addBinarypackage($package)
     {
-        if ($this->getPackageType() != 'extsrc') {
+        if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') {
             return false;
         }
         $r = &$this->_getCurrentRelease(false);
@@ -1314,7 +1358,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
      */
     function addConfigureOption($name, $prompt, $default = null)
     {
-        if ($this->getPackageType() != 'extsrc') {
+        if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') {
             return false;
         }
         $r = &$this->_getCurrentRelease(false);
@@ -1323,7 +1367,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         }
         $opt = array('attribs' => array('name' => $name, 'prompt' => $prompt));
         if ($default !== null) {
-            $opt['default'] = $default;
+            $opt['attribs']['default'] = $default;
         }
         $this->_isValid = 0;
         $r = $this->_mergeTag($r, $opt,
@@ -1355,7 +1399,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             }
             $dep['exclude'] = $exclude;
         }
-        if ($this->getPackageType() == 'extsrc') {
+        if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
             $r = $this->_mergeTag($r, $dep,
                 array(
                     'installconditions' => array('configureoption', 'binarypackage',
@@ -1388,7 +1432,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         }
         $this->_isValid = 0;
         $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude);
-        if ($this->getPackageType() == 'extsrc') {
+        if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
             $r = $this->_mergeTag($r, $dep,
                 array(
                     'installconditions' => array('configureoption', 'binarypackage',
@@ -1423,7 +1467,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         if ($conflicts) {
             $dep['conflicts'] = '';
         }
-        if ($this->getPackageType() == 'extsrc') {
+        if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
             $r = $this->_mergeTag($r, $dep,
                 array(
                     'installconditions' => array('configureoption', 'binarypackage',
@@ -1458,7 +1502,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
         if ($conflicts) {
             $dep['conflicts'] = '';
         }
-        if ($this->getPackageType() == 'extsrc') {
+        if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
             $r = $this->_mergeTag($r, $dep,
                 array(
                     'installconditions' => array('configureoption', 'binarypackage',
@@ -1476,20 +1520,22 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
 
     /**
      * For extension binary releases, this is used to specify either the
-     * static URI to a source package, or the package name and channel of the extsrc
+     * static URI to a source package, or the package name and channel of the extsrc/zendextsrc
      * package it is based on.
-     * @param string Package name, or full URI to source package (extsrc type)
+     * @param string Package name, or full URI to source package (extsrc/zendextsrc type)
      */
     function setSourcePackage($packageOrUri)
     {
         $this->_isValid = 0;
         if (isset($this->_packageInfo['channel'])) {
             $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('phprelease',
-                'extsrcrelease', 'extbinrelease', 'bundle', 'changelog'),
+                'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
+                'bundle', 'changelog'),
                 $packageOrUri, 'srcpackage');
         } else {
             $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('phprelease',
-                'extsrcrelease', 'extbinrelease', 'bundle', 'changelog'), $packageOrUri, 'srcuri');
+                'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
+                'bundle', 'changelog'), $packageOrUri, 'srcuri');
         }
     }
 
@@ -1508,7 +1554,7 @@ class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
             'stability' =>
                 $this->getStability(),
             'date' => $this->getDate(),
-            'license' => $this->getLicense(),
+            'license' => $this->getLicense(true),
             'notes' => $notes ? $notes : $this->getNotes()
             );
     }
diff --git a/includes/pear/PEAR/Packager.php b/includes/pear/PEAR/Packager.php
index 3b4a50f4..bae92823 100644
--- a/includes/pear/PEAR/Packager.php
+++ b/includes/pear/PEAR/Packager.php
@@ -15,9 +15,9 @@
  * @author     Stig Bakken 
  * @author     Tomas V. V. Cox 
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: Packager.php,v 1.67 2005/08/14 06:49:19 cellog Exp $
+ * @version    CVS: $Id: Packager.php,v 1.71 2008/01/03 20:26:36 cellog Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 0.1
  */
@@ -35,9 +35,9 @@ require_once 'System.php';
  * @category   pear
  * @package    PEAR
  * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
+ * @copyright  1997-2008 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 1.4.5
+ * @version    Release: 1.7.2
  * @link       http://pear.php.net/package/PEAR
  * @since      Class available since Release 0.1
  */
@@ -93,14 +93,16 @@ class PEAR_Packager extends PEAR_Common
                     $this->log(1, 'Warning: ' . $warning['message']);
                 }
             }
-            if ($pf2->getPackagexmlVersion() == '2.0') {
+            if ($pf2->getPackagexmlVersion() == '2.0' ||
+                  $pf2->getPackagexmlVersion() == '2.1') {
                 $main = &$pf2;
                 $other = &$pf;
             } else {
                 $main = &$pf;
                 $other = &$pf2;
             }
-            if ($main->getPackagexmlVersion() != '2.0') {
+            if ($main->getPackagexmlVersion() != '2.0' &&
+                  $main->getPackagexmlVersion() != '2.1') {
                 return PEAR::raiseError('Error: cannot package two package.xml version 1.0, can ' .
                     'only package together a package.xml 1.0 and package.xml 2.0');
             }
@@ -187,13 +189,8 @@ if (!function_exists('md5_file')) {
         if (!$fd = @fopen($file, 'r')) {
             return false;
         }
-        if (function_exists('file_get_contents')) {
-            fclose($fd);
-            $md5 = md5(file_get_contents($file));
-        } else {
-            $md5 = md5(fread($fd, filesize($file)));
-            fclose($fd);
-        }
+        fclose($fd);
+        $md5 = md5(file_get_contents($file));
         return $md5;
     }
 }
diff --git a/includes/pear/PEAR/REST.php b/includes/pear/PEAR/REST.php
index 30052daa..c32946c6 100644
--- a/includes/pear/PEAR/REST.php
+++ b/includes/pear/PEAR/REST.php
@@ -1,380 +1,397 @@
-
- * @copyright  1997-2005 The PHP Group
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: REST.php,v 1.15 2005/09/24 04:15:13 cellog Exp $
- * @link       http://pear.php.net/package/PEAR
- * @since      File available since Release 1.4.0a1
- */
-
-/**
- * For downloading xml files
- */
-require_once 'PEAR.php';
-require_once 'PEAR/XMLParser.php';
-
-/**
- * Intelligently retrieve data, following hyperlinks if necessary, and re-directing
- * as well
- * @category   pear
- * @package    PEAR
- * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 1.4.5
- * @link       http://pear.php.net/package/PEAR
- * @since      Class available since Release 1.4.0a1
- */
-class PEAR_REST
-{
-    var $config;
-    var $_options;
-    function PEAR_REST(&$config, $options = array())
-    {
-        $this->config = &$config;
-        $this->_options = $options;
-    }
-
-    /**
-     * Retrieve REST data, but always retrieve the local cache if it is available.
-     *
-     * This is useful for elements that should never change, such as information on a particular
-     * release
-     * @param string full URL to this resource
-     * @param array|false contents of the accept-encoding header
-     * @param boolean     if true, xml will be returned as a string, otherwise, xml will be
-     *                    parsed using PEAR_XMLParser
-     * @return string|array
-     */
-    function retrieveCacheFirst($url, $accept = false, $forcestring = false)
-    {
-        $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
-            md5($url) . 'rest.cachefile';
-        if (@file_exists($cachefile)) {
-            return unserialize(implode('', file($cachefile)));
-        }
-        return $this->retrieveData($url, $accept, $forcestring);
-    }
-
-    /**
-     * Retrieve a remote REST resource
-     * @param string full URL to this resource
-     * @param array|false contents of the accept-encoding header
-     * @param boolean     if true, xml will be returned as a string, otherwise, xml will be
-     *                    parsed using PEAR_XMLParser
-     * @return string|array
-     */
-    function retrieveData($url, $accept = false, $forcestring = false)
-    {
-        $cacheId = $this->getCacheId($url);
-        if ($ret = $this->useLocalCache($url, $cacheId)) {
-            return $ret;
-        }
-        if (!isset($this->_options['offline'])) {
-            $trieddownload = true;
-            $file = $this->downloadHttp($url, $cacheId ? $cacheId['lastChange'] : false, $accept);
-        } else {
-            $trieddownload = false;
-            $file = false;
-        }
-        if (PEAR::isError($file)) {
-            if ($file->getCode() == -9276) {
-                $trieddownload = false;
-                $file = false; // use local copy if available on socket connect error
-            } else {
-                return $file;
-            }
-        }
-        if (!$file) {
-            $ret = $this->getCache($url);
-            if (!PEAR::isError($ret) && $trieddownload) {
-                // reset the age of the cache if the server says it was unmodified
-                $this->saveCache($url, $ret, null, true, $cacheId);
-            }
-            return $ret;
-        }
-        $headers = $file[2];
-        $lastmodified = $file[1];
-        $content = $file[0];
-        if ($forcestring) {
-            $this->saveCache($url, $content, $lastmodified, false, $cacheId);
-            return $content;
-        }
-        if (isset($headers['content-type'])) {
-            switch ($headers['content-type']) {
-                case 'text/xml' :
-                case 'application/xml' :
-                    $parser = new PEAR_XMLParser;
-                    PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
-                    $err = $parser->parse($content);
-                    PEAR::popErrorHandling();
-                    if (PEAR::isError($err)) {
-                        return PEAR::raiseError('Invalid xml downloaded from "' . $url . '": ' .
-                            $err->getMessage());
-                    }
-                    $content = $parser->getData();
-                case 'text/html' :
-                default :
-                    // use it as a string
-            }
-        } else {
-            // assume XML
-            $parser = new PEAR_XMLParser;
-            $parser->parse($file);
-            $content = $parser->getData();
-        }
-        $this->saveCache($url, $content, $lastmodified, false, $cacheId);
-        return $content;
-    }
-
-    function useLocalCache($url, $cacheid = null)
-    {
-        if ($cacheid === null) {
-            $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
-                md5($url) . 'rest.cacheid';
-            if (@file_exists($cacheidfile)) {
-                $cacheid = unserialize(implode('', file($cacheidfile)));
-            } else {
-                return false;
-            }
-        }
-        $cachettl = $this->config->get('cache_ttl');
-        // If cache is newer than $cachettl seconds, we use the cache!
-        if (time() - $cacheid['age'] < $cachettl) {
-            return $this->getCache($url);
-        }
-        return false;
-    }
-
-    function getCacheId($url)
-    {
-        $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
-            md5($url) . 'rest.cacheid';
-        if (@file_exists($cacheidfile)) {
-            $ret = unserialize(implode('', file($cacheidfile)));
-            return $ret;
-        } else {
-            return false;
-        }
-    }
-
-    function getCache($url)
-    {
-        $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
-            md5($url) . 'rest.cachefile';
-        if (@file_exists($cachefile)) {
-            return unserialize(implode('', file($cachefile)));
-        } else {
-            return PEAR::raiseError('No cached content available for "' . $url . '"');
-        }
-    }
-
-    /**
-     * @param string full URL to REST resource
-     * @param string original contents of the REST resource
-     * @param array  HTTP Last-Modified and ETag headers
-     * @param bool   if true, then the cache id file should be regenerated to
-     *               trigger a new time-to-live value
-     */
-    function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null)
-    {
-        $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
-            md5($url) . 'rest.cacheid';
-        $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
-            md5($url) . 'rest.cachefile';
-        if ($cacheid === null && $nochange) {
-            $cacheid = unserialize(implode('', file($cacheidfile)));
-        }
-        $fp = @fopen($cacheidfile, 'wb');
-        if (!$fp) {
-            return false;
-        }
-        if ($nochange) {
-            fwrite($fp, serialize(array(
-                'age'        => time(),
-                'lastChange' => $cacheid['lastChange'],
-                )));
-            fclose($fp);
-            return true;
-        } else {
-            fwrite($fp, serialize(array(
-                'age'        => time(),
-                'lastChange' => $lastmodified,
-                )));
-        }
-        fclose($fp);
-        $fp = @fopen($cachefile, 'wb');
-        if (!$fp) {
-            @unlink($cacheidfile);
-            return false;
-        }
-        fwrite($fp, serialize($contents));
-        fclose($fp);
-        return true;
-    }
-
-    /**
-     * Efficiently Download a file through HTTP.  Returns downloaded file as a string in-memory
-     * This is best used for small files
-     *
-     * If an HTTP proxy has been configured (http_proxy PEAR_Config
-     * setting), the proxy will be used.
-     *
-     * @param string  $url       the URL to download
-     * @param string  $save_dir  directory to save file in
-     * @param false|string|array $lastmodified header values to check against for caching
-     *                           use false to return the header values from this download
-     * @param false|array $accept Accept headers to send
-     * @return string|array  Returns the contents of the downloaded file or a PEAR
-     *                       error on failure.  If the error is caused by
-     *                       socket-related errors, the error object will
-     *                       have the fsockopen error code available through
-     *                       getCode().  If caching is requested, then return the header
-     *                       values.
-     *
-     * @access public
-     */
-    function downloadHttp($url, $lastmodified = null, $accept = false)
-    {
-        $info = parse_url($url);
-        if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) {
-            return PEAR::raiseError('Cannot download non-http URL "' . $url . '"');
-        }
-        if (!isset($info['host'])) {
-            return PEAR::raiseError('Cannot download from non-URL "' . $url . '"');
-        } else {
-            $host = $info['host'];
-            if (!array_key_exists('port', $info)) {
-                $info['port'] = null;
-            }
-            if (!array_key_exists('path', $info)) {
-                $info['path'] = null;
-            }
-            $port = $info['port'];
-            $path = $info['path'];
-        }
-        $proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
-        if ($this->config->get('http_proxy')&& 
-              $proxy = parse_url($this->config->get('http_proxy'))) {
-            $proxy_host = @$proxy['host'];
-            if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') {
-                $proxy_host = 'ssl://' . $proxy_host;
-            }
-            $proxy_port = @$proxy['port'];
-            $proxy_user = @$proxy['user'];
-            $proxy_pass = @$proxy['pass'];
-
-            if ($proxy_port == '') {
-                $proxy_port = 8080;
-            }
-        }
-        if (empty($port)) {
-            if (isset($info['scheme']) && $info['scheme'] == 'https') {
-                $port = 443;
-            } else {
-                $port = 80;
-            }
-        }
-        If (isset($proxy['host'])) {
-            $request = "GET $url HTTP/1.1\r\n";
-        } else {
-            $request = "GET $path HTTP/1.1\r\n";
-        }
-
-        $ifmodifiedsince = '';
-        if (is_array($lastmodified)) {
-            if (isset($lastmodified['Last-Modified'])) {
-                $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n";
-            }
-            if (isset($lastmodified['ETag'])) {
-                $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n";
-            }
-        } else {
-            $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
-        }
-        $request .= "Host: $host:$port\r\n" . $ifmodifiedsince .
-            "User-Agent: PEAR/1.4.5/PHP/" . PHP_VERSION . "\r\n";
-        $username = $this->config->get('username');
-        $password = $this->config->get('password');
-        if ($username && $password) {
-            $tmp = base64_encode("$username:$password");
-            $request .= "Authorization: Basic $tmp\r\n";
-        }
-        if ($proxy_host != '' && $proxy_user != '') {
-            $request .= 'Proxy-Authorization: Basic ' .
-                base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n";
-        }
-        if ($accept) {
-            $request .= 'Accept: ' . implode(', ', $accept) . "\r\n";
-        }
-        $request .= "Connection: close\r\n";
-        $request .= "\r\n";
-        if ($proxy_host != '') {
-            $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr, 15);
-            if (!$fp) {
-                return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr",
-                    -9276);
-            }
-        } else {
-            if (isset($info['scheme']) && $info['scheme'] == 'https') {
-                $host = 'ssl://' . $host;
-            }
-            $fp = @fsockopen($host, $port, $errno, $errstr);
-            if (!$fp) {
-                return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno);
-            }
-        }
-        fwrite($fp, $request);
-        $headers = array();
-        while (trim($line = fgets($fp, 1024))) {
-            if (preg_match('/^([^:]+):\s+(.*)\s*$/', $line, $matches)) {
-                $headers[strtolower($matches[1])] = trim($matches[2]);
-            } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) {
-                if ($matches[1] == 304 && ($lastmodified || ($lastmodified === false))) {
-                    return false;
-                }
-                if ($matches[1] != 200) {
-                    return PEAR::raiseError("File http://$host:$port$path not valid (received: $line)");
-                }
-            }
-        }
-        if (isset($headers['content-length'])) {
-            $length = $headers['content-length'];
-        } else {
-            $length = -1;
-        }
-        $data = '';
-        while ($chunk = @fread($fp, 8192)) {
-            $data .= $chunk;
-        }
-        fclose($fp);
-        if ($lastmodified === false || $lastmodified) {
-            if (isset($headers['etag'])) {
-                $lastmodified = array('ETag' => $headers['etag']);
-            }
-            if (isset($headers['last-modified'])) {
-                if (is_array($lastmodified)) {
-                    $lastmodified['Last-Modified'] = $headers['last-modified'];
-                } else {
-                    $lastmodified = $headers['last-modified'];
-                }
-            }
-            return array($data, $lastmodified, $headers);
-        }
-        return $data;
-    }
-}
-?>
\ No newline at end of file
+
+ * @copyright  1997-2008 The PHP Group
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    CVS: $Id: REST.php,v 1.31 2008/05/13 18:03:36 cellog Exp $
+ * @link       http://pear.php.net/package/PEAR
+ * @since      File available since Release 1.4.0a1
+ */
+
+/**
+ * For downloading xml files
+ */
+require_once 'PEAR.php';
+require_once 'PEAR/XMLParser.php';
+
+/**
+ * Intelligently retrieve data, following hyperlinks if necessary, and re-directing
+ * as well
+ * @category   pear
+ * @package    PEAR
+ * @author     Greg Beaver 
+ * @copyright  1997-2008 The PHP Group
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: 1.7.2
+ * @link       http://pear.php.net/package/PEAR
+ * @since      Class available since Release 1.4.0a1
+ */
+class PEAR_REST
+{
+    var $config;
+    var $_options;
+    function PEAR_REST(&$config, $options = array())
+    {
+        $this->config = &$config;
+        $this->_options = $options;
+    }
+
+    /**
+     * Retrieve REST data, but always retrieve the local cache if it is available.
+     *
+     * This is useful for elements that should never change, such as information on a particular
+     * release
+     * @param string full URL to this resource
+     * @param array|false contents of the accept-encoding header
+     * @param boolean     if true, xml will be returned as a string, otherwise, xml will be
+     *                    parsed using PEAR_XMLParser
+     * @return string|array
+     */
+    function retrieveCacheFirst($url, $accept = false, $forcestring = false, $channel = false)
+    {
+        $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
+            md5($url) . 'rest.cachefile';
+        if (file_exists($cachefile)) {
+            return unserialize(implode('', file($cachefile)));
+        }
+        return $this->retrieveData($url, $accept, $forcestring, $channel);
+    }
+
+    /**
+     * Retrieve a remote REST resource
+     * @param string full URL to this resource
+     * @param array|false contents of the accept-encoding header
+     * @param boolean     if true, xml will be returned as a string, otherwise, xml will be
+     *                    parsed using PEAR_XMLParser
+     * @return string|array
+     */
+    function retrieveData($url, $accept = false, $forcestring = false, $channel = false)
+    {
+        $cacheId = $this->getCacheId($url);
+        if ($ret = $this->useLocalCache($url, $cacheId)) {
+            return $ret;
+        }
+        if (!isset($this->_options['offline'])) {
+            $trieddownload = true;
+            $file = $this->downloadHttp($url, $cacheId ? $cacheId['lastChange'] : false, $accept, $channel);
+        } else {
+            $trieddownload = false;
+            $file = false;
+        }
+        if (PEAR::isError($file)) {
+            if ($file->getCode() == -9276) {
+                $trieddownload = false;
+                $file = false; // use local copy if available on socket connect error
+            } else {
+                return $file;
+            }
+        }
+        if (!$file) {
+            $ret = $this->getCache($url);
+            if (!PEAR::isError($ret) && $trieddownload) {
+                // reset the age of the cache if the server says it was unmodified
+                $this->saveCache($url, $ret, null, true, $cacheId);
+            }
+            return $ret;
+        }
+        if (is_array($file)) {
+            $headers = $file[2];
+            $lastmodified = $file[1];
+            $content = $file[0];
+        } else {
+            $content = $file;
+            $lastmodified = false;
+            $headers = array();
+        }
+        if ($forcestring) {
+            $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+            return $content;
+        }
+        if (isset($headers['content-type'])) {
+            switch ($headers['content-type']) {
+                case 'text/xml' :
+                case 'application/xml' :
+                    $parser = new PEAR_XMLParser;
+                    PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
+                    $err = $parser->parse($content);
+                    PEAR::popErrorHandling();
+                    if (PEAR::isError($err)) {
+                        return PEAR::raiseError('Invalid xml downloaded from "' . $url . '": ' .
+                            $err->getMessage());
+                    }
+                    $content = $parser->getData();
+                case 'text/html' :
+                default :
+                    // use it as a string
+            }
+        } else {
+            // assume XML
+            $parser = new PEAR_XMLParser;
+            $parser->parse($content);
+            $content = $parser->getData();
+        }
+        $this->saveCache($url, $content, $lastmodified, false, $cacheId);
+        return $content;
+    }
+
+    function useLocalCache($url, $cacheid = null)
+    {
+        if ($cacheid === null) {
+            $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
+                md5($url) . 'rest.cacheid';
+            if (file_exists($cacheidfile)) {
+                $cacheid = unserialize(implode('', file($cacheidfile)));
+            } else {
+                return false;
+            }
+        }
+        $cachettl = $this->config->get('cache_ttl');
+        // If cache is newer than $cachettl seconds, we use the cache!
+        if (time() - $cacheid['age'] < $cachettl) {
+            return $this->getCache($url);
+        }
+        return false;
+    }
+
+    function getCacheId($url)
+    {
+        $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
+            md5($url) . 'rest.cacheid';
+        if (file_exists($cacheidfile)) {
+            $ret = unserialize(implode('', file($cacheidfile)));
+            return $ret;
+        } else {
+            return false;
+        }
+    }
+
+    function getCache($url)
+    {
+        $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
+            md5($url) . 'rest.cachefile';
+        if (file_exists($cachefile)) {
+            return unserialize(implode('', file($cachefile)));
+        } else {
+            return PEAR::raiseError('No cached content available for "' . $url . '"');
+        }
+    }
+
+    /**
+     * @param string full URL to REST resource
+     * @param string original contents of the REST resource
+     * @param array  HTTP Last-Modified and ETag headers
+     * @param bool   if true, then the cache id file should be regenerated to
+     *               trigger a new time-to-live value
+     */
+    function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null)
+    {
+        $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
+            md5($url) . 'rest.cacheid';
+        $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
+            md5($url) . 'rest.cachefile';
+        if ($cacheid === null && $nochange) {
+            $cacheid = unserialize(implode('', file($cacheidfile)));
+        }
+
+        $fp = @fopen($cacheidfile, 'wb');
+        if (!$fp) {
+            $cache_dir = $this->config->get('cache_dir');
+            if (!is_dir($cache_dir)) {
+                System::mkdir(array('-p', $cache_dir));
+                $fp = @fopen($cacheidfile, 'wb');
+                if (!$fp) {
+                    return false;
+                }
+            } else {
+                return false;
+            }
+        }
+
+        if ($nochange) {
+            fwrite($fp, serialize(array(
+                'age'        => time(),
+                'lastChange' => $cacheid['lastChange'],
+                )));
+            fclose($fp);
+            return true;
+        } else {
+            fwrite($fp, serialize(array(
+                'age'        => time(),
+                'lastChange' => $lastmodified,
+                )));
+        }
+        fclose($fp);
+        $fp = @fopen($cachefile, 'wb');
+        if (!$fp) {
+            if (file_exists($cacheidfile)) {
+                @unlink($cacheidfile);
+            }
+            return false;
+        }
+        fwrite($fp, serialize($contents));
+        fclose($fp);
+        return true;
+    }
+
+    /**
+     * Efficiently Download a file through HTTP.  Returns downloaded file as a string in-memory
+     * This is best used for small files
+     *
+     * If an HTTP proxy has been configured (http_proxy PEAR_Config
+     * setting), the proxy will be used.
+     *
+     * @param string  $url       the URL to download
+     * @param string  $save_dir  directory to save file in
+     * @param false|string|array $lastmodified header values to check against for caching
+     *                           use false to return the header values from this download
+     * @param false|array $accept Accept headers to send
+     * @return string|array  Returns the contents of the downloaded file or a PEAR
+     *                       error on failure.  If the error is caused by
+     *                       socket-related errors, the error object will
+     *                       have the fsockopen error code available through
+     *                       getCode().  If caching is requested, then return the header
+     *                       values.
+     *
+     * @access public
+     */
+    function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false)
+    {
+        $info = parse_url($url);
+        if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) {
+            return PEAR::raiseError('Cannot download non-http URL "' . $url . '"');
+        }
+        if (!isset($info['host'])) {
+            return PEAR::raiseError('Cannot download from non-URL "' . $url . '"');
+        } else {
+            $host = $info['host'];
+            if (!array_key_exists('port', $info)) {
+                $info['port'] = null;
+            }
+            if (!array_key_exists('path', $info)) {
+                $info['path'] = null;
+            }
+            $port = $info['port'];
+            $path = $info['path'];
+        }
+        $proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
+        if ($this->config->get('http_proxy')&&
+              $proxy = parse_url($this->config->get('http_proxy'))) {
+            $proxy_host = isset($proxy['host']) ? $proxy['host'] : null;
+            if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') {
+                $proxy_host = 'ssl://' . $proxy_host;
+            }
+            $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080;
+            $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null;
+            $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null;
+        }
+        if (empty($port)) {
+            if (isset($info['scheme']) && $info['scheme'] == 'https') {
+                $port = 443;
+            } else {
+                $port = 80;
+            }
+        }
+        If (isset($proxy['host'])) {
+            $request = "GET $url HTTP/1.1\r\n";
+        } else {
+            $request = "GET $path HTTP/1.1\r\n";
+        }
+        $request .= "Host: $host:$port\r\n";
+
+        $ifmodifiedsince = '';
+        if (is_array($lastmodified)) {
+            if (isset($lastmodified['Last-Modified'])) {
+                $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n";
+            }
+            if (isset($lastmodified['ETag'])) {
+                $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n";
+            }
+        } else {
+            $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
+        }
+        $request .= $ifmodifiedsince .
+            "User-Agent: PEAR/1.7.2/PHP/" . PHP_VERSION . "\r\n";
+        $username = $this->config->get('username', null, $channel);
+        $password = $this->config->get('password', null, $channel);
+        if ($username && $password) {
+            $tmp = base64_encode("$username:$password");
+            $request .= "Authorization: Basic $tmp\r\n";
+        }
+        if ($proxy_host != '' && $proxy_user != '') {
+            $request .= 'Proxy-Authorization: Basic ' .
+                base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n";
+        }
+        if ($accept) {
+            $request .= 'Accept: ' . implode(', ', $accept) . "\r\n";
+        }
+        $request .= "Accept-Encoding:\r\n";
+        $request .= "Connection: close\r\n";
+        $request .= "\r\n";
+        if ($proxy_host != '') {
+            $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr, 15);
+            if (!$fp) {
+                return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr",
+                    -9276);
+            }
+        } else {
+            if (isset($info['scheme']) && $info['scheme'] == 'https') {
+                $host = 'ssl://' . $host;
+            }
+            $fp = @fsockopen($host, $port, $errno, $errstr);
+            if (!$fp) {
+                return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno);
+            }
+        }
+        fwrite($fp, $request);
+        $headers = array();
+        while (trim($line = fgets($fp, 1024))) {
+            if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) {
+                $headers[strtolower($matches[1])] = trim($matches[2]);
+            } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) {
+                if ($matches[1] == 304 && ($lastmodified || ($lastmodified === false))) {
+                    return false;
+                }
+                if ($matches[1] != 200) {
+                    return PEAR::raiseError("File http://$host:$port$path not valid (received: $line)", (int) $matches[1]);
+                }
+            }
+        }
+        if (isset($headers['content-length'])) {
+            $length = $headers['content-length'];
+        } else {
+            $length = -1;
+        }
+        $data = '';
+        while ($chunk = @fread($fp, 8192)) {
+            $data .= $chunk;
+        }
+        fclose($fp);
+        if ($lastmodified === false || $lastmodified) {
+            if (isset($headers['etag'])) {
+                $lastmodified = array('ETag' => $headers['etag']);
+            }
+            if (isset($headers['last-modified'])) {
+                if (is_array($lastmodified)) {
+                    $lastmodified['Last-Modified'] = $headers['last-modified'];
+                } else {
+                    $lastmodified = $headers['last-modified'];
+                }
+            }
+            return array($data, $lastmodified, $headers);
+        }
+        return $data;
+    }
+}
+?>
diff --git a/includes/pear/PEAR/REST/10.php b/includes/pear/PEAR/REST/10.php
index 81bcdf22..d2f44fe9 100644
--- a/includes/pear/PEAR/REST/10.php
+++ b/includes/pear/PEAR/REST/10.php
@@ -1,624 +1,797 @@
-
- * @copyright  1997-2005 The PHP Group
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: 10.php,v 1.39 2005/11/16 03:34:17 cellog Exp $
- * @link       http://pear.php.net/package/PEAR
- * @since      File available since Release 1.4.0a12
- */
-
-/**
- * For downloading REST xml/txt files
- */
-require_once 'PEAR/REST.php';
-
-/**
- * Implement REST 1.0
- *
- * @category   pear
- * @package    PEAR
- * @author     Greg Beaver 
- * @copyright  1997-2005 The PHP Group
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 1.4.5
- * @link       http://pear.php.net/package/PEAR
- * @since      Class available since Release 1.4.0a12
- */
-class PEAR_REST_10
-{
-    /**
-     * @var PEAR_REST
-     */
-    var $_rest;
-    function PEAR_REST_10($config, $options = array())
-    {
-        $this->_rest = &new PEAR_REST($config, $options);
-    }
-
-    function getDownloadURL($base, $packageinfo, $prefstate, $installed)
-    {
-        $channel = $packageinfo['channel'];
-        $package = $packageinfo['package'];
-        $states = $this->betterStates($prefstate, true);
-        if (!$states) {
-            return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
-        }
-        $state = $version = null;
-        if (isset($packageinfo['state'])) {
-            $state = $packageinfo['state'];
-        }
-        if (isset($packageinfo['version'])) {
-            $version = $packageinfo['version'];
-        }
-        $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . '/allreleases.xml');
-        if (PEAR::isError($info)) {
-            return PEAR::raiseError('No releases available for package "' .
-                $channel . '/' . $package . '"');
-        }
-        if (!isset($info['r'])) {
-            return false;
-        }
-        $found = false;
-        $release = false;
-        if (!is_array($info['r']) || !isset($info['r'][0])) {
-            $info['r'] = array($info['r']);
-        }
-        foreach ($info['r'] as $release) {
-            if (!isset($this->_rest->_options['force']) && ($installed &&
-                  version_compare($release['v'], $installed, '<'))) {
-                continue;
-            }
-            if (isset($state)) {
-                if ($release['s'] == $state) {
-                    $found = true;
-                    break;
-                }
-            } elseif (isset($version)) {
-                if ($release['v'] == $version) {
-                    $found = true;
-                    break;
-                }
-            } else {
-                if (in_array($release['s'], $states)) {
-                    $found = true;
-                    break;
-                }
-            }
-        }
-        return $this->_returnDownloadURL($base, $package, $release, $info, $found);
-    }
-
-    function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage,
-                               $prefstate = 'stable', $installed = false)
-    {
-        $channel = $dependency['channel'];
-        $package = $dependency['name'];
-        $states = $this->betterStates($prefstate, true);
-        if (!$states) {
-            return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
-        }
-        $state = $version = null;
-        if (isset($packageinfo['state'])) {
-            $state = $packageinfo['state'];
-        }
-        if (isset($packageinfo['version'])) {
-            $version = $packageinfo['version'];
-        }
-        $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . '/allreleases.xml');
-        if (PEAR::isError($info)) {
-            return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package']
-                . '" dependency "' . $channel . '/' . $package . '" has no releases');
-        }
-        if (!is_array($info) || !isset($info['r'])) {
-            return false;
-        }
-        $exclude = array();
-        $min = $max = $recommended = false;
-        if ($xsdversion == '1.0') {
-            $pinfo['package'] = $dependency['name'];
-            $pinfo['channel'] = 'pear.php.net'; // this is always true - don't change this
-            switch ($dependency['rel']) {
-                case 'ge' :
-                    $min = $dependency['version'];
-                break;
-                case 'gt' :
-                    $min = $dependency['version'];
-                    $exclude = array($dependency['version']);
-                break;
-                case 'eq' :
-                    $recommended = $dependency['version'];
-                break;
-                case 'lt' :
-                    $max = $dependency['version'];
-                    $exclude = array($dependency['version']);
-                break;
-                case 'le' :
-                    $max = $dependency['version'];
-                break;
-                case 'ne' :
-                    $exclude = array($dependency['version']);
-                break;
-            }
-        } else {
-            $pinfo['package'] = $dependency['name'];
-            $min = isset($dependency['min']) ? $dependency['min'] : false;
-            $max = isset($dependency['max']) ? $dependency['max'] : false;
-            $recommended = isset($dependency['recommended']) ?
-                $dependency['recommended'] : false;
-            if (isset($dependency['exclude'])) {
-                if (!isset($dependency['exclude'][0])) {
-                    $exclude = array($dependency['exclude']);
-                }
-            }
-        }
-        $found = false;
-        $release = false;
-        if (!is_array($info['r']) || !isset($info['r'][0])) {
-            $info['r'] = array($info['r']);
-        }
-        foreach ($info['r'] as $release) {
-            if (!isset($this->_rest->_options['force']) && ($installed &&
-                  version_compare($release['v'], $installed, '<'))) {
-                continue;
-            }
-            if (in_array($release['v'], $exclude)) { // skip excluded versions
-                continue;
-            }
-            // allow newer releases to say "I'm OK with the dependent package"
-            if ($xsdversion == '2.0' && isset($release['co'])) {
-                if (!is_array($release['co']) || !isset($release['co'][0])) {
-                    $release['co'] = array($release['co']);
-                }
-                foreach ($release['co'] as $entry) {
-                    if (isset($entry['x']) && !is_array($entry['x'])) {
-                        $entry['x'] = array($entry['x']);
-                    } elseif (!isset($entry['x'])) {
-                        $entry['x'] = array();
-                    }
-                    if ($entry['c'] == $deppackage['channel'] &&
-                          strtolower($entry['p']) == strtolower($deppackage['package']) &&
-                          version_compare($deppackage['version'], $entry['min'], '>=') &&
-                          version_compare($deppackage['version'], $entry['max'], '<=') &&
-                          !in_array($release['v'], $entry['x'])) {
-                        $recommended = $release['v'];
-                        break;
-                    }
-                }
-            }
-            if ($recommended) {
-                if ($release['v'] != $recommended) { // if we want a specific
-                    // version, then skip all others
-                    continue;
-                } else {
-                    if (!in_array($release['s'], $states)) {
-                        // the stability is too low, but we must return the
-                        // recommended version if possible
-                        return $this->_returnDownloadURL($base, $package, $release, $info, true);
-                    }
-                }
-            }
-            if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions
-                continue;
-            }
-            if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions
-                continue;
-            }
-            if ($installed && version_compare($release['v'], $installed, '<')) {
-                continue;
-            }
-            if (in_array($release['s'], $states)) { // if in the preferred state...
-                $found = true; // ... then use it
-                break;
-            }
-        }
-        return $this->_returnDownloadURL($base, $package, $release, $info, $found);
-    }
-
-    function _returnDownloadURL($base, $package, $release, $info, $found)
-    {
-        if (!$found) {
-            $release = $info['r'][0];
-        }
-        $releaseinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' . 
-            $release['v'] . '.xml');
-        if (PEAR::isError($releaseinfo)) {
-            return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] .
-                '" does not have REST xml available');
-        }
-        $packagexml = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' .
-            'deps.' . $release['v'] . '.txt', false, true);
-        if (PEAR::isError($packagexml)) {
-            return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] .
-                '" does not have REST dependency information available');
-        }
-        $packagexml = unserialize($packagexml);
-        if (!$packagexml) {
-            $packagexml = array();
-        }
-        $allinfo = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
-            '/allreleases.xml');
-        if (!is_array($allinfo['r']) || !isset($allinfo['r'][0])) {
-            $allinfo['r'] = array($allinfo['r']);
-        }
-        $compatible = false;
-        foreach ($allinfo['r'] as $release) {
-            if ($release['v'] != $releaseinfo['v']) {
-                continue;
-            }
-            if (!isset($release['co'])) {
-                break;
-            }
-            $compatible = array();
-            if (!is_array($release['co']) || !isset($release['co'][0])) {
-                $release['co'] = array($release['co']);
-            }
-            foreach ($release['co'] as $entry) {
-                $comp = array();
-                $comp['name'] = $entry['p'];
-                $comp['channel'] = $entry['c'];
-                $comp['min'] = $entry['min'];
-                $comp['max'] = $entry['max'];
-                if (isset($entry['x']) && !is_array($entry['x'])) {
-                    $comp['exclude'] = $entry['x'];
-                }
-                $compatible[] = $comp;
-            }
-            if (count($compatible) == 1) {
-                $compatible = $compatible[0];
-            }
-            break;
-        }
-        if ($found) {
-            return 
-                array('version' => $releaseinfo['v'],
-                      'info' => $packagexml,
-                      'package' => $releaseinfo['p']['_content'],
-                      'stability' => $releaseinfo['st'],
-                      'url' => $releaseinfo['g'],
-                      'compatible' => $compatible);
-        } else {
-            return
-                array('version' => $releaseinfo['v'],
-                      'package' => $releaseinfo['p']['_content'],
-                      'stability' => $releaseinfo['st'],
-                      'info' => $packagexml,
-                      'compatible' => $compatible);
-        }
-    }
-
-    function listPackages($base)
-    {
-        $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml');
-        if (PEAR::isError($packagelist)) {
-            return $packagelist;
-        }
-        if (!is_array($packagelist) || !isset($packagelist['p'])) {
-            return array();
-        }
-        if (!is_array($packagelist['p'])) {
-            $packagelist['p'] = array($packagelist['p']);
-        }
-        return $packagelist['p'];
-    }
-
-    function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false)
-    {
-        $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml');
-        if (PEAR::isError($packagelist)) {
-            return $packagelist;
-        }
-        if ($this->_rest->config->get('verbose') > 0) {
-            $ui = &PEAR_Frontend::singleton();
-            $ui->log('Retrieving data...0%', false);
-        }
-        $ret = array();
-        if (!is_array($packagelist) || !isset($packagelist['p'])) {
-            return $ret;
-        }
-        if (!is_array($packagelist['p'])) {
-            $packagelist['p'] = array($packagelist['p']);
-        }
-        PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
-        $next = .1;
-        foreach ($packagelist['p'] as $progress => $package) {
-            if ($this->_rest->config->get('verbose') > 0) {
-                if ($progress / count($packagelist['p']) >= $next) {
-                    if ($next == .5) {
-                        $ui->log('50%', false);
-                    } else {
-                        $ui->log('.', false);
-                    }
-                    $next += .1;
-                }
-            }
-            if ($basic) { // remote-list command
-                if ($dostable) {
-                    $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
-                        '/stable.txt');
-                } else {
-                    $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
-                        '/latest.txt');
-                }
-                if (PEAR::isError($latest)) {
-                    $latest = false;
-                }
-                $info = array('stable' => $latest);
-            } else { // list-all command
-                $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml');
-                if (PEAR::isError($inf)) {
-                    PEAR::popErrorHandling();
-                    return $inf;
-                }
-                if ($searchpackage) {
-                    $found = (!empty($searchpackage) && stristr($package, $searchpackage) !== false);
-                    if (!$found && !(isset($searchsummary) && !empty($searchsummary)
-                        && (stristr($inf['s'], $searchsummary) !== false
-                            || stristr($inf['d'], $searchsummary) !== false)))
-                    {
-                        continue;
-                    };
-                }
-                $releases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
-                    '/allreleases.xml');
-                if (PEAR::isError($releases)) {
-                    continue;
-                }
-                if (!isset($releases['r'][0])) {
-                    $releases['r'] = array($releases['r']);
-                }
-                unset($latest);
-                unset($unstable);
-                unset($stable);
-                unset($state);
-                foreach ($releases['r'] as $release) {
-                    if (!isset($latest)) {
-                        if ($dostable && $release['s'] == 'stable') {
-                            $latest = $release['v'];
-                            $state = 'stable';
-                        }
-                        if (!$dostable) {
-                            $latest = $release['v'];
-                            $state = $release['s'];
-                        }
-                    }
-                    if (!isset($stable) && $release['s'] == 'stable') {
-                        $stable = $release['v'];
-                        if (!isset($unstable)) {
-                            $unstable = $stable;
-                        }
-                    }
-                    if (!isset($unstable) && $release['s'] != 'stable') {
-                        $latest = $unstable = $release['v'];
-                        $state = $release['s'];
-                    }
-                    if (isset($latest) && !isset($state)) {
-                        $state = $release['s'];
-                    }
-                    if (isset($latest) && isset($stable) && isset($unstable)) {
-                        break;
-                    }
-                }
-                $deps = array();
-                if (!isset($unstable)) {
-                    $unstable = false;
-                    $state = 'stable';
-                    if (isset($stable)) {
-                        $latest = $unstable = $stable;
-                    }
-                } else {
-                    $latest = $unstable;
-                }
-                if (!isset($latest)) {
-                    $latest = false;
-                }
-                if ($latest) {
-                    $d = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' .
-                        $latest . '.txt');
-                    if (!PEAR::isError($d)) {
-                        $d = unserialize($d);
-                        if ($d) {
-                            if (isset($d['required'])) {
-                                if (!class_exists('PEAR_PackageFile_v2')) {
-                                    require_once 'PEAR/PackageFile/v2.php';
-                                }
-                                if (!isset($pf)) {
-                                    $pf = new PEAR_PackageFile_v2;
-                                }
-                                $pf->setDeps($d);
-                                $tdeps = $pf->getDeps();
-                            } else {
-                                $tdeps = $d;
-                            }
-                            foreach ($tdeps as $dep) {
-                                if ($dep['type'] !== 'pkg') {
-                                    continue;
-                                }
-                                $deps[] = $dep;
-                            }
-                        }
-                    }
-                }
-                if (!isset($stable)) {
-                    $stable = '-n/a-';
-                }
-                if (!$searchpackage) {
-                    $info = array('stable' => $latest, 'summary' => $inf['s'], 'description' =>
-                        $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'],
-                        'unstable' => $unstable, 'state' => $state);
-                } else {
-                    $info = array('stable' => $stable, 'summary' => $inf['s'], 'description' =>
-                        $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'],
-                        'unstable' => $unstable, 'state' => $state);
-                }
-            }
-            $ret[$package] = $info;
-        }
-        PEAR::popErrorHandling();
-        return $ret;
-    }
-
-    function listLatestUpgrades($base, $state, $installed, $channel, &$reg)
-    {
-        $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml');
-        if (PEAR::isError($packagelist)) {
-            return $packagelist;
-        }
-        $ret = array();
-        if (!is_array($packagelist) || !isset($packagelist['p'])) {
-            return $ret;
-        }
-        if (!is_array($packagelist['p'])) {
-            $packagelist['p'] = array($packagelist['p']);
-        }
-        if ($state) {
-            $states = $this->betterStates($state, true);
-        }
-        foreach ($packagelist['p'] as $package) {
-            if (!isset($installed[strtolower($package)])) {
-                continue;
-            }
-            $inst_version = $reg->packageInfo($package, 'version', $channel);
-            PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
-            $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
-                '/allreleases.xml');
-            PEAR::popErrorHandling();
-            if (PEAR::isError($info)) {
-                continue; // no remote releases
-            }
-            if (!isset($info['r'])) {
-                continue;
-            }
-            $found = false;
-            $release = false;
-            if (!is_array($info['r']) || !isset($info['r'][0])) {
-                $info['r'] = array($info['r']);
-            }
-            foreach ($info['r'] as $release) {
-                if ($inst_version && version_compare($release['v'], $inst_version, '<=')) {
-                    continue;
-                }
-                if ($state) {
-                    if (in_array($release['s'], $states)) {
-                        $found = true;
-                        break;
-                    }
-                } else {
-                    $found = true;
-                    break;
-                }
-            }
-            if (!$found) {
-                continue;
-            }
-            $relinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' . 
-                $release['v'] . '.xml');
-            if (PEAR::isError($relinfo)) {
-                return $relinfo;
-            }
-            $ret[$package] = array(
-                    'version' => $release['v'],
-                    'state' => $release['s'],
-                    'filesize' => $relinfo['f'],
-                );
-        }
-        return $ret;
-    }
-
-    function packageInfo($base, $package)
-    {
-        PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
-        $pinfo = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml');
-        if (PEAR::isError($pinfo)) {
-            PEAR::popErrorHandling();
-            return PEAR::raiseError('Unknown package: "' . $package . '" (Debug: ' .
-                $pinfo->getMessage() . ')');
-        }
-        $releases = array();
-        $allreleases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
-            '/allreleases.xml');
-        if (!PEAR::isError($allreleases)) {
-            if (!class_exists('PEAR_PackageFile_v2')) {
-                require_once 'PEAR/PackageFile/v2.php';
-            }
-            if (!is_array($allreleases['r'])) {
-                $allreleases['r'] = array($allreleases['r']);
-            }
-            $pf = new PEAR_PackageFile_v2;
-            foreach ($allreleases['r'] as $release) {
-                $ds = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' .
-                    $release['v'] . '.txt');
-                if (PEAR::isError($ds)) {
-                    continue;
-                }
-                if (!isset($latest)) {
-                    $latest = $release['v'];
-                }
-                $pf->setDeps(unserialize($ds));
-                $ds = $pf->getDeps();
-                $info = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package)
-                    . '/' . $release['v'] . '.xml');
-                if (PEAR::isError($info)) {
-                    continue;
-                }
-                $releases[$release['v']] = array(
-                    'doneby' => $info['m'],
-                    'license' => $info['l'],
-                    'summary' => $info['s'],
-                    'description' => $info['d'],
-                    'releasedate' => $info['da'],
-                    'releasenotes' => $info['n'],
-                    'state' => $release['s'],
-                    'deps' => $ds ? $ds : array(),
-                );
-            }
-        } else {
-            $latest = '';
-        }
-        PEAR::popErrorHandling();
-        return array(
-            'name' => $pinfo['n'],
-            'channel' => $pinfo['c'],
-            'category' => $pinfo['ca']['_content'],
-            'stable' => $latest,
-            'license' => $pinfo['l'],
-            'summary' => $pinfo['s'],
-            'description' => $pinfo['d'],
-            'releases' => $releases,
-            );
-    }
-
-    /**
-     * Return an array containing all of the states that are more stable than
-     * or equal to the passed in state
-     *
-     * @param string Release state
-     * @param boolean Determines whether to include $state in the list
-     * @return false|array False if $state is not a valid release state
-     */
-    function betterStates($state, $include = false)
-    {
-        static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable');
-        $i = array_search($state, $states);
-        if ($i === false) {
-            return false;
-        }
-        if ($include) {
-            $i--;
-        }
-        return array_slice($states, $i + 1);
-    }
-}
+
+ * @copyright  1997-2008 The PHP Group
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    CVS: $Id: 10.php,v 1.53 2008/04/11 01:16:40 dufuz Exp $
+ * @link       http://pear.php.net/package/PEAR
+ * @since      File available since Release 1.4.0a12
+ */
+
+/**
+ * For downloading REST xml/txt files
+ */
+require_once 'PEAR/REST.php';
+
+/**
+ * Implement REST 1.0
+ *
+ * @category   pear
+ * @package    PEAR
+ * @author     Greg Beaver 
+ * @copyright  1997-2008 The PHP Group
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: 1.7.2
+ * @link       http://pear.php.net/package/PEAR
+ * @since      Class available since Release 1.4.0a12
+ */
+class PEAR_REST_10
+{
+    /**
+     * @var PEAR_REST
+     */
+    var $_rest;
+    function PEAR_REST_10($config, $options = array())
+    {
+        $this->_rest = &new PEAR_REST($config, $options);
+    }
+
+    /**
+     * Retrieve information about a remote package to be downloaded from a REST server
+     *
+     * @param string $base The uri to prepend to all REST calls
+     * @param array $packageinfo an array of format:
+     * 
+     *  array(
+     *   'package' => 'packagename',
+     *   'channel' => 'channelname',
+     *  ['state' => 'alpha' (or valid state),]
+     *  -or-
+     *  ['version' => '1.whatever']
+     * 
+ * @param string $prefstate Current preferred_state config variable value + * @param bool $installed the installed version of this package to compare against + * @return array|false|PEAR_Error see {@link _returnDownloadURL()} + */ + function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false) + { + $channel = $packageinfo['channel']; + $package = $packageinfo['package']; + $states = $this->betterStates($prefstate, true); + if (!$states) { + return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); + } + $state = isset($packageinfo['state']) ? $packageinfo['state'] : null; + $version = isset($packageinfo['version']) ? $packageinfo['version'] : null; + $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . '/allreleases.xml', false, false, $channel); + if (PEAR::isError($info)) { + return PEAR::raiseError('No releases available for package "' . + $channel . '/' . $package . '"'); + } + if (!isset($info['r'])) { + return false; + } + $release = $found = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + foreach ($info['r'] as $release) { + if (!isset($this->_rest->_options['force']) && ($installed && + version_compare($release['v'], $installed, '<'))) { + continue; + } + if (isset($state)) { + // try our preferred state first + if ($release['s'] == $state) { + $found = true; + break; + } + // see if there is something newer and more stable + // bug #7221 + if (in_array($release['s'], $this->betterStates($state), true)) { + $found = true; + break; + } + } elseif (isset($version)) { + if ($release['v'] == $version) { + $found = true; + break; + } + } else { + if (in_array($release['s'], $states)) { + $found = true; + break; + } + } + } + return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel); + } + + function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage, + $prefstate = 'stable', $installed = false, $channel = false) + { + $channel = $dependency['channel']; + $package = $dependency['name']; + $states = $this->betterStates($prefstate, true); + if (!$states) { + return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); + } + $state = isset($dependency['state']) ? $dependency['state'] : null; + $version = isset($dependency['version']) ? $dependency['version'] : null; + $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . '/allreleases.xml', false, false, $channel); + if (PEAR::isError($info)) { + return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package'] + . '" dependency "' . $channel . '/' . $package . '" has no releases'); + } + if (!is_array($info) || !isset($info['r'])) { + return false; + } + $exclude = array(); + $min = $max = $recommended = false; + if ($xsdversion == '1.0') { + switch ($dependency['rel']) { + case 'ge' : + $min = $dependency['version']; + break; + case 'gt' : + $min = $dependency['version']; + $exclude = array($dependency['version']); + break; + case 'eq' : + $recommended = $dependency['version']; + break; + case 'lt' : + $max = $dependency['version']; + $exclude = array($dependency['version']); + break; + case 'le' : + $max = $dependency['version']; + break; + case 'ne' : + $exclude = array($dependency['version']); + break; + } + } else { + $min = isset($dependency['min']) ? $dependency['min'] : false; + $max = isset($dependency['max']) ? $dependency['max'] : false; + $recommended = isset($dependency['recommended']) ? + $dependency['recommended'] : false; + if (isset($dependency['exclude'])) { + if (!isset($dependency['exclude'][0])) { + $exclude = array($dependency['exclude']); + } + } + } + $release = $found = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + foreach ($info['r'] as $release) { + if (!isset($this->_rest->_options['force']) && ($installed && + version_compare($release['v'], $installed, '<'))) { + continue; + } + if (in_array($release['v'], $exclude)) { // skip excluded versions + continue; + } + // allow newer releases to say "I'm OK with the dependent package" + if ($xsdversion == '2.0' && isset($release['co'])) { + if (!is_array($release['co']) || !isset($release['co'][0])) { + $release['co'] = array($release['co']); + } + foreach ($release['co'] as $entry) { + if (isset($entry['x']) && !is_array($entry['x'])) { + $entry['x'] = array($entry['x']); + } elseif (!isset($entry['x'])) { + $entry['x'] = array(); + } + if ($entry['c'] == $deppackage['channel'] && + strtolower($entry['p']) == strtolower($deppackage['package']) && + version_compare($deppackage['version'], $entry['min'], '>=') && + version_compare($deppackage['version'], $entry['max'], '<=') && + !in_array($release['v'], $entry['x'])) { + $recommended = $release['v']; + break; + } + } + } + if ($recommended) { + if ($release['v'] != $recommended) { // if we want a specific + // version, then skip all others + continue; + } else { + if (!in_array($release['s'], $states)) { + // the stability is too low, but we must return the + // recommended version if possible + return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel); + } + } + } + if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions + continue; + } + if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions + continue; + } + if ($installed && version_compare($release['v'], $installed, '<')) { + continue; + } + if (in_array($release['s'], $states)) { // if in the preferred state... + $found = true; // ... then use it + break; + } + } + return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel); + } + + /** + * Take raw data and return the array needed for processing a download URL + * + * @param string $base REST base uri + * @param string $package Package name + * @param array $release an array of format array('v' => version, 's' => state) + * describing the release to download + * @param array $info list of all releases as defined by allreleases.xml + * @param bool|null $found determines whether the release was found or this is the next + * best alternative. If null, then versions were skipped because + * of PHP dependency + * @return array|PEAR_Error + * @access private + */ + function _returnDownloadURL($base, $package, $release, $info, $found, $phpversion = false, $channel = false) + { + if (!$found) { + $release = $info['r'][0]; + } + $pinfo = $this->_rest->retrieveCacheFirst($base . 'p/' . strtolower($package) . '/' . + 'info.xml', false, false, $channel); + if (PEAR::isError($pinfo)) { + return PEAR::raiseError('Package "' . $package . + '" does not have REST info xml available'); + } + $releaseinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' . + $release['v'] . '.xml', false, false, $channel); + if (PEAR::isError($releaseinfo)) { + return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] . + '" does not have REST xml available'); + } + $packagexml = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' . + 'deps.' . $release['v'] . '.txt', false, true, $channel); + if (PEAR::isError($packagexml)) { + return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] . + '" does not have REST dependency information available'); + } + $packagexml = unserialize($packagexml); + if (!$packagexml) { + $packagexml = array(); + } + $allinfo = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases.xml', false, false, $channel); + if (!is_array($allinfo['r']) || !isset($allinfo['r'][0])) { + $allinfo['r'] = array($allinfo['r']); + } + $compatible = false; + foreach ($allinfo['r'] as $release) { + if ($release['v'] != $releaseinfo['v']) { + continue; + } + if (!isset($release['co'])) { + break; + } + $compatible = array(); + if (!is_array($release['co']) || !isset($release['co'][0])) { + $release['co'] = array($release['co']); + } + foreach ($release['co'] as $entry) { + $comp = array(); + $comp['name'] = $entry['p']; + $comp['channel'] = $entry['c']; + $comp['min'] = $entry['min']; + $comp['max'] = $entry['max']; + if (isset($entry['x']) && !is_array($entry['x'])) { + $comp['exclude'] = $entry['x']; + } + $compatible[] = $comp; + } + if (count($compatible) == 1) { + $compatible = $compatible[0]; + } + break; + } + if (isset($pinfo['dc']) && isset($pinfo['dp'])) { + if (is_array($pinfo['dp'])) { + $deprecated = array('channel' => (string) $pinfo['dc'], + 'package' => trim($pinfo['dp']['_content'])); + } else { + $deprecated = array('channel' => (string) $pinfo['dc'], + 'package' => trim($pinfo['dp'])); + } + } else { + $deprecated = false; + } + if ($found) { + return + array('version' => $releaseinfo['v'], + 'info' => $packagexml, + 'package' => $releaseinfo['p']['_content'], + 'stability' => $releaseinfo['st'], + 'url' => $releaseinfo['g'], + 'compatible' => $compatible, + 'deprecated' => $deprecated, + ); + } else { + return + array('version' => $releaseinfo['v'], + 'package' => $releaseinfo['p']['_content'], + 'stability' => $releaseinfo['st'], + 'info' => $packagexml, + 'compatible' => $compatible, + 'deprecated' => $deprecated, + 'php' => $phpversion + ); + } + } + + function listPackages($base, $channel = false) + { + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return array(); + } + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + return $packagelist['p']; + } + + /** + * List all categories of a REST server + * + * @param string $base base URL of the server + * @return array of categorynames + */ + function listCategories($base, $channel = false) + { + $categories = array(); + + // c/categories.xml does not exist; + // check for every package its category manually + // This is SLOOOWWWW : /// + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + if (!is_array($packagelist) || !isset($packagelist['p'])) { + $ret = array(); + return $ret; + } + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + foreach ($packagelist['p'] as $package) { + $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); + if (PEAR::isError($inf)) { + PEAR::popErrorHandling(); + return $inf; + } + $cat = $inf['ca']['_content']; + if (!isset($categories[$cat])) { + $categories[$cat] = $inf['ca']; + } + } + return array_values($categories); + } + + /** + * List a category of a REST server + * + * @param string $base base URL of the server + * @param string $category name of the category + * @param boolean $info also download full package info + * @return array of packagenames + */ + function listCategory($base, $category, $info = false, $channel = false) + { + // gives '404 Not Found' error when category doesn't exist + $packagelist = $this->_rest->retrieveData($base.'c/'.urlencode($category).'/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return array(); + } + if (!is_array($packagelist['p']) || + !isset($packagelist['p'][0])) { // only 1 pkg + $packagelist = array($packagelist['p']); + } else { + $packagelist = $packagelist['p']; + } + + if ($info == true) { + // get individual package info + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + foreach ($packagelist as $i => $packageitem) { + $url = sprintf('%s'.'r/%s/latest.txt', + $base, + strtolower($packageitem['_content'])); + $version = $this->_rest->retrieveData($url, false, false, $channel); + if (PEAR::isError($version)) { + break; // skipit + } + $url = sprintf('%s'.'r/%s/%s.xml', + $base, + strtolower($packageitem['_content']), + $version); + $info = $this->_rest->retrieveData($url, false, false, $channel); + if (PEAR::isError($info)) { + break; // skipit + } + $packagelist[$i]['info'] = $info; + } + PEAR::popErrorHandling(); + } + + return $packagelist; + } + + + function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false) + { + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + if ($this->_rest->config->get('verbose') > 0) { + $ui = &PEAR_Frontend::singleton(); + $ui->log('Retrieving data...0%', false); + } + $ret = array(); + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return $ret; + } + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + + // only search-packagename = quicksearch ! + if ($searchpackage && (!$searchsummary || empty($searchpackage))) { + $newpackagelist = array(); + foreach ($packagelist['p'] as $package) { + if (!empty($searchpackage) && stristr($package, $searchpackage) !== false) { + $newpackagelist[] = $package; + } + } + $packagelist['p'] = $newpackagelist; + } + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $next = .1; + foreach ($packagelist['p'] as $progress => $package) { + if ($this->_rest->config->get('verbose') > 0) { + if ($progress / count($packagelist['p']) >= $next) { + if ($next == .5) { + $ui->log('50%', false); + } else { + $ui->log('.', false); + } + $next += .1; + } + } + if ($basic) { // remote-list command + if ($dostable) { + $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/stable.txt', false, false, $channel); + } else { + $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/latest.txt', false, false, $channel); + } + if (PEAR::isError($latest)) { + $latest = false; + } + $info = array('stable' => $latest); + } else { // list-all command + $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); + if (PEAR::isError($inf)) { + PEAR::popErrorHandling(); + return $inf; + } + if ($searchpackage) { + $found = (!empty($searchpackage) && stristr($package, $searchpackage) !== false); + if (!$found && !(isset($searchsummary) && !empty($searchsummary) + && (stristr($inf['s'], $searchsummary) !== false + || stristr($inf['d'], $searchsummary) !== false))) + { + continue; + }; + } + $releases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases.xml', false, false, $channel); + if (PEAR::isError($releases)) { + continue; + } + if (!isset($releases['r'][0])) { + $releases['r'] = array($releases['r']); + } + unset($latest); + unset($unstable); + unset($stable); + unset($state); + foreach ($releases['r'] as $release) { + if (!isset($latest)) { + if ($dostable && $release['s'] == 'stable') { + $latest = $release['v']; + $state = 'stable'; + } + if (!$dostable) { + $latest = $release['v']; + $state = $release['s']; + } + } + if (!isset($stable) && $release['s'] == 'stable') { + $stable = $release['v']; + if (!isset($unstable)) { + $unstable = $stable; + } + } + if (!isset($unstable) && $release['s'] != 'stable') { + $latest = $unstable = $release['v']; + $state = $release['s']; + } + if (isset($latest) && !isset($state)) { + $state = $release['s']; + } + if (isset($latest) && isset($stable) && isset($unstable)) { + break; + } + } + $deps = array(); + if (!isset($unstable)) { + $unstable = false; + $state = 'stable'; + if (isset($stable)) { + $latest = $unstable = $stable; + } + } else { + $latest = $unstable; + } + if (!isset($latest)) { + $latest = false; + } + if ($latest) { + $d = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' . + $latest . '.txt', false, false, $channel); + if (!PEAR::isError($d)) { + $d = unserialize($d); + if ($d) { + if (isset($d['required'])) { + if (!class_exists('PEAR_PackageFile_v2')) { + require_once 'PEAR/PackageFile/v2.php'; + } + if (!isset($pf)) { + $pf = new PEAR_PackageFile_v2; + } + $pf->setDeps($d); + $tdeps = $pf->getDeps(); + } else { + $tdeps = $d; + } + foreach ($tdeps as $dep) { + if ($dep['type'] !== 'pkg') { + continue; + } + $deps[] = $dep; + } + } + } + } + if (!isset($stable)) { + $stable = '-n/a-'; + } + if (!$searchpackage) { + $info = array('stable' => $latest, 'summary' => $inf['s'], 'description' => + $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'], + 'unstable' => $unstable, 'state' => $state); + } else { + $info = array('stable' => $stable, 'summary' => $inf['s'], 'description' => + $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'], + 'unstable' => $unstable, 'state' => $state); + } + } + $ret[$package] = $info; + } + PEAR::popErrorHandling(); + return $ret; + } + + function listLatestUpgrades($base, $pref_state, $installed, $channel, &$reg) + { + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + $ret = array(); + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return $ret; + } + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + foreach ($packagelist['p'] as $package) { + if (!isset($installed[strtolower($package)])) { + continue; + } + $inst_version = $reg->packageInfo($package, 'version', $channel); + $inst_state = $reg->packageInfo($package, 'release_state', $channel); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases.xml', false, false, $channel); + PEAR::popErrorHandling(); + if (PEAR::isError($info)) { + continue; // no remote releases + } + if (!isset($info['r'])) { + continue; + } + $found = false; + $release = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + // $info['r'] is sorted by version number + foreach ($info['r'] as $release) { + if ($inst_version && version_compare($release['v'], $inst_version, '<=')) { + // not newer than the one installed + break; + } + + // new version > installed version + if (!$pref_state) { + // every state is a good state + $found = true; + break; + } else { + $new_state = $release['s']; + // if new state >= installed state: go + if (in_array($new_state, $this->betterStates($inst_state, true))) { + $found = true; + break; + } else { + // only allow to lower the state of package, + // if new state >= preferred state: go + if (in_array($new_state, $this->betterStates($pref_state, true))) { + $found = true; + break; + } + } + } + } + if (!$found) { + continue; + } + $relinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' . + $release['v'] . '.xml', false, false, $channel); + if (PEAR::isError($relinfo)) { + return $relinfo; + } + $ret[$package] = array( + 'version' => $release['v'], + 'state' => $release['s'], + 'filesize' => $relinfo['f'], + ); + } + return $ret; + } + + function packageInfo($base, $package, $channel = false) + { + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $pinfo = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); + if (PEAR::isError($pinfo)) { + PEAR::popErrorHandling(); + return PEAR::raiseError('Unknown package: "' . $package . '" (Debug: ' . + $pinfo->getMessage() . ')'); + } + $releases = array(); + $allreleases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases.xml', false, false, $channel); + if (!PEAR::isError($allreleases)) { + if (!class_exists('PEAR_PackageFile_v2')) { + require_once 'PEAR/PackageFile/v2.php'; + } + if (!is_array($allreleases['r']) || !isset($allreleases['r'][0])) { + $allreleases['r'] = array($allreleases['r']); + } + $pf = new PEAR_PackageFile_v2; + foreach ($allreleases['r'] as $release) { + $ds = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' . + $release['v'] . '.txt', false, false, $channel); + if (PEAR::isError($ds)) { + continue; + } + if (!isset($latest)) { + $latest = $release['v']; + } + $pf->setDeps(unserialize($ds)); + $ds = $pf->getDeps(); + $info = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) + . '/' . $release['v'] . '.xml', false, false, $channel); + if (PEAR::isError($info)) { + continue; + } + $releases[$release['v']] = array( + 'doneby' => $info['m'], + 'license' => $info['l'], + 'summary' => $info['s'], + 'description' => $info['d'], + 'releasedate' => $info['da'], + 'releasenotes' => $info['n'], + 'state' => $release['s'], + 'deps' => $ds ? $ds : array(), + ); + } + } else { + $latest = ''; + } + PEAR::popErrorHandling(); + if (isset($pinfo['dc']) && isset($pinfo['dp'])) { + if (is_array($pinfo['dp'])) { + $deprecated = array('channel' => (string) $pinfo['dc'], + 'package' => trim($pinfo['dp']['_content'])); + } else { + $deprecated = array('channel' => (string) $pinfo['dc'], + 'package' => trim($pinfo['dp'])); + } + } else { + $deprecated = false; + } + return array( + 'name' => $pinfo['n'], + 'channel' => $pinfo['c'], + 'category' => $pinfo['ca']['_content'], + 'stable' => $latest, + 'license' => $pinfo['l'], + 'summary' => $pinfo['s'], + 'description' => $pinfo['d'], + 'releases' => $releases, + 'deprecated' => $deprecated, + ); + } + + /** + * Return an array containing all of the states that are more stable than + * or equal to the passed in state + * + * @param string Release state + * @param boolean Determines whether to include $state in the list + * @return false|array False if $state is not a valid release state + */ + function betterStates($state, $include = false) + { + static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); + $i = array_search($state, $states); + if ($i === false) { + return false; + } + if ($include) { + $i--; + } + return array_slice($states, $i + 1); + } +} ?> \ No newline at end of file diff --git a/includes/pear/PEAR/REST/11.php b/includes/pear/PEAR/REST/11.php index aaedc468..effa6890 100644 --- a/includes/pear/PEAR/REST/11.php +++ b/includes/pear/PEAR/REST/11.php @@ -1,206 +1,317 @@ - - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: 11.php,v 1.2 2005/10/27 05:54:37 cellog Exp $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.3 - */ - -/** - * For downloading REST xml/txt files - */ -require_once 'PEAR/REST.php'; - -/** - * Implement REST 1.1 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.3 - */ -class PEAR_REST_11 -{ - /** - * @var PEAR_REST - */ - var $_rest; - - function PEAR_REST_11($config, $options = array()) - { - $this->_rest = &new PEAR_REST($config, $options); - } - - function listAll($base, $dostable, $basic = true) - { - $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml'); - if (PEAR::isError($categorylist)) { - return $categorylist; - } - $ret = array(); - if (!is_array($categorylist['c'])) { - $categorylist['c'] = array($categorylist['c']); - } - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - foreach ($categorylist['c'] as $progress => $category) { - $category = $category['_content']; - $packagesinfo = $this->_rest->retrieveData($base . - 'c/' . urlencode($category) . '/packagesinfo.xml'); - if (PEAR::isError($packagesinfo)) { - continue; - } - if (!is_array($packagesinfo) || !isset($packagesinfo['pi'])) { - continue; - } - if (!is_array($packagesinfo['pi']) || !isset($packagesinfo['pi'][0])) { - $packagesinfo['pi'] = array($packagesinfo['pi']); - } - foreach ($packagesinfo['pi'] as $packageinfo) { - $info = $packageinfo['p']; - $package = $info['n']; - $releases = isset($packageinfo['a']) ? $packageinfo['a'] : false; - unset($latest); - unset($unstable); - unset($stable); - unset($state); - if ($releases) { - if (!isset($releases['r'][0])) { - $releases['r'] = array($releases['r']); - } - foreach ($releases['r'] as $release) { - if (!isset($latest)) { - if ($dostable && $release['s'] == 'stable') { - $latest = $release['v']; - $state = 'stable'; - } - if (!$dostable) { - $latest = $release['v']; - $state = $release['s']; - } - } - if (!isset($stable) && $release['s'] == 'stable') { - $stable = $release['v']; - if (!isset($unstable)) { - $unstable = $stable; - } - } - if (!isset($unstable) && $release['s'] != 'stable') { - $latest = $unstable = $release['v']; - $state = $release['s']; - } - if (isset($latest) && !isset($state)) { - $state = $release['s']; - } - if (isset($latest) && isset($stable) && isset($unstable)) { - break; - } - } - } - if ($basic) { // remote-list command - if (!isset($latest)) { - $latest = false; - } - $ret[$package] = array('stable' => $latest); - continue; - } - // list-all command - $deps = array(); - if (!isset($unstable)) { - $unstable = false; - $state = 'stable'; - if (isset($stable)) { - $latest = $unstable = $stable; - } - } else { - $latest = $unstable; - } - if (!isset($latest)) { - $latest = false; - } - if ($latest) { - if (isset($packageinfo['deps'])) { - if (!isset($packageinfo['deps'][0])) { - $packageinfo['deps'] = array($packageinfo['deps']); - } - } - $d = false; - foreach ($packageinfo['deps'] as $dep) { - if ($dep['v'] == $latest) { - $d = unserialize($dep['d']); - } - } - if ($d) { - if (isset($d['required'])) { - if (!class_exists('PEAR_PackageFile_v2')) { - require_once 'PEAR/PackageFile/v2.php'; - } - if (!isset($pf)) { - $pf = new PEAR_PackageFile_v2; - } - $pf->setDeps($d); - $tdeps = $pf->getDeps(); - } else { - $tdeps = $d; - } - foreach ($tdeps as $dep) { - if ($dep['type'] !== 'pkg') { - continue; - } - $deps[] = $dep; - } - } - } - if (!isset($stable)) { - $stable = '-n/a-'; - } - $info = array('stable' => $latest, 'summary' => $info['s'], - 'description' => - $info['d'], 'deps' => $deps, 'category' => $info['ca']['_content'], - 'unstable' => $unstable, 'state' => $state); - $ret[$package] = $info; - } - } - PEAR::popErrorHandling(); - return $ret; - } - - /** - * Return an array containing all of the states that are more stable than - * or equal to the passed in state - * - * @param string Release state - * @param boolean Determines whether to include $state in the list - * @return false|array False if $state is not a valid release state - */ - function betterStates($state, $include = false) - { - static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); - $i = array_search($state, $states); - if ($i === false) { - return false; - } - if ($include) { - $i--; - } - return array_slice($states, $i + 1); - } -} + + * @copyright 1997-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: 11.php,v 1.14 2008/04/11 01:16:40 dufuz Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.3 + */ + +/** + * For downloading REST xml/txt files + */ +require_once 'PEAR/REST.php'; + +/** + * Implement REST 1.1 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: 1.7.2 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.3 + */ +class PEAR_REST_11 +{ + /** + * @var PEAR_REST + */ + var $_rest; + + function PEAR_REST_11($config, $options = array()) + { + $this->_rest = &new PEAR_REST($config, $options); + } + + function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false) + { + $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml', false, false, $channel); + if (PEAR::isError($categorylist)) { + return $categorylist; + } + $ret = array(); + if (!is_array($categorylist['c']) || !isset($categorylist['c'][0])) { + $categorylist['c'] = array($categorylist['c']); + } + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + + foreach ($categorylist['c'] as $progress => $category) { + $category = $category['_content']; + $packagesinfo = $this->_rest->retrieveData($base . + 'c/' . urlencode($category) . '/packagesinfo.xml', false, false, $channel); + + if (PEAR::isError($packagesinfo)) { + continue; + } + + if (!is_array($packagesinfo) || !isset($packagesinfo['pi'])) { + continue; + } + + if (!is_array($packagesinfo['pi']) || !isset($packagesinfo['pi'][0])) { + $packagesinfo['pi'] = array($packagesinfo['pi']); + } + + foreach ($packagesinfo['pi'] as $packageinfo) { + $info = $packageinfo['p']; + $package = $info['n']; + $releases = isset($packageinfo['a']) ? $packageinfo['a'] : false; + unset($latest); + unset($unstable); + unset($stable); + unset($state); + + if ($releases) { + if (!isset($releases['r'][0])) { + $releases['r'] = array($releases['r']); + } + foreach ($releases['r'] as $release) { + if (!isset($latest)) { + if ($dostable && $release['s'] == 'stable') { + $latest = $release['v']; + $state = 'stable'; + } + if (!$dostable) { + $latest = $release['v']; + $state = $release['s']; + } + } + if (!isset($stable) && $release['s'] == 'stable') { + $stable = $release['v']; + if (!isset($unstable)) { + $unstable = $stable; + } + } + if (!isset($unstable) && $release['s'] != 'stable') { + $unstable = $release['v']; + $state = $release['s']; + } + if (isset($latest) && !isset($state)) { + $state = $release['s']; + } + if (isset($latest) && isset($stable) && isset($unstable)) { + break; + } + } + } + + if ($basic) { // remote-list command + if (!isset($latest)) { + $latest = false; + } + if ($dostable) { + // $state is not set if there are no releases + if (isset($state) && $state == 'stable') { + $ret[$package] = array('stable' => $latest); + } else { + $ret[$package] = array('stable' => '-n/a-'); + } + } else { + $ret[$package] = array('stable' => $latest); + } + continue; + } + + // list-all command + $deps = array(); + if (!isset($unstable)) { + $unstable = false; + $state = 'stable'; + if (isset($stable)) { + $latest = $unstable = $stable; + } + } else { + $latest = $unstable; + } + + if (!isset($latest)) { + $latest = false; + } + + if ($latest && isset($packageinfo['deps'])) { + if (!is_array($packageinfo['deps']) || + !isset($packageinfo['deps'][0])) { + $packageinfo['deps'] = array($packageinfo['deps']); + } + $d = false; + foreach ($packageinfo['deps'] as $dep) { + if ($dep['v'] == $latest) { + $d = unserialize($dep['d']); + } + } + if ($d) { + if (isset($d['required'])) { + if (!class_exists('PEAR_PackageFile_v2')) { + require_once 'PEAR/PackageFile/v2.php'; + } + if (!isset($pf)) { + $pf = new PEAR_PackageFile_v2; + } + $pf->setDeps($d); + $tdeps = $pf->getDeps(); + } else { + $tdeps = $d; + } + foreach ($tdeps as $dep) { + if ($dep['type'] !== 'pkg') { + continue; + } + $deps[] = $dep; + } + } + } + + $info = array('stable' => $latest, 'summary' => $info['s'], + 'description' => + $info['d'], 'deps' => $deps, 'category' => $info['ca']['_content'], + 'unstable' => $unstable, 'state' => $state); + $ret[$package] = $info; + } + } + PEAR::popErrorHandling(); + return $ret; + } + + /** + * List all categories of a REST server + * + * @param string $base base URL of the server + * @return array of categorynames + */ + function listCategories($base, $channel = false) + { + $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml', false, false, $channel); + if (PEAR::isError($categorylist)) { + return $categorylist; + } + if (!is_array($categorylist) || !isset($categorylist['c'])) { + return array(); + } + if (isset($categorylist['c']['_content'])) { + // only 1 category + $categorylist['c'] = array($categorylist['c']); + } + return $categorylist['c']; + } + + /** + * List packages in a category of a REST server + * + * @param string $base base URL of the server + * @param string $category name of the category + * @param boolean $info also download full package info + * @return array of packagenames + */ + function listCategory($base, $category, $info = false, $channel = false) + { + if ($info == false) { + $url = '%s'.'c/%s/packages.xml'; + } else { + $url = '%s'.'c/%s/packagesinfo.xml'; + } + $url = sprintf($url, + $base, + urlencode($category)); + + // gives '404 Not Found' error when category doesn't exist + $packagelist = $this->_rest->retrieveData($url, false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + if (!is_array($packagelist)) { + return array(); + } + + if ($info == false) { + if (!isset($packagelist['p'])) { + return array(); + } + if (!is_array($packagelist['p']) || + !isset($packagelist['p'][0])) { // only 1 pkg + $packagelist = array($packagelist['p']); + } else { + $packagelist = $packagelist['p']; + } + return $packagelist; + } else { + // info == true + if (!isset($packagelist['pi'])) { + return array(); + } + if (!is_array($packagelist['pi']) || + !isset($packagelist['pi'][0])) { // only 1 pkg + $packagelist_pre = array($packagelist['pi']); + } else { + $packagelist_pre = $packagelist['pi']; + } + + $packagelist = array(); + foreach ($packagelist_pre as $i => $item) { + // compatibility with r/.xml + if (isset($item['a']['r'][0])) { + // multiple releases + $item['p']['v'] = $item['a']['r'][0]['v']; + $item['p']['st'] = $item['a']['r'][0]['s']; + } elseif (isset($item['a'])) { + // first and only release + $item['p']['v'] = $item['a']['r']['v']; + $item['p']['st'] = $item['a']['r']['s']; + } + + $packagelist[$i] = array('attribs' => $item['p']['r'], + '_content' => $item['p']['n'], + 'info' => $item['p']); + } + } + + return $packagelist; + } + + /** + * Return an array containing all of the states that are more stable than + * or equal to the passed in state + * + * @param string Release state + * @param boolean Determines whether to include $state in the list + * @return false|array False if $state is not a valid release state + */ + function betterStates($state, $include = false) + { + static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); + $i = array_search($state, $states); + if ($i === false) { + return false; + } + if ($include) { + $i--; + } + return array_slice($states, $i + 1); + } +} ?> \ No newline at end of file diff --git a/includes/pear/PEAR/REST/13.php b/includes/pear/PEAR/REST/13.php new file mode 100644 index 00000000..875fd390 --- /dev/null +++ b/includes/pear/PEAR/REST/13.php @@ -0,0 +1,280 @@ + + * @copyright 1997-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: 13.php,v 1.6 2008/04/11 01:16:40 dufuz Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a12 + */ + +/** + * For downloading REST xml/txt files + */ +require_once 'PEAR/REST.php'; +require_once 'PEAR/REST/10.php'; + +/** + * Implement REST 1.3 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2008 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: 1.7.2 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a12 + */ +class PEAR_REST_13 extends PEAR_REST_10 +{ + /** + * Retrieve information about a remote package to be downloaded from a REST server + * + * This is smart enough to resolve the minimum PHP version dependency prior to download + * @param string $base The uri to prepend to all REST calls + * @param array $packageinfo an array of format: + *
+     *  array(
+     *   'package' => 'packagename',
+     *   'channel' => 'channelname',
+     *  ['state' => 'alpha' (or valid state),]
+     *  -or-
+     *  ['version' => '1.whatever']
+     * 
+ * @param string $prefstate Current preferred_state config variable value + * @param bool $installed the installed version of this package to compare against + * @return array|false|PEAR_Error see {@link _returnDownloadURL()} + */ + function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false) + { + $channel = $packageinfo['channel']; + $package = $packageinfo['package']; + $states = $this->betterStates($prefstate, true); + if (!$states) { + return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); + } + $state = isset($packageinfo['state']) ? $packageinfo['state'] : null; + $version = isset($packageinfo['version']) ? $packageinfo['version'] : null; + $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases2.xml'); + if (PEAR::isError($info)) { + return PEAR::raiseError('No releases available for package "' . + $channel . '/' . $package . '"'); + } + if (!isset($info['r'])) { + return false; + } + $release = $found = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + $skippedphp = false; + foreach ($info['r'] as $release) { + if (!isset($this->_rest->_options['force']) && ($installed && + version_compare($release['v'], $installed, '<'))) { + continue; + } + if (isset($state)) { + // try our preferred state first + if ($release['s'] == $state) { + if (!isset($version) && version_compare($release['m'], phpversion(), '>')) { + // skip releases that require a PHP version newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; + break; + } + // see if there is something newer and more stable + // bug #7221 + if (in_array($release['s'], $this->betterStates($state), true)) { + if (!isset($version) && version_compare($release['m'], phpversion(), '>')) { + // skip releases that require a PHP version newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; + break; + } + } elseif (isset($version)) { + if ($release['v'] == $version) { + if (!isset($this->_rest->_options['force']) && + !isset($version) && + version_compare($release['m'], phpversion(), '>')) { + // skip releases that require a PHP version newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; + break; + } + } else { + if (in_array($release['s'], $states)) { + if (version_compare($release['m'], phpversion(), '>')) { + // skip releases that require a PHP version newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; + break; + } + } + } + if (!$found && $skippedphp) { + $found = null; + } + return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel); + } + + function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage, + $prefstate = 'stable', $installed = false, $channel = false) + { + $channel = $dependency['channel']; + $package = $dependency['name']; + $states = $this->betterStates($prefstate, true); + if (!$states) { + return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); + } + $state = isset($dependency['state']) ? $dependency['state'] : null; + $version = isset($dependency['version']) ? $dependency['version'] : null; + $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases2.xml'); + if (PEAR::isError($info)) { + return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package'] + . '" dependency "' . $channel . '/' . $package . '" has no releases'); + } + if (!is_array($info) || !isset($info['r'])) { + return false; + } + $exclude = array(); + $min = $max = $recommended = false; + if ($xsdversion == '1.0') { + $pinfo['package'] = $dependency['name']; + $pinfo['channel'] = 'pear.php.net'; // this is always true - don't change this + switch ($dependency['rel']) { + case 'ge' : + $min = $dependency['version']; + break; + case 'gt' : + $min = $dependency['version']; + $exclude = array($dependency['version']); + break; + case 'eq' : + $recommended = $dependency['version']; + break; + case 'lt' : + $max = $dependency['version']; + $exclude = array($dependency['version']); + break; + case 'le' : + $max = $dependency['version']; + break; + case 'ne' : + $exclude = array($dependency['version']); + break; + } + } else { + $pinfo['package'] = $dependency['name']; + $min = isset($dependency['min']) ? $dependency['min'] : false; + $max = isset($dependency['max']) ? $dependency['max'] : false; + $recommended = isset($dependency['recommended']) ? + $dependency['recommended'] : false; + if (isset($dependency['exclude'])) { + if (!isset($dependency['exclude'][0])) { + $exclude = array($dependency['exclude']); + } + } + } + $found = false; + $release = false; + $skippedphp = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + foreach ($info['r'] as $release) { + if (!isset($this->_rest->_options['force']) && ($installed && + version_compare($release['v'], $installed, '<'))) { + continue; + } + if (in_array($release['v'], $exclude)) { // skip excluded versions + continue; + } + // allow newer releases to say "I'm OK with the dependent package" + if ($xsdversion == '2.0' && isset($release['co'])) { + if (!is_array($release['co']) || !isset($release['co'][0])) { + $release['co'] = array($release['co']); + } + foreach ($release['co'] as $entry) { + if (isset($entry['x']) && !is_array($entry['x'])) { + $entry['x'] = array($entry['x']); + } elseif (!isset($entry['x'])) { + $entry['x'] = array(); + } + if ($entry['c'] == $deppackage['channel'] && + strtolower($entry['p']) == strtolower($deppackage['package']) && + version_compare($deppackage['version'], $entry['min'], '>=') && + version_compare($deppackage['version'], $entry['max'], '<=') && + !in_array($release['v'], $entry['x'])) { + if (version_compare($release['m'], phpversion(), '>')) { + // skip dependency releases that require a PHP version + // newer than our PHP version + $skippedphp = $release; + continue; + } + $recommended = $release['v']; + break; + } + } + } + if ($recommended) { + if ($release['v'] != $recommended) { // if we want a specific + // version, then skip all others + continue; + } else { + if (!in_array($release['s'], $states)) { + // the stability is too low, but we must return the + // recommended version if possible + return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel); + } + } + } + if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions + continue; + } + if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions + continue; + } + if ($installed && version_compare($release['v'], $installed, '<')) { + continue; + } + if (in_array($release['s'], $states)) { // if in the preferred state... + if (version_compare($release['m'], phpversion(), '>')) { + // skip dependency releases that require a PHP version + // newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; // ... then use it + break; + } + } + if (!$found && $skippedphp) { + $found = null; + } + return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel); + } +} +?> \ No newline at end of file diff --git a/includes/pear/PEAR/Registry.php b/includes/pear/PEAR/Registry.php index 088207ff..556366d3 100644 --- a/includes/pear/PEAR/Registry.php +++ b/includes/pear/PEAR/Registry.php @@ -15,9 +15,9 @@ * @author Stig Bakken * @author Tomas V. V. Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Registry.php,v 1.143 2005/10/31 05:06:43 cellog Exp $ + * @version CVS: $Id: Registry.php,v 1.171 2008/05/14 04:16:08 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -41,9 +41,9 @@ define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6); * @author Stig Bakken * @author Tomas V. V. Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -141,39 +141,51 @@ class PEAR_Registry extends PEAR $pecl_channel = false) { parent::PEAR(); + $this->setInstallDir($pear_install_dir); + $this->_pearChannel = $pear_channel; + $this->_peclChannel = $pecl_channel; + $this->_config = false; + } + + function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR) + { $ds = DIRECTORY_SEPARATOR; $this->install_dir = $pear_install_dir; $this->channelsdir = $pear_install_dir.$ds.'.channels'; $this->statedir = $pear_install_dir.$ds.'.registry'; $this->filemap = $pear_install_dir.$ds.'.filemap'; $this->lockfile = $pear_install_dir.$ds.'.lock'; - $this->_pearChannel = $pear_channel; - $this->_peclChannel = $pecl_channel; - $this->_config = false; } function hasWriteAccess() { - if (!@file_exists($this->install_dir)) { + if (!file_exists($this->install_dir)) { $dir = $this->install_dir; while ($dir && $dir != '.') { + $olddir = $dir; $dir = dirname($dir); // cd .. - if ($dir != '.' && @file_exists($dir)) { - if (@is_writeable($dir)) { + if ($dir != '.' && file_exists($dir)) { + if (is_writeable($dir)) { return true; } else { return false; } } + if ($dir == $olddir) { // this can happen in safe mode + return @is_writable($dir); + } } return false; } - return @is_writeable($this->install_dir); + return is_writeable($this->install_dir); } - function setConfig(&$config) + function setConfig(&$config, $resetInstallDir = true) { $this->_config = &$config; + if ($resetInstallDir) { + $this->setInstallDir($config->get('php_dir')); + } } function _initializeChannelDirs() @@ -250,10 +262,11 @@ class PEAR_Registry extends PEAR $ds = DIRECTORY_SEPARATOR; // XXX Compatibility code should be removed in the future // rename all registry files if any to lowercase - if (!OS_WINDOWS && $handle = @opendir($this->statedir)) { + if (!OS_WINDOWS && file_exists($this->statedir) && is_dir($this->statedir) && + $handle = opendir($this->statedir)) { $dest = $this->statedir . $ds; while (false !== ($file = readdir($handle))) { - if (preg_match('/^.*[A-Z].*\.reg$/', $file)) { + if (preg_match('/^.*[A-Z].*\.reg\\z/', $file)) { rename($dest . $file, $dest . strtolower($file)); } } @@ -286,12 +299,16 @@ class PEAR_Registry extends PEAR $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config); if (PEAR::isError($this->_dependencyDB)) { // attempt to recover by removing the dep db - @unlink($this->_config->get('php_dir', null, 'pear.php.net') . - DIRECTORY_SEPARATOR . '.depdb'); + if (file_exists($this->_config->get('php_dir', null, 'pear.php.net') . + DIRECTORY_SEPARATOR . '.depdb')) { + @unlink($this->_config->get('php_dir', null, 'pear.php.net') . + DIRECTORY_SEPARATOR . '.depdb'); + } $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config); if (PEAR::isError($this->_dependencyDB)) { echo $this->_dependencyDB->getMessage(); - die('Unrecoverable error'); + echo 'Unrecoverable error'; + exit(1); } } $initializing = false; @@ -332,7 +349,7 @@ class PEAR_Registry extends PEAR return $this->_assertChannelStateDir($channel); } static $init = false; - if (!@is_dir($this->statedir)) { + if (!file_exists($this->statedir)) { if (!$this->hasWriteAccess()) { return false; } @@ -341,13 +358,20 @@ class PEAR_Registry extends PEAR return $this->raiseError("could not create directory '{$this->statedir}'"); } $init = true; + } elseif (!is_dir($this->statedir)) { + return $this->raiseError('Cannot create directory ' . $this->statedir . ', ' . + 'it already exists and is not a directory'); } $ds = DIRECTORY_SEPARATOR; - if (!@is_dir($this->channelsdir) || - !file_exists($this->channelsdir . $ds . 'pear.php.net.reg') || - !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') || - !file_exists($this->channelsdir . $ds . '__uri.reg')) { - $init = true; + if (!file_exists($this->channelsdir)) { + if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg') || + !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') || + !file_exists($this->channelsdir . $ds . '__uri.reg')) { + $init = true; + } + } elseif (!is_dir($this->channelsdir)) { + return $this->raiseError('Cannot create directory ' . $this->channelsdir . ', ' . + 'it already exists and is not a directory'); } if ($init) { static $running = false; @@ -389,7 +413,7 @@ class PEAR_Registry extends PEAR !file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) { $this->_initializeChannelDirs(); } - if (!@is_dir($channelDir)) { + if (!file_exists($channelDir)) { if (!$this->hasWriteAccess()) { return false; } @@ -398,6 +422,9 @@ class PEAR_Registry extends PEAR return $this->raiseError("could not create directory '" . $channelDir . "'"); } + } elseif (!is_dir($channelDir)) { + return $this->raiseError("could not create directory '" . $channelDir . + "', already exists and is not a directory"); } return true; } @@ -415,7 +442,7 @@ class PEAR_Registry extends PEAR */ function _assertChannelDir() { - if (!@is_dir($this->channelsdir)) { + if (!file_exists($this->channelsdir)) { if (!$this->hasWriteAccess()) { return false; } @@ -423,8 +450,12 @@ class PEAR_Registry extends PEAR if (!System::mkdir(array('-p', $this->channelsdir))) { return $this->raiseError("could not create directory '{$this->channelsdir}'"); } + } elseif (!is_dir($this->channelsdir)) { + return $this->raiseError("could not create directory '{$this->channelsdir}" . + "', it already exists and is not a directory"); + } - if (!@is_dir($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) { + if (!file_exists($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) { if (!$this->hasWriteAccess()) { return false; } @@ -432,6 +463,10 @@ class PEAR_Registry extends PEAR if (!System::mkdir(array('-p', $this->channelsdir . DIRECTORY_SEPARATOR . '.alias'))) { return $this->raiseError("could not create directory '{$this->channelsdir}/.alias'"); } + } elseif (!is_dir($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) { + return $this->raiseError("could not create directory '{$this->channelsdir}" . + "/.alias', it already exists and is not a directory"); + } return true; } @@ -469,7 +504,7 @@ class PEAR_Registry extends PEAR function _channelFileName($channel, $noaliases = false) { if (!$noaliases) { - if (@file_exists($this->_getChannelAliasFileName($channel))) { + if (file_exists($this->_getChannelAliasFileName($channel))) { $channel = implode('', file($this->_getChannelAliasFileName($channel))); } } @@ -536,6 +571,9 @@ class PEAR_Registry extends PEAR return false; } $channel = $this->_getChannel($channel); + if (PEAR::isError($channel)) { + return $channel; + } return $channel->getAlias(); } // }}} @@ -577,6 +615,9 @@ class PEAR_Registry extends PEAR return null; } $file = $this->_packageFileName($package, $channel); + if (!file_exists($file) && $mode == 'r' || $mode == 'rb') { + return null; + } $fp = @fopen($file, $mode); if (!$fp) { return null; @@ -593,7 +634,7 @@ class PEAR_Registry extends PEAR } // }}} - // {{{ _openPackageFile() + // {{{ _openChannelFile() function _openChannelFile($channel, $mode) { @@ -604,6 +645,9 @@ class PEAR_Registry extends PEAR return null; } $file = $this->_channelFileName($channel); + if (!file_exists($file) && $mode == 'r' || $mode == 'rb') { + return null; + } $fp = @fopen($file, $mode); if (!$fp) { return null; @@ -661,9 +705,15 @@ class PEAR_Registry extends PEAR } $file = preg_replace(',^/+,', '', $file); if ($channel != 'pear.php.net') { + if (!isset($files[$attrs['role']])) { + $files[$attrs['role']] = array(); + } $files[$attrs['role']][$file] = array(strtolower($channel), strtolower($package)); } else { + if (!isset($files[$attrs['role']])) { + $files[$attrs['role']] = array(); + } $files[$attrs['role']][$file] = strtolower($package); } } @@ -688,21 +738,19 @@ class PEAR_Registry extends PEAR function _readFileMap() { + if (!file_exists($this->filemap)) { + return array(); + } $fp = @fopen($this->filemap, 'r'); if (!$fp) { - return $this->raiseError('PEAR_Registry: could not open filemap', PEAR_REGISTRY_ERROR_FILE, null, null, $php_errormsg); + return $this->raiseError('PEAR_Registry: could not open filemap "' . $this->filemap . '"', PEAR_REGISTRY_ERROR_FILE, null, null, $php_errormsg); } clearstatcache(); $rt = get_magic_quotes_runtime(); set_magic_quotes_runtime(0); $fsize = filesize($this->filemap); - if (function_exists('file_get_contents')) { - fclose($fp); - $data = file_get_contents($this->filemap); - } else { - $data = fread($fp, $fsize); - fclose($fp); - } + fclose($fp); + $data = file_get_contents($this->filemap); set_magic_quotes_runtime($rt); $tmp = unserialize($data); if (!$tmp && $fsize > 7) { @@ -744,7 +792,7 @@ class PEAR_Registry extends PEAR $open_mode = 'w'; // XXX People reported problems with LOCK_SH and 'w' if ($mode === LOCK_SH || $mode === LOCK_UN) { - if (@!is_file($this->lockfile)) { + if (!file_exists($this->lockfile)) { touch($this->lockfile); } $open_mode = 'r'; @@ -755,6 +803,7 @@ class PEAR_Registry extends PEAR } if (!is_resource($this->lock_fp)) { + $this->lock_fp = null; return $this->raiseError("could not create lock file" . (isset($php_errormsg) ? ": " . $php_errormsg : "")); } @@ -765,6 +814,9 @@ class PEAR_Registry extends PEAR case LOCK_UN: $str = 'unlock'; break; default: $str = 'unknown'; break; } + //is resource at this point, close it on error. + fclose($this->lock_fp); + $this->lock_fp = null; return $this->raiseError("could not acquire $str lock ($this->lockfile)", PEAR_REGISTRY_ERROR_LOCK); } @@ -836,8 +888,13 @@ class PEAR_Registry extends PEAR return false; } $checker = $this->_getChannel($channel->getName()); + if (PEAR::isError($checker)) { + return $checker; + } if ($channel->getAlias() != $checker->getAlias()) { - @unlink($this->_getChannelAliasFileName($checker->getAlias())); + if (file_exists($this->_getChannelAliasFileName($checker->getAlias()))) { + @unlink($this->_getChannelAliasFileName($checker->getAlias())); + } } } else { if ($update && !in_array($channel->getName(), array('pear.php.net', 'pecl.php.net'))) { @@ -930,14 +987,17 @@ class PEAR_Registry extends PEAR return false; } $file = $this->_getChannelAliasFileName($this->_getAlias($channel)); - if (@file_exists($file)) { + if (file_exists($file)) { $test = @unlink($file); if (!$test) { return false; } } $file = $this->_channelFileName($channel); - $ret = @unlink($file); + $ret = true; + if (file_exists($file)) { + $ret = @unlink($file); + } return $ret; } @@ -995,13 +1055,8 @@ class PEAR_Registry extends PEAR $rt = get_magic_quotes_runtime(); set_magic_quotes_runtime(0); clearstatcache(); - if (function_exists('file_get_contents')) { - $this->_closePackageFile($fp); - $data = file_get_contents($this->_packageFileName($package, $channel)); - } else { - $data = fread($fp, filesize($this->_packageFileName($package, $channel))); - $this->_closePackageFile($fp); - } + $this->_closePackageFile($fp); + $data = file_get_contents($this->_packageFileName($package, $channel)); set_magic_quotes_runtime($rt); $data = unserialize($data); if ($key === null) { @@ -1037,13 +1092,8 @@ class PEAR_Registry extends PEAR $rt = get_magic_quotes_runtime(); set_magic_quotes_runtime(0); clearstatcache(); - if (function_exists('file_get_contents')) { - $this->_closeChannelFile($fp); - $data = file_get_contents($this->_channelFileName($channel)); - } else { - $data = fread($fp, filesize($this->_channelFileName($channel))); - $this->_closeChannelFile($fp); - } + $this->_closeChannelFile($fp); + $data = file_get_contents($this->_channelFileName($channel)); set_magic_quotes_runtime($rt); $data = unserialize($data); return $data; @@ -1055,15 +1105,19 @@ class PEAR_Registry extends PEAR function _listChannels() { $channellist = array(); - $dp = @opendir($this->channelsdir); - if (!$dp || !@is_dir($this->channelsdir)) { + if (!file_exists($this->channelsdir) || !is_dir($this->channelsdir)) { return array('pear.php.net', 'pecl.php.net', '__uri'); } + $dp = opendir($this->channelsdir); while ($ent = readdir($dp)) { if ($ent{0} == '.' || substr($ent, -4) != '.reg') { continue; } - $channellist[] = substr($ent, 0, -4); + if ($ent == '__uri.reg') { + $channellist[] = '__uri'; + continue; + } + $channellist[] = str_replace('_', '/', substr($ent, 0, -4)); } closedir($dp); if (!in_array('pear.php.net', $channellist)) { @@ -1074,7 +1128,9 @@ class PEAR_Registry extends PEAR } if (!in_array('__uri', $channellist)) { $channellist[] = '__uri'; - } + } + + natsort($channellist); return $channellist; } @@ -1086,8 +1142,11 @@ class PEAR_Registry extends PEAR if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') { return $this->_listChannelPackages($channel); } + if (!file_exists($this->statedir) || !is_dir($this->statedir)) { + return array(); + } $pkglist = array(); - $dp = @opendir($this->statedir); + $dp = opendir($this->statedir); if (!$dp) { return $pkglist; } @@ -1107,7 +1166,11 @@ class PEAR_Registry extends PEAR function _listChannelPackages($channel) { $pkglist = array(); - $dp = @opendir($this->_channelDirectoryName($channel)); + if (!file_exists($this->_channelDirectoryName($channel)) || + !is_dir($this->_channelDirectoryName($channel))) { + return array(); + } + $dp = opendir($this->_channelDirectoryName($channel)); if (!$dp) { return $pkglist; } @@ -1164,12 +1227,16 @@ class PEAR_Registry extends PEAR */ function _addPackage2($info) { + if (!is_a($info, 'PEAR_PackageFile_v1') && !is_a($info, 'PEAR_PackageFile_v2')) { + return false; + } + if (!$info->validate()) { if (class_exists('PEAR_Common')) { $ui = PEAR_Frontend::singleton(); if ($ui) { foreach ($info->getValidationWarnings() as $err) { - $ui->log(2, $err['message']); + $ui->log($err['message'], true); } } } @@ -1284,19 +1351,29 @@ class PEAR_Registry extends PEAR /** * @param string channel name * @param bool whether to strictly retrieve channel names - * @return PEAR_ChannelFile|false + * @return PEAR_ChannelFile|PEAR_Error * @access private */ function &_getChannel($channel, $noaliases = false) { $ch = false; if ($this->_channelExists($channel, $noaliases)) { - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; + $chinfo = $this->_channelInfo($channel, $noaliases); + if ($chinfo) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + $ch = &PEAR_ChannelFile::fromArrayWithErrors($chinfo); } - $ch = &PEAR_ChannelFile::fromArray($this->_channelInfo($channel, $noaliases)); } if ($ch) { + if ($ch->validate()) { + return $ch; + } + foreach ($ch->getErrors(true) as $err) { + $message = $err['message'] . "\n"; + } + $ch = PEAR::raiseError($message); return $ch; } if ($this->_getChannelFromAlias($channel) == 'pear.php.net') { @@ -1628,7 +1705,11 @@ class PEAR_Registry extends PEAR return $e; } $file = $this->_packageFileName($package, $channel); - $ret = @unlink($file); + if (file_exists($file)) { + $ret = @unlink($file); + } else { + $ret = false; + } $this->_rebuildFileMap(); $this->_unlock(); $p = array('channel' => $channel, 'package' => $package); @@ -1650,6 +1731,9 @@ class PEAR_Registry extends PEAR $ret = $this->_updatePackage($package, $info, $merge); $this->_unlock(); if ($ret) { + if (!class_exists('PEAR_PackageFile_v1')) { + require_once 'PEAR/PackageFile/v1.php'; + } $pf = new PEAR_PackageFile_v1; $pf->setConfig($this->_config); $pf->fromArray($this->packageInfo($package)); @@ -1687,7 +1771,7 @@ class PEAR_Registry extends PEAR /** * @param string channel name * @param bool whether to strictly return raw channels (no aliases) - * @return PEAR_ChannelFile|false + * @return PEAR_ChannelFile|PEAR_Error */ function &getChannel($channel, $noaliases = false) { @@ -1696,6 +1780,9 @@ class PEAR_Registry extends PEAR } $ret = &$this->_getChannel($channel, $noaliases); $this->_unlock(); + if (!$ret) { + return PEAR::raiseError('Unknown channel: ' . $channel); + } return $ret; } @@ -1769,7 +1856,7 @@ class PEAR_Registry extends PEAR function &getChannelValidator($channel) { $chan = $this->getChannel($channel); - if (!$chan) { + if (PEAR::isError($chan)) { return $chan; } $val = $chan->getValidationObject(); @@ -1788,7 +1875,11 @@ class PEAR_Registry extends PEAR return $e; } foreach ($this->_listChannels() as $channel) { - $ret[] = &$this->_getChannel($channel); + $e = &$this->_getChannel($channel); + if (!$e || PEAR::isError($e)) { + continue; + } + $ret[] = $e; } $this->_unlock(); return $ret; @@ -1879,6 +1970,18 @@ class PEAR_Registry extends PEAR return false; } + // }}} + // {{{ flush() + /** + * Force a reload of the filemap + * @since 1.5.0RC3 + */ + function flushFileMap() + { + $this->filemap_cache = null; + clearstatcache(); // ensure that the next read gets the full, current filemap + } + // }}} // {{{ apiVersion() /** @@ -1926,7 +2029,7 @@ class PEAR_Registry extends PEAR $param['channel'] = '__uri'; } } else { - $components = @parse_url($param); + $components = @parse_url((string) $param); if (isset($components['scheme'])) { if ($components['scheme'] == 'http') { // uri package @@ -2109,7 +2212,9 @@ class PEAR_Registry extends PEAR } $ret = 'channel://' . $upass . $parsed['channel'] . '/' . $parsed['package']; if (isset($parsed['version']) || isset($parsed['state'])) { - $ret .= '-' . @$parsed['version'] . @$parsed['state']; + $ver = isset($parsed['version']) ? $parsed['version'] : ''; + $ver .= isset($parsed['state']) ? $parsed['state'] : ''; + $ret .= '-' . $ver; } if (isset($parsed['extension'])) { $ret .= '.' . $parsed['extension']; diff --git a/includes/pear/PEAR/Remote.php b/includes/pear/PEAR/Remote.php index e22d4a6e..09ddb997 100644 --- a/includes/pear/PEAR/Remote.php +++ b/includes/pear/PEAR/Remote.php @@ -14,9 +14,9 @@ * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Remote.php,v 1.74 2005/09/11 18:00:20 cellog Exp $ + * @version CVS: $Id: Remote.php,v 1.80 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -38,9 +38,9 @@ require_once 'PEAR/Config.php'; * @package PEAR * @author Stig Bakken * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ @@ -91,13 +91,8 @@ class PEAR_Remote extends PEAR if (!$fp) { return null; } - if (function_exists('file_get_contents')) { - fclose($fp); - $content = file_get_contents($filename); - } else { - $content = fread($fp, filesize($filename)); - fclose($fp); - } + fclose($fp); + $content = file_get_contents($filename); $result = array( 'age' => time() - filemtime($filename), 'lastChange' => filemtime($filename), @@ -151,7 +146,7 @@ class PEAR_Remote extends PEAR $server_channel = $this->config->get('default_channel'); $channel = $this->_registry->getChannel($server_channel); - if ($channel) { + if (!PEAR::isError($channel)) { $mirror = $this->config->get('preferred_mirror'); if ($channel->getMirror($mirror)) { if ($channel->supports('xmlrpc', $method, $mirror)) { @@ -182,15 +177,20 @@ class PEAR_Remote extends PEAR if ($this->cache !== null && $this->cache['age'] < $cachettl) { return $this->cache['content']; } + $fp = false; if (extension_loaded("xmlrpc")) { $result = call_user_func_array(array(&$this, 'call_epi'), $args); if (!PEAR::isError($result)) { $this->saveCache($_args, $result); } return $result; - } elseif (!@include_once 'XML/RPC.php') { + } elseif (!($fp = fopen('XML/RPC.php', 'r', true))) { return $this->raiseError("For this remote PEAR operation you need to load the xmlrpc extension or install XML_RPC"); } + include_once 'XML/RPC.php'; + if ($fp) { + fclose($fp); + } array_shift($args); $username = $this->config->get('username'); @@ -207,13 +207,13 @@ class PEAR_Remote extends PEAR } $proxy_host = $proxy_port = $proxy_user = $proxy_pass = ''; if ($proxy = parse_url($this->config->get('http_proxy'))) { - $proxy_host = @$proxy['host']; + $proxy_host = isset($proxy['host']) ? $proxy['host'] : null; if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') { $proxy_host = 'https://' . $proxy_host; } - $proxy_port = @$proxy['port']; - $proxy_user = @urldecode(@$proxy['user']); - $proxy_pass = @urldecode(@$proxy['pass']); + $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080; + $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null; + $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null; } $shost = $server_host; if ($channel->getSSL()) { @@ -251,33 +251,12 @@ class PEAR_Remote extends PEAR function call_epi($method) { - do { - if (extension_loaded("xmlrpc")) { - break; - } - if (OS_WINDOWS) { - $ext = 'dll'; - } elseif (PHP_OS == 'HP-UX') { - $ext = 'sl'; - } elseif (PHP_OS == 'AIX') { - $ext = 'a'; - } else { - $ext = 'so'; - } - $ext = OS_WINDOWS ? 'dll' : 'so'; - @dl("xmlrpc-epi.$ext"); - if (extension_loaded("xmlrpc")) { - break; - } - @dl("xmlrpc.$ext"); - if (extension_loaded("xmlrpc")) { - break; - } - return $this->raiseError("unable to load xmlrpc extension"); - } while (false); + if (!extension_loaded("xmlrpc")) { + return $this->raiseError("xmlrpc extension is not loaded"); + } $server_channel = $this->config->get('default_channel'); $channel = $this->_registry->getChannel($server_channel); - if ($channel) { + if (!PEAR::isError($channel)) { $mirror = $this->config->get('preferred_mirror'); if ($channel->getMirror($mirror)) { if ($channel->supports('xmlrpc', $method, $mirror)) { @@ -307,13 +286,13 @@ class PEAR_Remote extends PEAR if ($http_proxy = $this->config->get('http_proxy')) { $proxy = parse_url($http_proxy); $proxy_host = $proxy_port = $proxy_user = $proxy_pass = ''; - $proxy_host = @$proxy['host']; + $proxy_host = isset($proxy['host']) ? $proxy['host'] : null; if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') { - $proxy_host = 'ssl://' . $proxy_host; + $proxy_host = 'https://' . $proxy_host; } - $proxy_port = @$proxy['port']; - $proxy_user = @urldecode(@$proxy['user']); - $proxy_pass = @urldecode(@$proxy['pass']); + $proxy_port = isset($proxy['port']) ? $proxy['port'] : null; + $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null; + $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null; $fp = @fsockopen($proxy_host, $proxy_port); $use_proxy = true; if ($channel->getSSL()) { diff --git a/includes/pear/PEAR/RunTest.php b/includes/pear/PEAR/RunTest.php index 7c337c20..85f49d9b 100644 --- a/includes/pear/PEAR/RunTest.php +++ b/includes/pear/PEAR/RunTest.php @@ -14,9 +14,9 @@ * @package PEAR * @author Tomas V.V.Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: RunTest.php,v 1.15 2005/09/13 15:20:42 cellog Exp $ + * @version CVS: $Id: RunTest.php,v 1.67 2008/05/14 02:30:16 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.3.3 */ @@ -42,16 +42,49 @@ putenv("PHP_PEAR_RUNTESTS=1"); * @package PEAR * @author Tomas V.V.Cox * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.3.3 */ class PEAR_RunTest { + var $_headers = array(); var $_logger; var $_options; + var $_php; + var $tests_count; + var $xdebug_loaded; + /** + * Saved value of php executable, used to reset $_php when we + * have a test that uses cgi + * + * @var unknown_type + */ + var $_savephp; + var $ini_overwrites = array( + 'output_handler=', + 'open_basedir=', + 'safe_mode=0', + 'disable_functions=', + 'output_buffering=Off', + 'display_errors=1', + 'log_errors=0', + 'html_errors=0', + 'track_errors=1', + 'report_memleaks=0', + 'report_zend_debug=0', + 'docref_root=', + 'docref_ext=.html', + 'error_prepend_string=', + 'error_append_string=', + 'auto_prepend_file=', + 'auto_append_file=', + 'magic_quotes_runtime=0', + 'xdebug.default_enable=0', + 'allow_url_fopen=1', + ); /** * An object that supports the PEAR_Common->log() signature, or null @@ -59,38 +92,706 @@ class PEAR_RunTest */ function PEAR_RunTest($logger = null, $options = array()) { + if (!defined('E_DEPRECATED')) { + define('E_DEPRECATED', 0); + } + if (!defined('E_STRICT')) { + define('E_STRICT', 0); + } + $this->ini_overwrites[] = 'error_reporting=' . (E_ALL & ~(E_DEPRECATED | E_STRICT)); if (is_null($logger)) { require_once 'PEAR/Common.php'; $logger = new PEAR_Common; } - $this->_logger = $logger; + $this->_logger = $logger; $this->_options = $options; + + $conf = &PEAR_Config::singleton(); + $this->_php = $conf->get('php_bin'); } - // - // Run an individual test case. - // - - function run($file, $ini_settings = '') + /** + * Taken from php-src/run-tests.php + * + * @param string $commandline command name + * @param array $env + * @param string $stdin standard input to pass to the command + * @return unknown + */ + function system_with_timeout($commandline, $env = null, $stdin = null) { - $cwd = getcwd(); - $conf = &PEAR_Config::singleton(); - $php = $conf->get('php_bin'); - //var_dump($php);exit; - global $log_format, $info_params, $ini_overwrites; + $data = ''; + if (version_compare(phpversion(), '5.0.0', '<')) { + $proc = proc_open($commandline, array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w') + ), $pipes); + } else { + $proc = proc_open($commandline, array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w') + ), $pipes, null, $env, array('suppress_errors' => true)); + } - $info_params = ''; - $log_format = 'LEOD'; + if (!$proc) { + return false; + } - // Load the sections of the test file. - $section_text = array( - 'TEST' => '(unnamed test)', - 'SKIPIF' => '', - 'GET' => '', - 'ARGS' => '', - ); + if (is_string($stdin)) { + fwrite($pipes[0], $stdin); + } + fclose($pipes[0]); + + while (true) { + /* hide errors from interrupted syscalls */ + $r = $pipes; + $e = $w = null; + $n = @stream_select($r, $w, $e, 60); + + if ($n === 0) { + /* timed out */ + $data .= "\n ** ERROR: process timed out **\n"; + proc_terminate($proc); + return array(1234567890, $data); + } else if ($n > 0) { + $line = fread($pipes[1], 8192); + if (strlen($line) == 0) { + /* EOF */ + break; + } + $data .= $line; + } + } + if (function_exists('proc_get_status')) { + $stat = proc_get_status($proc); + if ($stat['signaled']) { + $data .= "\nTermsig=".$stat['stopsig']; + } + } + $code = proc_close($proc); + if (function_exists('proc_get_status')) { + $code = $stat['exitcode']; + } + return array($code, $data); + } + + /** + * Turns a PHP INI string into an array + * + * Turns -d "include_path=/foo/bar" into this: + * array( + * 'include_path' => array( + * 'operator' => '-d', + * 'value' => '/foo/bar', + * ) + * ) + * Works both with quotes and without + * + * @param string an PHP INI string, -d "include_path=/foo/bar" + * @return array + */ + function iniString2array($ini_string) + { + if (!$ini_string) { + return array(); + } + $split = preg_split('/[\s]|=/', $ini_string, -1, PREG_SPLIT_NO_EMPTY); + $key = $split[1][0] == '"' ? substr($split[1], 1) : $split[1]; + $value = $split[2][strlen($split[2]) - 1] == '"' ? substr($split[2], 0, -1) : $split[2]; + // FIXME review if this is really the struct to go with + $array = array($key => array('operator' => $split[0], 'value' => $value)); + return $array; + } + + function settings2array($settings, $ini_settings) + { + foreach ($settings as $setting) { + if (strpos($setting, '=') !== false) { + $setting = explode('=', $setting, 2); + $name = trim(strtolower($setting[0])); + $value = trim($setting[1]); + $ini_settings[$name] = $value; + } + } + return $ini_settings; + } + + function settings2params($ini_settings) + { + $settings = ''; + foreach ($ini_settings as $name => $value) { + if (is_array($value)) { + $operator = $value['operator']; + $value = $value['value']; + } else { + $operator = '-d'; + } + $value = addslashes($value); + $settings .= " $operator \"$name=$value\""; + } + return $settings; + } + + function runPHPUnit($file, $ini_settings = '') + { + if (!file_exists($file) && file_exists(getcwd() . DIRECTORY_SEPARATOR . $file)) { + $file = realpath(getcwd() . DIRECTORY_SEPARATOR . $file); + break; + } elseif (file_exists($file)) { + $file = realpath($file); + } + $cmd = "$this->_php$ini_settings -f $file"; + if (isset($this->_logger)) { + $this->_logger->log(2, 'Running command "' . $cmd . '"'); + } + + $savedir = getcwd(); // in case the test moves us around + chdir(dirname($file)); + echo `$cmd`; + chdir($savedir); + return 'PASSED'; // we have no way of knowing this information so assume passing + } + + /** + * Runs an individual test case. + * + * @param string The filename of the test + * @param array|string INI settings to be applied to the test run + * @param integer Number what the current running test is of the + * whole test suite being runned. + * + * @return string|object Returns PASSED, WARNED, FAILED depending on how the + * test came out. + * PEAR Error when the tester it self fails + */ + function run($file, $ini_settings = array(), $test_number = 1) + { + if (isset($this->_savephp)) { + $this->_php = $this->_savephp; + unset($this->_savephp); + } + if (empty($this->_options['cgi'])) { + // try to see if php-cgi is in the path + $res = $this->system_with_timeout('php-cgi -v'); + if (false !== $res && !(is_array($res) && $res === array(127, ''))) { + $this->_options['cgi'] = 'php-cgi'; + } + } + if (1 < $len = strlen($this->tests_count)) { + $test_number = str_pad($test_number, $len, ' ', STR_PAD_LEFT); + $test_nr = "[$test_number/$this->tests_count] "; + } else { + $test_nr = ''; + } $file = realpath($file); + $section_text = $this->_readFile($file); + if (PEAR::isError($section_text)) { + return $section_text; + } + + if (isset($section_text['POST_RAW']) && isset($section_text['UPLOAD'])) { + return PEAR::raiseError("Cannot contain both POST_RAW and UPLOAD in test file: $file"); + } + + $cwd = getcwd(); + + $pass_options = ''; + if (!empty($this->_options['ini'])) { + $pass_options = $this->_options['ini']; + } + + if (is_string($ini_settings)) { + $ini_settings = $this->iniString2array($ini_settings); + } + + $ini_settings = $this->settings2array($this->ini_overwrites, $ini_settings); + if ($section_text['INI']) { + if (strpos($section_text['INI'], '{PWD}') !== false) { + $section_text['INI'] = str_replace('{PWD}', dirname($file), $section_text['INI']); + } + $ini = preg_split( "/[\n\r]+/", $section_text['INI']); + $ini_settings = $this->settings2array($ini, $ini_settings); + } + $ini_settings = $this->settings2params($ini_settings); + $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file); + + $tested = trim($section_text['TEST']); + $tested.= !isset($this->_options['simple']) ? "[$shortname]" : ' '; + + if (!empty($section_text['POST']) || !empty($section_text['POST_RAW']) || + !empty($section_text['UPLOAD']) || !empty($section_text['GET']) || + !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { + if (empty($this->_options['cgi'])) { + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "SKIP $test_nr$tested (reason: --cgi option needed for this test, type 'pear help run-tests')"); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' # skip --cgi option needed for this test, "pear help run-tests" for info'); + } + return 'SKIPPED'; + } + $this->_savephp = $this->_php; + $this->_php = $this->_options['cgi']; + } + + $temp_dir = realpath(dirname($file)); + $main_file_name = basename($file, 'phpt'); + $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'diff'; + $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'log'; + $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'exp'; + $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'out'; + $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'mem'; + $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'php'; + $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'skip.php'; + $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php'; + $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.'); + + // unlink old test results + $this->_cleanupOldFiles($file); + + // Check if test should be skipped. + $res = $this->_runSkipIf($section_text, $temp_skipif, $tested, $ini_settings); + if (count($res) != 2) { + return $res; + } + $info = $res['info']; + $warn = $res['warn']; + + // We've satisfied the preconditions - run the test! + if (isset($this->_options['coverage']) && $this->xdebug_loaded) { + $len_f = 5; + if (substr($section_text['FILE'], 0, 5) != '')); + $xdebug_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'xdebug'; + $text .= "\n" . + "\n" . '$xdebug = var_export(xdebug_get_code_coverage(), true);'; + if (!function_exists('file_put_contents')) { + $text .= "\n" . '$fh = fopen(\'' . $xdebug_file . '\', "wb");' . + "\n" . 'if ($fh !== false) {' . + "\n" . ' fwrite($fh, $xdebug);' . + "\n" . ' fclose($fh);' . + "\n" . '}'; + } else { + $text .= "\n" . 'file_put_contents(\'' . $xdebug_file . '\', $xdebug);'; + } + $text .= "\n" . 'xdebug_stop_code_coverage();' . "\n" . '?>'; + + $this->save_text($temp_file, $text); + } else { + $this->save_text($temp_file, $section_text['FILE']); + } + + $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; + $cmd = "$this->_php$ini_settings -f \"$temp_file\" $args 2>&1"; + if (isset($this->_logger)) { + $this->_logger->log(2, 'Running command "' . $cmd . '"'); + } + + // Reset environment from any previous test. + $env = $this->_resetEnv($section_text, $temp_file); + + $section_text = $this->_processUpload($section_text, $file); + if (PEAR::isError($section_text)) { + return $section_text; + } + + if (array_key_exists('POST_RAW', $section_text) && !empty($section_text['POST_RAW'])) { + $post = trim($section_text['POST_RAW']); + $raw_lines = explode("\n", $post); + + $request = ''; + $started = false; + foreach ($raw_lines as $i => $line) { + if (empty($env['CONTENT_TYPE']) && + preg_match('/^Content-Type:(.*)/i', $line, $res)) { + $env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1])); + continue; + } + if ($started) { + $request .= "\n"; + } + $started = true; + $request .= $line; + } + + $env['CONTENT_LENGTH'] = strlen($request); + $env['REQUEST_METHOD'] = 'POST'; + + $this->save_text($tmp_post, $request); + $cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post"; + } elseif (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { + $post = trim($section_text['POST']); + $this->save_text($tmp_post, $post); + $content_length = strlen($post); + + $env['REQUEST_METHOD'] = 'POST'; + $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; + $env['CONTENT_LENGTH'] = $content_length; + + $cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post"; + } else { + $env['REQUEST_METHOD'] = 'GET'; + $env['CONTENT_TYPE'] = ''; + $env['CONTENT_LENGTH'] = ''; + } + + if (OS_WINDOWS && isset($section_text['RETURNS'])) { + ob_start(); + system($cmd, $return_value); + $out = ob_get_contents(); + ob_end_clean(); + $section_text['RETURNS'] = (int) trim($section_text['RETURNS']); + $returnfail = ($return_value != $section_text['RETURNS']); + } else { + $returnfail = false; + $stdin = isset($section_text['STDIN']) ? $section_text['STDIN'] : null; + $out = $this->system_with_timeout($cmd, $env, $stdin); + $return_value = $out[0]; + $out = $out[1]; + } + + $output = preg_replace('/\r\n/', "\n", trim($out)); + + if (isset($tmp_post) && realpath($tmp_post) && file_exists($tmp_post)) { + @unlink(realpath($tmp_post)); + } + chdir($cwd); // in case the test moves us around + + $this->_testCleanup($section_text, $temp_clean); + + /* when using CGI, strip the headers from the output */ + $output = $this->_stripHeadersCGI($output); + + if (isset($section_text['EXPECTHEADERS'])) { + $testheaders = $this->_processHeaders($section_text['EXPECTHEADERS']); + $missing = array_diff_assoc($testheaders, $this->_headers); + $changed = ''; + foreach ($missing as $header => $value) { + if (isset($this->_headers[$header])) { + $changed .= "-$header: $value\n+$header: "; + $changed .= $this->_headers[$header]; + } else { + $changed .= "-$header: $value\n"; + } + } + if ($missing) { + // tack on failed headers to output: + $output .= "\n====EXPECTHEADERS FAILURE====:\n$changed"; + } + } + // Does the output match what is expected? + do { + if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { + if (isset($section_text['EXPECTF'])) { + $wanted = trim($section_text['EXPECTF']); + } else { + $wanted = trim($section_text['EXPECTREGEX']); + } + $wanted_re = preg_replace('/\r\n/', "\n", $wanted); + if (isset($section_text['EXPECTF'])) { + $wanted_re = preg_quote($wanted_re, '/'); + // Stick to basics + $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy + $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); + $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); + $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); + $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); + $wanted_re = str_replace("%c", ".", $wanted_re); + // %f allows two points "-.0.0" but that is the best *simple* expression + } + /* DEBUG YOUR REGEX HERE + var_dump($wanted_re); + print(str_repeat('=', 80) . "\n"); + var_dump($output); + */ + if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { + if (file_exists($temp_file)) { + unlink($temp_file); + } + if (array_key_exists('FAIL', $section_text)) { + break; + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $test_nr$tested$info"); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + } else { + if (isset($section_text['EXPECTFILE'])) { + $f = $temp_dir . '/' . trim($section_text['EXPECTFILE']); + if (!($fp = @fopen($f, 'rb'))) { + return PEAR::raiseError('--EXPECTFILE-- section file ' . + $f . ' not found'); + } + fclose($fp); + $section_text['EXPECT'] = file_get_contents($f); + } + $wanted = preg_replace('/\r\n/', "\n", trim($section_text['EXPECT'])); + // compare and leave on success + if (!$returnfail && 0 == strcmp($output, $wanted)) { + if (file_exists($temp_file)) { + unlink($temp_file); + } + if (array_key_exists('FAIL', $section_text)) { + break; + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $test_nr$tested$info"); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + } + } while (false); + + if (array_key_exists('FAIL', $section_text)) { + // we expect a particular failure + // this is only used for testing PEAR_RunTest + $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null; + $faildiff = $this->generate_diff($wanted, $output, null, $expectf); + $faildiff = preg_replace('/\r/', '', $faildiff); + $wanted = preg_replace('/\r/', '', trim($section_text['FAIL'])); + if ($faildiff == $wanted) { + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $test_nr$tested$info"); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + unset($section_text['EXPECTF']); + $output = $faildiff; + if (isset($section_text['RETURNS'])) { + return PEAR::raiseError('Cannot have both RETURNS and FAIL in the same test: ' . + $file); + } + } + + // Test failed so we need to report details. + $txt = $warn ? 'WARN ' : 'FAIL '; + $this->_logger->log(0, $txt . $test_nr . $tested . $info); + + // write .exp + $res = $this->_writeLog($exp_filename, $wanted); + if (PEAR::isError($res)) { + return $res; + } + + // write .out + $res = $this->_writeLog($output_filename, $output); + if (PEAR::isError($res)) { + return $res; + } + + // write .diff + $returns = isset($section_text['RETURNS']) ? + array(trim($section_text['RETURNS']), $return_value) : null; + $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null; + $data = $this->generate_diff($wanted, $output, $returns, $expectf); + $res = $this->_writeLog($diff_filename, $data); + if (PEAR::isError($res)) { + return $res; + } + + // write .log + $data = " +---- EXPECTED OUTPUT +$wanted +---- ACTUAL OUTPUT +$output +---- FAILED +"; + + if ($returnfail) { + $data .= " +---- EXPECTED RETURN +$section_text[RETURNS] +---- ACTUAL RETURN +$return_value +"; + } + + $res = $this->_writeLog($log_filename, $data); + if (PEAR::isError($res)) { + return $res; + } + + if (isset($this->_options['tapoutput'])) { + $wanted = explode("\n", $wanted); + $wanted = "# Expected output:\n#\n#" . implode("\n#", $wanted); + $output = explode("\n", $output); + $output = "#\n#\n# Actual output:\n#\n#" . implode("\n#", $output); + return array($wanted . $output . 'not ok', ' - ' . $tested); + } + return $warn ? 'WARNED' : 'FAILED'; + } + + function generate_diff($wanted, $output, $rvalue, $wanted_re) + { + $w = explode("\n", $wanted); + $o = explode("\n", $output); + $wr = explode("\n", $wanted_re); + $w1 = array_diff_assoc($w, $o); + $o1 = array_diff_assoc($o, $w); + $o2 = $w2 = array(); + foreach ($w1 as $idx => $val) { + if (!$wanted_re || !isset($wr[$idx]) || !isset($o1[$idx]) || + !preg_match('/^' . $wr[$idx] . '\\z/', $o1[$idx])) { + $w2[sprintf("%03d<", $idx)] = sprintf("%03d- ", $idx + 1) . $val; + } + } + foreach ($o1 as $idx => $val) { + if (!$wanted_re || !isset($wr[$idx]) || + !preg_match('/^' . $wr[$idx] . '\\z/', $val)) { + $o2[sprintf("%03d>", $idx)] = sprintf("%03d+ ", $idx + 1) . $val; + } + } + $diff = array_merge($w2, $o2); + ksort($diff); + $extra = $rvalue ? "##EXPECTED: $rvalue[0]\r\n##RETURNED: $rvalue[1]" : ''; + return implode("\r\n", $diff) . $extra; + } + + // Write the given text to a temporary file, and return the filename. + function save_text($filename, $text) + { + if (!$fp = fopen($filename, 'w')) { + return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)"); + } + fwrite($fp, $text); + fclose($fp); + if (1 < DETAILED) echo " +FILE $filename {{{ +$text +}}} +"; + } + + function _cleanupOldFiles($file) + { + $temp_dir = realpath(dirname($file)); + $mainFileName = basename($file, 'phpt'); + $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'diff'; + $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'log'; + $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'exp'; + $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'out'; + $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'mem'; + $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'php'; + $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'skip.php'; + $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'clean.php'; + $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.'); + + // unlink old test results + @unlink($diff_filename); + @unlink($log_filename); + @unlink($exp_filename); + @unlink($output_filename); + @unlink($memcheck_filename); + @unlink($temp_file); + @unlink($temp_skipif); + @unlink($tmp_post); + @unlink($temp_clean); + } + + function _runSkipIf($section_text, $temp_skipif, $tested, $ini_settings) + { + $info = ''; + $warn = false; + if (array_key_exists('SKIPIF', $section_text) && trim($section_text['SKIPIF'])) { + $this->save_text($temp_skipif, $section_text['SKIPIF']); + $output = $this->system_with_timeout("$this->_php$ini_settings -f \"$temp_skipif\""); + $output = $output[1]; + $loutput = ltrim($output); + unlink($temp_skipif); + if (!strncasecmp('skip', $loutput, 4)) { + $skipreason = "SKIP $tested"; + if (preg_match('/^\s*skip\s*(.+)\s*/i', $output, $m)) { + $skipreason .= '(reason: ' . $m[1] . ')'; + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, $skipreason); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' # skip ' . $reason); + } + return 'SKIPPED'; + } + + if (!strncasecmp('info', $loutput, 4) + && preg_match('/^\s*info\s*(.+)\s*/i', $output, $m)) { + $info = " (info: $m[1])"; + } + + if (!strncasecmp('warn', $loutput, 4) + && preg_match('/^\s*warn\s*(.+)\s*/i', $output, $m)) { + $warn = true; /* only if there is a reason */ + $info = " (warn: $m[1])"; + } + } + + return array('warn' => $warn, 'info' => $info); + } + + function _stripHeadersCGI($output) + { + $this->headers = array(); + if (!empty($this->_options['cgi']) && + $this->_php == $this->_options['cgi'] && + preg_match("/^(.*?)(?:\n\n(.*)|\\z)/s", $output, $match)) { + $output = isset($match[2]) ? trim($match[2]) : ''; + $this->_headers = $this->_processHeaders($match[1]); + } + + return $output; + } + + /** + * Return an array that can be used with array_diff() to compare headers + * + * @param string $text + */ + function _processHeaders($text) + { + $headers = array(); + $rh = preg_split("/[\n\r]+/", $text); + foreach ($rh as $line) { + if (strpos($line, ':')!== false) { + $line = explode(':', $line, 2); + $headers[trim($line[0])] = trim($line[1]); + } + } + return $headers; + } + + function _readFile($file) + { + // Load the sections of the test file. + $section_text = array( + 'TEST' => '(unnamed test)', + 'SKIPIF' => '', + 'GET' => '', + 'COOKIE' => '', + 'POST' => '', + 'ARGS' => '', + 'INI' => '', + 'CLEAN' => '', + ); + if (!is_file($file) || !$fp = fopen($file, "r")) { return PEAR::raiseError("Cannot open test file: $file"); } @@ -100,290 +801,127 @@ class PEAR_RunTest $line = fgets($fp); // Match the beginning of a section. - if (ereg('^--([A-Z]+)--',$line,$r)) { + if (preg_match('/^--([_A-Z]+)--/', $line, $r)) { $section = $r[1]; $section_text[$section] = ''; continue; } elseif (empty($section)) { fclose($fp); return PEAR::raiseError("Invalid sections formats in test file: $file"); - } + } // Add to the section text. $section_text[$section] .= $line; } fclose($fp); - $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file); - if (!isset($this->_options['simple'])) { - $tested = trim($section_text['TEST']) . "[$shortname]"; - } else { - $tested = trim($section_text['TEST']) . ' '; - } - - $tmp = realpath(dirname($file)); - $tmp_skipif = $tmp . uniqid('/phpt.'); - $tmp_file = ereg_replace('\.phpt$','.php',$file); - $tmp_post = $tmp . uniqid('/phpt.'); - - @unlink($tmp_skipif); - @unlink($tmp_file); - @unlink($tmp_post); - - // unlink old test results - @unlink(ereg_replace('\.phpt$','.diff',$file)); - @unlink(ereg_replace('\.phpt$','.log',$file)); - @unlink(ereg_replace('\.phpt$','.exp',$file)); - @unlink(ereg_replace('\.phpt$','.out',$file)); - - // Check if test should be skipped. - $info = ''; - $warn = false; - if (array_key_exists('SKIPIF', $section_text)) { - if (trim($section_text['SKIPIF'])) { - $this->save_text($tmp_skipif, $section_text['SKIPIF']); - //$extra = substr(PHP_OS, 0, 3) !== "WIN" ? - // "unset REQUEST_METHOD;": ""; - - //$output = `$extra $php $info_params -f $tmp_skipif`; - $output = `$php $info_params -f $tmp_skipif`; - unlink($tmp_skipif); - if (eregi("^skip", trim($output))) { - $skipreason = "SKIP $tested"; - $reason = (eregi("^skip[[:space:]]*(.+)\$", trim($output))) ? eregi_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $skipreason .= " (reason: $reason)"; - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, $skipreason); - } - if (isset($old_php)) { - $php = $old_php; - } - return 'SKIPPED'; - } - if (eregi("^info", trim($output))) { - $reason = (ereg("^info[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^info[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $info = " (info: $reason)"; - } - } - if (eregi("^warn", trim($output))) { - $reason = (ereg("^warn[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^warn[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $warn = true; /* only if there is a reason */ - $info = " (warn: $reason)"; - } - } - } - } - - // We've satisfied the preconditions - run the test! - $this->save_text($tmp_file,$section_text['FILE']); - - $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; - - $cmd = "$php$ini_settings -f $tmp_file$args 2>&1"; - if (isset($this->_logger)) { - $this->_logger->log(2, 'Running command "' . $cmd . '"'); - } - - $savedir = getcwd(); // in case the test moves us around - if (isset($section_text['RETURNS'])) { - ob_start(); - system($cmd, $return_value); - $out = ob_get_contents(); - ob_end_clean(); - @unlink($tmp_post); - $section_text['RETURNS'] = (int) trim($section_text['RETURNS']); - $returnfail = ($return_value != $section_text['RETURNS']); - } else { - $out = `$cmd`; - $returnfail = false; - } - chdir($savedir); - // Does the output match what is expected? - $output = trim($out); - $output = preg_replace('/\r\n/', "\n", $output); - - if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { - if (isset($section_text['EXPECTF'])) { - $wanted = trim($section_text['EXPECTF']); - } else { - $wanted = trim($section_text['EXPECTREGEX']); - } - $wanted_re = preg_replace('/\r\n/',"\n",$wanted); - if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); - // Stick to basics - $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy - $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); - $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); - $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); - $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); - $wanted_re = str_replace("%c", ".", $wanted_re); - // %f allows two points "-.0.0" but that is the best *simple* expression - } - /* DEBUG YOUR REGEX HERE - var_dump($wanted_re); - print(str_repeat('=', 80) . "\n"); - var_dump($output); - */ - if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { - @unlink($tmp_file); - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $tested$info"); - } - if (isset($old_php)) { - $php = $old_php; - } - return 'PASSED'; - } - - } else { - $wanted = trim($section_text['EXPECT']); - $wanted = preg_replace('/\r\n/',"\n",$wanted); - // compare and leave on success - $ok = (0 == strcmp($output,$wanted)); - if (!$returnfail && $ok) { - @unlink($tmp_file); - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $tested$info"); - } - if (isset($old_php)) { - $php = $old_php; - } - return 'PASSED'; - } - } - - // Test failed so we need to report details. - if ($warn) { - $this->_logger->log(0, "WARN $tested$info"); - } else { - $this->_logger->log(0, "FAIL $tested$info"); - } - - if (isset($section_text['RETURNS'])) { - $GLOBALS['__PHP_FAILED_TESTS__'][] = array( - 'name' => $file, - 'test_name' => $tested, - 'output' => ereg_replace('\.phpt$','.log', $file), - 'diff' => ereg_replace('\.phpt$','.diff', $file), - 'info' => $info, - 'return' => $return_value - ); - } else { - $GLOBALS['__PHP_FAILED_TESTS__'][] = array( - 'name' => $file, - 'test_name' => $tested, - 'output' => ereg_replace('\.phpt$','.log', $file), - 'diff' => ereg_replace('\.phpt$','.diff', $file), - 'info' => $info, - ); - } - - // write .exp - if (strpos($log_format,'E') !== FALSE) { - $logname = ereg_replace('\.phpt$','.exp',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log,$wanted); - fclose($log); - } - - // write .out - if (strpos($log_format,'O') !== FALSE) { - $logname = ereg_replace('\.phpt$','.out',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log,$output); - fclose($log); - } - - // write .diff - if (strpos($log_format,'D') !== FALSE) { - $logname = ereg_replace('\.phpt$','.diff',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log, $this->generate_diff($wanted, $output, - isset($section_text['RETURNS']) ? array(trim($section_text['RETURNS']), - $return_value) : null)); - fclose($log); - } - - // write .log - if (strpos($log_format,'L') !== FALSE) { - $logname = ereg_replace('\.phpt$','.log',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log," ----- EXPECTED OUTPUT -$wanted ----- ACTUAL OUTPUT -$output ----- FAILED -"); - if ($returnfail) { - fwrite($log," ----- EXPECTED RETURN -$section_text[RETURNS] ----- ACTUAL RETURN -$return_value -"); - } - fclose($log); - //error_report($file,$logname,$tested); - } - - if (isset($old_php)) { - $php = $old_php; - } - - return $warn ? 'WARNED' : 'FAILED'; + return $section_text; } - function generate_diff($wanted, $output, $return_value) + function _writeLog($logname, $data) { - $w = explode("\n", $wanted); - $o = explode("\n", $output); - $w1 = array_diff_assoc($w,$o); - $o1 = array_diff_assoc($o,$w); - $w2 = array(); - $o2 = array(); - foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1).$val; - foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1).$val; - $diff = array_merge($w2, $o2); - ksort($diff); - if ($return_value) { - $extra = "##EXPECTED: $return_value[0]\r\n##RETURNED: $return_value[1]"; - } else { - $extra = ''; + if (!$log = fopen($logname, 'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); } - return implode("\r\n", $diff) . $extra; + fwrite($log, $data); + fclose($log); } - // - // Write the given text to a temporary file, and return the filename. - // - - function save_text($filename, $text) + function _resetEnv($section_text, $temp_file) { - if (!$fp = fopen($filename, 'w')) { - return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)"); + $env = $_ENV; + $env['REDIRECT_STATUS'] = ''; + $env['QUERY_STRING'] = ''; + $env['PATH_TRANSLATED'] = ''; + $env['SCRIPT_FILENAME'] = ''; + $env['REQUEST_METHOD'] = ''; + $env['CONTENT_TYPE'] = ''; + $env['CONTENT_LENGTH'] = ''; + if (!empty($section_text['ENV'])) { + foreach (explode("\n", trim($section_text['ENV'])) as $e) { + $e = explode('=', trim($e), 2); + if (!empty($e[0]) && isset($e[1])) { + $env[$e[0]] = $e[1]; + } + } } - fwrite($fp,$text); - fclose($fp); - if (1 < DETAILED) echo " -FILE $filename {{{ -$text -}}} -"; + if (array_key_exists('GET', $section_text)) { + $env['QUERY_STRING'] = trim($section_text['GET']); + } else { + $env['QUERY_STRING'] = ''; + } + if (array_key_exists('COOKIE', $section_text)) { + $env['HTTP_COOKIE'] = trim($section_text['COOKIE']); + } else { + $env['HTTP_COOKIE'] = ''; + } + $env['REDIRECT_STATUS'] = '1'; + $env['PATH_TRANSLATED'] = $temp_file; + $env['SCRIPT_FILENAME'] = $temp_file; + + return $env; } -} -?> + function _processUpload($section_text, $file) + { + if (array_key_exists('UPLOAD', $section_text) && !empty($section_text['UPLOAD'])) { + $upload_files = trim($section_text['UPLOAD']); + $upload_files = explode("\n", $upload_files); + + $request = "Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737\n" . + "-----------------------------20896060251896012921717172737\n"; + foreach ($upload_files as $fileinfo) { + $fileinfo = explode('=', $fileinfo); + if (count($fileinfo) != 2) { + return PEAR::raiseError("Invalid UPLOAD section in test file: $file"); + } + if (!realpath(dirname($file) . '/' . $fileinfo[1])) { + return PEAR::raiseError("File for upload does not exist: $fileinfo[1] " . + "in test file: $file"); + } + $file_contents = file_get_contents(dirname($file) . '/' . $fileinfo[1]); + $fileinfo[1] = basename($fileinfo[1]); + $request .= "Content-Disposition: form-data; name=\"$fileinfo[0]\"; filename=\"$fileinfo[1]\"\n"; + $request .= "Content-Type: text/plain\n\n"; + $request .= $file_contents . "\n" . + "-----------------------------20896060251896012921717172737\n"; + } + + if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { + // encode POST raw + $post = trim($section_text['POST']); + $post = explode('&', $post); + foreach ($post as $i => $post_info) { + $post_info = explode('=', $post_info); + if (count($post_info) != 2) { + return PEAR::raiseError("Invalid POST data in test file: $file"); + } + $post_info[0] = rawurldecode($post_info[0]); + $post_info[1] = rawurldecode($post_info[1]); + $post[$i] = $post_info; + } + foreach ($post as $post_info) { + $request .= "Content-Disposition: form-data; name=\"$post_info[0]\"\n\n"; + $request .= $post_info[1] . "\n" . + "-----------------------------20896060251896012921717172737\n"; + } + unset($section_text['POST']); + } + $section_text['POST_RAW'] = $request; + } + + return $section_text; + } + + function _testCleanup($section_text, $temp_clean) + { + if ($section_text['CLEAN']) { + // perform test cleanup + $this->save_text($temp_clean, $section_text['CLEAN']); + $this->system_with_timeout("$this->_php $temp_clean"); + if (file_exists($temp_clean)) { + unlink($temp_clean); + } + } + } +} \ No newline at end of file diff --git a/includes/pear/PEAR/Task/Common.php b/includes/pear/PEAR/Task/Common.php index a5a31690..5841f286 100644 --- a/includes/pear/PEAR/Task/Common.php +++ b/includes/pear/PEAR/Task/Common.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Common.php,v 1.14 2005/09/18 06:32:00 cellog Exp $ + * @version CVS: $Id: Common.php,v 1.18 2008/05/13 21:28:20 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -51,9 +51,9 @@ define('PEAR_TASK_PACKAGEANDINSTALL', 3); * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 * @abstract @@ -121,7 +121,7 @@ class PEAR_Task_Common * @static * @abstract */ - function validXml($pkg, $xml, &$config, $fileXml) + function validateXml($pkg, $xml, $config, $fileXml) { } diff --git a/includes/pear/PEAR/Task/Postinstallscript.php b/includes/pear/PEAR/Task/Postinstallscript.php index 170a8591..024c0585 100644 --- a/includes/pear/PEAR/Task/Postinstallscript.php +++ b/includes/pear/PEAR/Task/Postinstallscript.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Postinstallscript.php,v 1.16 2005/10/19 04:52:54 cellog Exp $ + * @version CVS: $Id: Postinstallscript.php,v 1.20 2008/05/13 21:28:20 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -31,9 +31,9 @@ require_once 'PEAR/Task/Common.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -62,7 +62,7 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common * @param array the entire parsed tag * @static */ - function validateXml($pkg, $xml, &$config, $fileXml) + function validateXml($pkg, $xml, $config, $fileXml) { if ($fileXml['role'] != 'php') { return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . @@ -80,10 +80,14 @@ class PEAR_Task_Postinstallscript extends PEAR_Task_Common $fileXml['name'] . '" could not be retrieved for processing!'); } else { $analysis = $pkg->analyzeSourceCode($file, true); - if (PEAR::isError($analysis)) { + if (!$analysis) { PEAR::popErrorHandling(); + $warnings = ''; + foreach ($pkg->getValidationWarnings() as $warn) { + $warnings .= $warn['message'] . "\n"; + } return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "' . - $fileXml['name'] . '" failed'); + $fileXml['name'] . '" failed: ' . $warnings); } if (count($analysis['declared_classes']) != 1) { PEAR::popErrorHandling(); diff --git a/includes/pear/PEAR/Task/Postinstallscript/rw.php b/includes/pear/PEAR/Task/Postinstallscript/rw.php index 0d4b3435..3f2a97cc 100644 --- a/includes/pear/PEAR/Task/Postinstallscript/rw.php +++ b/includes/pear/PEAR/Task/Postinstallscript/rw.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: rw.php,v 1.10 2005/10/19 04:47:34 cellog Exp $ + * @version CVS: $Id: rw.php,v 1.12 2008/01/03 20:26:37 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a10 */ @@ -28,9 +28,9 @@ require_once 'PEAR/Task/Postinstallscript.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a10 */ diff --git a/includes/pear/PEAR/Task/Replace.php b/includes/pear/PEAR/Task/Replace.php index 33830786..9a941819 100644 --- a/includes/pear/PEAR/Task/Replace.php +++ b/includes/pear/PEAR/Task/Replace.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Replace.php,v 1.12 2005/10/02 06:29:39 cellog Exp $ + * @version CVS: $Id: Replace.php,v 1.17 2008/05/13 21:28:20 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -28,9 +28,9 @@ require_once 'PEAR/Task/Common.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -47,7 +47,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common * @param PEAR_Config * @static */ - function validateXml($pkg, $xml, &$config, $fileXml) + function validateXml($pkg, $xml, $config, $fileXml) { if (!isset($xml['attribs'])) { return array(PEAR_TASK_ERROR_NOATTRIBS); @@ -89,7 +89,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common } } else { return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'type', $xml['attribs']['type'], - array('pear-config', 'package-info')); + array('pear-config', 'package-info', 'php-const')); } return true; } @@ -126,7 +126,7 @@ class PEAR_Task_Replace extends PEAR_Task_Common } if ($a['to'] == 'master_server') { $chan = $this->registry->getChannel($pkg->getChannel()); - if ($chan) { + if (!PEAR::isError($chan)) { $to = $chan->getServer(); } else { $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]"); diff --git a/includes/pear/PEAR/Task/Replace/rw.php b/includes/pear/PEAR/Task/Replace/rw.php index ab86dbe1..fe03d2e6 100644 --- a/includes/pear/PEAR/Task/Replace/rw.php +++ b/includes/pear/PEAR/Task/Replace/rw.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: rw.php,v 1.2 2005/05/20 22:57:42 cellog Exp $ + * @version CVS: $Id: rw.php,v 1.4 2008/01/03 20:26:37 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a10 */ @@ -28,9 +28,9 @@ require_once 'PEAR/Task/Replace.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a10 */ diff --git a/includes/pear/PEAR/Task/Unixeol.php b/includes/pear/PEAR/Task/Unixeol.php index fdccf8e2..bfd3f11c 100644 --- a/includes/pear/PEAR/Task/Unixeol.php +++ b/includes/pear/PEAR/Task/Unixeol.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Unixeol.php,v 1.7 2005/10/02 06:29:39 cellog Exp $ + * @version CVS: $Id: Unixeol.php,v 1.10 2008/05/13 21:28:20 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -28,9 +28,9 @@ require_once 'PEAR/Task/Common.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -47,7 +47,7 @@ class PEAR_Task_Unixeol extends PEAR_Task_Common * @param PEAR_Config * @static */ - function validateXml($pkg, $xml, &$config, $fileXml) + function validateXml($pkg, $xml, $config, $fileXml) { if ($xml != '') { return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed'); diff --git a/includes/pear/PEAR/Task/Unixeol/rw.php b/includes/pear/PEAR/Task/Unixeol/rw.php index 8be0325f..f04f0f00 100644 --- a/includes/pear/PEAR/Task/Unixeol/rw.php +++ b/includes/pear/PEAR/Task/Unixeol/rw.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: rw.php,v 1.3 2005/10/18 23:42:13 cellog Exp $ + * @version CVS: $Id: rw.php,v 1.5 2008/01/03 20:26:37 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a10 */ @@ -28,9 +28,9 @@ require_once 'PEAR/Task/Unixeol.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a10 */ diff --git a/includes/pear/PEAR/Task/Windowseol.php b/includes/pear/PEAR/Task/Windowseol.php index bf40e6c5..1a1be1e4 100644 --- a/includes/pear/PEAR/Task/Windowseol.php +++ b/includes/pear/PEAR/Task/Windowseol.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Windowseol.php,v 1.6 2005/10/02 06:29:39 cellog Exp $ + * @version CVS: $Id: Windowseol.php,v 1.9 2008/05/13 21:28:20 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -28,9 +28,9 @@ require_once 'PEAR/Task/Common.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -47,7 +47,7 @@ class PEAR_Task_Windowseol extends PEAR_Task_Common * @param PEAR_Config * @static */ - function validateXml($pkg, $xml, &$config, $fileXml) + function validateXml($pkg, $xml, $config, $fileXml) { if ($xml != '') { return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed'); diff --git a/includes/pear/PEAR/Task/Windowseol/rw.php b/includes/pear/PEAR/Task/Windowseol/rw.php index 31b8c496..c61a15d8 100644 --- a/includes/pear/PEAR/Task/Windowseol/rw.php +++ b/includes/pear/PEAR/Task/Windowseol/rw.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: rw.php,v 1.3 2005/10/18 23:42:00 cellog Exp $ + * @version CVS: $Id: rw.php,v 1.5 2008/01/03 20:26:37 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a10 */ @@ -28,9 +28,9 @@ require_once 'PEAR/Task/Windowseol.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a10 */ diff --git a/includes/pear/PEAR/Validate.php b/includes/pear/PEAR/Validate.php index 17f1b2db..34796b79 100644 --- a/includes/pear/PEAR/Validate.php +++ b/includes/pear/PEAR/Validate.php @@ -13,9 +13,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Validate.php,v 1.44 2005/11/14 14:07:43 cellog Exp $ + * @version CVS: $Id: Validate.php,v 1.52 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -36,9 +36,9 @@ require_once 'PEAR/Validator/PECL.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -68,7 +68,7 @@ class PEAR_Validate */ function _validPackageName($name) { - return (bool) preg_match('/^' . $this->packageregex . '$/', $name); + return (bool) preg_match('/^' . $this->packageregex . '\\z/', $name); } /** @@ -80,7 +80,7 @@ class PEAR_Validate { if ($validatepackagename) { if (strtolower($name) == strtolower($validatepackagename)) { - return (bool) preg_match('/^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*$/', $name); + return (bool) preg_match('/^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*\\z/', $name); } } return $this->_validPackageName($name); @@ -95,7 +95,7 @@ class PEAR_Validate */ function validGroupName($name) { - return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '$/', $name); + return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/', $name); } /** @@ -188,7 +188,8 @@ class PEAR_Validate if ($this->_packagexml->getPackagexmlVersion() == '1.0') { $this->validateState(); $this->validateFilelist(); - } elseif ($this->_packagexml->getPackagexmlVersion() == '2.0') { + } elseif ($this->_packagexml->getPackagexmlVersion() == '2.0' || + $this->_packagexml->getPackagexmlVersion() == '2.1') { $this->validateTime(); $this->validateStability(); $this->validateDeps(); @@ -207,7 +208,8 @@ class PEAR_Validate { if ($this->_state == PEAR_VALIDATE_PACKAGING || $this->_state == PEAR_VALIDATE_NORMAL) { - if ($this->_packagexml->getPackagexmlVersion() == '2.0' && + if (($this->_packagexml->getPackagexmlVersion() == '2.0' || + $this->_packagexml->getPackagexmlVersion() == '2.1') && $this->_packagexml->getExtends()) { $version = $this->_packagexml->getVersion() . ''; $name = $this->_packagexml->getPackage(); @@ -286,6 +288,13 @@ class PEAR_Validate case 'beta' : // check for a package that extends a package, // like Foo and Foo2 + if ($this->_state == PEAR_VALIDATE_PACKAGING) { + if (substr($versioncomponents[2], 1, 2) == 'rc') { + $this->_addFailure('version', 'Release Candidate versions ' . + 'must have capital RC, not lower-case rc'); + return false; + } + } if (!$this->_packagexml->getExtends()) { if ($versioncomponents[0] == '1') { if ($versioncomponents[2]{0} == '0') { @@ -438,17 +447,18 @@ class PEAR_Validate { if ($this->_state == PEAR_VALIDATE_NORMAL || $this->_state == PEAR_VALIDATE_PACKAGING) { - if (!preg_match('/\d\d\d\d\-\d\d\-\d\d/', - $this->_packagexml->getDate())) { - $this->_addFailure('date', 'invalid release date "' . - $this->_packagexml->getDate() . '"'); - return false; - } - if (strtotime($this->_packagexml->getDate()) == -1) { + + if (!preg_match('/(\d\d\d\d)\-(\d\d)\-(\d\d)/', + $this->_packagexml->getDate(), $res) || + count($res) < 4 + || !checkdate($res[2], $res[3], $res[1]) + ) { $this->_addFailure('date', 'invalid release date "' . $this->_packagexml->getDate() . '"'); return false; } + + if ($this->_state == PEAR_VALIDATE_PACKAGING && $this->_packagexml->getDate() != date('Y-m-d')) { $this->_addWarning('date', 'Release Date "' . @@ -621,4 +631,4 @@ class PEAR_Validate return true; } } -?> \ No newline at end of file +?> diff --git a/includes/pear/PEAR/Validator/PECL.php b/includes/pear/PEAR/Validator/PECL.php index f5e107a4..354a5bed 100644 --- a/includes/pear/PEAR/Validator/PECL.php +++ b/includes/pear/PEAR/Validator/PECL.php @@ -7,9 +7,9 @@ * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PECL.php,v 1.4 2005/09/23 04:53:01 cellog Exp $ + * @version CVS: $Id: PECL.php,v 1.9 2008/01/03 20:26:37 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a5 */ @@ -22,9 +22,9 @@ require_once 'PEAR/Validate.php'; * @category pear * @package PEAR * @author Greg Beaver - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a5 */ @@ -32,13 +32,24 @@ class PEAR_Validator_PECL extends PEAR_Validate { function validateVersion() { + if ($this->_state == PEAR_VALIDATE_PACKAGING) { + $version = $this->_packagexml->getVersion(); + $versioncomponents = explode('.', $version); + $last = array_pop($versioncomponents); + if (substr($last, 1, 2) == 'rc') { + $this->_addFailure('version', 'Release Candidate versions must have ' . + 'upper-case RC, not lower-case rc'); + return false; + } + } return true; } function validatePackageName() { $ret = parent::validatePackageName(); - if ($this->_packagexml->getPackageType() == 'extsrc') { + if ($this->_packagexml->getPackageType() == 'extsrc' || + $this->_packagexml->getPackageType() == 'zendextsrc') { if (strtolower($this->_packagexml->getPackage()) != strtolower($this->_packagexml->getProvidesExtension())) { $this->_addWarning('providesextension', 'package name "' . diff --git a/includes/pear/PEAR/XMLParser.php b/includes/pear/PEAR/XMLParser.php index f703d74a..faabc073 100644 --- a/includes/pear/PEAR/XMLParser.php +++ b/includes/pear/PEAR/XMLParser.php @@ -1,6 +1,6 @@ * @author Stephan Schmidt (original XML_Unserializer code) - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: XMLParser.php,v 1.10 2005/09/25 03:49:02 cellog Exp $ + * @version CVS: $Id: XMLParser.php,v 1.13 2008/01/03 20:26:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -27,9 +27,9 @@ * @package PEAR * @author Greg Beaver * @author Stephan Schmidt (original XML_Unserializer code) - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.5 + * @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ @@ -91,12 +91,12 @@ class PEAR_XMLParser if (strpos($data, 'encoding="UTF-8"')) { $data = utf8_decode($data); } - $xp = @xml_parser_create('ISO-8859-1'); + $xp = xml_parser_create('ISO-8859-1'); } else { if (strpos($data, 'encoding="UTF-8"')) { - $xp = @xml_parser_create('UTF-8'); + $xp = xml_parser_create('UTF-8'); } else { - $xp = @xml_parser_create('ISO-8859-1'); + $xp = xml_parser_create('ISO-8859-1'); } } xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, 0); diff --git a/includes/pear/System.php b/includes/pear/System.php index e9cabdd6..534f0a97 100644 --- a/includes/pear/System.php +++ b/includes/pear/System.php @@ -13,9 +13,9 @@ * @category pear * @package System * @author Tomas V.V.Cox - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: System.php,v 1.51 2005/11/16 03:28:56 cellog Exp $ + * @version CVS: $Id: System.php,v 1.62 2008/01/03 20:26:34 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -35,7 +35,9 @@ $GLOBALS['_System_temp_files'] = array(); * Unix and Windows. The names and usage has been taken from its respectively * GNU commands. The functions will return (bool) false on error and will * trigger the error with the PHP trigger_error() function (you can silence -* the error by prefixing a '@' sign after the function call). +* the error by prefixing a '@' sign after the function call, but this +* is not recommended practice. Instead use an error handler with +* {@link set_error_handler()}). * * Documentation on this class you can find in: * http://pear.php.net/manual/ @@ -53,11 +55,12 @@ $GLOBALS['_System_temp_files'] = array(); * @category pear * @package System * @author Tomas V.V. Cox -* @copyright 1997-2005 The PHP Group +* @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 -* @version Release: 1.4.5 +* @version Release: 1.7.2 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 +* @static */ class System { @@ -68,6 +71,7 @@ class System * @param string $short_options the allowed option short-tags * @param string $long_options the allowed option long-tags * @return array the given options and there values + * @static * @access private */ function _parseArgs($argv, $short_options, $long_options = null) @@ -84,6 +88,7 @@ class System * * @param mixed $error a PEAR error or a string with the error message * @return bool false + * @static * @access private */ function raiseError($error) @@ -115,15 +120,19 @@ class System * @param string $sPath Name of the directory * @param integer $maxinst max. deep of the lookup * @param integer $aktinst starting deep of the lookup + * @param bool $silent if true, do not emit errors. * @return array the structure of the dir + * @static * @access private */ - function _dirToStruct($sPath, $maxinst, $aktinst = 0) + function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false) { $struct = array('dirs' => array(), 'files' => array()); if (($dir = @opendir($sPath)) === false) { - System::raiseError("Could not open dir $sPath"); + if (!$silent) { + System::raiseError("Could not open dir $sPath"); + } return $struct; // XXX could not open error } $struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ? @@ -136,10 +145,10 @@ class System closedir($dir); sort($list); if ($aktinst < $maxinst || $maxinst == 0) { - foreach($list as $val) { + foreach ($list as $val) { $path = $sPath . DIRECTORY_SEPARATOR . $val; if (is_dir($path) && !is_link($path)) { - $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1); + $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1, $silent); $struct = array_merge_recursive($tmp, $struct); } else { $struct['files'][] = $path; @@ -154,6 +163,7 @@ class System * * @param array $files Array listing files and dirs * @return array + * @static * @see System::_dirToStruct() */ function _multipleToStruct($files) @@ -177,15 +187,16 @@ class System * * @param string $args the arguments for rm * @return mixed PEAR_Error or true for success + * @static * @access public */ function rm($args) { - $opts = System::_parseArgs($args, 'rf'); // "f" do nothing but like it :-) + $opts = System::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-) if (PEAR::isError($opts)) { return System::raiseError($opts); } - foreach($opts[0] as $opt) { + foreach ($opts[0] as $opt) { if ($opt[0] == 'r') { $do_recursive = true; } @@ -193,12 +204,12 @@ class System $ret = true; if (isset($do_recursive)) { $struct = System::_multipleToStruct($opts[1]); - foreach($struct['files'] as $file) { + foreach ($struct['files'] as $file) { if (!@unlink($file)) { $ret = false; } } - foreach($struct['dirs'] as $dir) { + foreach ($struct['dirs'] as $dir) { if (!@rmdir($dir)) { $ret = false; } @@ -220,6 +231,7 @@ class System * The -p option will create parent directories * @param string $args the name of the director(y|ies) to create * @return bool True for success + * @static * @access public */ function mkDir($args) @@ -229,10 +241,10 @@ class System return System::raiseError($opts); } $mode = 0777; // default mode - foreach($opts[0] as $opt) { + foreach ($opts[0] as $opt) { if ($opt[0] == 'p') { $create_parents = true; - } elseif($opt[0] == 'm') { + } elseif ($opt[0] == 'm') { // if the mode is clearly an octal number (starts with 0) // convert it to decimal if (strlen($opt[1]) && $opt[1]{0} == '0') { @@ -246,9 +258,10 @@ class System } $ret = true; if (isset($create_parents)) { - foreach($opts[1] as $dir) { + foreach ($opts[1] as $dir) { $dirstack = array(); - while (!@is_dir($dir) && $dir != DIRECTORY_SEPARATOR) { + while ((!file_exists($dir) || !is_dir($dir)) && + $dir != DIRECTORY_SEPARATOR) { array_unshift($dirstack, $dir); $dir = dirname($dir); } @@ -264,7 +277,7 @@ class System } } else { foreach($opts[1] as $dir) { - if (!@is_dir($dir) && !mkdir($dir, $mode)) { + if ((@file_exists($dir) || !is_dir($dir)) && !mkdir($dir, $mode)) { $ret = false; } } @@ -284,6 +297,7 @@ class System * * @param string $args the arguments * @return boolean true on success + * @static * @access public */ function &cat($args) @@ -293,7 +307,9 @@ class System if (!is_array($args)) { $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); } - for($i=0; $i < count($args); $i++) { + + $count_args = count($args); + for ($i = 0; $i < $count_args; $i++) { if ($args[$i] == '>') { $mode = 'wb'; $outputfile = $args[$i+1]; @@ -306,6 +322,7 @@ class System $files[] = $args[$i]; } } + $outputfd = false; if (isset($mode)) { if (!$outputfd = fopen($outputfile, $mode)) { $err = System::raiseError("Could not open $outputfile"); @@ -319,7 +336,7 @@ class System continue; } while ($cont = fread($fd, 2048)) { - if (isset($outputfd)) { + if (is_resource($outputfd)) { fwrite($outputfd, $cont); } else { $ret .= $cont; @@ -327,7 +344,7 @@ class System } fclose($fd); } - if (@is_resource($outputfd)) { + if (is_resource($outputfd)) { fclose($outputfd); } return $ret; @@ -354,6 +371,7 @@ class System * @param string $args The arguments * @return mixed the full path of the created (file|dir) or false * @see System::tmpdir() + * @static * @access public */ function mktemp($args = null) @@ -363,10 +381,10 @@ class System if (PEAR::isError($opts)) { return System::raiseError($opts); } - foreach($opts[0] as $opt) { - if($opt[0] == 'd') { + foreach ($opts[0] as $opt) { + if ($opt[0] == 'd') { $tmp_is_dir = true; - } elseif($opt[0] == 't') { + } elseif ($opt[0] == 't') { $tmpdir = $opt[1]; } } @@ -396,6 +414,7 @@ class System * Remove temporary files created my mkTemp. This function is executed * at script shutdown time * + * @static * @access private */ function _removeTmpFiles() @@ -414,15 +433,19 @@ class System * Note: php.ini-recommended removes the "E" from the variables_order setting, * making unavaible the $_ENV array, that s why we do tests with _ENV * - * @return string The temporal directory on the system + * @static + * @return string The temporary directory on the system */ function tmpdir() { if (OS_WINDOWS) { + if ($var = isset($_ENV['TMP']) ? $_ENV['TMP'] : getenv('TMP')) { + return $var; + } if ($var = isset($_ENV['TEMP']) ? $_ENV['TEMP'] : getenv('TEMP')) { return $var; } - if ($var = isset($_ENV['TMP']) ? $_ENV['TMP'] : getenv('TMP')) { + if ($var = isset($_ENV['USERPROFILE']) ? $_ENV['USERPROFILE'] : getenv('USERPROFILE')) { return $var; } if ($var = isset($_ENV['windir']) ? $_ENV['windir'] : getenv('windir')) { @@ -433,7 +456,7 @@ class System if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) { return $var; } - return '/tmp'; + return realpath('/tmp'); } /** @@ -443,16 +466,16 @@ class System * @param mixed $fallback Value to return if $program is not found * * @return mixed A string with the full path or false if not found + * @static * @author Stig Bakken */ function which($program, $fallback = false) { - // avaible since 4.3.0RC2 - if (defined('PATH_SEPARATOR')) { - $path_delim = PATH_SEPARATOR; - } else { - $path_delim = OS_WINDOWS ? ';' : ':'; + // enforce API + if (!is_string($program) || '' == $program) { + return $fallback; } + // full path given if (basename($program) != $program) { $path_elements[] = dirname($program); @@ -465,12 +488,12 @@ class System $path = getenv('Path'); // some OSes are just stupid enough to do this } } - $path_elements = explode($path_delim, $path); + $path_elements = explode(PATH_SEPARATOR, $path); } if (OS_WINDOWS) { $exe_suffixes = getenv('PATHEXT') - ? explode($path_delim, getenv('PATHEXT')) + ? explode(PATH_SEPARATOR, getenv('PATHEXT')) : array('.exe','.bat','.cmd','.com'); // allow passing a command.exe param if (strpos($program, '.') !== false) { @@ -486,7 +509,7 @@ class System foreach ($exe_suffixes as $suff) { foreach ($path_elements as $dir) { $file = $dir . DIRECTORY_SEPARATOR . $program . $suff; - if ($pear_is_executable($file)) { + if (@$pear_is_executable($file)) { return $file; } } @@ -515,6 +538,7 @@ class System * * @param mixed Either array or string with the command line * @return array Array of found files + * @static * */ function find($args) @@ -522,11 +546,15 @@ class System if (!is_array($args)) { $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); } - $dir = array_shift($args); + $dir = realpath(array_shift($args)); + if (!$dir) { + return array(); + } $patterns = array(); $depth = 0; $do_files = $do_dirs = true; - for ($i = 0; $i < count($args); $i++) { + $args_count = count($args); + for ($i = 0; $i < $args_count; $i++) { switch ($args[$i]) { case '-type': if (in_array($args[$i+1], array('d', 'f'))) { @@ -539,18 +567,11 @@ class System $i++; break; case '-name': - if (OS_WINDOWS) { - if ($args[$i+1]{0} == '\\') { - // prepend drive - $args[$i+1] = addslashes(substr(getcwd(), 0, 2) . $args[$i + 1]); - } - // escape path separators to avoid PCRE problems - $args[$i+1] = str_replace('\\', '\\\\', $args[$i+1]); - } - $patterns[] = "(" . preg_replace(array('/\./', '/\*/'), - array('\.', '.*', ), - $args[$i+1]) - . ")"; + $name = preg_quote($args[$i+1], '#'); + // our magic characters ? and * have just been escaped, + // so now we change the escaped versions to PCRE operators + $name = strtr($name, array('\?' => '.', '\*' => '.*')); + $patterns[] = '('.$name.')'; $i++; break; case '-maxdepth': @@ -558,7 +579,7 @@ class System break; } } - $path = System::_dirToStruct($dir, $depth); + $path = System::_dirToStruct($dir, $depth, 0, true); if ($do_files && $do_dirs) { $files = array_merge($path['files'], $path['dirs']); } elseif ($do_dirs) { @@ -567,10 +588,14 @@ class System $files = $path['files']; } if (count($patterns)) { - $patterns = implode('|', $patterns); + $dsq = preg_quote(DIRECTORY_SEPARATOR, '#'); + $pattern = '#(^|'.$dsq.')'.implode('|', $patterns).'($|'.$dsq.')#'; $ret = array(); - for ($i = 0; $i < count($files); $i++) { - if (preg_match("#^$patterns\$#", $files[$i])) { + $files_count = count($files); + for ($i = 0; $i < $files_count; $i++) { + // only search in the part of the file below the current directory + $filepart = basename($files[$i]); + if (preg_match($pattern, $filepart)) { $ret[] = $files[$i]; } } @@ -578,5 +603,4 @@ class System } return $files; } -} -?> +} \ No newline at end of file diff --git a/includes/pear/XML/Parser.php b/includes/pear/XML/Parser.php index 858fcbce..5706acc5 100644 --- a/includes/pear/XML/Parser.php +++ b/includes/pear/XML/Parser.php @@ -1,36 +1,52 @@ | -// | Tomas V.V.Cox | -// | Stephan Schmidt | -// +----------------------------------------------------------------------+ -// -// $Id: Parser.php,v 1.26 2005/09/23 11:51:10 schst Exp $ + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** - * XML Parser class. + * XML_Parser * - * This is an XML parser based on PHP's "xml" extension, - * based on the bundled expat library. + * XML Parser package * - * @category XML - * @package XML_Parser - * @author Stig Bakken - * @author Tomas V.V.Cox - * @author Stephan Schmidt + * PHP versions 4 and 5 + * + * LICENSE: + * + * Copyright (c) 2002-2008 The PHP Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @category XML + * @package XML_Parser + * @author Stig Bakken + * @author Tomas V.V.Cox + * @author Stephan Schmidt + * @copyright 2002-2008 The PHP Group + * @license http://opensource.org/licenses/bsd-license New BSD License + * @version CVS: $Id: Parser.php,v 1.29 2008/08/24 21:48:21 ashnazg Exp $ + * @link http://pear.php.net/package/XML_Parser */ /** @@ -79,25 +95,29 @@ define('XML_PARSER_ERROR_REMOTE', 205); * - From revision 1.17, the function names used by the 'func' mode * are in the format "xmltag_$elem", for example: use "xmltag_name" * to handle the tags of your xml file. - * - * @category XML - * @package XML_Parser - * @author Stig Bakken - * @author Tomas V.V.Cox - * @author Stephan Schmidt - * @todo create XML_Parser_Namespace to parse documents with namespaces - * @todo create XML_Parser_Pull - * @todo Tests that need to be made: - * - mixing character encodings - * - a test using all expat handlers - * - options (folding, output charset) * - different parsing modes + * + * @category XML + * @package XML_Parser + * @author Stig Bakken + * @author Tomas V.V.Cox + * @author Stephan Schmidt + * @copyright 2002-2008 The PHP Group + * @license http://opensource.org/licenses/bsd-license New BSD License + * @version Release: @package_version@ + * @link http://pear.php.net/package/XML_Parser + * @todo create XML_Parser_Namespace to parse documents with namespaces + * @todo create XML_Parser_Pull + * @todo Tests that need to be made: + * - mixing character encodings + * - a test using all expat handlers + * - options (folding, output charset) */ class XML_Parser extends PEAR { // {{{ properties - /** + /** * XML parser handle * * @var resource @@ -164,8 +184,15 @@ class XML_Parser extends PEAR */ var $_handlerObj; + /** + * valid encodings + * + * @var array + */ + var $_validEncodings = array('ISO-8859-1', 'UTF-8', 'US-ASCII'); + // }}} - // {{{ constructor + // {{{ php4 constructor /** * Creates an XML parser. @@ -178,13 +205,14 @@ class XML_Parser extends PEAR * @param string $mode how this parser object should work, "event" for * startelement/endelement-type events, "func" * to have it call functions named after elements - * @param string $tgenc a valid target encoding + * @param string $tgtenc a valid target encoding */ function XML_Parser($srcenc = null, $mode = 'event', $tgtenc = null) { XML_Parser::__construct($srcenc, $mode, $tgtenc); } // }}} + // {{{ php5 constructor /** * PHP5 constructor @@ -194,7 +222,7 @@ class XML_Parser extends PEAR * @param string $mode how this parser object should work, "event" for * startelement/endelement-type events, "func" * to have it call functions named after elements - * @param string $tgenc a valid target encoding + * @param string $tgtenc a valid target encoding */ function __construct($srcenc = null, $mode = 'event', $tgtenc = null) { @@ -219,14 +247,16 @@ class XML_Parser extends PEAR * This method is only needed, when switching to a new * mode at a later point. * - * @access public - * @param string mode, either 'func' or 'event' - * @return boolean|object true on success, PEAR_Error otherwise + * @param string $mode mode, either 'func' or 'event' + * + * @return boolean|object true on success, PEAR_Error otherwise + * @access public */ function setMode($mode) { if ($mode != 'func' && $mode != 'event') { - $this->raiseError('Unsupported mode given', XML_PARSER_ERROR_UNSUPPORTED_MODE); + $this->raiseError('Unsupported mode given', + XML_PARSER_ERROR_UNSUPPORTED_MODE); } $this->mode = $mode; @@ -243,10 +273,11 @@ class XML_Parser extends PEAR * If no object will be set, XML_Parser assumes that you * extend this class and handle the events in $this. * - * @access public - * @param object object to handle the events - * @return boolean will always return true - * @since v1.2.0beta3 + * @param object &$obj object to handle the events + * + * @return boolean will always return true + * @access public + * @since v1.2.0beta3 */ function setHandlerObj(&$obj) { @@ -257,7 +288,8 @@ class XML_Parser extends PEAR /** * Init the element handlers * - * @access private + * @return mixed + * @access private */ function _initHandlers() { @@ -270,21 +302,22 @@ class XML_Parser extends PEAR } switch ($this->mode) { - case 'func': - xml_set_object($this->parser, $this->_handlerObj); - xml_set_element_handler($this->parser, array(&$this, 'funcStartHandler'), array(&$this, 'funcEndHandler')); - break; + case 'func': + xml_set_object($this->parser, $this->_handlerObj); + xml_set_element_handler($this->parser, + array(&$this, 'funcStartHandler'), array(&$this, 'funcEndHandler')); + break; - case 'event': - xml_set_object($this->parser, $this->_handlerObj); - xml_set_element_handler($this->parser, 'startHandler', 'endHandler'); - break; - default: - return $this->raiseError('Unsupported mode given', XML_PARSER_ERROR_UNSUPPORTED_MODE); - break; + case 'event': + xml_set_object($this->parser, $this->_handlerObj); + xml_set_element_handler($this->parser, 'startHandler', 'endHandler'); + break; + default: + return $this->raiseError('Unsupported mode given', + XML_PARSER_ERROR_UNSUPPORTED_MODE); + break; } - /** * set additional handlers for character data, entities, etc. */ @@ -293,7 +326,7 @@ class XML_Parser extends PEAR $xml_func = 'xml_set_' . $xml_func; $xml_func($this->parser, $method); } - } + } } // {{{ _create() @@ -307,9 +340,10 @@ class XML_Parser extends PEAR * Furthermore it allows us returning an error * if something fails. * - * @access private - * @return boolean|object true on success, PEAR_Error otherwise + * NOTE: uses '@' error suppresion in this method * + * @return bool|PEAR_Error true on success, PEAR_Error otherwise + * @access private * @see xml_parser_create */ function _create() @@ -321,21 +355,27 @@ class XML_Parser extends PEAR } if (is_resource($xp)) { if ($this->tgtenc !== null) { - if (!@xml_parser_set_option($xp, XML_OPTION_TARGET_ENCODING, - $this->tgtenc)) { - return $this->raiseError('invalid target encoding', XML_PARSER_ERROR_INVALID_ENCODING); + if (!@xml_parser_set_option($xp, XML_OPTION_TARGET_ENCODING, + $this->tgtenc) + ) { + return $this->raiseError('invalid target encoding', + XML_PARSER_ERROR_INVALID_ENCODING); } } $this->parser = $xp; - $result = $this->_initHandlers($this->mode); + $result = $this->_initHandlers($this->mode); if ($this->isError($result)) { return $result; } xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, $this->folding); - return true; } - return $this->raiseError('Unable to create XML parser resource.', XML_PARSER_ERROR_NO_RESOURCE); + if (!in_array(strtoupper($this->srcenc), $this->_validEncodings)) { + return $this->raiseError('invalid source encoding', + XML_PARSER_ERROR_INVALID_ENCODING); + } + return $this->raiseError('Unable to create XML parser resource.', + XML_PARSER_ERROR_NO_RESOURCE); } // }}} @@ -353,7 +393,7 @@ class XML_Parser extends PEAR function reset() { $result = $this->_create(); - if ($this->isError( $result )) { + if ($this->isError($result)) { return $result; } return true; @@ -365,11 +405,12 @@ class XML_Parser extends PEAR /** * Sets the input xml file to be parsed * - * @param string Filename (full path) - * @return resource fopen handle of the given file - * @throws XML_Parser_Error - * @see setInput(), setInputString(), parse() - * @access public + * @param string $file Filename (full path) + * + * @return resource fopen handle of the given file + * @access public + * @throws XML_Parser_Error + * @see setInput(), setInputString(), parse() */ function setInputFile($file) { @@ -378,35 +419,39 @@ class XML_Parser extends PEAR */ if (eregi('^(http|ftp)://', substr($file, 0, 10))) { if (!ini_get('allow_url_fopen')) { - return $this->raiseError('Remote files cannot be parsed, as safe mode is enabled.', XML_PARSER_ERROR_REMOTE); + return $this-> + raiseError('Remote files cannot be parsed, as safe mode is enabled.', + XML_PARSER_ERROR_REMOTE); } } - + $fp = @fopen($file, 'rb'); if (is_resource($fp)) { $this->fp = $fp; return $fp; } - return $this->raiseError('File could not be opened.', XML_PARSER_ERROR_FILE_NOT_READABLE); + return $this->raiseError('File could not be opened.', + XML_PARSER_ERROR_FILE_NOT_READABLE); } // }}} // {{{ setInputString() - + /** * XML_Parser::setInputString() - * + * * Sets the xml input from a string - * + * * @param string $data a string containing the XML document + * * @return null - **/ + */ function setInputString($data) { $this->fp = $data; return null; } - + // }}} // {{{ setInput() @@ -414,35 +459,35 @@ class XML_Parser extends PEAR * Sets the file handle to use with parse(). * * You should use setInputFile() or setInputString() if you - * pass a string + * pass a string * - * @param mixed $fp Can be either a resource returned from fopen(), - * a URL, a local filename or a string. - * @access public - * @see parse() - * @uses setInputString(), setInputFile() + * @param mixed $fp Can be either a resource returned from fopen(), + * a URL, a local filename or a string. + * + * @return mixed + * @access public + * @see parse() + * @uses setInputString(), setInputFile() */ function setInput($fp) { if (is_resource($fp)) { $this->fp = $fp; return true; - } - // see if it's an absolute URL (has a scheme at the beginning) - elseif (eregi('^[a-z]+://', substr($fp, 0, 10))) { + } elseif (eregi('^[a-z]+://', substr($fp, 0, 10))) { + // see if it's an absolute URL (has a scheme at the beginning) return $this->setInputFile($fp); - } - // see if it's a local file - elseif (file_exists($fp)) { + } elseif (file_exists($fp)) { + // see if it's a local file return $this->setInputFile($fp); - } - // it must be a string - else { + } else { + // it must be a string $this->fp = $fp; return true; } - return $this->raiseError('Illegal input format', XML_PARSER_ERROR_INVALID_INPUT); + return $this->raiseError('Illegal input format', + XML_PARSER_ERROR_INVALID_INPUT); } // }}} @@ -451,8 +496,8 @@ class XML_Parser extends PEAR /** * Central parsing function. * - * @return true|object PEAR error returns true on success, or a PEAR_Error otherwise - * @access public + * @return bool|PEAR_Error returns true on success, or a PEAR_Error otherwise + * @access public */ function parse() { @@ -465,7 +510,7 @@ class XML_Parser extends PEAR } // if $this->fp was fopened previously if (is_resource($this->fp)) { - + while ($data = fread($this->fp, 4096)) { if (!$this->_parseString($data, feof($this->fp))) { $error = &$this->raiseError(); @@ -473,8 +518,8 @@ class XML_Parser extends PEAR return $error; } } - // otherwise, $this->fp must be a string } else { + // otherwise, $this->fp must be a string if (!$this->_parseString($this->fp, true)) { $error = &$this->raiseError(); $this->free(); @@ -488,9 +533,10 @@ class XML_Parser extends PEAR /** * XML_Parser::_parseString() - * - * @param string $data - * @param boolean $eof + * + * @param string $data data + * @param bool $eof end-of-file flag + * * @return bool * @access private * @see parseString() @@ -499,31 +545,33 @@ class XML_Parser extends PEAR { return xml_parse($this->parser, $data, $eof); } - + // }}} // {{{ parseString() /** * XML_Parser::parseString() - * + * * Parses a string. * - * @param string $data XML data - * @param boolean $eof If set and TRUE, data is the last piece of data sent in this parser - * @throws XML_Parser_Error - * @return Pear Error|true true on success or a PEAR Error - * @see _parseString() + * @param string $data XML data + * @param boolean $eof If set and TRUE, data is the last piece + * of data sent in this parser + * + * @return bool|PEAR_Error true on success or a PEAR Error + * @throws XML_Parser_Error + * @see _parseString() */ function parseString($data, $eof = false) { if (!isset($this->parser) || !is_resource($this->parser)) { $this->reset(); } - + if (!$this->_parseString($data, $eof)) { - $error = &$this->raiseError(); - $this->free(); - return $error; + $error = &$this->raiseError(); + $this->free(); + return $error; } if ($eof === true) { @@ -531,12 +579,12 @@ class XML_Parser extends PEAR } return true; } - + /** * XML_Parser::free() - * + * * Free the internal resources associated with the parser - * + * * @return null **/ function free() @@ -551,15 +599,16 @@ class XML_Parser extends PEAR unset($this->fp); return null; } - + /** * XML_Parser::raiseError() - * + * * Throws a XML_Parser_Error - * + * * @param string $msg the error message * @param integer $ecode the error message code - * @return XML_Parser_Error + * + * @return XML_Parser_Error **/ function raiseError($msg = null, $ecode = 0) { @@ -567,32 +616,46 @@ class XML_Parser extends PEAR $err = &new XML_Parser_Error($msg, $ecode); return parent::raiseError($err); } - + // }}} // {{{ funcStartHandler() + /** + * derives and calls the Start Handler function + * + * @param mixed $xp ?? + * @param mixed $elem ?? + * @param mixed $attribs ?? + * + * @return void + */ function funcStartHandler($xp, $elem, $attribs) { $func = 'xmltag_' . $elem; - if (strchr($func, '.')) { - $func = str_replace('.', '_', $func); - } + $func = str_replace(array('.', '-', ':'), '_', $func); if (method_exists($this->_handlerObj, $func)) { call_user_func(array(&$this->_handlerObj, $func), $xp, $elem, $attribs); } elseif (method_exists($this->_handlerObj, 'xmltag')) { - call_user_func(array(&$this->_handlerObj, 'xmltag'), $xp, $elem, $attribs); + call_user_func(array(&$this->_handlerObj, 'xmltag'), + $xp, $elem, $attribs); } } // }}} // {{{ funcEndHandler() + /** + * derives and calls the End Handler function + * + * @param mixed $xp ?? + * @param mixed $elem ?? + * + * @return void + */ function funcEndHandler($xp, $elem) { $func = 'xmltag_' . $elem . '_'; - if (strchr($func, '.')) { - $func = str_replace('.', '_', $func); - } + $func = str_replace(array('.', '-', ':'), '_', $func); if (method_exists($this->_handlerObj, $func)) { call_user_func(array(&$this->_handlerObj, $func), $xp, $elem); } elseif (method_exists($this->_handlerObj, 'xmltag_')) { @@ -604,24 +667,35 @@ class XML_Parser extends PEAR // {{{ startHandler() /** + * abstract method signature for Start Handler * + * @param mixed $xp ?? + * @param mixed $elem ?? + * @param mixed &$attribs ?? + * + * @return null * @abstract */ function startHandler($xp, $elem, &$attribs) { - return NULL; + return null; } // }}} // {{{ endHandler() /** + * abstract method signature for End Handler * + * @param mixed $xp ?? + * @param mixed $elem ?? + * + * @return null * @abstract */ function endHandler($xp, $elem) { - return NULL; + return null; } @@ -639,47 +713,56 @@ class XML_Parser extends PEAR * - check for XML_Parser error, using is_a( $error, 'XML_Parser_Error' ) * - messages can be generated from the xml_parser resource * - * @package XML_Parser - * @access public - * @see PEAR_Error + * @category XML + * @package XML_Parser + * @author Stig Bakken + * @author Tomas V.V.Cox + * @author Stephan Schmidt + * @copyright 2002-2008 The PHP Group + * @license http://opensource.org/licenses/bsd-license New BSD License + * @version Release: @package_version@ + * @link http://pear.php.net/package/XML_Parser + * @see PEAR_Error */ class XML_Parser_Error extends PEAR_Error { // {{{ properties - /** + /** * prefix for all messages * * @var string - */ + */ var $error_message_prefix = 'XML_Parser: '; // }}} // {{{ constructor() - /** + /** * construct a new error instance * * You may either pass a message or an xml_parser resource as first * parameter. If a resource has been passed, the last error that * happened will be retrieved and returned. * + * @param string|resource $msgorparser message or parser resource + * @param integer $code error code + * @param integer $mode error handling + * @param integer $level error level + * * @access public - * @param string|resource message or parser resource - * @param integer error code - * @param integer error handling - * @param integer error level - */ + * @todo PEAR CS - can't meet 85char line limit without arg refactoring + */ function XML_Parser_Error($msgorparser = 'unknown error', $code = 0, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE) { if (is_resource($msgorparser)) { - $code = xml_get_error_code($msgorparser); + $code = xml_get_error_code($msgorparser); $msgorparser = sprintf('%s at XML input line %d:%d', - xml_error_string($code), - xml_get_current_line_number($msgorparser), - xml_get_current_column_number($msgorparser)); + xml_error_string($code), + xml_get_current_line_number($msgorparser), + xml_get_current_column_number($msgorparser)); } $this->PEAR_Error($msgorparser, $code, $mode, $level); } // }}} } -?> \ No newline at end of file +?> diff --git a/includes/pear/XML/Parser/Simple.php b/includes/pear/XML/Parser/Simple.php index 535692f5..2ba9fb51 100644 --- a/includes/pear/XML/Parser/Simple.php +++ b/includes/pear/XML/Parser/Simple.php @@ -1,37 +1,50 @@ | -// +----------------------------------------------------------------------+ -// -// $Id: Simple.php,v 1.6 2005/03/25 17:13:10 schst Exp $ + +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** - * Simple XML parser class. + * XML_Parser * - * This class is a simplified version of XML_Parser. - * In most XML applications the real action is executed, - * when a closing tag is found. + * XML Parser's Simple parser class * - * XML_Parser_Simple allows you to just implement one callback - * for each tag that will receive the tag with its attributes - * and CData + * PHP versions 4 and 5 * - * @category XML - * @package XML_Parser - * @author Stephan Schmidt + * LICENSE: + * + * Copyright (c) 2002-2008 The PHP Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @category XML + * @package XML_Parser + * @author Stephan Schmidt + * @copyright 2004-2008 Stephan Schmidt + * @license http://opensource.org/licenses/bsd-license New BSD License + * @version CVS: $Id: Simple.php,v 1.7 2008/08/24 21:48:21 ashnazg Exp $ + * @link http://pear.php.net/package/XML_Parser */ /** @@ -72,34 +85,38 @@ require_once 'XML/Parser.php'; * $result = $p->parse(); * * - * @category XML - * @package XML_Parser - * @author Stephan Schmidt + * @category XML + * @package XML_Parser + * @author Stephan Schmidt + * @copyright 2004-2008 The PHP Group + * @license http://opensource.org/licenses/bsd-license New BSD License + * @version Release: @package_version@ + * @link http://pear.php.net/package/XML_Parser */ class XML_Parser_Simple extends XML_Parser { - /** - * element stack - * - * @access private - * @var array - */ + /** + * element stack + * + * @access private + * @var array + */ var $_elStack = array(); - /** - * all character data - * - * @access private - * @var array - */ + /** + * all character data + * + * @access private + * @var array + */ var $_data = array(); - /** - * element depth - * - * @access private - * @var integer - */ + /** + * element depth + * + * @access private + * @var integer + */ var $_depth = 0; /** @@ -126,7 +143,7 @@ class XML_Parser_Simple extends XML_Parser * @param string $mode how this parser object should work, "event" for * handleElement(), "func" to have it call functions * named after elements (handleElement_$name()) - * @param string $tgenc a valid target encoding + * @param string $tgtenc a valid target encoding */ function XML_Parser_Simple($srcenc = null, $mode = 'event', $tgtenc = null) { @@ -136,7 +153,8 @@ class XML_Parser_Simple extends XML_Parser /** * inits the handlers * - * @access private + * @return mixed + * @access private */ function _initHandlers() { @@ -145,11 +163,13 @@ class XML_Parser_Simple extends XML_Parser } if ($this->mode != 'func' && $this->mode != 'event') { - return $this->raiseError('Unsupported mode given', XML_PARSER_ERROR_UNSUPPORTED_MODE); + return $this->raiseError('Unsupported mode given', + XML_PARSER_ERROR_UNSUPPORTED_MODE); } xml_set_object($this->parser, $this->_handlerObj); - xml_set_element_handler($this->parser, array(&$this, 'startHandler'), array(&$this, 'endHandler')); + xml_set_element_handler($this->parser, array(&$this, 'startHandler'), + array(&$this, 'endHandler')); xml_set_character_data_handler($this->parser, array(&$this, 'cdataHandler')); /** @@ -160,7 +180,7 @@ class XML_Parser_Simple extends XML_Parser $xml_func = 'xml_set_' . $xml_func; $xml_func($this->parser, $method); } - } + } } /** @@ -179,44 +199,47 @@ class XML_Parser_Simple extends XML_Parser $this->_depth = 0; $result = $this->_create(); - if ($this->isError( $result )) { + if ($this->isError($result)) { return $result; } return true; } - /** - * start handler - * - * Pushes attributes and tagname onto a stack - * - * @access private - * @final - * @param resource xml parser resource - * @param string element name - * @param array attributes - */ + /** + * start handler + * + * Pushes attributes and tagname onto a stack + * + * @param resource $xp xml parser resource + * @param string $elem element name + * @param array &$attribs attributes + * + * @return mixed + * @access private + * @final + */ function startHandler($xp, $elem, &$attribs) { array_push($this->_elStack, array( - 'name' => $elem, - 'attribs' => $attribs - ) - ); + 'name' => $elem, + 'attribs' => $attribs + )); $this->_depth++; $this->_data[$this->_depth] = ''; } - /** - * end handler - * - * Pulls attributes and tagname from a stack - * - * @access private - * @final - * @param resource xml parser resource - * @param string element name - */ + /** + * end handler + * + * Pulls attributes and tagname from a stack + * + * @param resource $xp xml parser resource + * @param string $elem element name + * + * @return mixed + * @access private + * @final + */ function endHandler($xp, $elem) { $el = array_pop($this->_elStack); @@ -224,72 +247,78 @@ class XML_Parser_Simple extends XML_Parser $this->_depth--; switch ($this->mode) { - case 'event': - $this->_handlerObj->handleElement($el['name'], $el['attribs'], $data); - break; - case 'func': - $func = 'handleElement_' . $elem; - if (strchr($func, '.')) { - $func = str_replace('.', '_', $func); - } - if (method_exists($this->_handlerObj, $func)) { - call_user_func(array(&$this->_handlerObj, $func), $el['name'], $el['attribs'], $data); - } - break; + case 'event': + $this->_handlerObj->handleElement($el['name'], $el['attribs'], $data); + break; + case 'func': + $func = 'handleElement_' . $elem; + if (strchr($func, '.')) { + $func = str_replace('.', '_', $func); + } + if (method_exists($this->_handlerObj, $func)) { + call_user_func(array(&$this->_handlerObj, $func), + $el['name'], $el['attribs'], $data); + } + break; } } - /** - * handle character data - * - * @access private - * @final - * @param resource xml parser resource - * @param string data - */ + /** + * handle character data + * + * @param resource $xp xml parser resource + * @param string $data data + * + * @return void + * @access private + * @final + */ function cdataHandler($xp, $data) { $this->_data[$this->_depth] .= $data; } - /** - * handle a tag - * - * Implement this in your parser - * - * @access public - * @abstract - * @param string element name - * @param array attributes - * @param string character data - */ + /** + * handle a tag + * + * Implement this in your parser + * + * @param string $name element name + * @param array $attribs attributes + * @param string $data character data + * + * @return void + * @access public + * @abstract + */ function handleElement($name, $attribs, $data) { } - /** - * get the current tag depth - * - * The root tag is in depth 0. - * - * @access public - * @return integer - */ + /** + * get the current tag depth + * + * The root tag is in depth 0. + * + * @access public + * @return integer + */ function getCurrentDepth() { return $this->_depth; } - /** - * add some string to the current ddata. - * - * This is commonly needed, when a document is parsed recursively. - * - * @access public - * @param string data to add - * @return void - */ - function addToData( $data ) + /** + * add some string to the current ddata. + * + * This is commonly needed, when a document is parsed recursively. + * + * @param string $data data to add + * + * @return void + * @access public + */ + function addToData($data) { $this->_data[$this->_depth] .= $data; } diff --git a/includes/pear/scripts/pear.bat b/includes/pear/scripts/pear.bat deleted file mode 100644 index 64130a88..00000000 --- a/includes/pear/scripts/pear.bat +++ /dev/null @@ -1,115 +0,0 @@ -@ECHO OFF - -REM ---------------------------------------------------------------------- -REM PHP version 5 -REM ---------------------------------------------------------------------- -REM Copyright (c) 1997-2004 The PHP Group -REM ---------------------------------------------------------------------- -REM This source file is subject to version 3.0 of the PHP license, -REM that is bundled with this package in the file LICENSE, and is -REM available at through the world-wide-web at -REM http://www.php.net/license/3_0.txt. -REM If you did not receive a copy of the PHP license and are unable to -REM obtain it through the world-wide-web, please send a note to -REM license@php.net so we can mail you a copy immediately. -REM ---------------------------------------------------------------------- -REM Authors: Alexander Merz (alexmerz@php.net) -REM ---------------------------------------------------------------------- -REM -REM Last updated 12/29/2004 ($Id$ is not replaced if the file is binary) - -REM change this lines to match the paths of your system -REM ------------------- - - -REM Test to see if this is a raw pear.bat (uninstalled version) -SET TMPTMPTMPTMPT=@includ -SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ -FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) - -REM Check PEAR global ENV, set them if they do not exist -IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" -IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" -IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" -GOTO :INSTALLED - -:NOTINSTALLED -ECHO WARNING: This is a raw, uninstalled pear.bat - -REM Check to see if we can grab the directory of this file (Windows NT+) -IF %~n0 == pear ( -FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( -SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" -echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" -"%PHP_PEAR_PHP_BIN%" -v -GOTO :NEXTTEST -)) -GOTO :FAILAUTODETECT -:NEXTTEST -IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( - -REM We can use this PHP to run a temporary php file to get the dirname of pear - -echo ^ > ~~getloc.php -"%PHP_PEAR_PHP_BIN%" ~~getloc.php -set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a -DEL ~a.a -DEL ~~getloc.php -set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" - -REM Make sure there is a pearcmd.php at our disposal - -IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( -IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -) -) -GOTO :INSTALLED -) ELSE ( -REM Windows Me/98 cannot succeed, so allow the batch to fail -) -:FAILAUTODETECT -echo WARNING: failed to auto-detect pear information -:INSTALLED - -REM Check Folders and files -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 -IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR -IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR -REM launch pearcmd -GOTO RUN -:PEAR_INSTALL_ERROR -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_INSTALL_ERROR2 -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO pearcmd.php could not be found there. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_BIN_ERROR -ECHO PHP_PEAR_BIN_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_BIN_DIR% -GOTO END -:PEAR_PHPBIN_ERROR -ECHO PHP_PEAR_PHP_BIN is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_PHP_BIN% -GOTO END -:RUN -"%PHP_PEAR_PHP_BIN%" -C -d output_buffering=1 -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 -:END -@ECHO ON \ No newline at end of file diff --git a/includes/pear/scripts/pear.sh b/includes/pear/scripts/pear.sh deleted file mode 100644 index 6253b901..00000000 --- a/includes/pear/scripts/pear.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# first find which PHP binary to use -if test "x$PHP_PEAR_PHP_BIN" != "x"; then - PHP="$PHP_PEAR_PHP_BIN" -else - if test "@php_bin@" = '@'php_bin'@'; then - PHP=php - else - PHP="@php_bin@" - fi -fi - -# then look for the right pear include dir -if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then - INCDIR=$PHP_PEAR_INSTALL_DIR - INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR" -else - if test "@php_dir@" = '@'php_dir'@'; then - INCDIR=`dirname $0` - INCARG="" - else - INCDIR="@php_dir@" - INCARG="-d include_path=@php_dir@" - fi -fi - -exec $PHP -C -q $INCARG -d output_buffering=1 $INCDIR/pearcmd.php "$@" diff --git a/includes/pear/scripts/pearcmd.php b/includes/pear/scripts/pearcmd.php deleted file mode 100644 index 71a3ac7e..00000000 --- a/includes/pear/scripts/pearcmd.php +++ /dev/null @@ -1,423 +0,0 @@ - | -// | Tomas V.V.Cox | -// | | -// +----------------------------------------------------------------------+ -// -// $Id: pearcmd.php,v 1.29 2005/11/12 02:26:53 cellog Exp $ - -ob_end_clean(); -if (!defined('PEAR_RUNTYPE')) { - // this is defined in peclcmd.php as 'pecl' - define('PEAR_RUNTYPE', 'pear'); -} -define('PEAR_IGNORE_BACKTRACE', 1); -if (!function_exists('file_get_contents')) { - function file_get_contents($filename) - { - $fp = fopen($filename, 'rb'); - $ret = ''; - while (!feof($fp)) { - $ret .= fread($fp, 8092);; - } - return $ret; - } -} -/** - * @nodep Gtk - */ -if ('@include_path@' != '@'.'include_path'.'@') { - ini_set('include_path', '@include_path@'); - $raw = false; -} else { - // this is a raw, uninstalled pear, either a cvs checkout, or php distro - $raw = true; -} -@ini_set('allow_url_fopen', true); -if (!ini_get('safe_mode')) { - @set_time_limit(0); -} -ob_implicit_flush(true); -@ini_set('track_errors', true); -@ini_set('html_errors', false); -@ini_set('magic_quotes_runtime', false); -$_PEAR_PHPDIR = '#$%^&*'; -set_error_handler('error_handler'); - -$pear_package_version = "@pear_version@"; - -require_once 'PEAR.php'; -require_once 'PEAR/Frontend.php'; -require_once 'PEAR/Config.php'; -require_once 'PEAR/Command.php'; -require_once 'Console/Getopt.php'; - - -PEAR_Command::setFrontendType('CLI'); -$all_commands = PEAR_Command::getCommands(); - -$argv = Console_Getopt::readPHPArgv(); -$progname = PEAR_RUNTYPE; -if (in_array('getopt2', get_class_methods('Console_Getopt'))) { - array_shift($argv); - $options = Console_Getopt::getopt2($argv, "c:C:d:D:Gh?sSqu:vV"); -} else { - $options = Console_Getopt::getopt($argv, "c:C:d:D:Gh?sSqu:vV"); -} -if (PEAR::isError($options)) { - usage($options); -} - -$opts = $options[0]; - -$fetype = 'CLI'; -if ($progname == 'gpear' || $progname == 'pear-gtk') { - $fetype = 'Gtk'; -} else { - foreach ($opts as $opt) { - if ($opt[0] == 'G') { - $fetype = 'Gtk'; - } - } -} -$pear_user_config = ''; -$pear_system_config = ''; -$store_user_config = false; -$store_system_config = false; -$verbose = 1; - -foreach ($opts as $opt) { - switch ($opt[0]) { - case 'c': - $pear_user_config = $opt[1]; - break; - case 'C': - $pear_system_config = $opt[1]; - break; - } -} - -PEAR_Command::setFrontendType($fetype); -$ui = &PEAR_Command::getFrontendObject(); -$config = &PEAR_Config::singleton($pear_user_config, $pear_system_config); - -if (PEAR::isError($config)) { - $_file = ''; - if ($pear_user_config !== false) { - $_file .= $pear_user_config; - } - if ($pear_system_config !== false) { - $_file .= '/' . $pear_system_config; - } - if ($_file == '/') { - $_file = 'The default config file'; - } - $config->getMessage(); - $ui->outputData("ERROR: $_file is not a valid config file or is corrupted."); - // We stop, we have no idea where we are :) - exit(); -} - -// this is used in the error handler to retrieve a relative path -$_PEAR_PHPDIR = $config->get('php_dir'); -$ui->setConfig($config); -PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError")); -if (ini_get('safe_mode')) { - $ui->outputData('WARNING: running in safe mode requires that all files created ' . - 'be the same uid as the current script. PHP reports this script is uid: ' . - @getmyuid() . ', and current user is: ' . @get_current_user()); -} - -$verbose = $config->get("verbose"); -$cmdopts = array(); - -if ($raw) { - if (!$config->isDefinedLayer('user') && !$config->isDefinedLayer('system')) { - $found = false; - foreach ($opts as $opt) { - if ($opt[0] == 'd' || $opt[0] == 'D') { - $found = true; // the user knows what they are doing, and are setting config values - } - } - if (!$found) { - // no prior runs, try to install PEAR - if (strpos(dirname(__FILE__), 'scripts')) { - $packagexml = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'package2.xml'; - $pearbase = dirname(dirname(__FILE__)); - } else { - $packagexml = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'package2.xml'; - $pearbase = dirname(__FILE__); - } - if (file_exists($packagexml)) { - $options[1] = array( - 'install', - $packagexml - ); - $config->set('php_dir', $pearbase . DIRECTORY_SEPARATOR . 'php'); - $config->set('data_dir', $pearbase . DIRECTORY_SEPARATOR . 'data'); - $config->set('doc_dir', $pearbase . DIRECTORY_SEPARATOR . 'docs'); - $config->set('test_dir', $pearbase . DIRECTORY_SEPARATOR . 'tests'); - $config->set('ext_dir', $pearbase . DIRECTORY_SEPARATOR . 'extensions'); - $config->set('bin_dir', $pearbase); - $config->mergeConfigFile($pearbase . 'pear.ini', false); - $config->store(); - $config->set('auto_discover', 1); - } - } - } -} -foreach ($opts as $opt) { - $param = !empty($opt[1]) ? $opt[1] : true; - switch ($opt[0]) { - case 'd': - list($key, $value) = explode('=', $param); - $config->set($key, $value, 'user'); - break; - case 'D': - list($key, $value) = explode('=', $param); - $config->set($key, $value, 'system'); - break; - case 's': - $store_user_config = true; - break; - case 'S': - $store_system_config = true; - break; - case 'u': - $config->remove($param, 'user'); - break; - case 'v': - $config->set('verbose', $config->get('verbose') + 1); - break; - case 'q': - $config->set('verbose', $config->get('verbose') - 1); - break; - case 'V': - usage(null, 'version'); - case 'c': - case 'C': - break; - default: - // all non pear params goes to the command - $cmdopts[$opt[0]] = $param; - break; - } -} - -if ($store_system_config) { - $config->store('system'); -} - -if ($store_user_config) { - $config->store('user'); -} - -$command = (isset($options[1][0])) ? $options[1][0] : null; - -if (empty($command) && ($store_user_config || $store_system_config)) { - exit; -} - -if ($fetype == 'Gtk') { - if (!$config->validConfiguration()) { - PEAR::raiseError('CRITICAL ERROR: no existing valid configuration files found in files ' . - "'$pear_user_config' or '$pear_system_config', please copy an existing configuration" . - 'file to one of these locations, or use the -c and -s options to create one'); - } - Gtk::main(); -} else do { - if ($command == 'help') { - usage(null, @$options[1][1]); - } - if (!$config->validConfiguration()) { - PEAR::raiseError('CRITICAL ERROR: no existing valid configuration files found in files ' . - "'$pear_user_config' or '$pear_system_config', please copy an existing configuration" . - 'file to one of these locations, or use the -c and -s options to create one'); - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $cmd = PEAR_Command::factory($command, $config); - PEAR::popErrorHandling(); - if (PEAR::isError($cmd)) { - usage(null, @$options[1][0]); - } - - $short_args = $long_args = null; - PEAR_Command::getGetoptArgs($command, $short_args, $long_args); - if (in_array('getopt2', get_class_methods('Console_Getopt'))) { - array_shift($options[1]); - $tmp = Console_Getopt::getopt2($options[1], $short_args, $long_args); - } else { - $tmp = Console_Getopt::getopt($options[1], $short_args, $long_args); - } - if (PEAR::isError($tmp)) { - break; - } - list($tmpopt, $params) = $tmp; - $opts = array(); - foreach ($tmpopt as $foo => $tmp2) { - list($opt, $value) = $tmp2; - if ($value === null) { - $value = true; // options without args - } - if (strlen($opt) == 1) { - $cmdoptions = $cmd->getOptions($command); - foreach ($cmdoptions as $o => $d) { - if (@$d['shortopt'] == $opt) { - $opts[$o] = $value; - } - } - } else { - if (substr($opt, 0, 2) == '--') { - $opts[substr($opt, 2)] = $value; - } - } - } - $ok = $cmd->run($command, $opts, $params); - if ($ok === false) { - PEAR::raiseError("unknown command `$command'"); - } - if (PEAR::isError($ok)) { - PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError")); - PEAR::raiseError($ok); - } -} while (false); - -// {{{ usage() - -function usage($error = null, $helpsubject = null) -{ - global $progname, $all_commands; - $stderr = fopen('php://stderr', 'w'); - if (PEAR::isError($error)) { - fputs($stderr, $error->getMessage() . "\n"); - } elseif ($error !== null) { - fputs($stderr, "$error\n"); - } - if ($helpsubject != null) { - $put = cmdHelp($helpsubject); - } else { - $put = - "Commands:\n"; - $maxlen = max(array_map("strlen", $all_commands)); - $formatstr = "%-{$maxlen}s %s\n"; - ksort($all_commands); - foreach ($all_commands as $cmd => $class) { - $put .= sprintf($formatstr, $cmd, PEAR_Command::getDescription($cmd)); - } - $put .= - "Usage: $progname [options] command [command-options] \n". - "Type \"$progname help options\" to list all options.\n". - "Type \"$progname help shortcuts\" to list all command shortcuts.\n". - "Type \"$progname help \" to get the help for the specified command."; - } - fputs($stderr, "$put\n"); - fclose($stderr); - exit; -} - -function cmdHelp($command) -{ - global $progname, $all_commands, $config; - if ($command == "options") { - return - "Options:\n". - " -v increase verbosity level (default 1)\n". - " -q be quiet, decrease verbosity level\n". - " -c file find user configuration in `file'\n". - " -C file find system configuration in `file'\n". - " -d foo=bar set user config variable `foo' to `bar'\n". - " -D foo=bar set system config variable `foo' to `bar'\n". - " -G start in graphical (Gtk) mode\n". - " -s store user configuration\n". - " -S store system configuration\n". - " -u foo unset `foo' in the user configuration\n". - " -h, -? display help/usage (this message)\n". - " -V version information\n"; - } elseif ($command == "shortcuts") { - $sc = PEAR_Command::getShortcuts(); - $ret = "Shortcuts:\n"; - foreach ($sc as $s => $c) { - $ret .= sprintf(" %-8s %s\n", $s, $c); - } - return $ret; - - } elseif ($command == "version") { - return "PEAR Version: ".$GLOBALS['pear_package_version']. - "\nPHP Version: ".phpversion(). - "\nZend Engine Version: ".zend_version(). - "\nRunning on: ".php_uname(); - - } elseif ($help = PEAR_Command::getHelp($command)) { - if (is_string($help)) { - return "$progname $command [options] $help\n"; - } - if ($help[1] === null) { - return "$progname $command $help[0]"; - } else { - return "$progname $command [options] $help[0]\n$help[1]"; - } - } - return "Command '$command' is not valid, try 'pear help'"; -} - -// }}} - -function error_handler($errno, $errmsg, $file, $line, $vars) { - if ((defined('E_STRICT') && $errno & E_STRICT) || !error_reporting()) { - if (defined('E_STRICT') && $errno & E_STRICT) { - return; // E_STRICT - } - if ($GLOBALS['config']->get('verbose') < 4) { - return; // @silenced error, show all if debug is high enough - } - } - $errortype = array ( - E_ERROR => "Error", - E_WARNING => "Warning", - E_PARSE => "Parsing Error", - E_NOTICE => "Notice", - E_CORE_ERROR => "Core Error", - E_CORE_WARNING => "Core Warning", - E_COMPILE_ERROR => "Compile Error", - E_COMPILE_WARNING => "Compile Warning", - E_USER_ERROR => "User Error", - E_USER_WARNING => "User Warning", - E_USER_NOTICE => "User Notice" - ); - $prefix = $errortype[$errno]; - global $_PEAR_PHPDIR; - if (stristr($file, $_PEAR_PHPDIR)) { - $file = substr($file, strlen($_PEAR_PHPDIR) + 1); - } else { - $file = basename($file); - } - print "\n$prefix: $errmsg in $file on line $line\n"; -} - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: nil - * mode: php - * End: - */ -// vim600:syn=php - -?> diff --git a/includes/pear/scripts/peardev.bat b/includes/pear/scripts/peardev.bat deleted file mode 100644 index 45b47e7f..00000000 --- a/includes/pear/scripts/peardev.bat +++ /dev/null @@ -1,229 +0,0 @@ -@ECHO OFF - - - -REM ---------------------------------------------------------------------- - -REM PHP version 5 - -REM ---------------------------------------------------------------------- - -REM Copyright (c) 1997-2004 The PHP Group - -REM ---------------------------------------------------------------------- - -REM This source file is subject to version 3.0 of the PHP license, - -REM that is bundled with this package in the file LICENSE, and is - -REM available at through the world-wide-web at - -REM http://www.php.net/license/3_0.txt. - -REM If you did not receive a copy of the PHP license and are unable to - -REM obtain it through the world-wide-web, please send a note to - -REM license@php.net so we can mail you a copy immediately. - -REM ---------------------------------------------------------------------- - -REM Authors: Alexander Merz (alexmerz@php.net) - -REM ---------------------------------------------------------------------- - -REM - -REM $Id: peardev.bat,v 1.2 2005/03/21 15:23:43 cellog Exp $ - - - -REM change this lines to match the paths of your system - -REM ------------------- - - - - - -REM Test to see if this is a raw pear.bat (uninstalled version) - -SET TMPTMPTMPTMPT=@includ - -SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ - -FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) - - - -REM Check PEAR global ENV, set them if they do not exist - -IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" - -IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" - -IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" - -GOTO :INSTALLED - - - -:NOTINSTALLED - -ECHO WARNING: This is a raw, uninstalled pear.bat - - - -REM Check to see if we can grab the directory of this file (Windows NT+) - -IF %~n0 == pear ( - -FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( - -SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" - -echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" - -"%PHP_PEAR_PHP_BIN%" -v - -GOTO :NEXTTEST - -)) - -GOTO :FAILAUTODETECT - -:NEXTTEST - -IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( - - - -REM We can use this PHP to run a temporary php file to get the dirname of pear - - - -echo ^ > ~~getloc.php - -"%PHP_PEAR_PHP_BIN%" ~~getloc.php - -set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a - -DEL ~a.a - -DEL ~~getloc.php - -set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" - - - -REM Make sure there is a pearcmd.php at our disposal - - - -IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( - -IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php - -IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php - -IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php - -) - -) - -GOTO :INSTALLED - -) ELSE ( - -REM Windows Me/98 cannot succeed, so allow the batch to fail - -) - -:FAILAUTODETECT - -echo WARNING: failed to auto-detect pear information - -:INSTALLED - - - -REM Check Folders and files - -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR - -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 - -IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR - -IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR - -REM launch pearcmd - -GOTO RUN - -:PEAR_INSTALL_ERROR - -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. - -ECHO Please fix it using your environment variable or modify - -ECHO the default value in pear.bat - -ECHO The current value is: - -ECHO %PHP_PEAR_INSTALL_DIR% - -GOTO END - -:PEAR_INSTALL_ERROR2 - -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. - -ECHO pearcmd.php could not be found there. - -ECHO Please fix it using your environment variable or modify - -ECHO the default value in pear.bat - -ECHO The current value is: - -ECHO %PHP_PEAR_INSTALL_DIR% - -GOTO END - -:PEAR_BIN_ERROR - -ECHO PHP_PEAR_BIN_DIR is not set correctly. - -ECHO Please fix it using your environment variable or modify - -ECHO the default value in pear.bat - -ECHO The current value is: - -ECHO %PHP_PEAR_BIN_DIR% - -GOTO END - -:PEAR_PHPBIN_ERROR - -ECHO PHP_PEAR_PHP_BIN is not set correctly. - -ECHO Please fix it using your environment variable or modify - -ECHO the default value in pear.bat - -ECHO The current value is: - -ECHO %PHP_PEAR_PHP_BIN% - -GOTO END - -:RUN - -"%PHP_PEAR_PHP_BIN%" -C -d memory_limit="-1" -d output_buffering=1 -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 - -:END - -@ECHO ON \ No newline at end of file diff --git a/includes/pear/scripts/peardev.sh b/includes/pear/scripts/peardev.sh deleted file mode 100644 index 7f1383ed..00000000 --- a/includes/pear/scripts/peardev.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# first find which PHP binary to use -if test "x$PHP_PEAR_PHP_BIN" != "x"; then - PHP="$PHP_PEAR_PHP_BIN" -else - if test "@php_bin@" = '@'php_bin'@'; then - PHP=php - else - PHP="@php_bin@" - fi -fi - -# then look for the right pear include dir -if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then - INCDIR=$PHP_PEAR_INSTALL_DIR - INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR" -else - if test "@php_dir@" = '@'php_dir'@'; then - INCDIR=`dirname $0` - INCARG="" - else - INCDIR="@php_dir@" - INCARG="-d include_path=@php_dir@" - fi -fi - -exec $PHP -d memory_limit="-1" -C -q $INCARG -d output_buffering=1 $INCDIR/pearcmd.php "$@" diff --git a/includes/pear/scripts/pecl.bat b/includes/pear/scripts/pecl.bat deleted file mode 100644 index c6ba7831..00000000 --- a/includes/pear/scripts/pecl.bat +++ /dev/null @@ -1,115 +0,0 @@ -@ECHO OFF - -REM ---------------------------------------------------------------------- -REM PHP version 5 -REM ---------------------------------------------------------------------- -REM Copyright (c) 1997-2004 The PHP Group -REM ---------------------------------------------------------------------- -REM This source file is subject to version 3.0 of the PHP license, -REM that is bundled with this package in the file LICENSE, and is -REM available at through the world-wide-web at -REM http://www.php.net/license/3_0.txt. -REM If you did not receive a copy of the PHP license and are unable to -REM obtain it through the world-wide-web, please send a note to -REM license@php.net so we can mail you a copy immediately. -REM ---------------------------------------------------------------------- -REM Authors: Alexander Merz (alexmerz@php.net) -REM ---------------------------------------------------------------------- -REM -REM Last updated 02/08/2004 ($Id$ is not replaced if the file is binary) - -REM change this lines to match the paths of your system -REM ------------------- - - -REM Test to see if this is a raw pear.bat (uninstalled version) -SET TMPTMPTMPTMPT=@includ -SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@ -FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED) - -REM Check PEAR global ENV, set them if they do not exist -IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@" -IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@" -IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@" -GOTO :INSTALLED - -:NOTINSTALLED -ECHO WARNING: This is a raw, uninstalled pear.bat - -REM Check to see if we can grab the directory of this file (Windows NT+) -IF %~n0 == pear ( -FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" ( -SET "PHP_PEAR_PHP_BIN=%%~$PATH:x" -echo Using PHP Executable "%PHP_PEAR_PHP_BIN%" -"%PHP_PEAR_PHP_BIN%" -v -GOTO :NEXTTEST -)) -GOTO :FAILAUTODETECT -:NEXTTEST -IF "%PHP_PEAR_PHP_BIN%" NEQ "" ( - -REM We can use this PHP to run a temporary php file to get the dirname of pear - -echo ^ > ~~getloc.php -"%PHP_PEAR_PHP_BIN%" ~~getloc.php -set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a -DEL ~a.a -DEL ~~getloc.php -set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear" - -REM Make sure there is a pearcmd.php at our disposal - -IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php ( -IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php -) -) -GOTO :INSTALLED -) ELSE ( -REM Windows Me/98 cannot succeed, so allow the batch to fail -) -:FAILAUTODETECT -echo WARNING: failed to auto-detect pear information -:INSTALLED - -REM Check Folders and files -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR -IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2 -IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR -IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR -REM launch pearcmd -GOTO RUN -:PEAR_INSTALL_ERROR -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_INSTALL_ERROR2 -ECHO PHP_PEAR_INSTALL_DIR is not set correctly. -ECHO pearcmd.php could not be found there. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_INSTALL_DIR% -GOTO END -:PEAR_BIN_ERROR -ECHO PHP_PEAR_BIN_DIR is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_BIN_DIR% -GOTO END -:PEAR_PHPBIN_ERROR -ECHO PHP_PEAR_PHP_BIN is not set correctly. -ECHO Please fix it using your environment variable or modify -ECHO the default value in pear.bat -ECHO The current value is: -ECHO %PHP_PEAR_PHP_BIN% -GOTO END -:RUN -"%PHP_PEAR_PHP_BIN%" -C -n -d output_buffering=1 -d safe_mode=0 -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\peclcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 -:END -@ECHO ON \ No newline at end of file diff --git a/includes/pear/scripts/pecl.sh b/includes/pear/scripts/pecl.sh deleted file mode 100644 index 0ad593e5..00000000 --- a/includes/pear/scripts/pecl.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# first find which PHP binary to use -if test "x$PHP_PEAR_PHP_BIN" != "x"; then - PHP="$PHP_PEAR_PHP_BIN" -else - if test "@php_bin@" = '@'php_bin'@'; then - PHP=php - else - PHP="@php_bin@" - fi -fi - -# then look for the right pear include dir -if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then - INCDIR=$PHP_PEAR_INSTALL_DIR - INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR" -else - if test "@php_dir@" = '@'php_dir'@'; then - INCDIR=`dirname $0` - INCARG="" - else - INCDIR="@php_dir@" - INCARG="-d include_path=@php_dir@" - fi -fi - -exec $PHP -C -n -q $INCARG -d output_buffering=1 -d safe_mode=0 $INCDIR/peclcmd.php "$@" diff --git a/includes/pear/scripts/peclcmd.php b/includes/pear/scripts/peclcmd.php deleted file mode 100644 index bdccc754..00000000 --- a/includes/pear/scripts/peclcmd.php +++ /dev/null @@ -1,45 +0,0 @@ - | -// | Tomas V.V.Cox | -// | | -// +----------------------------------------------------------------------+ -// -// $Id: peclcmd.php,v 1.1 2005/02/21 05:30:56 cellog Exp $ - -/** - * @nodep Gtk - */ -if ('@include_path@' != '@'.'include_path'.'@') { - ini_set('include_path', '@include_path@'); - $raw = false; -} else { - // this is a raw, uninstalled pear, either a cvs checkout, or php distro - $raw = true; -} -define('PEAR_RUNTYPE', 'pecl'); -require_once 'pearcmd.php'; -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: nil - * mode: php - * End: - */ -// vim600:syn=php - -?> diff --git a/includes/smarty/Config_File.class.php b/includes/smarty/Config_File.class.php index 5cc89364..31b89075 100644 --- a/includes/smarty/Config_File.class.php +++ b/includes/smarty/Config_File.class.php @@ -17,15 +17,19 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * @link http://smarty.php.net/ - * @version 2.6.12 + * For questions, help, comments, discussion, etc., please join the + * Smarty mailing list. Send a blank e-mail to + * smarty-discussion-subscribe@googlegroups.com + * + * @link http://www.smarty.net/ + * @version 2.6.22 * @copyright Copyright: 2001-2005 New Digital Group, Inc. * @author Andrei Zmievski * @access public * @package Smarty */ -/* $Id: Config_File.class.php,v 1.83 2005/12/14 14:53:55 mohrt Exp $ */ +/* $Id: Config_File.class.php 2786 2008-09-18 21:04:38Z Uwe.Tews $ */ /** * Config file reading class diff --git a/includes/smarty/Smarty.class.php b/includes/smarty/Smarty.class.php index 169425a7..95ec67ba 100644 --- a/includes/smarty/Smarty.class.php +++ b/includes/smarty/Smarty.class.php @@ -20,17 +20,17 @@ * * For questions, help, comments, discussion, etc., please join the * Smarty mailing list. Send a blank e-mail to - * smarty-general-subscribe@lists.php.net + * smarty-discussion-subscribe@googlegroups.com * - * @link http://smarty.php.net/ + * @link http://www.smarty.net/ * @copyright 2001-2005 New Digital Group, Inc. * @author Monte Ohrt * @author Andrei Zmievski * @package Smarty - * @version 2.6.12 + * @version 2.6.22 */ -/* $Id: Smarty.class.php,v 1.523 2005/12/31 19:17:04 messju Exp $ */ +/* $Id: Smarty.class.php 2785 2008-09-18 21:04:12Z Uwe.Tews $ */ /** * DIR_SEP isn't used anymore, but third party apps might @@ -464,7 +464,7 @@ class Smarty * * @var string */ - var $_version = '2.6.12'; + var $_version = '2.6.22'; /** * current template inclusion depth @@ -838,69 +838,66 @@ class Smarty * Registers a prefilter function to apply * to a template before compiling * - * @param string $function name of PHP function to register + * @param callback $function */ function register_prefilter($function) { - $_name = (is_array($function)) ? $function[1] : $function; - $this->_plugins['prefilter'][$_name] + $this->_plugins['prefilter'][$this->_get_filter_name($function)] = array($function, null, null, false); } /** * Unregisters a prefilter function * - * @param string $function name of PHP function + * @param callback $function */ function unregister_prefilter($function) { - unset($this->_plugins['prefilter'][$function]); + unset($this->_plugins['prefilter'][$this->_get_filter_name($function)]); } /** * Registers a postfilter function to apply * to a compiled template after compilation * - * @param string $function name of PHP function to register + * @param callback $function */ function register_postfilter($function) { - $_name = (is_array($function)) ? $function[1] : $function; - $this->_plugins['postfilter'][$_name] + $this->_plugins['postfilter'][$this->_get_filter_name($function)] = array($function, null, null, false); } /** * Unregisters a postfilter function * - * @param string $function name of PHP function + * @param callback $function */ function unregister_postfilter($function) { - unset($this->_plugins['postfilter'][$function]); + unset($this->_plugins['postfilter'][$this->_get_filter_name($function)]); } /** * Registers an output filter function to apply * to a template output * - * @param string $function name of PHP function + * @param callback $function */ function register_outputfilter($function) { - $_name = (is_array($function)) ? $function[1] : $function; - $this->_plugins['outputfilter'][$_name] + $this->_plugins['outputfilter'][$this->_get_filter_name($function)] = array($function, null, null, false); } /** * Unregisters an outputfilter function * - * @param string $function name of PHP function + * @param callback $function */ function unregister_outputfilter($function) { - unset($this->_plugins['outputfilter'][$function]); + unset($this->_plugins['outputfilter'][$this->_get_filter_name($function)]); } /** @@ -1935,6 +1932,25 @@ class Smarty { return eval($code); } + + /** + * Extracts the filter name from the given callback + * + * @param callback $function + * @return string + */ + function _get_filter_name($function) + { + if (is_array($function)) { + $_class_name = (is_object($function[0]) ? + get_class($function[0]) : $function[0]); + return $_class_name . '_' . $function[1]; + } + else { + return $function; + } + } + /**#@-*/ } diff --git a/includes/smarty/Smarty_Compiler.class.php b/includes/smarty/Smarty_Compiler.class.php index 15a14d46..374ba3d0 100644 --- a/includes/smarty/Smarty_Compiler.class.php +++ b/includes/smarty/Smarty_Compiler.class.php @@ -18,15 +18,15 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * @link http://smarty.php.net/ + * @link http://www.smarty.net/ * @author Monte Ohrt * @author Andrei Zmievski - * @version 2.6.12 + * @version 2.6.22 * @copyright 2001-2005 New Digital Group, Inc. * @package Smarty */ -/* $Id: Smarty_Compiler.class.php,v 1.376 2006/01/15 19:29:45 messju Exp $ */ +/* $Id: Smarty_Compiler.class.php 2966 2008-12-08 15:10:03Z monte.ohrt $ */ /** * Template compiling class @@ -73,6 +73,9 @@ class Smarty_Compiler extends Smarty { var $_strip_depth = 0; var $_additional_newline = "\n"; + + var $_phpversion = 0; + /**#@-*/ /** @@ -80,6 +83,8 @@ class Smarty_Compiler extends Smarty { */ function Smarty_Compiler() { + $this->_phpversion = substr(phpversion(),0,1); + // matches double quoted strings: // "foobar" // "foo\"bar" @@ -152,16 +157,20 @@ class Smarty_Compiler extends Smarty { // $foo->bar($foo->bar) // $foo->bar($foo->bar()) // $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar)) + // $foo->getBar()->getFoo() + // $foo->getBar()->foo $this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')'; $this->_obj_restricted_param_regexp = '(?:' - . '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')' - . '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)'; - $this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|' + . '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')' + . '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)'; + + $this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|' . $this->_var_regexp . $this->_obj_restricted_param_regexp . ')))*)'; - $this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp + + $this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp . '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)'; - $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)'; - $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)'; + $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)'; + $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)'; // matches valid modifier syntax: // |foo @@ -278,7 +287,7 @@ class Smarty_Compiler extends Smarty { /* loop through text blocks */ for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) { /* match anything resembling php tags */ - if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?php[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) { + if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?\s*php\s*[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) { /* replace tags with placeholders to prevent recursive replacements */ $sp_match[1] = array_unique($sp_match[1]); usort($sp_match[1], '_smarty_sort_length'); @@ -304,7 +313,7 @@ class Smarty_Compiler extends Smarty { } } } - + /* Compile the template tags into PHP code. */ $compiled_tags = array(); for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) { @@ -349,17 +358,30 @@ class Smarty_Compiler extends Smarty { } } $compiled_content = ''; - + + $tag_guard = '%%%SMARTYOTG' . md5(uniqid(rand(), true)) . '%%%'; + /* Interleave the compiled contents and text blocks to get the final result. */ for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) { if ($compiled_tags[$i] == '') { // tag result empty, remove first newline from following text block $text_blocks[$i+1] = preg_replace('~^(\r\n|\r|\n)~', '', $text_blocks[$i+1]); } - $compiled_content .= $text_blocks[$i].$compiled_tags[$i]; + // replace legit PHP tags with placeholder + $text_blocks[$i] = str_replace('\n", $compiled_content); + $compiled_content = preg_replace("~(?\n", $compiled_content); + + // recover legit tags + $compiled_content = str_replace($tag_guard, '_cache_serials['".$this->_cache_include."'] = '".$this->_cache_serial."'; ?>" . $compiled_content; } - // remove unnecessary close/open tags - $compiled_content = preg_replace('~\?>\n?<\?php~', '', $compiled_content); - // run compiled template through postfilter functions if (count($this->_plugins['postfilter']) > 0) { foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) { @@ -859,7 +878,7 @@ class Smarty_Compiler extends Smarty { // traditional argument format $args = implode(',', array_values($attrs)); if (empty($args)) { - $args = 'null'; + $args = ''; } } @@ -880,9 +899,9 @@ class Smarty_Compiler extends Smarty { $prefix .= "while (\$_block_repeat) { ob_start();"; $return = null; $postfix = ''; - } else { - $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); "; - $return = "\$_block_repeat=false; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)"; + } else { + $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;"; + $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)"; $postfix = "} array_pop(\$this->_tag_stack);"; } } else { @@ -924,7 +943,11 @@ class Smarty_Compiler extends Smarty { $name = $this->_dequote($attrs['name']); if (empty($name)) { - $this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__); + return $this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__); + } + + if (!preg_match('~^\w+$~', $name)) { + return $this->_syntax_error("'insert: 'name' must be an insert function name", E_USER_ERROR, __FILE__, __LINE__); } if (!empty($attrs['script'])) { @@ -1157,7 +1180,7 @@ class Smarty_Compiler extends Smarty { } $item = $this->_dequote($attrs['item']); if (!preg_match('~^\w+$~', $item)) { - return $this->_syntax_error("'foreach: item' must be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__); + return $this->_syntax_error("foreach: 'item' must be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__); } if (isset($attrs['key'])) { @@ -1208,23 +1231,21 @@ class Smarty_Compiler extends Smarty { $attrs = $this->_parse_attrs($tag_args); if ($start) { - if (isset($attrs['name'])) - $buffer = $attrs['name']; - else - $buffer = "'default'"; - - if (isset($attrs['assign'])) - $assign = $attrs['assign']; - else - $assign = null; + $buffer = isset($attrs['name']) ? $attrs['name'] : "'default'"; + $assign = isset($attrs['assign']) ? $attrs['assign'] : null; + $append = isset($attrs['append']) ? $attrs['append'] : null; + $output = ""; - $this->_capture_stack[] = array($buffer, $assign); + $this->_capture_stack[] = array($buffer, $assign, $append); } else { - list($buffer, $assign) = array_pop($this->_capture_stack); + list($buffer, $assign, $append) = array_pop($this->_capture_stack); $output = "_smarty_vars['capture'][$buffer] = ob_get_contents(); "; if (isset($assign)) { $output .= " \$this->assign($assign, ob_get_contents());"; } + if (isset($append)) { + $output .= " \$this->append($append, ob_get_contents());"; + } $output .= "ob_end_clean(); ?>"; } @@ -1253,7 +1274,7 @@ class Smarty_Compiler extends Smarty { $tokens = $match[0]; if(empty($tokens)) { - $_error_msg .= $elseif ? "'elseif'" : "'if'"; + $_error_msg = $elseif ? "'elseif'" : "'if'"; $_error_msg .= ' statement requires arguments'; $this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__); } @@ -1351,9 +1372,14 @@ class Smarty_Compiler extends Smarty { /* If last token was a ')', we operate on the parenthesized expression. The start of the expression is on the stack. Otherwise, we operate on the last encountered token. */ - if ($tokens[$i-1] == ')') + if ($tokens[$i-1] == ')') { $is_arg_start = array_pop($is_arg_stack); - else + if ($is_arg_start != 0) { + if (preg_match('~^' . $this->_func_regexp . '$~', $tokens[$is_arg_start-1])) { + $is_arg_start--; + } + } + } else $is_arg_start = $i-1; /* Construct the argument for 'is' expression, so it knows what to operate on. */ @@ -1668,17 +1694,19 @@ class Smarty_Compiler extends Smarty { // if contains unescaped $, expand it if(preg_match_all('~(?:\`(?_dvar_guts_regexp . '(?:' . $this->_obj_ext_regexp . ')*\`)|(?:(?_parse_var(str_replace('`','',$_var)) . ')."', $var_expr); + $_replace[$_var] = '".(' . $this->_parse_var(str_replace('`','',$_var)) . ')."'; } + $var_expr = strtr($var_expr, $_replace); $_return = preg_replace('~\.""|(?_dvar_math_regexp.'|'.$this->_qstr_regexp.')~', $var_expr, -1, PREG_SPLIT_DELIM_CAPTURE); if(count($_math_vars) > 1) { @@ -1804,6 +1833,10 @@ class Smarty_Compiler extends Smarty { $_output .= '->{(($_var=$this->_tpl_vars[\''.substr($_index,3).'\']) && substr($_var,0,2)!=\'__\') ? $_var : $this->trigger_error("cannot access property \\"$_var\\"")}'; } } else { + if ($this->_phpversion < 5) { + $_has_php4_method_chaining = true; + $_output .= "; \$_foo = \$_foo"; + } $_output .= $_index; } } elseif (substr($_index, 0, 1) == '(') { @@ -1815,7 +1848,12 @@ class Smarty_Compiler extends Smarty { } } - return $_output; + if ($_has_php4_method_chaining) { + $_tmp = str_replace("'","\'",'$_foo = '.$_output.'; return $_foo;'); + return "eval('".$_tmp."')"; + } else { + return $_output; + } } /** @@ -2216,9 +2254,9 @@ class Smarty_Compiler extends Smarty { if ($_cacheable || 0<$this->_cacheable_state++) return ''; if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty')); - $_ret = 'if ($this->caching && !$this->_cache_including) { echo \'{nocache:' + $_ret = 'if ($this->caching && !$this->_cache_including): echo \'{nocache:' . $this->_cache_serial . '#' . $this->_nocache_count - . '}\'; };'; + . '}\'; endif;'; return $_ret; } @@ -2233,9 +2271,9 @@ class Smarty_Compiler extends Smarty { $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4]; if ($_cacheable || --$this->_cacheable_state>0) return ''; - return 'if ($this->caching && !$this->_cache_including) { echo \'{/nocache:' + return 'if ($this->caching && !$this->_cache_including): echo \'{/nocache:' . $this->_cache_serial . '#' . ($this->_nocache_count++) - . '}\'; };'; + . '}\'; endif;'; } diff --git a/includes/smarty/debug.tpl b/includes/smarty/debug.tpl index 7f1c9d42..c05ef5d0 100644 --- a/includes/smarty/debug.tpl +++ b/includes/smarty/debug.tpl @@ -1,64 +1,157 @@ {* Smarty *} - -{* debug.tpl, last updated version 2.0.1 *} - +{* debug.tpl, last updated version 2.1.0 *} {assign_debug_info} +{capture assign=debug_output} + + + + Smarty Debug Console +{literal} + +{/literal} + + + +

Smarty Debug Console

+ +

included templates & config files (load time in seconds)

+ +
+{section name=templates loop=$_debug_tpls} + {section name=indent loop=$_debug_tpls[templates].depth}   {/section} + + {$_debug_tpls[templates].filename|escape:html} + {if isset($_debug_tpls[templates].exec_time)} + + ({$_debug_tpls[templates].exec_time|string_format:"%.5f"}) + {if %templates.index% eq 0}(total){/if} + + {/if} +
+{sectionelse} +

no templates included

+{/section} +
+ +

assigned template variables

+ + + {section name=vars loop=$_debug_keys} + + + + {sectionelse} + + {/section} +
{ldelim}${$_debug_keys[vars]|escape:'html'}{rdelim}{$_debug_vals[vars]|@debug_print_var}

no template variables assigned

+ +

assigned config file variables (outer template scope)

+ + + {section name=config_vars loop=$_debug_config_keys} + + + + {sectionelse} + + {/section} +
{ldelim}#{$_debug_config_keys[config_vars]|escape:'html'}#{rdelim}{$_debug_config_vals[config_vars]|@debug_print_var}

no config vars assigned

+ + +{/capture} {if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"} - - - - {section name=templates loop=$_debug_tpls} - - {sectionelse} - - {/section} - - {section name=vars loop=$_debug_keys} - - {sectionelse} - - {/section} - - {section name=config_vars loop=$_debug_config_keys} - - {sectionelse} - - {/section} -
Smarty Debug Console
included templates & config files (load time in seconds):
{section name=indent loop=$_debug_tpls[templates].depth}   {/section}{$_debug_tpls[templates].filename|escape:html}{if isset($_debug_tpls[templates].exec_time)} ({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}{/if}
no templates included
assigned template variables:
{ldelim}${$_debug_keys[vars]}{rdelim}{$_debug_vals[vars]|@debug_print_var}
no template variables assigned
assigned config file variables (outer template scope):
{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}{$_debug_config_vals[config_vars]|@debug_print_var}
no config vars assigned
- + {$debug_output} {else} - -{/if} + +{/if} \ No newline at end of file diff --git a/includes/smarty/internals/core.process_compiled_include.php b/includes/smarty/internals/core.process_compiled_include.php index d539423b..904d5974 100644 --- a/includes/smarty/internals/core.process_compiled_include.php +++ b/includes/smarty/internals/core.process_compiled_include.php @@ -25,7 +25,7 @@ function smarty_core_process_compiled_include($params, &$smarty) $smarty->_include($_include_file_path, true); } - foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) { + foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) { $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s', array(&$smarty, '_process_compiled_include_callback'), $_return); diff --git a/includes/smarty/internals/core.write_cache_file.php b/includes/smarty/internals/core.write_cache_file.php index 72f785b7..fa3cdd74 100644 --- a/includes/smarty/internals/core.write_cache_file.php +++ b/includes/smarty/internals/core.write_cache_file.php @@ -68,7 +68,7 @@ function smarty_core_write_cache_file($params, &$smarty) if (!empty($smarty->cache_handler_func)) { // use cache_handler function call_user_func_array($smarty->cache_handler_func, - array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null)); + array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], $smarty->_cache_info['expires'])); } else { // use local cache file diff --git a/includes/smarty/internals/core.write_compiled_include.php b/includes/smarty/internals/core.write_compiled_include.php index 3a780941..c14adb5f 100644 --- a/includes/smarty/internals/core.write_compiled_include.php +++ b/includes/smarty/internals/core.write_compiled_include.php @@ -15,12 +15,12 @@ function smarty_core_write_compiled_include($params, &$smarty) { - $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; \};'; - $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\'; \};'; + $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; endif;'; + $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{/nocache\:(\\2)#(\\3)\}\'; endif;'; preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us', $params['compiled_content'], $_match_source, PREG_SET_ORDER); - + // no nocache-parts found: done if (count($_match_source)==0) return; diff --git a/includes/smarty/internals/core.write_file.php b/includes/smarty/internals/core.write_file.php index 09e16984..8a3a3b39 100644 --- a/includes/smarty/internals/core.write_file.php +++ b/includes/smarty/internals/core.write_file.php @@ -23,8 +23,7 @@ function smarty_core_write_file($params, &$smarty) smarty_core_create_dir_structure($_params, $smarty); } - // write to tmp file, then rename it to avoid - // file locking race condition + // write to tmp file, then rename it to avoid file locking race condition $_tmp_file = tempnam($_dirname, 'wrt'); if (!($fd = @fopen($_tmp_file, 'wb'))) { @@ -38,12 +37,13 @@ function smarty_core_write_file($params, &$smarty) fwrite($fd, $params['contents']); fclose($fd); - // Delete the file if it allready exists (this is needed on Win, - // because it cannot overwrite files with rename() - if (file_exists($params['filename'])) { + if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) { + // On platforms and filesystems that cannot overwrite with rename() + // delete the file before renaming it -- because windows always suffers + // this, it is short-circuited to avoid the initial rename() attempt @unlink($params['filename']); + @rename($_tmp_file, $params['filename']); } - @rename($_tmp_file, $params['filename']); @chmod($params['filename'], $smarty->_file_perms); return true; @@ -51,4 +51,4 @@ function smarty_core_write_file($params, &$smarty) /* vim: set expandtab: */ -?> +?> \ No newline at end of file diff --git a/includes/smarty/plugins/compiler.assign.php b/includes/smarty/plugins/compiler.assign.php index be172985..abef377f 100644 --- a/includes/smarty/plugins/compiler.assign.php +++ b/includes/smarty/plugins/compiler.assign.php @@ -14,7 +14,7 @@ * @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign} * (Smarty online manual) * @author Monte Ohrt (initial author) - * @auther messju mohr (conversion to compiler function) + * @author messju mohr (conversion to compiler function) * @param string containing var-attribute and value-attribute * @param Smarty_Compiler */ diff --git a/includes/smarty/plugins/function.html_select_date.php b/includes/smarty/plugins/function.html_select_date.php index 9270cd6c..e5eb1830 100644 --- a/includes/smarty/plugins/function.html_select_date.php +++ b/includes/smarty/plugins/function.html_select_date.php @@ -22,11 +22,13 @@ * month values (Gary Loescher) * - 1.3.1 added support for choosing format for * day values (Marcus Bointon) - * - 1.3.2 suppport negative timestamps, force year + * - 1.3.2 support negative timestamps, force year * dropdown to include given date unless explicitly set (Monte) + * - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that + * of 0000-00-00 dates (cybot, boots) * @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date} * (Smarty online manual) - * @version 1.3.2 + * @version 1.3.4 * @author Andrei Zmievski * @author Monte Ohrt * @param array @@ -131,19 +133,21 @@ function smarty_function_html_select_date($params, &$smarty) } } - if(preg_match('!^-\d+$!',$time)) { + if (preg_match('!^-\d+$!', $time)) { // negative timestamp, use date() - $time = date('Y-m-d',$time); + $time = date('Y-m-d', $time); } // If $time is not in format yyyy-mm-dd - if (!preg_match('/^\d{0,4}-\d{0,2}-\d{0,2}$/', $time)) { + if (preg_match('/^(\d{0,4}-\d{0,2}-\d{0,2})/', $time, $found)) { + $time = $found[1]; + } else { // use smarty_make_timestamp to get an unix timestamp and // strftime to make yyyy-mm-dd $time = strftime('%Y-%m-%d', smarty_make_timestamp($time)); } // Now split this in pieces, which later can be used to set the select $time = explode("-", $time); - + // make syntax "+N" or "-N" work with start_year and end_year if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) { if ($match[1] == '+') { @@ -159,7 +163,7 @@ function smarty_function_html_select_date($params, &$smarty) $start_year = strftime('%Y') - $match[2]; } } - if (strlen($time[0]) > 0) { + if (strlen($time[0]) > 0) { if ($start_year > $time[0] && !isset($params['start_year'])) { // force start year to include given date if not explicitly set $start_year = $time[0]; @@ -174,7 +178,9 @@ function smarty_function_html_select_date($params, &$smarty) $html_result = $month_result = $day_result = $year_result = ""; + $field_separator_count = -1; if ($display_months) { + $field_separator_count++; $month_names = array(); $month_values = array(); if(isset($month_empty)) { @@ -212,6 +218,7 @@ function smarty_function_html_select_date($params, &$smarty) } if ($display_days) { + $field_separator_count++; $days = array(); if (isset($day_empty)) { $days[''] = $day_empty; @@ -247,6 +254,7 @@ function smarty_function_html_select_date($params, &$smarty) } if ($display_years) { + $field_separator_count++; if (null !== $field_array){ $year_name = $field_array . '[' . $prefix . 'Year]'; } else { @@ -310,7 +318,7 @@ function smarty_function_html_select_date($params, &$smarty) break; } // Add the field seperator - if($i != 2) { + if($i < $field_separator_count) { $html_result .= $field_separator; } } diff --git a/includes/smarty/plugins/function.html_table.php b/includes/smarty/plugins/function.html_table.php index 62d7410b..32aeba83 100644 --- a/includes/smarty/plugins/function.html_table.php +++ b/includes/smarty/plugins/function.html_table.php @@ -15,12 +15,15 @@ * Purpose: make an html table from an array of data
* Input:
* - loop = array to loop through - * - cols = number of columns + * - cols = number of columns, comma separated list of column names + * or array of column names * - rows = number of rows * - table_attr = table attributes + * - th_attr = table heading attributes (arrays are cycled) * - tr_attr = table row attributes (arrays are cycled) * - td_attr = table cell attributes (arrays are cycled) * - trailpad = value to pad trailing cells with + * - caption = text for caption element * - vdir = vertical direction (default: "down", means top-to-bottom) * - hdir = horizontal direction (default: "right", means left-to-right) * - inner = inner loop (default "cols": print $loop line by line, @@ -31,10 +34,12 @@ *
  * {table loop=$data}
  * {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
- * {table loop=$data cols=4 tr_attr=$colors}
+ * {table loop=$data cols="first,second,third" tr_attr=$colors}
  * 
* @author Monte Ohrt - * @version 1.0 + * @author credit to Messju Mohr + * @author credit to boots + * @version 1.1 * @link http://smarty.php.net/manual/en/language.function.html.table.php {html_table} * (Smarty online manual) * @param array @@ -45,13 +50,15 @@ function smarty_function_html_table($params, &$smarty) { $table_attr = 'border="1"'; $tr_attr = ''; + $th_attr = ''; $td_attr = ''; - $cols = 3; + $cols = $cols_count = 3; $rows = 3; $trailpad = ' '; $vdir = 'down'; $hdir = 'right'; $inner = 'cols'; + $caption = ''; if (!isset($params['loop'])) { $smarty->trigger_error("html_table: missing 'loop' parameter"); @@ -65,6 +72,19 @@ function smarty_function_html_table($params, &$smarty) break; case 'cols': + if (is_array($_value) && !empty($_value)) { + $cols = $_value; + $cols_count = count($_value); + } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) { + $cols = explode(',', $_value); + $cols_count = count($cols); + } elseif (!empty($_value)) { + $cols_count = (int)$_value; + } else { + $cols_count = $cols; + } + break; + case 'rows': $$_key = (int)$_value; break; @@ -74,11 +94,13 @@ function smarty_function_html_table($params, &$smarty) case 'hdir': case 'vdir': case 'inner': + case 'caption': $$_key = (string)$_value; break; case 'tr_attr': case 'td_attr': + case 'th_attr': $$_key = $_value; break; } @@ -87,25 +109,42 @@ function smarty_function_html_table($params, &$smarty) $loop_count = count($loop); if (empty($params['rows'])) { /* no rows specified */ - $rows = ceil($loop_count/$cols); + $rows = ceil($loop_count/$cols_count); } elseif (empty($params['cols'])) { if (!empty($params['rows'])) { /* no cols specified, but rows */ - $cols = ceil($loop_count/$rows); + $cols_count = ceil($loop_count/$rows); } } $output = "\n"; + if (!empty($caption)) { + $output .= '\n"; + } + + if (is_array($cols)) { + $cols = ($hdir == 'right') ? $cols : array_reverse($cols); + $output .= "\n"; + + for ($r=0; $r<$cols_count; $r++) { + $output .= ''; + $output .= $cols[$r]; + $output .= "\n"; + } + $output .= "\n"; + } + + $output .= "\n"; for ($r=0; $r<$rows; $r++) { $output .= "\n"; - $rx = ($vdir == 'down') ? $r*$cols : ($rows-1-$r)*$cols; + $rx = ($vdir == 'down') ? $r*$cols_count : ($rows-1-$r)*$cols_count; - for ($c=0; $c<$cols; $c++) { - $x = ($hdir == 'right') ? $rx+$c : $rx+$cols-1-$c; + for ($c=0; $c<$cols_count; $c++) { + $x = ($hdir == 'right') ? $rx+$c : $rx+$cols_count-1-$c; if ($inner!='cols') { /* shuffle x to loop over rows*/ - $x = floor($x/$cols) + ($x%$cols)*$rows; + $x = floor($x/$cols_count) + ($x%$cols_count)*$rows; } if ($x<$loop_count) { @@ -116,6 +155,7 @@ function smarty_function_html_table($params, &$smarty) } $output .= "\n"; } + $output .= "\n"; $output .= "
' . $caption . "
\n"; return $output; diff --git a/includes/smarty/plugins/function.mailto.php b/includes/smarty/plugins/function.mailto.php index 64c122ce..20e9ed98 100644 --- a/includes/smarty/plugins/function.mailto.php +++ b/includes/smarty/plugins/function.mailto.php @@ -62,6 +62,8 @@ function smarty_function_mailto($params, &$smarty) // netscape and mozilla do not decode %40 (@) in BCC field (bug?) // so, don't encode it. + $search = array('%40', '%2C'); + $replace = array('@', ','); $mail_parms = array(); foreach ($params as $var=>$value) { switch ($var) { @@ -69,7 +71,7 @@ function smarty_function_mailto($params, &$smarty) case 'bcc': case 'followupto': if (!empty($value)) - $mail_parms[] = $var.'='.str_replace('%40','@',rawurlencode($value)); + $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value)); break; case 'subject': diff --git a/includes/smarty/plugins/modifier.capitalize.php b/includes/smarty/plugins/modifier.capitalize.php index bca951a0..4a611d9f 100644 --- a/includes/smarty/plugins/modifier.capitalize.php +++ b/includes/smarty/plugins/modifier.capitalize.php @@ -21,7 +21,7 @@ function smarty_modifier_capitalize($string, $uc_digits = false) { smarty_modifier_capitalize_ucfirst(null, $uc_digits); - return preg_replace_callback('!\b\w+\b!', 'smarty_modifier_capitalize_ucfirst', $string); + return preg_replace_callback('!\'?\b\w(\w|\')*\b!', 'smarty_modifier_capitalize_ucfirst', $string); } function smarty_modifier_capitalize_ucfirst($string, $uc_digits = null) @@ -33,7 +33,7 @@ function smarty_modifier_capitalize_ucfirst($string, $uc_digits = null) return; } - if(!preg_match('!\d!',$string[0]) || $_uc_digits) + if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits) return ucfirst($string[0]); else return $string[0]; diff --git a/includes/smarty/plugins/modifier.date_format.php b/includes/smarty/plugins/modifier.date_format.php index 523c144f..8cf7d5e1 100644 --- a/includes/smarty/plugins/modifier.date_format.php +++ b/includes/smarty/plugins/modifier.date_format.php @@ -8,7 +8,7 @@ /** * Include the {@link shared.make_timestamp.php} plugin */ -require_once $smarty->_get_plugin_filepath('shared','make_timestamp'); +require_once $smarty->_get_plugin_filepath('shared', 'make_timestamp'); /** * Smarty date_format modifier plugin * @@ -28,20 +28,29 @@ require_once $smarty->_get_plugin_filepath('shared','make_timestamp'); * @return string|void * @uses smarty_make_timestamp() */ -function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null) +function smarty_modifier_date_format($string, $format = '%b %e, %Y', $default_date = '') { - if (substr(PHP_OS,0,3) == 'WIN') { - $_win_from = array ('%e', '%T', '%D'); - $_win_to = array ('%#d', '%H:%M:%S', '%m/%d/%y'); - $format = str_replace($_win_from, $_win_to, $format); - } - if($string != '') { - return strftime($format, smarty_make_timestamp($string)); - } elseif (isset($default_date) && $default_date != '') { - return strftime($format, smarty_make_timestamp($default_date)); + if ($string != '') { + $timestamp = smarty_make_timestamp($string); + } elseif ($default_date != '') { + $timestamp = smarty_make_timestamp($default_date); } else { return; } + if (DIRECTORY_SEPARATOR == '\\') { + $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T'); + $_win_to = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S'); + if (strpos($format, '%e') !== false) { + $_win_from[] = '%e'; + $_win_to[] = sprintf('%\' 2d', date('j', $timestamp)); + } + if (strpos($format, '%l') !== false) { + $_win_from[] = '%l'; + $_win_to[] = sprintf('%\' 2d', date('h', $timestamp)); + } + $format = str_replace($_win_from, $_win_to, $format); + } + return strftime($format, $timestamp); } /* vim: set expandtab: */ diff --git a/includes/smarty/plugins/modifier.debug_print_var.php b/includes/smarty/plugins/modifier.debug_print_var.php index d28956a0..e4f7bc0c 100644 --- a/includes/smarty/plugins/modifier.debug_print_var.php +++ b/includes/smarty/plugins/modifier.debug_print_var.php @@ -22,33 +22,66 @@ */ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40) { - $_replace = array("\n"=>'\n', "\r"=>'\r', "\t"=>'\t'); - if (is_array($var)) { - $results = "Array (".count($var).")"; - foreach ($var as $curr_key => $curr_val) { - $return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length); - $results .= "
".str_repeat(' ', $depth*2)."".strtr($curr_key, $_replace)." => $return"; - } - } else if (is_object($var)) { - $object_vars = get_object_vars($var); - $results = "".get_class($var)." Object (".count($object_vars).")"; - foreach ($object_vars as $curr_key => $curr_val) { - $return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length); - $results .= "
".str_repeat(' ', $depth*2)."$curr_key => $return"; - } - } else if (is_resource($var)) { - $results = ''.(string)$var.''; - } else if (empty($var) && $var != "0") { - $results = 'empty'; - } else { - if (strlen($var) > $length ) { - $results = substr($var, 0, $length-3).'...'; - } else { - $results = $var; - } - $results = htmlspecialchars($results); - $results = strtr($results, $_replace); + $_replace = array( + "\n" => '\n', + "\r" => '\r', + "\t" => '\t' + ); + + switch (gettype($var)) { + case 'array' : + $results = 'Array (' . count($var) . ')'; + foreach ($var as $curr_key => $curr_val) { + $results .= '
' . str_repeat(' ', $depth * 2) + . '' . strtr($curr_key, $_replace) . ' => ' + . smarty_modifier_debug_print_var($curr_val, ++$depth, $length); + $depth--; + } + break; + case 'object' : + $object_vars = get_object_vars($var); + $results = '' . get_class($var) . ' Object (' . count($object_vars) . ')'; + foreach ($object_vars as $curr_key => $curr_val) { + $results .= '
' . str_repeat(' ', $depth * 2) + . ' ->' . strtr($curr_key, $_replace) . ' = ' + . smarty_modifier_debug_print_var($curr_val, ++$depth, $length); + $depth--; + } + break; + case 'boolean' : + case 'NULL' : + case 'resource' : + if (true === $var) { + $results = 'true'; + } elseif (false === $var) { + $results = 'false'; + } elseif (null === $var) { + $results = 'null'; + } else { + $results = htmlspecialchars((string) $var); + } + $results = '' . $results . ''; + break; + case 'integer' : + case 'float' : + $results = htmlspecialchars((string) $var); + break; + case 'string' : + $results = strtr($var, $_replace); + if (strlen($var) > $length ) { + $results = substr($var, 0, $length - 3) . '...'; + } + $results = htmlspecialchars('"' . $results . '"'); + break; + case 'unknown type' : + default : + $results = strtr((string) $var, $_replace); + if (strlen($results) > $length ) { + $results = substr($results, 0, $length - 3) . '...'; + } + $results = htmlspecialchars($results); } + return $results; } diff --git a/includes/smarty/plugins/modifier.regex_replace.php b/includes/smarty/plugins/modifier.regex_replace.php index 0695f531..100b58ce 100644 --- a/includes/smarty/plugins/modifier.regex_replace.php +++ b/includes/smarty/plugins/modifier.regex_replace.php @@ -11,7 +11,7 @@ * * Type: modifier
* Name: regex_replace
- * Purpose: regular epxression search/replace + * Purpose: regular expression search/replace * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php * regex_replace (Smarty online manual) * @author Monte Ohrt @@ -22,13 +22,27 @@ */ function smarty_modifier_regex_replace($string, $search, $replace) { - if (preg_match('!\W(\w+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { - /* remove eval-modifier from $search */ - $search = substr($search, 0, -strlen($match[1])) . str_replace('e', '', $match[1]); - } + if(is_array($search)) { + foreach($search as $idx => $s) + $search[$idx] = _smarty_regex_replace_check($s); + } else { + $search = _smarty_regex_replace_check($search); + } + return preg_replace($search, $replace, $string); } +function _smarty_regex_replace_check($search) +{ + if (($pos = strpos($search,"\0")) !== false) + $search = substr($search,0,$pos); + if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { + /* remove eval-modifier from $search */ + $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]); + } + return $search; +} + /* vim: set expandtab: */ ?> diff --git a/includes/smarty/plugins/modifier.truncate.php b/includes/smarty/plugins/modifier.truncate.php index d96de5f1..35c89690 100644 --- a/includes/smarty/plugins/modifier.truncate.php +++ b/includes/smarty/plugins/modifier.truncate.php @@ -31,12 +31,12 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...', return ''; if (strlen($string) > $length) { - $length -= strlen($etc); + $length -= min($length, strlen($etc)); if (!$break_words && !$middle) { $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1)); } if(!$middle) { - return substr($string, 0, $length).$etc; + return substr($string, 0, $length) . $etc; } else { return substr($string, 0, $length/2) . $etc . substr($string, -$length/2); } diff --git a/includes/smarty/plugins/outputfilter.trimwhitespace.php b/includes/smarty/plugins/outputfilter.trimwhitespace.php index 01e35e03..739fa39b 100644 --- a/includes/smarty/plugins/outputfilter.trimwhitespace.php +++ b/includes/smarty/plugins/outputfilter.trimwhitespace.php @@ -28,35 +28,35 @@ function smarty_outputfilter_trimwhitespace($source, &$smarty) { // Pull out the script blocks - preg_match_all("!]+>.*?!is", $source, $match); + preg_match_all("!]*?>.*?!is", $source, $match); $_script_blocks = $match[0]; - $source = preg_replace("!]+>.*?!is", + $source = preg_replace("!]*?>.*?!is", '@@@SMARTY:TRIM:SCRIPT@@@', $source); // Pull out the pre blocks - preg_match_all("!
.*?
!is", $source, $match); + preg_match_all("!]*?>.*?
!is", $source, $match); $_pre_blocks = $match[0]; - $source = preg_replace("!
.*?
!is", + $source = preg_replace("!]*?>.*?!is", '@@@SMARTY:TRIM:PRE@@@', $source); - + // Pull out the textarea blocks - preg_match_all("!]+>.*?!is", $source, $match); + preg_match_all("!]*?>.*?!is", $source, $match); $_textarea_blocks = $match[0]; - $source = preg_replace("!]+>.*?!is", + $source = preg_replace("!]*?>.*?!is", '@@@SMARTY:TRIM:TEXTAREA@@@', $source); // remove all leading spaces, tabs and carriage returns NOT // preceeded by a php close tag. $source = trim(preg_replace('/((?)\n)[\s]+/m', '\1', $source)); - // replace script blocks - smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source); + // replace textarea blocks + smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source); // replace pre blocks smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source); - // replace textarea blocks - smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source); + // replace script blocks + smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source); return $source; } diff --git a/includes/tinymce/jscripts/tiny_mce/blank.htm b/includes/tinymce/jscripts/tiny_mce/blank.htm deleted file mode 100644 index 11420de3..00000000 --- a/includes/tinymce/jscripts/tiny_mce/blank.htm +++ /dev/null @@ -1,10 +0,0 @@ - - - -blank_page - - - - - - diff --git a/includes/tinymce/jscripts/tiny_mce/langs/ar.js b/includes/tinymce/jscripts/tiny_mce/langs/ar.js index d5e8f2bc..e45960aa 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/ar.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/ar.js @@ -1,39 +1,154 @@ -// arabic lang variables -// Toolbar Items and Context Menu -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_bold_desc'] = 'غامق'; -tinyMCELang['lang_italic_desc'] = 'مائل'; -tinyMCELang['lang_underline_desc'] = 'تسطير'; -tinyMCELang['lang_striketrough_desc'] = 'يتوسطه خط'; -tinyMCELang['lang_justifyleft_desc'] = 'محاذاة إلى اليسار'; -tinyMCELang['lang_justifycenter_desc'] = 'توسيط'; -tinyMCELang['lang_justifyright_desc'] = 'محاذاة إلى اليمين'; -tinyMCELang['lang_justifyfull_desc'] = 'ضبط'; -tinyMCELang['lang_bullist_desc'] = 'تعداد نقطي'; -tinyMCELang['lang_numlist_desc'] = 'تعداد رقمي'; -tinyMCELang['lang_outdent_desc'] = 'إنقاص المسافة البادئة'; -tinyMCELang['lang_indent_desc'] = 'زيادة المسافة البادئة'; -tinyMCELang['lang_undo_desc'] = 'تراجع'; -tinyMCELang['lang_redo_desc'] = 'إعادة'; -tinyMCELang['lang_link_desc'] = 'إدراج/تحرير رابط'; -tinyMCELang['lang_unlink_desc'] = 'إزالة رابط'; -tinyMCELang['lang_image_desc'] = 'إدراج/تحرير صورة'; -tinyMCELang['lang_cleanup_desc'] = 'Cleanup messy code'; -tinyMCELang['lang_focus_alert'] = 'A editor instance must be focused before using this command.'; -tinyMCELang['lang_edit_confirm'] = 'Do you want to use the WYSIWYG mode for this textarea?'; -tinyMCELang['lang_insert_link_title'] = 'إدراج/تحرير رابط'; -tinyMCELang['lang_insert'] = 'إدراج'; -tinyMCELang['lang_update'] = 'إدراج'; -tinyMCELang['lang_cancel'] = 'ألغي'; -tinyMCELang['lang_insert_link_url'] = 'رابط URL'; -tinyMCELang['lang_insert_link_target'] = 'الهدف'; -tinyMCELang['lang_insert_link_target_same'] = 'نفس الإطار'; -tinyMCELang['lang_insert_link_target_blank'] = 'إطار جديد (_blank)'; -tinyMCELang['lang_insert_image_title'] = 'إدراج/تحرير صورة'; -tinyMCELang['lang_insert_image_src'] = 'صورة URL'; -tinyMCELang['lang_insert_image_alt'] = 'الوصف'; -tinyMCELang['lang_help_desc'] = 'المساعدة'; -tinyMCELang['lang_bold_img'] = 'bold.gif'; -tinyMCELang['lang_italic_img'] = 'italic.gif'; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({ar:{ +common:{ +edit_confirm:"\u0647\u0644 \u062A\u0631\u064A\u062F \u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0645\u062D\u0631\u0631 \u0644\u0645\u0631\u0628\u0639 \u0627\u0644\u0646\u0635 \u0647\u0630\u0627?", +apply:"\u062A\u0637\u0628\u064A\u0642", +insert:"\u0627\u062F\u0631\u0627\u062C", +update:"\u062A\u062D\u062F\u064A\u062B", +cancel:"\u062A\u0631\u0627\u062C\u0639", +close:"\u0627\u063A\u0644\u0627\u0642", +browse:"\u0627\u0633\u062A\u0639\u0631\u0627\u0636", +class_name:"\u0641\u0626\u0629", +not_set:"-- \u0628\u062F\u0648\u0646 \u062A\u062D\u062F\u064A\u062F --", +clipboard_msg:"\u0646\u0633\u062E/\u0642\u0635/\u0644\u0635\u0642 \u063A\u064A\u0631 \u0645\u062A\u0648\u0641\u0631\u0629 \u0644\u0645\u062A\u0635\u0641\u062D Mozilla \u0648 Firefox.\n\u0647\u0644 \u062A\u0631\u064A\u062F \u0645\u0639\u0631\u0641\u0629 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062A \u062D\u0648\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0648\u0636\u0648\u0639?", +clipboard_no_support:"\u062D\u0627\u0644\u064A\u0627\u060C \u0647\u0630\u0647 \u0627\u0644\u062E\u0627\u0635\u064A\u0629 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645\u0629 \u0645\u0646 \u0642\u0628\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D\u060C \u0627\u0633\u062A\u0639\u0645\u0644 \u0627\u062E\u062A\u0635\u0627\u0631\u0627\u062A \u0644\u0648\u062D\u0629 \u0627\u0644\u0645\u0641\u0627\u062A\u064A\u062D.", +popup_blocked:"\u0639\u0630\u0631\u0627\u060C \u0648\u0644\u0643\u0646 \u064A\u0628\u062F\u0648 \u0623\u0646 \u0645\u0639\u064A\u0642 \u0627\u0644\u0627\u0639\u0644\u0627\u0646\u0627\u062A popup-blocker \u0627\u0644\u062E\u0627\u0635 \u0628\u0645\u062A\u0635\u0641\u062D\u0643 \u0642\u0627\u0645 \u0628\u062A\u0639\u0637\u064A\u0644 \u0646\u0627\u0641\u0630\u0629 \u062A\u062A\u064A\u062D \u0644\u0645\u062D\u0631\u0631 \u0627\u0644\u0646\u0635\u0648\u0635 \u0627\u0644\u0639\u0645\u0644 \u0628\u0635\u0648\u0631\u0629 \u0637\u0628\u064A\u0639\u064A\u0629. \u0639\u0644\u064A\u0643 \u0628\u062A\u0639\u0637\u064A\u0644 \u0645\u0639\u064A\u0642 \u0627\u0644\u0627\u0639\u0644\u0627\u0646\u0627\u062A popup-blocker \u0644\u0647\u0630\u0627 \u0627\u0644\u0645\u0648\u0642\u0639 \u062D\u062A\u0649 \u062A\u0633\u062A\u0637\u064A\u0639 \u0627\u0633\u062A\u0639\u0645\u0627\u0644 \u0645\u062D\u0631\u0631 \u0627\u0644\u0646\u0635\u0648\u0635 \u0628\u0635\u0648\u0631\u0629 \u0637\u0628\u064A\u0639\u064A\u0629.", +invalid_data:"\u062E\u0637\u0623: \u0627\u0644\u0642\u064A\u0645 \u0627\u0644\u0645\u062F\u062E\u0644\u0629 \u062E\u0627\u0637\u0626\u0629, \u0644\u0642\u062F \u062A\u0645 \u062A\u062D\u062F\u064A\u062F\u0647\u0627 \u0628\u0627\u0644\u0644\u0648\u0646 \u0627\u0644\u0623\u062D\u0645\u0631.", +more_colors:"\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0623\u0644\u0648\u0627\u0646" +}, +contextmenu:{ +align:"\u0645\u062D\u0627\u0630\u0627\u0629", +left:"\u064A\u0633\u0627\u0631", +center:"\u0648\u0633\u0637", +right:"\u064A\u0645\u064A\u0646", +full:"\u0636\u0628\u0637" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u0625\u062F\u0631\u0627\u062C \u0627\u0644\u062A\u0627\u0631\u064A\u062E", +inserttime_desc:"\u0625\u062F\u0631\u0627\u062C \u0627\u0644\u0648\u0642\u062A", +months_long:"\u064A\u0646\u0627\u064A\u0631,\u0641\u0628\u0631\u0627\u064A\u0631,\u0645\u0627\u0631\u0633,\u0627\u0628\u0631\u064A\u0644,\u0645\u0627\u064A\u0648,\u064A\u0648\u0646\u064A\u0648,\u064A\u0648\u0644\u064A\u0648,\u0627\u063A\u0633\u0637\u0633,\u0633\u0628\u062A\u0645\u0628\u0631,\u0627\u0643\u062A\u0648\u0628\u0631,\u0646\u0648\u0641\u0645\u0628\u0631,\u062F\u064A\u0633\u0645\u0628\u0631", +months_short:"\u064A\u0646\u0627\u064A\u0631,\u0641\u0628\u0631\u0627\u064A\u0631,\u0645\u0627\u0631\u0633,\u0627\u0628\u0631\u064A\u0644,\u0645\u0627\u064A\u0648,\u064A\u0648\u0646\u064A\u0648,\u064A\u0648\u0644\u064A\u0648,\u0627\u063A\u0633\u0637\u0633,\u0633\u0628\u062A\u0645\u0628\u0631,\u0627\u0643\u062A\u0648\u0628\u0631,\u0646\u0648\u0641\u0645\u0628\u0631,\u062F\u064A\u0633\u0645\u0628\u0631", +day_long:"\u0627\u0644\u0623\u062D\u062F,\u0627\u0644\u0625\u062B\u0646\u064A\u0646,\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621,\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621,\u0627\u0644\u062E\u0645\u064A\u0633,\u0627\u0644\u062C\u0645\u0639\u0629,\u0627\u0644\u0633\u0628\u062A,\u0627\u0644\u0623\u062D\u062F", +day_short:"\u0627\u0644\u0623\u062D\u062F,\u0627\u0644\u0625\u062B\u0646\u064A\u0646,\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621,\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621,\u0627\u0644\u062E\u0645\u064A\u0633,\u0627\u0644\u062C\u0645\u0639\u0629,\u0627\u0644\u0633\u0628\u062A,\u0627\u0644\u0623\u062D\u062F" +}, +print:{ +print_desc:"\u0637\u0628\u0627\u0639\u0629" +}, +preview:{ +preview_desc:"\u0645\u0639\u0627\u064A\u0646\u0629" +}, +directionality:{ +ltr_desc:"\u0645\u0646 \u0627\u0644\u064A\u0633\u0627\u0631 \u0627\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646", +rtl_desc:"\u0645\u0646 \u0627\u0644\u064A\u0645\u064A\u0646 \u0627\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631" +}, +layer:{ +insertlayer_desc:"\u0625\u062F\u0631\u0627\u062C \u0637\u0628\u0642\u0629 \u062C\u062F\u064A\u062F\u0629", +forward_desc:"\u062A\u062D\u0631\u064A\u0643 \u0644\u0644\u0645\u0642\u062F\u0645\u0629", +backward_desc:"\u062A\u062D\u0631\u064A\u0643 \u0644\u0644\u0645\u0624\u062E\u0631\u0629", +absolute_desc:"\u062A\u062B\u0628\u064A\u062A \u0645\u0637\u0644\u0642 \u0644\u0644\u0645\u0648\u0627\u0636\u0639", +content:"\u0637\u0628\u0642\u0629 \u062C\u062F\u064A\u062F\u0629..." +}, +save:{ +save_desc:"\u062D\u0641\u0638", +cancel_desc:"\u0627\u0644\u063A\u0627\u0621 \u062C\u0645\u064A\u0639 \u0627\u0644\u062A\u0639\u062F\u064A\u0644\u0627\u062A" +}, +nonbreaking:{ +nonbreaking_desc:"\u0625\u062F\u0631\u0627\u062C \u0627\u0644\u062D\u0631\u0641 non-breaking space" +}, +iespell:{ +iespell_desc:"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u062A\u062F\u0642\u064A\u0642 \u0627\u0644\u0625\u0645\u0644\u0627\u0626\u064A", +download:"\u0628\u0631\u0646\u0627\u0645\u062C ieSpell \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F. \u0647\u0644 \u062A\u0631\u064A\u062F \u0623\u0646 \u062A\u0642\u0648\u0645 \u0628\u062A\u062B\u0628\u064A\u062A\u0647 \u0627\u0644\u0622\u0646\u061F" +}, +advhr:{ +advhr_desc:"\u062E\u0637 \u0627\u0641\u0642\u064A" +}, +emotions:{ +emotions_desc:"\u0627\u0644\u0625\u0628\u062A\u0633\u0627\u0645\u0627\u062A" +}, +searchreplace:{ +search_desc:"\u0628\u062D\u062B", +replace_desc:"\u0628\u062D\u062B/\u0627\u0633\u062A\u0628\u062F\u0627\u0644" +}, +advimage:{ +image_desc:"\u0625\u062F\u0631\u0627\u062C/\u062A\u062D\u0631\u064A\u0631 \u0635\u0648\u0631\u0629" +}, +advlink:{ +link_desc:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u0631\u0627\u0628\u0637" +}, +xhtmlxtras:{ +cite_desc:"\u0627\u0642\u062A\u0628\u0627\u0633", +abbr_desc:"\u0627\u0644\u0627\u062E\u062A\u0635\u0627\u0631", +acronym_desc:"\u0627\u0644\u0627\u062E\u062A\u0635\u0627\u0631", +del_desc:"\u062D\u0630\u0641", +ins_desc:"\u0625\u062F\u0631\u0627\u062C", +attribs_desc:"\u0625\u062F\u0631\u0627\u062C/\u062A\u062D\u0631\u064A\u0631 \u0627\u0644\u062E\u0635\u0627\u0626\u0635" +}, +style:{ +desc:"\u062A\u0639\u062F\u064A\u0644 CSS Style" +}, +paste:{ +paste_text_desc:"\u0644\u0635\u0642 \u0643\u0646\u0635 \u0639\u0627\u062F\u064A", +paste_word_desc:"\u0644\u0635\u0642 \u0645\u0646 \u0645\u0633\u062A\u0646\u062F \u0648\u0648\u0631\u062F", +selectall_desc:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644" +}, +paste_dlg:{ +text_title:"\u0627\u0633\u062A\u062E\u062F\u0645 CTRL+V \u0641\u064A \u0644\u0648\u062D\u0629 \u0627\u0644\u0645\u0641\u0627\u062A\u064A\u062D \u0644\u0644\u0635\u0642 \u0627\u0644\u0646\u0635\u0641 \u0641\u064A \u0627\u0644\u0646\u0627\u0641\u0630\u0629.", +text_linebreaks:"\u0627\u0628\u0642\u064A \u0641\u0648\u0627\u0635\u0644 \u0627\u0644\u0623\u0633\u0637\u0631", +word_title:"\u0633\u062A\u062E\u062F\u0645 CTRL+V \u0641\u064A \u0644\u0648\u062D\u0629 \u0627\u0644\u0645\u0641\u0627\u062A\u064A\u062D \u0644\u0644\u0635\u0642 \u0627\u0644\u0646\u0635\u0641 \u0641\u064A \u0627\u0644\u0646\u0627\u0641\u0630\u0629." +}, +table:{ +desc:"\u0625\u062F\u0631\u0627\u062C \u062C\u062F\u0648\u0644 \u062C\u062F\u064A\u062F", +row_before_desc:"\u0627\u062F\u0631\u0627\u062C \u0635\u0641 \u0642\u0628\u0644", +row_after_desc:"\u0627\u062F\u0631\u0627\u062C \u0635\u0641 \u0628\u0639\u062F", +delete_row_desc:"\u062D\u0630\u0641 \u0635\u0641", +col_before_desc:"\u0625\u062F\u0631\u0627\u062C \u0639\u0645\u0648\u062F \u0642\u0628\u0644", +col_after_desc:"\u0625\u062F\u0631\u0627\u062C \u0639\u0645\u0648\u062F \u0628\u0639\u062F", +delete_col_desc:"\u062D\u0630\u0641 \u0639\u0645\u0648\u062F", +split_cells_desc:"\u062A\u0642\u0633\u064A\u0645 \u0627\u0644\u062E\u0644\u0627\u064A\u0627 \u0627\u0644\u0645\u062F\u0645\u0648\u062C\u0629", +merge_cells_desc:"\u062F\u0645\u062C \u062E\u0644\u0627\u064A\u0627 \u0627\u0644\u062C\u062F\u0648\u0644", +row_desc:"\u062E\u0635\u0627\u0626\u0635 \u0635\u0641 \u0627\u0644\u062C\u062F\u0648\u0644", +cell_desc:"\u062E\u0635\u0627\u0626\u0635 \u062E\u0644\u064A\u0629 \u0627\u0644\u062C\u062F\u0648\u0644", +props_desc:"\u062E\u0635\u0627\u0626\u0635 \u0627\u0644\u062C\u062F\u0648\u0644", +paste_row_before_desc:"\u0644\u0635\u0642 \u0635\u0641 \u062C\u062F\u0648\u0644 \u0642\u0628\u0644", +paste_row_after_desc:"\u0644\u0635\u0642 \u0635\u0641 \u062C\u062F\u0648\u0644 \u0628\u0639\u062F", +cut_row_desc:"\u0642\u0635 \u0635\u0641", +copy_row_desc:"\u0646\u0633\u062E \u0635\u0641", +del:"\u062D\u0630\u0641 \u062C\u062F\u0648\u0644", +row:"\u0635\u0641", +col:"\u0639\u0645\u0648\u062F", +cell:"\u062E\u0644\u064A\u0629" +}, +autosave:{ +unload_msg:"\u0627\u0644\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0627\u0644\u062A\u064A \u0642\u0645\u062A \u0628\u0647\u0627 \u0633\u062A\u0641\u0642\u062F \u0627\u0646 \u0642\u0645\u062A \u0628\u0627\u0644\u062A\u0646\u0642\u0644 \u0625\u0644\u0649 \u0635\u0641\u062D\u0627\u062A \u0623\u062E\u0631\u0649." +}, +fullscreen:{ +desc:"\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629" +}, +media:{ +desc:"\u0625\u062F\u0631\u0627\u062C / \u062A\u0639\u062F\u064A\u0644 \u0645\u0644\u0641 \u0645\u0635\u0627\u062F\u0631 \u0645\u062A\u0639\u062F\u062F\u0629 \u0645\u062F\u0645\u062C", +edit:"\u062A\u0639\u062F\u064A\u0644 \u0645\u0644\u0641 \u0645\u0635\u0627\u062F\u0631 \u0645\u062A\u0639\u062F\u062F\u0629 \u0645\u062F\u0645\u062C" +}, +fullpage:{ +desc:"\u062E\u0635\u0627\u0626\u0635 \u0627\u0644\u0645\u0633\u062A\u0646\u062F" +}, +template:{ +desc:"\u0625\u062F\u0631\u0627\u062C \u0642\u0627\u0644\u0628 \u0645\u0648\u062C\u0648\u062F \u0645\u0633\u0628\u0642\u0627" +}, +visualchars:{ +desc:"\u062A\u0634\u063A\u064A\u0644/\u0627\u064A\u0642\u0627\u0641 \u0627\u0644\u0645\u0631\u0627\u0642\u0628\u0629 \u0627\u0644\u0628\u0635\u0631\u064A\u0629 \u0644\u0644\u0623\u062D\u0631\u0641" +}, +spellchecker:{ +desc:"\u0627\u0644\u0645\u062F\u0642\u0642 \u0627\u0644\u0625\u0645\u0644\u0627\u0626\u064A", +menu:"\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062F\u0642\u0642 \u0627\u0644\u0625\u0645\u0644\u0627\u0626\u064A", +ignore_word:"\u062A\u062C\u0627\u0647\u0644 \u0627\u0644\u0643\u0644\u0645\u0629", +ignore_words:"\u062A\u062C\u0627\u0647\u0644 \u0627\u0644\u0643\u0644", +langs:"\u0627\u0644\u0644\u063A\u0627\u062A", +wait:"\u0627\u0644\u0631\u062C\u0627\u0621 \u0627\u0644\u0625\u0646\u062A\u0638\u0627\u0631...", +sug:"\u0627\u0644\u0625\u0642\u062A\u0631\u0627\u062D\u0627\u062A", +no_sug:"\u0644\u0627 \u064A\u0648\u062C\u062F \u0627\u0642\u062A\u0631\u0627\u062D\u0627\u062A", +no_mpell:"\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0623\u062E\u0637\u0627\u0621 \u0625\u0645\u0644\u0627\u0626\u064A\u0629." +}, +pagebreak:{ +desc:"\u0625\u062F\u0631\u0627\u062C \u0641\u0627\u0635\u0644 \u0627\u0644\u0635\u0641\u062D\u0627\u062A" +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/bg.js b/includes/tinymce/jscripts/tiny_mce/langs/bg.js new file mode 100644 index 00000000..d964f99a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/bg.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({bg:{ +common:{ +edit_confirm:"\u0418\u0441\u043A\u0430\u0442\u0435 \u043B\u0438 \u0434\u0430 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0442\u0435 WYSIWYG \u0440\u0435\u0436\u0438\u043C \u0437\u0430 \u0442\u043E\u0432\u0430 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u043E \u043F\u043E\u043B\u0435?", +apply:"\u041F\u043E\u044A\u0432\u044A\u0440\u0434\u0438", +insert:"\u0412\u043C\u044A\u043A\u043D\u0438", +update:"\u041E\u0431\u043D\u043E\u0432\u0438", +cancel:"\u041E\u0442\u043A\u0430\u0436\u0438", +close:"\u0417\u0430\u0442\u0432\u043E\u0440\u0438", +browse:"Browse", +class_name:"\u041A\u043B\u0430\u0441", +not_set:"-- \u041D\u0435\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0435\u043D\u043E --", +clipboard_msg:"\u041A\u043E\u043F\u0438\u0440\u0430\u043D\u0435/\u041E\u0442\u0440\u044F\u0437\u0432\u0430\u043D\u0435/\u041F\u043E\u0441\u0442\u0430\u0432\u044F\u043D\u0435 \u043D\u0435 \u0435 \u0434\u043E\u0441\u0442\u044A\u043F\u043D\u043E \u043F\u043E\u0434 Mozilla \u0438 Firefox.\n\u0416\u0435\u043B\u0430\u0435\u0442\u0435 \u043B\u0438 \u043F\u043E\u0432\u0435\u0447\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0437\u0430 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430?", +clipboard_no_support:"\u041D\u0435 \u0441\u0435 \u043F\u043E\u0434\u0434\u044A\u0440\u0436\u0430 \u043E\u0442 \u0432\u0430\u0448\u0438\u044F\u0442 \u0431\u0440\u0430\u0443\u0437\u044A\u0440, \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0439\u0442\u0435 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043D\u0438 \u043A\u043E\u043C\u0430\u043D\u0434\u0438.", +popup_blocked:"\u0421\u044A\u0436\u0430\u043B\u044F\u0432\u0430\u043C\u0435, \u043D\u043E \u0437\u0430\u0431\u0435\u043B\u044F\u0437\u0430\u0445\u043C\u0435, \u0447\u0435 \u0432\u0430\u0448\u0438\u044F\u0442 popup-blocker \u0435 \u0441\u043F\u0440\u044F\u043B \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446 \u043A\u043E\u0439\u0442\u043E \u0441\u0435 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430 \u043E\u0442 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u0430\u0442\u0430. \u0429\u0435 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0438\u0437\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0431\u043B\u043E\u043A\u0438\u0440\u0430\u043D\u0435\u0442\u043E \u043D\u0430 \u043F\u043E\u043F\u044A\u043F\u0438 \u0437\u0430 \u0442\u043E\u0437\u0438 \u0441\u0430\u0439\u0442 \u0437\u0430 \u0434\u0430 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0442\u0435 \u043F\u044A\u043B\u043D\u0430\u0442\u0430 \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u043D\u043E\u0441\u0442.", +invalid_data:"\u0413\u0440\u0435\u0448\u043A\u0430: \u0412\u044A\u0432\u0435\u0434\u0435\u043D\u0438 \u0441\u0430 \u043D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0438 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0438, \u0442\u0435 \u0441\u0430 \u043C\u0430\u0440\u043A\u0438\u0440\u0430\u043D\u0438 \u0432 \u0447\u0435\u0440\u0432\u0435\u043D\u043E.", +more_colors:"\u041E\u0449\u0435 \u0446\u0432\u0435\u0442\u043E\u0432\u0435" +}, +contextmenu:{ +align:"\u041F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435", +left:"\u041B\u044F\u0432\u043E", +center:"\u0426\u0435\u043D\u0442\u044A\u0440", +right:"\u0414\u044F\u0441\u043D\u043E", +full:"\u0414\u0432\u0443\u0441\u0442\u0440\u0430\u043D\u043D\u043E" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u0434\u0430\u0442\u0430", +inserttime_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u0432\u0440\u0435\u043C\u0435", +months_long:"\u042F\u043D\u0443\u0430\u0440\u0438,\u0424\u0435\u0432\u0440\u0443\u0430\u0440\u0438,\u041C\u0430\u0440\u0442,\u0410\u043F\u0440\u0438\u043B,\u041C\u0430\u0439,\u042E\u043D\u0438,\u042E\u043B\u0438,\u0410\u0432\u0433\u0443\u0441\u0442,\u0421\u0435\u043F\u0442\u0435\u043C\u0432\u0440\u0438,\u041E\u043A\u0442\u043E\u043C\u0432\u0440\u0438,\u041D\u043E\u0435\u043C\u0432\u0440\u0438,\u0414\u0435\u043A\u0435\u043C\u0432\u0440\u0438", +months_short:"\u042F\u043D\u0443,\u0424\u0435\u0432,\u041C\u0430\u0440,\u0410\u043F\u0440,\u041C\u0430\u0439,\u042E\u043D\u0438,\u042E\u043B\u0438,\u0410\u0432\u0433,\u0421\u0435\u043F,\u041E\u043A\u0442,\u041D\u043E\u0435,\u0414\u0435\u043A", +day_long:"\u041D\u0435\u0434\u0435\u043B\u044F,\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u043D\u0438\u043A,\u0412\u0442\u043E\u0440\u043D\u0438\u043A,\u0421\u0440\u044F\u0434\u0430,\u0427\u0435\u0442\u0432\u044A\u0440\u0442\u044A\u043A,\u041F\u0435\u0442\u044A\u043A,\u0421\u044A\u0431\u043E\u0442\u0430,\u041D\u0435\u0434\u0435\u043B\u044F", +day_short:"\u041D\u0434,\u041F\u043D,\u0412\u0442,\u0421\u0440,\u0427\u0442,\u041F\u0442,\u0421\u0431,\u041D\u0434" +}, +print:{ +print_desc:"\u041E\u0442\u043F\u0435\u0447\u0430\u0442\u0430\u0439" +}, +preview:{ +preview_desc:"\u041F\u0440\u0435\u0433\u043B\u0435\u0434" +}, +directionality:{ +ltr_desc:"\u041F\u043E\u0441\u043E\u043A\u0430 \u043E\u0442\u043B\u044F\u0432\u043E \u043D\u0430 \u0434\u044F\u0441\u043D\u043E", +rtl_desc:"\u041F\u043E\u0441\u043E\u043A\u0430 \u043E\u0442\u0434\u044F\u0441\u043D\u043E \u043D\u0430 \u043B\u044F\u0432\u043E" +}, +layer:{ +insertlayer_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u043D\u043E\u0432 \u0441\u043B\u043E\u0439", +forward_desc:"\u041F\u043E\u043A\u0430\u0436\u0438 \u043E\u0442\u043F\u0440\u0435\u0434", +backward_desc:"\u041F\u043E\u043A\u0430\u0436\u0438 \u043E\u0442\u0437\u0430\u0434", +absolute_desc:"\u0412\u043A\u043B\u044E\u0447\u0438 \u0430\u0431\u0441\u043E\u043B\u044E\u0442\u043D\u043E \u043F\u043E\u0437\u0438\u0446\u0438\u043E\u043D\u0438\u0440\u0430\u043D\u0435", +content:"\u041D\u043E\u0432 \u0441\u043B\u043E\u0439..." +}, +save:{ +save_desc:"\u0417\u0430\u043F\u0438\u0448\u0438", +cancel_desc:"\u041E\u0442\u043A\u0430\u0436\u0438 \u0432\u0441\u0438\u0447\u043A\u0438 \u043F\u0440\u043E\u043C\u0435\u043D\u0438" +}, +nonbreaking:{ +nonbreaking_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u043D\u0435\u043F\u0440\u0435\u043A\u044A\u0441\u0432\u0430\u0435\u043C \u0438\u043D\u0442\u0435\u0440\u0432\u0430\u043B" +}, +iespell:{ +iespell_desc:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438 \u043F\u0440\u0430\u0432\u043E\u043F\u0438\u0441\u0430", +download:"ieSpell \u043D\u0435 \u0435 \u043E\u0442\u043A\u0440\u0438\u0442. \u0416\u0435\u043B\u0430\u0435\u0442\u0435 \u043B\u0438 \u0434\u0430 \u0433\u043E \u0438\u043D\u0441\u0442\u0430\u043B\u0438\u0440\u0430\u0442\u0435 \u0441\u0435\u0433\u0430?" +}, +advhr:{ +advhr_desc:"\u0425\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u043D\u0430 \u043B\u0438\u043D\u0438\u044F" +}, +emotions:{ +emotions_desc:"\u0415\u043C\u043E\u0442\u0438\u043A\u043E\u043D\u0438" +}, +searchreplace:{ +search_desc:"\u0422\u044A\u0440\u0441\u0438", +replace_desc:"\u0422\u044A\u0440\u0441\u0438/\u0417\u0430\u043C\u0435\u0441\u0442\u0438" +}, +advimage:{ +image_desc:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430" +}, +advlink:{ +link_desc:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430" +}, +xhtmlxtras:{ +cite_desc:"\u0426\u0438\u0442\u0430\u0442", +abbr_desc:"\u0421\u044A\u043A\u0440\u0430\u0449\u0435\u043D\u0438\u0435", +acronym_desc:"\u0410\u043A\u0440\u043E\u043D\u0438\u043C", +del_desc:"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043D\u0435", +ins_desc:"\u0412\u043C\u044A\u043A\u0432\u0430\u043D\u0435", +attribs_desc:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438" +}, +style:{ +desc:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 CSS \u0441\u0442\u0438\u043B" +}, +paste:{ +paste_text_desc:"\u041F\u043E\u0441\u0442\u0430\u0432\u0438 \u043A\u0430\u0442\u043E \u0442\u0435\u043A\u0441\u0442", +paste_word_desc:"\u041F\u043E\u0441\u0442\u0430\u0432\u0438 \u043E\u0442 Word", +selectall_desc:"\u0418\u0437\u0431\u0435\u0440\u0438 \u0432\u0441\u0438\u0447\u043A\u0438" +}, +paste_dlg:{ +text_title:"\u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0439\u0442\u0435 CTRL+V \u043D\u0430 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u0442\u0430 \u0437\u0430 \u0434\u0430 \u043F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446\u0430.", +text_linebreaks:"\u0417\u0430\u043F\u0430\u0437\u0438 \u043D\u043E\u0432\u0438\u0442\u0435 \u0440\u0435\u0434\u043E\u0432\u0435", +word_title:"\u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0439\u0442\u0435 CTRL+V \u043D\u0430 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u0442\u0430 \u0437\u0430 \u0434\u0430 \u043F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446\u0430." +}, +table:{ +desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u043D\u043E\u0432\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u0430", +row_before_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u0440\u0435\u0434 \u043F\u0440\u0435\u0434\u0438", +row_after_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u0440\u0435\u0434 \u0441\u043B\u0435\u0434", +delete_row_desc:"\u0418\u0437\u0442\u0440\u0438\u0439 \u0440\u0435\u0434", +col_before_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u043A\u043E\u043B\u043E\u043D\u0430 \u043F\u0440\u0435\u0434\u0438", +col_after_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u043A\u043E\u043B\u043E\u043D\u0430 \u0441\u043B\u0435\u0434", +delete_col_desc:"\u0418\u0437\u0442\u0440\u0438\u0439 \u043A\u043E\u043B\u043E\u043D\u0430", +split_cells_desc:"\u0420\u0430\u0437\u0434\u0435\u043B\u0438 \u0441\u043B\u0435\u0442\u0438 \u043A\u043B\u0435\u0442\u043A\u0438", +merge_cells_desc:"\u0421\u043B\u0435\u0439 \u043A\u043B\u0435\u0442\u043A\u0438", +row_desc:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043D\u0430 \u0440\u0435\u0434\u0430", +cell_desc:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043D\u0430 \u043A\u043B\u0435\u0442\u043A\u0430\u0442\u0430", +props_desc:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043D\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430", +paste_row_before_desc:"\u041F\u043E\u0441\u0442\u0430\u0432\u0438 \u0440\u0435\u0434 \u043F\u0440\u0435\u0434\u0438", +paste_row_after_desc:"\u041F\u043E\u0441\u0442\u0430\u0432\u0438 \u0440\u0435\u0434 \u0441\u043B\u0435\u0434", +cut_row_desc:"\u041E\u0442\u0440\u0435\u0436\u0438 \u0440\u0435\u0434", +copy_row_desc:"\u041A\u043E\u043F\u0438\u0440\u0430\u0439 \u0440\u0435\u0434", +del:"\u0418\u0437\u0442\u0440\u0438\u0439 \u0442\u0430\u0431\u043B\u0438\u0446\u0430", +row:"\u0420\u0435\u0434", +col:"\u041A\u043E\u043B\u043E\u043D\u0430", +cell:"\u041A\u043B\u0435\u0442\u043A\u0430" +}, +autosave:{ +unload_msg:"\u041F\u0440\u043E\u043C\u0435\u043D\u0438\u0442\u0435 \u043A\u043E\u0438\u0442\u043E \u043D\u0430\u043F\u0440\u0430\u0432\u0438\u0445\u0442\u0435 \u0449\u0435 \u0441\u0435 \u0437\u0430\u0433\u0443\u0431\u044F\u0442 \u0430\u043A\u043E \u043E\u0442\u0438\u0434\u0435\u0442\u0435 \u043D\u0430 \u0434\u0440\u0443\u0433\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430." +}, +fullscreen:{ +desc:"\u0412\u043A\u043B./\u0418\u0437\u043A\u043B. \u0446\u044F\u043B \u0435\u043A\u0440\u0430\u043D" +}, +media:{ +desc:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u043C\u0435\u0434\u0438\u0430\u0442\u0430", +edit:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u043A \u043C\u0435\u0434\u0438\u0430" +}, +fullpage:{ +desc:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043D\u0430 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" +}, +template:{ +desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\u043D\u0438\u0435\u0442\u043E \u043D\u0430 \u0442\u0435\u043C\u043F\u043B\u0435\u0439\u0442" +}, +visualchars:{ +desc:"\u0412\u043A\u043B./\u0418\u0437\u043A\u043B. \u043D\u0430 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043D\u0438\u0442\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u0438." +}, +spellchecker:{ +desc:"\u0412\u043A\u043B./\u0418\u0437\u043A\u043B. \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043D\u0430 \u043F\u0440\u0430\u0432\u043E\u043F\u0438\u0441\u0430", +menu:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043D\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430\u0442\u0430 \u043D\u0430 \u043F\u0440\u0430\u0432\u043E\u043F\u0438\u0441", +ignore_word:"\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u0430\u0439 \u0434\u0443\u043C\u0430", +ignore_words:"\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u0430\u0439 \u0432\u0441\u0438\u0447\u043A\u0438", +langs:"\u0415\u0437\u0438\u0446\u0438", +wait:"\u041C\u043E\u043B\u044F \u0438\u0437\u0447\u0430\u043A\u0430\u0439\u0442\u0435...", +sug:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F", +no_sug:"\u041D\u044F\u043C\u0430 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F", +no_mpell:"\u041D\u044F\u043C\u0430 \u0433\u0440\u0435\u0448\u043D\u043E \u043D\u0430\u043F\u0438\u0441\u0430\u043D\u0438 \u0434\u0443\u043C\u0438." +}, +pagebreak:{ +desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u043D\u043E\u0432\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/br.js b/includes/tinymce/jscripts/tiny_mce/langs/br.js new file mode 100644 index 00000000..d1fe0274 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/br.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({br:{ +common:{ +edit_confirm:"Deseja usar o modo de edi\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o avan\u00C3\u0083\u00C2\u00A7ado neste campo de texto?", +apply:"Aplicar", +insert:"Inserir", +update:"Atualizar", +cancel:"Cancelar", +close:"Fechar", +browse:"Procurar", +class_name:"Classe", +not_set:"-- N\u00C3\u0083\u00C2\u00A3o especificado --", +clipboard_msg:"Copiar/cortar/colar n\u00C3\u0083\u00C2\u00A3o est\u00C3\u0083\u00C2\u00A1 dispon\u00C3\u0083\u00C2\u00ADvel no Mozilla/Firefox.\nDeseja mais informa\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00B5es sobre este problema?", +clipboard_no_support:"O seu navegador n\u00C3\u0083\u00C2\u00A3o tem suporte para esta fun\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o, use os atalhos do teclado.", +popup_blocked:"Detect\u00C3\u0083\u00C2\u00A1mos que o seu bloqueador de popups bloqueou uma janela que \u00C3\u0083\u00C2\u00A9 essencial para o aplicativo. Voc\u00C3\u0083\u00C2\u00AA precisa desactivar o bloqueador de popups para utilizar esta ferramenta.", +invalid_data:"Erro: Valores inv\u00C3\u0083\u00C2\u00A1lidos est\u00C3\u0083\u00C2\u00A3o marcados a vermelho.", +more_colors:"Mais Cores" +}, +contextmenu:{ +align:"Alinhamento", +left:"Esquerda", +center:"Centro", +right:"Direita", +full:"Justificar" +}, +insertdatetime:{ +date_fmt:"%d-%m-%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Inserir data", +inserttime_desc:"Inserir hora", +months_long:"Janeiro,Fevereiro,Mar\u00C3\u0083\u00C2\u00A7o,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro", +months_short:"Jan,Fev,Mar,Abr,Mai,Jun,Jul,Ago,Set,Out,Nov,Dez", +day_long:"Domingo,Segunda-Feira,Ter\u00C3\u0083\u00C2\u00A7a-Feira,Quarta-Feira,Quinta-Feira,Sexta-Feira,S\u00C3\u0083\u00C2\u00A1bado,Domingo", +day_short:"Dom,Seg,Ter,Qua,Qui,Sex,Sab,Dom" +}, +print:{ +print_desc:"Imprimir" +}, +preview:{ +preview_desc:"Pr\u00C3\u0083\u00C2\u00A9-Visualizar" +}, +directionality:{ +ltr_desc:"Da esquerda para direita", +rtl_desc:"Da direita para esquerda" +}, +layer:{ +insertlayer_desc:"Inserir nova camada", +forward_desc:"Mover para frente", +backward_desc:"Mover para tr\u00C3\u0083\u00C2\u00A1s", +absolute_desc:"Alternar posicionamento absoluto", +content:"Nova camada..." +}, +save:{ +save_desc:"Guardar", +cancel_desc:"Cancelar todas as altera\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00B5es" +}, +nonbreaking:{ +nonbreaking_desc:"Inserir um espa\u00C3\u0083\u00C2\u00A7o" +}, +iespell:{ +iespell_desc:"Verificar ortografia", +download:"Aplicativo de ortografia n\u00C3\u0083\u00C2\u00A3o-detectado. Deseja instal\u00C3\u0083\u00C2\u00A1-lo agora?" +}, +advhr:{ +advhr_desc:"Separador horizontal" +}, +emotions:{ +emotions_desc:"Emoticons" +}, +searchreplace:{ +search_desc:"Localizar", +replace_desc:"Localizar/substituir" +}, +advimage:{ +image_desc:"Inserir/editar imagem" +}, +advlink:{ +link_desc:"Inserir/editar hyperlink" +}, +xhtmlxtras:{ +cite_desc:"Cita\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +abbr_desc:"Abrevia\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +acronym_desc:"Acr\u00C3\u0083\u00C2\u00B4nimo", +del_desc:"Apagar", +ins_desc:"Inserir", +attribs_desc:"Inserir/Editar atributos" +}, +style:{ +desc:"Editar CSS" +}, +paste:{ +paste_text_desc:"Colar como texto simples", +paste_word_desc:"Colar (copiado do WORD)", +selectall_desc:"Seleccionar tudo" +}, +paste_dlg:{ +text_title:"Use CTRL+V para colar o texto na janela.", +text_linebreaks:"Manter quebras de linha", +word_title:"Use CTRL+V para colar o texto na janela." +}, +table:{ +desc:"Inserir nova tabela", +row_before_desc:"Inserir linha antes", +row_after_desc:"Inserir linha depois", +delete_row_desc:"Apagar linha", +col_before_desc:"Inserir coluna antes", +col_after_desc:"Inserir coluna depois", +delete_col_desc:"Remover coluna", +split_cells_desc:"Dividir c\u00C3\u0083\u00C2\u00A9lulas", +merge_cells_desc:"Unir c\u00C3\u0083\u00C2\u00A9lulas", +row_desc:"Propriedades das linhas", +cell_desc:"Propriedades das c\u00C3\u0083\u00C2\u00A9lulas", +props_desc:"Propriedades da tabela", +paste_row_before_desc:"Colar linha antes", +paste_row_after_desc:"Colar linha depois", +cut_row_desc:"Cortar linha", +copy_row_desc:"Copiar linha", +del:"Apagar tabela", +row:"Linha", +col:"Coluna", +cell:"C\u00C3\u0083\u00C2\u00A9lula" +}, +autosave:{ +unload_msg:"As mudan\u00C3\u0083\u00C2\u00A7as efectuadas ser\u00C3\u0083\u00C2\u00A3o perdidas se sair desta p\u00C3\u0083\u00C2\u00A1gina." +}, +fullscreen:{ +desc:"Ecr\u00C3\u0083\u00C2\u00A3o Inteiro" +}, +media:{ +desc:"Inserir/editar media embutido", +edit:"Editar media embutido" +}, +fullpage:{ +desc:"Propriedades do Documento" +}, +template:{ +desc:"Inserir template" +}, +visualchars:{ +desc:"Caracteres de controle visual ligado/desligado" +}, +spellchecker:{ +desc:"Alternar verifica\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o ortogr\u00C3\u0083\u00C2\u00A1fica", +menu:"Configura\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00B5es de ortografia", +ignore_word:"Ignorar palavra", +ignore_words:"Ignorar tudo", +langs:"Linguagens", +wait:"Aguarde...", +sug:"Sugest\u00C3\u0083\u00C2\u00B5es", +no_sug:"Sem sugest\u00C3\u0083\u00C2\u00B5es", +no_mpell:"N\u00C3\u0083\u00C2\u00A3o foram detectados erros de ortografia." +}, +pagebreak:{ +desc:"Inserir quebra de p\u00C3\u0083\u00C2\u00A1gina." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/bs.js b/includes/tinymce/jscripts/tiny_mce/langs/bs.js new file mode 100644 index 00000000..d0ad5e02 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/bs.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({bs:{ +common:{ +edit_confirm:"\u017Delite li koristiti WYSIWYG na\u010Din rada za ovo tekstualno polje?", +apply:"Primjeni", +insert:"Umetni", +update:"Obnovi", +cancel:"Odustani", +close:"Zatvori", +browse:"Pregled", +class_name:"Klasa", +not_set:"-- Nije postavljeno --", +clipboard_msg:"Kopiraj/Izre\u017Ei/Zalijepi nije dostupno Mozilla i Firefox preglednicima.\nVi\u0161e informacija?", +clipboard_no_support:"Trenuta\u010Dno va\u0161 preglednik ne podr\u017Eava ovu opciju, poku\u0161ajte koristiti tipkovni\u010Dku kraticu.", +popup_blocked:"Oprostite, izgleda da je va\u0161 popup-blocker onemogu\u0107io prozor u sklopu ovog programa. Morate onemogu\u0107iti blokiranje popup prozora da bi u potpunosti iskoristili ovaj alat.", +invalid_data:"Gre\u0161ka: Une\u0161ene su nevaljane vrijednosti, ozna\u010Dene su crvenom bojom.", +more_colors:"Vi\u0161e boja" +}, +contextmenu:{ +align:"Poravnavanje", +left:"Lijevo", +center:"Sredina", +right:"Desno", +full:"Puno" +}, +insertdatetime:{ +date_fmt:"%d.%m.%Y.", +time_fmt:"%H:%M:%S", +insertdate_desc:"Umetni datum", +inserttime_desc:"Umetni vrijeme", +months_long:"sije\u010Danj,velja\u010Da,o\u017Eujak,travanj,svibanj,lipanj,srpanj,kolovoz,rujan,listopad,studeni,prosinac", +months_short:"sij,velj,o\u017Eu,tra,svi,lip,srp,kol,ruj,lis,stu,pro", +day_long:"nedjelja,ponedjeljak,utorak,srijeda,\u010Detvrtak,petak,subota,nedjelja", +day_short:"ned,pon,uto,sri,\u010Det,pet,sub,ned" +}, +print:{ +print_desc:"Ispis" +}, +preview:{ +preview_desc:"Prikaz" +}, +directionality:{ +ltr_desc:"S lijeva na desno", +rtl_desc:"S desna na lijevo" +}, +layer:{ +insertlayer_desc:"Umetni novi sloj", +forward_desc:"Pomakni naprijed", +backward_desc:"Pomakni natrag", +absolute_desc:"Uklju\u010Di/isklju\u010Di apsolutno pozicioniranje", +content:"Novi sloj..." +}, +save:{ +save_desc:"Spremi", +cancel_desc:"Odustani od svih promjena" +}, +nonbreaking:{ +nonbreaking_desc:"Umetni razmak" +}, +iespell:{ +iespell_desc:"Pokreni provjeru pravopisa", +download:"Provjera pravopisa nije postaljena. Postaviti sada?" +}, +advhr:{ +advhr_desc:"Vodoravna crta" +}, +emotions:{ +emotions_desc:"Emocije" +}, +searchreplace:{ +search_desc:"Prona\u0111i", +replace_desc:"Prona\u0111i/Zamijeni" +}, +advimage:{ +image_desc:"Umetni/uredi sliku" +}, +advlink:{ +link_desc:"Insert/edit link" +}, +xhtmlxtras:{ +cite_desc:"Citat", +abbr_desc:"Kratica", +acronym_desc:"Akronim", +del_desc:"Brisanje", +ins_desc:"Unos", +attribs_desc:"Umetni/uredi atribute" +}, +style:{ +desc:"Uredi CSS" +}, +paste:{ +paste_text_desc:"Zalijepi kao obi\u010Dni tekst", +paste_word_desc:"Zalijepi iz Worda", +selectall_desc:"Odaberi sve" +}, +paste_dlg:{ +text_title:"Koristite CTRL+V na tipkovnici da zalijepite tekst u prozor.", +text_linebreaks:"Zadr\u017Ei prijelome", +word_title:"Koristite CTRL+V na tipkovnici da zalijepite tekst u prozor." +}, +table:{ +desc:"Nova tablica", +row_before_desc:"Umetni redak iznad", +row_after_desc:"Umetni redak ispod", +delete_row_desc:"Izbri\u0161i redak", +col_before_desc:"Umetni stupac lijevo", +col_after_desc:"Umetni stupac desno", +delete_col_desc:"Ukloni stupac", +split_cells_desc:"Razdvoji spojene \u0107elije", +merge_cells_desc:"Spoji \u0107elije", +row_desc:"Svojstva retka", +cell_desc:"Svojstva \u0107elije", +props_desc:"Svojstva tablice", +paste_row_before_desc:"Zalijepi redak iznad", +paste_row_after_desc:"Zalijepi redak ispod", +cut_row_desc:"Izre\u017Ei redak", +copy_row_desc:"Kopiraj redak", +del:"Izbri\u0161i tablicu", +row:"Redak", +col:"Stupac", +cell:"\u0106elija" +}, +autosave:{ +unload_msg:"Promjene u dokumentu \u0107e biti izgubljene ako iza\u0111ete s ove stranice." +}, +fullscreen:{ +desc:"Uklju\u010Di/isklju\u010Di prikaz preko cijelog ekrana" +}, +media:{ +desc:"Insert / edit embedded media", +edit:"Edit embedded media" +}, +fullpage:{ +desc:"Svojstva dokumenta" +}, +template:{ +desc:"Umetni sadr\u017Eaj iz predlo\u017Eak" +}, +visualchars:{ +desc:"Vizualni kontrolni znakovi uklju\u010Deni/isklju\u010Deni." +}, +spellchecker:{ +desc:"Uklju\u010Di/isklju\u010Di provjeru pravopisa", +menu:"Postavke provjere pravopisa", +ignore_word:"Zanemari rije\u010D", +ignore_words:"Zanemari sver", +langs:"Jezici", +wait:"Pri\u010Dekajte...", +sug:"Prijedlozi", +no_sug:"Nema prijedloga", +no_mpell:"Nije prona\u0111ena nijedna pravopisna gre\u0161ke." +}, +pagebreak:{ +desc:"Umetni prijelom." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/ca.js b/includes/tinymce/jscripts/tiny_mce/langs/ca.js new file mode 100644 index 00000000..323bdf66 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/ca.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({ca:{ +common:{ +edit_confirm:"Vols utilitzar el mode visible (WYSIWYG) per a aquesta \u00E0rea de text?", +apply:"Aplica", +insert:"Insereix", +update:"Actualitza", +cancel:"Cancel\u00B7la", +close:"Tanca", +browse:"Explora", +class_name:"Classe", +not_set:"-- Sense establir --", +clipboard_msg:"Copia/Retalla/Enganxa no est\u00E0 disponible en Mozilla/Firefox.\nVols m\u00E9s informaci\u00F3 sobre aquest tema?", +clipboard_no_support:"Actualment no est\u00E0 suportat pel teu navegador, utilitza les dreceres de teclat en lloc seu.", +popup_blocked:"Ho sentim, per\u00F2 ens hem adonat que el teu bloquejador de finestres emergents ha desactivat una finestra que proporciona funcionalitat a l'aplicaci\u00F3. Haur\u00E0s de desactivar el blocatge de finestres emergents en aquest lloc per tal d'utilitzar plenament aquesta eina.", +invalid_data:"Error: Has introdu\u00EFt valors incorrectes, te'ls marquem en vermell.", +more_colors:"M\u00E9s colors" +}, +contextmenu:{ +align:"Alineaci\u00F3", +left:"Esquerra", +center:"Centrat", +right:"Dreta", +full:"Justificat" +}, +insertdatetime:{ +date_fmt:"%d-%m-%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Insereix la data", +inserttime_desc:"Insereix l'hora", +months_long:"Gener,Febrer,Mar\u00E7,Abril,Maig,Juny,Juliol,Agost,Setembre,Octubre,Novembre,Desembre", +months_short:"Gen,Feb,Mar,Abr,Mai,Jun,Jul,Ago,Set,Oct,Nov,Des", +day_long:"Diumenge,Dilluns,Dimarts,Dimecres,Dijous,Divendres,Dissabte,Diumenge", +day_short:"Dmg,Dll,Dmt,Dmc,Djs,Dvs,Dss,Dmg" +}, +print:{ +print_desc:"Imprimeix" +}, +preview:{ +preview_desc:"Vista pr\u00E8via" +}, +directionality:{ +ltr_desc:"Direcci\u00F3 d'esquerra a dreta", +rtl_desc:"Direcci\u00F3 de dreta a esquerra" +}, +layer:{ +insertlayer_desc:"Insereix capa nova", +forward_desc:"Despla\u00E7a endavant", +backward_desc:"Despla\u00E7a endarrere", +absolute_desc:"Canvia el posicionament absolut", +content:"Nova capa..." +}, +save:{ +save_desc:"Desa", +cancel_desc:"Cancel\u00B7la tots els canvis" +}, +nonbreaking:{ +nonbreaking_desc:"Insereix espai no separable" +}, +iespell:{ +iespell_desc:"Comprovaci\u00F3 ortogr\u00E0fica", +download:"No s'ha detectat ieSpell. Vols instal\u00B7lar-lo ara?" +}, +advhr:{ +advhr_desc:"Regle horitzontal" +}, +emotions:{ +emotions_desc:"Emoticones" +}, +searchreplace:{ +search_desc:"Busca", +replace_desc:"Busca/Substitueix" +}, +advimage:{ +image_desc:"Insereix/edita imatge" +}, +advlink:{ +link_desc:"Insereix/edita enlla\u00E7" +}, +xhtmlxtras:{ +cite_desc:"Citaci\u00F3", +abbr_desc:"Abreujament", +acronym_desc:"Acr\u00F2nim", +del_desc:"Supressi\u00F3", +ins_desc:"Inserci\u00F3", +attribs_desc:"Insereix/Edita Atributs" +}, +style:{ +desc:"Edita l'Estil CSS" +}, +paste:{ +paste_text_desc:"Enganxa com a Text Planer", +paste_word_desc:"Enganxa des de Word", +selectall_desc:"Selecciona-ho Tot" +}, +paste_dlg:{ +text_title:"Utilitza CTRL+V al teclat per enganxar el text a la finestra.", +text_linebreaks:"Mantingues els salts de l\u00EDnia", +word_title:"Utilitza CTRL+V al teclat per enganxar el text a la finestra." +}, +table:{ +desc:"Insereix una nova taula", +row_before_desc:"Insereix fila abans", +row_after_desc:"Insereix fila despr\u00E9s", +delete_row_desc:"Suprimeix fila", +col_before_desc:"Insereix columna abans", +col_after_desc:"Insereix columna despr\u00E9s", +delete_col_desc:"Elimina columna", +split_cells_desc:"Parteix les cel\u00B7les refoses de la taula", +merge_cells_desc:"Refon les cel\u00B7les de la taula", +row_desc:"Propietats de la fila de la taula", +cell_desc:"Propietats de la cel\u00B7la de la taula", +props_desc:"Propietats de la taula", +paste_row_before_desc:"Enganxa la fila de la taula abans", +paste_row_after_desc:"Enganxa la fila de la taula despr\u00E9s", +cut_row_desc:"Retalla la fila de la taula", +copy_row_desc:"Copia la fila de la taula", +del:"Suprimeix la taula", +row:"Fila", +col:"Columna", +cell:"Cel\u00B7la" +}, +autosave:{ +unload_msg:"Els canvis que has fet es perdran si surts d'aquesta p\u00E0gina." +}, +fullscreen:{ +desc:"Mode de pantalla completa" +}, +media:{ +desc:"Insereix / edita mitj\u00E0 encastat", +edit:"Edita mitj\u00E0 encastat" +}, +fullpage:{ +desc:"Propietats del document" +}, +template:{ +desc:"Insereix contingut predefinit de plantilla" +}, +visualchars:{ +desc:"Car\u00E0cters de control visual des/activats." +}, +spellchecker:{ +desc:"Des/activa el corrector ortogr\u00E0fic", +menu:"Configuraci\u00F3 del corrector", +ignore_word:"Ignora", +ignore_words:"Ignora-les totes", +langs:"Idiomes", +wait:"Espera, si et plau...", +sug:"Suggeriments", +no_sug:"No hi ha cap suggeriment", +no_mpell:"No s'ha trobat cap incorrecci\u00F3." +}, +pagebreak:{ +desc:"Insereix salt de p\u00E0gina." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/ch.js b/includes/tinymce/jscripts/tiny_mce/langs/ch.js new file mode 100644 index 00000000..62a8d54d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/ch.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({ch:{ +common:{ +edit_confirm:"\u4F60\u8981\u5728\u6B64\u6587\u5B57\u7F16\u8F91\u533A\u542F\u7528\u6240\u89C1\u5373\u6240\u5F97\u6A21\u5F0F\uFF1F ", +apply:"\u5E94\u7528", +insert:"\u63D2\u5165", +update:"\u66F4\u65B0", +cancel:"\u53D6\u6D88", +close:"\u5173\u95ED", +browse:"\u9884\u89C8", +class_name:"\u7C7B\u522B", +not_set:"--\u672A\u8BBE\u5B9A--", +clipboard_msg:"\u590D\u5236\u3001\u526A\u4E0B\u548C\u8D34\u4E0A\u529F\u80FD\u5728Mozilla\u548CFirefox\u4E2D\u65E0\u6CD5\u4F7F\u7528\u3002 \n\u60F3\u66F4\u6DF1\u5165\u4E86\u89E3\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F ", +clipboard_no_support:"\u76EE\u524D\u8FD9\u4E2A\u6D4F\u89C8\u5668\u65E0\u6CD5\u652F\u6301\uFF0C\u8BF7\u7528\u952E\u76D8\u5FEB\u6377\u952E\u3002 ", +popup_blocked:"\u62B1\u6B49\uFF0C\u5FEB\u6377\u529F\u80FD\u5728\u4F60\u7684\u7CFB\u7EDF\u4E0A\u88AB\u5C01\u9501\uFF0C\u4F7F\u7A0B\u5E8F\u65E0\u6CD5\u6B63\u5E38\u4F7F\u7528\uFF0C\u4F60\u9700\u8981\u6682\u65F6\u89E3\u9664\u5FEB\u6377\u5C01\u9501\uFF0C\u4F7F\u5DE5\u5177\u80FD\u6B63\u5E38\u4F7F\u7528\u3002 ", +invalid_data:"\u9519\u8BEF\uFF1A\u8F93\u5165\u65E0\u6548\u7684\u503C\uFF0C\u4EE5\u7EA2\u8272\u5B57\u8868\u793A\u3002 ", +more_colors:"\u66F4\u591A\u989C\u8272" +}, +contextmenu:{ +align:"\u5BF9\u9F50\u65B9\u5F0F", +left:"\u9760\u5DE6\u5BF9\u9F50", +center:"\u7F6E\u4E2D", +right:"\u9760\u53F3\u5BF9\u9F50", +full:"\u5DE6\u53F3\u5BF9\u9F50" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u63D2\u5165\u4ECA\u5929\u65E5\u671F", +inserttime_desc:"\u63D2\u5165\u73B0\u5728\u65F6\u95F4", +months_long:"\u4E00\u6708,\u4E8C\u6708,\u4E09\u6708,\u56DB\u6708,\u4E94\u6708,\u516D\u6708,\u4E03\u6708,\u516B\u6708,\u4E5D\u6708,\u5341\u6708,\u5341\u4E00\u6708,\u5341\u4E8C\u6708", +months_short:"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708", +day_long:"\u661F\u671F\u65E5,\u661F\u671F\u4E00,\u661F\u671F\u4E8C,\u661F\u671F\u4E09,\u661F\u671F\u56DB,\u661F\u671F\u4E94,\u661F\u671F\u516D,\u661F\u671F\u65E5", +day_short:"\u5468\u65E5,\u5468\u4E00,\u5468\u4E8C,\u5468\u4E09,\u5468\u56DB,\u5468\u4E94,\u5468\u516D,\u5468\u65E5" +}, +print:{ +print_desc:"\u5217\u5370" +}, +preview:{ +preview_desc:"\u9884\u89C8" +}, +directionality:{ +ltr_desc:"\u6587\u5B57\u4ECE\u5DE6\u5230\u53F3", +rtl_desc:"\u6587\u5B57\u4ECE\u53F3\u5230\u5DE6" +}, +layer:{ +insertlayer_desc:"\u63D2\u5165\u56FE\u5C42", +forward_desc:"\u524D\u79FB", +backward_desc:"\u540E\u79FB", +absolute_desc:"\u5207\u6362\u7EDD\u5BF9\u5BFB\u5740", +content:"\u65B0\u589E\u56FE\u5C42..." +}, +save:{ +save_desc:"\u50A8\u5B58", +cancel_desc:"\u53D6\u6D88\u6240\u6709\u53D8\u66F4" +}, +nonbreaking:{ +nonbreaking_desc:"\u63D2\u5165\u975E\u622A\u65AD\u7684\u7A7A\u683C\u7B26" +}, +iespell:{ +iespell_desc:"\u6267\u884C\u62FC\u5B57\u68C0\u67E5", +download:"\u4FA6\u6D4B\u4E0D\u5230ieSpell\u5957\u4EF6\uFF0C\u662F\u5426\u7ACB\u5373\u5B89\u88C5\uFF1F " +}, +advhr:{ +advhr_desc:"\u6C34\u5E73\u5206\u9694\u7EBF" +}, +emotions:{ +emotions_desc:"\u8868\u60C5" +}, +searchreplace:{ +search_desc:"\u641C\u5BFB", +replace_desc:"\u641C\u5BFB/\u53D6\u4EE3" +}, +advimage:{ +image_desc:"\u63D2\u5165/\u7F16\u8F91\u56FE\u7247" +}, +advlink:{ +link_desc:"\u63D2\u5165/\u7F16\u8F91\u94FE\u63A5" +}, +xhtmlxtras:{ +cite_desc:"\u5F15\u7528", +abbr_desc:"\u7F29\u5199", +acronym_desc:"\u9996\u5B57\u6BCD\u7F29\u5199", +del_desc:"\u5220\u9664", +ins_desc:"\u63D2\u5165", +attribs_desc:"\u63D2\u5165/\u7F16\u8F91\u5C5E\u6027" +}, +style:{ +desc:"\u7F16\u8F91CSS\u6837\u5F0F\u8868\u5355\u5355" +}, +paste:{ +paste_text_desc:"\u4EE5\u7EAF\u6587\u5B57\u8D34\u4E0A", +paste_word_desc:"\u4EE5Word\u683C\u5F0F\u8D34\u4E0A", +selectall_desc:"\u5168\u9009" +}, +paste_dlg:{ +text_title:"\u7528Ctrl+V\u6309\u952E\u7EC4\u5408\u5C06\u6587\u5B57\u8D34\u5165\u89C6\u7A97\u4E2D\u3002 ", +text_linebreaks:"\u4FDD\u7559\u6362\u884C\u7B26\u53F7", +word_title:"\u7528Ctrl+V\u6309\u952E\u7EC4\u5408\u5C06\u6587\u5B57\u8D34\u5165\u89C6\u7A97\u4E2D\u3002 " +}, +table:{ +desc:"\u63D2\u5165\u65B0\u8868\u683C", +row_before_desc:"\u63D2\u5165\u5217\u4E8E\u524D", +row_after_desc:"\u63D2\u5165\u5217\u4E8E\u540E", +delete_row_desc:"\u5220\u9664\u672C\u5217", +col_before_desc:"\u63D2\u5165\u680F\u4E8E\u524D", +col_after_desc:"\u63D2\u5165\u680F\u4E8E\u540E", +delete_col_desc:"\u5220\u9664\u672C\u680F", +split_cells_desc:"\u5206\u5272\u5355\u5143\u683C", +merge_cells_desc:"\u5408\u5E76\u5355\u5143\u683C", +row_desc:"\u8868\u683C\u5217\u5C5E\u6027", +cell_desc:"\u5355\u5143\u683C\u5C5E\u6027", +props_desc:"\u8868\u683C\u5C5E\u6027", +paste_row_before_desc:"\u8D34\u5165\u5217\u4E8E\u524D", +paste_row_after_desc:"\u8D34\u5165\u5217\u4E8E\u540E", +cut_row_desc:"\u526A\u4E0B\u6B64\u5217", +copy_row_desc:"\u590D\u5236\u6B64\u5217", +del:"\u5220\u9664\u8868\u683C", +row:"\u5217", +col:"\u680F", +cell:"\u5355\u5143\u683C" +}, +autosave:{ +unload_msg:"\u5982\u679C\u79BB\u5F00\u8BE5\u9875\uFF0C\u5C06\u5BFC\u81F4\u6240\u6709\u4FEE\u6539\u5168\u90E8\u4E22\u5931\u3002 " +}, +fullscreen:{ +desc:"\u5207\u6362\u5168\u5C4F\u5E55\u6A21\u5F0F" +}, +media:{ +desc:"\u63D2\u5165/\u7F16\u8F91\u5F71\u7247", +edit:"\u7F16\u8F91\u5F71\u7247" +}, +fullpage:{ +desc:"\u6587\u6863\u5C5E\u6027" +}, +template:{ +desc:"\u63D2\u5165\u9884\u5148\u5B9A\u4E49\u7684\u6A21\u677F\u5185\u5BB9" +}, +visualchars:{ +desc:"\u53EF\u89C1\u63A7\u5236\u5B57\u7B26\u5F00/\u5173\u3002 " +}, +spellchecker:{ +desc:"\u5207\u6362\u62FC\u5199\u68C0\u67E5", +menu:"\u62FC\u5199\u68C0\u67E5\u8BBE\u5B9A", +ignore_word:"\u5FFD\u7565\u5B57", +ignore_words:"\u5168\u90E8\u5FFD\u7565", +langs:"\u8BED\u8A00", +wait:"\u8BF7\u7A0D\u540E...", +sug:"\u5EFA\u8BAE", +no_sug:"\u65E0\u5EFA\u8BAE", +no_mpell:"\u65E0\u62FC\u5199\u9519\u8BEF\u3002 " +}, +pagebreak:{ +desc:"\u63D2\u5165\u5206\u9875\u7B26\u3002 " +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/langs/cs.js index c7d488d6..c2d3e42d 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/cs.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/cs.js @@ -1,38 +1,154 @@ -// CZ lang variables thanks to "Pavel Novák" - repaired by Josef Klimosz - -tinyMCELang['lang_bold_desc'] = 'Tuènì'; -tinyMCELang['lang_italic_desc'] = 'Kurzíva'; -tinyMCELang['lang_underline_desc'] = 'Podtržení'; -tinyMCELang['lang_striketrough_desc'] = 'Pøeškrtnutí'; -tinyMCELang['lang_justifyleft_desc'] = 'Zarovnání vlevo'; -tinyMCELang['lang_justifycenter_desc'] = 'Zarovnání na støed'; -tinyMCELang['lang_justifyright_desc'] = 'Zarovnání vpravo'; -tinyMCELang['lang_justifyfull_desc'] = 'Zarovnání do bloku'; -tinyMCELang['lang_bullist_desc'] = 'Seznam s odrážkami'; -tinyMCELang['lang_numlist_desc'] = 'Èíslovaný seznam'; -tinyMCELang['lang_outdent_desc'] = 'Snížit odsazení'; -tinyMCELang['lang_indent_desc'] = 'Zvýšit odsazení'; -tinyMCELang['lang_undo_desc'] = 'Zpìt'; -tinyMCELang['lang_redo_desc'] = 'Znovu'; -tinyMCELang['lang_link_desc'] = 'Vložit odkaz'; -tinyMCELang['lang_unlink_desc'] = 'Zrušit odkaz'; -tinyMCELang['lang_image_desc'] = 'Vložit obrázek'; -tinyMCELang['lang_cleanup_desc'] = 'Vyèistit kód'; -tinyMCELang['lang_focus_alert'] = 'Pøed použitím tohoto pøíkazu musí být kurzor v oknì editoru.'; -tinyMCELang['lang_edit_confirm'] = 'Chcete použít WYSIWYG editaci pro tento text?'; -tinyMCELang['lang_insert_link_title'] = 'Vložit/upravit odkaz'; -tinyMCELang['lang_insert'] = 'Vložit'; -tinyMCELang['lang_update'] = 'Zmìnit'; -tinyMCELang['lang_cancel'] = 'Zrušit'; -tinyMCELang['lang_insert_link_url'] = 'URL odkazu'; -tinyMCELang['lang_insert_link_target'] = 'Cíl'; -tinyMCELang['lang_insert_link_target_same'] = 'Otevøít odkaz ve stejném oknì'; -tinyMCELang['lang_insert_link_target_blank'] = 'Otevøít odkaz v novém oknì'; -tinyMCELang['lang_insert_image_title'] = 'Vložit/upravit obrázek'; -tinyMCELang['lang_insert_image_src'] = 'URL obrázku'; -tinyMCELang['lang_insert_image_alt'] = 'Popis obrázku'; -tinyMCELang['lang_help_desc'] = 'Nápovìda'; -tinyMCELang['lang_bold_img'] = 'bold.gif'; -tinyMCELang['lang_italic_img'] = 'italic.gif'; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste není použitelné v Mozille a Firefoxu.\nChcete více informací o tomto problému?'; \ No newline at end of file +tinyMCE.addI18n({cs:{ +common:{ +edit_confirm:"Chcete pou\u017E\u00EDt pro tento text WYSIWYG editaci?", +apply:"Pou\u017E\u00EDt", +insert:"Vlo\u017Eit", +update:"Aktualizovat", +cancel:"Zru\u0161it", +close:"Zav\u0159\u00EDt", +browse:"Proch\u00E1zet", +class_name:"T\u0159\u00EDda", +not_set:"- Nenastaveno -", +clipboard_msg:"Funkce kop\u00EDrovat/vyjmout/vlo\u017Eit nejsou pou\u017Eiteln\u00E9 v Mozille a Firefoxu.\nChcete v\u00EDce informac\u00ED?", +clipboard_no_support:"Tato funkce nen\u00ED va\u0161\u00EDm prohl\u00ED\u017Ee\u010Dem podporov\u00E1na. Pou\u017Eijte kl\u00E1vesov\u00E9 zkratky.", +popup_blocked:"Blokov\u00E1n\u00ED vyskakovac\u00EDch oken neumo\u017Enilo otev\u0159\u00EDt okno, nutn\u00E9 pro funkci aplikace. Pro pln\u00E9 vyu\u017Eit\u00ED mo\u017Enost\u00ED vypn\u00C4\u009Bte blokov\u00E1n\u00ED vyskakovac\u00EDch oken pro tento web.", +invalid_data:"Chyba: Vlo\u017Een\u00E1 chybn\u00E1 data jsou ozna\u010Dena \u010Derven\u011B.", +more_colors:"V\u00EDce barev" +}, +contextmenu:{ +align:"Zarovn\u00E1n\u00ED", +left:"Doleva", +center:"Na st\u0159ed", +right:"Doprava", +full:"Do bloku" +}, +insertdatetime:{ +date_fmt:"%d.%m.%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Vlo\u017Eit datum", +inserttime_desc:"Vlo\u017Eit \u010Das", +months_long:"Leden,\u00DAnor,B\u0159ezen,Duben,Kv\u011Bten,\u010Cerven,\u010Cervenec,Srpen,Z\u00E1\u0159\u00ED,\u0158\u00EDjen,Listopad,Prosinec", +months_short:"Led,\u00DAno,B\u0159e,Dub,Kv\u011B,\u010Cer,\u010Cvc,Srp,Z\u00E1\u0159,\u0158\u00EDj,Lis,Pro", +day_long:"Ned\u011Ble,Pond\u011Bl\u00ED,\u00DAter\u00FD,St\u0159eda,\u010Ctvrtek,P\u00E1tek,Sobota,Ned\u011Ble", +day_short:"Ne,Po,\u00DAt,St,\u010Ct,P\u00E1,So,Ne" +}, +print:{ +print_desc:"Tisknout" +}, +preview:{ +preview_desc:"N\u00E1hled" +}, +directionality:{ +ltr_desc:"Sm\u011Br zleva doprava", +rtl_desc:"Sm\u011Br zprava doleva" +}, +layer:{ +insertlayer_desc:"Vlo\u017Eit novou vrstvu", +forward_desc:"P\u0159esunout doP\u0159edu", +backward_desc:"P\u0159esunout dozadu", +absolute_desc:"P\u0159epnout absolutn\u00ED pozici", +content:"Nov\u00E1 vrstva..." +}, +save:{ +save_desc:"Ulo\u017Eit", +cancel_desc:"Zru\u0161it v\u0161echny zm\u011Bny" +}, +nonbreaking:{ +nonbreaking_desc:"Vlo\u017Eit pevnou mezeru" +}, +iespell:{ +iespell_desc:"Kontrolovat pravopis", +download:"ieSpell nebyl detekov\u00E1n. Chcete ho nainstalovat?" +}, +advhr:{ +advhr_desc:"Vodorovn\u00FD odd\u011Blova\u010D" +}, +emotions:{ +emotions_desc:"Emotikony" +}, +searchreplace:{ +search_desc:"Hledat", +replace_desc:"Naj\u00EDt/nahradit" +}, +advimage:{ +image_desc:"Vlo\u017Eit/upravit obr\u00E1zek" +}, +advlink:{ +link_desc:"Vlo\u017Eit/upravit odkaz" +}, +xhtmlxtras:{ +cite_desc:"Citace", +abbr_desc:"Zkratka", +acronym_desc:"Akronym", +del_desc:"Vymaz\u00E1n\u00ED", +ins_desc:"Vlo\u017Een\u00ED", +attribs_desc:"Vlo\u017Eit/upravit atributy" +}, +style:{ +desc:"Upravit CSS styl" +}, +paste:{ +paste_text_desc:"Vlo\u017Eit prost\u00FD text", +paste_word_desc:"Vlo\u017Eit z Wordu", +selectall_desc:"Vybrat v\u0161e" +}, +paste_dlg:{ +text_title:"Pou\u017Eijte CTRL+V pro vlo\u017Een\u00ED textu do okna.", +text_linebreaks:"Zachovat \u0159\u00E1dkov\u00E1n\u00ED", +word_title:"Pou\u017Eijte CTRL+V pro vlo\u017Een\u00ED textu do okna." +}, +table:{ +desc:"Vlo\u017Eit novou tabulku", +row_before_desc:"Vlo\u017Eit \u0159\u00E1dek P\u0159ed", +row_after_desc:"Vlo\u017Eit \u0159\u00E1dek za", +delete_row_desc:"Vymazat \u0159\u00E1dek", +col_before_desc:"Vlo\u017Eit sloupec P\u0159ed", +col_after_desc:"Vlo\u017Eit sloupec za", +delete_col_desc:"Vymazat sloupec", +split_cells_desc:"Rozd\u011Blit bu\u0148ky", +merge_cells_desc:"Slou\u010Dit bu\u0148ky", +row_desc:"Vlastnosti \u0159\u00E1dku", +cell_desc:"Vlastnosti bu\u0148ky", +props_desc:"Vlastnosti tabulky", +paste_row_before_desc:"Vlo\u017Eit \u0159\u00E1dek P\u0159ed", +paste_row_after_desc:"Vlo\u017Eit \u0159\u00E1dek za", +cut_row_desc:"Vyjmout \u0159\u00E1dek", +copy_row_desc:"Kop\u00EDrovat \u0159\u00E1dek", +del:"Vymazat tabulku", +row:"\u0158\u00E1dek", +col:"Sloupec", +cell:"Bu\u0148ka" +}, +autosave:{ +unload_msg:"Proveden\u00E9 zm\u011Bny mohou b\u00FDt ztraceny, jestli\u017Ee opust\u00EDte tuto str\u00E1nku." +}, +fullscreen:{ +desc:"P\u0159epnout na celostr\u00E1nkov\u00E9 zobrazen\u00ED" +}, +media:{ +desc:"Vlo\u017Eit/editovat m\u00E9dia", +edit:"Editovat m\u00E9dia" +}, +fullpage:{ +desc:"Vlastnosti dokumentu" +}, +template:{ +desc:"Vlo\u017Eit P\u0159eddefinovan\u00FD obsah ze \u0161ablony" +}, +visualchars:{ +desc:"Zobrazen\u00ED skryt\u00FDch znak\u016F zap/vyp" +}, +spellchecker:{ +desc:"Zapnout kontrolu textu", +menu:"Nastaven\u00ED kontroly textu", +ignore_word:"Ignorovat slovo", +ignore_words:"Ignorovat v\u0161e", +langs:"Jazyky", +wait:"\u010Cekejte pros\u00EDm...", +sug:"N\u00E1pov\u011Bda", +no_sug:"\u0139\u02DD\u00E1dn\u00E1 n\u00E1pov\u011Bda", +no_mpell:"Nebyly nalezeny \u017E\u00E1dn\u00E9 chyby." +}, +pagebreak:{ +desc:"Vlo\u017Eit konec str\u00E1nky" +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/da.js b/includes/tinymce/jscripts/tiny_mce/langs/da.js index 1c62542a..6b638c6b 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/da.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/da.js @@ -1,38 +1,155 @@ -// DK lang variables contributed by Jan Moelgaard - -tinyMCELang['lang_bold_desc'] = 'Fed'; -tinyMCELang['lang_italic_desc'] = 'Kursiv'; -tinyMCELang['lang_underline_desc'] = 'Understreg'; -tinyMCELang['lang_striketrough_desc'] = 'Gennemstreg'; -tinyMCELang['lang_justifyleft_desc'] = 'Venstrestil'; -tinyMCELang['lang_justifycenter_desc'] = 'Centrer'; -tinyMCELang['lang_justifyright_desc'] = 'Højrestil'; -tinyMCELang['lang_justifyfull_desc'] = 'Lige margin'; -tinyMCELang['lang_bullist_desc'] = 'Bulletliste'; -tinyMCELang['lang_numlist_desc'] = 'Nummerliste'; -tinyMCELang['lang_outdent_desc'] = 'Ryk til venstre'; -tinyMCELang['lang_indent_desc'] = 'Ryk til højre'; -tinyMCELang['lang_undo_desc'] = 'Fortryd'; -tinyMCELang['lang_redo_desc'] = 'Gør igen'; -tinyMCELang['lang_link_desc'] = 'Indsæt link'; -tinyMCELang['lang_unlink_desc'] = 'Fjern link'; -tinyMCELang['lang_image_desc'] = 'Indsæt billede'; -tinyMCELang['lang_cleanup_desc'] = 'Ryd op i koden'; -tinyMCELang['lang_focus_alert'] = 'Der skal sættes fokus på sessionen, før man kan bruge denne kommando'; -tinyMCELang['lang_edit_confirm'] = 'Vil du bruge WYSIWYG mode til dette textområde?'; -tinyMCELang['lang_insert_link_title'] = 'Indsæt eller rediger link'; -tinyMCELang['lang_insert'] = 'Indsæt'; -tinyMCELang['lang_update'] = 'Opdater'; -tinyMCELang['lang_cancel'] = 'Fortryd'; -tinyMCELang['lang_insert_link_url'] = 'Linkadresse'; -tinyMCELang['lang_insert_link_target'] = 'Target'; -tinyMCELang['lang_insert_link_target_same'] = 'Luk linket op i samme vindue'; -tinyMCELang['lang_insert_link_target_blank'] = 'Luk linket op i et nyt vindue'; -tinyMCELang['lang_insert_image_title'] = 'Indsæt / rediger billede'; -tinyMCELang['lang_insert_image_src'] = 'Billedets adresse'; -tinyMCELang['lang_insert_image_alt'] = 'Alternativ tekst'; -tinyMCELang['lang_help_desc'] = 'Hjælp'; -tinyMCELang['lang_bold_img'] = "bold.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({da:{ +common:{ +edit_confirm:"Vil du bruge den avancerede tekstredigering?", +apply:"Anvend", +insert:"Inds\u00E6t", +update:"Opdater", +cancel:"Annuller", +close:"Luk", +browse:"Gennemse", +class_name:"Klasse", +not_set:"-- Ikke sat --", +clipboard_msg:"Kopier/Klip/inds\u00E6t er ikke muligt i Mozilla eller Firefox.\nVil du have mere information om dette emne?", +clipboard_no_support:"P\u00E5 nuv\u00E6rende tidspunkt ikke supporteret af din browser. Anvend i stedet genvejene p\u00E5 tastaturet.", +popup_blocked:"Undskyld, men vi har noteret os, at din popup-blocker har forhindret et vindue, der giver programmet funktionalitet, at \u00E5bne op. Hvis du vil have den fulde funktionalitet, m\u00E5 du sl\u00E5 popup-blockeren fra for dette websted.", +invalid_data:"Fejl: Forkerte v\u00E6rdier indtastet i felter markeret med r\u00F8d.", +more_colors:"Flere farver" +}, +contextmenu:{ +align:"Justering", +left:"Venstre", +center:"Centreret", +right:"H\u00F8jre", +full:"Lige marginer" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"Inds\u00E6t dato", +inserttime_desc:"Inds\u00E6t klokkeslet", +months_long:"Januar,Februar,Marts,April,Maj,Juni,Juli,August,September,Oktober,November,December", +months_short:"Jan,Feb,Mar,Apr,Maj,Jun,Jul,Aug,Sep,Okt,Nov,Dec", +day_long:"S\u00F8ndag,Mandag,Tirsdag,Onsdag,Torsdag,Fredag,L\u00F8rdag,S\u00F8ndag", +day_short:"S\u00F8n,Man,Tir,Ons,Tors,Fre,L\u00F8r,S\u00F8n" +}, +print:{ +print_desc:"Udskriv" +}, +preview:{ +preview_desc:"Vis udskrift" +}, +directionality:{ +ltr_desc:"Retning venstre mod h\u00F8jre", +rtl_desc:"Retning h\u00F8jre mod venstre" +}, +layer:{ +insertlayer_desc:"Inds\u00E6t nyt lag", +forward_desc:"Flyt fremad", +backward_desc:"Flyt bagud", +absolute_desc:"Sl\u00E5 absolut positionering til/fra", +content:"Nyt lag..." +}, +save:{ +save_desc:"Gem", +cancel_desc:"Annuller alle \u00E6ndringer" +}, +nonbreaking:{ +nonbreaking_desc:"Inds\u00E6t et blanktegn" +}, +iespell:{ +iespell_desc:"Udf\u00F8r stavekontrol", +download:"ieSpell blev ikke fundet. Vil du installere det nu?" +}, +advhr:{ +advhr_desc:"Horisontal linie" +}, +emotions:{ +emotions_desc:"Hum\u00F8rikoner" +}, +searchreplace:{ +search_desc:"S\u00F8g", +replace_desc:"S\u00F8g/erstat" +}, +advimage:{ +image_desc:"Inds\u00E6t/rediger billede" +}, +advlink:{ +link_desc:"Inds\u00E6t/rediger link", +delta_width:"40" +}, +xhtmlxtras:{ +cite_desc:"Citat", +abbr_desc:"Forkortelse", +acronym_desc:"Akronym", +del_desc:"Sletning", +ins_desc:"Inds\u00E6ttelse", +attribs_desc:"Inds\u00E6t/rediger attributter" +}, +style:{ +desc:"Rediger CSS stil" +}, +paste:{ +paste_text_desc:"Inds\u00E6t ikke-formatteret tekst", +paste_word_desc:"Inds\u00E6t fra Word", +selectall_desc:"V\u00E6lg alle" +}, +paste_dlg:{ +text_title:"Anvend CTRL+V p\u00E5 tastaturet for at inds\u00E6tte teksten.", +text_linebreaks:"Bevar linieskift", +word_title:"Anvend CTRL+V p\u00E5 tastaturet for at inds\u00E6tte teksten." +}, +table:{ +desc:"Inds\u00E6t tabel", +row_before_desc:"Inds\u00E6t r\u00E6kke f\u00F8r", +row_after_desc:"Inds\u00E6t r\u00E6kke efter", +delete_row_desc:"Slet r\u00E6kke", +col_before_desc:"Inds\u00E6t kolonne f\u00F8r", +col_after_desc:"Inds\u00E6t kolonne efter", +delete_col_desc:"Slet kolonne", +split_cells_desc:"Opdel flettede celler", +merge_cells_desc:"Flet celler", +row_desc:"R\u00E6kkeegenskaber", +cell_desc:"Celleegenskaber", +props_desc:"Tabelegenskaber", +paste_row_before_desc:"Inds\u00E6t r\u00E6kke f\u00F8r", +paste_row_after_desc:"Inds\u00E6t r\u00E6kke efter", +cut_row_desc:"Klip r\u00E6kke", +copy_row_desc:"Kopier r\u00E6kke", +del:"Slet tabel", +row:"R\u00E6kke", +col:"Kolonne", +cell:"Celle" +}, +autosave:{ +unload_msg:"Har du foretaget nogle \u00E6ndringer, vil de g\u00E5 tabt, hvis du navigerer v\u00E6k fra denne side." +}, +fullscreen:{ +desc:"Vis/skjul fuldsk\u00E6rmstilstand" +}, +media:{ +desc:"Inds\u00E6t/rediger indlejret mediefil", +edit:"Rediger indlejret mediefil" +}, +fullpage:{ +desc:"Dokumentegenskaber" +}, +template:{ +desc:"Inds\u00E6t pr\u00E6defineret skabelonindhold" +}, +visualchars:{ +desc:"Vis/Skjul visuelle kontroltegn." +}, +spellchecker:{ +desc:"Vis/skjul stavekontrol", +menu:"Indstillinger for stavekontrol", +ignore_word:"Ignorer ord", +ignore_words:"Ignorer alle", +langs:"Sprog", +wait:"Vent venligst...", +sug:"Forslag", +no_sug:"Ingen forslag", +no_mpell:"Ingen stavefejl fundet." +}, +pagebreak:{ +desc:"Inds\u00E6t sideskift." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/de.js b/includes/tinymce/jscripts/tiny_mce/langs/de.js index 16b161e5..3384a12b 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/de.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/de.js @@ -1,38 +1,155 @@ -// DE lang variables - -tinyMCELang['lang_bold_desc'] = 'Fett'; -tinyMCELang['lang_italic_desc'] = 'Kursiv'; -tinyMCELang['lang_underline_desc'] = 'Unterstrichen'; -tinyMCELang['lang_striketrough_desc'] = 'Durchgestrichen'; -tinyMCELang['lang_justifyleft_desc'] = 'Linksbündig'; -tinyMCELang['lang_justifycenter_desc'] = 'Zentriert'; -tinyMCELang['lang_justifyright_desc'] = 'Rechtsbündig'; -tinyMCELang['lang_justifyfull_desc'] = 'Blocksatz'; -tinyMCELang['lang_bullist_desc'] = 'Aufzählungszeichen'; -tinyMCELang['lang_numlist_desc'] = 'Nummerierung'; -tinyMCELang['lang_outdent_desc'] = 'Einzug verkleinern'; -tinyMCELang['lang_indent_desc'] = 'Einzug vergrössern'; -tinyMCELang['lang_undo_desc'] = 'Rückgängig'; -tinyMCELang['lang_redo_desc'] = 'Wiederholen'; -tinyMCELang['lang_link_desc'] = 'Link einfügen/bearbeiten'; -tinyMCELang['lang_unlink_desc'] = 'Link entfernen'; -tinyMCELang['lang_image_desc'] = 'Bild einfügen/bearbeiten'; -tinyMCELang['lang_cleanup_desc'] = 'unsauberen Code aufräumen'; -tinyMCELang['lang_focus_alert'] = 'Eine Bearbeitungsinstanz muss für diesen Befehl hervorgehoben.'; -tinyMCELang['lang_edit_confirm'] = 'Wollen Sie den WYSIWYG Modus für dieses Textfeld benutzen?'; -tinyMCELang['lang_insert_link_title'] = 'Link einfügen/bearbeiten'; -tinyMCELang['lang_insert'] = 'Einfügen'; -tinyMCELang['lang_update'] = 'Aktualisieren'; -tinyMCELang['lang_cancel'] = 'Abbrechen'; -tinyMCELang['lang_insert_link_url'] = 'Link URL'; -tinyMCELang['lang_insert_link_target'] = 'Ziel'; -tinyMCELang['lang_insert_link_target_same'] = 'Link in gleichen Fester öffnen'; -tinyMCELang['lang_insert_link_target_blank'] = 'Link in neuen Fenster öffnen'; -tinyMCELang['lang_insert_image_title'] = 'Bild einfügen/bearbeiten'; -tinyMCELang['lang_insert_image_src'] = 'Bild URL'; -tinyMCELang['lang_insert_image_alt'] = 'Bild Beschreibung'; -tinyMCELang['lang_help_desc'] = 'Hilfe'; -tinyMCELang['lang_bold_img'] = "bold_de_se.gif"; -tinyMCELang['lang_italic_img'] = "italic_de_se.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Kopieren/Ausschneiten/Einfügen ist mit Mozilla und Firefox nicht verfügbar.\nWollen Sie mehr Informationen darüber erhalten?'; +tinyMCE.addI18n({de:{ +common:{ +edit_confirm:"Wollen Sie diesen Textbereich mit WYSIWYG bearbeiten?", +apply:"\u00DCbernehmen", +insert:"Einf\u00FCgen", +update:"Aktualisieren", +cancel:"Abbrechen", +close:"Schlie\u00DFen", +browse:"Durchsuchen", +class_name:"Klasse", +not_set:"-- Nicht gesetzt --", +clipboard_msg:"Kopieren, Ausschneiden und Einf\u00FCgen sind im Mozilla Firefox nicht m\u00F6glich.\nM\u00F6chten Sie mehr \u00FCber dieses Problem erfahren?", +clipboard_no_support:"Wird derzeit in Ihrem Browser nicht unterst\u00FCtzt. Bitte benutzen Sie stattdessen die Tastenk\u00FCrzel.", +popup_blocked:"Leider hat Ihr Popup-Blocker ein Fenster unterbunden, das f\u00FCr den Betrieb dieses Programms n\u00F6tig ist. Bitte deaktivieren Sie den Popup-Blocker, um die volle Funktionalit\u00E4t zu erlangen.", +invalid_data:"Fehler: Sie haben ung\u00FCltige Werte eingegeben (rot markiert).", +more_colors:"Weitere Farben" +}, +contextmenu:{ +align:"Ausrichtung", +left:"Links", +center:"Mittig", +right:"Rechts", +full:"Blocksatz" +}, +insertdatetime:{ +date_fmt:"%d.%m.%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Datum einf\u00FCgen", +inserttime_desc:"Zeit einf\u00FCgen", +months_long:"Januar,Februar,M\u00E4rz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember", +months_short:"Jan,Feb,M\u00E4rz,Apr,Mai,Juni,Juli,Aug,Sept,Okt,Nov,Dez", +day_long:"Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag", +day_short:"So,Mo,Di,Mi,Do,Fr,Sa,So" +}, +print:{ +print_desc:"Drucken" +}, +preview:{ +preview_desc:"Vorschau" +}, +directionality:{ +ltr_desc:"Schrift von links nach rechts", +rtl_desc:"Schrift von rechts nach links" +}, +layer:{ +insertlayer_desc:"Neue Ebene einf\u00FCgen", +forward_desc:"Vor verschieben", +backward_desc:"Zur\u00FCck verschieben", +absolute_desc:"Absolute Positionierung", +content:"Neue Ebene..." +}, +save:{ +save_desc:"Speichern", +cancel_desc:"Alle \u00C4nderungen verwerfen" +}, +nonbreaking:{ +nonbreaking_desc:"Gesch\u00FCtztes Leerzeichen einf\u00FCgen" +}, +iespell:{ +iespell_desc:"Rechtschreibpr\u00FCfung", +download:"ieSpell konnte nicht gefunden werden. Wollen Sie es installieren?" +}, +advhr:{ +advhr_desc:"Trennlinie" +}, +emotions:{ +emotions_desc:"Smilies" +}, +searchreplace:{ +search_desc:"Suchen", +replace_desc:"Suchen/Ersetzen" +}, +advimage:{ +image_desc:"Bild einf\u00FCgen/ersetzen" +}, +advlink:{ +link_desc:"Link einf\u00FCgen/bearbeiten" +}, +xhtmlxtras:{ +cite_desc:"Quellenangabe", +abbr_desc:"Abk\u00FCrzung", +acronym_desc:"Akronym", +del_desc:"Entfernter Text", +ins_desc:"Eingef\u00FCgter Text", +attribs_desc:"Attribute einf\u00FCgen/bearbeiten" +}, +style:{ +desc:"CSS-Styles bearbeiten" +}, +paste:{ +paste_text_desc:"Als normalen Text einf\u00FCgen", +paste_word_desc:"Mit Formatierungen (aus Word) einf\u00FCgen", +selectall_desc:"Alles ausw\u00E4hlen" +}, +paste_dlg:{ +text_title:"Dr\u00FCcken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00FCgen.", +text_linebreaks:"Zeilenumbr\u00FCche beibehalten", +word_title:"Dr\u00FCcken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00FCgen." +}, +table:{ +desc:"Tabelle erstellen", +row_before_desc:"Zeile oberhalb einf\u00FCgen", +row_after_desc:"Zeile unterhalb einf\u00FCgen", +delete_row_desc:"Zeile entfernen", +col_before_desc:"Spalte links einf\u00FCgen", +col_after_desc:"Spalte rechts einf\u00FCgen", +delete_col_desc:"Spalte l\u00F6schen", +split_cells_desc:"Vereinte Zellen trennen", +merge_cells_desc:"Zellen vereinen", +row_desc:"Eigenschaften der Zeile", +cell_desc:"Eigenschaften der Zelle", +props_desc:"Eigenschaften der Tabelle", +paste_row_before_desc:"Zeile oberhalb aus der Zwischenablage einf\u00FCgen", +paste_row_after_desc:"Zeile unterhalb aus der Zwischenablage einf\u00FCgen", +cut_row_desc:"Zeile ausschneiden", +copy_row_desc:"Zeile kopieren", +del:"Tabelle entfernen", +row:"Zeile", +col:"Spalte", +cell:"Zelle", +cellprops_delta_width:"150" +}, +autosave:{ +unload_msg:"Ihre \u00C4nderungen werden verloren gehen, wenn Sie die Seite verlassen." +}, +fullscreen:{ +desc:"Vollbildschirm" +}, +media:{ +desc:"Multimedia einbetten/bearbeiten", +edit:"Multimediaeinbettung bearbeiten" +}, +fullpage:{ +desc:"Dokument-Eigenschaften" +}, +template:{ +desc:"Vorgefertigten Vorlageninhalt einf\u00FCgen" +}, +visualchars:{ +desc:"Sichtbarkeit der Steuerzeichen an/aus." +}, +spellchecker:{ +desc:"Rechtschreibpr\u00FCfung an/aus", +menu:"Einstellungen der Rechtschreibpr\u00FCfung", +ignore_word:"Wort ignorieren", +ignore_words:"Alle ignorieren", +langs:"Sprachen", +wait:"Bitte warten...", +sug:"Vorschl\u00E4ge", +no_sug:"Keine Vorschl\u00E4ge", +no_mpell:"Keine Rechtschreibfehler gefunden." +}, +pagebreak:{ +desc:"Seitenumbruch Einf\u00FCgen." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/dv.js b/includes/tinymce/jscripts/tiny_mce/langs/dv.js new file mode 100644 index 00000000..95296c0e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/dv.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({dv:{ +common:{ +edit_confirm:"\u0789\u07A8\u0793\u07AC\u0786\u07B0\u0793\u07B0\u0790\u07B0\u0784\u07AE\u0786\u07B0\u0790\u07B0\u078E\u07A6\u0787\u07A8 \u0787\u07AC\u0791\u07A8\u0793\u07A7\u0783 \u0784\u07AD\u0782\u07AA\u0782\u07B0\u0786\u07AA\u0783\u07A6\u0782\u07B0 \u0784\u07AD\u0782\u07AA\u0782\u07B0\u078A\u07AA\u0785\u07AA\u078C\u07AF\u061F", +apply:"\u0790\u07AD\u0788\u07B0", +insert:"\u0787\u07A8\u078C\u07AA\u0783\u07AA\u0786\u07AA\u0783\u07A6\u0787\u07B0\u0788\u07A7", +update:"\u0784\u07A6\u078B\u07A6\u078D\u07AA\u0786\u07AA\u0783\u07A6\u0787\u07B0\u0788\u07A7", +cancel:"\u0786\u07AC\u0782\u07B0\u0790\u07A6\u078D\u07B0", +close:"\u0782\u07A8\u0789\u07AA\u0782\u07A9", +browse:"\u0784\u07A6\u0787\u07B0\u078D\u07A6\u0788\u07A7", +class_name:"\u0786\u07B0\u078D\u07A7\u0790\u07B0", +not_set:"-- \u0780\u07A6\u0789\u07A6\u0787\u07AC\u0787\u07B0 \u0782\u07AA\u0796\u07AC\u0780\u07AC --", +clipboard_msg:"\u0789\u07AE\u0792\u07A8\u0787\u07B0\u078D\u07A7 \u0787\u07A6\u078B\u07A8 \u078A\u07A6\u0794\u07A7\u0783\u078A\u07AE\u0786\u07B0\u0790\u07B0\u078E\u07A6\u0787\u07A8 \u0786\u07AE\u0795\u07A9/\u0786\u07A6\u0793\u07B0/\u0795\u07AD\u0790\u07B0\u0793\u07B0 \u0782\u07AA\u0786\u07AA\u0783\u07AC\u0788\u07AC.\n \u0789\u07A8\u0789\u07A6\u0787\u07B0\u0790\u07A6\u078D\u07A6 \u0787\u07A8\u078C\u07AA\u0783\u07A6\u0781\u07B0 \u0787\u07AE\u0785\u07AA\u0782\u07B0\u078A\u07A8\u078D\u07AA\u0788\u07AA\u0789\u07A6\u0781\u07B0 \u0784\u07AD\u0782\u07AA\u0782\u07B0\u078A\u07AA\u0785\u07AA\u0788\u07AD\u078C\u07A6\u061F", +clipboard_no_support:"\u0789\u07A8\u0788\u07A6\u078E\u07AA\u078C\u07AA \u078C\u07A8\u0794\u07A6\u0784\u07AD\u078A\u07AA\u0785\u07A7\u078E\u07AC \u0784\u07B0\u0783\u07A6\u0787\u07AA\u0792\u07A6\u0783\u07AA \u0790\u07A6\u0795\u07AF\u0793\u07B0 \u0782\u07AA\u0786\u07AA\u0783\u07A7\u078C\u07A9\u0788\u07AC \u0786\u07A9\u0784\u07AF\u0791\u07B0\u078E\u07AC \u0786\u07A9\u078C\u07A6\u0787\u07B0 \u0784\u07AD\u0782\u07AA\u0782\u07B0\u0786\u07AA\u0783\u07A6\u0787\u07B0\u0788\u07A7.", +popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.", +invalid_data:"Error: Invalid values entered, these are marked in red.", +more_colors:"More colors" +}, +contextmenu:{ +align:"Alignment", +left:"Left", +center:"Center", +right:"Right", +full:"Full" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"Insert date", +inserttime_desc:"Insert time", +months_long:"January,February,March,April,May,June,July,August,September,October,November,December", +months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", +day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", +day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun" +}, +print:{ +print_desc:"Print" +}, +preview:{ +preview_desc:"Preview" +}, +directionality:{ +ltr_desc:"Direction left to right", +rtl_desc:"Direction right to left" +}, +layer:{ +insertlayer_desc:"Insert new layer", +forward_desc:"Move forward", +backward_desc:"Move backward", +absolute_desc:"Toggle absolute positioning", +content:"New layer..." +}, +save:{ +save_desc:"Save", +cancel_desc:"Cancel all changes" +}, +nonbreaking:{ +nonbreaking_desc:"Insert non-breaking space character" +}, +iespell:{ +iespell_desc:"Run spell checking", +download:"ieSpell not detected. Do you want to install it now?" +}, +advhr:{ +advhr_desc:"Horizontal rule" +}, +emotions:{ +emotions_desc:"Emotions" +}, +searchreplace:{ +search_desc:"Find", +replace_desc:"Find/Replace" +}, +advimage:{ +image_desc:"Insert/edit image" +}, +advlink:{ +link_desc:"Insert/edit link" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"Abbreviation", +acronym_desc:"Acronym", +del_desc:"Deletion", +ins_desc:"Insertion", +attribs_desc:"Insert/Edit Attributes" +}, +style:{ +desc:"Edit CSS Style" +}, +paste:{ +paste_text_desc:"Paste as Plain Text", +paste_word_desc:"Paste from Word", +selectall_desc:"Select All" +}, +paste_dlg:{ +text_title:"Use CTRL+V on your keyboard to paste the text into the window.", +text_linebreaks:"Keep linebreaks", +word_title:"Use CTRL+V on your keyboard to paste the text into the window." +}, +table:{ +desc:"Inserts a new table", +row_before_desc:"Insert row before", +row_after_desc:"Insert row after", +delete_row_desc:"Delete row", +col_before_desc:"Insert column before", +col_after_desc:"Insert column after", +delete_col_desc:"Remove column", +split_cells_desc:"Split merged table cells", +merge_cells_desc:"Merge table cells", +row_desc:"Table row properties", +cell_desc:"Table cell properties", +props_desc:"Table properties", +paste_row_before_desc:"Paste table row before", +paste_row_after_desc:"Paste table row after", +cut_row_desc:"Cut table row", +copy_row_desc:"Copy table row", +del:"Delete table", +row:"Row", +col:"Column", +cell:"Cell" +}, +autosave:{ +unload_msg:"The changes you made will be lost if you navigate away from this page." +}, +fullscreen:{ +desc:"Toggle fullscreen mode" +}, +media:{ +desc:"Insert / edit embedded media", +edit:"Edit embedded media" +}, +fullpage:{ +desc:"Document properties" +}, +template:{ +desc:"Insert predefined template content" +}, +visualchars:{ +desc:"Visual control characters on/off." +}, +spellchecker:{ +desc:"Toggle spellchecker", +menu:"Spellchecker settings", +ignore_word:"Ignore word", +ignore_words:"Ignore all", +langs:"Languages", +wait:"Please wait...", +sug:"Suggestions", +no_sug:"No suggestions", +no_mpell:"No misspellings found." +}, +pagebreak:{ +desc:"Insert page break." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/el.js b/includes/tinymce/jscripts/tiny_mce/langs/el.js index e078d611..8f2e8a33 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/el.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/el.js @@ -1,38 +1,158 @@ -// Greek lang variables by Jacaranda Bill - -tinyMCELang['lang_bold_desc'] = '¸íôïíç ãñáöÞ'; -tinyMCELang['lang_italic_desc'] = 'ÐëÜãéá ãñáöÞ'; -tinyMCELang['lang_underline_desc'] = 'ÕðïãñÜììéóç'; -tinyMCELang['lang_striketrough_desc'] = 'ÄéáêñéôÞ äéáãñáöÞ'; -tinyMCELang['lang_justifyleft_desc'] = 'Óôïß÷éóç áñéóôåñÜ'; -tinyMCELang['lang_justifycenter_desc'] = 'Óôïß÷éóç óôï êÝíôñï'; -tinyMCELang['lang_justifyright_desc'] = 'Óôïß÷éóç äåîéÜ'; -tinyMCELang['lang_justifyfull_desc'] = 'ÐëÞñçò óôïß÷éóç'; -tinyMCELang['lang_bullist_desc'] = 'Êïõêêßäåò'; -tinyMCELang['lang_numlist_desc'] = 'Áñßèìçóç'; -tinyMCELang['lang_outdent_desc'] = 'Ìåßùóç åóï÷Þò'; -tinyMCELang['lang_indent_desc'] = 'Áýîçóç åóï÷Þò'; -tinyMCELang['lang_undo_desc'] = 'Áíáßñåóç'; -tinyMCELang['lang_redo_desc'] = 'Áêýñùóç áíáßñåóçò'; -tinyMCELang['lang_link_desc'] = 'Äçìéïõñãßá/Äéüñèùóç õðåñ-óýíäåóçò'; -tinyMCELang['lang_unlink_desc'] = 'ÄéáãñáöÞ õðåñ-óýíäåóçò'; -tinyMCELang['lang_image_desc'] = 'ÅéóáãùãÞ/Äéüñèùóç åéêüíáò'; -tinyMCELang['lang_cleanup_desc'] = 'ÊáèÜñéóìá êþäéêá'; -tinyMCELang['lang_focus_alert'] = 'ÐñÝðåé íá õðÜñ÷åé åíåñãüò êÜðïéïò åðåîåñãáóôÞò êåéìÝíïõ ðñéí íá ÷ñçóéìïðïéÞóåôå áõôÞ ôçí åíôïëÞ.'; -tinyMCELang['lang_edit_confirm'] = 'ÈÝëåôå íá ÷ñçóéìïðïéÞóåôå ôçí êáôÜóôáóç WYSIWYG ãéá ôï óõãêåêñéìÝíï ðëáßóéï êåéìÝíïõ;'; -tinyMCELang['lang_insert_link_title'] = 'Äçìéïõñãßá/Äéüñèùóç õðåñ-óýíäåóçò'; -tinyMCELang['lang_insert'] = 'ÅéóáãùãÞ'; -tinyMCELang['lang_update'] = 'ÅéóáãùãÞ'; -tinyMCELang['lang_cancel'] = 'Áêýñùóç'; -tinyMCELang['lang_insert_link_url'] = 'Äéåýèõíóç'; -tinyMCELang['lang_insert_link_target'] = 'Óôü÷ïò'; -tinyMCELang['lang_insert_link_target_same'] = '¢íïéãìá ôçò äéåýèõíóçò óôï ßäéï ðáñÜèõñï'; -tinyMCELang['lang_insert_link_target_blank'] = '¢íïéãìá ôçò äéåýèõíóçò óå íÝï ðáñÜèõñï'; -tinyMCELang['lang_insert_image_title'] = 'ÅéóáãùãÞ/Äéüñèùóç åéêüíáò'; -tinyMCELang['lang_insert_image_src'] = 'Äéåýèõíóç'; -tinyMCELang['lang_insert_image_alt'] = 'ÐåñéãñáöÞ'; -tinyMCELang['lang_help_desc'] = 'ÂïÞèåéá'; -tinyMCELang['lang_bold_img'] = "bold.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({el:{ +common:{ +edit_confirm:"\u0398\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03BB\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1 WYSIWYG ;", +apply:"\u0395\u03C6\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE", +insert:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE", +update:"\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7", +cancel:"\u0386\u03BA\u03C5\u03C1\u03BF", +close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF", +browse:"\u0395\u03CD\u03C1\u03B5\u03C3\u03B7", +class_name:"\u039A\u03BB\u03AC\u03C3\u03B7", +not_set:"-- \u039C\u03B7 \u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03BF --", +clipboard_msg:"\u039F\u03B9 \u03BB\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B5\u03C2 \u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE/\u0391\u03C0\u03BF\u03BA\u03BF\u03C0\u03AE/\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03B4\u03B5\u03BD \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03B5\u03C2 \u03C3\u03B5 Mozilla \u03BA\u03B1\u03B9 Firefox.\n\u0398\u03AD\u03BB\u03B5\u03C4\u03B5 \u03C0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B5\u03C2 \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03AF\u03B5\u03C2 ;", +clipboard_no_support:"\u0394\u03B5\u03BD \u03C5\u03C0\u03BF\u03C3\u03C4\u03B7\u03C1\u03AF\u03B6\u03B5\u03C4\u03B1\u03B9 \u03B1\u03C0\u03CC \u03C4\u03BF\u03BD \u03C6\u03C5\u03BB\u03BB\u03BF\u03BC\u03B5\u03C4\u03C1\u03B7\u03C4\u03AE \u03C3\u03B1\u03C2, \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03C4\u03B5 \u03C4\u03B9\u03C2 \u03C3\u03C5\u03BD\u03C4\u03BF\u03BC\u03B5\u03CD\u03C3\u03B5\u03B9\u03C2 \u03C0\u03BB\u03B7\u03BA\u03C4\u03C1\u03BF\u03BB\u03BF\u03B3\u03AF\u03BF\u03C5.", +popup_blocked:"\u0388\u03BD\u03B1 popup-blocker \u03C0\u03C1\u03CC\u03B3\u03C1\u03B1\u03BC\u03BC\u03B1 \u03AD\u03C7\u03B5\u03B9 \u03B1\u03C0\u03B5\u03BD\u03B5\u03C1\u03B3\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9 \u03AD\u03BD\u03B1 \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF \u03B1\u03C0\u03B1\u03C1\u03B1\u03AF\u03C4\u03B7\u03C4\u03BF \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03B5\u03C6\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE. \u03A0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03BF \u03B1\u03C0\u03B5\u03BD\u03B5\u03C1\u03B3\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03C4\u03B5 \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03B9\u03C3\u03C4\u03BF\u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 \u03B1\u03C5\u03C4\u03AE \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03C4\u03B5 \u03C0\u03BB\u03AE\u03C1\u03C9\u03C2 \u03C4\u03B7\u03BD \u03B5\u03C6\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE.", +invalid_data:"Error: Invalid values entered, these are marked in red.", +more_colors:"\u03A0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B1 \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1" +}, +contextmenu:{ +align:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7", +left:"\u0391\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +center:"\u039A\u03AD\u03BD\u03C4\u03C1\u03BF", +right:"\u0394\u03B5\u03BE\u03B9\u03AC", +full:"\u03A0\u03BB\u03AE\u03C1\u03B7\u03C2" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03B7\u03BC\u03AD\u03C1\u03B1\u03C2", +inserttime_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03CE\u03C1\u03B1\u03C2", +months_long:"\u0399\u03B1\u03BD\u03BF\u03C5\u03AC\u03C1\u03B9\u03BF\u03C2,\u03A6\u03B5\u03B2\u03C1\u03BF\u03C5\u03AC\u03C1\u03B9\u03BF\u03C2,\u039C\u03AC\u03C1\u03C4\u03B9\u03BF\u03C2,\u0391\u03C0\u03C1\u03AF\u03BB\u03B9\u03BF\u03C2,\u039C\u03AC\u03B9\u03BF\u03C2,\u0399\u03BF\u03CD\u03BD\u03B9\u03BF\u03C2,\u0399\u03BF\u03CD\u03BB\u03B9\u03BF\u03C2,\u0391\u03CD\u03B3\u03BF\u03C5\u03C3\u03C4\u03BF\u03C2,\u03A3\u03B5\u03C0\u03C4\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2,\u039F\u03BA\u03C4\u03CE\u03B2\u03C1\u03B9\u03BF\u03C2,\u039D\u03BF\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2,\u0394\u03B5\u03BA\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2", +months_short:"\u0399\u03B1\u03BD,\u03A6\u03B5\u03B2,\u039C\u03AC\u03C1,\u0391\u03C0\u03C1,\u039C\u03AC\u03B9,\u0399\u03BF\u03CD\u03BD,\u0399\u03BF\u03CD\u03BB,\u0391\u03CD\u03B3,\u03A3\u03B5\u03C0,\u039F\u03BA\u03C4,\u039D\u03BF\u03AD,\u0394\u03B5\u03BA", +day_long:"\u039A\u03C5\u03C1\u03B9\u03B1\u03BA\u03AE,\u0394\u03B5\u03C5\u03C4\u03AD\u03C1\u03B1,\u03A4\u03C1\u03AF\u03C4\u03B7,\u03A4\u03B5\u03C4\u03AC\u03C1\u03C4\u03B7,\u03A0\u03AD\u03BC\u03C0\u03C4\u03B7,\u03A0\u03B1\u03C1\u03B1\u03C3\u03BA\u03B5\u03C5\u03AE,\u03A3\u03AC\u03B2\u03B2\u03B1\u03C4\u03BF", +day_short:"\u039A\u03C5,\u0394\u03B5,\u03A4\u03C1,\u03A4\u03B5\u03C4,\u03A0\u03AD\u03BC,\u03A0\u03B1\u03C1,\u03A3\u03B1\u03B2" +}, +print:{ +print_desc:"\u0395\u03BA\u03C4\u03CD\u03C0\u03C9\u03C3\u03B7" +}, +preview:{ +preview_desc:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03C3\u03BA\u03CC\u03C0\u03B7\u03C3\u03B7" +}, +directionality:{ +ltr_desc:"\u039A\u03B1\u03C4\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 \u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC \u03C0\u03C1\u03BF\u03C2 \u03B4\u03B5\u03BE\u03B9\u03AC", +rtl_desc:"\u039A\u03B1\u03C4\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 \u03B4\u03B5\u03BE\u03B9\u03AC \u03C0\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC" +}, +layer:{ +insertlayer_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03BD\u03AD\u03BF\u03C5 layer", +forward_desc:"\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7 \u03C3\u03C4\u03BF \u03C0\u03C1\u03BF\u03C3\u03BA\u03AE\u03BD\u03B9\u03BF", +backward_desc:"\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7 \u03C3\u03C4\u03BF \u03C0\u03B1\u03C1\u03B1\u03C3\u03BA\u03AE\u03BD\u03B9\u03BF", +absolute_desc:"\u0391\u03C0\u03CC\u03BB\u03C5\u03C4\u03B7/\u03A3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AE \u03C4\u03BF\u03C0\u03BF\u03B8\u03AD\u03C4\u03B7\u03C3\u03B7", +content:"\u039D\u03AD\u03BF layer..." +}, +save:{ +save_desc:"\u0391\u03C0\u03BF\u03B8\u03AE\u03BA\u03B5\u03C5\u03C3\u03B7", +cancel_desc:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7 \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03B1\u03BB\u03BB\u03B1\u03B3\u03CE\u03BD" +}, +nonbreaking:{ +nonbreaking_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE non-breaking \u03BA\u03B5\u03BD\u03BF\u03CD \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B1" +}, +iespell:{ +iespell_desc:"\u0395\u03BA\u03C4\u03AD\u03BB\u03B5\u03C3\u03B7 \u03B5\u03BB\u03AD\u03B3\u03C7\u03BF\u03C5 \u03BF\u03C1\u03B8\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1\u03C2", +download:"\u03A4\u03BF ieSpell \u03B4\u03B5\u03BD \u03B2\u03C1\u03AD\u03B8\u03B7\u03BA\u03B5. \u039D\u03B1 \u03BA\u03B1\u03C4\u03AD\u03B2\u03B5\u03B9 \u03C4\u03CE\u03C1\u03B1 ;" +}, +advhr:{ +advhr_desc:"\u039F\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B1 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE" +}, +emotions:{ +emotions_desc:"\u03A3\u03C5\u03BD\u03B1\u03B9\u03C3\u03B8\u03AE\u03BC\u03B1\u03C4\u03B1" +}, +searchreplace:{ +search_desc:"\u0395\u03CD\u03C1\u03B5\u03C3\u03B7", +replace_desc:"\u0395\u03CD\u03C1\u03B5\u03C3\u03B7/\u0391\u03BD\u03C4\u03B9\u03BA\u03B1\u03C4\u03AC\u03C3\u03C4\u03B1\u03C3\u03B7" +}, +advimage:{ +image_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2" +}, +advlink:{ +link_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03BF\u03C5", +delta_width:"50" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"\u03A3\u03C5\u03BD\u03C4\u03BF\u03BC\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1", +acronym_desc:"\u0391\u03BA\u03C1\u03BF\u03BD\u03CD\u03BC\u03B9\u03BF", +del_desc:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE", +ins_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE", +attribs_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B9\u03B4\u03B9\u03BF\u03C4\u03AE\u03C4\u03C9\u03BD" +}, +style:{ +desc:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03A3\u03C4\u03C5\u03BB CSS" +}, +paste:{ +paste_text_desc:"\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03C9\u03C2 \u03B1\u03C0\u03BB\u03CC \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF", +paste_word_desc:"\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03B1\u03C0\u03CC \u03C4\u03BF Word", +selectall_desc:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03CC\u03BB\u03C9\u03BD" +}, +paste_dlg:{ +text_title:"\u03A7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03C4\u03B5 CTRL+V \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BA\u03AC\u03BD\u03B5\u03C4\u03B5 \u03B5\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 \u03C3\u03C4\u03BF \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF.", +text_linebreaks:"\u039D\u03B1 \u03BA\u03C1\u03B1\u03C4\u03B7\u03B8\u03BF\u03CD\u03BD \u03C4\u03B1 linebreaks", +word_title:"\u03A7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03C4\u03B5 CTRL+V \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BA\u03AC\u03BD\u03B5\u03C4\u03B5 \u03B5\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 \u03C3\u03C4\u03BF \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF." +}, +table:{ +desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03BD\u03AD\u03BF\u03C5 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +row_before_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03C0\u03C1\u03B9\u03BD", +row_after_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03BC\u03B5\u03C4\u03AC", +delete_row_desc:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2", +col_before_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2 \u03C0\u03C1\u03B9\u03BD", +col_after_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2 \u03BC\u03B5\u03C4\u03AC", +delete_col_desc:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2", +split_cells_desc:"\u0394\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 \u03C3\u03C5\u03B3\u03C7\u03C9\u03BD\u03B5\u03C5\u03BC\u03AD\u03BD\u03C9\u03BD \u03BA\u03B5\u03BB\u03B9\u03CE\u03BD \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +merge_cells_desc:"\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 \u03BA\u03B5\u03BB\u03B9\u03CE\u03BD \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +row_desc:"\u0399\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +cell_desc:"\u0399\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03BA\u03B5\u03BB\u03B9\u03BF\u03CD \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +props_desc:"\u0399\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +paste_row_before_desc:"\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1 \u03C0\u03C1\u03B9\u03BD", +paste_row_after_desc:"\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1 \u03BC\u03B5\u03C4\u03AC", +cut_row_desc:"\u0391\u03C0\u03BF\u03BA\u03BF\u03C0\u03AE \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +copy_row_desc:"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +del:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +row:"\u0393\u03C1\u03B1\u03BC\u03BC\u03AE", +col:"\u03A3\u03C4\u03AE\u03BB\u03B7", +cell:"\u039A\u03B5\u03BB\u03AF", +cellprops_delta_width:"60" +}, +autosave:{ +unload_msg:"\u039F\u03B9 \u03B1\u03BB\u03BB\u03B1\u03B3\u03AD\u03C2 \u03C0\u03BF\u03C5 \u03BA\u03AC\u03BD\u03B1\u03C4\u03B5 \u03B8\u03B1 \u03C7\u03B1\u03B8\u03BF\u03CD\u03BD \u03B1\u03BD \u03C6\u03CD\u03B3\u03B5\u03C4\u03B5 \u03C3\u03B5 \u03AC\u03BB\u03BB\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1." +}, +fullscreen:{ +desc:"\u0395\u03BD\u03B1\u03BB\u03BB\u03B1\u03B3\u03AE \u03C0\u03BB\u03AE\u03C1\u03BF\u03C5\u03C2 \u03BF\u03B8\u03CC\u03BD\u03B7\u03C2" +}, +media:{ +desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B5\u03BD\u03C3\u03C9\u03BC\u03B1\u03C4\u03C9\u03BC\u03AD\u03BD\u03C9\u03BD media", +edit:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B5\u03BD\u03C3\u03C9\u03BC\u03B1\u03C4\u03C9\u03BC\u03AD\u03BD\u03C9\u03BD media", +delta_width:"50" +}, +fullpage:{ +desc:"\u0399\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03B5\u03B3\u03B3\u03C1\u03AC\u03C6\u03BF\u03C5", +delta_width:"140" +}, +template:{ +desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03C0\u03B5\u03C1\u03B9\u03B5\u03C7\u03BF\u03BC\u03AD\u03BD\u03BF\u03C5 \u03B3\u03B9\u03B1 \u03C0\u03C1\u03BF\u03BA\u03B1\u03B8\u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03C1\u03CC\u03C4\u03C5\u03C0\u03BF" +}, +visualchars:{ +desc:"\u039F\u03C0\u03C4\u03B9\u03BA\u03BF\u03AF \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2 \u03B5\u03BB\u03AD\u03B3\u03C7\u03BF\u03C5 \u03BD\u03B1\u03B9/\u03CC\u03C7\u03B9." +}, +spellchecker:{ +desc:"\u0395\u03BD\u03B1\u03BB\u03BB\u03B1\u03B3\u03AE \u03BF\u03C1\u03B8\u03BF\u03B3\u03C1\u03B1\u03C6\u03B9\u03BA\u03BF\u03CD \u03B5\u03BB\u03AD\u03B3\u03C7\u03BF\u03C5", +menu:"\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u03BF\u03C1\u03B8\u03BF\u03B3\u03C1\u03B1\u03C6\u03B9\u03BA\u03BF\u03CD \u03B5\u03BB\u03AD\u03B3\u03C7\u03BF\u03C5", +ignore_word:"\u03A0\u03B1\u03C1\u03AC\u03B2\u03BB\u03B5\u03C8\u03B7 \u03BB\u03AD\u03BE\u03B7\u03C2", +ignore_words:"\u03A0\u03B1\u03C1\u03AC\u03B2\u03BB\u03B5\u03C8\u03B7 \u03CC\u03BB\u03C9\u03BD", +langs:"\u0393\u03BB\u03CE\u03C3\u03C3\u03B5\u03C2", +wait:"\u03A0\u03B1\u03C1\u03B1\u03BA\u03B1\u03BB\u03CE \u03C0\u03B5\u03C1\u03B9\u03BC\u03AD\u03BD\u03B5\u03C4\u03B5...", +sug:"\u03A0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2", +no_sug:"\u03A7\u03C9\u03C1\u03AF\u03C2 \u03C0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2", +no_mpell:"\u03A3\u03C9\u03C3\u03C4\u03AE \u03BF\u03C1\u03B8\u03BF\u03B3\u03C1\u03C6\u03AF\u03B1." +}, +pagebreak:{ +desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03B1\u03BB\u03BB\u03B1\u03B3\u03AE\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/en.js b/includes/tinymce/jscripts/tiny_mce/langs/en.js index 09c0041c..8519b4de 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/en.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/en.js @@ -1,38 +1,154 @@ -// UK lang variables - -tinyMCELang['lang_bold_desc'] = 'Bold'; -tinyMCELang['lang_italic_desc'] = 'Italic'; -tinyMCELang['lang_underline_desc'] = 'Underline'; -tinyMCELang['lang_striketrough_desc'] = 'Striketrough'; -tinyMCELang['lang_justifyleft_desc'] = 'Align left'; -tinyMCELang['lang_justifycenter_desc'] = 'Align center'; -tinyMCELang['lang_justifyright_desc'] = 'Align right'; -tinyMCELang['lang_justifyfull_desc'] = 'Align full'; -tinyMCELang['lang_bullist_desc'] = 'Unordered list'; -tinyMCELang['lang_numlist_desc'] = 'Ordered list'; -tinyMCELang['lang_outdent_desc'] = 'Outdent'; -tinyMCELang['lang_indent_desc'] = 'Indent'; -tinyMCELang['lang_undo_desc'] = 'Undo'; -tinyMCELang['lang_redo_desc'] = 'Redo'; -tinyMCELang['lang_link_desc'] = 'Insert/edit link'; -tinyMCELang['lang_unlink_desc'] = 'Unlink'; -tinyMCELang['lang_image_desc'] = 'Insert/edit image'; -tinyMCELang['lang_cleanup_desc'] = 'Cleanup messy code'; -tinyMCELang['lang_focus_alert'] = 'A editor instance must be focused before using this command.'; -tinyMCELang['lang_edit_confirm'] = 'Do you want to use the WYSIWYG mode for this textarea?'; -tinyMCELang['lang_insert_link_title'] = 'Insert/edit link'; -tinyMCELang['lang_insert'] = 'Insert'; -tinyMCELang['lang_update'] = 'Update'; -tinyMCELang['lang_cancel'] = 'Cancel'; -tinyMCELang['lang_insert_link_url'] = 'Link URL'; -tinyMCELang['lang_insert_link_target'] = 'Target'; -tinyMCELang['lang_insert_link_target_same'] = 'Open link in the same window'; -tinyMCELang['lang_insert_link_target_blank'] = 'Open link in a new window'; -tinyMCELang['lang_insert_image_title'] = 'Insert/edit image'; -tinyMCELang['lang_insert_image_src'] = 'Image URL'; -tinyMCELang['lang_insert_image_alt'] = 'Image description'; -tinyMCELang['lang_help_desc'] = 'Help'; -tinyMCELang['lang_bold_img'] = "bold.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({en:{ +common:{ +edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?", +apply:"Apply", +insert:"Insert", +update:"Update", +cancel:"Cancel", +close:"Close", +browse:"Browse", +class_name:"Class", +not_set:"-- Not set --", +clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?", +clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.", +popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.", +invalid_data:"Error: Invalid values entered, these are marked in red.", +more_colors:"More colors" +}, +contextmenu:{ +align:"Alignment", +left:"Left", +center:"Center", +right:"Right", +full:"Full" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"Insert date", +inserttime_desc:"Insert time", +months_long:"January,February,March,April,May,June,July,August,September,October,November,December", +months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", +day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", +day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun" +}, +print:{ +print_desc:"Print" +}, +preview:{ +preview_desc:"Preview" +}, +directionality:{ +ltr_desc:"Direction left to right", +rtl_desc:"Direction right to left" +}, +layer:{ +insertlayer_desc:"Insert new layer", +forward_desc:"Move forward", +backward_desc:"Move backward", +absolute_desc:"Toggle absolute positioning", +content:"New layer..." +}, +save:{ +save_desc:"Save", +cancel_desc:"Cancel all changes" +}, +nonbreaking:{ +nonbreaking_desc:"Insert non-breaking space character" +}, +iespell:{ +iespell_desc:"Run spell checking", +download:"ieSpell not detected. Do you want to install it now?" +}, +advhr:{ +advhr_desc:"Horizontal rule" +}, +emotions:{ +emotions_desc:"Emotions" +}, +searchreplace:{ +search_desc:"Find", +replace_desc:"Find/Replace" +}, +advimage:{ +image_desc:"Insert/edit image" +}, +advlink:{ +link_desc:"Insert/edit link" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"Abbreviation", +acronym_desc:"Acronym", +del_desc:"Deletion", +ins_desc:"Insertion", +attribs_desc:"Insert/Edit Attributes" +}, +style:{ +desc:"Edit CSS Style" +}, +paste:{ +paste_text_desc:"Paste as Plain Text", +paste_word_desc:"Paste from Word", +selectall_desc:"Select All" +}, +paste_dlg:{ +text_title:"Use CTRL+V on your keyboard to paste the text into the window.", +text_linebreaks:"Keep linebreaks", +word_title:"Use CTRL+V on your keyboard to paste the text into the window." +}, +table:{ +desc:"Inserts a new table", +row_before_desc:"Insert row before", +row_after_desc:"Insert row after", +delete_row_desc:"Delete row", +col_before_desc:"Insert column before", +col_after_desc:"Insert column after", +delete_col_desc:"Remove column", +split_cells_desc:"Split merged table cells", +merge_cells_desc:"Merge table cells", +row_desc:"Table row properties", +cell_desc:"Table cell properties", +props_desc:"Table properties", +paste_row_before_desc:"Paste table row before", +paste_row_after_desc:"Paste table row after", +cut_row_desc:"Cut table row", +copy_row_desc:"Copy table row", +del:"Delete table", +row:"Row", +col:"Column", +cell:"Cell" +}, +autosave:{ +unload_msg:"The changes you made will be lost if you navigate away from this page." +}, +fullscreen:{ +desc:"Toggle fullscreen mode" +}, +media:{ +desc:"Insert / edit embedded media", +edit:"Edit embedded media" +}, +fullpage:{ +desc:"Document properties" +}, +template:{ +desc:"Insert predefined template content" +}, +visualchars:{ +desc:"Visual control characters on/off." +}, +spellchecker:{ +desc:"Toggle spellchecker", +menu:"Spellchecker settings", +ignore_word:"Ignore word", +ignore_words:"Ignore all", +langs:"Languages", +wait:"Please wait...", +sug:"Suggestions", +no_sug:"No suggestions", +no_mpell:"No misspellings found." +}, +pagebreak:{ +desc:"Insert page break." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/es.js b/includes/tinymce/jscripts/tiny_mce/langs/es.js index 7f826803..6509cb97 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/es.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/es.js @@ -1,38 +1,154 @@ -// ES lang variables by Alvaro Velasco - -tinyMCELang['lang_bold_desc'] = 'Negrita'; -tinyMCELang['lang_italic_desc'] = 'Cursiva'; -tinyMCELang['lang_underline_desc'] = 'Subrayado'; -tinyMCELang['lang_striketrough_desc'] = 'Tachado'; -tinyMCELang['lang_justifyleft_desc'] = 'Alinear a la izquierda'; -tinyMCELang['lang_justifycenter_desc'] = 'Alinear al centro'; -tinyMCELang['lang_justifyright_desc'] = 'Alinear a la derecha'; -tinyMCELang['lang_justifyfull_desc'] = 'Alinear justificado'; -tinyMCELang['lang_bullist_desc'] = 'Lista sin ordenar'; -tinyMCELang['lang_numlist_desc'] = 'Lista ordenada'; -tinyMCELang['lang_outdent_desc'] = 'Disminuye sangria'; -tinyMCELang['lang_indent_desc'] = 'Aumentar sangria'; -tinyMCELang['lang_undo_desc'] = 'Deshacer'; -tinyMCELang['lang_redo_desc'] = 'Rehacer'; -tinyMCELang['lang_link_desc'] = 'Insertar enlace'; -tinyMCELang['lang_unlink_desc'] = 'Quitar enlace'; -tinyMCELang['lang_image_desc'] = 'Insertar imagen'; -tinyMCELang['lang_cleanup_desc'] = 'Limpiar codigo'; -tinyMCELang['lang_focus_alert'] = 'Una instanacia del editor debe ser enfocada antes de usar este comando.'; -tinyMCELang['lang_edit_confirm'] = 'Quieres usar el modo WYSIWYG para esta area de texto?'; -tinyMCELang['lang_insert_link_title'] = 'Insertar/editar enlace'; -tinyMCELang['lang_insert'] = 'Insertar'; -tinyMCELang['lang_update'] = 'Insertar'; -tinyMCELang['lang_cancel'] = 'Cancelar'; -tinyMCELang['lang_insert_link_url'] = 'Direccion del enlace'; -tinyMCELang['lang_insert_link_target'] = 'Destino'; -tinyMCELang['lang_insert_link_target_same'] = 'Abrir enlace en la misma ventana'; -tinyMCELang['lang_insert_link_target_blank'] = 'Abrir enlace en una ventana nueva'; -tinyMCELang['lang_insert_image_title'] = 'Insertar/editar imagen'; -tinyMCELang['lang_insert_image_src'] = 'URL de la imagen'; -tinyMCELang['lang_insert_image_alt'] = 'Descripcion de la imagen'; -tinyMCELang['lang_help_desc'] = 'Ayuda'; -tinyMCELang['lang_bold_img'] = "bold.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({es:{ +common:{ +edit_confirm:" \u00BFDesea utilizar el modo WYSIWYG para esta caja de texto?", +apply:"Aplicar", +insert:"Insertar", +update:"Actualizar", +cancel:"Cancelar", +close:"Cerrar", +browse:"Examinar", +class_name:"Clase", +not_set:"-- Ninguno --", +clipboard_msg:"Copiar/Cortar/Pegar no se encuentra disponible en Mozilla y Firefox.\n \u00BFDesea obtener m\u00E1s informaci\u00F3n acerca de este tema?", +clipboard_no_support:"Su navegador no soporta las funciones de cortapapeles, use los accesos por teclado.", +popup_blocked:"Lo sentimos, su bloqueo de ventanas emergentes ha deshabilitado una ventana que provee funcionalidades a la aplicaci\u00F3n. Necesita deshabilitar este bloqueo en este sitio para poder utilizar todas las funciones.", +invalid_data:"Error: Introdujo un valor no v\u00E1lido, est\u00E1n marcados en rojo.", +more_colors:"M\u00E1s colores" +}, +contextmenu:{ +align:"Alineaci\u00F3n", +left:"Izquierda", +center:"Centrado", +right:"Derecha", +full:"Justificado" +}, +insertdatetime:{ +date_fmt:"%d-%m-%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Insertar fecha", +inserttime_desc:"Insertar hora", +months_long:"Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre", +months_short:"Ene,Feb,Mar,Abr,May,Jun,Jul,Ago,Sep,Oct,Nov,Dic", +day_long:"Domingo,Lunes,Martes,Mi\u00E9rcoles,Jueves,Viernes,S\u00E1bado,Domingo", +day_short:"Dom,Lun,Mar,Mie,Jue,Vie,Sab,Dom" +}, +print:{ +print_desc:"Imprimir" +}, +preview:{ +preview_desc:"Vista previa" +}, +directionality:{ +ltr_desc:"Direcci\u00F3n izquierda a derecha", +rtl_desc:"Direcci\u00F3n derecha a izquierda" +}, +layer:{ +insertlayer_desc:"Insertar nueva capa", +forward_desc:"Avanzar", +backward_desc:"Retroceder", +absolute_desc:"Cambiar a posici\u00F3n absoluta", +content:"Nueva capa..." +}, +save:{ +save_desc:"Guardar", +cancel_desc:"Cancelar todos los cambios" +}, +nonbreaking:{ +nonbreaking_desc:"Insertar caracter de espacio 'non-breaking'" +}, +iespell:{ +iespell_desc:"Corrector ortogr\u00E1fico", +download:"No se detect\u00F3 'ieSpell'. \u00BFDesea instalarlo ahora?" +}, +advhr:{ +advhr_desc:"Regla horizontal" +}, +emotions:{ +emotions_desc:"Emoticones" +}, +searchreplace:{ +search_desc:"Buscar", +replace_desc:"Buscar/Reemplazar" +}, +advimage:{ +image_desc:"Insertar/editar imagen" +}, +advlink:{ +link_desc:"Insertar/editar hiperv\u00EDnculo" +}, +xhtmlxtras:{ +cite_desc:"Cita", +abbr_desc:"Abreviatura", +acronym_desc:"Acr\u00F3nimo", +del_desc:"Borrado", +ins_desc:"Inserci\u00F3n", +attribs_desc:"Insertar/Editar atributos" +}, +style:{ +desc:"Editar Estilo CSS" +}, +paste:{ +paste_text_desc:"Pegar como texto plano", +paste_word_desc:"Pegar desde Word", +selectall_desc:"Seleccionar todo" +}, +paste_dlg:{ +text_title:"Use CTRL+V en su teclado para pegar el texto en la ventana.", +text_linebreaks:"Keep linebreaks", +word_title:"Use CTRL+V en su teclado para pegar el texto en la ventana." +}, +table:{ +desc:"Inserta una nueva tabla", +row_before_desc:"Insertar fila (antes)", +row_after_desc:"Insertar fila (despu\u00E9s)", +delete_row_desc:"Suprimir fila", +col_before_desc:"Insertar columna (antes)", +col_after_desc:"Insertar columna (despu\u00E9s)", +delete_col_desc:"Suprimir columna", +split_cells_desc:"Dividir celdas", +merge_cells_desc:"Vincular celdas", +row_desc:"Propiedades de la fila", +cell_desc:"Propiedades de la celda", +props_desc:"Propiedades de la tabla", +paste_row_before_desc:"Pegar filas (antes)", +paste_row_after_desc:"Pegar filas (despu\u00E9s)", +cut_row_desc:"Cortar fila", +copy_row_desc:"Copiar fila", +del:"Eliminar tabla", +row:"Fila", +col:"Columna", +cell:"Celda" +}, +autosave:{ +unload_msg:"Los cambios realizados se perder\u00E1n si sale de esta p\u00E1gina." +}, +fullscreen:{ +desc:"Cambiar a modo Pantalla Completa" +}, +media:{ +desc:"Insertar/editar medio embebido", +edit:"Editar medio embebido" +}, +fullpage:{ +desc:"Propiedades del documento" +}, +template:{ +desc:"Insertar contenido de plantilla predefinida" +}, +visualchars:{ +desc:"Caracteres de control ON/OFF." +}, +spellchecker:{ +desc:"Cambiar a corrector ortogr\u00E1fico", +menu:"Configuraci\u00F3n de corrector ortogr\u00E1fico", +ignore_word:"Ignorar", +ignore_words:"Ignorar todo", +langs:"Idiomas", +wait:"Espere...", +sug:"Sugerencias", +no_sug:"Sin sugerencias", +no_mpell:"No se encontraron errores." +}, +pagebreak:{ +desc:"Insertar fin de p\u00E1gina" +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/et.js b/includes/tinymce/jscripts/tiny_mce/langs/et.js new file mode 100644 index 00000000..0fd6e98f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/et.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({et:{ +common:{ +edit_confirm:"Kas soovite kasutada WYSIWYG re\u017Eiimi sellel tekstialal?", +apply:"Rakenda", +insert:"Sisesta", +update:"Uuenda", +cancel:"T\u00FChista", +close:"Sule", +browse:"Sirvi", +class_name:"Klass", +not_set:"-- Seadmata --", +clipboard_msg:"Kopeeri/L\u00F5ika/Kleebi ei ole saadaval Mozillas ja Firefoxis.\nKas soovite rohkem infot selle probleemi kohta?", +clipboard_no_support:"Hetkel ei ole toetatud Teie lehitseja poolt, kasutage klaviatuuri otseteid selle asemel.", +popup_blocked:"Vabandust, aga Teie h\u00FCpikakna t\u00F5kestaja on blokeerinud akna, mis varustab rakenduse funktsionaalsust. Palun lubage h\u00FCpikaknad sellel kodulehel, et t\u00E4ielikult kasutada seda vahendit.", +invalid_data:"Viga: Kehtetud v\u00E4\u00E4rtused sisestatud, need on m\u00E4rgitud punasega.", +more_colors:"Rohkem v\u00E4rve" +}, +contextmenu:{ +align:"Joondus", +left:"Vasak", +center:"Kesk", +right:"Parem", +full:"T\u00E4is" +}, +insertdatetime:{ +date_fmt:"%A-%k-%p", +time_fmt:"%T:%M:%S", +insertdate_desc:"Sisesta kuup\u00E4ev", +inserttime_desc:"Sisesta aeg", +months_long:"Jaanuar,Veebruar,M\u00E4rts,Aprill,Mai,Juuni,Juuli,August,September,Oktoober,November,Detsember", +months_short:"Jaan,Veeb,M\u00E4rts,Apr,Mai,Juuni,Juuli,Aug,Sept,Okt,Nov,Dets", +day_long:"P\u00FChap\u00E4ev,Esmasp\u00E4ev,Teisip\u00E4ev,Kolmap\u00E4ev,Neljap\u00E4ev,Reede,Laup\u00E4ev,P\u00FChap\u00E4ev", +day_short:"P,E,T,K,N,R,L,P" +}, +print:{ +print_desc:"Print" +}, +preview:{ +preview_desc:"Eelvaade" +}, +directionality:{ +ltr_desc:"Suund vasakult paremale", +rtl_desc:"Suund paremalt vasakule" +}, +layer:{ +insertlayer_desc:"Sisesta uus kiht", +forward_desc:"Liiguta edasi", +backward_desc:"Liiguta tagasi", +absolute_desc:"L\u00FClita \u00FCmber absoluutne positsioneerimine", +content:"Uus kiht..." +}, +save:{ +save_desc:"Salvesta", +cancel_desc:"T\u00FChista k\u00F5ik muudatused" +}, +nonbreaking:{ +nonbreaking_desc:"Sisesta mittekatkestav t\u00FChik" +}, +iespell:{ +iespell_desc:"\u00D5igekirja kontroll", +download:"ie\u00D5igekiri tuvastamata. Kas soovite paigaldada n\u00FC\u00FCd?" +}, +advhr:{ +advhr_desc:"Horisontaalne joonlaud" +}, +emotions:{ +emotions_desc:"Emotsioonid" +}, +searchreplace:{ +search_desc:"Otsi", +replace_desc:"Otsi/Asenda" +}, +advimage:{ +image_desc:"Sisesta/redigeeri pilt" +}, +advlink:{ +link_desc:"Sisesta/redigeeri link" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"Abbreviation", +acronym_desc:"Acronym", +del_desc:"Deletion", +ins_desc:"Insertion", +attribs_desc:"Insert/Edit Attributes" +}, +style:{ +desc:"Redigeeri CSS stiili" +}, +paste:{ +paste_text_desc:"Kleebi tavalise tekstina", +paste_word_desc:"Kleebi Wordist", +selectall_desc:"Vali k\u00F5ik" +}, +paste_dlg:{ +text_title:"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks.", +text_linebreaks:"J\u00E4ta reavahetused", +word_title:"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks." +}, +table:{ +desc:"Sisestab uue tabeli", +row_before_desc:"Sisesta rida ette", +row_after_desc:"Sisesta rida j\u00E4rgi", +delete_row_desc:"Kustuta rida", +col_before_desc:"Sisesta veerg ette", +col_after_desc:"Sisesta veerg j\u00E4rgi", +delete_col_desc:"Kustuta veerg", +split_cells_desc:"Eralda \u00FChendatud tabeli lahtrid", +merge_cells_desc:"\u00DChenda tabeli lahtrid", +row_desc:"Tabeli rea omadused", +cell_desc:"Tabeli lahtri omadused", +props_desc:"Tabeli omadused", +paste_row_before_desc:"Kleebi tabeli rida ette", +paste_row_after_desc:"Kleebi tabeli rida j\u00E4rgi", +cut_row_desc:"L\u00F5ika tabeli rida", +copy_row_desc:"Kopeeri tabeli rida", +del:"Kustuta tabel", +row:"Rida", +col:"Veerg", +cell:"Lahter" +}, +autosave:{ +unload_msg:"Tehtud muudatused kaovad, kui lahkute siit lehelt." +}, +fullscreen:{ +desc:"L\u00FClita \u00FCmber t\u00E4isekraani re\u017Eiim" +}, +media:{ +desc:"Sisesta / redigeeri manustatud meedia", +edit:"Redigeeri manustatud meedia" +}, +fullpage:{ +desc:"Dokumendi omadused" +}, +template:{ +desc:"Sisesta eeldefineeritud \u0161ablooni sisu" +}, +visualchars:{ +desc:"Visuaalsed kontrollt\u00E4hem\u00E4rgid sisse/v\u00E4lja" +}, +spellchecker:{ +desc:"L\u00FClita \u00FCmber \u00F5igekirja kontroll", +menu:"\u00D5igekirja kontrolli seaded", +ignore_word:"J\u00E4ta s\u00F5na vahele", +ignore_words:"J\u00E4ra k\u00F5ik vahele", +langs:"Keeled", +wait:"Palun oota...", +sug:"Soovitused", +no_sug:"Soovitusi pole", +no_mpell:"Valesti kirjutamisi ei leitud." +}, +pagebreak:{ +desc:"Sisesta lehevahetus." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/langs/fa.js index 445830e0..15315c5c 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/fa.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/fa.js @@ -1,43 +1,154 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_bold_desc'] = 'ضخيم'; -tinyMCELang['lang_italic_desc'] = 'کجکي'; -tinyMCELang['lang_underline_desc'] = 'زير خط دار'; -tinyMCELang['lang_striketrough_desc'] = 'خط خورده'; -tinyMCELang['lang_justifyleft_desc'] = 'Ú†Ù¾ چين'; -tinyMCELang['lang_justifycenter_desc'] = 'وسط چين'; -tinyMCELang['lang_justifyright_desc'] = 'راست چين'; -tinyMCELang['lang_justifyfull_desc'] = 'کشيده چين'; -tinyMCELang['lang_bullist_desc'] = 'ليست'; -tinyMCELang['lang_numlist_desc'] = 'ليست عددي'; -tinyMCELang['lang_outdent_desc'] = 'کاهش زبانه'; -tinyMCELang['lang_indent_desc'] = 'اÙزايش زبانه'; -tinyMCELang['lang_undo_desc'] = 'برگردونک'; -tinyMCELang['lang_redo_desc'] = 'سرگردونک'; -tinyMCELang['lang_link_desc'] = 'درج Ùˆ ويرايش لينک'; -tinyMCELang['lang_unlink_desc'] = 'حذ٠لينک'; -tinyMCELang['lang_image_desc'] = 'درج Ùˆ ويرايش عکس'; -tinyMCELang['lang_cleanup_desc'] = 'پاکسازي کد'; -tinyMCELang['lang_focus_alert'] = 'A editor instance must be focused before using this command.'; -tinyMCELang['lang_edit_confirm'] = 'Do you want to use the WYSIWYG mode for this textarea?'; -tinyMCELang['lang_insert_link_title'] = 'درج Ùˆ ويرايش لينک'; -tinyMCELang['lang_insert'] = ' تاييد '; -tinyMCELang['lang_update'] = ' تاييد '; -tinyMCELang['lang_cancel'] = ' انصرا٠'; -tinyMCELang['lang_insert_link_url'] = 'URL لينک'; -tinyMCELang['lang_insert_link_target'] = 'مقصد'; -tinyMCELang['lang_insert_link_target_same'] = 'لينک را در همان صÙحه باز Ú©Ù†'; -tinyMCELang['lang_insert_link_target_blank'] = 'لينک را در صÙحه جديد باز Ú©Ù†'; -tinyMCELang['lang_insert_image_title'] = 'درج Ùˆ ويرايش عکس'; -tinyMCELang['lang_insert_image_src'] = 'URL عکس'; -tinyMCELang['lang_insert_image_alt'] = 'توضيح'; -tinyMCELang['lang_help_desc'] = 'راهنما'; -tinyMCELang['lang_bold_img'] = "bold.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({fa:{ +common:{ +edit_confirm:"\u0622\u06CC\u0627 \u0634\u0645\u0627 \u0645\u0627\u06CC\u0644\u06CC\u062F \u062A\u0627 \u0627\u0632 \u062D\u0627\u0644\u062A \u0648\u06CC\u0631\u0627\u06CC\u0634\u06AF\u0631 WYSIWYG \u0628\u0631\u0627\u06CC \u0627\u06CC\u0646 \u0646\u0627\u062D\u06CC\u0647 \u0645\u062A\u0646\u06CC \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F\u061F", +apply:"\u0628\u0643\u0627\u0631\u06AF\u06CC\u0631\u06CC", +insert:"\u062F\u0631\u062C", +update:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC", +cancel:"\u0627\u0646\u0635\u0631\u0627\u0641", +close:"\u0628\u0633\u062A\u0646", +browse:"\u0645\u0631\u0648\u0631", +class_name:"\u0643\u0644\u0627\u0633", +not_set:"-- \u062A\u0646\u0638\u06CC\u0645 \u0646\u0634\u062F\u0647 --", +clipboard_msg:"\u0643\u067E\u06CC/\u0628\u0631\u0634 (Cut)/\u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste) \u062F\u0631 Mozilla \u0648 Firefox \u0642\u0627\u0628\u0644 \u062F\u0633\u062A\u0631\u0633 \u0646\u0645\u06CC \u0628\u0627\u0634\u062F.\n\u0622\u06CC\u0627 \u0634\u0645\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062A \u0628\u06CC\u0634\u062A\u0631\u06CC \u062F\u0631\u0628\u0627\u0631\u0647 \u0627\u06CC\u0646 \u0645\u0648\u0636\u0648\u0639 \u0645\u06CC \u062E\u0648\u0627\u0647\u06CC\u062F\u061F", +clipboard_no_support:"\u062F\u0631 \u062D\u0627\u0644 \u062D\u0627\u0636\u0631 \u062A\u0648\u0633\u0637 \u0645\u0631\u0648\u0631\u06AF\u0631 \u0634\u0645\u0627 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0646\u0645\u06CC \u0634\u0648\u062F \u060C \u0628\u0647 \u062C\u0627\u06CC \u0622\u0646 \u0627\u0632 \u0645\u06CC\u0627\u0646\u0628\u0631\u0647\u0627\u06CC (Shortcut) \u0635\u0641\u062D\u0647 \u0643\u0644\u06CC\u062F \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F.", +popup_blocked:"\u0628\u0627 \u0639\u0631\u0636 \u067E\u0648\u0632\u0634 \u060C \u0645\u0627 \u0627\u0637\u0644\u0627\u0639 \u062F\u0627\u062F\u0647 \u0628\u0648\u062F\u06CC\u0645 \u0643\u0647 \u0645\u062F\u0627\u0641\u0639 \u067E\u0646\u062C\u0631\u0647 \u0628\u0627\u0632 \u0634\u0648\u06CC (Popup) \u0634\u0645\u0627 \u060C \u067E\u0646\u062C\u0631\u0647 \u0627\u06CC \u0631\u0627 \u0643\u0647 \u0642\u0627\u0628\u0644\u06CC\u062A \u0628\u0631\u0646\u0627\u0645\u0647 \u0643\u0627\u0631\u0628\u0631\u062F\u06CC \u0631\u0627 \u0627\u0631\u0627\u0626\u0647 \u0645\u06CC \u0643\u0631\u062F \u060C \u063A\u06CC\u0631 \u0641\u0639\u0627\u0644 \u0643\u0631\u062F\u0647 \u0627\u0633\u062A. \u0634\u0645\u0627 \u0646\u06CC\u0627\u0632 \u0628\u0647 \u063A\u06CC\u0631 \u0641\u0639\u0627\u0644 \u0643\u0631\u062F\u0646 \u0645\u062F\u0627\u0641\u0639 \u067E\u0646\u062C\u0631\u0647 \u0628\u0627\u0632 \u0634\u0648 (Popup) \u062F\u0631 \u0627\u06CC\u0646 \u0633\u0627\u06CC\u062A \u0631\u0627 \u062F\u0627\u0631\u06CC\u062F \u062A\u0627 \u0627\u0632 \u0627\u06CC\u0646 \u0627\u0628\u0632\u0627\u0631 \u0628\u0647 \u0635\u0648\u0631\u062A \u0643\u0627\u0645\u0644 \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F.", +invalid_data:"\u062E\u0637\u0627: \u0645\u0642\u0627\u062F\u06CC\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0648\u0627\u0631\u062F \u0634\u062F \u060C \u0622\u0646\u0647\u0627 \u0628\u0647 \u0631\u0646\u06AF \u0642\u0631\u0645\u0632 \u0639\u0644\u0627\u0645\u062A \u062E\u0648\u0631\u062F\u0647 \u0627\u0646\u062F.", +more_colors:"\u0631\u0646\u06AF \u0647\u0627\u06CC \u0628\u06CC\u0634\u062A\u0631" +}, +contextmenu:{ +align:"\u062A\u0631\u0627\u0632", +left:"\u0686\u067E", +center:"\u0648\u0633\u0637", +right:"\u0631\u0627\u0633\u062A", +full:"\u0643\u0627\u0645\u0644" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u062F\u0631\u062C \u062A\u0627\u0631\u06CC\u062E", +inserttime_desc:"\u062F\u0631\u062C \u0632\u0645\u0627\u0646", +months_long:"\u0698\u0627\u0646\u0648\u06CC\u0647,\u0641\u0648\u0631\u06CC\u0647,\u0645\u0627\u0631\u0633,\u0622\u0648\u0631\u06CC\u0644,\u0645\u0647,\u0698\u0648\u0626\u0646,\u0698\u0648\u0626\u06CC\u0647,\u0627\u0648\u062A,\u0633\u067E\u062A\u0627\u0645\u0628\u0631,\u0627\u0643\u062A\u0628\u0631,\u0646\u0648\u0627\u0645\u0628\u0631,\u062F\u0633\u0627\u0645\u0628\u0631", +months_short:"\u0698\u0627\u0646\u0648\u06CC\u0647,\u0641\u0648\u0631\u06CC\u0647,\u0645\u0627\u0631\u0633,\u0622\u0648\u0631\u06CC\u0644,\u0645\u0647,\u0698\u0648\u0626\u0646,\u0698\u0648\u0626\u06CC\u0647,\u0627\u0648\u062A,\u0633\u067E\u062A\u0627\u0645\u0628\u0631,\u0627\u0643\u062A\u0628\u0631,\u0646\u0648\u0627\u0645\u0628\u0631,\u062F\u0633\u0627\u0645\u0628\u0631", +day_long:"\u06CC\u0643\u0634\u0646\u0628\u0647,\u062F\u0648\u0634\u0646\u0628\u0647,\u0633\u0647 \u0634\u0646\u0628\u0647,\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647,\u067E\u0646\u062C \u0634\u0646\u0628\u0647,\u062C\u0645\u0639\u0647,\u0634\u0646\u0628\u0647,\u06CC\u0643\u0634\u0646\u0628\u0647", +day_short:"\u06CC\u0643\u0634\u0646\u0628\u0647,\u062F\u0648\u0634\u0646\u0628\u0647,\u0633\u0647 \u0634\u0646\u0628\u0647,\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647,\u067E\u0646\u062C \u0634\u0646\u0628\u0647,\u062C\u0645\u0639\u0647,\u0634\u0646\u0628\u0647,\u06CC\u0643\u0634\u0646\u0628\u0647" +}, +print:{ +print_desc:"\u0686\u0627\u067E" +}, +preview:{ +preview_desc:"\u067E\u06CC\u0634 \u0646\u0645\u0627\u06CC\u0634" +}, +directionality:{ +ltr_desc:"\u062C\u0647\u062A \u0686\u067E \u0628\u0647 \u0631\u0627\u0633\u062A", +rtl_desc:"\u062C\u0647\u062A \u0631\u0627\u0633\u062A \u0628\u0647 \u0686\u067E" +}, +layer:{ +insertlayer_desc:"\u062F\u0631\u062C \u0644\u0627\u06CC\u0647 \u062C\u062F\u06CC\u062F", +forward_desc:"\u0627\u0646\u062A\u0642\u0627\u0644 \u0628\u0647 \u062C\u0644\u0648", +backward_desc:"\u0627\u0646\u062A\u0642\u0627\u0644 \u0628\u0647 \u067E\u0634\u062A", +absolute_desc:"\u062A\u0639\u0648\u06CC\u0636 \u0645\u0648\u0642\u0639\u06CC\u062A \u0645\u0637\u0644\u0642", +content:"\u0644\u0627\u06CC\u0647 \u062C\u062F\u06CC\u062F..." +}, +save:{ +save_desc:"\u0630\u062E\u06CC\u0631\u0647", +cancel_desc:"\u0644\u063A\u0648 \u062A\u0645\u0627\u0645\u06CC \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A" +}, +nonbreaking:{ +nonbreaking_desc:"\u062F\u0631\u062C \u0643\u0627\u0631\u0627\u0643\u062A\u0631 \u0641\u0627\u0635\u0644\u0647 \u0628\u062F\u0648\u0646 \u0642\u0637\u0639 \u0634\u062F\u06AF\u06CC" +}, +iespell:{ +iespell_desc:"\u0627\u062C\u0631\u0627\u06CC \u0628\u0631\u0631\u0633\u06CC \u0627\u0645\u0644\u0627\u0621", +download:"ieSpell \u062A\u0634\u062E\u06CC\u0635 \u062F\u0627\u062F\u0647 \u0646\u0634\u062F. \u0622\u06CC\u0627 \u0634\u0645\u0627 \u0645\u0627\u06CC\u0644 \u0628\u0647 \u0646\u0635\u0628 \u0622\u0646 \u0647\u0633\u062A\u06CC\u062F\u061F" +}, +advhr:{ +advhr_desc:"\u062E\u0637 \u0627\u0641\u0642\u06CC" +}, +emotions:{ +emotions_desc:"\u0634\u0643\u0644\u0643" +}, +searchreplace:{ +search_desc:"\u062C\u0633\u062A\u062C\u0648", +replace_desc:"\u062C\u0633\u062A\u062C\u0648/\u062A\u0639\u0648\u06CC\u0636" +}, +advimage:{ +image_desc:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u062A\u0635\u0648\u06CC\u0631" +}, +advlink:{ +link_desc:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0644\u06CC\u0646\u0643" +}, +xhtmlxtras:{ +cite_desc:"\u0646\u0642\u0644 \u0642\u0648\u0644", +abbr_desc:"\u0627\u062E\u062A\u0635\u0627\u0631", +acronym_desc:"\u0645\u062E\u0641\u0641", +del_desc:"\u062D\u0630\u0641", +ins_desc:"\u062F\u0631\u062C", +attribs_desc:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0635\u0641\u0627\u062A" +}, +style:{ +desc:"\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0627\u0633\u062A\u06CC\u0644 CSS" +}, +paste:{ +paste_text_desc:"\u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste) \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062A\u0646 \u0633\u0627\u062F\u0647", +paste_word_desc:"\u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste) \u0627\u0632 Word", +selectall_desc:"\u0627\u0646\u062A\u062E\u0627\u0628 \u0647\u0645\u0647" +}, +paste_dlg:{ +text_title:"\u062C\u0647\u062A \u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste) \u0643\u0631\u062F\u0646 \u0645\u062A\u0646 \u062F\u0631 \u067E\u0646\u062C\u0631\u0647 \u0627\u0632 CTRL+V \u0628\u0631 \u0631\u0648\u06CC \u0635\u0641\u062D\u0647 \u0643\u0644\u06CC\u062F \u062E\u0648\u062F \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F.", +text_linebreaks:"\u062D\u0641\u0638 \u0642\u0637\u0639 \u062E\u0637\u0648\u0637", +word_title:"\u062C\u0647\u062A \u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste) \u0643\u0631\u062F\u0646 \u0645\u062A\u0646 \u062F\u0631 \u067E\u0646\u062C\u0631\u0647 \u0627\u0632 CTRL+V \u0628\u0631 \u0631\u0648\u06CC \u0635\u0641\u062D\u0647 \u0643\u0644\u06CC\u062F \u062E\u0648\u062F \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F." +}, +table:{ +desc:"\u06CC\u0643 \u062C\u062F\u0648\u0644 \u062C\u062F\u06CC\u062F \u062F\u0631\u062C \u0645\u06CC \u0643\u0646\u062F", +row_before_desc:"\u062F\u0631\u062C \u0633\u0637\u0631 \u062F\u0631 \u0642\u0628\u0644", +row_after_desc:"\u062F\u0631\u062C \u0633\u0637\u0631 \u062F\u0631 \u0628\u0639\u062F", +delete_row_desc:"\u062D\u0630\u0641 \u0633\u0637\u0631", +col_before_desc:"\u062F\u0631\u062C \u0633\u062A\u0648\u0646 \u062F\u0631 \u0642\u0628\u0644", +col_after_desc:"\u062F\u0631\u062C \u0633\u062A\u0648\u0646 \u062F\u0631 \u0628\u0639\u062F", +delete_col_desc:"\u062D\u0630\u0641 \u0633\u062A\u0648\u0646", +split_cells_desc:"\u062A\u0642\u0633\u06CC\u0645 \u0633\u0644\u0648\u0644 \u0647\u0627\u06CC \u062C\u062F\u0648\u0644 \u0627\u062F\u063A\u0627\u0645 \u0634\u062F\u0647", +merge_cells_desc:"\u0627\u062F\u063A\u0627\u0645 \u0633\u0644\u0648\u0644 \u0647\u0627\u06CC \u062C\u062F\u0648\u0644", +row_desc:"\u0645\u0634\u062E\u0635\u0627\u062A \u0633\u0637\u0631 \u062C\u062F\u0648\u0644", +cell_desc:"\u0645\u0634\u062E\u0635\u0627\u062A \u0633\u0644\u0648\u0644 \u062C\u062F\u0648\u0644", +props_desc:"\u0645\u0634\u062E\u0635\u0627\u062A \u062C\u062F\u0648\u0644", +paste_row_before_desc:"\u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste) \u0633\u0637\u0631 \u062C\u062F\u0648\u0644 \u062F\u0631 \u0642\u0628\u0644", +paste_row_after_desc:"\u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste) \u0633\u0637\u0631 \u062C\u062F\u0648\u0644 \u062F\u0631 \u0628\u0639\u062F", +cut_row_desc:"\u0628\u0631\u0634 (Cut) \u0633\u0637\u0631 \u062C\u062F\u0648\u0644", +copy_row_desc:"\u0643\u067E\u06CC \u0633\u0637\u0631 \u062C\u062F\u0648\u0644", +del:"\u062D\u0630\u0641 \u062C\u062F\u0648\u0644", +row:"\u0633\u0637\u0631", +col:"\u0633\u062A\u0648\u0646", +cell:"\u0633\u0644\u0648\u0644" +}, +autosave:{ +unload_msg:"\u062F\u0631 \u0635\u0648\u0631\u062A\u06CC \u0643\u0647 \u0634\u0645\u0627 \u0627\u0632 \u0627\u06CC\u0646 \u0635\u0641\u062D\u0647 \u0628\u0647 \u062C\u0627\u06CC \u062F\u06CC\u06AF\u0631\u06CC \u0646\u0627\u0648\u0628\u0631\u06CC (Navigate) \u0643\u0646\u06CC\u062F \u060C \u062A\u063A\u06CC\u06CC\u0631\u0627\u062A\u06CC \u0643\u0647 \u0627\u06CC\u062C\u0627\u062F \u0646\u0645\u0648\u062F\u0647 \u0627\u06CC\u062F \u0627\u0632 \u062F\u0633\u062A \u062E\u0648\u0627\u0647\u062F \u0631\u0641\u062A." +}, +fullscreen:{ +desc:"\u062A\u0639\u0648\u06CC\u0636 \u0628\u0647 \u062D\u0627\u0644\u062A \u0635\u0641\u062D\u0647 \u0643\u0627\u0645\u0644" +}, +media:{ +desc:"\u062F\u0631\u062C / \u0648\u06CC\u0631\u0627\u06CC\u0634 \u0631\u0633\u0627\u0646\u0647 \u062C\u0627\u0633\u0627\u0632\u06CC \u0634\u062F\u0647 (Embeded Media)", +edit:"\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0631\u0633\u0627\u0646\u0647 \u062C\u0627\u0633\u0627\u0632\u06CC \u0634\u062F\u0647 (Embeded Media)" +}, +fullpage:{ +desc:"\u0645\u0634\u062E\u0635\u0627\u062A \u0633\u0646\u062F" +}, +template:{ +desc:"\u062F\u0631\u062C \u0645\u062D\u062A\u0648\u0627\u06CC \u0642\u0627\u0644\u0628 \u0627\u0632 \u067E\u06CC\u0634 \u062A\u0639\u0631\u06CC\u0641 \u0634\u062F\u0647" +}, +visualchars:{ +desc:"\u0631\u0648\u0634\u0646/\u062E\u0627\u0645\u0648\u0634 \u0643\u0631\u062F\u0646 \u0643\u0627\u0631\u0627\u0643\u062A\u0631 \u0647\u0627\u06CC \u0643\u0646\u062A\u0631\u0644 \u0628\u0635\u0631\u06CC (Visual)." +}, +spellchecker:{ +desc:"\u062A\u0639\u0648\u06CC\u0636 \u0628\u0631\u0631\u0633\u06CC \u0643\u0646\u0646\u062F\u0647 \u0627\u0645\u0644\u0627\u0621", +menu:"\u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u0628\u0631\u0631\u0633\u06CC \u0643\u0646\u0646\u062F\u0647 \u0627\u0645\u0644\u0627\u0621", +ignore_word:"\u0686\u0634\u0645 \u067E\u0648\u0634\u06CC \u0627\u0632 \u0643\u0644\u0645\u0647", +ignore_words:"\u0686\u0634\u0645 \u067E\u0648\u0634\u06CC \u0627\u0632 \u0647\u0645\u0647", +langs:"\u0632\u0628\u0627\u0646 \u0647\u0627", +wait:"\u0644\u0637\u0641\u0627 \u0645\u0646\u062A\u0638\u0631 \u0628\u0645\u0627\u0646\u06CC\u062F...", +sug:"\u067E\u06CC\u0634\u0646\u0647\u0627\u062F\u0627\u062A", +no_sug:"\u0628\u062F\u0648\u0646 \u067E\u06CC\u0634\u0646\u0647\u0627\u062F", +no_mpell:"\u0647\u06CC\u0686 \u062E\u0637\u0627\u06CC \u0627\u0645\u0644\u0627\u0626\u06CC \u06CC\u0627\u0641\u062A\u0647 \u0646\u0634\u062F." +}, +pagebreak:{ +desc:"\u062F\u0631\u062C \u0642\u0637\u0639 \u0635\u0641\u062D\u0647." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/fi.js b/includes/tinymce/jscripts/tiny_mce/langs/fi.js index 6491ac7a..6badee5e 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/fi.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/fi.js @@ -1,38 +1,155 @@ -// FI lang variables by Urho Konttori from Absolutions - -tinyMCELang['lang_bold_desc'] = 'Lihavoi'; -tinyMCELang['lang_italic_desc'] = 'Kursivoi'; -tinyMCELang['lang_underline_desc'] = 'Alleviivaa'; -tinyMCELang['lang_striketrough_desc'] = 'Yliviivaa'; -tinyMCELang['lang_justifyleft_desc'] = 'Vasen tasaus'; -tinyMCELang['lang_justifycenter_desc'] = 'Keskitys'; -tinyMCELang['lang_justifyright_desc'] = 'Oikea tasaus'; -tinyMCELang['lang_justifyfull_desc'] = 'Pakotettu tasaus'; -tinyMCELang['lang_bullist_desc'] = 'Numeroimaton lista'; -tinyMCELang['lang_numlist_desc'] = 'Numeroitu lista'; -tinyMCELang['lang_outdent_desc'] = 'Poista sisennyt'; -tinyMCELang['lang_indent_desc'] = 'Sisennys'; -tinyMCELang['lang_undo_desc'] = 'Peruuta'; -tinyMCELang['lang_redo_desc'] = 'Suorita uudelleen'; -tinyMCELang['lang_link_desc'] = 'Lisää linkki'; -tinyMCELang['lang_unlink_desc'] = 'Poista linkki'; -tinyMCELang['lang_image_desc'] = 'Lisää kuva'; -tinyMCELang['lang_cleanup_desc'] = 'Siisti koodi'; -tinyMCELang['lang_focus_alert'] = 'Teksinkäsittelyalueella täytyy olla fokus ennen tämän komennon suorittamista.'; -tinyMCELang['lang_edit_confirm'] = 'Haluatko käyttää WYSIWYG moodia tähän tekstialueeseen?'; -tinyMCELang['lang_insert_link_title'] = 'Lisää/muokkaa linkkiä'; -tinyMCELang['lang_insert'] = 'Lisää'; -tinyMCELang['lang_update'] = 'Lisää'; -tinyMCELang['lang_cancel'] = 'Peruuta'; -tinyMCELang['lang_insert_link_url'] = 'Linkin URL'; -tinyMCELang['lang_insert_link_target'] = 'Kohde'; -tinyMCELang['lang_insert_link_target_same'] = 'Avaa linkki samassa ikkunassa'; -tinyMCELang['lang_insert_link_target_blank'] = 'Avaa linkki uudessa ikkunassa'; -tinyMCELang['lang_insert_image_title'] = 'Lisää/muokkaa kuvaa'; -tinyMCELang['lang_insert_image_src'] = 'Kuvan URL'; -tinyMCELang['lang_insert_image_alt'] = 'Kuvan selite'; -tinyMCELang['lang_help_desc'] = 'Apua'; -tinyMCELang['lang_bold_img'] = "bold.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({fi:{ +common:{ +edit_confirm:"Haluatko k\u00E4ytt\u00E4\u00E4 WYSIWYG tilaa t\u00E4ss\u00E4 tekstikent\u00E4ss\u00E4?", +apply:"K\u00E4yt\u00E4", +insert:"Lis\u00E4\u00E4", +update:"P\u00E4ivit\u00E4", +cancel:"Peruuta", +close:"Sulje", +browse:"Selaa", +class_name:"Luokka", +not_set:"-- Ei m\u00E4\u00E4ritetty --", +clipboard_msg:"Kopioi/Leikkaa/Liit\u00E4 ei ole k\u00E4ytett\u00E4viss\u00E4 Mozilla ja Firefox selaimilla.\nHaluatko lis\u00E4tietoa t\u00E4st\u00E4 ongelmasta?", +clipboard_no_support:"Selaimesi ei ole tuettu, k\u00E4yt\u00E4 sen sijaan n\u00E4pp\u00E4in oikoteit\u00E4.", +popup_blocked:"Sinulla on k\u00E4yt\u00F6ss\u00E4si ohjelma, joka est\u00E4\u00E4 ponnahdusikkunoiden n\u00E4yt\u00F6n. Sinun t\u00E4ytyy kytke\u00E4 ponnahdusikkunoiden esto pois p\u00E4\u00E4lt\u00E4 voidaksesi hy\u00F6dynt\u00E4\u00E4 t\u00E4ysin t\u00E4t\u00E4 ty\u00F6kalua.", +invalid_data:"Virhe: Sy\u00F6tit virheellisi\u00E4 arvoja, ne n\u00E4kyv\u00E4t punaisina.", +more_colors:"Enemm\u00E4n v\u00E4rej\u00E4" +}, +contextmenu:{ +align:"Tasaus", +left:"Vasemmalle", +center:"Keskelle", +right:"Oikealle", +full:"Molemmille puolille" +}, +insertdatetime:{ +date_fmt:"%d.%m.%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Lis\u00E4\u00E4 p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4", +inserttime_desc:"Lis\u00E4\u00E4 kellonaika", +months_long:"Tammikuu,Helmikuu,Maaliskuu,Huhtikuu,Toukokuu,Kes\u00E4kuu,Hein\u00E4kuu,Elokuu,Syyskuu,Lokakuu,Marraskuu,Joulukuu", +months_short:"Tammi,Helmi,Maalis,Huhti,Touko,Kes\u00E4,Hein\u00E4,Elo,Syys,Loka,Marras,Joulu", +day_long:"sunnuntai,maanantai,tiistai,keskiviikko,torstai,perjantai,lauantai,sunnuntai", +day_short:"su,ma,ti,ke,to,pe,la,su" +}, +print:{ +print_desc:"Tulosta" +}, +preview:{ +preview_desc:"Esikatselu" +}, +directionality:{ +ltr_desc:"Suunta vasemmalta oikealle", +rtl_desc:"Suunta oikealta vasemmalle" +}, +layer:{ +insertlayer_desc:"Lis\u00E4\u00E4 uusi taso", +forward_desc:"Siirr\u00E4 eteenp\u00E4in", +backward_desc:"Siirr\u00E4 taaksep\u00E4in", +absolute_desc:"Absoluuttinen sijainti", +content:"Uusi taso..." +}, +save:{ +save_desc:"Tallenna", +cancel_desc:"Peruuta kaikki muutokset" +}, +nonbreaking:{ +nonbreaking_desc:"Lis\u00E4\u00E4 tyhj\u00E4 merkki (nbsp)" +}, +iespell:{ +iespell_desc:"Oikeinkirjoituksetn tarkistus", +download:"ieSpell ohjelmaa ei havaittu. Haluatko asentaa sen nyt?" +}, +advhr:{ +advhr_desc:"Vaakataso viivain" +}, +emotions:{ +emotions_desc:"Hymi\u00F6t" +}, +searchreplace:{ +search_desc:"Etsi", +replace_desc:"Etsi ja korvaa" +}, +advimage:{ +image_desc:"Lis\u00E4\u00E4/muokkaa kuvaa" +}, +advlink:{ +link_desc:"Lis\u00E4\u00E4/muokkaa linkki\u00E4" +}, +xhtmlxtras:{ +cite_desc:"Sitaatti", +abbr_desc:"Lyhenne", +acronym_desc:"Kirjainlyhenne", +del_desc:"Poisto", +ins_desc:"Lis\u00E4ys", +attribs_desc:"Lis\u00E4\u00E4/muokkaa attribuutteja" +}, +style:{ +desc:"Muokkaa CSS tyylej\u00E4" +}, +paste:{ +paste_text_desc:"Liit\u00E4 pelkk\u00E4n\u00E4 tekstin\u00E4", +paste_word_desc:"Liit\u00E4 Wordist\u00E4", +selectall_desc:"Valitse kaikki" +}, +paste_dlg:{ +text_title:"Paina CTRL+V liitt\u00E4\u00E4ksesi teksti ikkunaan.", +text_linebreaks:"S\u00E4ilyt\u00E4 rivinvaihdot", +word_title:"Paina CTRL+V liitt\u00E4\u00E4ksesi teksti ikkunaan." +}, +table:{ +desc:"Lis\u00E4\u00E4 uusi taulukko", +row_before_desc:"Lis\u00E4\u00E4 rivi ennen", +row_after_desc:"Lis\u00E4\u00E4 rivi j\u00E4lkeen", +delete_row_desc:"Poista rivi", +col_before_desc:"Lis\u00E4\u00E4 sarake ennen", +col_after_desc:"Lis\u00E4\u00E4 sarake j\u00E4lkeen", +delete_col_desc:"Poista sarake", +split_cells_desc:"Jaa yhdistetyt taulukon solut", +merge_cells_desc:"Yhdist\u00E4 taulukon solut", +row_desc:"Taulukon rivin asetukset", +cell_desc:"Taulukon solun asetukset", +props_desc:"Taulukon asetukset", +paste_row_before_desc:"Liit\u00E4 taulukon rivi ennen", +paste_row_after_desc:"Liit\u00E4 taulukon rivi j\u00E4lkeen", +cut_row_desc:"Leikkaa taulukon rivi", +copy_row_desc:"Kopioi taulukon rivi", +del:"Poista taulukko", +row:"Rivi", +col:"Sarake", +cell:"Solu", +cellprops_delta_width:"80" +}, +autosave:{ +unload_msg:"Tekem\u00E4si muutokset menetet\u00E4\u00E4n jos poistut t\u00E4lt\u00E4 sivulta." +}, +fullscreen:{ +desc:"Kokoruututila" +}, +media:{ +desc:"Lis\u00E4\u00E4/muokkaa upotettua mediaa", +edit:"Muokkaa upotettua mediaa" +}, +fullpage:{ +desc:"Tiedoston asetukset" +}, +template:{ +desc:"Lis\u00E4\u00E4 esim\u00E4\u00E4ritetty\u00E4 sivupohja sis\u00E4lt\u00F6\u00E4" +}, +visualchars:{ +desc:"Visual control characters on/off." +}, +spellchecker:{ +desc:"Oikeinkirjoituksen tarkistus", +menu:"Oikeinkirjoituksen asetukset", +ignore_word:"Ohita sana", +ignore_words:"Ohita kaikki", +langs:"Kielet", +wait:"Odota ole hyv\u00E4...", +sug:"Ehdotukset", +no_sug:"Ei ehdotuksia", +no_mpell:"Virheit\u00E4 ei l\u00F6ytynyt." +}, +pagebreak:{ +desc:"Lis\u00E4\u00E4 sivunvaihto." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/langs/fr.js index a08e140e..6025941b 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/fr.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/fr.js @@ -1,38 +1,154 @@ -// FR lang variables by Pat Boens -// Modify by Laurent Dran -tinyMCELang['lang_bold_desc'] = 'Gras'; -tinyMCELang['lang_italic_desc'] = 'Italique'; -tinyMCELang['lang_underline_desc'] = 'Souligné'; -tinyMCELang['lang_striketrough_desc'] = 'Barré'; -tinyMCELang['lang_justifyleft_desc'] = 'Aligner à gauche'; -tinyMCELang['lang_justifycenter_desc'] = 'Aligner au centre'; -tinyMCELang['lang_justifyright_desc'] = 'Aligner à droite'; -tinyMCELang['lang_justifyfull_desc'] = 'Justifier'; -tinyMCELang['lang_bullist_desc'] = 'Liste désordonnée (puces)'; -tinyMCELang['lang_numlist_desc'] = 'Liste ordonnée (numéros)'; -tinyMCELang['lang_outdent_desc'] = 'Diminuer le retrait'; -tinyMCELang['lang_indent_desc'] = 'Augmenter le retrait'; -tinyMCELang['lang_undo_desc'] = 'Défaire'; -tinyMCELang['lang_redo_desc'] = 'Refaire'; -tinyMCELang['lang_link_desc'] = 'Insérer/éditer le lien'; -tinyMCELang['lang_unlink_desc'] = 'Enlever le lien'; -tinyMCELang['lang_image_desc'] = 'Insérer/éditer une image'; -tinyMCELang['lang_cleanup_desc'] = 'Nettoyer le code'; -tinyMCELang['lang_focus_alert'] = 'Une instance de l\éditeur doit avoir le focus avant d\'utiliser cette commande.'; -tinyMCELang['lang_edit_confirm'] = 'Voulez-vous utiliser le mode WYSIWYG pour cette zone de texte (textarea) ?'; -tinyMCELang['lang_insert_link_title'] = 'Insertion/édition lien'; -tinyMCELang['lang_insert'] = 'Insertion'; -tinyMCELang['lang_update'] = 'Insertion'; -tinyMCELang['lang_cancel'] = 'Annuler'; -tinyMCELang['lang_insert_link_url'] = 'Lien URL'; -tinyMCELang['lang_insert_link_target'] = 'Cible'; -tinyMCELang['lang_insert_link_target_same'] = 'Ouvrir le lien dans la même fenêtre'; -tinyMCELang['lang_insert_link_target_blank'] = 'Ouvrir le lien dans une nouvelle fenêtre'; -tinyMCELang['lang_insert_image_title'] = 'Insertion/édition d\'une image'; -tinyMCELang['lang_insert_image_src'] = 'URL de l\'image'; -tinyMCELang['lang_insert_image_alt'] = 'Description de l\'image'; -tinyMCELang['lang_help_desc'] = 'Aide'; -tinyMCELang['lang_bold_img'] = "bold.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copier/Couper/Coller ne sont pas disponibles pour Mozilla et Firefox.\nVoulez vous plus d\'informatios à ce sujet?'; +tinyMCE.addI18n({fr:{ +common:{ +edit_confirm:"Voulez-vous utiliser le mode WYSIWYG pour cette zone de texte\u00A0?", +apply:"Appliquer", +insert:"Ins\u00E9rer", +update:"Mettre \u00E0 jour", +cancel:"Annuler", +close:"Fermer", +browse:"Naviguer", +class_name:"Classe", +not_set:"-- Non init. --", +clipboard_msg:"Copier/Couper/Coller n'est pas disponible sous Mozilla et sous Firefox.\nVoulez-vous plus d'information sur ce probl\u00E8me\u00A0?", +clipboard_no_support:"Actuellement non support\u00E9 par votre navigateur, utilisez les raccourcis clavier \u00E0 ma place.", +popup_blocked:"D\u00E9sol\u00E9, nous avons d\u00E9tect\u00E9 que votre bloqueur de popup a bloqu\u00E9 une fen\u00EAtre dont l'application a besoin. Vous devez d\u00E9sactiver votre bloqueur de popup pour pouvoir utiliser cet outil.", +invalid_data:"Erreur : Valeurs incorrectes entr\u00E9es, elles sont marqu\u00E9es en rouge.", +more_colors:"Plus de couleurs" +}, +contextmenu:{ +align:"Alignement", +left:"Gauche", +center:"Centr\u00E9", +right:"Droite", +full:"Justifi\u00E9" +}, +insertdatetime:{ +date_fmt:"%d-%m-%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Ins\u00E9rer date", +inserttime_desc:"Ins\u00E9rer heure", +months_long:"Janvier,F\u00E9vrier,Mars,Avril,Mai,Juin,Juillet,Ao\u00FBt,Septembre,Octobre,Novembre,D\u00E9cembre", +months_short:"Jan,F\u00E9v,Mar,Avr,Mai,Juin,Juil,Ao\u00FBt,Sep,Oct,Nov,D\u00E9c", +day_long:"Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi,Dimanche", +day_short:"Dim,Lun,Mar,Mer,Jeu,Ven,Sam,Dim" +}, +print:{ +print_desc:"Imprimer" +}, +preview:{ +preview_desc:"Pr\u00E9visualiser" +}, +directionality:{ +ltr_desc:"\u00C9criture de gauche \u00E0 droite", +rtl_desc:"\u00C9criture de droite \u00E0 gauche" +}, +layer:{ +insertlayer_desc:"Ins\u00E9rer une nouvelle couche", +forward_desc:"D\u00E9placer vers l'avant", +backward_desc:"D\u00E9placer vers l'arri\u00E8re", +absolute_desc:"Activer le positionnement absolu", +content:"Nouvelle couche..." +}, +save:{ +save_desc:"Sauver", +cancel_desc:"Annuler tous les changements" +}, +nonbreaking:{ +nonbreaking_desc:"Ins\u00E9rer un espace ins\u00E9cable" +}, +iespell:{ +iespell_desc:"Lancer le v\u00E9rificateur d'orthographe", +download:"ieSpell non install\u00E9, voulez-vous l'installer maintenant\u00A0?" +}, +advhr:{ +advhr_desc:"Ins\u00E9rer trait horizontal" +}, +emotions:{ +emotions_desc:"\u00C9motions" +}, +searchreplace:{ +search_desc:"Chercher", +replace_desc:"Chercher/Remplacer" +}, +advimage:{ +image_desc:"Ins\u00E9rer/\u00C9diter image" +}, +advlink:{ +link_desc:"Ins\u00E9rer/\u00C9diter lien" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"Abr\u00E9viation", +acronym_desc:"Acronyme", +del_desc:"Effacement", +ins_desc:"Insertion", +attribs_desc:"Ins\u00E9rer/\u00C9diter les attributs" +}, +style:{ +desc:"\u00C9diter la feuille de style CSS" +}, +paste:{ +paste_text_desc:"Coller en tant que texte brut", +paste_word_desc:"Coller au d\u00E9part d'un texte cr\u00E9\u00E9 sous Word", +selectall_desc:"Selectioner tout" +}, +paste_dlg:{ +text_title:"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00EAtre.", +text_linebreaks:"Conserver les sauts de ligne", +word_title:"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00EAtre." +}, +table:{ +desc:"Ins\u00E9rer un nouveau tableau", +row_before_desc:"Ins\u00E9rer ligne avant", +row_after_desc:"Ins\u00E9rer ligne apr\u00E8s", +delete_row_desc:"Effacer ligne", +col_before_desc:"Ins\u00E9rer colonne avant", +col_after_desc:"Ins\u00E9rer colonne apr\u00E8s", +delete_col_desc:"Effacer colonne", +split_cells_desc:"Scinder les cellules fusionn\u00E9es", +merge_cells_desc:"Fusionner les cellules", +row_desc:"Propri\u00E9t\u00E9s de la ligne", +cell_desc:"Propri\u00E9t\u00E9s de la cellule", +props_desc:"Propri\u00E9t\u00E9s du tableau", +paste_row_before_desc:"Coller la ligne avant", +paste_row_after_desc:"Coller la ligne apr\u00E8s", +cut_row_desc:"Couper la ligne", +copy_row_desc:"Copier la ligne", +del:"Effacer tableau", +row:"Ligne", +col:"Colonne", +cell:"Cellule" +}, +autosave:{ +unload_msg:"Les changements que vous avez faits seront perdus si vous changez de page." +}, +fullscreen:{ +desc:"Passer en mode plein \u00E9cran" +}, +media:{ +desc:"Ins\u00E9rer/\u00C9diter un fichier m\u00E9dia", +edit:"\u00C9diter un fichier m\u00E9dia" +}, +fullpage:{ +desc:"Propri\u00E9t\u00E9s du document" +}, +template:{ +desc:"Ins\u00E9rer un mod\u00E8le pr\u00E9d\u00E9fini." +}, +visualchars:{ +desc:"Activer les caract\u00E8res de mise en page." +}, +spellchecker:{ +desc:"Activer le v\u00E9rificateur d'orthographe", +menu:"Param\u00E8tres du v\u00E9rificateur d'orthographe", +ignore_word:"Ignorer mot", +ignore_words:"Ignorer tout", +langs:"Langues", +wait:"Patientez svp...", +sug:"Suggestions", +no_sug:"Aucune suggestions", +no_mpell:"Aucune erreur trouv\u00E9e." +}, +pagebreak:{ +desc:"Ins\u00E9rer saut de page." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/langs/fr_ca.js deleted file mode 100644 index 1f6bf18f..00000000 --- a/includes/tinymce/jscripts/tiny_mce/langs/fr_ca.js +++ /dev/null @@ -1,38 +0,0 @@ -// Canadian French lang variables by Virtuelcom - -tinyMCELang['lang_bold_desc'] = 'Gras'; -tinyMCELang['lang_italic_desc'] = 'Italique'; -tinyMCELang['lang_underline_desc'] = 'Souligner'; -tinyMCELang['lang_striketrough_desc'] = 'Barrer'; -tinyMCELang['lang_justifyleft_desc'] = 'Aligner à gauche'; -tinyMCELang['lang_justifycenter_desc'] = 'Aligner au centre'; -tinyMCELang['lang_justifyright_desc'] = 'Aligner à droite'; -tinyMCELang['lang_justifyfull_desc'] = 'Justifier'; -tinyMCELang['lang_bullist_desc'] = 'Puces'; -tinyMCELang['lang_numlist_desc'] = 'Numérotation'; -tinyMCELang['lang_outdent_desc'] = 'Réduire le retrait'; -tinyMCELang['lang_indent_desc'] = 'Augmenter le retrait'; -tinyMCELang['lang_undo_desc'] = 'Annuler la dernière action'; -tinyMCELang['lang_redo_desc'] = 'Refaire la dernière action annulée'; -tinyMCELang['lang_link_desc'] = 'Insérer un hyperlien'; -tinyMCELang['lang_unlink_desc'] = 'Supprimer un hyperlien'; -tinyMCELang['lang_image_desc'] = 'Insérer une image'; -tinyMCELang['lang_cleanup_desc'] = 'Nettoyer le code'; -tinyMCELang['lang_focus_alert'] = 'Un éditeur doit être sélectionné pour utiliser cette fonction.'; -tinyMCELang['lang_edit_confirm'] = 'Désirez-vous utiliser l\'éditeur pour modifier cette zone?'; -tinyMCELang['lang_insert_link_title'] = 'Insérer / Modifier un hyperlien'; -tinyMCELang['lang_insert'] = 'Insérer'; -tinyMCELang['lang_update'] = 'Insérer'; -tinyMCELang['lang_cancel'] = 'Annuler'; -tinyMCELang['lang_insert_link_url'] = 'Adresse URL'; -tinyMCELang['lang_insert_link_target'] = 'Destination'; -tinyMCELang['lang_insert_link_target_same'] = 'Ouvrir dans la même fenêtre'; -tinyMCELang['lang_insert_link_target_blank'] = 'Ouvrir dans une nouvelle fenêtre'; -tinyMCELang['lang_insert_image_title'] = 'Insérer / Modifier une image'; -tinyMCELang['lang_insert_image_src'] = 'Adresse de l\'image'; -tinyMCELang['lang_insert_image_alt'] = 'Description de l\'image'; -tinyMCELang['lang_help_desc'] = 'Aide'; -tinyMCELang['lang_bold_img'] = "bold_fr.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline_fr.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copier/Couper/Coller ne sont pas disponibles dans Mozilla et FireFox.\nDésirez-vous consulter de plus amples informations à ce sujet?'; diff --git a/includes/tinymce/jscripts/tiny_mce/langs/gl.js b/includes/tinymce/jscripts/tiny_mce/langs/gl.js new file mode 100644 index 00000000..63cf6e9b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/gl.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({gl:{ +common:{ +edit_confirm:"\u00BFDesexa utiliza-lo modo WYSIWYG pra esta caixa de texto?", +apply:"Apricar", +insert:"Insertar", +update:"Actualizar", +cancel:"Cancelar", +close:"Cerrar", +browse:"Examinar", +class_name:"Clase", +not_set:"-- Ning\u00FAn --", +clipboard_msg:"Copiar/Cortar/Pegar non est\u00E1 disponible en Mozilla e Firefox.\n\u00BFDesexa obter mais informaci\u00F3n sobre de este asunto?", +clipboard_no_support:"O seu navegador non soporta estas funci\u00F3ns, use os atallos de teclado.", +popup_blocked:"O seu bloqueador de vent\u00E1s emerxentes deshabilitou unha vent\u00E1 que precisa pra o funcionamento da aplicaci\u00F3n. Precisa deshabilita-lo bloqueo de `popups` neste sitio pra utilizar \u00F3 m\u00E1ximo esta ferramenta.", +invalid_data:"Error: Introducidos valores non v\u00E1lidos, est\u00E1n marcados en vermello.", +more_colors:"Mais cores" +}, +contextmenu:{ +align:"Ali\u00F1amento", +left:"Esquerda", +center:"Centrado", +right:"Dereita", +full:"Xustificado" +}, +insertdatetime:{ +date_fmt:"%d-%m-%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Insertar data", +inserttime_desc:"Insertar hora", +months_long:"Xaneito,Febreiro,Marzo,Abril,Maio,Xu\u00F1o,Xullo,Agosto,Setembro,Outubro,Novembro,Decembro", +months_short:"Xan,Feb,Mar,Abr,Mai,Xu\u00F1,Xul,Ago,Set,Out,Nov,Dec", +day_long:"Domingo,Luns,Martes,M\u00E9rcores,Xoves,Venres,S\u00E1bado,Domingo", +day_short:"Dom,Lun,Mar,M\u00E9r,Xov,Ver,S\u00E1b,Dom" +}, +print:{ +print_desc:"Imprimir" +}, +preview:{ +preview_desc:"Vista previa" +}, +directionality:{ +ltr_desc:"Direcci\u00F3n esquerda a dereita", +rtl_desc:"Direcci\u00F3n dereita a esquerda" +}, +layer:{ +insertlayer_desc:"Insertar nova capa", +forward_desc:"Avanzar", +backward_desc:"Recuar", +absolute_desc:"Posici\u00F3n absoluta", +content:"Nova capa..." +}, +save:{ +save_desc:"Gardar", +cancel_desc:"Cancelar todo-los cambios" +}, +nonbreaking:{ +nonbreaking_desc:"Insertar espacio non colapsable" +}, +iespell:{ +iespell_desc:"Corrector ortogr\u00E1fico", +download:"Non se detectou 'ieSpell'. \u00BFDesexa instala-lo agora?" +}, +advhr:{ +advhr_desc:"Regra horizontal" +}, +emotions:{ +emotions_desc:"Emoticones" +}, +searchreplace:{ +search_desc:"Buscar", +replace_desc:"Buscar/Reemplazar" +}, +advimage:{ +image_desc:"Insertar/editar imaxe" +}, +advlink:{ +link_desc:"Insertar/editar hiperv\u00EDnculo" +}, +xhtmlxtras:{ +cite_desc:"Cita", +abbr_desc:"Abreviatura", +acronym_desc:"Acr\u00F3nimo", +del_desc:"Borrado", +ins_desc:"Inserci\u00F3n", +attribs_desc:"Insertar/Editar atributos" +}, +style:{ +desc:"Editar Estilo CSS" +}, +paste:{ +paste_text_desc:"Pegar como texto simple", +paste_word_desc:"Pegar desde Word", +selectall_desc:"Seleccionar todo" +}, +paste_dlg:{ +text_title:"Use CTRL+V no teclado pra pega-lo texto na vent\u00E1.", +text_linebreaks:"Manter salto de li\u00F1as", +word_title:"Use CTRL+V no teclado pra pega-lo texto na vent\u00E1." +}, +table:{ +desc:"Inserta unha nova t\u00E1boa", +row_before_desc:"Insertar fila (antes)", +row_after_desc:"Insertar fila (desp\u00F3is)", +delete_row_desc:"Suprimir fila", +col_before_desc:"Insertar columna (antes)", +col_after_desc:"Insertar columna (desp\u00F3is)", +delete_col_desc:"Suprimir columna", +split_cells_desc:"Dividir celdas", +merge_cells_desc:"Vincular celdas", +row_desc:"Propiedades da fila", +cell_desc:"Propiedades da celda", +props_desc:"Propiedades da t\u00E1boa", +paste_row_before_desc:"Pegar filas (antes)", +paste_row_after_desc:"Pegar filas (desp\u00F3is)", +cut_row_desc:"Cortar fila", +copy_row_desc:"Copiar fila", +del:"Eliminar t\u00E1boa", +row:"Fila", +col:"Columna", +cell:"Celda" +}, +autosave:{ +unload_msg:"Os cambios realizados perderanse se sae desta p\u00E1xina." +}, +fullscreen:{ +desc:"Cambiar a modo Pantalla Completa" +}, +media:{ +desc:"Insertar/editar medio embebido", +edit:"Editar medio embebido" +}, +fullpage:{ +desc:"Propiedades do documento" +}, +template:{ +desc:"Insertar contido de plantilla predefinida" +}, +visualchars:{ +desc:"Caracteres de control ON/OFF." +}, +spellchecker:{ +desc:"Conmutar corrector ortogr\u00E1fico", +menu:"Configuraci\u00F3n de corrector ortogr\u00E1fico", +ignore_word:"Ignorar verba", +ignore_words:"Ignorar todo", +langs:"Idiomas", +wait:"Agarde...", +sug:"Suxerencias", +no_sug:"Sen suxerencias", +no_mpell:"Non se atoparon erros." +}, +pagebreak:{ +desc:"Insertar fin de p\u00E1xina" +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/he.js b/includes/tinymce/jscripts/tiny_mce/langs/he.js new file mode 100644 index 00000000..4b40c3cb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/he.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({he:{ +common:{ +edit_confirm:"\u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05E2\u05D5\u05E8\u05DA \u05D4\u05DE\u05EA\u05E7\u05D3\u05DD?", +apply:"\u05D0\u05D9\u05E9\u05D5\u05E8", +insert:"\u05D4\u05D5\u05E1\u05E4\u05D4", +update:"\u05E2\u05D3\u05DB\u05D5\u05DF", +cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC", +close:"\u05E1\u05D2\u05D9\u05E8\u05D4", +browse:"\u05E2\u05D9\u05D5\u05DF", +class_name:"\u05DE\u05D7\u05DC\u05E7\u05D4", +not_set:"-- \u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8 --", +clipboard_msg:"\r\n \u05D4\u05E2\u05EA\u05E7\u05D4/\u05D2\u05D6\u05D9\u05E8\u05D4 \u05D5\u05D4\u05D3\u05D1\u05E7\u05D4 \u05D0\u05D9\u05E0\u05DD \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD \u05D1 Mozilla \u05D5\u05D1-Firefox.\r\n \u05D4\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05E7\u05D1\u05DC \u05DE\u05D9\u05D3\u05E2 \u05E0\u05D5\u05E1\u05E3 \u05E2\u05DC \u05D4\u05E0\u05D5\u05E9\u05D0?\r\n ", +clipboard_no_support:"\u05DB\u05E8\u05D2\u05E2 \u05DC\u05D0 \u05E0\u05EA\u05DE\u05DA \u05E2\u05DC \u05D9\u05D3\u05D9 \u05D4\u05D3\u05E4\u05D3\u05E4\u05DF \u05E9\u05DC\u05DA. \u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05E7\u05D9\u05E6\u05D5\u05E8\u05D9 \u05D4\u05DE\u05E7\u05DC\u05D3\u05EA.", +popup_blocked:"\u05D7\u05D5\u05E1\u05DD \u05E4\u05E8\u05D9\u05D8\u05D9\u05DD \u05DE\u05D5\u05E7\u05E4\u05E6\u05D9\u05DD \u05DE\u05E0\u05E2 \u05DE\u05D7\u05DC\u05D5\u05DF \u05D7\u05E9\u05D5\u05D1 \u05DE\u05DC\u05D4\u05E4\u05EA\u05D7,\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05DB\u05DC\u05D9 \u05D6\u05D4 \u05E2\u05DC\u05D9\u05DA \u05DC\u05D1\u05D8\u05DC \u05D0\u05EA \u05D7\u05D5\u05E1\u05DD \u05D4\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", +invalid_data:"Error: Invalid values entered, these are marked in red.", +more_colors:"\u05E2\u05D5\u05D3 \u05E6\u05D1\u05E2\u05D9\u05DD" +}, +contextmenu:{ +align:"\u05D9\u05D9\u05E9\u05D5\u05E8", +left:"\u05E9\u05DE\u05D0\u05DC", +center:"\u05D0\u05DE\u05E6\u05E2", +right:"\u05D9\u05DE\u05D9\u05DF", +full:"\u05E9\u05E0\u05D9 \u05D4\u05E6\u05D3\u05D3\u05D9\u05DD" +}, +insertdatetime:{ +date_fmt:"%d-%m-%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05EA\u05D0\u05E8\u05D9\u05DA", +inserttime_desc:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05D6\u05DE\u05DF", +months_long:"\u05D9\u05E0\u05D5\u05D0\u05E8,\u05E4\u05D1\u05E8\u05D5\u05D0\u05E8,\u05DE\u05E8\u05E5,\u05D0\u05E4\u05E8\u05D9\u05DC,\u05DE\u05D0\u05D9,\u05D9\u05D5\u05E0\u05E2,\u05D9\u05D5\u05DC\u05D9,\u05D0\u05D5\u05D2\u05D5\u05E1\u05D8,\u05E1\u05E4\u05D8\u05DE\u05D1\u05E8,\u05D0\u05D5\u05E7\u05D8\u05D5\u05D1\u05E8,\u05E0\u05D5\u05D1\u05DE\u05D1\u05E8,\u05D3\u05E6\u05DE\u05D1\u05E8", +months_short:"\u05D9\u05E0\u05D5\u05D0\u05E8,\u05E4\u05D1\u05E8\u05D5\u05D0\u05E8,\u05DE\u05E8\u05E5,\u05D0\u05E4\u05E8\u05D9\u05DC,\u05DE\u05D0\u05D9,\u05D9\u05D5\u05E0\u05E2,\u05D9\u05D5\u05DC\u05D9,\u05D0\u05D5\u05D2\u05D5\u05E1\u05D8,\u05E1\u05E4\u05D8\u05DE\u05D1\u05E8,\u05D0\u05D5\u05E7\u05D8\u05D5\u05D1\u05E8,\u05E0\u05D5\u05D1\u05DE\u05D1\u05E8,\u05D3\u05E6\u05DE\u05D1\u05E8", +day_long:"\u05D9\u05D5\u05DD \u05E8\u05D0\u05E9\u05D5\u05DF,\u05D9\u05D5\u05DD \u05E9\u05E0\u05D9,\u05D9\u05D5\u05DD \u05E9\u05DC\u05D9\u05E9\u05D9,\u05D9\u05D5\u05DD \u05E8\u05D1\u05D9\u05E2\u05D9,\u05D9\u05D5\u05DD \u05D7\u05DE\u05D9\u05E9\u05D9,\u05D9\u05D5\u05DD \u05E9\u05D9\u05E9,\u05D9\u05D5\u05DD \u05E9\u05D1\u05EA,\u05D9\u05D5\u05DD \u05E8\u05D0\u05E9\u05D5\u05DF", +day_short:"\u05D9\u05D5\u05DD \u05D0',\u05D9\u05D5\u05DD \u05D1',\u05D9\u05D5\u05DD \u05D2',\u05D9\u05D5\u05DD \u05D3',\u05D9\u05D5\u05DD \u05D4',\u05D9\u05D5\u05DD \u05D5',\u05E9\u05D1\u05EA,\u05D9\u05D5\u05DD \u05D0'" +}, +print:{ +print_desc:"\u05D4\u05D3\u05E4\u05E1\u05D4" +}, +preview:{ +preview_desc:"\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4" +}, +directionality:{ +ltr_desc:"\u05DB\u05D9\u05D5\u05D5\u05DF \u05D8\u05E7\u05E1\u05D8 \u05DE\u05E9\u05DE\u05D0\u05DC \u05DC\u05D9\u05DE\u05D9\u05DF", +rtl_desc:"\u05DB\u05D9\u05D5\u05D5\u05DF \u05D8\u05E7\u05E1\u05D8 \u05DE\u05D9\u05DE\u05D9\u05DF \u05DC\u05E9\u05DE\u05D0\u05DC" +}, +layer:{ +insertlayer_desc:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05E9\u05DB\u05D1\u05D4 \u05D7\u05D3\u05E9\u05D4", +forward_desc:"\u05D4\u05E2\u05D1\u05E8\u05D4 \u05E7\u05D3\u05D9\u05DE\u05D4", +backward_desc:"\u05D4\u05E2\u05D1\u05E8\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D4", +absolute_desc:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05DE\u05D9\u05E7\u05D5\u05DD \u05DE\u05D5\u05D7\u05DC\u05D8", +content:"\u05E9\u05DB\u05D1\u05D4 \u05D7\u05D3\u05E9\u05D4..." +}, +save:{ +save_desc:"\u05E9\u05DE\u05D9\u05E8\u05D4", +cancel_desc:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05DB\u05DC \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05DD" +}, +nonbreaking:{ +nonbreaking_desc:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05E8\u05D5\u05D5\u05D7" +}, +iespell:{ +iespell_desc:"\u05D1\u05D3\u05D9\u05E7\u05EA \u05D0\u05D9\u05D5\u05EA", +download:" \u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0 ieSpell. \u05D4\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05D4\u05EA\u05E7\u05D9\u05DF?" +}, +advhr:{ +advhr_desc:"\u05E7\u05D5 \u05D0\u05D5\u05E4\u05E7\u05D9" +}, +emotions:{ +emotions_desc:"\u05E1\u05DE\u05D9\u05D9\u05DC\u05D9\u05DD" +}, +searchreplace:{ +search_desc:"\u05D7\u05D9\u05E4\u05D5\u05E9", +replace_desc:"\u05D4\u05D7\u05DC\u05E4\u05D4" +}, +advimage:{ +image_desc:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4" +}, +advlink:{ +link_desc:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05D4\u05D9\u05E4\u05E8-\u05E7\u05D9\u05E9\u05D5\u05E8" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"Abbreviation", +acronym_desc:"Acronym", +del_desc:"Deletion", +ins_desc:"Insertion", +attribs_desc:"Insert/Edit Attributes" +}, +style:{ +desc:"\u05E2\u05D3\u05DB\u05D5\u05DF \u05D4\u05D2\u05D3\u05E8\u05D5\u05EA CSS" +}, +paste:{ +paste_text_desc:"Paste as Plain Text", +paste_word_desc:"Paste from Word", +selectall_desc:"Select All" +}, +paste_dlg:{ +text_title:"Use CTRL+V on your keyboard to paste the text into the window.", +text_linebreaks:"Keep linebreaks", +word_title:"Use CTRL+V on your keyboard to paste the text into the window." +}, +table:{ +desc:"\u05D4\u05DB\u05E0\u05E1\u05EA \u05D8\u05D1\u05DC\u05D4 \u05D7\u05D3\u05E9\u05D4", +row_before_desc:"\u05D4\u05DB\u05E0\u05E1\u05EA \u05E9\u05D5\u05E8\u05D4 \u05DC\u05E4\u05E0\u05D9", +row_after_desc:"\u05D4\u05DB\u05E0\u05E1\u05EA \u05E9\u05D5\u05E8\u05D4 \u05D0\u05D7\u05E8\u05D9", +delete_row_desc:"\u05DE\u05D7\u05E7/\u05D9 \u05E9\u05D5\u05E8\u05D4", +col_before_desc:"\u05D4\u05DB\u05E0\u05E1\u05EA \u05E2\u05DE\u05D5\u05D3\u05D4 \u05DC\u05E4\u05E0\u05D9", +col_after_desc:"\u05D4\u05DB\u05E0\u05E1\u05EA \u05E2\u05DE\u05D5\u05D3\u05D4 \u05D0\u05D7\u05E8\u05D9", +delete_col_desc:"\u05D4\u05E1\u05E8\u05EA \u05E2\u05DE\u05D5\u05D3\u05D4", +split_cells_desc:"\u05E4\u05D9\u05E6\u05D5\u05DC \u05EA\u05D0\u05D9\u05DD \u05D1\u05D8\u05D1\u05DC\u05D4", +merge_cells_desc:"\u05D0\u05D9\u05D7\u05D5\u05D3 \u05EA\u05D0\u05D9\u05DD \u05D1\u05D8\u05D1\u05DC\u05D4", +row_desc:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05E9\u05D5\u05E8\u05D4 \u05D1\u05D8\u05D1\u05DC\u05D4", +cell_desc:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05EA\u05D0 \u05D1\u05D8\u05D1\u05DC\u05D4", +props_desc:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05D4\u05D8\u05D1\u05DC\u05D4", +paste_row_before_desc:"\u05D4\u05D3\u05D1\u05E7\u05EA \u05E9\u05D5\u05E8\u05D4 \u05D1\u05D8\u05D1\u05DC\u05D4 \u05DC\u05E4\u05E0\u05D9", +paste_row_after_desc:"\u05D4\u05D3\u05D1\u05E7\u05EA \u05E9\u05D5\u05E8\u05D4 \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D0\u05D7\u05E8\u05D9", +cut_row_desc:"\u05D2\u05D6\u05D9\u05E8\u05EA \u05E9\u05D5\u05E8\u05D4 \u05D1\u05D8\u05D1\u05DC\u05D4", +copy_row_desc:"\u05D4\u05E2\u05EA\u05E7\u05EA \u05E9\u05D5\u05E8\u05D4 \u05D1\u05D8\u05D1\u05DC\u05D4", +del:"\u05DE\u05D7\u05D9\u05E7\u05EA \u05D8\u05D1\u05DC\u05D4", +row:"\u05E9\u05D5\u05E8\u05D4", +col:"\u05E2\u05DE\u05D5\u05D3\u05D4", +cell:"\u05EA\u05D0" +}, +autosave:{ +unload_msg:"\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05E9\u05D1\u05D9\u05E6\u05E2\u05EA \u05DC\u05D0 \u05D9\u05E9\u05DE\u05E8\u05D5 \u05D0\u05DD \u05EA\u05E2\u05D1\u05D5\u05E8 \u05DE\u05D3\u05E3 \u05D6\u05D4" +}, +fullscreen:{ +desc:"Toggle fullscreen mode" +}, +media:{ +desc:"Insert / edit embedded media", +edit:"Edit embedded media" +}, +fullpage:{ +desc:"Document properties" +}, +template:{ +desc:"Insert predefined template content" +}, +visualchars:{ +desc:"Visual control characters on/off." +}, +spellchecker:{ +desc:"Toggle spellchecker", +menu:"Spellchecker settings", +ignore_word:"Ignore word", +ignore_words:"Ignore all", +langs:"\u05E9\u05E4\u05D5\u05EA", +wait:"Please wait...", +sug:"Suggestions", +no_sug:"No suggestions", +no_mpell:"No misspellings found." +}, +pagebreak:{ +desc:"Insert page break." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/hr.js b/includes/tinymce/jscripts/tiny_mce/langs/hr.js new file mode 100644 index 00000000..18c7d18e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/hr.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({hr:{ +common:{ +edit_confirm:"\u017Delite li koristiti WYSIWYG na\u010Din rada za ovo tekstualno polje?", +apply:"Primjeni", +insert:"Umetni", +update:"Obnovi", +cancel:"Odustani", +close:"Zatvori", +browse:"Pregled", +class_name:"Klasa", +not_set:"-- Nije postavljeno --", +clipboard_msg:"Kopiraj/Izre\u017Ei/Zalijepi nije dostupno Mozilla i Firefox preglednicima.\nVi\u0161e informacija?", +clipboard_no_support:"Trenuta\u010Dno va\u0161 preglednik ne podr\u017Eava ovu opciju, poku\u0161ajte koristiti tipkovni\u010Dku kraticu.", +popup_blocked:"Oprostite, izgleda da je va\u0161 popup-blocker onemogu\u0107io prozor u sklopu ovog programa. Morate onemogu\u0107iti blokiranje popup prozora da bi u potpunosti iskoristili ovaj alat.", +invalid_data:"Gre\u0161ka: Une\u0161ene su nevaljane vrijednosti, ozna\u010Dene su crvenom bojom.", +more_colors:"Vi\u0161e boja" +}, +contextmenu:{ +align:"Poravnavanje", +left:"Lijevo", +center:"Sredina", +right:"Desno", +full:"Puno" +}, +insertdatetime:{ +date_fmt:"%d.%m.%Y.", +time_fmt:"%H:%M:%S", +insertdate_desc:"Umetni datum", +inserttime_desc:"Umetni vrijeme", +months_long:"sije\u010Danj,velja\u010Da,o\u017Eujak,travanj,svibanj,lipanj,srpanj,kolovoz,rujan,listopad,studeni,prosinac", +months_short:"sij,velj,o\u017Eu,tra,svi,lip,srp,kol,ruj,lis,stu,pro", +day_long:"nedjelja,ponedjeljak,utorak,srijeda,\u010Detvrtak,petak,subota,nedjelja", +day_short:"ned,pon,uto,sri,\u010Det,pet,sub,ned" +}, +print:{ +print_desc:"Ispis" +}, +preview:{ +preview_desc:"Prikaz" +}, +directionality:{ +ltr_desc:"S lijeva na desno", +rtl_desc:"S desna na lijevo" +}, +layer:{ +insertlayer_desc:"Umetni novi sloj", +forward_desc:"Pomakni naprijed", +backward_desc:"Pomakni natrag", +absolute_desc:"Uklju\u010Di/isklju\u010Di apsolutno pozicioniranje", +content:"Novi sloj..." +}, +save:{ +save_desc:"Spremi", +cancel_desc:"Odustani od svih promjena" +}, +nonbreaking:{ +nonbreaking_desc:"Umetni razmak" +}, +iespell:{ +iespell_desc:"Pokreni provjeru pravopisa", +download:"Provjera pravopisa nije postaljena. Postaviti sada?" +}, +advhr:{ +advhr_desc:"Vodoravna crta" +}, +emotions:{ +emotions_desc:"Emocije" +}, +searchreplace:{ +search_desc:"Prona\u0111i", +replace_desc:"Prona\u0111i/Zamijeni" +}, +advimage:{ +image_desc:"Umetni/uredi sliku" +}, +advlink:{ +link_desc:"Insert/edit link" +}, +xhtmlxtras:{ +cite_desc:"Citat", +abbr_desc:"Kratica", +acronym_desc:"Akronim", +del_desc:"Brisanje", +ins_desc:"Unos", +attribs_desc:"Umetni/uredi atribute" +}, +style:{ +desc:"Uredi CSS" +}, +paste:{ +paste_text_desc:"Zalijepi kao obi\u010Dni tekst", +paste_word_desc:"Zalijepi iz Worda", +selectall_desc:"Odaberi sve" +}, +paste_dlg:{ +text_title:"Koristite CTRL+V na tipkovnici da zalijepite tekst u prozor.", +text_linebreaks:"Zadr\u017Ei prijelome", +word_title:"Koristite CTRL+V na tipkovnici da zalijepite tekst u prozor." +}, +table:{ +desc:"Nova tablica", +row_before_desc:"Umetni redak iznad", +row_after_desc:"Umetni redak ispod", +delete_row_desc:"Izbri\u0161i redak", +col_before_desc:"Umetni stupac lijevo", +col_after_desc:"Umetni stupac desno", +delete_col_desc:"Ukloni stupac", +split_cells_desc:"Razdvoji spojene \u0107elije", +merge_cells_desc:"Spoji \u0107elije", +row_desc:"Svojstva retka", +cell_desc:"Svojstva \u0107elije", +props_desc:"Svojstva tablice", +paste_row_before_desc:"Zalijepi redak iznad", +paste_row_after_desc:"Zalijepi redak ispod", +cut_row_desc:"Izre\u017Ei redak", +copy_row_desc:"Kopiraj redak", +del:"Izbri\u0161i tablicu", +row:"Redak", +col:"Stupac", +cell:"\u0106elija" +}, +autosave:{ +unload_msg:"Promjene u dokumentu \u0107e biti izgubljene ako iza\u0111ete s ove stranice." +}, +fullscreen:{ +desc:"Uklju\u010Di/isklju\u010Di prikaz preko cijelog ekrana" +}, +media:{ +desc:"Insert / edit embedded media", +edit:"Edit embedded media" +}, +fullpage:{ +desc:"Svojstva dokumenta" +}, +template:{ +desc:"Umetni sadr\u017Eaj iz predlo\u017Eak" +}, +visualchars:{ +desc:"Vizualni kontrolni znakovi uklju\u010Deni/isklju\u010Deni." +}, +spellchecker:{ +desc:"Uklju\u010Di/isklju\u010Di provjeru pravopisa", +menu:"Postavke provjere pravopisa", +ignore_word:"Zanemari rije\u010D", +ignore_words:"Zanemari sver", +langs:"Jezici", +wait:"Pri\u010Dekajte...", +sug:"Prijedlozi", +no_sug:"Nema prijedloga", +no_mpell:"Nije prona\u0111ena nijedna pravopisna gre\u0161ke." +}, +pagebreak:{ +desc:"Umetni prijelom." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/hu.js b/includes/tinymce/jscripts/tiny_mce/langs/hu.js index 2d0e45ed..45247185 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/hu.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/hu.js @@ -1,39 +1,154 @@ -// HU lang variables -// Edited by 2XP (2xp@dino.hu) - -tinyMCELang['lang_bold_desc'] = 'Félkövér'; -tinyMCELang['lang_italic_desc'] = 'Dõlt'; -tinyMCELang['lang_underline_desc'] = 'Aláhúzott'; -tinyMCELang['lang_striketrough_desc'] = 'Áthúzott'; -tinyMCELang['lang_justifyleft_desc'] = 'Balra igazítás'; -tinyMCELang['lang_justifycenter_desc'] = 'Középre igazítás'; -tinyMCELang['lang_justifyright_desc'] = 'Jobbra igazítás'; -tinyMCELang['lang_justifyfull_desc'] = 'Sorkizárt'; -tinyMCELang['lang_bullist_desc'] = 'Felsorolás'; -tinyMCELang['lang_numlist_desc'] = 'Számozott lista'; -tinyMCELang['lang_outdent_desc'] = 'Behúzás balra'; -tinyMCELang['lang_indent_desc'] = 'Behúzás jobbra'; -tinyMCELang['lang_undo_desc'] = 'Visszavonás'; -tinyMCELang['lang_redo_desc'] = 'Ismétlés'; -tinyMCELang['lang_link_desc'] = 'Link felvétele'; -tinyMCELang['lang_unlink_desc'] = 'Link törlése'; -tinyMCELang['lang_image_desc'] = 'Kép beillesztése'; -tinyMCELang['lang_cleanup_desc'] = 'Kód tisztítása'; -tinyMCELang['lang_focus_alert'] = 'Miel\u00F5tt haszn\u00E1lja ezt a funkci\u00F3t, ki kell jel\u00F6lnie a szerkeszteni k\u00EDv\u00E1nt ter\u00FCletet.'; -tinyMCELang['lang_edit_confirm'] = 'K\u00EDv\u00E1nja a WYSIWYG m\u00F3dot erre a sz\u00F6vegter\u00FCletre alkalmazni??'; -tinyMCELang['lang_insert_link_title'] = 'Link beillesztése/szerkesztése'; -tinyMCELang['lang_insert'] = 'Beillesztés'; -tinyMCELang['lang_update'] = 'Beillesztés'; -tinyMCELang['lang_cancel'] = 'Mégsem'; -tinyMCELang['lang_insert_link_url'] = 'Link URL'; -tinyMCELang['lang_insert_link_target'] = 'Cél'; -tinyMCELang['lang_insert_link_target_same'] = 'Link megnyitása azonos ablakban'; -tinyMCELang['lang_insert_link_target_blank'] = 'Link megnyitása új ablakban'; -tinyMCELang['lang_insert_image_title'] = 'Kép beillesztése/szerkesztése'; -tinyMCELang['lang_insert_image_src'] = 'Kép URL'; -tinyMCELang['lang_insert_image_alt'] = 'Képleírás'; -tinyMCELang['lang_help_desc'] = 'Segítég'; -tinyMCELang['lang_bold_img'] = 'bold.gif'; -tinyMCELang['lang_italic_img'] = 'italic.gif'; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({hu:{ +common:{ +edit_confirm:"Haszn\u00E1lni akarja a WYSIWYG m\u00F3dot ebben a sz\u00F6vegdobozban?", +apply:"Alkalmaz", +insert:"Besz\u00FAr", +update:"Friss\u00EDt", +cancel:"M\u00E9gse", +close:"Bez\u00E1r", +browse:"Tall\u00F3z", +class_name:"Oszt\u00E1ly", +not_set:"-- Nincs megadva --", +clipboard_msg:"A M\u00E1sol\u00E1s/Kiv\u00E1g\u00E1s/Besz\u00FAr\u00E1s funkci\u00F3k nem el\u00E9rhet\u0151k Mozilla \u00E9s Firefox alatt.\nK\u00EDv\u00E1n t\u00F6bbet tudni err\u0151l a t\u00E9m\u00E1r\u00F3l?", +clipboard_no_support:"Jelenleg nem t\u00E1mogatja a b\u00F6ng\u00E9sz\u0151je, haszn\u00E1lja a billenty\u0171kombin\u00E1ci\u00F3kat helyette.", +popup_blocked:"A felugr\u00F3 ablakok tilt\u00E1sa miatt nem tudtunk megjelen\u00EDteni egy, az alkalmaz\u00E1shoz sz\u00FCks\u00E9ges ablakot. Enged\u00E9lyezze a b\u00F6ng\u00E9sz\u0151j\u00E9ben a felugr\u00F3 ablakokat, hogy minden funkci\u00F3t haszn\u00E1lhasson.", +invalid_data:"Hiba: \u00C9rv\u00E9nytelen adatok, pirossal jel\u00F6lve.", +more_colors:"T\u00F6bb sz\u00EDn" +}, +contextmenu:{ +align:"Igaz\u00EDt\u00E1s", +left:"Balra", +center:"K\u00F6z\u00E9pre", +right:"Jobbra", +full:"Sorkiz\u00E1r\u00E1s" +}, +insertdatetime:{ +date_fmt:"%Y.%m.%d.", +time_fmt:"%H:%M:%S", +insertdate_desc:"D\u00E1tum besz\u00FAr\u00E1sa", +inserttime_desc:"Id\u0151 besz\u00FAr\u00E1sa", +months_long:"janu\u00E1r,febru\u00E1r,m\u00E1rcius,\u00E1prilis,m\u00E1jus,j\u00FAnius,j\u00FAlius,augusztus,szeptember,okt\u00F3ber,november,december", +months_short:"jan,feb,m\u00E1r,\u00E1pr,m\u00E1j,j\u00FAn,j\u00FAl,aug,szep,okt,nov,dec", +day_long:"vas\u00E1rnap,h\u00E9tf\u0151,kedd,szerda,cs\u00FCt\u00F6rt\u00F6k,p\u00E9ntek,szombat,vas\u00E1rnap", +day_short:"V,H,K,Sze,Cs,P,Szo,V" +}, +print:{ +print_desc:"Nyomtat\u00E1s" +}, +preview:{ +preview_desc:"El\u0151n\u00E9zet" +}, +directionality:{ +ltr_desc:"Balr\u00F3l jobbra", +rtl_desc:"Jobbr\u00F3l balra" +}, +layer:{ +insertlayer_desc:"\u00DAj r\u00E9teg besz\u00FAr\u00E1sa", +forward_desc:"Mozgat\u00E1s el\u0151re", +backward_desc:"Mozgat\u00E1s h\u00E1tra", +absolute_desc:"Abszol\u00FAt poz\u00EDci\u00F3 ki-/bekapcsol\u00E1sa", +content:"\u00DAj r\u00E9teg..." +}, +save:{ +save_desc:"Ment\u00E9s", +cancel_desc:"\u00D6sszes v\u00E1ltoz\u00E1s visszavon\u00E1sa" +}, +nonbreaking:{ +nonbreaking_desc:"Nemsort\u00F6r\u0151 sz\u00F3k\u00F6z besz\u00FAr\u00E1sa" +}, +iespell:{ +iespell_desc:"Helyes\u00EDr\u00E1s-ellen\u0151rz\u00E9s futtat\u00E1sa", +download:"ieSpell nem tal\u00E1lhat\u00F3. Telep\u00EDti most?" +}, +advhr:{ +advhr_desc:"V\u00EDzszintes vonal" +}, +emotions:{ +emotions_desc:"Hangulatjelek" +}, +searchreplace:{ +search_desc:"Keres\u00E9s", +replace_desc:"Keres\u00E9s/Csere" +}, +advimage:{ +image_desc:"K\u00E9p besz\u00FAr\u00E1sa/szerkeszt\u00E9se" +}, +advlink:{ +link_desc:"Link besz\u00FAr\u00E1sa/szerkeszt\u00E9s" +}, +xhtmlxtras:{ +cite_desc:"Id\u00E9zet", +abbr_desc:"R\u00F6vid\u00EDt\u00E9s", +acronym_desc:"Bet\u0171sz\u00F3", +del_desc:"T\u00F6r\u00F6lt", +ins_desc:"Besz\u00FArt", +attribs_desc:"Tulajdons\u00E1gok besz\u00FAr\u00E1sa/szerkeszt\u00E9se" +}, +style:{ +desc:"CSS st\u00EDlus szerkeszt\u00E9se" +}, +paste:{ +paste_text_desc:"Besz\u00FAr\u00E1s sz\u00F6vegk\u00E9nt", +paste_word_desc:"Besz\u00FAr\u00E1s Wordb\u0151l", +selectall_desc:"Mindent kijel\u00F6l" +}, +paste_dlg:{ +text_title:"Haszn\u00E1lja a Ctrl+V-t a billenty\u0171zet\u00E9n a beilleszt\u00E9shez.", +text_linebreaks:"Sort\u00F6r\u00E9sek megtart\u00E1sa", +word_title:"Haszn\u00E1lja a Ctrl+V-t a billenty\u0171zet\u00E9n a beilleszt\u00E9shez." +}, +table:{ +desc:"T\u00E1bl\u00E1zat besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +row_before_desc:"Sor besz\u00FAr\u00E1sa el\u00E9", +row_after_desc:"Sor besz\u00FAr\u00E1sa ut\u00E1na", +delete_row_desc:"Sor t\u00F6rl\u00E9se", +col_before_desc:"Oszlop besz\u00FAr\u00E1sa el\u00E9", +col_after_desc:"Oszlop besz\u00FAr\u00E1sa ut\u00E1na", +delete_col_desc:"Oszlop t\u00F6rl\u00E9se", +split_cells_desc:"Cell\u00E1k feloszt\u00E1sa", +merge_cells_desc:"Cell\u00E1k \u00F6sszevon\u00E1sa", +row_desc:"Sor tulajdons\u00E1gai", +cell_desc:"Cella tulajdons\u00E1gai", +props_desc:"T\u00E1bl\u00E1zat tulajdons\u00E1gai", +paste_row_before_desc:"Sor bem\u00E1sol\u00E1sa el\u00E9", +paste_row_after_desc:"Sor bem\u00E1sol\u00E1sa ut\u00E1na", +cut_row_desc:"Sor kiv\u00E1g\u00E1sa", +copy_row_desc:"Sor m\u00E1sol\u00E1sa", +del:"T\u00E1bl\u00E1zat t\u00F6rl\u00E9se", +row:"Sor", +col:"Oszlop", +cell:"Cella" +}, +autosave:{ +unload_msg:"A m\u00F3dos\u00EDt\u00E1sok nem lesznek mentve, ha elhagyja az oldalt." +}, +fullscreen:{ +desc:"Teljesk\u00E9perny\u0151s m\u00F3d ki-/bekapcsol\u00E1sa" +}, +media:{ +desc:"Be\u00E1gyazott m\u00E9dia besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +edit:"Be\u00E1gyazott m\u00E9dia szerkeszt\u00E9se" +}, +fullpage:{ +desc:"Dokumentum tulajdons\u00E1gai" +}, +template:{ +desc:"Sablon beilleszt\u00E9se" +}, +visualchars:{ +desc:"Vizu\u00E1lis vez\u00E9rl\u0151karakterek be/ki." +}, +spellchecker:{ +desc:"Helyes\u00EDr\u00E1s-ellen\u0151rz\u0151 ki-/bekapcsol\u00E1sa", +menu:"Helyes\u00EDr\u00E1s-ellen\u0151rz\u0151 tulajdons\u00E1gai", +ignore_word:"Sz\u00F3 kihagy\u00E1sa", +ignore_words:"Mindet kihagy", +langs:"Nyelvek", +wait:"K\u00E9rem, v\u00E1rjon...", +sug:"Aj\u00E1nl\u00E1sok", +no_sug:"Nincs aj\u00E1nl\u00E1s", +no_mpell:"Nem tal\u00E1ltam helyes\u00EDr\u00E1si hib\u00E1t." +}, +pagebreak:{ +desc:"Oldalt\u00F6r\u00E9s besz\u00FAr\u00E1sa." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/ia.js b/includes/tinymce/jscripts/tiny_mce/langs/ia.js new file mode 100644 index 00000000..99f06a8e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/ia.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({ia:{ +common:{ +edit_confirm:"\u662F\u5426\u5728\u8BE5text area\u5185\u542F\u7528\u6240\u89C1\u5373\u6240\u5F97\u6A21\u5F0F\uFF1F", +apply:"\u5E94\u7528", +insert:"\u63D2\u5165", +update:"\u66F4\u65B0", +cancel:"\u53D6\u6D88", +close:"\u5173\u95ED", +browse:"\u6D4F\u89C8", +class_name:"\u6837\u5F0F\u7C7B\u540D", +not_set:"-- \u672A\u8BBE\u7F6E --", +clipboard_msg:"\u590D\u5236\u3001\u526A\u5207\u548C\u7C98\u8D34\u529F\u80FD\u5728Mozilla \u548C Firefox\u4E2D\u65E0\u6CD5\u4F7F\u7528", +clipboard_no_support:"\u5C1A\u4E0D\u652F\u6301\u60A8\u6240\u4F7F\u7528\u7684\u6D4F\u89C8\u5668\uFF0C\u8BF7\u4F7F\u7528\u952E\u76D8\u65B9\u5F0F\u64CD\u4F5C", +popup_blocked:"\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u5FEB\u663E\u7A97\u53E3\u963B\u6B62\u7A0B\u5E8F\u5DF2\u7ECF\u963B\u6B62\u4E86\u672C\u5FEB\u663E\u7A97\u53E3\uFF0C\u8BF7\u8C03\u6574\u4F60\u7684\u6D4F\u89C8\u5668\u8BBE\u7F6E\uFF0C\u5141\u8BB8\u672C\u7F51\u7AD9\u5F39\u51FA\u65B0\u7A97\u53E3\uFF0C\u4EE5\u4FBF\u4F7F\u7528\u6B64\u529F\u80FD", +invalid_data:"\u9519\u8BEF\uFF1A\u8F93\u5165\u4E86\u65E0\u6548\u7684\u503C\uFF0C\u5DF2\u6807\u8BB0\u4E3A\u7EA2\u8272\u3002", +more_colors:"\u66F4\u591A\u989C\u8272" +}, +contextmenu:{ +align:"\u5BF9\u9F50\u65B9\u5F0F", +left:"\u5DE6\u5BF9\u9F50", +center:"\u5C45\u4E2D", +right:"\u53F3\u5BF9\u9F50", +full:"\u4E24\u7AEF\u5BF9\u9F50" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u63D2\u5165\u4ECA\u5929\u65E5\u671F", +inserttime_desc:"\u63D2\u5165\u73B0\u5728\u65F6\u95F4", +months_long:"\u4E00\u6708,\u4E8C\u6708,\u4E09\u6708,\u56DB\u6708,\u4E94\u6708,\u516D\u6708,\u4E03\u6708,\u516B\u6708,\u4E5D\u6708,\u5341\u6708,\u5341\u4E00\u6708,\u5341\u4E8C\u6708", +months_short:"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708", +day_long:"\u661F\u671F\u65E5,\u661F\u671F\u4E00,\u661F\u671F\u4E8C,\u661F\u671F\u4E09,\u661F\u671F\u56DB,\u661F\u671F\u4E94,\u661F\u671F\u516D,\u661F\u671F\u65E5", +day_short:"\u5468\u65E5,\u5468\u4E00,\u5468\u4E8C,\u5468\u4E09,\u5468\u56DB,\u5468\u4E94,\u5468\u516D,\u5468\u65E5" +}, +print:{ +print_desc:"\u6253\u5370" +}, +preview:{ +preview_desc:"\u9884\u89C8" +}, +directionality:{ +ltr_desc:"\u6587\u5B57\u4ECE\u5DE6\u5230\u53F3", +rtl_desc:"\u6587\u5B57\u4ECE\u53F3\u5230\u5DE6" +}, +layer:{ +insertlayer_desc:"\u63D2\u5165\u5C42", +forward_desc:"\u524D\u7F6E", +backward_desc:"\u540E\u7F6E", +absolute_desc:"\u7EDD\u5BF9\u4F4D\u7F6E", +content:"\u65B0\u589E\u5C42..." +}, +save:{ +save_desc:"\u4FDD\u5B58", +cancel_desc:"\u653E\u5F03\u6240\u6709\u66F4\u6539" +}, +nonbreaking:{ +nonbreaking_desc:"\u63D2\u5165\u7A7A\u683C\u7B26" +}, +iespell:{ +iespell_desc:"\u6267\u884C\u62FC\u5199\u68C0\u67E5", +download:"\u672A\u68C0\u6D4B\u5230ieSpell\u7EC4\u4EF6\uFF0C\u662F\u5426\u73B0\u5728\u5B89\u88C5 ?" +}, +advhr:{ +advhr_desc:"\u5206\u9694\u7EBF" +}, +emotions:{ +emotions_desc:"\u8868\u60C5" +}, +searchreplace:{ +search_desc:"\u67E5\u627E", +replace_desc:"\u67E5\u627E/\u66FF\u6362" +}, +advimage:{ +image_desc:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u7247" +}, +advlink:{ +link_desc:"\u63D2\u5165/\u7F16\u8F91 \u8FDE\u7ED3" +}, +xhtmlxtras:{ +cite_desc:"\u5F15\u7528", +abbr_desc:"\u7F29\u5199", +acronym_desc:"\u9996\u5B57\u6BCD\u7F29\u5199", +del_desc:"\u5220\u9664", +ins_desc:"\u63D2\u5165", +attribs_desc:"\u63D2\u5165/\u7F16\u8F91 \u5C5E\u6027" +}, +style:{ +desc:"\u7F16\u8F91 CSS \u6837\u5F0F\u8868" +}, +paste:{ +paste_text_desc:"\u7C98\u8D34\u4E3A\u7EAF\u6587\u5B57", +paste_word_desc:"\u7C98\u8D34\u4E3AWord\u683C\u5F0F", +selectall_desc:"\u5168\u9009" +}, +paste_dlg:{ +text_title:"\u5C06\u590D\u5236(CTRL + C)\u7684\u5185\u5BB9\u7C98\u8D34(CTRL + V)\u5230\u7A97\u53E3\u3002", +text_linebreaks:"\u4FDD\u7559\u5206\u884C\u7B26\u53F7\u53F7", +word_title:"\u5C06\u590D\u5236(CTRL + C)\u7684\u5185\u5BB9\u7C98\u8D34(CTRL + V)\u5230\u7A97\u53E3\u3002" +}, +table:{ +desc:"\u63D2\u5165\u65B0\u8868\u683C", +row_before_desc:"\u5728\u4E0A\u65B9\u63D2\u5165\u884C", +row_after_desc:"\u5728\u4E0B\u65B9\u63D2\u5165\u884C", +delete_row_desc:"\u5220\u9664\u5F53\u524D\u884C", +col_before_desc:"\u5728\u5DE6\u4FA7\u63D2\u5165\u5217", +col_after_desc:"\u5728\u53F3\u4FA7\u63D2\u5165\u5217", +delete_col_desc:"\u5220\u9664\u5F53\u524D\u5217", +split_cells_desc:"\u62C6\u5206\u50A8\u5B58\u683C", +merge_cells_desc:"\u5408\u5E76\u50A8\u5B58\u683C", +row_desc:"\u5217 \u5C5E\u6027", +cell_desc:"\u50A8\u5B58\u683C \u5C5E\u6027", +props_desc:"\u8868\u683C \u5C5E\u6027", +paste_row_before_desc:"\u7C98\u8D34\u884C\u5230\u4E0A\u65B9", +paste_row_after_desc:"\u7C98\u8D34\u884C\u5230\u4E0B\u65B9", +cut_row_desc:"\u526A\u5207\u5F53\u524D\u5217", +copy_row_desc:"\u590D\u5236\u5F53\u524D\u5217", +del:"\u5220\u9664\u8868\u683C", +row:"\u884C", +col:"\u5217", +cell:"\u50A8\u5B58\u683C" +}, +autosave:{ +unload_msg:"\u5982\u679C\u79BB\u5F00\u8BE5\u9875\u5C06\u5BFC\u81F4\u6240\u6709\u4FEE\u6539\u5168\u90E8\u4E22\u5931\u3002" +}, +fullscreen:{ +desc:"\u5168\u5C4F\u6A21\u5F0F" +}, +media:{ +desc:"\u63D2\u5165/\u7F16\u8F91 \u5A92\u4F53", +edit:"\u7F16\u8F91 \u5A92\u4F53" +}, +fullpage:{ +desc:"\u6587\u4EF6" +}, +template:{ +desc:"\u63D2\u5165\u9009\u5B9A\u7684\u8303\u672C" +}, +visualchars:{ +desc:"\u663E\u793A\u63A7\u5236\u7B26\u53F7\u3002" +}, +spellchecker:{ +desc:"\u62FC\u5199\u68C0\u67E5", +menu:"\u62FC\u5199\u68C0\u67E5 \u8BBE\u7F6E", +ignore_word:"\u5FFD\u7565", +ignore_words:"\u5168\u90E8\u5FFD\u7565", +langs:"\u8BED\u8A00\u6E05\u5355", +wait:"\u8BF7\u7A0D\u5019...", +sug:"\u5EFA\u8BAE\u8BCD", +no_sug:"\u65E0\u62FC\u5199\u5EFA\u8BAE", +no_mpell:"\u65E0\u62FC\u5199\u9519\u8BEF" +}, +pagebreak:{ +desc:"\u63D2\u5165\u5206\u9875\u7B26\u53F7" +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/ii.js b/includes/tinymce/jscripts/tiny_mce/langs/ii.js new file mode 100644 index 00000000..fc8d8335 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/ii.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({ii:{ +common:{ +edit_confirm:"\u4F60\u8981\u5728\u6B64\u6587\u5B57\u7F16\u8F91\u533A\u542F\u7528\u6240\u89C1\u5373\u6240\u5F97(WYSIWYG)\u6A21\u5F0F\uFF1F", +apply:"\u5E94\u7528", +insert:"\u63D2\u5165", +update:"\u66F4\u65B0", +cancel:"\u53D6\u6D88", +close:"\u5173\u95ED", +browse:"\u6D4F\u89C8", +class_name:"\u7C7B\u522B", +not_set:"-- \u672A\u8BBE\u5B9A --", +clipboard_msg:"\u7C98\u8D34\u590D\u5236\u3001\u526A\u4E0B\u548C\u8D34\u4E0A\u529F\u80FD\u5728 Mozilla \u548C Firefox \u4E2D\u65E0\u6CD5\u4F7F\u7528\u3002\n\u4F60\u9700\u8981\u4E86\u89E3\u66F4\u591A\u76F8\u5173\u4FE1\u606F\u5417\uFF1F", +clipboard_no_support:"\u76EE\u524D\u4F60\u7684\u6D4F\u89C8\u5668\u65E0\u6CD5\u652F\u6301\uFF0C\u8BF7\u7528\u952E\u76D8\u5FEB\u6377\u952E\u3002", +popup_blocked:"\u62B1\u6B49\uFF0C\u5FEB\u6377\u529F\u80FD\u5728\u4F60\u7684\u7CFB\u7EDF\u4E0A\u88AB\u5C01\u9501\uFF0C\u4F7F\u7A0B\u5E8F\u65E0\u6CD5\u6B63\u5E38\u4F7F\u7528\uFF0C\u4F60\u9700\u8981\u6682\u65F6\u89E3\u9664\u5FEB\u6377\u5C01\u9501\uFF0C\u4F7F\u5DE5\u5177\u80FD\u6B63\u5E38\u4F7F\u7528\u3002", +invalid_data:"\u9519\u8BEF\uFF1A\u8F93\u5165\u65E0\u6548\u7684\u503C\uFF0C\u4EE5\u7EA2\u8272\u5B57\u8868\u793A\u3002", +more_colors:"\u66F4\u591A\u989C\u8272" +}, +contextmenu:{ +align:"\u5BF9\u9F50\u65B9\u5F0F", +left:"\u9760\u5DE6\u5BF9\u9F50", +center:"\u7F6E\u4E2D", +right:"\u9760\u53F3\u5BF9\u9F50", +full:"\u5DE6\u53F3\u5BF9\u9F50" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u63D2\u5165\u4ECA\u5929\u65E5\u671F", +inserttime_desc:"\u63D2\u5165\u73B0\u5728\u65F6\u95F4", +months_long:"\u4E00\u6708,\u4E8C\u6708,\u4E09\u6708,\u56DB\u6708,\u4E94\u6708,\u516D\u6708,\u4E03\u6708,\u516B\u6708,\u4E5D\u6708,\u5341\u6708,\u5341\u4E00\u6708,\u5341\u4E8C\u6708", +months_short:"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708", +day_long:"\u661F\u671F\u65E5,\u661F\u671F\u4E00,\u661F\u671F\u4E8C,\u661F\u671F\u4E09,\u661F\u671F\u56DB,\u661F\u671F\u4E94,\u661F\u671F\u516D,\u661F\u671F\u65E5", +day_short:"\u5468\u65E5,\u5468\u4E00,\u5468\u4E8C,\u5468\u4E09,\u5468\u56DB,\u5468\u4E94,\u5468\u516D,\u5468\u65E5" +}, +print:{ +print_desc:"\u6253\u5370" +}, +preview:{ +preview_desc:"\u9884\u89C8" +}, +directionality:{ +ltr_desc:"\u6587\u5B57\u4ECE\u5DE6\u5230\u53F3", +rtl_desc:"\u6587\u5B57\u4ECE\u53F3\u5230\u5DE6" +}, +layer:{ +insertlayer_desc:"\u63D2\u5165\u8FED\u5C42", +forward_desc:"\u524D\u79FB", +backward_desc:"\u540E\u79FB", +absolute_desc:"\u5207\u6362\u7EDD\u5BF9\u5BFB\u5740", +content:"\u65B0\u589E\u8FED\u5C42..." +}, +save:{ +save_desc:"\u50A8\u5B58", +cancel_desc:"\u53D6\u6D88\u6240\u6709\u53D8\u66F4" +}, +nonbreaking:{ +nonbreaking_desc:"\u63D2\u5165\u975E\u622A\u65AD\u7684\u7A7A\u683C\u7B26" +}, +iespell:{ +iespell_desc:"\u6267\u884C\u62FC\u5B57\u68C0\u67E5", +download:"\u4FA6\u6D4B\u4E0D\u5230ieSpell\u5957\u4EF6\uFF0C\u662F\u5426\u7ACB\u5373\u5B89\u88C5\uFF1F" +}, +advhr:{ +advhr_desc:"\u6C34\u5E73\u5206\u9694\u7EBF" +}, +emotions:{ +emotions_desc:"\u8868\u60C5" +}, +searchreplace:{ +search_desc:"\u641C\u5BFB", +replace_desc:"\u641C\u5BFB/\u53D6\u4EE3" +}, +advimage:{ +image_desc:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u6863" +}, +advlink:{ +link_desc:"\u63D2\u5165/\u7F16\u8F91 \u94FE\u63A5" +}, +xhtmlxtras:{ +cite_desc:"\u5F15\u7528", +abbr_desc:"\u7F29\u5199", +acronym_desc:"\u9996\u5B57\u6BCD\u7F29\u5199", +del_desc:"\u5220\u9664", +ins_desc:"\u63D2\u5165", +attribs_desc:"\u63D2\u5165/\u7F16\u8F91 \u5C5E\u6027" +}, +style:{ +desc:"\u7F16\u8F91 CSS \u6837\u5F0F\u8868\u5355" +}, +paste:{ +paste_text_desc:"\u4EE5\u7EAF\u6587\u672C\u683C\u5F0F\u7C98\u8D34", +paste_word_desc:"\u4EE5Word\u683C\u5F0F\u7C98\u8D34", +selectall_desc:"\u5168\u9009" +}, +paste_dlg:{ +text_title:"\u7528 Ctrl+V \u7EC4\u5408\u952E\u5C06\u6587\u5B57\u8D34\u5165\u7A97\u53E3\u4E2D\u3002", +text_linebreaks:"\u4FDD\u7559\u6362\u884C\u7B26\u53F7", +word_title:"\u7528 Ctrl+V \u7EC4\u5408\u952E\u5C06\u6587\u5B57\u8D34\u5165\u7A97\u53E3\u4E2D\u3002" +}, +table:{ +desc:"\u63D2\u5165\u65B0\u8868\u683C", +row_before_desc:"\u63D2\u5165\u5217\u4E8E\u524D", +row_after_desc:"\u63D2\u5165\u5217\u4E8E\u540E", +delete_row_desc:"\u5220\u9664\u672C\u5217", +col_before_desc:"\u63D2\u5165\u680F\u4E8E\u524D", +col_after_desc:"\u63D2\u5165\u680F\u4E8E\u540E", +delete_col_desc:"\u5220\u9664\u672C\u680F", +split_cells_desc:"\u5206\u5272\u5355\u5143\u683C", +merge_cells_desc:"\u5408\u5E76\u5355\u5143\u683C", +row_desc:"\u8868\u683C\u5217 \u5C5E\u6027", +cell_desc:"\u5355\u5143\u683C \u5C5E\u6027", +props_desc:"\u8868\u683C \u5C5E\u6027", +paste_row_before_desc:"\u8D34\u5165\u5217\u4E8E\u524D", +paste_row_after_desc:"\u8D34\u5165\u5217\u4E8E\u540E", +cut_row_desc:"\u526A\u4E0B\u6B64\u5217", +copy_row_desc:"\u590D\u5236\u6B64\u5217", +del:"\u5220\u9664\u8868\u683C", +row:"\u5217", +col:"\u680F", +cell:"\u5355\u5143\u683C" +}, +autosave:{ +unload_msg:"\u5982\u679C\u79BB\u5F00\u8BE5\u9875\uFF0C\u5C06\u5BFC\u81F4\u6240\u6709\u4FEE\u6539\u5168\u90E8\u9057\u5931\u3002" +}, +fullscreen:{ +desc:"\u5207\u6362\u5168\u5C4F\u5E55\u6A21\u5F0F" +}, +media:{ +desc:"\u63D2\u5165/\u7F16\u8F91 \u5A92\u4F53", +edit:"\u7F16\u8F91 \u5A92\u4F53" +}, +fullpage:{ +desc:"\u6587\u4EF6\u5C6C\u6027" +}, +template:{ +desc:"\u63D2\u5165\u9884\u5148\u5B9A\u4E49\u7684\u6A21\u677F\u5185\u5BB9" +}, +visualchars:{ +desc:"\u53EF\u89C1\u63A7\u5236\u5B57\u7B26 \u5F00/\u5173\u3002" +}, +spellchecker:{ +desc:"\u5207\u6362\u62FC\u5199\u68C0\u67E5", +menu:"\u62FC\u5199\u68C0\u67E5\u8BBE\u5B9A", +ignore_word:"\u5FFD\u7565\u5B57", +ignore_words:"\u5168\u90E8\u5FFD\u7565", +langs:"\u8BED\u8A00", +wait:"\u8BF7\u7A0D\u540E...", +sug:"\u5EFA\u8BAE", +no_sug:"\u65E0\u5EFA\u8BAE", +no_mpell:"\u65E0\u62FC\u5199\u9519\u8BEF\u3002" +}, +pagebreak:{ +desc:"\u63D2\u5165\u5206\u9875\u7B26\u3002" +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/is.js b/includes/tinymce/jscripts/tiny_mce/langs/is.js new file mode 100644 index 00000000..9f78100b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/langs/is.js @@ -0,0 +1,154 @@ +tinyMCE.addI18n({is:{ +common:{ +edit_confirm:"Viltu nota WYSIWYG ritil fyrir \u00FEetta textasv\u00E6\u00F0i?", +apply:"Sta\u00F0festa", +insert:"Setja inn", +update:"Uppf\u00E6ra", +cancel:"H\u00E6tta vi\u00F0", +close:"Loka", +browse:"Gramsa", +class_name:"Klasi", +not_set:"-- Ekki skilgreint --", +clipboard_msg:"Afrita/Klippa/L\u00EDma er ekki a\u00F0gengilegt \u00ED Mozilla og Firefox eins og er.\nViltu f\u00E1 n\u00E1nari uppl\u00FDsingar?", +clipboard_no_support:"Ekki stutt \u00ED \u00FE\u00EDnum vefsko\u00F0ara, nota\u00F0ur fl\u00FDtilykla \u00ED sta\u00F0inn.", +popup_blocked:"Afsaki\u00F0, uppsprettuv\u00F6rnin \u00FE\u00EDn (popup blocker) hefur blokka\u00F0 glugga sem er hluti af ritlinum. \u00DE\u00FA ver\u00F0ur a\u00F0 sl\u00F6kkva \u00E1 uppsprettuv\u00F6rn til a\u00F0 geta nota\u00F0 \u00FEennan ritil.", +invalid_data:"Villa: Vitlaus gildi slegin inn, \u00FEau eru merkt me\u00F0 rau\u00F0u.", +more_colors:"Fleiri litir" +}, +contextmenu:{ +align:"J\u00F6fnun", +left:"Vinstri", +center:"Mi\u00F0ja", +right:"H\u00E6gri", +full:"Full" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"Setja inn dagsetningu", +inserttime_desc:"Setja inn t\u00EDmasetningu", +months_long:"Jan\u00FAar,Febr\u00FAar,Mars,Apr\u00EDl,Ma\u00ED,J\u00FAn\u00ED,J\u00FAl\u00ED,\u00C1g\u00FAst,September,Okt\u00F3ber,N\u00F3vember,Desember", +months_short:"Jan,Feb,Mar,Apr,Ma\u00ED,J\u00FAn,J\u00FAl,\u00C1gs,Sep,Okt,N\u00F3v,Des", +day_long:"Sunnudagur,M\u00E1nudagur,\u00DEri\u00F0judagur,Mi\u00F0vikudagur,Fimmtudagur,F\u00F6studagur,Laugardagur,Sunnudagur", +day_short:"Sun,M\u00E1n,\u00DEri,Mi\u00F0,Fim,F\u00F6s,Lau,Sun" +}, +print:{ +print_desc:"Prenta" +}, +preview:{ +preview_desc:"Forsko\u00F0a" +}, +directionality:{ +ltr_desc:"Fr\u00E1 vinstri til h\u00E6gri", +rtl_desc:"Fr\u00E1 h\u00E6gri til vinstri" +}, +layer:{ +insertlayer_desc:"Setja inn n\u00FDtt lag", +forward_desc:"F\u00E6ra framfyrir", +backward_desc:"F\u00E6ra afturfyrir", +absolute_desc:"Taka af/setja \u00E1 absolute positioning", +content:"N\u00FDtt lag..." +}, +save:{ +save_desc:"Vista", +cancel_desc:"H\u00E6tta vi\u00F0 allar breytingar" +}, +nonbreaking:{ +nonbreaking_desc:"Setja inn bil staf" +}, +iespell:{ +iespell_desc:"Lesa yfir", +download:"ieSpell fannst ekki. Viltu setja \u00FEa\u00F0 inn n\u00FAna?" +}, +advhr:{ +advhr_desc:"Horizontal rule" +}, +emotions:{ +emotions_desc:"Broskarlar" +}, +searchreplace:{ +search_desc:"Finna", +replace_desc:"Finna/Skipta \u00FAt" +}, +advimage:{ +image_desc:"Setja inn/breyta mynd" +}, +advlink:{ +link_desc:"Insert/edit link" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"Abbreviation", +acronym_desc:"Acronym", +del_desc:"Deletion", +ins_desc:"Insertion", +attribs_desc:"Insert/Edit Attributes" +}, +style:{ +desc:"Edit CSS Style" +}, +paste:{ +paste_text_desc:"Paste as Plain Text", +paste_word_desc:"Paste from Word", +selectall_desc:"Select All" +}, +paste_dlg:{ +text_title:"Use CTRL+V on your keyboard to paste the text into the window.", +text_linebreaks:"Keep linebreaks", +word_title:"Use CTRL+V on your keyboard to paste the text into the window." +}, +table:{ +desc:"Inserts a new table", +row_before_desc:"Insert row before", +row_after_desc:"Insert row after", +delete_row_desc:"Delete row", +col_before_desc:"Insert column before", +col_after_desc:"Insert column after", +delete_col_desc:"Remove column", +split_cells_desc:"Split merged table cells", +merge_cells_desc:"Merge table cells", +row_desc:"Table row properties", +cell_desc:"Table cell properties", +props_desc:"Table properties", +paste_row_before_desc:"Paste table row before", +paste_row_after_desc:"Paste table row after", +cut_row_desc:"Cut table row", +copy_row_desc:"Copy table row", +del:"Delete table", +row:"Row", +col:"Column", +cell:"Cell" +}, +autosave:{ +unload_msg:"The changes you made will be lost if you navigate away from this page." +}, +fullscreen:{ +desc:"Toggle fullscreen mode" +}, +media:{ +desc:"Insert / edit embedded media", +edit:"Edit embedded media" +}, +fullpage:{ +desc:"Document properties" +}, +template:{ +desc:"Insert predefined template content" +}, +visualchars:{ +desc:"Visual control characters on/off." +}, +spellchecker:{ +desc:"Toggle spellchecker", +menu:"Spellchecker settings", +ignore_word:"Ignore word", +ignore_words:"Ignore all", +langs:"Languages", +wait:"Please wait...", +sug:"Suggestions", +no_sug:"No suggestions", +no_mpell:"No misspellings found." +}, +pagebreak:{ +desc:"Insert page break." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/it.js b/includes/tinymce/jscripts/tiny_mce/langs/it.js index 6d919769..bfdb5a4f 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/it.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/it.js @@ -1,38 +1,154 @@ -// Variabili lingua IT - fabrix.xm@lombardiacom.it - -tinyMCELang['lang_bold_desc'] = 'Grassetto'; -tinyMCELang['lang_italic_desc'] = 'Corsivo'; -tinyMCELang['lang_underline_desc'] = 'Sottolineato'; -tinyMCELang['lang_striketrough_desc'] = 'Barrato'; -tinyMCELang['lang_justifyleft_desc'] = 'Allinea a sinistra'; -tinyMCELang['lang_justifycenter_desc'] = 'Allinea centrato'; -tinyMCELang['lang_justifyright_desc'] = 'Allinea a destra'; -tinyMCELang['lang_justifyfull_desc'] = 'Giustifica'; -tinyMCELang['lang_bullist_desc'] = 'Lista non ordinata'; -tinyMCELang['lang_numlist_desc'] = 'Lista ordinata'; -tinyMCELang['lang_outdent_desc'] = 'Rientra'; -tinyMCELang['lang_indent_desc'] = 'Indenta'; -tinyMCELang['lang_undo_desc'] = 'Annulla'; -tinyMCELang['lang_redo_desc'] = 'Ripeti'; -tinyMCELang['lang_link_desc'] = 'Inserisci link'; -tinyMCELang['lang_unlink_desc'] = 'Elimina link'; -tinyMCELang['lang_image_desc'] = 'Inserisci immagine'; -tinyMCELang['lang_cleanup_desc'] = 'Pulisci il codice'; -tinyMCELang['lang_focus_alert'] = 'Una istanza dell\' editor deve essere selezionata prima di usare questo comando.'; -tinyMCELang['lang_edit_confirm'] = 'Vuoi usare la modalit\u00E0 WYSIWYG per questa textarea?'; -tinyMCELang['lang_insert_link_title'] = 'Inserisci/modifica link'; -tinyMCELang['lang_insert'] = 'Inserisci'; -tinyMCELang['lang_update'] = 'Inserisci'; -tinyMCELang['lang_cancel'] = 'Cancella'; -tinyMCELang['lang_insert_link_url'] = 'Link URL'; -tinyMCELang['lang_insert_link_target'] = 'Target'; -tinyMCELang['lang_insert_link_target_same'] = 'Apri il link nella stessa finestra'; -tinyMCELang['lang_insert_link_target_blank'] = 'Apri il link in una nuova finestra'; -tinyMCELang['lang_insert_image_title'] = 'Inserisci/modifica immagine'; -tinyMCELang['lang_insert_image_src'] = 'URL immagine'; -tinyMCELang['lang_insert_image_alt'] = 'Descrizione dell\'immagine'; -tinyMCELang['lang_help_desc'] = 'Guida'; -tinyMCELang['lang_bold_img'] = "bold.gif"; -tinyMCELang['lang_italic_img'] = "italic.gif"; -tinyMCELang['lang_underline_img'] = "underline.gif"; -tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; +tinyMCE.addI18n({it:{ +common:{ +edit_confirm:"Usare la modalit\u00E0 WYSIWYG per questa textarea?", +apply:"Applica", +insert:"Inserisci", +update:"Aggiorna", +cancel:"Annulla", +close:"Chiudi", +browse:"Sfoglia", +class_name:"Classe", +not_set:"-- Non impostato --", +clipboard_msg:"Copia/Taglia/Incolla non \u00E8 disponibile in Mozilla e Firefox.\nSi desidera avere maggiori informazioni su questo problema?", +clipboard_no_support:"Attualmente non supportato dal browser in uso, usare le scorciatoie da tastiera.", +popup_blocked:"Spiacente, ma il blocco delle popup ha disabilitato una finestra che fornisce funzionalit\u00E0 dell'applicazione. Si deve disabilitare il blocco delle popup per questo sito per poter utlizzare appieno questo strumento.", +invalid_data:"Errore: valori inseriti non validi, sono marcati in rosso.", +more_colors:"Colori aggiuntivi" +}, +contextmenu:{ +align:"Allineamento", +left:"Allinea a sinistra", +center:"Centra", +right:"Allinea a destra", +full:"Giustifica" +}, +insertdatetime:{ +date_fmt:"%Y-%m-%d", +time_fmt:"%H:%M:%S", +insertdate_desc:"Inserisci data", +inserttime_desc:"Inserisci ora", +months_long:"Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre", +months_short:"Gen,Feb,Mar,Apr,Mag,Giu,Lug,Ago,Set,Ott,Nov,Dic", +day_long:"Domenica,Luned\u00EC,Marted\u00EC,Mercoled\u00EC,Gioved\u00EC,Venerd\u00EC,Sabato,Domenica", +day_short:"Dom,Lun,Mar,Mer,Gio,Ven,Sab,Dom" +}, +print:{ +print_desc:"Stampa" +}, +preview:{ +preview_desc:"Anteprima" +}, +directionality:{ +ltr_desc:"Direzione da sinistra a destra", +rtl_desc:"Direzione da destra a sinistra" +}, +layer:{ +insertlayer_desc:"Inserisci nuovo layer", +forward_desc:"Porta in rilievo", +backward_desc:"Porta in sfondo", +absolute_desc:"Attiva/Disattiva posizionamento assoluto", +content:"Nuovo layer..." +}, +save:{ +save_desc:"Save", +cancel_desc:"Cancella tutte le modifiche" +}, +nonbreaking:{ +nonbreaking_desc:"Inserisci uno spazio" +}, +iespell:{ +iespell_desc:"Esegui controllo ortografico", +download:"ieSpell non rilevato. Installarlo ora?" +}, +advhr:{ +advhr_desc:"Riga orizzontale" +}, +emotions:{ +emotions_desc:"Faccine" +}, +searchreplace:{ +search_desc:"Trova", +replace_desc:"Trova/Sostituisci" +}, +advimage:{ +image_desc:"Inserisci/modifica immagine" +}, +advlink:{ +link_desc:"Inserisci/modifica collegamento" +}, +xhtmlxtras:{ +cite_desc:"Citazione", +abbr_desc:"Abbreviazione", +acronym_desc:"Acronimo", +del_desc:"Cancellamento", +ins_desc:"Inserimento", +attribs_desc:"Inserisci/modifica attributi" +}, +style:{ +desc:"Modifica stile CSS" +}, +paste:{ +paste_text_desc:"Incolla come testo semplice", +paste_word_desc:"Incolla da Word", +selectall_desc:"Seleziona tutto" +}, +paste_dlg:{ +text_title:"Premere CTRL+V sulla tastiera per incollare il testo nella finestra.", +text_linebreaks:"Mantieni interruzioni di riga", +word_title:"Premere CTRL+V sulla tastiera per incollare il testo nella finestra." +}, +table:{ +desc:"Inserisci una nuova tabella", +row_before_desc:"Inserisci riga prima", +row_after_desc:"Inserisci riga dopo", +delete_row_desc:"Elimina riga", +col_before_desc:"Inserisci colonna prima", +col_after_desc:"Inserisci colonna dopo", +delete_col_desc:"Elimina colonna", +split_cells_desc:"Separa celle", +merge_cells_desc:"Unisci celle", +row_desc:"Propriet\u00E0 riga", +cell_desc:"Propriet\u00E0 cella", +props_desc:"Propriet\u00E0 tabella", +paste_row_before_desc:"Incolla riga prima", +paste_row_after_desc:"Incolla riga dopo", +cut_row_desc:"Taglia riga", +copy_row_desc:"Copia riga", +del:"Elimina tabella", +row:"Riga", +col:"Colonna", +cell:"Cella" +}, +autosave:{ +unload_msg:"I cambiamenti effettuati saranno persi se si abbandona la pagina corrente." +}, +fullscreen:{ +desc:"Attiva/disattiva modalit\u00E0 a tutto schermo" +}, +media:{ +desc:"Inserisci/modifica file multimediale", +edit:"Modifica file multimediale" +}, +fullpage:{ +desc:"Propriet\u00E0 Documento" +}, +template:{ +desc:"Inserisci contenuto da modello predefinito" +}, +visualchars:{ +desc:"Attiva/disattiva caratteri di controllo visuale." +}, +spellchecker:{ +desc:"Attiva/disattiva controllo ortografico", +menu:"Impostazioni controllo ortografico", +ignore_word:"Ignora parola", +ignore_words:"Ignora tutto", +langs:"Lingue", +wait:"Attendere prego...", +sug:"Suggerimenti", +no_sug:"Nessun suggerimento", +no_mpell:"Nessun errore rilevato." +}, +pagebreak:{ +desc:"Inserisci intterruzione di pagina." +}}}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/langs/ja.js b/includes/tinymce/jscripts/tiny_mce/langs/ja.js index e602f7f1..f2ea0776 100644 --- a/includes/tinymce/jscripts/tiny_mce/langs/ja.js +++ b/includes/tinymce/jscripts/tiny_mce/langs/ja.js @@ -1,38 +1,154 @@ -// JP lang variables - -tinyMCELang['lang_bold_desc'] = '$BB@;z(B'; -tinyMCELang['lang_italic_desc'] = '$B + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css new file mode 100644 index 00000000..0e228349 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css @@ -0,0 +1,5 @@ +input.radio {border:1px none #000; background:transparent; vertical-align:middle;} +.panel_wrapper div.current {height:80px;} +#width {width:50px; vertical-align:middle;} +#width2 {width:50px; vertical-align:middle;} +#size {width:100px;} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js index fad9d041..f3350043 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js @@ -1,2 +1 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('advhr','en,de,sv,zh_cn,cs,fa,fr_ca,fr');function TinyMCE_advhr_getControlHTML(control_name){switch(control_name){case "advhr":return '';}return "";}function TinyMCE_advhr_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=270;template['height']=180;var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'
');}else{tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;}function TinyMCE_advhr_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonNormal');if(node==null)return;do{if(node.nodeName.toLowerCase()=="hr")tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonSelected');}while((node=node.parentNode));return true;} \ No newline at end of file +(function(){tinymce.create('tinymce.plugins.AdvancedHRPlugin',{init:function(ed,url){ed.addCommand('mceAdvancedHr',function(){ed.windowManager.open({file:url+'/rule.htm',width:250+parseInt(ed.getLang('advhr.delta_width',0)),height:160+parseInt(ed.getLang('advhr.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('advhr',{title:'advhr.advhr_desc',cmd:'mceAdvancedHr'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('advhr',n.nodeName=='HR');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='HR')ed.selection.select(e);});},getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advhr',tinymce.plugins.AdvancedHRPlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js index 6711f5e3..8a847532 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js @@ -1,58 +1,54 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('advhr', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr'); - -function TinyMCE_advhr_getControlHTML(control_name) { - switch (control_name) { - case "advhr": - return ''; - } - return ""; -} - -/** - * Executes the mceAdvanceHr command. - */ -function TinyMCE_advhr_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceAdvancedHr": - var template = new Array(); - template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme - template['width'] = 270; - template['height'] = 180; - var size = "", width = "", noshade = ""; - if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr"){ - tinyMCE.hrElement = tinyMCE.selectedElement; - if (tinyMCE.hrElement) { - size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : ""; - width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : ""; - noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : ""; - } - tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'}); - } else { - if (tinyMCE.isMSIE) { - tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'
'); - } else { - tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'insert'}); - } - } - - return true; - } - // Pass to next handler in chain - return false; -} - -function TinyMCE_advhr_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonNormal'); - - if (node == null) - return; - - do { - if (node.nodeName.toLowerCase() == "hr") - tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonSelected'); - } while ((node = node.parentNode)); - - return true; -} \ No newline at end of file +/** + * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedHRPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceAdvancedHr', function() { + ed.windowManager.open({ + file : url + '/rule.htm', + width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)), + height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('advhr', { + title : 'advhr.advhr_desc', + cmd : 'mceAdvancedHr' + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('advhr', n.nodeName == 'HR'); + }); + + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'HR') + ed.selection.select(e); + }); + }, + + getInfo : function() { + return { + longname : 'Advanced HR', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advhr/images/advhr.gif b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/images/advhr.gif deleted file mode 100644 index e18bfc2a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/advhr/images/advhr.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js new file mode 100644 index 00000000..b6cbd66c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js @@ -0,0 +1,43 @@ +var AdvHRDialog = { + init : function(ed) { + var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w; + + w = dom.getAttrib(n, 'width'); + f.width.value = w ? parseInt(w) : (dom.getStyle('width') || ''); + f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || ''; + f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width'); + selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px'); + }, + + update : function() { + var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = ''; + + h = ' - - - -{$lang_insert_link_title} - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - -
{$lang_insert_advhr_desc}
{$lang_insert_advhr_width}: - - -
{$lang_insert_advhr_size}:
-
- - + + + + {#advhr.advhr_desc} + + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + +
+ + +
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css new file mode 100644 index 00000000..0a6251a6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css @@ -0,0 +1,13 @@ +#src_list, #over_list, #out_list {width:280px;} +.mceActionPanel {margin-top:7px;} +.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;} +.checkbox {border:0;} +.panel_wrapper div.current {height:305px;} +#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;} +#align, #classlist {width:150px;} +#width, #height {vertical-align:middle; width:50px; text-align:center;} +#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;} +#class_list {width:180px;} +input {width: 280px;} +#constrain, #onmousemovecheck {width:auto;} +#id, #dir, #lang, #usemap, #longdesc {width:200px;} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js index 3b491dc1..3af50573 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js @@ -1,2 +1 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('advimage','en,de,sv,zh_cn,cs,fa,fr_ca,fr');function TinyMCE_advimage_getInsertImageTemplate(){var template=new Array();template['file']='../../plugins/advimage/image.htm';template['width']=380;template['height']=380;template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);return template;}function TinyMCE_advimage_handleEvent(editor_id,body,doc){alert(editor_id+","+body.innerHTML);} \ No newline at end of file +(function(){tinymce.create('tinymce.plugins.AdvancedImagePlugin',{init:function(ed,url){ed.addCommand('mceAdvImage',function(){if(ed.dom.getAttrib(ed.selection.getNode(),'class').indexOf('mceItem')!=-1)return;ed.windowManager.open({file:url+'/image.htm',width:480+parseInt(ed.getLang('advimage.delta_width',0)),height:385+parseInt(ed.getLang('advimage.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('image',{title:'advimage.image_desc',cmd:'mceAdvImage'});},getInfo:function(){return{longname:'Advanced image',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advimage',tinymce.plugins.AdvancedImagePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js index afe15f8e..f526842e 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js @@ -1,28 +1,47 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('advimage', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr'); - -/** - * Insert image template function. - */ -function TinyMCE_advimage_getInsertImageTemplate() { - var template = new Array(); - - template['file'] = '../../plugins/advimage/image.htm'; - template['width'] = 380; - template['height'] = 380; - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0); - - return template; -} - -/** - * Setup content function. - */ -function TinyMCE_advimage_handleEvent(editor_id, body, doc) { - // Convert all links to absolute - - alert(editor_id + "," + body.innerHTML); -} +/** + * $Id: editor_plugin_src.js 677 2008-03-07 13:52:41Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedImagePlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceAdvImage', function() { + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + file : url + '/image.htm', + width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)), + height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('image', { + title : 'advimage.image_desc', + cmd : 'mceAdvImage' + }); + }, + + getInfo : function() { + return { + longname : 'Advanced image', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm index 01247197..dd84083f 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm @@ -1,315 +1,238 @@ - - - - -{$lang_insert_image_title} - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang_insert_image_title}
{$lang_insert_image_src}: - - - - -
{$lang_insert_image_alt}:
{$lang_insert_image_alt2}:
{$lang_insert_image_dimensions}: - x - px -
{$lang_insert_image_border}:
{$lang_insert_image_align}: -
{$lang_insert_image_vspace}:
{$lang_insert_image_hspace}:
{$lang_insert_image_mouseover}:
{$lang_insert_image_mouseout}:
-
- - + + + + {#advimage_dlg.dialog_title} + + + + + + + + + + +
+ + +
+
+
+ {#advimage_dlg.general} + + + + + + + + + + + + + + + + + + +
+ + + + +
 
+
+ +
+ {#advimage_dlg.preview} + +
+
+ +
+
+ {#advimage_dlg.tab_appearance} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ {#advimage_dlg.example_img} + Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam + nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum + edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam + erat volutpat. +
+
+ x + px +
  + + + + +
+
+
+
+ +
+
+ {#advimage_dlg.swap_image} + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
 
+ + + + +
 
+
+ +
+ {#advimage_dlg.misc} + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
 
+
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif new file mode 100644 index 00000000..53bf6890 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js new file mode 100644 index 00000000..64fc6f67 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js @@ -0,0 +1,441 @@ +var ImageDialog = { + preInit : function() { + var url; + + tinyMCEPopup.requireLangPack(); + + if (url = tinyMCEPopup.getParam("external_image_list_url")) + document.write(''); + }, + + init : function(ed) { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(); + + tinyMCEPopup.resizeToInnerSize(); + this.fillClassList('class_list'); + this.fillFileList('src_list', 'tinyMCEImageList'); + this.fillFileList('over_list', 'tinyMCEImageList'); + this.fillFileList('out_list', 'tinyMCEImageList'); + TinyMCE_EditableSelects.init(); + + if (n.nodeName == 'IMG') { + nl.src.value = dom.getAttrib(n, 'src'); + nl.width.value = dom.getAttrib(n, 'width'); + nl.height.value = dom.getAttrib(n, 'height'); + nl.alt.value = dom.getAttrib(n, 'alt'); + nl.title.value = dom.getAttrib(n, 'title'); + nl.vspace.value = this.getAttrib(n, 'vspace'); + nl.hspace.value = this.getAttrib(n, 'hspace'); + nl.border.value = this.getAttrib(n, 'border'); + selectByValue(f, 'align', this.getAttrib(n, 'align')); + selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true); + nl.style.value = dom.getAttrib(n, 'style'); + nl.id.value = dom.getAttrib(n, 'id'); + nl.dir.value = dom.getAttrib(n, 'dir'); + nl.lang.value = dom.getAttrib(n, 'lang'); + nl.usemap.value = dom.getAttrib(n, 'usemap'); + nl.longdesc.value = dom.getAttrib(n, 'longdesc'); + nl.insert.value = ed.getLang('update'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover'))) + nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout'))) + nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (ed.settings.inline_styles) { + // Move attribs to styles + if (dom.getAttrib(n, 'align')) + this.updateStyle('align'); + + if (dom.getAttrib(n, 'hspace')) + this.updateStyle('hspace'); + + if (dom.getAttrib(n, 'border')) + this.updateStyle('border'); + + if (dom.getAttrib(n, 'vspace')) + this.updateStyle('vspace'); + } + } + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image'); + if (isVisible('overbrowser')) + document.getElementById('onmouseoversrc').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image'); + if (isVisible('outbrowser')) + document.getElementById('onmouseoutsrc').style.width = '260px'; + + // If option enabled default contrain proportions to checked + if (ed.getParam("advimage_constrain_proportions", true)) + f.constrain.checked = true; + + // Check swap image if valid data + if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value) + this.setSwapImage(true); + else + this.setSwapImage(false); + + this.changeAppearance(); + this.showPreviewImage(nl.src.value, 1); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, t = this, f = document.forms[0]; + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (tinyMCEPopup.getParam("accessibility_warnings", 1)) { + if (!f.alt.value) { + tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) { + if (s) + t.insertAndClose(); + }); + + return; + } + } + + t.insertAndClose(); + }, + + insertAndClose : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + // Fixes crash in Safari + if (tinymce.isWebKit) + ed.getWin().focus(); + + if (!ed.settings.inline_styles) { + args = { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }; + } else { + // Remove deprecated values + args = { + vspace : '', + hspace : '', + border : '', + align : '' + }; + } + + tinymce.extend(args, { + src : nl.src.value, + width : nl.width.value, + height : nl.height.value, + alt : nl.alt.value, + title : nl.title.value, + 'class' : getSelectValue(f, 'class_list'), + style : nl.style.value, + id : nl.id.value, + dir : nl.dir.value, + lang : nl.lang.value, + usemap : nl.usemap.value, + longdesc : nl.longdesc.value + }); + + args.onmouseover = args.onmouseout = ''; + + if (f.onmousemovecheck.checked) { + if (nl.onmouseoversrc.value) + args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';"; + + if (nl.onmouseoutsrc.value) + args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';"; + } + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); + ed.dom.setAttribs('__mce_tmp', args); + ed.dom.setAttrib('__mce_tmp', 'id', ''); + ed.undoManager.add(); + } + + tinyMCEPopup.close(); + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + setSwapImage : function(st) { + var f = document.forms[0]; + + f.onmousemovecheck.checked = st; + setBrowserDisabled('overbrowser', !st); + setBrowserDisabled('outbrowser', !st); + + if (f.over_list) + f.over_list.disabled = !st; + + if (f.out_list) + f.out_list.disabled = !st; + + f.onmouseoversrc.disabled = !st; + f.onmouseoutsrc.disabled = !st; + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.elements.width.value = f.elements.height.value = ''; + }, + + updateImageData : function(img, st) { + var f = document.forms[0]; + + if (!st) { + f.elements.width.value = img.width; + f.elements.height.value = img.height; + } + + this.preloadImg = img; + }, + + changeAppearance : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg'); + + if (img) { + if (ed.getParam('inline_styles')) { + ed.dom.setAttrib(img, 'style', f.style.value); + } else { + img.align = f.align.value; + img.border = f.border.value; + img.hspace = f.hspace.value; + img.vspace = f.vspace.value; + } + } + }, + + changeHeight : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height; + f.height.value = tp.toFixed(0); + }, + + changeWidth : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width; + f.width.value = tp.toFixed(0); + }, + + updateStyle : function(ty) { + var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); + + if (tinyMCEPopup.editor.settings.inline_styles) { + // Handle align + if (ty == 'align') { + dom.setStyle(img, 'float', ''); + dom.setStyle(img, 'vertical-align', ''); + + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') + dom.setStyle(img, 'float', v); + else + img.style.verticalAlign = v; + } + } + + // Handle border + if (ty == 'border') { + dom.setStyle(img, 'border', ''); + + v = f.border.value; + if (v || v == '0') { + if (v == '0') + img.style.border = '0'; + else + img.style.border = v + 'px solid black'; + } + } + + // Handle hspace + if (ty == 'hspace') { + dom.setStyle(img, 'marginLeft', ''); + dom.setStyle(img, 'marginRight', ''); + + v = f.hspace.value; + if (v) { + img.style.marginLeft = v + 'px'; + img.style.marginRight = v + 'px'; + } + } + + // Handle vspace + if (ty == 'vspace') { + dom.setStyle(img, 'marginTop', ''); + dom.setStyle(img, 'marginBottom', ''); + + v = f.vspace.value; + if (v) { + img.style.marginTop = v + 'px'; + img.style.marginBottom = v + 'px'; + } + } + + // Merge + dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); + } + }, + + changeMouseMove : function() { + }, + + showPreviewImage : function(u, st) { + if (!u) { + tinyMCEPopup.dom.setHTML('prev', ''); + return; + } + + if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true)) + this.resetImageData(); + + u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u); + + if (!st) + tinyMCEPopup.dom.setHTML('prev', ''); + else + tinyMCEPopup.dom.setHTML('prev', ''); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ar_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ar_dlg.js new file mode 100644 index 00000000..21953310 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ar_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ar.advimage_dlg',{ +tab_general:"\u0639\u0627\u0645", +tab_appearance:"\u0627\u0644\u0645\u0638\u0647\u0631", +tab_advanced:"\u0645\u062A\u0642\u062F\u0645", +general:"\u0639\u0627\u0645", +title:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646", +preview:"\u0645\u0639\u0627\u064A\u0646\u0629", +constrain_proportions:"\u062A\u0637\u0627\u0628\u0642 \u0627\u0644\u0623\u0628\u0639\u0627\u062F", +langdir:"\u0627\u062A\u062C\u0627\u0647 \u0627\u0644\u0644\u063A\u0629", +langcode:"\u0631\u0645\u0632 \u0627\u0644\u0644\u063A\u0629", +long_desc:"\u0648\u0635\u0641 \u0627\u0644\u0631\u0627\u0628\u0637", +style:"\u0623\u0633\u0644\u0648\u0628", +classes:"\u0641\u0626\u0627\u062A", +ltr:"\u064A\u0633\u0627\u0631 \u0627\u0644\u0649 \u064A\u0645\u064A\u0646", +rtl:"\u064A\u0645\u064A\u0646 \u0627\u0644\u0649 \u064A\u0633\u0627\u0631", +id:"\u0627\u0644\u0645\u0639\u0631\u0641 Id", +map:"\u0635\u0648\u0631\u0629 \u0627\u0644\u062E\u0631\u064A\u0637\u0629", +swap_image:"\u0635\u0648\u0631\u0629 \u0645\u0642\u0627\u064A\u0636\u0629", +alt_image:"\u0635\u0648\u0631\u0629 \u0628\u062F\u064A\u0644\u0629", +mouseover:"\u0639\u0646\u062F \u062F\u062E\u0648\u0644 \u0627\u0644\u0641\u0623\u0631\u0629 \u0644\u0644\u0645\u0646\u0637\u0642\u0629", +mouseout:"\u0639\u0646\u062F \u062E\u0631\u0648\u062C \u0627\u0644\u0641\u0623\u0631\u0629 \u0645\u0646 \u0627\u0644\u0645\u0646\u0637\u0642\u0629", +misc:"\u0645\u062A\u0646\u0648\u0639\u0629", +example_img:"\u0638\u0647\u0648\u0631 \u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0639\u0627\u064A\u0646\u0629", +missing_alt:"\u0647\u0644 \u062A\u0631\u064A\u062F \u0627\u0644\u0625\u0633\u062A\u0645\u0631\u0627\u0631 \u062D\u0642\u0627 \u0628\u062F\u0648\u0646 \u0627\u0636\u0627\u0641\u0629 \u0648\u0635\u0641 \u0627\u0644\u0635\u0648\u0631\u0629? \u0645\u0646 \u062F\u0648\u0646\u0647\u0627 \u0644\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0635\u0648\u0631\u0629 \u0642\u0627\u0628\u0644\u0629 \u0644\u0644\u0627\u0633\u062A\u0639\u0645\u0627\u0644 \u0645\u0646 \u0637\u0631\u0641 \u0628\u0639\u0636 \u0627\u0644\u0632\u0648\u0627\u0631 \u0645\u0639 \u0628\u0639\u0636 \u0627\u0644\u0627\u0639\u0627\u0642\u0627\u062A\u060C \u0623\u0648 \u0627\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0630\u064A\u0646 \u064A\u0633\u062A\u0639\u0645\u0644\u0648\u0646 \u0645\u062A\u0635\u0641\u062D\u0627\u062A \u0646\u0635\u064A\u0629 \u0623\u0648 \u064A\u0633\u062A\u0639\u0645\u0644\u0648\u0646 \u0627\u0644\u0645\u062A\u0635\u0641\u062D \u0645\u0646 \u062F\u0648\u0646 \u0639\u0631\u0636 \u0627\u0644\u0635\u0648\u0631.", +dialog_title:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u0635\u0648\u0631\u0629", +src:"\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0629", +alt:"\u0648\u0635\u0641 \u0627\u0644\u0635\u0648\u0631\u0629", +list:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0635\u0648\u0631", +border:"\u0627\u0644\u062D\u062F\u0648\u062F", +dimensions:"\u0627\u0644\u0623\u0628\u0639\u0627\u062F", +vspace:"\u0645\u0633\u0627\u0641\u0629 \u0639\u0645\u0648\u062F\u064A\u0629", +hspace:"\u0645\u0633\u0627\u0641\u0629 \u0627\u0641\u0642\u064A\u0629", +align:"\u0645\u062D\u0627\u0630\u0627\u0629", +align_baseline:"\u062E\u0637 \u0627\u0644\u0642\u0627\u0639\u062F\u0629", +align_top:"\u0623\u0639\u0644\u0649", +align_middle:"\u0648\u0633\u0637", +align_bottom:"\u0623\u0633\u0641\u0644", +align_texttop:"\u0623\u0639\u0644\u0649 \u0627\u0644\u0646\u0635", +align_textbottom:"\u0623\u0633\u0641\u0644 \u0627\u0644\u0646\u0635", +align_left:"\u064A\u0633\u0627\u0631", +align_right:"\u064A\u0645\u064A\u0646", +image_list:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0635\u0648\u0631" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/bg_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/bg_dlg.js new file mode 100644 index 00000000..e6e8f180 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/bg_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('bg.advimage_dlg',{ +tab_general:"\u041E\u0431\u0449\u0438", +tab_appearance:"\u0412\u044A\u043D\u0448\u0435\u043D \u0432\u0438\u0434", +tab_advanced:"\u0417\u0430 \u043D\u0430\u043F\u0440\u0435\u0434\u043D\u0430\u043B\u0438", +general:"\u041E\u0431\u0449\u0438", +title:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435", +preview:"\u041F\u0440\u0435\u0433\u043B\u0435\u0434", +constrain_proportions:"\u041E\u0433\u0440\u0430\u043D\u0438\u0447\u0438 \u043F\u0440\u043E\u043F\u043E\u0440\u0446\u0438\u0438\u0442\u0435", +langdir:"\u041F\u043E\u0441\u043E\u043A\u0430 \u043D\u0430 \u0435\u0437\u0438\u043A\u0430", +langcode:"\u041A\u043E\u0434 \u043D\u0430 \u0435\u0437\u0438\u043A\u0430", +long_desc:"\u0425\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430 \u043A\u044A\u043C \u0434\u044A\u043B\u0433\u043E \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435", +style:"\u0421\u0442\u0438\u043B", +classes:"\u041A\u043B\u0430\u0441\u043E\u0432\u0435", +ltr:"\u041E\u0442\u043B\u044F\u0432\u043E \u043D\u0430 \u0434\u044F\u0441\u043D\u043E", +rtl:"\u041E\u0442\u0434\u044F\u0441\u043D\u043E \u043D\u0430 \u043B\u044F\u0432\u043E", +id:"Id", +map:"\u041A\u0430\u0440\u0442\u0438\u043D\u0430 \u043A\u0430\u0440\u0442\u0430", +swap_image:"\u0421\u043C\u0435\u043D\u0438 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +alt_image:"\u0420\u0435\u0437\u0435\u0440\u0432\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +mouseover:"\u0437\u0430 mouse over", +mouseout:"\u0437\u0430 mouse out", +misc:"\u0420\u0430\u0437\u043D\u0438", +example_img:"\u041F\u0440\u0435\u0433\u043B\u0435\u0434 \u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430\u0442\u0430", +missing_alt:"\u0421\u0438\u0433\u0443\u0440\u0435\u043D \u043B\u0438 \u0441\u0442\u0435 \u0447\u0435 \u0436\u0435\u043B\u0430\u0435\u0442\u0435 \u0434\u0430 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435 \u0431\u0435\u0437 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430\u0442\u0430? \u0411\u0435\u0437 \u043D\u0435\u0433\u043E \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430\u0442\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0435 \u043D\u0435\u0434\u043E\u0441\u0442\u044A\u043F\u043D\u0430 \u0437\u0430 \u043D\u044F\u043A\u043E\u0438 \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u0438 \u0441 \u043D\u0435\u0434\u044A\u0437\u0438, \u0438\u043B\u0438 \u0437\u0430 \u0442\u0435\u0437\u0438 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0449\u0438 \u0442\u0435\u043A\u0441\u0442\u043E\u0432 \u0431\u0440\u0430\u0443\u0437\u044A\u0440, \u0438\u043B\u0438 \u0438\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0449\u0438 \u0418\u043D\u0442\u0435\u0440\u043D\u0435\u0442 \u0441 \u0438\u0437\u043A\u043B\u044E\u0447\u0435\u043D\u0438 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438.", +dialog_title:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +src:"URL \u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +alt:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +list:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438", +border:"\u0420\u0430\u043C\u043A\u0430", +dimensions:"\u0420\u0430\u0437\u043C\u0435\u0440\u0438", +vspace:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u043D\u043E \u0440\u0430\u0437\u0441\u0442\u043E\u044F\u043D\u0438\u0435", +hspace:"\u0425\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u043D\u043E \u0440\u0430\u0437\u0441\u0442\u043E\u044F\u043D\u0438\u0435", +align:"\u041F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435", +align_baseline:"\u0411\u0430\u0437\u043E\u0432\u0430 \u043B\u0438\u043D\u0438\u044F", +align_top:"\u0413\u043E\u0440\u0435", +align_middle:"\u0426\u0435\u043D\u0442\u044A\u0440", +align_bottom:"\u0414\u043E\u043B\u0443", +align_texttop:"\u0422\u0435\u043A\u0441\u0442 \u0433\u043E\u0440\u0435", +align_textbottom:"\u0422\u0435\u043A\u0441\u0442 \u0434\u043E\u043B\u0443", +align_left:"\u041B\u044F\u0432\u043E", +align_right:"\u0414\u044F\u0441\u043D\u043E", +image_list:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/br_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/br_dlg.js new file mode 100644 index 00000000..ace868c6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/br_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('br.advimage_dlg',{ +tab_general:"Geral", +tab_appearance:"Apar\u00C3\u0083\u00C2\u00AAncia", +tab_advanced:"Avan\u00C3\u0083\u00C2\u00A7ado", +general:"Geral", +title:"T\u00C3\u0083\u00C2\u00ADtulo", +preview:"Pr\u00C3\u0083\u00C2\u00A9-Visualiza\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +constrain_proportions:"Manter propor\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00B5es", +langdir:"Direc\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o do texto", +langcode:"C\u00C3\u0083\u00C2\u00B3digo de idioma", +long_desc:"Descri\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o extensa", +style:"Estilo", +classes:"Classes", +ltr:"Da esquerda para a direita", +rtl:"Da direita para a esquerda", +id:"Id", +map:"Mapa de imagem", +swap_image:"Trocar imagem", +alt_image:"Imagem alternativa", +mouseover:"mouseover", +mouseout:"mouseout", +misc:"Misto", +example_img:"Pr\u00C3\u0083\u00C2\u00A9-visualiza\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +missing_alt:"Tem a certeza que deseja continuar sem acrescentar uma descri\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o \u00C3\u0083\u00C2\u00A0\u00C3\u0082\u00C2\u00A0imagem? (Isto pode gerar problemas de acessibilidade em alguns navegadores)", +dialog_title:"Inserir/editar imagem", +src:"Endere\u00C3\u0083\u00C2\u00A7o da imagem", +alt:"Descri\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o da imagem", +list:"Lista de imagens", +border:"Limite", +dimensions:"Dimens\u00C3\u0083\u00C2\u00B5es", +vspace:"Espa\u00C3\u0083\u00C2\u00A7o vertical", +hspace:"Espa\u00C3\u0083\u00C2\u00A7o horizontal", +align:"Alinhamento", +align_baseline:"Sobre a linha de texto", +align_top:"Topo", +align_middle:"Meio", +align_bottom:"Abaixo", +align_texttop:"Topo do texto", +align_textbottom:"Base do texto", +align_left:"Esquerda", +align_right:"Direita", +image_list:"Lista de imagens" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/bs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/bs_dlg.js new file mode 100644 index 00000000..43f39469 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/bs_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('bs.advimage_dlg',{ +tab_general:"Osnovno", +tab_appearance:"Izgled", +tab_advanced:"Napredno", +general:"Osnovno", +title:"Naslov", +preview:"Prikaz", +constrain_proportions:"Zadr\u017Ei proporcije", +langdir:"Smjer jezika", +langcode:"Kod jezika", +long_desc:"Poveznica dugog opisa", +style:"Stil", +classes:"Klase", +ltr:"S lijeva na desno", +rtl:"S desna na lijevo", +id:"Id", +map:"Karta slike", +swap_image:"Izmjenjiva slika", +alt_image:"Alternativna slika", +mouseover:"za prelazak mi\u0161a preko slike", +mouseout:"za izlazak mi\u0161a van slike", +misc:"Razno", +example_img:"Prikaz slike", +missing_alt:"Jeste li sigurni da \u017Eelite izostaviti opis slike? Slika mo\u017Ee biti nedostupna ljudima s pote\u0161ko\u0107ama ili onima koji koriste preglednike bez prikaza slika.", +dialog_title:"Umetni/uredi sliku", +src:"URL slike", +alt:"Opis slike", +list:"Lista slika", +border:"Obrub", +dimensions:"Dimenzije", +vspace:"Okomiti razmak", +hspace:"Vodoravni razmak", +align:"Poravnavanje", +align_baseline:"Osnovna linija", +align_top:"Vrh", +align_middle:"Sredina", +align_bottom:"Dno", +align_texttop:"Vrh teksta", +align_textbottom:"Dno teksta", +align_left:"Lijevo", +align_right:"Desno", +image_list:"Lista slika" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ca_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ca_dlg.js new file mode 100644 index 00000000..1179f7cb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ca_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ca.advimage_dlg',{ +tab_general:"General", +tab_appearance:"Aparen\u00E7a", +tab_advanced:"Avan\u00E7at", +general:"General", +title:"T\u00EDtol", +preview:"Vista pr\u00E8via", +constrain_proportions:"Constreny les proporcions", +langdir:"Direcci\u00F3 de l'idioma", +langcode:"Codi de l'idioma", +long_desc:"Descripci\u00F3 llarga", +style:"Estil", +classes:"Classes", +ltr:"D'esquerra a dreta", +rtl:"De dreta a esquerra", +id:"Id", +map:"Mapa d'imatge", +swap_image:"Canvi d'imatge", +alt_image:"Imatge alternativa", +mouseover:"amb el ratol\u00ED a sobre", +mouseout:"amb el ratol\u00ED fora", +misc:"Miscel\u00B7l\u00E0nia", +example_img:"Aparen\u00E7a imatge previsualitzada", +missing_alt:"Segur que vols continuar sense incloure cap Descripci\u00F3 d'Imatge? Sense ella, la imatge no ser\u00E0 accessible a usuaris amb discapacitats, o a aquells que utilitzin un navegador de text, o els que naveguin amb les imatges desactivades.", +dialog_title:"Insereix/edita imatge", +src:"URL de la imatge", +alt:"Descripci\u00F3 de la imatge", +list:"Llista d'imatges", +border:"Vora", +dimensions:"Dimensions", +vspace:"Espaiat vertical", +hspace:"Espaiat horitzontal", +align:"Alineaci\u00F3", +align_baseline:"L\u00EDnia base", +align_top:"Dalt", +align_middle:"Mig", +align_bottom:"Baix", +align_texttop:"A dalt del text", +align_textbottom:"A baix del text", +align_left:"Esquerra", +align_right:"Dreta", +image_list:"Llista d'imatges" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ch_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ch_dlg.js new file mode 100644 index 00000000..e82cf3fb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ch_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ch.advimage_dlg',{ +tab_general:"\u4E00\u822C", +tab_appearance:"\u5916\u89C2", +tab_advanced:"\u8FDB\u9636", +general:"\u4E00\u822C", +title:"\u6807\u9898", +preview:"\u9884\u89C8", +constrain_proportions:"\u7EF4\u6301\u6BD4\u4F8B", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +long_desc:"\u957F\u63CF\u8FF0\u94FE\u63A5", +style:"\u6837\u5F0F", +classes:"\u7C7B\u522B", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +id:"ID", +map:"\u56FE\u7247Map", +swap_image:"\u56FE\u7247\u5207\u6362", +alt_image:"\u66FF\u6362\u56FE\u7247", +mouseover:"\u6E38\u6807\u901A\u8FC7", +mouseout:"\u5149\u6807\u79FB\u51FA", +misc:"\u5176\u5B83", +example_img:"\u56FE\u7247\u9884\u89C8\u5916\u89C2", +missing_alt:"\u786E\u5B9A\u4E0D\u4E3A\u56FE\u7247\u52A0\u4E0A\u8BF4\u660E\u5417\uFF1F\u6CA1\u6709\u8BF4\u660E\u7684\u56FE\u7247\uFF0C\u5C06\u65E0\u6CD5\u5728\u4E0D\u652F\u6301\u56FE\u7247\u6863\u663E\u793A\u7684\u6D4F\u89C8\u5668\u4E2D\u88AB\u5B58\u53D6\u3002 ", +dialog_title:"\u63D2\u5165/\u7F16\u8F91\u56FE\u7247", +src:"\u56FE\u7247URL", +alt:"\u56FE\u7247\u8BF4\u660E", +list:"\u56FE\u7247\u6863\u6E05\u5355", +border:"\u8FB9\u6846", +dimensions:"\u5C3A\u5BF8", +vspace:"\u5782\u76F4\u95F4\u8DDD", +hspace:"\u6C34\u5E73\u95F4\u8DDD", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_baseline:"\u57FA\u7EBF", +align_top:"\u7F6E\u9876", +align_middle:"\u7F6E\u4E2D", +align_bottom:"\u7F6E\u5E95", +align_texttop:"\u6587\u5B57\u4E0A\u65B9", +align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +align_left:"\u7F6E\u5DE6", +align_right:"\u7F6E\u53F3", +image_list:"\u56FE\u7247\u6863\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/cs.js deleted file mode 100644 index 1310fd39..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/cs.js +++ /dev/null @@ -1,6 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insert_image_alt2'] = 'Název obrázku'; -tinyMCELang['lang_insert_image_onmousemove'] = 'Alternativní obrázek' -tinyMCELang['lang_insert_image_mouseover'] = 'pøi najetí myši'; -tinyMCELang['lang_insert_image_mouseout'] = 'pøi odjetí myši'; \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/cs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/cs_dlg.js new file mode 100644 index 00000000..5c56da8c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/cs_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('cs.advimage_dlg',{ +tab_general:"Hlavn\u00ED", +tab_appearance:"Vzhled", +tab_advanced:"Pokro\u010Dil\u00E9", +general:"V\u0161eobecn\u00E9", +title:"Titulek", +preview:"N\u00E1hled", +constrain_proportions:"Zachovat proporce", +langdir:"Sm\u011Br textu", +langcode:"K\u00F3d jazyka", +long_desc:"Dlouh\u00FD popis", +style:"Styl", +classes:"T\u0159\u00EDdy", +ltr:"Zleva doprava", +rtl:"Zprava doleva", +id:"ID", +map:"Obr\u00E1zkov\u00E1 mapa", +swap_image:"P\u0159epnout obr\u00E1zek", +alt_image:"Alternativn\u00ED obr\u00E1zek", +mouseover:"P\u0159i najet\u00ED my\u0161i...", +mouseout:"Po odjet\u00ED my\u0161i...", +misc:"R\u016Fzn\u00E9", +example_img:"P\u0159\u00EDklad obr\u00E1zku", +missing_alt:"Jste si jisti, \u017Ee chcete pokra\u010Dovat bez vlo\u017Een\u00ED popisu obr\u00E1zku? Obr\u00E1zek m\u016F\u017Ee b\u00FDt nep\u0159\u00EDstupn\u00FD u\u017Eivatel\u016Fm se zrakov\u00FDm posti\u017Een\u00EDm, u\u017Eivatel\u016Fm textov\u00FDch prohl\u00ED\u017Ee\u010D\u016F nebo u\u017Eivatel\u016Fm, kte\u0159\u00ED maj\u00ED vypnuto zobrazov\u00E1n\u00ED obr\u00E1zk\u016F.", +dialog_title:"Vlo\u017Eit/upravit obr\u00E1zek", +src:"URL obr\u00E1zku", +alt:"Popis obr\u00E1zku", +list:"Seznam", +border:"R\u00E1me\u010Dek", +dimensions:"Rozm\u011Bry", +vspace:"Vertik\u00E1ln\u00ED mezera", +hspace:"Horizont\u00E1ln\u00ED mezera", +align:"Zarovn\u00E1n\u00ED", +align_baseline:"Na z\u00E1kladnu", +align_top:"Nahoru", +align_middle:"Na st\u0159ed \u0159\u00E1dku", +align_bottom:"Dol\u016F", +align_texttop:"S vrchem \u0159\u00E1dku", +align_textbottom:"Se spodkem \u0159\u00E1dku", +align_left:"Vlevo", +align_right:"Vpravo", +image_list:"Seznam obr\u00E1zk\u016F" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/da_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/da_dlg.js new file mode 100644 index 00000000..6786ab1a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/da_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('da.advimage_dlg',{ +tab_general:"Generelt", +tab_appearance:"Udseende", +tab_advanced:"Avanceret", +general:"Generelt", +title:"Titel", +preview:"Vis", +constrain_proportions:"Bibehold proportioner", +langdir:"Sprogretning", +langcode:"Sprogkode", +long_desc:"Lang beskrivelseslink", +style:"Stil", +classes:"Klasser", +ltr:"Venstre til h\u00F8jre", +rtl:"H\u00F8jre til venstre", +id:"Id", +map:"Billede map", +swap_image:"Byt billede", +alt_image:"Alternativt billede", +mouseover:"for mus-over", +mouseout:"for mus-ud", +misc:"Diverse", +example_img:"Forh\u00E5ndsvisning af billede", +missing_alt:"Er du sikker p\u00E5, at du vil forts\u00E6tte uden at inkludere en billedebeskrivelse? Uden denne er billedet m\u00E5ske ikke tilg\u00E6ngeligt for nogle brugere med handicaps, eller for dem der bruger en tekstbrowser, eller som browser internettet med billeder sl\u00E5et fra.", +dialog_title:"Inds\u00E6t/rediger billede", +src:"Billed-URL", +alt:"Billedbeskrivelse", +list:"Billedliste", +border:"Kant", +dimensions:"Dimentioner", +vspace:"Vertikal afstand", +hspace:"Horisontal afstand", +align:"Justering", +align_baseline:"Grundlinje", +align_top:"Top", +align_middle:"Midte", +align_bottom:"Bund", +align_texttop:"Teksttop", +align_textbottom:"Tekstbund", +align_left:"Venstre", +align_right:"H\u00F8jre", +image_list:"Billedliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/de.js deleted file mode 100644 index 71650a1c..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/de.js +++ /dev/null @@ -1,6 +0,0 @@ -// DE lang variables - -tinyMCELang['lang_insert_image_alt2'] = 'Titel des Bildes'; -tinyMCELang['lang_insert_image_onmousemove'] = 'Alternatives Bild' -tinyMCELang['lang_insert_image_mouseover'] = 'für Maus darüber'; -tinyMCELang['lang_insert_image_mouseout'] = 'für Maus ausserhalb'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/de_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/de_dlg.js new file mode 100644 index 00000000..1e7983d8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/de_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('de.advimage_dlg',{ +tab_general:"Allgemein", +tab_appearance:"Aussehen", +tab_advanced:"Erweitert", +general:"Allgemein", +title:"Titel", +preview:"Vorschau", +constrain_proportions:"Ausma\u00DFe", +langdir:"Schriftrichtung", +langcode:"Sprachcode", +long_desc:"Ausf\u00FChrliche Beschreibung", +style:"Format", +classes:"Klassen", +ltr:"Links nach rechts", +rtl:"Rechts nach links", +id:"ID", +map:"Image-Map", +swap_image:"Bild austauschen", +alt_image:"Alternatives Bild", +mouseover:"bei Mauskontakt", +mouseout:"bei keinem Mauskontakt", +misc:"Verschiedenes", +example_img:"Aussehen der Vorschau", +missing_alt:"Wollen Sie wirklich keine Beschreibung eingeben? Bestimmte Benutzer mit k\u00F6rperlichen Einschr\u00E4nkungen k\u00F6nnen so nicht darauf zugrifen, ebenso solche, die einen Textbrowser benutzen oder die Anzeige von Bildern deaktiviert haben.", +dialog_title:"Bild einf\u00FCgen/bearbeiten", +src:"Adresse", +alt:"Beschreibung", +list:"Bilderliste", +border:"Rahmen", +dimensions:"Ausma\u00DFe", +vspace:"Vertikaler Abstand", +hspace:"Horizontaler Abstand", +align:"Ausrichtung", +align_baseline:"Zeile", +align_top:"Oben", +align_middle:"Mittig", +align_bottom:"Unten", +align_texttop:"Oben im Text", +align_textbottom:"Unten im Text", +align_left:"Links", +align_right:"Rechts", +image_list:"Bilderliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/dv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/dv_dlg.js new file mode 100644 index 00000000..28254664 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/dv_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('dv.advimage_dlg',{ +tab_general:"General", +tab_appearance:"Appearance", +tab_advanced:"Advanced", +general:"General", +title:"Title", +preview:"Preview", +constrain_proportions:"Constrain proportions", +langdir:"Language direction", +langcode:"Language code", +long_desc:"Long description link", +style:"Style", +classes:"Classes", +ltr:"Left to right", +rtl:"Right to left", +id:"Id", +map:"Image map", +swap_image:"Swap image", +alt_image:"Alternative image", +mouseover:"for mouse over", +mouseout:"for mouse out", +misc:"Miscellaneous", +example_img:"Appearance preview image", +missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", +dialog_title:"Insert/edit image", +src:"Image URL", +alt:"Image description", +list:"Image list", +border:"Border", +dimensions:"Dimensions", +vspace:"Vertical space", +hspace:"Horizontal space", +align:"Alignment", +align_baseline:"Baseline", +align_top:"Top", +align_middle:"Middle", +align_bottom:"Bottom", +align_texttop:"Text top", +align_textbottom:"Text bottom", +align_left:"Left", +align_right:"Right", +image_list:"Image list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/el_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/el_dlg.js new file mode 100644 index 00000000..a480351d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/el_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('el.advimage_dlg',{ +tab_general:"\u0393\u03B5\u03BD\u03B9\u03BA\u03AC", +tab_appearance:"\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7", +tab_advanced:"\u0393\u03B9\u03B1 \u03C0\u03C1\u03BF\u03C7\u03C9\u03C1\u03B7\u03BC\u03AD\u03BD\u03BF\u03C5\u03C2", +general:"\u0393\u03B5\u03BD\u03B9\u03BA\u03AC", +title:"\u03A4\u03AF\u03C4\u03BB\u03BF\u03C2", +preview:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03C3\u03BA\u03CC\u03C0\u03B7\u03C3\u03B7", +constrain_proportions:"\u0394\u03B9\u03B1\u03C4\u03AE\u03C1\u03B7\u03C3\u03B7 \u03B1\u03BD\u03B1\u03BB\u03BF\u03B3\u03AF\u03B1\u03C2 \u03C0\u03BB. - \u03CD\u03C8\u03BF\u03C5\u03C2", +langdir:"\u039A\u03B1\u03C4\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2", +langcode:"\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2", +long_desc:"\u03A3\u03CD\u03BD\u03B4\u03B5\u03C3\u03BC\u03BF\u03C2 \u03C0\u03BB\u03AE\u03C1\u03BF\u03C5\u03C2 \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE\u03C2", +style:"\u03A3\u03C4\u03C5\u03BB", +classes:"\u039A\u03BB\u03AC\u03C3\u03B5\u03B9\u03C2", +ltr:"\u0391\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC \u03C0\u03C1\u03BF\u03C2 \u03B4\u03B5\u03BE\u03B9\u03AC", +rtl:"\u0394\u03B5\u03BE\u03B9\u03AC \u03C0\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +id:"Id", +map:"\u03A7\u03AC\u03C1\u03C4\u03B7\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +swap_image:"\u0391\u03BD\u03C4\u03B1\u03BB\u03BB\u03B1\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +alt_image:"\u0395\u03BD\u03B1\u03BB\u03BB\u03B1\u03BA\u03C4\u03B9\u03BA\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1", +mouseover:"\u03B3\u03B9\u03B1 mouse over", +mouseout:"\u03B3\u03B9\u03B1 mouse out", +misc:"\u0394\u03B9\u03AC\u03C6\u03BF\u03C1\u03B1", +example_img:"\u0394\u03BF\u03BA\u03B9\u03BC\u03B1\u03C3\u03C4\u03B9\u03BA\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1", +missing_alt:"\u03A3\u03AF\u03B3\u03BF\u03C5\u03C1\u03B1 \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03C3\u03C5\u03BD\u03B5\u03C7\u03AF\u03C3\u03B5\u03C4\u03B5 \u03C7\u03C9\u03C1\u03AF\u03C2 \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2; \u03A7\u03C9\u03C1\u03AF\u03C2 \u03B1\u03C5\u03C4\u03AE\u03BD\u03B7 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03BC\u03B7\u03BD \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03C1\u03BF\u03C3\u03B2\u03AC\u03C3\u03B9\u03BC\u03B7 \u03C3\u03B5 \u03BA\u03AC\u03C0\u03BF\u03B9\u03BF\u03C5\u03C2 \u03C7\u03C1\u03AE\u03C3\u03C4\u03B5\u03C2 \u03BC\u03B5 \u03C0\u03C1\u03BF\u03B2\u03BB\u03AE\u03BC\u03B1\u03C4\u03B1, \u03AE \u03C3'\u03B1\u03C5\u03C4\u03BF\u03CD\u03C2 \u03C0\u03BF\u03C5 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03BF\u03CD\u03BD \u03C6\u03C5\u03BB\u03BB\u03BF\u03BC\u03B5\u03C4\u03C1\u03B7\u03C4\u03AE \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5, \u03AE \u03B2\u03BB\u03AD\u03C0\u03BF\u03C5\u03BD \u03C4\u03BF \u0399\u03BD\u03C4\u03B5\u03C1\u03BD\u03B5\u03C4 \u03C7\u03C9\u03C1\u03AF\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2.", +dialog_title:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +src:"\u0394\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +alt:"\u03A0\u03B5\u03C1\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +list:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD", +border:"\u03A0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF", +dimensions:"\u0394\u03B9\u03B1\u03C3\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2", +vspace:"\u0391\u03C0\u03CC\u03C3\u03C4\u03B1\u03C3\u03B7 \u03BA\u03AC\u03B8\u03B5\u03C4\u03B7", +hspace:"\u0391\u03C0\u03CC\u03C3\u03C4\u03B1\u03C3\u03B7 \u03BF\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B1", +align:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7", +align_baseline:"\u0393\u03C1\u03B1\u03BC\u03BC\u03AE \u03C3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AC\u03C4\u03C9\u03BD", +align_top:"\u03A0\u03AC\u03BD\u03C9", +align_middle:"\u039C\u03AD\u03C3\u03B7", +align_bottom:"\u039A\u03AC\u03C4\u03C9", +align_texttop:"\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03C0\u03AC\u03BD\u03C9", +align_textbottom:"\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03BA\u03AC\u03C4\u03C9", +align_left:"\u0391\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +align_right:"\u0394\u03B5\u03BE\u03B9\u03AC", +image_list:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en.js deleted file mode 100644 index 37c58a15..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en.js +++ /dev/null @@ -1,6 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insert_image_alt2'] = 'Image title'; -tinyMCELang['lang_insert_image_onmousemove'] = 'Alternative image' -tinyMCELang['lang_insert_image_mouseover'] = 'for mouse over'; -tinyMCELang['lang_insert_image_mouseout'] = 'for mouse out'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js new file mode 100644 index 00000000..f493d196 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('en.advimage_dlg',{ +tab_general:"General", +tab_appearance:"Appearance", +tab_advanced:"Advanced", +general:"General", +title:"Title", +preview:"Preview", +constrain_proportions:"Constrain proportions", +langdir:"Language direction", +langcode:"Language code", +long_desc:"Long description link", +style:"Style", +classes:"Classes", +ltr:"Left to right", +rtl:"Right to left", +id:"Id", +map:"Image map", +swap_image:"Swap image", +alt_image:"Alternative image", +mouseover:"for mouse over", +mouseout:"for mouse out", +misc:"Miscellaneous", +example_img:"Appearance preview image", +missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", +dialog_title:"Insert/edit image", +src:"Image URL", +alt:"Image description", +list:"Image list", +border:"Border", +dimensions:"Dimensions", +vspace:"Vertical space", +hspace:"Horizontal space", +align:"Alignment", +align_baseline:"Baseline", +align_top:"Top", +align_middle:"Middle", +align_bottom:"Bottom", +align_texttop:"Text top", +align_textbottom:"Text bottom", +align_left:"Left", +align_right:"Right", +image_list:"Image list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/es_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/es_dlg.js new file mode 100644 index 00000000..0930e305 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/es_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('es.advimage_dlg',{ +tab_general:"General", +tab_appearance:"Apariencia", +tab_advanced:"Avanzado", +general:"General", +title:"T\u00EDtulo", +preview:"Vista previa", +constrain_proportions:"Bloquear relaci\u00F3n de aspecto", +langdir:"Direcci\u00F3n del lenguaje", +langcode:"C\u00F3digo del lenguaje", +long_desc:"V\u00EDnculo para descripci\u00F3n larga", +style:"Estilos", +classes:"Clases", +ltr:"Izquierda a derecha", +rtl:"Derecha a izquierda", +id:"Id", +map:"Mapa de imagen", +swap_image:"Intercambiar imagen", +alt_image:"Imagen alternativa", +mouseover:"para mouseover", +mouseout:"para mouseout", +misc:"Miscel\u00E1neo", +example_img:"Vista previa de la imagen", +missing_alt:" \u00BFEsta seguro de continuar sin introducir una descripci\u00F3n a la imagen? Sin ella puede no ser accesible para usuarios con discapacidades, o para aquellos que usen navegadores de modo texto, o tengan deshabilitadas las im\u00E1genes de la p\u00E1gina.", +dialog_title:"Insertar/editar imagen", +src:"URL de la imagen", +alt:"Descripci\u00F3n de la imagen", +list:"Lista de imagen", +border:"Bordes", +dimensions:"Dimensiones", +vspace:"Espacio vertical", +hspace:"Espacio horizontal", +align:"Alineaci\u00F3n", +align_baseline:"L\u00EDnea base", +align_top:"Arriba", +align_middle:"Medio", +align_bottom:"Debajo", +align_texttop:"Texto arriba", +align_textbottom:"Texto abajo", +align_left:"Izquierda", +align_right:"Derecha", +image_list:"Lista de imagen" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/et_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/et_dlg.js new file mode 100644 index 00000000..15b5b77a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/et_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('et.advimage_dlg',{ +tab_general:"General", +tab_appearance:"Appearance", +tab_advanced:"Advanced", +general:"General", +title:"Title", +preview:"Preview", +constrain_proportions:"Constrain proportions", +langdir:"Language direction", +langcode:"Language code", +long_desc:"Long description link", +style:"Style", +classes:"Classes", +ltr:"Left to right", +rtl:"Right to left", +id:"Id", +map:"Image map", +swap_image:"Swap image", +alt_image:"Alternative image", +mouseover:"for mouse over", +mouseout:"for mouse out", +misc:"Miscellaneous", +example_img:"Appearance preview image", +missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", +dialog_title:"Insert/edit image", +src:"Image URL", +alt:"Image description", +list:"Image list", +border:"Border", +dimensions:"Dimensions", +vspace:"Vertical space", +hspace:"Horizontal space", +align:"Alignment", +align_baseline:"Baseline", +align_top:"Top", +align_middle:"Middle", +align_bottom:"Bottom", +align_texttop:"Text top", +align_textbottom:"Text bottom", +align_left:"Left", +align_right:"Right", +image_list:"Image list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa.js deleted file mode 100644 index 31a4ac1d..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa.js +++ /dev/null @@ -1,11 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_insert_image_alt2'] = 'عنوان عکس'; -tinyMCELang['lang_insert_image_onmousemove'] = 'عکس جایگزین' -tinyMCELang['lang_insert_image_mouseover'] = 'عکس جایگزین هنگام ورود نشانگر ماوس'; -tinyMCELang['lang_insert_image_mouseout'] = 'عکس جایگزین هنگام خروج نشانگر ماوس'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa_ca.js deleted file mode 100644 index f8f0c436..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa_ca.js +++ /dev/null @@ -1,6 +0,0 @@ -// CA_FR lang variables - -tinyMCELang['lang_insert_image_alt2'] = 'Titre de l\'image'; -tinyMCELang['lang_insert_image_onmousemove'] = 'Image alternative'; -tinyMCELang['lang_insert_image_mouseover'] = 'pour le «mouse over»'; -tinyMCELang['lang_insert_image_mouseout'] = 'pour le «mouse out»'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa_dlg.js new file mode 100644 index 00000000..9dc846ab --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fa_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('fa.advimage_dlg',{ +tab_general:"\u0639\u0645\u0648\u0645\u06CC", +tab_appearance:"\u0638\u0627\u0647\u0631", +tab_advanced:"\u067E\u06CC\u0634\u0631\u0641\u062A\u0647", +general:"\u0639\u0645\u0648\u0645\u06CC", +title:"\u0639\u0646\u0648\u0627\u0646", +preview:"\u067E\u06CC\u0634 \u0646\u0645\u0627\u06CC\u0634", +constrain_proportions:"\u062D\u0641\u0638 \u062A\u0646\u0627\u0633\u0628", +langdir:"\u062C\u0647\u062A \u0632\u0628\u0627\u0646", +langcode:"\u0643\u062F \u0632\u0628\u0627\u0646", +long_desc:"\u0644\u06CC\u0646\u0643 \u062A\u0648\u0636\u06CC\u062D \u0637\u0648\u0644\u0627\u0646\u06CC", +style:"\u0627\u0633\u062A\u06CC\u0644", +classes:"\u0643\u0644\u0627\u0633 \u0647\u0627", +ltr:"\u0686\u067E \u0628\u0647 \u0631\u0627\u0633\u062A", +rtl:"\u0631\u0627\u0633\u062A \u0628\u0647 \u0686\u067E", +id:"\u0634\u0646\u0627\u0633\u0647", +map:"\u0646\u0642\u0634\u0647 \u062A\u0635\u0648\u06CC\u0631", +swap_image:"\u062A\u0639\u0648\u06CC\u0636 \u062A\u0635\u0648\u06CC\u0631", +alt_image:"\u062A\u0635\u0648\u06CC\u0631 \u062C\u0627\u06CC\u06AF\u0632\u06CC\u0646", +mouseover:"\u0628\u0631\u0627\u06CC \u0622\u0645\u062F\u0646 \u0645\u0648\u0633", +mouseout:"\u0628\u0631\u0627\u06CC \u0631\u0641\u062A\u0646 \u0645\u0648\u0633", +misc:"\u0645\u062A\u0641\u0631\u0642\u0647", +example_img:"\u062A\u0635\u0648\u06CC\u0631 \u067E\u06CC\u0634 \u0646\u0645\u0627\u06CC\u0634 \u0638\u0627\u0647\u0631", +missing_alt:"\u0622\u06CC\u0627 \u0634\u0645\u0627 \u0627\u0632 \u0627\u062F\u0627\u0645\u0647 \u0628\u062F\u0648\u0646 \u0634\u0627\u0645\u0644 \u0643\u0631\u062F\u0646 \u06CC\u0643 \u062A\u0648\u0636\u06CC\u062D \u062A\u0635\u0648\u06CC\u0631 \u0627\u0637\u0645\u06CC\u0646\u0627\u0646 \u062F\u0627\u0631\u06CC\u062F\u061F \u0628\u062F\u0648\u0646 \u0622\u0646 \u0645\u0645\u0643\u0646 \u0646\u06CC\u0633\u062A \u062A\u0635\u0627\u0648\u06CC\u0631 \u0628\u0631\u0627\u06CC \u0628\u0631\u062E\u06CC \u0643\u0627\u0631\u0628\u0631\u0627\u0646\u06CC \u0643\u0647 \u0642\u0628\u0644\u06CC\u062A \u0645\u0631\u0648\u0631 \u062A\u0635\u0627\u0648\u06CC\u0631 \u0631\u0627 \u0646\u062F\u0627\u0631\u0646\u062F \u060C \u06CC\u0627 \u0622\u0646\u0647\u0627\u06CC\u06CC \u0643\u0647 \u0627\u0632 \u06CC\u0643 \u0645\u0631\u0648\u0631\u06AF\u0631 \u0645\u062A\u0646\u06CC \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0645\u06CC \u0643\u0646\u0646\u062F \u060C \u06CC\u0627 \u062F\u0631 \u062D\u0627\u0644 \u0645\u0631\u0648\u0631 \u0648\u0628 \u0628\u062F\u0648\u0646 \u062A\u0635\u0648\u06CC\u0631 \u0645\u06CC \u0628\u0627\u0634\u0646\u062F \u060C \u0642\u0627\u0628\u0644 \u062F\u0633\u062A\u06CC\u0627\u0628\u06CC \u0628\u0627\u0634\u062F.", +dialog_title:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u062A\u0635\u0648\u06CC\u0631", +src:"URL \u062A\u0635\u0648\u06CC\u0631", +alt:"\u062A\u0648\u0636\u06CC\u062D \u062A\u0635\u0648\u06CC\u0631", +list:"\u0644\u06CC\u0633\u062A \u062A\u0635\u0648\u06CC\u0631", +border:"\u062D\u0627\u0634\u06CC\u0647", +dimensions:"\u0627\u0628\u0639\u0627\u062F", +vspace:"\u0641\u0627\u0635\u0644\u0647 \u0639\u0645\u0648\u062F\u06CC", +hspace:"\u0641\u0627\u0635\u0644\u0647 \u0627\u0641\u0642\u06CC", +align:"\u062A\u0631\u0627\u0632", +align_baseline:"\u062E\u0637 \u067E\u0627\u06CC\u0647", +align_top:"\u0628\u0627\u0644\u0627", +align_middle:"\u0648\u0633\u0637", +align_bottom:"\u067E\u0627\u06CC\u06CC\u0646", +align_texttop:"\u0645\u062A\u0646 \u0628\u0627\u0644\u0627", +align_textbottom:"\u0645\u062A\u0646 \u067E\u0627\u06CC\u06CC\u0646", +align_left:"\u0686\u067E", +align_right:"\u0631\u0627\u0633\u062A", +image_list:"\u0644\u06CC\u0633\u062A \u062A\u0635\u0648\u06CC\u0631" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fi_dlg.js new file mode 100644 index 00000000..c3304426 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fi_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('fi.advimage_dlg',{ +tab_general:"Yleiset", +tab_appearance:"N\u00E4kyminen", +tab_advanced:"Edistynyt", +general:"Yleiset", +title:"Otsikko", +preview:"Esikatselu", +constrain_proportions:"S\u00E4ilyt\u00E4 mittasuhteet", +langdir:"Kielen suunta", +langcode:"Kielen koodi", +long_desc:"Pitk\u00E4n kuvauksen linkki", +style:"Tyyli", +classes:"Luokat", +ltr:"Vasemmalta oikealle", +rtl:"Oikealta vasemmalle", +id:"Id", +map:"Kuvakartta", +swap_image:"Vaihda kuva", +alt_image:"Vaihtoehtoinen kuva", +mouseover:"mouseoverille", +mouseout:"mouseoutille", +misc:"Sekalaiset", +example_img:"Ulkoasun esikatselukuva", +missing_alt:"Haluako varmasti jatkaa lis\u00E4\u00E4m\u00E4tt\u00E4 kuvausta? Sen puuttumuinen saattaa h\u00E4irit\u00E4 sellaisia, jotka k\u00E4ytt\u00E4v\u00E4t tekstipohjaista selainta tai ovat kytkeneet kuvien n\u00E4kymisen pois p\u00E4\u00E4lt\u00E4.", +dialog_title:"Lis\u00E4\u00E4/muokkaa kuvaa", +src:"Kuvan URL", +alt:"Kuvan kuvaus", +list:"Kuvalista", +border:"Kehys", +dimensions:"Mitat", +vspace:"pystysuora tila", +hspace:"vaakasuora tila", +align:"Tasaus", +align_baseline:"Rivill\u00E4", +align_top:"Ylh\u00E4\u00E4ll\u00E4", +align_middle:"Keskell\u00E4", +align_bottom:"Alhaalla", +align_texttop:"Teksti ylh\u00E4\u00E4ll\u00E4", +align_textbottom:"Teksti alhaalla", +align_left:"Vasemmalla", +align_right:"Oikealla", +image_list:"Kuvalista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fr.js deleted file mode 100644 index e7293012..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fr.js +++ /dev/null @@ -1,6 +0,0 @@ -// French lang variables by Laurent Dran - -tinyMCELang['lang_insert_image_alt2'] = 'Titre de l\'image'; -tinyMCELang['lang_insert_image_onmousemove'] = 'Image alternative' -tinyMCELang['lang_insert_image_mouseover'] = 'Pour la souris au dessus'; -tinyMCELang['lang_insert_image_mouseout'] = 'Pour la souris en dehors'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fr_dlg.js new file mode 100644 index 00000000..5701e182 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/fr_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('fr.advimage_dlg',{ +tab_general:"G\u00E9n\u00E9ral", +tab_appearance:"Apparence", +tab_advanced:"Avanc\u00E9", +general:"G\u00E9n\u00E9ral", +title:"Titre", +preview:"Pr\u00E9visualiser", +constrain_proportions:"Conserver les proportions", +langdir:"Sens de lecture", +langcode:"Code de la langue", +long_desc:"Description longue du lien", +style:"Style", +classes:"Classes", +ltr:"De gauche \u00E0 droite", +rtl:"De droite \u00E0 gauche", +id:"Id", +map:"Carte image", +swap_image:"Alterner image", +alt_image:"Image alternative", +mouseover:"au passage de la souris", +mouseout:"\u00E0 la sortie de la souris", +misc:"Divers", +example_img:"Apparence de l'image", +missing_alt:"\u00CAtes-vous s\u00FBr de vouloir continuer sans inclure de description de l'image\u00A0? Sans description, l'image peut ne pas \u00EAtre accessible \u00E0 certains utilisateurs handicap\u00E9s visuellement, ceux utilisant un navigateur texte, ou ceux qui naviguent sans affichage des images.", +dialog_title:"Ins\u00E9rer/\u00C9diter image", +src:"URL de l'image", +alt:"Description de l'image", +list:"Liste d'images", +border:"Bordure", +dimensions:"Dimensions", +vspace:"Espacement vertical", +hspace:"Espacement horizontal", +align:"Alignement", +align_baseline:"Base", +align_top:"Haut", +align_middle:"Milieu", +align_bottom:"Bas", +align_texttop:"Haut du texte", +align_textbottom:"Bas du texte", +align_left:"Gauche", +align_right:"Droite", +image_list:"Liste d'images" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/gl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/gl_dlg.js new file mode 100644 index 00000000..649b57a1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/gl_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('gl.advimage_dlg',{ +tab_general:"Xeral", +tab_appearance:"Apariencia", +tab_advanced:"Avanzado", +general:"Xeral", +title:"T\u00EDtulo", +preview:"Vista previa", +constrain_proportions:"Bloquear proporci\u00F3ns", +langdir:"Direcci\u00F3n do idioma", +langcode:"C\u00F3digo do idioma", +long_desc:"V\u00EDnculo pra descripci\u00F3n larga", +style:"Estilos", +classes:"Clases", +ltr:"Esquerda a dereita", +rtl:"Dereita a esquerda", +id:"Id", +map:"Mapa de imaxe", +swap_image:"Intercambiar imaxe", +alt_image:"Imaxe alternativa", +mouseover:"pra mouseover", +mouseout:"pra mouseout", +misc:"Miscel\u00E1neo", +example_img:"Vista previa da imaxe", +missing_alt:"\u00BFEsta seguro de continuar sen introducir unha descripci\u00F3n \u00E1 imaxe? Sen ela pode non ser accesible pra usuarios con discapacidades, ou pra aqueles que usen navegadores de modo texto, ou te\u00F1an deshabilitadas as imaxes da p\u00E1xina.", +dialog_title:"Insertar/editar imaxe", +src:"URL da imaxe", +alt:"Descripci\u00F3n da imaxe", +list:"Lista de imaxes", +border:"Bordes", +dimensions:"Dimensi\u00F3ns", +vspace:"Espacio vertical", +hspace:"Espacio horizontal", +align:"Ali\u00F1amento", +align_baseline:"Li\u00F1a base", +align_top:"Arriba", +align_middle:"Medio", +align_bottom:"Abaixo", +align_texttop:"Texto arriba", +align_textbottom:"Texto abaixo", +align_left:"Esquerda", +align_right:"Dereita", +image_list:"Lista de imaxes" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/he_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/he_dlg.js new file mode 100644 index 00000000..8bfe33c2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/he_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('he.advimage_dlg',{ +tab_general:"\u05DB\u05DC\u05DC\u05D9", +tab_appearance:"\u05DE\u05E8\u05D0\u05D4", +tab_advanced:"\u05DE\u05EA\u05E7\u05D3\u05DD", +general:"\u05DB\u05DC\u05DC\u05D9", +title:"\u05DB\u05D5\u05EA\u05E8\u05EA", +preview:"\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4", +constrain_proportions:"\u05D0\u05D9\u05DC\u05D5\u05E6\u05D9\u05DD \u05D9\u05D7\u05E1\u05D9\u05D9\u05DD", +langdir:"\u05DB\u05D9\u05D5\u05D5\u05DF \u05D4\u05E9\u05E4\u05D4", +langcode:"\u05E7\u05D5\u05D3 \u05D4\u05E9\u05E4\u05D4", +long_desc:"\u05EA\u05D9\u05D0\u05D5\u05E8 \u05E7\u05D9\u05E9\u05D5\u05E8 \u05D0\u05E8\u05D5\u05DA", +style:"\u05E1\u05D2\u05E0\u05D5\u05DF", +classes:"Classes", +ltr:"\u05DE\u05E9\u05DE\u05D0\u05DC \u05DC\u05D9\u05DE\u05D9\u05DF", +rtl:"\u05DE\u05D9\u05DE\u05D9\u05DF \u05DC\u05E9\u05DE\u05D0\u05DC", +id:"Id", +map:"Image map", +swap_image:"\u05D4\u05D7\u05DC\u05E4\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4", +alt_image:"\u05EA\u05DE\u05D5\u05E0\u05D4 \u05D7\u05DC\u05D9\u05E4\u05D9\u05EA", +mouseover:"\u05D1\u05E2\u05EA \u05DE\u05E2\u05D1\u05E8 \u05D4\u05E1\u05DE\u05DF \u05E2\u05DC \u05D4\u05EA\u05DE\u05D5\u05E0\u05D4", +mouseout:"\u05D4\u05E1\u05DE\u05DF \u05E2\u05D1\u05E8 \u05D0\u05EA \u05D4\u05EA\u05DE\u05D5\u05E0\u05D4", +misc:"\u05E9\u05D5\u05E0\u05D5\u05EA", +example_img:"\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4 \u05E9\u05DC \u05D4\u05EA\u05DE\u05D5\u05E0\u05D4", +missing_alt:"\u05DC\u05D4\u05DE\u05E9\u05D9\u05DA \u05DE\u05D1\u05DC\u05D9 \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05EA\u05D9\u05D0\u05D5\u05E8 \u05DC\u05EA\u05DE\u05D5\u05E0\u05D4?", +dialog_title:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4", +src:"URL \u05E9\u05DC \u05D4\u05EA\u05DE\u05D5\u05E0\u05D4", +alt:"\u05EA\u05D9\u05D0\u05D5\u05E8 \u05D4\u05EA\u05DE\u05D5\u05E0\u05D4", +list:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05EA\u05DE\u05D5\u05E0\u05D5\u05EA", +border:"\u05D2\u05D1\u05D5\u05DC", +dimensions:"\u05DE\u05D9\u05DE\u05D3\u05D9\u05DD", +vspace:"\u05E7\u05D5 \u05D0\u05E0\u05DB\u05D9", +hspace:"\u05E7\u05D5 \u05D0\u05D5\u05E4\u05E7\u05D9", +align:"\u05D9\u05E9\u05D5\u05E8", +align_baseline:"\u05E7\u05D5 \u05D1\u05E1\u05D9\u05E1\u05D9", +align_top:"\u05E2\u05DC\u05D9\u05D5\u05DF", +align_middle:"\u05D0\u05DE\u05E6\u05E2", +align_bottom:"\u05EA\u05D7\u05EA\u05D9\u05EA", +align_texttop:"\u05D8\u05E7\u05E1\u05D8 \u05E2\u05DC\u05D9\u05D5\u05DF", +align_textbottom:"\u05D8\u05E7\u05E1\u05D8 \u05EA\u05D7\u05EA\u05D5\u05DF", +align_left:"\u05DC\u05E9\u05DE\u05D0\u05DC", +align_right:"Right", +image_list:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05EA\u05DE\u05D5\u05E0\u05D5\u05EA" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/hr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/hr_dlg.js new file mode 100644 index 00000000..07f36808 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/hr_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('hr.advimage_dlg',{ +tab_general:"Osnovno", +tab_appearance:"Izgled", +tab_advanced:"Napredno", +general:"Osnovno", +title:"Naslov", +preview:"Prikaz", +constrain_proportions:"Zadr\u017Ei proporcije", +langdir:"Smjer jezika", +langcode:"Kod jezika", +long_desc:"Poveznica dugog opisa", +style:"Stil", +classes:"Klase", +ltr:"S lijeva na desno", +rtl:"S desna na lijevo", +id:"Id", +map:"Karta slike", +swap_image:"Izmjenjiva slika", +alt_image:"Alternativna slika", +mouseover:"za prelazak mi\u0161a preko slike", +mouseout:"za izlazak mi\u0161a van slike", +misc:"Razno", +example_img:"Prikaz slike", +missing_alt:"Jeste li sigurni da \u017Eelite izostaviti opis slike? Slika mo\u017Ee biti nedostupna ljudima s pote\u0161ko\u0107ama ili onima koji koriste preglednike bez prikaza slika.", +dialog_title:"Umetni/uredi sliku", +src:"URL slike", +alt:"Opis slike", +list:"Lista slika", +border:"Obrub", +dimensions:"Dimenzije", +vspace:"Okomiti razmak", +hspace:"Vodoravni razmak", +align:"Poravnavanje", +align_baseline:"Osnovna linija", +align_top:"Vrh", +align_middle:"Sredina", +align_bottom:"Dno", +align_texttop:"Vrh teksta", +align_textbottom:"Dno teksta", +align_left:"Lijevo", +align_right:"Desno", +image_list:"Lista slika" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/hu_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/hu_dlg.js new file mode 100644 index 00000000..383a7712 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/hu_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('hu.advimage_dlg',{ +tab_general:"\u00C1ltal\u00E1nos", +tab_appearance:"Megjelen\u00E9s", +tab_advanced:"Halad\u00F3", +general:"\u00C1ltal\u00E1nos", +title:"C\u00EDm", +preview:"El\u0151n\u00E9zet", +constrain_proportions:"Ar\u00E1nytart\u00E1s", +langdir:"Nyelv \u00EDr\u00E1s ir\u00E1ny", +langcode:"Nyelv k\u00F3d", +long_desc:"B\u0151vebb le\u00EDr\u00E1s link", +style:"Style", +classes:"Class-ok", +ltr:"Balr\u00F3l jobbra", +rtl:"Jobbr\u00F3l balra", +id:"Id", +map:"K\u00E9p t\u00E9rk\u00E9p", +swap_image:"K\u00E9pcsere", +alt_image:"Alternat\u00EDv k\u00E9p", +mouseover:"K\u00E9p az eg\u00E9rkurzor f\u00F6l\u00E9vitelekor", +mouseout:"K\u00E9p az eg\u00E9rkurzor lev\u00E9telekor", +misc:"Vegyes", +example_img:"El\u0151n\u00E9zeti k\u00E9p", +missing_alt:"Biztosan folytatja helyettes\u00EDt\u0151 sz\u00F6veg n\u00E9lk\u00FCl? En\u00E9lk\u00FCl a korl\u00E1toz\u00E1ssal \u00E9l\u0151k, sz\u00F6veges b\u00F6ng\u00E9sz\u0151t haszn\u00E1l\u00F3k \u00E9s a k\u00E9pek megjelen\u00EDt\u00E9s\u00E9t letilt\u00F3 felhaszn\u00E1l\u00F3k h\u00E1tr\u00E1nyban lesznek.", +dialog_title:"K\u00E9p besz\u00FAr\u00E1s/szerkeszt\u00E9s", +src:"K\u00E9p URL", +alt:"K\u00E9p helyettes\u00EDt\u0151 sz\u00F6vege", +list:"K\u00E9plista", +border:"Keret", +dimensions:"Dimenzi\u00F3k", +vspace:"F\u00FCgg\u0151leges t\u00E1vols\u00E1g", +hspace:"V\u00EDzszintes t\u00E1vols\u00E1g", +align:"Igaz\u00EDt\u00E1s", +align_baseline:"Alapvonalhoz", +align_top:"Fentre", +align_middle:"K\u00F6z\u00E9pre", +align_bottom:"Lentre", +align_texttop:"Sz\u00F6veg tetej\u00E9hez", +align_textbottom:"Sz\u00F6veg alj\u00E1hoz", +align_left:"Balra", +align_right:"Jobbra", +image_list:"K\u00E9plista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ia_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ia_dlg.js new file mode 100644 index 00000000..0aa36a1b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ia_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ia.advimage_dlg',{ +tab_general:"\u57FA\u672C", +tab_appearance:"\u5916\u89C2", +tab_advanced:"\u9AD8\u7EA7", +general:"\u57FA\u672C", +title:"\u67E5\u627E", +preview:"\u9884\u89C8", +constrain_proportions:"\u4FDD\u6301\u6BD4\u4F8B", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +long_desc:"\u63CF\u8FF0", +style:"\u6837\u5F0F", +classes:"\u6837\u5F0F\u7C7B", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +id:"Id", +map:"\u56FE\u7247\u70ED\u70B9", +swap_image:"\u5207\u6362\u56FE\u7247", +alt_image:"\u4EA4\u66FF\u56FE\u7247", +mouseover:"\u9F20\u6807\u5212\u8FC7", +mouseout:"\u9F20\u6807\u79FB\u51FA", +misc:"\u5176\u5B83", +example_img:"\u9884\u89C8\u56FE\u7247", +missing_alt:" \u662F\u5426\u4E0D\u4E3A\u56FE\u7247\u52A0\u5165\u8BF4\u660E\u6587\u5B57\uFF0C\u5982\u679C\u4E0D\u52A0\u5165\u8BF4\u660E\u6587\u5B57\uFF0C\u5C06\u5BFC\u81F4\u4E0D\u652F\u6301\u56FE\u7247\u7684\u6D4F\u89C8\u5668\u5FFD\u7565\u672C\u5185\u5BB9", +dialog_title:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u7247", +src:"\u56FE\u7247\u5730\u5740", +alt:"\u56FE\u7247\u8BF4\u660E", +list:"\u56FE\u7247\u6E05\u5355", +border:"\u8FB9\u6846", +dimensions:"\u5C3A\u5BF8", +vspace:"\u5782\u76F4\u95F4\u8DDD", +hspace:"\u6C34\u5E73\u95F4\u8DDD", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_baseline:"\u57FA\u7EBF", +align_top:"\u9876\u90E8", +align_middle:"\u4E2D\u90E8", +align_bottom:"\u5E95\u90E8", +align_texttop:"\u6587\u5B57\u4E0A\u65B9", +align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +align_left:"\u5C45\u5DE6", +align_right:"\u5C45\u53F3", +image_list:"\u56FE\u7247\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ii_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ii_dlg.js new file mode 100644 index 00000000..ff78fb99 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ii_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ii.advimage_dlg',{ +tab_general:"\u4E00\u822C", +tab_appearance:"\u5916\u89C2", +tab_advanced:"\u9AD8\u7EA7", +general:"\u4E00\u822C", +title:"\u6807\u9898", +preview:"\u9884\u89C8", +constrain_proportions:"\u4FDD\u6301\u6BD4\u4F8B", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +long_desc:"\u957F\u63CF\u8FF0\u94FE\u63A5", +style:"\u6837\u5F0F", +classes:"\u7C7B\u522B", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +id:"ID", +map:"\u56FE\u6863 Map", +swap_image:"\u56FE\u6863\u5207\u6362", +alt_image:"\u66FF\u6362\u56FE\u6863", +mouseover:"\u6E38\u6807\u901A\u8FC7", +mouseout:"\u5149\u6807\u79FB\u51FA", +misc:"\u5176\u5B83", +example_img:"\u56FE\u6863\u9884\u89C8\u5916\u89C2", +missing_alt:"\u786E\u5B9A\u4E0D\u4E3A\u56FE\u6863\u52A0\u4E0A\u8BF4\u660E\u5417\uFF1F\u6CA1\u6709\u8BF4\u660E\u7684\u56FE\u6863\uFF0C\u5C06\u65E0\u6CD5\u5728\u4E0D\u652F\u6301\u56FE\u6587\u4EF6\u663E\u793A\u7684\u6D4F\u89C8\u5668\u4E2D\u88AB\u5B58\u53D6\u3002", +dialog_title:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u6863", +src:"\u56FE\u6863URL", +alt:"\u56FE\u6863\u8BF4\u660E", +list:"\u56FE\u6587\u4EF6\u6E05\u5355", +border:"\u8FB9\u6846", +dimensions:"\u5C3A\u5BF8", +vspace:"\u5782\u76F4\u95F4\u8DDD", +hspace:"\u6C34\u5E73\u95F4\u8DDD", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_baseline:"\u57FA\u7EBF", +align_top:"\u7F6E\u9876", +align_middle:"\u7F6E\u4E2D", +align_bottom:"\u7F6E\u5E95", +align_texttop:"\u6587\u5B57\u4E0A\u65B9", +align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +align_left:"\u7F6E\u5DE6", +align_right:"\u7F6E\u53F3", +image_list:"\u56FE\u6587\u4EF6\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/is_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/is_dlg.js new file mode 100644 index 00000000..2451a283 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/is_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('is.advimage_dlg',{ +tab_general:"Almennt", +tab_appearance:"\u00DAtlit", +tab_advanced:"N\u00E1nar", +general:"Almennt", +title:"Titill", +preview:"Forsko\u00F0un", +constrain_proportions:"Halda hlutf\u00F6llum", +langdir:"\u00C1tt tungum\u00E1ls", +langcode:"K\u00F3\u00F0i tungum\u00E1ls", +long_desc:"L\u00F6ng l\u00FDsing \u00E1 hlekki", +style:"St\u00EDll", +classes:"Klasar", +ltr:"Vinstri til h\u00E6gri", +rtl:"H\u00E6gri til vinstri", +id:"Id", +map:"Image map", +swap_image:"Skipta mynd \u00FAt", +alt_image:"\u00D6nnur mynd", +mouseover:"\u00FEegar m\u00FAs er yfir", +mouseout:"\u00FEegar m\u00FAs fer af", +misc:"\u00DDmislegt", +example_img:"Appearance preview image", +missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", +dialog_title:"Insert/edit image", +src:"Sl\u00F3\u00F0 \u00E1 mynd", +alt:"L\u00FDsing", +list:"Myndalisti", +border:"Rammi", +dimensions:"St\u00E6r\u00F0ir", +vspace:"L\u00F3\u00F0r\u00E9tt loftun", +hspace:"L\u00E1r\u00E9tt loftun", +align:"J\u00F6fnun", +align_baseline:"Baseline", +align_top:"Top", +align_middle:"Middle", +align_bottom:"Bottom", +align_texttop:"Text top", +align_textbottom:"Text bottom", +align_left:"Left", +align_right:"Right", +image_list:"Image list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/it_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/it_dlg.js new file mode 100644 index 00000000..70adae49 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/it_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('it.advimage_dlg',{ +tab_general:"Generale", +tab_appearance:"Aspetto", +tab_advanced:"Avanzate", +general:"Generale", +title:"Titolo", +preview:"Anteprima", +constrain_proportions:"Mantieni proporzioni", +langdir:"Direzione testo", +langcode:"codice lingua", +long_desc:"Descrizione del collegamento", +style:"Stile", +classes:"Classe", +ltr:"Sinistra verso destra", +rtl:"Destra verso sinistraa", +id:"Id", +map:"Immagine come mappa", +swap_image:"Sostituisci immagine", +alt_image:"Immagine alternativa", +mouseover:"quando mouse sopra", +mouseout:"quando mouse fuori", +misc:"Impostazioni varie", +example_img:"Anteprima aspetto immagine", +missing_alt:"Sicuro di continuare senza includere una descrizione dell'immagine? Senza di essa l'immagine pu\u00F2 non essere accessibile ad alcuni utenti con disabilit\u00E0, o per coloro che usano un browser testuale oppure che hanno disabilitato la visualizzazione delle immagini nel loro browser.", +dialog_title:"Inserisci/modifica immagine", +src:"URL immagine", +alt:"Descrizione immagine", +list:"Lista immagini", +border:"Bordo", +dimensions:"Dimensioni", +vspace:"Spaziatura verticale", +hspace:"Spaziatura orizzontale", +align:"Allineamento", +align_baseline:"Alla base", +align_top:"In alto", +align_middle:"In mezzo", +align_bottom:"In basso", +align_texttop:"In alto al testo", +align_textbottom:"In basso al testo", +align_left:"A sinistra", +align_right:"A destra", +image_list:"Lista immagini" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ja_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ja_dlg.js new file mode 100644 index 00000000..c8bfe48a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ja_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ja.advimage_dlg',{ +tab_general:"\u4E00\u822C", +tab_appearance:"\u8868\u793A", +tab_advanced:"\u4E0A\u7D1A\u8005\u5411\u3051", +general:"\u4E00\u822C", +title:"\u30BF\u30A4\u30C8\u30EB", +preview:"\u30D7\u30EC\u30D3\u30E5\u30FC", +constrain_proportions:"\u7E26\u6A2A\u6BD4\u306E\u4FDD\u5B58", +langdir:"\u6587\u7AE0\u306E\u65B9\u5411", +langcode:"\u8A00\u8A9E\u30B3\u30FC\u30C9", +long_desc:"\u8A73\u7D30\u8AAC\u660E\u30EA\u30F3\u30AF", +style:"\u30B9\u30BF\u30A4\u30EB", +classes:"\u30AF\u30E9\u30B9", +ltr:"\u5DE6\u304B\u3089\u53F3", +rtl:"\u53F3\u304B\u3089\u5DE6", +id:"Id", +map:"\u30A4\u30E1\u30FC\u30B8\u30DE\u30C3\u30D7", +swap_image:"\u30ED\u30FC\u30EB\u30AA\u30FC\u30D0\u30FC\u52B9\u679C", +alt_image:"\u753B\u50CF\u5207\u66FF\u3092\u884C\u3046", +mouseover:"\u30DE\u30A6\u30B9\u30AA\u30FC\u30D0\u30FC\u6642", +mouseout:"\u30DE\u30A6\u30B9\u30A2\u30A6\u30C8\u6642", +misc:"\u305D\u306E\u4ED6", +example_img:"Appearance preview image", +missing_alt:"\u753B\u50CF\u306E\u8AAC\u660E\u6587\u304C\u5165\u529B\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u76EE\u306E\u4E0D\u81EA\u7531\u306A\u65B9\u3084\u30C6\u30AD\u30B9\u30C8\u30D6\u30E9\u30A6\u30B6\u3092\u5229\u7528\u3055\u308C\u3066\u3044\u308B\u65B9\u3078\u914D\u616E\u3057\u3001\u753B\u50CF\u8AAC\u660E\u3092\u5165\u529B\u3059\u308B\u3053\u3068\u3092\u304A\u85A6\u3081\u3057\u307E\u3059\u3002", +dialog_title:"\u753B\u50CF\u306E\u633F\u5165/\u7DE8\u96C6", +src:"\u753B\u50CFURL", +alt:"\u753B\u50CF\u306E\u8AAC\u660E", +list:"\u4E00\u89A7\u304B\u3089\u9078\u3076", +border:"\u67A0\u7DDA", +dimensions:"\u30B5\u30A4\u30BA", +vspace:"\u4E0A\u4E0B\u4F59\u767D", +hspace:"\u5DE6\u53F3\u4F59\u767D", +align:"\u914D\u7F6E", +align_baseline:"Baseline", +align_top:"Top", +align_middle:"Middle", +align_bottom:"Bottom", +align_texttop:"Text top", +align_textbottom:"Text bottom", +align_left:"Left", +align_right:"Right", +image_list:"\u4E00\u89A7\u304B\u3089\u9078\u3076" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ko.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ko.js deleted file mode 100644 index aaf0809d..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ko.js +++ /dev/null @@ -1,6 +0,0 @@ -// KO lang variables - -tinyMCELang['lang_insert_image_alt2'] = '±×¸² Á¦¸ñ'; -tinyMCELang['lang_insert_image_onmousemove'] = '´ëü À̹ÌÁö' -tinyMCELang['lang_insert_image_mouseover'] = '¸¶¿ì½º¸¦ ¿Ã·ÈÀ» ¶§'; -tinyMCELang['lang_insert_image_mouseout'] = '¸¶¿ì½º¸¦ ³»·ÈÀ» ¶§'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ko_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ko_dlg.js new file mode 100644 index 00000000..76e9a950 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ko_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ko.advimage_dlg',{ +tab_general:"\uC77C\uBC18", +tab_appearance:"\uD45C\uC2DC", +tab_advanced:"\uACE0\uAE09", +general:"\uC77C\uBC18", +title:"\uC81C\uBAA9", +preview:"\uBBF8\uB9AC\uBCF4\uAE30", +constrain_proportions:"\uC885\uD6A1\uBE44 \uBCF4\uC874", +langdir:"\uBB38\uC790 \uBC29\uD5A5", +langcode:"\uC5B8\uC5B4 \uCF54\uB4DC", +long_desc:"\uC124\uBA85 \uB9C1\uD06C", +style:"\uC2A4\uD0C0\uC77C", +classes:"\uD074\uB798\uC2A4", +ltr:"\uC67C\uCABD\uC5D0\uC11C \uC624\uB978\uCABD", +rtl:"\uC624\uB978\uCABD\uC5D0\uC11C \uC67C\uCABD", +id:"Id", +map:"\uC774\uBBF8\uC9C0 \uB9F5", +swap_image:"\uB864 \uC624\uBC84 \uD6A8\uACFC", +alt_image:"\uB300\uCCB4 \uC774\uBBF8\uC9C0", +mouseover:"\uB9C8\uC6B0\uC2A4 \uC624\uBC84 \uC774\uBBF8\uC9C0", +mouseout:"\uB9C8\uC6B0\uC2A4 \uC544\uC6C3 \uC774\uBBF8\uC9C0", +misc:"\uADF8 \uC678", +example_img:"\uBBF8\uB9AC\uBCF4\uAE30 \uC774\uBBF8\uC9C0", +missing_alt:"\uC774\uBBF8\uC9C0 \uC124\uBA85\uC774 \uC5C6\uC2B5\uB2C8\uB2E4\uB9CC \uC88B\uC2B5\uB2C8\uAE4C? \uC774\uBBF8\uC9C0 \uC124\uBA85\uC774 \uC5C6\uB294 \uACBD\uC6B0, \uB9F9\uC778\uC774\uB098 \uD14D\uC2A4\uD2B8 \uBE0C\uB77C\uC6B0\uC800\uB97C \uC774\uC6A9\uD558\uACE0 \uC788\uB294 \uBD84, \uB610 \uC774\uBBF8\uC9C0 \uD45C\uC2DC\uB97C OFF(\uC73C)\uB85C \uD558\uACE0 \uC788\uB294 \uC720\uC800\uC758 \uC811\uADFC\uC131\uC774 \uC800\uD558\uB429\uB2C8\uB2E4.", +dialog_title:"\uC774\uBBF8\uC9C0\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +src:"\uC774\uBBF8\uC9C0 URL", +alt:"\uC774\uBBF8\uC9C0 \uC124\uBA85", +list:"\uC774\uBBF8\uC9C0 \uBAA9\uB85D", +border:"\uD14C\uB450\uB9AC\uC120", +dimensions:"\uD06C\uAE30", +vspace:"\uC0C1\uD558 \uC5EC\uBC31", +hspace:"\uC88C\uC6B0 \uC5EC\uBC31", +align:"\uC815\uB82C", +align_baseline:"\uAE30\uC900\uC120", +align_top:"\uC0C1", +align_middle:"\uC911\uC559", +align_bottom:"\uD558", +align_texttop:"\uBB38\uC790\uC5F4 \uC704\uB85C", +align_textbottom:"\uBB38\uC790\uC5F4 \uC544\uB798\uB85C", +align_left:"\uC88C", +align_right:"\uC6B0", +image_list:"\uC774\uBBF8\uC9C0 \uBAA9\uB85D" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/lt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/lt_dlg.js new file mode 100644 index 00000000..2a596482 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/lt_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('lt.advimage_dlg',{ +tab_general:"Bendra", +tab_appearance:"I\u0161vaizda", +tab_advanced:"I\u0161pl\u0117sta", +general:"Bendra", +title:"Pavadinimas", +preview:"Per\u017Ei\u016Bra", +constrain_proportions:"Priverstin\u0117s proporcijos", +langdir:"Kalbos teksto kryptis", +langcode:"Kalbos kodas", +long_desc:"Ilgo apra\u0161ymo nuoroda", +style:"Stilius", +classes:"Klas\u0117s", +ltr:"I\u0161 kair\u0117s \u012F de\u0161in\u0119", +rtl:"I\u0161 de\u0161in\u0117s \u012F kair\u0119", +id:"Id", +map:"Paveiksl\u0117lio \"\u017Eem\u0117lapis\"", +swap_image:"Sukeisti paveiksl\u0117l\u012F", +alt_image:"Arternatyvus paveiksl\u0117lis", +mouseover:"u\u017Evedant pele", +mouseout:"nuvedant pel\u0119", +misc:"\u012Evair\u016Bs", +example_img:"I\u0161vaizdos per\u017Ei\u016Bros paveiksl\u0117lis", +missing_alt:"Ar norite t\u0119sti ne\u012Fvedus paveiksl\u0117lio apra\u0161o? Be apra\u0161o jo neatpa\u017Eins \u017Emon\u0117s su negalia, tie kurie naudoja tekstines nar\u0161ykles, arba tie, kurie nar\u0161o internet\u0105 i\u0161jung\u0119 paveiksl\u0117li\u0173 rodym\u0105.", +dialog_title:"\u012Eterpti/redaguoti paveiksl\u0117l\u012F", +src:"Paveiksl\u0117lio URL adresas", +alt:"Paveiksl\u0117lio apra\u0161ymas", +list:"Paveiksl\u0117li\u0173 s\u0105ra\u0161as", +border:"R\u0117melis", +dimensions:"I\u0161matavimai", +vspace:"Vertikalus tarpas", +hspace:"Horizontalus tarpas", +align:"Lygiavimas", +align_baseline:"Pradiniame ta\u0161ke", +align_top:"Vir\u0161uje", +align_middle:"Viduryje", +align_bottom:"Apa\u010Dioje", +align_texttop:"Teksto vir\u0161uje", +align_textbottom:"Teksto apa\u010Dioje", +align_left:"Kair\u0117je", +align_right:"De\u0161in\u0117je", +image_list:"Paveiksl\u0117li\u0173 s\u0105ra\u0161as" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/lv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/lv_dlg.js new file mode 100644 index 00000000..8bed1196 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/lv_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('lv.advimage_dlg',{ +tab_general:"Iestat\u012Bjumi", +tab_appearance:"Izskats", +tab_advanced:"Papildiestat\u012Bjumi", +general:"Iestat\u012Bjumi", +title:"Nosaukums", +preview:"Priek\u0161skats", +constrain_proportions:"Saglab\u0101t proporcijas", +langdir:"Valodas virziens", +langcode:"Valodas kods", +long_desc:"Saite uz garo aprakstu", +style:"Stils", +classes:"Klases", +ltr:"No kreis\u0101s uz labo", +rtl:"No lab\u0101s uz kreiso", +id:"Id", +map:"Att\u0113lkarte", +swap_image:"Main\u012Bt bildi", +alt_image:"Otra bilde", +mouseover:"kad pele virs", +mouseout:"kad pele \u0101rpus", +misc:"Da\u017E\u0101di", +example_img:"Att\u0113la izskata priek\u0161skats", +missing_alt:"Vai esat p\u0101rliecin\u0101ti, ka v\u0113laties turpin\u0101t, neiek\u013Caujot bildes aprakstu? Bez apraksta bilde neb\u016Bs saprotama lietot\u0101jiem ar nesp\u0113ju redz\u0113t, vai lietotajiem, kas lieto teksta p\u0101rl\u016Bkus, vai izsl\u0113gu\u0161i bil\u017Eu r\u0101d\u012B\u0161anu.", +dialog_title:"Ievietot/Redi\u0123\u0113t att\u0113lu", +src:"Att\u0113la URL", +alt:"Att\u0113la apraksts", +list:"Att\u0113lu saraksts", +border:"Apmale", +dimensions:"Izm\u0113ri", +vspace:"Vertik\u0101l\u0101 atstarpe", +hspace:"Horizont\u0101l\u0101 atstarpe", +align:"Novietojums", +align_baseline:"Pati apak\u0161a", +align_top:"Aug\u0161a", +align_middle:"Vidus", +align_bottom:"Apak\u0161a", +align_texttop:"Teksta aug\u0161a", +align_textbottom:"Teksta apak\u0161a", +align_left:"Pa kreisi", +align_right:"Pa labi", +image_list:"Att\u0113lu saraksts" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/mk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/mk_dlg.js new file mode 100644 index 00000000..60ff3996 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/mk_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('mk.advimage_dlg',{ +tab_general:"Osnovno", +tab_appearance:"Izgled", +tab_advanced:"Napredno", +general:"Osnovno", +title:"\u041D\u0430\u0441\u043B\u043E\u0432", +preview:"Prikaz", +constrain_proportions:"Zadr\u017Ei proporcije", +langdir:"Smjer jezika", +langcode:"Kod jezika", +long_desc:"Poveznica dugog opisa", +style:"Stil", +classes:"Klase", +ltr:"S leva na desno", +rtl:"S desna na levo", +id:"Id", +map:"Karta slike", +swap_image:"Izmjenjiva slika", +alt_image:"Alternativna slika", +mouseover:"za prelazak mi\u0161a preko slike", +mouseout:"za izlazak mi\u0161a van slike", +misc:"Razno", +example_img:"Prikaz slike", +missing_alt:"Jeste li sigurni da \u017Eelite izostaviti opis slike? Slika mo\u017Ee biti nedostupna ljudima s pote\u0161ko\u0107ama ili onima koji koriste preglednike bez prikaza slika.", +dialog_title:"\u0412\u043C\u0435\u0442\u043D\u0438/uredi sliku", +src:"URL slike", +alt:"Opis slike", +list:"Lista slika", +border:"Obrub", +dimensions:"Dimenzije", +vspace:"Okomiti razmak", +hspace:"Vodoravni razmak", +align:"Poravnavanje", +align_baseline:"Osnovna linija", +align_top:"Vrh", +align_middle:"Sredina", +align_bottom:"Dno", +align_texttop:"Vrh teksta", +align_textbottom:"Dno teksta", +align_left:"Levo", +align_right:"Desno", +image_list:"Lista slika" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/mn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/mn_dlg.js new file mode 100644 index 00000000..d68b7361 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/mn_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('mn.advimage_dlg',{ +tab_general:"\u0415\u0440\u04E9\u043D\u0445\u0438\u0439", +tab_appearance:"\u0425\u0430\u0440\u0430\u0433\u0434\u0430\u0446", +tab_advanced:"\u04E8\u0440\u0433\u04E9\u0442\u0433\u04E9\u0441\u04E9\u043D", +general:"\u0415\u0440\u04E9\u043D\u0445\u0438\u0439", +title:"\u0413\u0430\u0440\u0447\u0438\u0433", +preview:"\u041D\u044F\u0433\u0442\u043B\u0430\u043D \u0445\u0430\u0440\u0430\u0445", +constrain_proportions:"\u0425\u044D\u043C\u0436\u044D\u044D\u0441", +langdir:"\u0411\u0438\u0447\u0433\u0438\u0439\u043D \u0447\u0438\u0433\u043B\u044D\u043B", +langcode:"\u0425\u044D\u043B\u043D\u0438\u0439 \u043A\u043E\u0434", +long_desc:"\u0414\u044D\u043B\u0433\u044D\u0440\u044D\u043D\u0433\u04AF\u0439 \u0442\u0430\u0439\u043B\u0431\u0430\u0440", +style:"\u0424\u043E\u0440\u043C\u0430\u0442", +classes:"\u0410\u043D\u0433\u0438", +ltr:"\u0417\u04AF\u04AF\u043D\u044D\u044D\u0441 \u0431\u0430\u0440\u0443\u0443\u043D", +rtl:"\u0411\u0430\u0440\u0443\u0443\u043D\u0430\u0430\u0441 \u0437\u04AF\u04AF\u043D", +id:"\u0422\u0422", +map:"\u0411\u04AF\u0441\u0447\u0438\u043B\u0441\u0430\u043D \u0437\u0443\u0440\u0430\u0433", +swap_image:"\u0417\u0443\u0440\u0430\u0433 \u0441\u043E\u043B\u0438\u0445", +alt_image:"\u0425\u043E\u0451\u0440\u0434\u043E\u0433\u0447 \u0437\u0443\u0440\u0430\u0433", +mouseover:"\u0425\u0443\u043B\u0433\u0430\u043D\u0430 \u043E\u0440\u043E\u0445\u043E\u0434", +mouseout:"\u0425\u0443\u043B\u0433\u0430\u043D\u0430 \u0433\u0430\u0440\u0430\u0445\u0430\u0434", +misc:"\u042F\u043D\u0437 \u0431\u04AF\u0440\u0438\u0439\u043D \u0437\u04AF\u0439\u043B\u0441", +example_img:"\u041D\u044F\u0433\u0442\u043B\u0430\u043D \u0445\u0430\u0440\u0430\u0445", +missing_alt:"\u0422\u0430 \u04AF\u043D\u044D\u0445\u044D\u044D\u0440 \u0442\u0430\u0439\u043B\u0431\u0430\u0440 \u0445\u0438\u0439\u0445\u0433\u04AF\u0439 \u0431\u0430\u0439\u0445\u044B\u0433 \u0445\u04AF\u0441\u044D\u0436 \u0431\u0430\u0439\u043D\u0430 \u0443\u0443? \u0417\u0430\u0440\u0438\u043C \u0445\u04E9\u0433\u0436\u043B\u0438\u0439\u043D \u0431\u044D\u0440\u0445\u0448\u044D\u044D\u043B\u0442\u044D\u0439 \u044D\u0441\u0432\u044D\u043B \u0431\u0438\u0447\u0432\u044D\u0440 \u0445\u04E9\u0442\u04E9\u0447 \u0430\u0448\u0438\u0433\u043B\u0430\u0436 \u0431\u0443\u0439 \u044D\u0441\u0432\u044D\u043B \u0437\u0443\u0440\u0430\u0433 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0445\u044B\u0433 \u0445\u0430\u0430\u0441\u0430\u043D \u0445\u044D\u0440\u044D\u0433\u043B\u044D\u0433\u0447\u0438\u0434 \u0445\u0430\u043D\u0434\u0430\u0445 \u0431\u043E\u043B\u043E\u043C\u0436\u0433\u04AF\u0439\u0433 \u0430\u043D\u0445\u0430\u0430\u0440\u043D\u0430 \u0443\u0443.", +dialog_title:"\u0417\u0443\u0440\u0430\u0433 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u0437\u0430\u0441\u0430\u0445", +src:"\u0425\u0430\u044F\u0433", +alt:"\u0422\u0430\u0439\u043B\u0431\u0430\u0440", +list:"\u0417\u0443\u0440\u0433\u0438\u0439\u043D \u0436\u0430\u0433\u0441\u0430\u0430\u043B\u0442", +border:"\u0425\u04AF\u0440\u044D\u044D", +dimensions:"\u0425\u044D\u043C\u0436\u044D\u044D\u0441", +vspace:"\u0411\u043E\u0441\u043E\u043E \u0430\u043B\u0441\u043B\u0430\u043B\u0442", +hspace:"\u0425\u044D\u0432\u0442\u044D\u044D \u0430\u043B\u0441\u043B\u0430\u043B\u0442", +align:"\u0416\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u044D\u043B\u0442", +align_baseline:"\u041C\u04E9\u0440", +align_top:"\u0414\u044D\u044D\u0440", +align_middle:"\u0414\u0443\u043D\u0434", +align_bottom:"\u0414\u043E\u043E\u0440", +align_texttop:"\u0411\u0438\u0447\u0432\u044D\u0440\u0438\u0439\u043D \u0434\u044D\u044D\u0440", +align_textbottom:"\u0411\u0438\u0447\u0432\u044D\u0440\u0438\u0439\u043D \u0434\u043E\u043E\u0440", +align_left:"\u0417\u04AF\u04AF\u043D", +align_right:"\u0411\u0430\u0440\u0443\u0443\u043D", +image_list:"\u0417\u0443\u0440\u0433\u0438\u0439\u043D \u0436\u0430\u0433\u0441\u0430\u0430\u043B\u0442" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ms_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ms_dlg.js new file mode 100644 index 00000000..0ed869bb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ms_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ms.advimage_dlg',{ +tab_general:"Am", +tab_appearance:"Penglihatan", +tab_advanced:"Lanjutan", +general:"Am", +title:"Tajuk", +preview:"Pratonton", +constrain_proportions:"Kadar tahanan", +langdir:"Arah bahasa", +langcode:"Kod bahasa", +long_desc:"Pautan huraian panjang", +style:"Gaya", +classes:"Kelas-kelas", +ltr:"Kiri ke kanan", +rtl:"Kanan ke kiri", +id:"Id", +map:"Imej map", +swap_image:"Tukar imej", +alt_image:"Imej alternatif", +mouseover:"untuk tetikus di atas", +mouseout:"untuk tetikus di luar", +misc:"Pelbagai", +example_img:"Penglihatan pratonton imej", +missing_alt:"Adakah anda pasti untuk teruskan tanpa masukkan huraian imej? Tanpa huraian, imej mungkin tidak dapat difahami oleh orang yang kurang upaya, orang yang menggunakan pelayaran teks.", +dialog_title:"Sisip/sunting imej", +src:"URL imej", +alt:"Huraian imej", +list:"Senarai imej", +border:"Sempadan", +dimensions:"Dimensi", +vspace:"Ruangan tegak", +hspace:"Ruangan ufuk", +align:"Penyelarian", +align_baseline:"Garis pangkal", +align_top:"Atas", +align_middle:"Tengah", +align_bottom:"Bawah", +align_texttop:"Teks atas", +align_textbottom:"Teks bawah", +align_left:"Kiri", +align_right:"Kanan", +image_list:"Senarai imej" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nb_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nb_dlg.js new file mode 100644 index 00000000..43a780b4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nb_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('nb.advimage_dlg',{ +tab_general:"Generelt", +tab_appearance:"Utseende", +tab_advanced:"Avansert", +general:"Generelt", +title:"Tittel", +preview:"Forh\u00E5ndsvisning", +constrain_proportions:"Behold st\u00F8rrelsesforhold", +langdir:"Skriftretning", +langcode:"Spr\u00E5kkode", +long_desc:"Lang beskrivelse", +style:"Stil", +classes:"Klasser", +ltr:"Venstre mot h\u00F8yre", +rtl:"H\u00F8yre mot venstre", +id:"Id", +map:"Bildekart", +swap_image:"Bytt bilde", +alt_image:"Alternativt bilde", +mouseover:"for musepeker p\u00E5", +mouseout:"for musepeker utenfor", +misc:"Annet", +example_img:"Utseende Forh\u00E5ndsvisning bilde", +missing_alt:"Er du sikker p\u00E5 at du vil fortsette uten \u00E5 sette inn en beskrivelse av bildet? Uten beskrivelse vil bildet ikke gi mening for enkelte funksjonshemmede eller for personer som bruker en nettleser med bildevisning avsl\u00E5tt.", +dialog_title:"Sett inn / endre bilde", +src:"Bildets URL", +alt:"Bildebeskrivelse", +list:"Bildeliste", +border:"Ramme", +dimensions:"Dimensjoner", +vspace:"Vertikal avstand", +hspace:"Horisontal avstand", +align:"Justering", +align_baseline:"Grunnlinje", +align_top:"Topp", +align_middle:"Midtstilt", +align_bottom:"Bunn", +align_texttop:"Tekst topp", +align_textbottom:"Tekst bunn", +align_left:"Venstre", +align_right:"H\u00F8yre", +image_list:"Bildeliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nl_dlg.js new file mode 100644 index 00000000..b6db1f22 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nl_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('nl.advimage_dlg',{ +tab_general:"Algemeen", +tab_appearance:"Weergave", +tab_advanced:"Geavanceerd", +general:"Algemeen", +title:"Titel", +preview:"Voorbeeld", +constrain_proportions:"Verhouding behouden", +langdir:"Taalrichting", +langcode:"Taalcode", +long_desc:"Uitgebreide beschrijving", +style:"Stijl", +classes:"Klasses", +ltr:"Van links naar rechts", +rtl:"Van rechts naar links", +id:"Id", +map:"Afbeeldingsplattegrond", +swap_image:"Afbeelding wisselen", +alt_image:"Alternatieve afbeeldingen", +mouseover:"Bij muis over", +mouseout:"Bij muis uit", +misc:"Diversen", +example_img:"Voorbeeldweergave", +missing_alt:"Wilt u de afbeelding zonder beschrijving invoegen? De afbeelding wordt dan mogelijk niet opgemerkt door mensen met een visuele handicap, of welke zonder afbeeldingen browsen.", +dialog_title:"Afbeelding invoegen/bewerken", +src:"Bestand/URL", +alt:"Beschrijving", +list:"Lijst", +border:"Rand", +dimensions:"Afmetingen", +vspace:"Verticale ruimte", +hspace:"Horizontale ruimte", +align:"Uitlijning", +align_baseline:"Basislijn", +align_top:"Boven", +align_middle:"Midden", +align_bottom:"Onder", +align_texttop:"Bovenkant tekst", +align_textbottom:"Onderkant tekst", +align_left:"Links", +align_right:"Rechts", +image_list:"Lijst" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nn_dlg.js new file mode 100644 index 00000000..89e10c13 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/nn_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('nn.advimage_dlg',{ +tab_general:"Generelt", +tab_appearance:"Utsj\u00E5nad", +tab_advanced:"Avansert", +general:"Generelt", +title:"Tittel", +preview:"Sj\u00E5 f\u00F8rebels utkast", +constrain_proportions:"Behald proporsjonar", +langdir:"Skriftretning", +langcode:"Spr\u00E5kkode", +long_desc:"Lang omtale", +style:"Stil", +classes:"Klasser", +ltr:"Venstre mot h\u00F8gre", +rtl:"H\u00F8gre mot venstre", +id:"Id", +map:"Biletekart", +swap_image:"Byt bilete", +alt_image:"Alternativt bilete", +mouseover:"for musepeikar over", +mouseout:"for musepeikar utanfor", +misc:"Anna", +example_img:"Sj\u00E5 f\u00F8rebels utkast av bilete", +missing_alt:"Er du sikker p\u00E5 at du vil fortsetje utan \u00E5 setje inn ei omtale av biletet? Utan omtale vil biletet ikkje gje meining for enkelte funksjonshemma eller for personar som bruker ein nettlesar med biletvisinga avsl\u00E5tt.", +dialog_title:"Set inn / endre bilete", +src:"Bilete-URL", +alt:"Bileteomtale", +list:"Bileteliste", +border:"Ramme", +dimensions:"Dimensjonar", +vspace:"Vertikal avstand", +hspace:"Horisontal avstand", +align:"Justering", +align_baseline:"Basislinje", +align_top:"Topp", +align_middle:"Midtstilt", +align_bottom:"Botn", +align_texttop:"Tekst topp", +align_textbottom:"Tekst botn", +align_left:"Venstre", +align_right:"H\u00F8gre", +image_list:"Liste med bilete" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/pl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/pl_dlg.js new file mode 100644 index 00000000..f7c56153 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/pl_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('pl.advimage_dlg',{ +tab_general:"Og\u00F3lny", +tab_appearance:"Prezentacja", +tab_advanced:"Zaawansowany", +general:"Og\u00F3lny", +title:"Tytu\u0142", +preview:"Podgl\u0105d", +constrain_proportions:"Zachowaj proporcje", +langdir:"Kierunek j\u0119zyka", +langcode:"Kod j\u0119zyka", +long_desc:"D\u0142ugi opis linku", +style:"Styl", +classes:"Klasa", +ltr:"Lewy do prawego", +rtl:"Prawy do lewego", +id:"Id", +map:"Mapa obrazu", +swap_image:"Wymiana obrazka", +alt_image:"alternatywny obrazek", +mouseover:"for mouse over", +mouseout:"for mouse out", +misc:"R\u00F3\u017Cne", +example_img:"Podgl\u0105d wygl\u0105du obrazka", +missing_alt:"Czy jeste\u015B pewien, \u017Ce chcesz kontynuowa\u0107 bez opisu obrazka? Obrazek bez opisu mo\u017Ce nie by\u0107 dost\u0119pny dla u\u017Cytkownik\u00F3w kt\u00F3rzy u\u017Cywaj\u0105 tekstowej przegl\u0105darki, lub przegl\u0105daj\u0105cych stron\u0119 z wy\u0142\u0105czonymi obrazkami.", +dialog_title:"Wklej/edytuj obraz", +src:"URL obrazka", +alt:"Opis obrazka", +list:"Lista obrazk\u00F3w", +border:"Obramowanie", +dimensions:"Rozmiary", +vspace:"Pionowy odstep", +hspace:"Poziomy odstep", +align:"Wyr\u00F3wnanie", +align_baseline:"G\u0142\u00F3wna linia", +align_top:"G\u00F3rny", +align_middle:"\u015Arodkowy", +align_bottom:"Dolny", +align_texttop:"Tekst g\u00F3rny", +align_textbottom:"Tekst dolny", +align_left:"Lewy", +align_right:"Prawy", +image_list:"Lista obrazk\u00F3w" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/pt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/pt_dlg.js new file mode 100644 index 00000000..666643b6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/pt_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('pt.advimage_dlg',{ +tab_general:"Geral", +tab_appearance:"Apar\u00EAncia", +tab_advanced:"Avan\u00E7ado", +general:"Geral", +title:"T\u00EDtulo", +preview:"Pr\u00E9-Visualiza\u00E7\u00E3o", +constrain_proportions:"Manter propor\u00E7\u00F5es", +langdir:"Direc\u00E7\u00E3o do texto", +langcode:"C\u00F3digo de idioma", +long_desc:"Descri\u00E7\u00E3o extensa", +style:"Estilo", +classes:"Classes", +ltr:"Da esquerda para a direita", +rtl:"Da direita para a esquerda", +id:"Id", +map:"Mapa de imagem", +swap_image:"Trocar imagem", +alt_image:"Imagem alternativa", +mouseover:"mouseover", +mouseout:"mouseout", +misc:"Misto", +example_img:"Pr\u00E9-visualiza\u00E7\u00E3o", +missing_alt:"Tem a certeza que deseja continuar sem acrescentar uma descri\u00E7\u00E3o \u00E0\u00A0imagem? (Isto pode gerar problemas de acessibilidade em alguns navegadores)", +dialog_title:"Inserir/editar imagem", +src:"Endere\u00E7o da imagem", +alt:"Descri\u00E7\u00E3o da imagem", +list:"Lista de imagens", +border:"Limite", +dimensions:"Dimens\u00F5es", +vspace:"Espa\u00E7o vertical", +hspace:"Espa\u00E7o horizontal", +align:"Alinhamento", +align_baseline:"Sobre a linha de texto", +align_top:"Topo", +align_middle:"Meio", +align_bottom:"Abaixo", +align_texttop:"Topo do texto", +align_textbottom:"Base do texto", +align_left:"Esquerda", +align_right:"Direita", +image_list:"Lista de imagens" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ro_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ro_dlg.js new file mode 100644 index 00000000..2118dcaf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ro_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ro.advimage_dlg',{ +tab_general:"General", +tab_appearance:"Afi\u015Fare", +tab_advanced:"Avansat", +general:"General", +title:"Titlu", +preview:"Previzualizare", +constrain_proportions:"Men\u0163ine propor\u0163ii", +langdir:"Direc\u0163ie limb\u0103", +langcode:"Cod limb\u0103", +long_desc:"Link descriere", +style:"Stil", +classes:"Clase", +ltr:"De la st\u00E2nga la dreapta", +rtl:"De la dreapta la st\u00E2nga", +id:"Id", +map:"Hart\u0103 imagine", +swap_image:"Schimb\u0103 imagini", +alt_image:"Imagine alternativ\u0103", +mouseover:"Pentru mouse peste", +mouseout:"Normal", +misc:"Diverse", +example_img:"Imagine mic\u0103", +missing_alt:"Sigur dori\u0163i s\u0103 continua\u0163i f\u0103r\u0103 a introduce o descriere a imaginii?", +dialog_title:"Insereaz\u0103/Editeaz\u0103 imagine", +src:"URL imagine", +alt:"Descriere imagine", +list:"List\u0103 imagini", +border:"Bordur\u0103", +dimensions:"Dimensiuni", +vspace:"Spa\u0163iu vertical", +hspace:"Spa\u0163iu orizontal", +align:"Aliniere", +align_baseline:"Baseline", +align_top:"Sus", +align_middle:"La mijloc", +align_bottom:"Jos", +align_texttop:"Textul sus", +align_textbottom:"Textul jos", +align_left:"St\u00E2nga", +align_right:"Dreapta", +image_list:"List\u0103 de imagini" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ru_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ru_dlg.js new file mode 100644 index 00000000..35909964 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ru_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ru.advimage_dlg',{ +tab_general:"\u041E\u0431\u0449\u0438\u0435", +tab_appearance:"\u0412\u043D\u0435\u0448\u043D\u0438\u0439 \u0432\u0438\u0434", +tab_advanced:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435", +general:"\u041E\u0431\u0449\u0438\u0435", +title:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", +preview:"\u041F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440", +constrain_proportions:"\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u043F\u0440\u043E\u043F\u043E\u0440\u0446\u0438\u0438", +langdir:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u044F\u0437\u044B\u043A\u0430", +langcode:"\u041A\u043E\u0434 \u044F\u0437\u044B\u043A\u0430", +long_desc:"\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435", +style:"\u0421\u0442\u0438\u043B\u044C", +classes:"\u041A\u043B\u0430\u0441\u0441\u044B", +ltr:"\u0421\u043B\u0435\u0432\u0430 \u043D\u0430\u043F\u0440\u0430\u0432\u043E", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043D\u0430\u043B\u0435\u0432\u043E", +id:"\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440", +map:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435-\u043A\u0430\u0440\u0442\u0430", +swap_image:"\u041F\u043E\u043C\u0435\u043D\u044F\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +alt_image:"\u0410\u043B\u044C\u0442\u0435\u0440\u043D\u0430\u0442\u0438\u0432\u043D\u043E\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +mouseover:"\u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043C\u044B\u0448\u0438", +mouseout:"\u043F\u0440\u0438 \u0443\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043C\u044B\u0448\u0438", +misc:"\u0420\u0430\u0437\u043D\u043E\u0435", +example_img:"\u041F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0432\u043D\u0435\u0448\u043D\u0435\u0433\u043E \u0432\u0438\u0434\u0430", +missing_alt:"\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0431\u0435\u0437 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F? \u0411\u0435\u0437 \u043D\u0435\u0433\u043E \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C \u0441 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0439 \u0442\u0440\u0443\u0434\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u044C\u044E, \u0438\u043B\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0449\u0438\u043C \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0438\u043B\u0438 \u043F\u0440\u043E\u0441\u043C\u0430\u0442\u0440\u0438\u0432\u0430\u044E\u0449\u0438\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0441 \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u044B\u043C\u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F\u043C\u0438.", +dialog_title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +src:"\u0410\u0434\u0440\u0435\u0441 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F", +alt:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F", +list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439", +border:"\u0413\u0440\u0430\u043D\u0438\u0446\u0430", +dimensions:"\u0420\u0430\u0437\u043C\u0435\u0440\u044B", +vspace:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E", +hspace:"\u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E", +align:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +align_baseline:"\u041F\u043E \u043E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u044E", +align_top:"\u041F\u043E \u0432\u0435\u0440\u0445\u0443", +align_middle:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +align_bottom:"\u041F\u043E \u043D\u0438\u0437\u0443", +align_texttop:"\u041F\u043E \u0432\u0435\u0440\u0445\u0443 \u0442\u0435\u043A\u0441\u0442\u0430", +align_textbottom:"\u041F\u043E \u043D\u0438\u0437\u0443 \u0442\u0435\u043A\u0441\u0442\u0430", +align_left:"\u0412\u043B\u0435\u0432\u043E", +align_right:"\u0412\u043F\u0440\u0430\u0432\u043E", +image_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sc_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sc_dlg.js new file mode 100644 index 00000000..41beb53b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sc_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('sc.advimage_dlg',{ +tab_general:"\u57FA\u672C", +tab_appearance:"\u5916\u89C2", +tab_advanced:"\u9AD8\u7EA7", +general:"\u57FA\u672C", +title:"\u56FE\u7247\u6807\u9898", +preview:"\u9884\u89C8", +constrain_proportions:"\u4FDD\u6301\u6BD4\u4F8B", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +long_desc:"\u63CF\u8FF0", +style:"\u6837\u5F0F", +classes:"\u6837\u5F0F\u7C7B", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +id:"Id", +map:"\u56FE\u7247\u5730\u56FE", +swap_image:"\u5207\u6362\u56FE\u7247", +alt_image:"\u4EA4\u66FF\u56FE\u7247", +mouseover:"\u9F20\u6807\u5212\u8FC7", +mouseout:"\u9F20\u6807\u79FB\u51FA", +misc:"\u5176\u5B83", +example_img:"\u9884\u89C8\u56FE\u7247", +missing_alt:" \u4E0D\u52A0\u5165\u56FE\u7247\u8BF4\u660E\u6587\u5B57\u5417\uFF1F\u5982\u679C\u4E0D\u52A0\u5165\u8BF4\u660E\u6587\u5B57\uFF0C\u4E0D\u652F\u6301\u56FE\u7247\u7684\u6D4F\u89C8\u5668\u5C06\u5FFD\u7565\u672C\u56FE\u7247\u4FE1\u606F\u3002", +dialog_title:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u7247", +src:"\u56FE\u7247\u5730\u5740", +alt:"\u56FE\u7247\u8BF4\u660E", +list:"\u56FE\u7247\u5217\u8868", +border:"\u8FB9\u6846", +dimensions:"\u5C3A\u5BF8", +vspace:"\u5782\u76F4\u95F4\u8DDD", +hspace:"\u6C34\u5E73\u95F4\u8DDD", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_baseline:"\u57FA\u7EBF", +align_top:"\u9876\u90E8", +align_middle:"\u4E2D\u90E8", +align_bottom:"\u5E95\u90E8", +align_texttop:"\u6587\u5B57\u4E0A\u65B9", +align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +align_left:"\u5C45\u5DE6", +align_right:"\u5C45\u53F3", +image_list:"\u56FE\u7247\u5217\u8868" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/se_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/se_dlg.js new file mode 100644 index 00000000..39fc6cda --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/se_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('se.advimage_dlg',{ +tab_general:"Generellt", +tab_appearance:"Utseende", +tab_advanced:"Avancerat", +general:"Generellt", +title:"Titel", +preview:"F\u00F6rhandsvisning", +constrain_proportions:"Bibeh\u00E5ll proportionerna", +langdir:"Skriftriktning", +langcode:"Spr\u00E5kkod", +long_desc:"L\u00E5ng beskrivning", +style:"Stil", +classes:"Klasser", +ltr:"V\u00E4nster till h\u00F6ger", +rtl:"H\u00F6ger till v\u00E4nster", +id:"Id", +map:"L\u00E4nkkarta", +swap_image:"Utbytningsbild", +alt_image:"Alternativbild", +mouseover:"vid musen ovanf\u00F6r", +mouseout:"vid musen utanf\u00F6r", +misc:"\u00D6vrigt", +example_img:"Exempelbild", +missing_alt:"Vill du forts\u00E4tta utan bildbeskrivning. Icke grafiska webbl\u00E4sare kommer inte kunna tolka bilden f\u00F6r anv\u00E4ndaren.", +dialog_title:"Infoga/redigera bild", +src:"Bildens URL", +alt:"Bildens beskrivning", +list:"Bildlista", +border:"Ram", +dimensions:"Dimensioner", +vspace:"Vertikalrymd", +hspace:"Horisontalrymd", +align:"Justering", +align_baseline:"Baslinje", +align_top:"Toppen", +align_middle:"Mitten", +align_bottom:"Botten", +align_texttop:"Toppen av texten", +align_textbottom:"Botten av texten", +align_left:"H\u00F6ger", +align_right:"V\u00E4nster", +image_list:"Bildlista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/si_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/si_dlg.js new file mode 100644 index 00000000..71c9e1aa --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/si_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('si.advimage_dlg',{ +tab_general:"General", +tab_appearance:"Appearance", +tab_advanced:"Advanced", +general:"General", +title:"Title", +preview:"Preview", +constrain_proportions:"Constrain proportions", +langdir:"Language direction", +langcode:"Language code", +long_desc:"Long description link", +style:"Style", +classes:"Classes", +ltr:"Left to right", +rtl:"Right to left", +id:"Id", +map:"Image map", +swap_image:"Swap image", +alt_image:"Alternative image", +mouseover:"for mouse over", +mouseout:"for mouse out", +misc:"Miscellaneous", +example_img:"Appearance preview image", +missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", +dialog_title:"Insert/edit image", +src:"Image URL", +alt:"Image description", +list:"Image list", +border:"Border", +dimensions:"Dimensions", +vspace:"Vertical space", +hspace:"Horizontal space", +align:"Alignment", +align_baseline:"Baseline", +align_top:"Top", +align_middle:"Middle", +align_bottom:"Bottom", +align_texttop:"Text top", +align_textbottom:"Text bottom", +align_left:"Left", +align_right:"Right", +image_list:"Image list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sk_dlg.js new file mode 100644 index 00000000..61babe49 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sk_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('sk.advimage_dlg',{ +tab_general:"Hlavn\u00E9", +tab_appearance:"Vzh\u013Ead", +tab_advanced:"Roz\u0161\u00EDren\u00E9", +general:"Hlavn\u00E9 nastavenia", +title:"Titulok", +preview:"N\u00E1h\u013Ead", +constrain_proportions:"Zachova\u0165 pomer str\u00E1n", +langdir:"Smer textu", +langcode:"K\u00F3d jazyka", +long_desc:"Dlh\u00FD popis obr\u00E1zka", +style:"CSS \u0160t\u00FDl", +classes:"CSS Trieda", +ltr:"Z \u013Eava do prava", +rtl:"Z prava do \u013Eava", +id:"ID", +map:"Obr\u00E1zkov\u00E1 mapa", +swap_image:"Zmena obr\u00E1zka", +alt_image:"Alternat\u00EDvny obr\u00E1zok", +mouseover:"ak je kurzor nad obr\u00E1zkom", +mouseout:"ak kurzor od\u00EDde z obr\u00E1zka", +misc:"R\u00F4zne", +example_img:"Vzh\u013Ead n\u00E1h\u013Ead obr\u00E1zka", +missing_alt:"Naozaj chce\u0161 pokra\u010Dova\u0165 bez vlo\u017Een\u00E9ho popisu obr\u00E1zka? Bez popisu sa bude obr\u00E1zok nespr\u00E1vne zobrazova\u0165 v textov\u00FDch prehliada\u010Doch. Rovnako ak m\u00E1 u\u017E\u00EDvate\u013E vypnut\u00E9 zobrazenie obr\u00E1zkov alebo ak je u\u017E\u00EDvate\u013E nevidiaci, bude ma\u0165 probl\u00E9my rozpozna\u0165 obr\u00E1zok.", +dialog_title:"Vlo\u017Ei\u0165/editova\u0165 obr\u00E1zok", +src:"URL obr\u00E1zka", +alt:"Popis obr\u00E1zku", +list:"Zoznam obr\u00E1zkov", +border:"Okraj", +dimensions:"Rozmery", +vspace:"Vertik\u00E1lna medzera", +hspace:"Horizont\u00E1lna medzera", +align:"Usporiadanie", +align_baseline:"Z\u00E1klad\u0148a", +align_top:"Hore", +align_middle:"Uprostred", +align_bottom:"Dolu", +align_texttop:"Text hore", +align_textbottom:"Text dolu", +align_left:"V\u013Eavo", +align_right:"Vpravo", +image_list:"Zoznam obr\u00E1zkov" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sl_dlg.js new file mode 100644 index 00000000..65d91082 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sl_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('sl.advimage_dlg',{ +tab_general:"Splo\u0161no", +tab_appearance:"Izgled", +tab_advanced:"Napredno", +general:"Splo\u0161no", +title:"Naslov", +preview:"Predogled", +constrain_proportions:"Zakleni razmerje", +langdir:"Smer jezika", +langcode:"Koda jezika", +long_desc:"Povezava do opisa", +style:"Slog", +classes:"Razredi", +ltr:"Od leve proti desni", +rtl:"Od desne proti levi", +id:"Id", +map:"Karta slike", +swap_image:"Zamenjava slike", +alt_image:"Nadomestna slika", +mouseover:"pri mi\u0161ki nad", +mouseout:"pri mi\u0161ki izven", +misc:"Razno", +example_img:"Predogled izgleda", +missing_alt:"Zares \u017Eelite nadaljevati, brez da bi dolo\u010Dili opis slike? Brez njega slika nekaterim uporabnikom ne bo na voljo (izklopljen prikaz slik, tekstni brskalnik ali ljudje s slab\u0161im vidom).", +dialog_title:"Vstavi/uredi sliko", +src:"Naslov URL slike", +alt:"Opis slike", +list:"Seznam slik", +border:"Obroba", +dimensions:"Dimenzije", +vspace:"Prostor zg/sp", +hspace:"Prostor le/de", +align:"Poravnava", +align_baseline:"osnovna \u010Drta", +align_top:"vrh", +align_middle:"sredina", +align_bottom:"dno", +align_texttop:"vrh besedila", +align_textbottom:"dno besedila", +align_left:"levo, plavajo\u010De", +align_right:"desno, plavajo\u010De", +image_list:"Seznam slik" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sq_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sq_dlg.js new file mode 100644 index 00000000..dec4ce5d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sq_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('sq.advimage_dlg',{ +tab_general:"T\u00EB P\u00EBrgjithshme", +tab_appearance:"Pamja", +tab_advanced:"T\u00EB Avancuara", +general:"T\u00EB P\u00EBrgjithshme", +title:"Titulli", +preview:"Paraqitje", +constrain_proportions:"Ruaj raportet", +langdir:"Drejtimi i gjuh\u00EBs", +langcode:"Kodi i gjuh\u00EBs", +long_desc:"Lidhja e p\u00EBrshkrimit t\u00EB gjat\u00EB", +style:"Stili", +classes:"Klasat", +ltr:"Majtas-Djathtas", +rtl:"Djathtas-Majtas", +id:"Id", +map:"Harta e fotos", +swap_image:"Nd\u00EBrro foto", +alt_image:"P\u00EBrshkrimi alternativ", +mouseover:"n\u00EB mouse-in sip\u00EBr", +mouseout:"n\u00EB mouse-in jasht\u00EB", +misc:"T\u00EB Ndryshme", +example_img:"Paraqitje e fotos", +missing_alt:"Jeni t\u00EB sigurt q\u00EB doni t\u00EB vazhdoni pa p\u00EBrfshir\u00EB nj\u00EB p\u00EBrshkrim alternativ? Pa t\u00EB, foto mund t\u00EB jet\u00EB e pa aksesueshme nga njer\u00EBz me shikim t\u00EB kufizuar, q\u00EB p\u00EBrdorin shfletues q\u00EB nuk i shfaqin fotot apo i kan\u00EB \u00E7aktivizuar ato.", +dialog_title:"Fut/edito foto", +src:"URL e fotos", +alt:"P\u00EBrshkrimi i fotos", +list:"Lista e fotove", +border:"Korniza", +dimensions:"P\u00EBrmasat", +vspace:"Hap\u00EBsira vertikale", +hspace:"Hap\u00EBsira horizontale", +align:"Drejtimi", +align_baseline:"Vij\u00EB fundore", +align_top:"Krye", +align_middle:"Mes", +align_bottom:"Fund", +align_texttop:"Sip\u00EBr tekstit", +align_textbottom:"Posht\u00EB tekstit", +align_left:"Majtas", +align_right:"Djathtas", +image_list:"Lista e fotove" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sr_dlg.js new file mode 100644 index 00000000..d7d13866 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sr_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('sr.advimage_dlg',{ +tab_general:"Osnovno", +tab_appearance:"Izgled", +tab_advanced:"Napredno", +general:"Osnovno", +title:"Naslov", +preview:"Prikaz", +constrain_proportions:"Zadr\u017Ei proporcije", +langdir:"Smjer jezika", +langcode:"Kod jezika", +long_desc:"Poveznica dugog opisa", +style:"Stil", +classes:"Klase", +ltr:"S leva na desno", +rtl:"S desna na levo", +id:"Id", +map:"Karta slike", +swap_image:"Izmjenjiva slika", +alt_image:"Alternativna slika", +mouseover:"za prelazak mi\u0161a preko slike", +mouseout:"za izlazak mi\u0161a van slike", +misc:"Razno", +example_img:"Prikaz slike", +missing_alt:"Jeste li sigurni da \u017Eelite izostaviti opis slike? Slika mo\u017Ee biti nedostupna ljudima s pote\u0161ko\u0107ama ili onima koji koriste preglednike bez prikaza slika.", +dialog_title:"Umetni/uredi sliku", +src:"URL slike", +alt:"Opis slike", +list:"Lista slika", +border:"Obrub", +dimensions:"Dimenzije", +vspace:"Okomiti razmak", +hspace:"Vodoravni razmak", +align:"Poravnavanje", +align_baseline:"Osnovna linija", +align_top:"Vrh", +align_middle:"Sredina", +align_bottom:"Dno", +align_texttop:"Vrh teksta", +align_textbottom:"Dno teksta", +align_left:"Levo", +align_right:"Desno", +image_list:"Lista slika" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sv.js deleted file mode 100644 index 8f4084f0..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sv.js +++ /dev/null @@ -1,6 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_insert_image_alt2'] = 'Bildens titel'; -tinyMCELang['lang_insert_image_onmousemove'] = 'Alternativ bild' -tinyMCELang['lang_insert_image_mouseover'] = 'när pekaren är över'; -tinyMCELang['lang_insert_image_mouseout'] = 'när pekaren är utanför'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sv_dlg.js new file mode 100644 index 00000000..6c5ff2e5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/sv_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('sv.advimage_dlg',{ +tab_general:"Generellt", +tab_appearance:"Utseende", +tab_advanced:"Avancerat", +general:"Generellt", +title:"Titel", +preview:"F\u00F6rhandsvisning", +constrain_proportions:"Bibeh\u00E5ll proportionerna", +langdir:"Skriftriktning", +langcode:"Spr\u00E5kkod", +long_desc:"L\u00E5ng beskrivning", +style:"Stil", +classes:"Klasser", +ltr:"V\u00E4nster till h\u00F6ger", +rtl:"H\u00F6ger till v\u00E4nster", +id:"Id", +map:"L\u00E4nkkarta", +swap_image:"Utbytningsbild", +alt_image:"Alternativbild", +mouseover:"vid musen ovanf\u00F6r", +mouseout:"vid musen utanf\u00F6r", +misc:"\u00D6vrigt", +example_img:"Exempelbild", +missing_alt:"Vill du forts\u00E4tta utan bildbeskrivning. Icke grafiska webbl\u00E4sare kommer inte kunna tolka bilden f\u00F6r anv\u00E4ndaren.", +dialog_title:"Infoga/redigera bild", +src:"Bildens URL", +alt:"Bildens beskrivning", +list:"Bildlista", +border:"Ram", +dimensions:"Dimensioner", +vspace:"Vertikalrymd", +hspace:"Horisontalrymd", +align:"Justering", +align_baseline:"Baslinje", +align_top:"Toppen", +align_middle:"Mitten", +align_bottom:"Botten", +align_texttop:"Toppen av texten", +align_textbottom:"Botten av texten", +align_left:"V\u00E4nster", +align_right:"H\u00F6ger", +image_list:"Bildlista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tr_dlg.js new file mode 100644 index 00000000..31484f22 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tr_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('tr.advimage_dlg',{ +tab_general:"Genel", +tab_appearance:"G\u00F6r\u00FCn\u00FCm", +tab_advanced:"Geli\u015Fmi\u015F", +general:"Genel", +title:"Ba\u015Fl\u0131k", +preview:"\u00D6nizleme", +constrain_proportions:"Orant\u0131y\u0131 koru", +langdir:"Dil y\u00F6nelimi", +langcode:"Dil kodu", +long_desc:"Uzun a\u00E7\u0131klama ba\u011Flant\u0131s\u0131", +style:"Stil", +classes:"S\u0131n\u0131flar", +ltr:"Soldan sa\u011Fa", +rtl:"Sa\u011Fdan sola", +id:"Id", +map:"Resim haritas\u0131", +swap_image:"Resmi takas et", +alt_image:"Alternatif resim", +mouseover:"fare \u00FCzerindeyken", +mouseout:"fare d\u0131\u015F\u0131ndayken", +misc:"\u00C7e\u015Fitli", +example_img:"G\u00F6r\u00FCn\u00FCm \u00F6nizleme resmi", +missing_alt:"Bir Resim Tan\u0131m\u0131 girmeden devam etmek istedi\u011Finizden emin misiniz? Bu olmadan resim baz\u0131 engelli kullan\u0131c\u0131lar, metin tabanl\u0131 taray\u0131c\u0131lar veya Web'i resimleri kapatarak dola\u015Fanlar i\u00E7in eri\u015Filmez olabilir.", +dialog_title:"Resim ekle/d\u00FCzenle", +src:"Resim URL", +alt:"Resim tan\u0131m\u0131", +list:"Resim listesi", +border:"Kenarl\u0131k", +dimensions:"Boyutlar", +vspace:"Dikey bo\u015Fluk", +hspace:"Yatay bo\u015Fluk", +align:"Hizalama", +align_baseline:"Taban \u00E7izgisi", +align_top:"\u00DCst", +align_middle:"Orta", +align_bottom:"Alt", +align_texttop:"Metin \u00FCstte", +align_textbottom:"Metin altta", +align_left:"Sola", +align_right:"Sa\u011Fa", +image_list:"Resim listesi" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tt_dlg.js new file mode 100644 index 00000000..abfd4367 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tt_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('tt.advimage_dlg',{ +tab_general:"\u57FA\u672C", +tab_appearance:"\u5916\u89C0", +tab_advanced:"\u9032\u968E", +general:"\u57FA\u672C", +title:"\u641C\u5C0B", +preview:"\u9810\u89BD", +constrain_proportions:"\u4FDD\u6301\u6BD4\u4F8B", +langdir:"\u8A9E\u8A00\u66F8\u5BEB\u65B9\u5411", +langcode:"\u8A9E\u8A00\u7DE8\u78BC", +long_desc:"\u63CF\u8FF0", +style:"\u6A23\u5F0F", +classes:"\u6A23\u5F0F\u985E", +ltr:"\u5F9E\u5DE6\u5230\u53F3", +rtl:"\u5F9E\u53F3\u5230\u5DE6", +id:"Id", +map:"\u5716\u7247\u71B1\u9EDE", +swap_image:"\u5207\u63DB\u5716\u7247", +alt_image:"\u4EA4\u66FF\u5716\u7247", +mouseover:"\u6ED1\u9F20\u5283\u904E", +mouseout:"\u6ED1\u9F20\u79FB\u51FA", +misc:"\u5176\u4ED6", +example_img:"\u9810\u89BD\u5716\u7247", +missing_alt:" \u662F\u5426\u4E0D\u7232\u5716\u7247\u52A0\u5165\u8AAA\u660E\u6587\u5B57\uFF0C\u5982\u679C\u4E0D\u52A0\u5165\u8AAA\u660E\u6587\u5B57\uFF0C\u5C07\u5C0E\u81F4\u4E0D\u652F\u63F4\u5716\u7247\u7684\u700F\u89BD\u5668\u5FFD\u7565\u672C\u5167\u5BB9", +dialog_title:"\u63D2\u5165/\u7DE8\u8F2F \u5716\u7247", +src:"\u5716\u7247\u4F4D\u5740", +alt:"\u5716\u7247\u8AAA\u660E", +list:"\u5716\u7247\u6E05\u55AE", +border:"\u908A\u6846", +dimensions:"\u5C3A\u5BF8", +vspace:"\u5782\u76F4\u9593\u8DDD", +hspace:"\u6C34\u5E73\u9593\u8DDD", +align:"\u5C0D\u9F4A\u65B9\u5F0F", +align_baseline:"\u57FA\u7DDA", +align_top:"\u9802\u90E8", +align_middle:"\u4E2D\u90E8", +align_bottom:"\u5E95\u90E8", +align_texttop:"\u6587\u5B57\u4E0A\u65B9", +align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +align_left:"\u5C45\u5DE6", +align_right:"\u5C45\u53F3", +image_list:"\u5716\u7247\u6E05\u55AE" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tw_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tw_dlg.js new file mode 100644 index 00000000..2e635700 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/tw_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('tw.advimage_dlg',{ +tab_general:"\u4E00\u822C", +tab_appearance:"\u5916\u89C0", +tab_advanced:"\u9AD8\u7D1A", +general:"\u4E00\u822C", +title:"\u67E5\u627E", +preview:"\u9810\u89BD", +constrain_proportions:"\u4FDD\u6301\u6BD4\u4F8B", +langdir:"\u8A9E\u8A00\u66F8\u5BEB\u65B9\u5411", +langcode:"\u8A9E\u8A00\u7DE8\u78BC", +long_desc:"\u9577\u63CF\u8FF0\u93C8\u7D50", +style:"\u6A23\u5F0F", +classes:"\u985E\u578B", +ltr:"\u7531\u5DE6\u5230\u53F3", +rtl:"\u7531\u53F3\u5230\u5DE6", +id:"Id", +map:"\u5716\u7247\u5730\u5716", +swap_image:"\u5C0D\u63DB\u5716\u7247", +alt_image:"\u66FF\u63DB\u5716\u7247", +mouseover:"\u6ED1\u9F20\u79FB\u5165\u5716\u7247", +mouseout:"\u6ED1\u9F20\u79FB\u51FA\u5716\u7247", +misc:"\u5176\u4ED6", +example_img:"\u9810\u89BD\u5716\u7247", +missing_alt:"\u8ACB\u554F\u662F\u5426\u78BA\u5B9A\u4E0D\u70BA\u5716\u7247\u52A0\u5165\u8AAA\u660E\u6587\u5B57\uFF1F\u82E5\u6C92\u6709\u52A0\u5165\u8AAA\u660E\u6587\u5B57\uFF0C\u7576\u7528\u6236\u4F7F\u7528\u4E0D\u8B80\u5165\u5716\u7247\u6216\u6587\u5B57\u9AD4\u7684\u700F\u89BD\u5668\u6642\uFF0C\u5C07\u6703\u770B\u4E0D\u5230\u9019\u500B\u5716\u7247\u3002", +dialog_title:"\u63D2\u5165/\u7DE8\u8F2F\u5716\u7247", +src:"\u5716\u7247\u7DB2\u5740", +alt:"\u5716\u7247\u8AAA\u660E", +list:"\u5716\u7247\u6E05\u55AE", +border:"\u908A\u6846", +dimensions:"\u5C3A\u5BF8", +vspace:"\u6C34\u6E96\u9593\u8DDD", +hspace:"\u5782\u76F4\u9593\u8DDD", +align:"\u5C0D\u9F4A\u65B9\u5F0F", +align_baseline:"\u57FA\u6E96\u7DDA", +align_top:"\u4E0A\u65B9", +align_middle:"\u5C45\u4E2D", +align_bottom:"\u4E0B\u65B9", +align_texttop:"\u6587\u5B57\u4E0A\u65B9", +align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +align_left:"\u9760\u5DE6", +align_right:"\u9760\u53F3", +image_list:"\u5716\u7247\u6E05\u55AE" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/uk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/uk_dlg.js new file mode 100644 index 00000000..bf04745c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/uk_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('uk.advimage_dlg',{ +tab_general:"\u0417\u0430\u0433\u0430\u043B\u044C\u043D\u0435", +tab_appearance:"\u0412\u0438\u0433\u043B\u044F\u0434", +tab_advanced:"\u0414\u043E\u0434\u0430\u0442\u043A\u043E\u0432\u043E", +general:"\u0417\u0430\u0433\u0430\u043B\u044C\u043D\u0435", +title:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +preview:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u0434", +constrain_proportions:"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043F\u0440\u043E\u043F\u043E\u0440\u0446\u0456\u0457", +langdir:"\u041D\u0430\u043F\u0440\u044F\u043C\u043E\u043A \u043C\u043E\u0432\u0438", +langcode:"\u041A\u043E\u0434 \u043C\u043E\u0432\u0438", +long_desc:"Long description link", +style:"\u0421\u0442\u0438\u043B\u044C", +classes:"\u041A\u043B\u0430\u0441\u0438", +ltr:"\u0417\u043B\u0456\u0432\u0430 \u043F\u0440\u0430\u0432\u043E\u0440\u0443\u0447", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043B\u0456\u0432\u043E\u0440\u0443\u0447", +id:"Id", +map:"Image map", +swap_image:"Swap image", +alt_image:"\u0410\u043B\u044C\u0442\u0435\u0440\u043D\u0430\u0442\u0438\u0432\u043D\u0435 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +mouseover:"\u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u043D\u0456", +mouseout:"\u043F\u0440\u0438 \u0432\u0456\u0434\u0432\u0435\u0434\u0435\u043D\u043D\u0456", +misc:"\u0406\u043D\u0448\u0435", +example_img:"\u0412\u0438\u0433\u043B\u044F\u0434 \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u0434\u0443 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", +dialog_title:"\u0414\u043E\u0434\u0430\u0442\u0438/\u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +src:"\u0410\u0434\u0440\u0435\u0441\u0430 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +alt:"\u041E\u043F\u0438\u0441", +list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u044C", +border:"\u0413\u0440\u0430\u043D\u0438\u0446\u044F", +dimensions:"\u0420\u043E\u0437\u043C\u0456\u0440\u0438", +vspace:"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043F", +hspace:"\u0413\u043E\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043F", +align:"\u0412\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F", +align_baseline:"\u041F\u043E \u0431\u0430\u0437\u043E\u0432\u0456\u0439 \u043B\u0438\u043D\u0456\u0457", +align_top:"\u041F\u043E \u0432\u0435\u0440\u0445\u043D\u044C\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +align_middle:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +align_bottom:"\u041F\u043E \u043D\u0438\u0436\u043D\u044C\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +align_texttop:"\u041F\u043E \u0432\u0435\u0440\u0445\u043D\u0435\u043C\u0443 \u043A\u0440\u0430\u044E \u0442\u0435\u043A\u0441\u0442\u0443", +align_textbottom:"\u041F\u043E \u043D\u0438\u0436\u043D\u044C\u043E\u043C\u0443 \u043A\u0440\u0430\u044E \u0442\u0435\u043A\u0441\u0442\u0443", +align_left:"\u041F\u043E \u043B\u0456\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +align_right:"\u041F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +image_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u044C" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/vi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/vi_dlg.js new file mode 100644 index 00000000..f818b05b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/vi_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('vi.advimage_dlg',{ +tab_general:"C\u01A1 b\u1EA3n", +tab_appearance:"Hi\u1EC3n th\u1ECB", +tab_advanced:"N\u00E2ng cao", +general:"C\u01A1 b\u1EA3n", +title:"Ti\u00EAu \u0111\u1EC1", +preview:"Xem tr\u01B0\u1EDBc", +constrain_proportions:"Gi\u1EEF \u0111\u00FAng t\u1EC9 l\u1EC7 k\u00EDch th\u01B0\u1EDBc", +langdir:"Language direction", +langcode:"Language code", +long_desc:"Long description link", +style:"\u0110\u1ECBnh d\u1EA1ng ki\u1EC3u", +classes:"Classes", +ltr:"Left to right", +rtl:"Right to left", +id:"Id", +map:"Image map", +swap_image:"Swap image", +alt_image:"Alternative image", +mouseover:"for mouse over", +mouseout:"for mouse out", +misc:"Miscellaneous", +example_img:"Appearance preview image", +missing_alt:"H\u00ECnh \u1EA3nh ch\u01B0a c\u00F3 m\u00F4 t\u1EA3. M\u00F4 t\u1EA3 cho h\u00ECnh \u1EA3nh \u0111\u01B0\u1EE3c ng\u01B0\u1EDDi s\u1EED d\u1EE5ng th\u1EA5y khi tr\u00ECnh duy\u1EC7t c\u1EE7a h\u1ECD kh\u00F4ng hi\u1EC3n th\u1ECB \u0111\u01B0\u1EE3c h\u00ECnh \u1EA3nh. B\u1EA1n mu\u1ED1n ti\u1EBFp t\u1EE5c ch\u00E8n h\u00ECnh \u1EA3nh kh\u00F4ng c\u00F3 m\u00F4 t\u1EA3 ?", +dialog_title:"Ch\u00E8n/thay \u0111\u1ED5i h\u00ECnh \u1EA3nh", +src:"\u0110\u1ECBa ch\u1EC9 file h\u00ECnh \u1EA3nh", +alt:"M\u00F4 t\u1EA3 h\u00ECnh \u1EA3nh", +list:"Image list", +border:"Border", +dimensions:"Dimensions", +vspace:"Vertical space", +hspace:"Horizontal space", +align:"Alignment", +align_baseline:"Baseline", +align_top:"Top", +align_middle:"Middle", +align_bottom:"Bottom", +align_texttop:"Text top", +align_textbottom:"Text bottom", +align_left:"Left", +align_right:"Right", +image_list:"Image list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/zh_cn.js deleted file mode 100644 index f7dbe4b5..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/zh_cn.js +++ /dev/null @@ -1,6 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_insert_image_alt2'] = 'ͼƬ±êÌâ'; -tinyMCELang['lang_insert_image_onmousemove'] = 'Ìæ´úͼÏñ' -tinyMCELang['lang_insert_image_mouseover'] = 'Êó±êÒÆÉÏʱ'; -tinyMCELang['lang_insert_image_mouseout'] = 'Êó±êÒÆ¿ªÊ±'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/zh_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/zh_dlg.js new file mode 100644 index 00000000..c205bf3c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/langs/zh_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('zh.advimage_dlg',{ +tab_general:"\u4E00\u822C", +tab_appearance:"\u5916\u89C2", +tab_advanced:"\u9AD8\u7EA7", +general:"\u4E00\u822C", +title:"\u67E5\u627E", +preview:"\u9884\u89C8", +constrain_proportions:"\u4FDD\u6301\u6BD4\u4F8B", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +long_desc:"\u957F\u63CF\u8FF0\u94FE\u63A5", +style:"\u6837\u5F0F", +classes:"\u7C7B\u578B", +ltr:"\u7531\u5DE6\u5230\u53F3", +rtl:"\u7531\u53F3\u5230\u5DE6", +id:"Id", +map:"\u56FE\u7247\u5730\u56FE", +swap_image:"\u5BF9\u6362\u56FE\u7247", +alt_image:"\u66FF\u6362\u56FE\u7247", +mouseover:"\u9F20\u6807\u79FB\u5165\u56FE\u7247", +mouseout:"\u9F20\u6807\u79FB\u51FA\u56FE\u7247", +misc:"\u5176\u5B83", +example_img:"\u9884\u89C8\u56FE\u7247", +missing_alt:"\u8BF7\u95EE\u662F\u5426\u786E\u5B9A\u4E0D\u4E3A\u56FE\u7247\u52A0\u5165\u8BF4\u660E\u6587\u5B57\uFF1F\u82E5\u6CA1\u6709\u52A0\u5165\u8BF4\u660E\u6587\u5B57\uFF0C\u5F53\u7528\u6237\u4F7F\u7528\u4E0D\u8BFB\u5165\u56FE\u7247\u6216\u6587\u5B57\u4F53\u7684\u6D4F\u89C8\u5668\u65F6\uFF0C\u5C06\u4F1A\u770B\u4E0D\u5230\u8FD9\u4E2A\u56FE\u7247\u3002", +dialog_title:"\u63D2\u5165/\u7F16\u8F91\u56FE\u7247", +src:"\u56FE\u7247\u7F51\u5740", +alt:"\u56FE\u7247\u8BF4\u660E", +list:"\u56FE\u7247\u6E05\u5355", +border:"\u8FB9\u6846", +dimensions:"\u5C3A\u5BF8", +vspace:"\u6C34\u5E73\u95F4\u8DDD", +hspace:"\u5782\u76F4\u95F4\u8DDD", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_baseline:"\u57FA\u51C6\u7EBF", +align_top:"\u4E0A\u65B9", +align_middle:"\u5C45\u4E2D", +align_bottom:"\u4E0B\u65B9", +align_texttop:"\u6587\u5B57\u4E0A\u65B9", +align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +align_left:"\u9760\u5DE6", +align_right:"\u9760\u53F3", +image_list:"\u56FE\u7247\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/advimage/readme.txt deleted file mode 100644 index 56309511..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advimage/readme.txt +++ /dev/null @@ -1,19 +0,0 @@ - Advimage plugin for TinyMCE ------------------------------ - -About: - This is a more advanced image dialog mostly based on code contributed by Michael Keck. - This one supports mouseover/out image swapping. - -Installation instructions: - * Copy the advimage directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "advimage". - * Add this "a[name|href|target|title|onclick]" to extended_valid_elements option. - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "preview", - extended_valid_elements : "a[name|href|target|title|onclick]" - }); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css new file mode 100644 index 00000000..14364316 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css @@ -0,0 +1,8 @@ +.mceLinkList, .mceAnchorList, #targetlist {width:280px;} +.mceActionPanel {margin-top:7px;} +.panel_wrapper div.current {height:320px;} +#classlist, #title, #href {width:280px;} +#popupurl, #popupname {width:200px;} +#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;} +#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;} +#events_panel input {width:200px;} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js index 5b8b484f..4899f7b8 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js @@ -1,2 +1 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('advlink','en,de,sv,zh_cn,cs,fa,fr_ca,fr');function TinyMCE_advlink_getInsertLinkTemplate(){var template=new Array();template['file']='../../plugins/advlink/link.htm';template['width']=440;template['height']=420;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);return template;} \ No newline at end of file +(function(){tinymce.create('tinymce.plugins.AdvancedLinkPlugin',{init:function(ed,url){this.editor=ed;ed.addCommand('mceAdvLink',function(){var se=ed.selection;if(se.isCollapsed()&&!ed.dom.getParent(se.getNode(),'A'))return;ed.windowManager.open({file:url+'/link.htm',width:480+parseInt(ed.getLang('advlink.delta_width',0)),height:400+parseInt(ed.getLang('advlink.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('link',{title:'advlink.link_desc',cmd:'mceAdvLink'});ed.addShortcut('ctrl+k','advlink.advlink_desc','mceAdvLink');ed.onNodeChange.add(function(ed,cm,n,co){cm.setDisabled('link',co&&n.nodeName!='A');cm.setActive('link',n.nodeName=='A'&&!n.name);});},getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advlink',tinymce.plugins.AdvancedLinkPlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js index 2df50724..fc5325a9 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js @@ -1,18 +1,58 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('advlink', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr'); - -/** - * Insert link template function. - */ -function TinyMCE_advlink_getInsertLinkTemplate() { - var template = new Array(); - template['file'] = '../../plugins/advlink/link.htm'; - template['width'] = 440; - template['height'] = 420; - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0); - - return template; -} \ No newline at end of file +/** + * $Id: editor_plugin_src.js 539 2008-01-14 19:08:58Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedLinkPlugin', { + init : function(ed, url) { + this.editor = ed; + + // Register commands + ed.addCommand('mceAdvLink', function() { + var se = ed.selection; + + // No selection and not in link + if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A')) + return; + + ed.windowManager.open({ + file : url + '/link.htm', + width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)), + height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('link', { + title : 'advlink.link_desc', + cmd : 'mceAdvLink' + }); + + ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink'); + + ed.onNodeChange.add(function(ed, cm, n, co) { + cm.setDisabled('link', co && n.nodeName != 'A'); + cm.setActive('link', n.nodeName == 'A' && !n.name); + }); + }, + + getInfo : function() { + return { + longname : 'Advanced link', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js new file mode 100644 index 00000000..a8962501 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js @@ -0,0 +1,527 @@ +/* Functions for the advlink plugin popup */ + +tinyMCEPopup.requireLangPack(); + +var templates = { + "window.open" : "window.open('${url}','${target}','${options}')" +}; + +function preinit() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); +} + +function changeClass() { + var f = document.forms[0]; + + f.classes.value = getSelectValue(f, 'classlist'); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + var formObj = document.forms[0]; + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + var action = "insert"; + var html; + + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); + document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); + document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href'); + document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href'); + document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); + + // Link list + html = getLinkListHTML('linklisthref','href'); + if (html == "") + document.getElementById("linklisthrefrow").style.display = 'none'; + else + document.getElementById("linklisthrefcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '260px'; + + if (isVisible('popupurlbrowser')) + document.getElementById('popupurl').style.width = '180px'; + + elm = inst.dom.getParent(elm, "A"); + if (elm != null && elm.nodeName == "A") + action = "update"; + + formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true); + + setPopupControlsDisabled(true); + + if (action == "update") { + var href = inst.dom.getAttrib(elm, 'href'); + var onclick = inst.dom.getAttrib(elm, 'onclick'); + + // Setup form data + setFormValue('href', href); + setFormValue('title', inst.dom.getAttrib(elm, 'title')); + setFormValue('id', inst.dom.getAttrib(elm, 'id')); + setFormValue('style', inst.dom.getAttrib(elm, "style")); + setFormValue('rel', inst.dom.getAttrib(elm, 'rel')); + setFormValue('rev', inst.dom.getAttrib(elm, 'rev')); + setFormValue('charset', inst.dom.getAttrib(elm, 'charset')); + setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang')); + setFormValue('dir', inst.dom.getAttrib(elm, 'dir')); + setFormValue('lang', inst.dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('type', inst.dom.getAttrib(elm, 'type')); + setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup')); + setFormValue('target', inst.dom.getAttrib(elm, 'target')); + setFormValue('classes', inst.dom.getAttrib(elm, 'class')); + + // Parse onclick data + if (onclick != null && onclick.indexOf('window.open') != -1) + parseWindowOpen(onclick); + else + parseFunction(onclick); + + // Select by the values + selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir')); + selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel')); + selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev')); + selectByValue(formObj, 'linklisthref', href); + + if (href.charAt(0) == '#') + selectByValue(formObj, 'anchorlist', href); + + addClassesToList('classlist', 'advlink_styles'); + + selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true); + selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true); + } else + addClassesToList('classlist', 'advlink_styles'); +} + +function checkPrefix(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) + n.value = 'http://' + n.value; +} + +function setFormValue(name, value) { + document.forms[0].elements[name].value = value; +} + +function parseWindowOpen(onclick) { + var formObj = document.forms[0]; + + // Preprocess center code + if (onclick.indexOf('return false;') != -1) { + formObj.popupreturn.checked = true; + onclick = onclick.replace('return false;', ''); + } else + formObj.popupreturn.checked = false; + + var onClickData = parseLink(onclick); + + if (onClickData != null) { + formObj.ispopup.checked = true; + setPopupControlsDisabled(false); + + var onClickWindowOptions = parseOptions(onClickData['options']); + var url = onClickData['url']; + + formObj.popupname.value = onClickData['target']; + formObj.popupurl.value = url; + formObj.popupwidth.value = getOption(onClickWindowOptions, 'width'); + formObj.popupheight.value = getOption(onClickWindowOptions, 'height'); + + formObj.popupleft.value = getOption(onClickWindowOptions, 'left'); + formObj.popuptop.value = getOption(onClickWindowOptions, 'top'); + + if (formObj.popupleft.value.indexOf('screen') != -1) + formObj.popupleft.value = "c"; + + if (formObj.popuptop.value.indexOf('screen') != -1) + formObj.popuptop.value = "c"; + + formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes"; + formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes"; + formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes"; + formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes"; + formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes"; + formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes"; + formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes"; + + buildOnClick(); + } +} + +function parseFunction(onclick) { + var formObj = document.forms[0]; + var onClickData = parseLink(onclick); + + // TODO: Add stuff here +} + +function getOption(opts, name) { + return typeof(opts[name]) == "undefined" ? "" : opts[name]; +} + +function setPopupControlsDisabled(state) { + var formObj = document.forms[0]; + + formObj.popupname.disabled = state; + formObj.popupurl.disabled = state; + formObj.popupwidth.disabled = state; + formObj.popupheight.disabled = state; + formObj.popupleft.disabled = state; + formObj.popuptop.disabled = state; + formObj.popuplocation.disabled = state; + formObj.popupscrollbars.disabled = state; + formObj.popupmenubar.disabled = state; + formObj.popupresizable.disabled = state; + formObj.popuptoolbar.disabled = state; + formObj.popupstatus.disabled = state; + formObj.popupreturn.disabled = state; + formObj.popupdependent.disabled = state; + + setBrowserDisabled('popupurlbrowser', state); +} + +function parseLink(link) { + link = link.replace(new RegExp(''', 'g'), "'"); + + var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1"); + + // Is function name a template function + var template = templates[fnName]; + if (template) { + // Build regexp + var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi")); + var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\("; + var replaceStr = ""; + for (var i=0; i'); + for (var i=0; i'; + html += ''; + + for (i=0; i' + name + ''; + } + + html += ''; + + return html; +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm, elementArray, i; + + elm = inst.selection.getNode(); + checkPrefix(document.forms[0].href); + + elm = inst.dom.getParent(elm, "A"); + + // Remove element if there is no href + if (!document.forms[0].href.value) { + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + i = inst.selection.getBookmark(); + inst.dom.remove(elm, 1); + inst.selection.moveToBookmark(i); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + + // Create new anchor elements + if (elm == null) { + tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + + elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); + for (i=0; i' + tinyMCELinkList[i][0] + ''; + + html += ''; + + return html; + + // tinyMCE.debug('-- image list start --', html, '-- image list end --'); +} + +function getTargetListHTML(elm_id, target_form_element) { + var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';'); + var html = ''; + + html += ''; + + return html; +} + +// While loading +preinit(); +tinyMCEPopup.onInit.add(init); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ar_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ar_dlg.js new file mode 100644 index 00000000..1b515ea1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ar_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ar.advlink_dlg',{ +title:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u0631\u0627\u0628\u0637", +url:"\u0627\u0644\u0631\u0627\u0628\u0637", +target:"\u0627\u0644\u0645\u0633\u0627\u0631", +titlefield:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646", +is_email:"\u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0630\u064A \u0623\u062F\u062E\u0644\u062A\u0647 \u064A\u0628\u062F\u0648 \u0623\u0646\u0647 \u0639\u0646\u0648\u0627\u0646 \u0628\u0631\u064A\u062F \u0627\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u060C \u0646\u0647\u0644 \u062A\u0631\u064A\u062F \u0627\u0636\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062F\u0626\u0629 mailto: \u061F", +is_external:"\u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0630\u064A \u0623\u0636\u0641\u062A\u0647 \u064A\u0628\u062F\u0648 \u0623\u0646\u0647 \u0631\u0627\u0628\u0637 \u0644\u0635\u0641\u062D\u0629 \u062E\u0627\u0631\u062C\u064A\u0629\u060C \u0647\u0644 \u062A\u0631\u064A\u062F \u0627\u0636\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062F\u0626\u0629 http:// \u061F", +list:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0631\u0648\u0627\u0628\u0637", +general_tab:"\u0639\u0627\u0645", +popup_tab:"\u0646\u0627\u0641\u0630\u0629 \u0645\u0646\u0628\u062B\u0642\u0629", +events_tab:"\u0623\u062D\u062F\u0627\u062B", +advanced_tab:"\u0645\u062A\u0642\u062F\u0645", +general_props:"\u062E\u0635\u0627\u0626\u0635 \u0639\u0627\u0645\u0629", +popup_props:"\u062E\u0635\u0627\u0626\u0635 \u0645\u0646\u0628\u062B\u0642\u0629", +event_props:"\u0623\u062D\u062F\u0627\u062B", +advanced_props:"\u062E\u0635\u0627\u0626\u0635 \u0645\u062A\u0642\u062F\u0645\u0629", +popup_opts:"\u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A", +anchor_names:"\u0627\u0644\u0639\u0644\u0627\u0645\u0627\u062A", +target_same:"\u0641\u062A\u062D \u0641\u064A \u0647\u0630\u0647 \u0627\u0644\u0646\u0627\u0641\u062F\u0629/\u0627\u0644\u0627\u0637\u0627\u0631", +target_parent:"\u0641\u062A\u062D \u0641\u064A \u0627\u0644\u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0623\u0645/\u0627\u0644\u0627\u0637\u0627\u0631 \u0627\u0644\u0623\u0628", +target_top:"\u0641\u062A\u062D \u0641\u064A \u0627\u0637\u0627\u0631 \u0639\u0644\u0648\u064A (\u0633\u064A\u0633\u062A\u0628\u062F\u0644 \u062C\u0645\u064A\u0639 \u0627\u0644\u0627\u0637\u0627\u0631\u0627\u062A)", +target_blank:"\u0641\u062A\u062D \u0641\u064A \u0646\u0627\u0641\u0630\u0629 \u062C\u062F\u064A\u062F\u0629", +popup:"\u062C\u0627\u0641\u0627 \u0633\u0643\u0631\u064A\u0628\u062A \u0645\u0646\u0628\u062B\u0642\u0629", +popup_url:"\u0631\u0627\u0628\u0637 \u0627\u0644\u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0645\u0646\u0628\u062B\u0642\u0629", +popup_name:"\u0627\u0633\u0645 \u0627\u0644\u0646\u0627\u0641\u0630\u0629", +popup_return:"\u0625\u062F\u0631\u0627\u062C 'return false'", +popup_scrollbars:"\u0639\u0631\u0636 \u0623\u0634\u0631\u0637\u0629 \u0627\u0644\u062A\u0645\u0631\u064A\u0631", +popup_statusbar:"\u0639\u0631\u0636 \u0634\u0631\u064A\u0637 \u0627\u0644\u062D\u0627\u0644\u0629", +popup_toolbar:"\u0639\u0631\u0636 \u0634\u0631\u0637 \u0627\u0644\u0623\u062F\u0648\u0627\u062A", +popup_menubar:"\u0639\u0631\u0636 \u0634\u0631\u064A\u0637 \u0627\u0644\u0642\u0627\u0626\u0645\u0629", +popup_location:"\u0639\u0631\u0636 \u0634\u0631\u064A\u0637 \u0627\u0644\u0645\u0648\u0636\u0639", +popup_resizable:"\u062C\u0639\u0644 \u0627\u0644\u0646\u0627\u0641\u0630\u0629 \u0642\u0627\u0628\u0644\u0629 \u0644\u0644\u062A\u0635\u063A\u064A\u0631 \u0648 \u0627\u0644\u062A\u0643\u0628\u064A\u0631", +popup_dependent:"\u062A\u0627\u0628\u0639 (Mozilla/Firefox \u0641\u0642\u0637)", +popup_size:"\u0627\u0644\u062D\u062C\u0645", +popup_position:"\u0627\u0644\u0645\u0648\u0642\u0639 (X/Y)", +id:"Id", +style:"\u0627\u0644\u0623\u0633\u0644\u0648\u0628", +classes:"\u0627\u0644\u0641\u0626\u0627\u062A", +target_name:"\u0645\u0633\u0627\u0631 \u0627\u0644\u0627\u0633\u0645", +langdir:"\u0627\u062A\u062C\u0627\u0647 \u0627\u0644\u0644\u063A\u0629", +target_langcode:"\u0645\u0633\u0627\u0631 \u0627\u0644\u0644\u063A\u0629", +langcode:"\u0634\u0641\u0631\u0629 \u0627\u0644\u0644\u063A\u0629", +encoding:"\u0645\u0633\u0627\u0631 \u0634\u0641\u0631\u0629 \u0627\u0644\u062D\u0631\u0641", +mime:"\u0645\u0633\u0627\u0631 MIME type", +rel:"\u0627\u0644\u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u0635\u0641\u062D\u0629 \u0644\u0644\u0647\u062F\u0641", +rev:"\u0627\u0644\u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u0647\u062F\u0641 \u0644\u0644\u0635\u0641\u062D\u0629", +tabindex:"\u062A\u0631\u062A\u064A\u0628 \u0627\u0644\u062A\u0628\u0648\u064A\u0628", +accesskey:"\u062D\u0631\u0641 \u0627\u0644\u0627\u062E\u062A\u0635\u0627\u0631", +ltr:"\u064A\u0633\u0627\u0631 \u0627\u0644\u0649 \u064A\u0645\u064A\u0646", +rtl:"\u064A\u0645\u064A\u0646 \u0627\u0644\u0649 \u064A\u0633\u0627\u0631", +link_list:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0631\u0648\u0627\u0628\u0637" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/bg_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/bg_dlg.js new file mode 100644 index 00000000..b67b1e6e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/bg_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('bg.advlink_dlg',{ +title:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430", +url:"URL \u043D\u0430 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430", +target:"\u0426\u0435\u043B", +titlefield:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435", +is_email:"URL-\u0442\u043E \u043A\u043E\u0435\u0442\u043E \u0432\u044A\u0432\u0435\u0434\u043E\u0445\u0442\u0435 \u0435 email \u0430\u0434\u0440\u0435\u0441, \u0436\u0435\u043B\u0430\u0435\u0442\u0435 \u043B\u0438 \u0434\u0430 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u0435 \u043D\u0443\u0436\u043D\u0438\u044F\u0442 mailto: \u043F\u0440\u0435\u0444\u0438\u043A\u0441?", +is_external:"URL-\u0442\u043E \u043A\u043E\u0435\u0442\u043E \u0432\u044A\u0432\u0435\u0434\u043E\u0445\u0442\u0435 \u0435 \u0432\u044A\u043D\u0448\u043D\u0430 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430, \u0436\u0435\u043B\u0430\u0435\u0442\u0435 \u043B\u0438 \u0434\u0430 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u0435 \u043D\u0443\u0436\u043D\u0438\u044F\u0442 http:// \u043F\u0440\u0435\u0444\u0438\u043A\u0441?", +list:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0438", +general_tab:"\u041E\u0431\u0449\u0438", +popup_tab:"Popup", +events_tab:"\u0421\u044A\u0431\u0438\u0442\u0438\u044F", +advanced_tab:"\u0417\u0430 \u043D\u0430\u043F\u0440\u0435\u0434\u043D\u0430\u043B\u0438", +general_props:"\u041E\u0431\u0449\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438", +popup_props:"Popup \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438", +event_props:"\u0421\u044A\u0431\u0438\u0442\u0438\u044F", +advanced_props:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0437\u0430 \u043D\u0430\u043F\u0440\u0435\u0434\u043D\u0430\u043B\u0438", +popup_opts:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438", +anchor_names:"\u041A\u043E\u0442\u0432\u0438", +target_same:"\u041E\u0442\u0432\u043E\u0440\u0438 \u0432 \u0442\u043E\u0437\u0438 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446 / \u0444\u0440\u0435\u0439\u043C", +target_parent:"\u041E\u0442\u0432\u043E\u0440\u0438 \u0432 \u0433\u043E\u0440\u043D\u0438\u044F \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446 / \u0444\u0440\u0435\u0439\u043C", +target_top:"\u041E\u0442\u0432\u043E\u0440\u0438 \u0432 \u043D\u0430\u0439-\u0433\u043E\u0440\u043D\u0438\u044F \u0444\u0440\u0435\u0439\u043C (\u0437\u0430\u043C\u0435\u0441\u0442\u0432\u0430 \u0432\u0441\u0438\u0447\u043A\u0438 \u0444\u0440\u0435\u0439\u043C\u043E\u0432\u0435)", +target_blank:"\u041E\u0442\u0432\u043E\u0440\u0438 \u0432 \u043D\u043E\u0432 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446", +popup:"Javascript popup", +popup_url:"URL \u043D\u0430 popup-\u0430", +popup_name:"\u0418\u043C\u0435 \u043D\u0430 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446\u0430", +popup_return:"\u0412\u043C\u044A\u043A\u043D\u0438 'return false'", +popup_scrollbars:"\u041F\u043E\u043A\u0430\u0436\u0438 \u0441\u043A\u0440\u043E\u043B\u0435\u0440\u0438", +popup_statusbar:"\u041F\u043E\u043A\u0430\u0436\u0438 status bar", +popup_toolbar:"\u041F\u043E\u043A\u0430\u0436\u0438 \u043B\u0435\u043D\u0442\u0438\u0442\u0435 \u0441 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0438", +popup_menubar:"\u041F\u043E\u043A\u0430\u0436\u0438 \u043B\u0435\u043D\u0442\u0430\u0442\u0430 \u0441 \u043C\u0435\u043D\u044E\u0442\u0430", +popup_location:"\u041F\u043E\u043A\u0430\u0436\u0438 location bar", +popup_resizable:"\u0420\u0430\u0437\u0440\u0435\u0448\u0438 \u043F\u0440\u0435\u043E\u0440\u0430\u0437\u043C\u0435\u0440\u044F\u0432\u0430\u043D\u0435 \u043D\u0430 \u043F\u0440\u043E\u0437\u043E\u0440\u0446\u0438\u0442\u0435", +popup_dependent:"\u0417\u0430\u0432\u0438\u0441\u0438\u043C\u0438 (Mozilla/Firefox only)", +popup_size:"\u0420\u0430\u0437\u043C\u0435\u0440", +popup_position:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F (X/Y)", +id:"Id", +style:"\u0421\u0442\u0438\u043B", +classes:"\u041A\u043B\u0430\u0441\u043E\u0432\u0435", +target_name:"\u0418\u043C\u0435 \u043D\u0430 \u0446\u0435\u043B", +langdir:"\u041F\u043E\u0441\u043E\u043A\u0430 \u043D\u0430 \u0435\u0437\u0438\u043A\u0430", +target_langcode:"\u0415\u0437\u0438\u043A", +langcode:"\u041A\u043E\u0434 \u043D\u0430 \u0435\u0437\u0438\u043A\u0430", +encoding:"\u041A\u043E\u0434\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0441\u0438\u043C\u0432\u043E\u043B\u0438\u0442\u0435", +mime:"MIME \u0442\u0438\u043F", +rel:"\u0412\u0437\u0430\u0438\u043C\u043E\u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 - \u0446\u0435\u043B", +rev:"\u0412\u0437\u0430\u0438\u043C\u043E\u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0435 \u0446\u0435\u043B - \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430", +tabindex:"\u041F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u043D\u043E\u0441\u0442", +accesskey:"\u041A\u043B\u0430\u0432\u0438\u0448", +ltr:"\u041E\u0442\u043B\u044F\u0432\u043E \u043D\u0430 \u0434\u044F\u0441\u043D\u043E", +rtl:"\u041E\u0442\u0434\u044F\u0441\u043D\u043E \u043D\u0430 \u043B\u044F\u0432\u043E", +link_list:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0438" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/br_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/br_dlg.js new file mode 100644 index 00000000..d0db08d8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/br_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('br.advlink_dlg',{ +title:"Inserir/editar hyperlink", +url:"URL do hyperlink", +target:"Alvo", +titlefield:"T\u00C3\u0083\u00C2\u00ADtulo", +is_email:"A URL digitada parece ser um endere\u00C3\u0083\u00C2\u00A7o de e-mail. Deseja acrescentar o (necess\u00C3\u0083\u00C2\u00A1rio) prefixo mailto:?", +is_external:"A URL digitada parece conduzir a um link externo. Deseja acrescentar o (necess\u00C3\u0083\u00C2\u00A1rio) prefixo http://?", +list:"Lista de hyperlinks", +general_tab:"Geral", +popup_tab:"Popup", +events_tab:"Eventos", +advanced_tab:"Avan\u00C3\u0083\u00C2\u00A7ado", +general_props:"Propriedades gerais", +popup_props:"Propriedades de popup", +event_props:"Eventos", +advanced_props:"Propriedades avan\u00C3\u0083\u00C2\u00A7adas", +popup_opts:"Op\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00B5es", +anchor_names:"\u00C3\u0083\u00C2\u0082ncoras", +target_same:"Abrir nesta janela/quadro", +target_parent:"Abrir na janela/quadro pai", +target_top:"Abrir na p\u00C3\u0083\u00C2\u00A1gina inteira (substitui todos os quadros)", +target_blank:"Abrir numa nova janela", +popup:"Popup javascript", +popup_url:"URL do popup", +popup_name:"Nome da janela", +popup_return:"Inserir 'return false'", +popup_scrollbars:"Mostrar barras de scroll", +popup_statusbar:"Mostrar barra de status", +popup_toolbar:"Mostrar barras de ferramentas", +popup_menubar:"Mostrar barra de menu", +popup_location:"Mostrar barra de endere\u00C3\u0083\u00C2\u00A7os", +popup_resizable:"Permitir altera\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o do tamanho da janela", +popup_dependent:"Dependente (Mozilla/Firefox apenas)", +popup_size:"Tamanho", +popup_position:"Posi\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o (X/Y)", +id:"Id", +style:"Estilo", +classes:"Classes", +target_name:"Nome do alvo", +langdir:"Direc\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o do texto", +target_langcode:"linguagem alvo", +langcode:"C\u00C3\u0083\u00C2\u00B3digo da linguagem", +encoding:"Codifica\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o de caracteres", +mime:"Tipo MIME alvo", +rel:"Rela\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o p\u00C3\u0083\u00C2\u00A1gina/alvo", +rev:"Rela\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o alvo/p\u00C3\u0083\u00C2\u00A1gina", +tabindex:"Tabindex", +accesskey:"Chave de acesso", +ltr:"Da esquerda para a direita", +rtl:"Da direita para a esquerda", +link_list:"Lista de hyperlinks" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/bs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/bs_dlg.js new file mode 100644 index 00000000..d2c140fa --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/bs_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('bs.advlink_dlg',{ +title:"Umetni/uredi poveznicu", +url:"URL poveznice", +target:"Meta", +titlefield:"Naslov", +is_email:"URL koji ste unijeli izgleda kao e-mail adresa, \u017Eelite li dodati potrebni mailto: prefiks?", +is_external:"URL koji ste unijeli izgleda kao vanjska poveznica, \u017Eelite li dodati potrebni http:// prefiks?", +list:"Lista poveznica", +general_tab:"Osnovno", +popup_tab:"Popup", +events_tab:"Doga\u0111aj", +advanced_tab:"Napredno", +general_props:"Osnovna svojstva", +popup_props:"Svojstva popup prozora", +event_props:"Doga\u0111aji", +advanced_props:"Napredna svojstva", +popup_opts:"Opcije", +anchor_names:"Sidra", +target_same:"Otovori u novom prozoru / okviru", +target_parent:"Otvori u izvornom prozoru / okvir", +target_top:"Otvori u gornjem okviru (zamjenjuje sve okvire)", +target_blank:"Otvori u novom prozoru", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Ime prozora", +popup_return:"Umetni 'return false'", +popup_scrollbars:"Poka\u017Ei kliza\u010De", +popup_statusbar:"Poka\u017Ei statusnu traku", +popup_toolbar:"Poka\u017Ei alatne trake", +popup_menubar:"Poka\u017Ei izbornik", +popup_location:"Poka\u017Ei traku lokacije", +popup_resizable:"Prozor promjenjive veli\u010Dine", +popup_dependent:"Ovisan (samo za Mozilla/Firefox)", +popup_size:"Veli\u010Dina", +popup_position:"Pozicija (X/Y)", +id:"Id", +style:"Stil", +classes:"Klasa", +target_name:"Ime mete", +langdir:"Smjer jezika", +target_langcode:"Jezik", +langcode:"Kod jezika", +encoding:"Kodiranje znakova", +mime:"MIME tip", +rel:"Odnos stranice prema meti", +rev:"Odnos mete prema stranici", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"S lijeva na desno", +rtl:"S desna na lijevo", +link_list:"Lista poveznica" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ca_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ca_dlg.js new file mode 100644 index 00000000..f7dd687d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ca_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ca.advlink_dlg',{ +title:"Insereix/edita enlla\u00E7", +url:"URL de l'enlla\u00E7", +target:"Objectiu", +titlefield:"T\u00EDtol", +is_email:"L'URL que has introdu\u00EFt sembla una adre\u00E7a de correu, vols afegir-hi el prefix mailto://?", +is_external:"L'URL que has introdu\u00EFt sembla un enlla\u00E7 extern, vols afegir-hi el prefix http://?", +list:"Llista d'enlla\u00E7os", +general_tab:"General", +popup_tab:"Emergent", +events_tab:"Esdeveniments", +advanced_tab:"Avan\u00E7at", +general_props:"Propietats generals", +popup_props:"Propietats de l'emergent", +event_props:"Esdeveniments", +advanced_props:"Propietats avan\u00E7ades", +popup_opts:"Opcions", +anchor_names:"\u00C0ncores", +target_same:"Obre en aquesta finestra / marc", +target_parent:"Obre a la finestra /marc pare", +target_top:"Obre en el marc superior (substitueix tots els marcs)", +target_blank:"Obre en una finestra nova", +popup:"Emergent Javascript", +popup_url:"URL de l'emergent", +popup_name:"Nom de la finestra", +popup_return:"Insereix 'return false'", +popup_scrollbars:"Mostra les barres de despla\u00E7ament", +popup_statusbar:"Mostra la barra d'estat", +popup_toolbar:"Mostra les barres d'eines", +popup_menubar:"Mostra la barra de men\u00FA", +popup_location:"Mostra la barra d'ubicaci\u00F3", +popup_resizable:"La finestra es pot amidar", +popup_dependent:"Dependent (nom\u00E9s Mozilla/Firefox)", +popup_size:"Mida", +popup_position:"Posici\u00F3 (X/Y)", +id:"Id", +style:"Estil", +classes:"Classes", +target_name:"Nom de l'objectiu", +langdir:"Direcci\u00F3 de l'idioma", +target_langcode:"Idioma objectiu", +langcode:"Codi de l'idioma", +encoding:"Codificaci\u00F3 de car\u00E0cters de l'objectiu", +mime:"Tipus MIME de l'objectiu", +rel:"Relaci\u00F3 p\u00E0gina a objectiu", +rev:"Relaci\u00F3 objectiu a p\u00E0gina", +tabindex:"\u00CDndex de taula", +accesskey:"Accesskey", +ltr:"D'esquerra a dreta", +rtl:"De dreta a esquerra", +link_list:"Llista d'enlla\u00E7os" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ch_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ch_dlg.js new file mode 100644 index 00000000..a561c30b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ch_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ch.advlink_dlg',{ +title:"\u63D2\u5165/\u7F16\u8F91\u94FE\u63A5", +url:"\u94FE\u63A5URL", +target:"\u76EE\u6807", +titlefield:"\u6807\u9898", +is_email:"\u4F60\u8F93\u5165\u7684URL\u4F3C\u4E4E\u662F\u4E00\u4E2AEmail\u5730\u5740\uFF0C\u662F\u5426\u8981\u52A0\u4E0A\u524D\u7F6E\u8BCD\"mailto:\" \uFF1F ", +is_external:"\u4F60\u8F93\u5165\u7684URL\u4F3C\u4E4E\u662F\u4E00\u4E2A\u5916\u90E8\u94FE\u63A5\uFF0C\u662F\u5426\u8981\u52A0\u4E0A\u524D\u7F6E\u8BCD\"http://\" \uFF1F ", +list:"\u94FE\u63A5\u6E05\u5355", +general_tab:"\u4E00\u822C", +popup_tab:"\u5F39\u51FA\u89C6\u7A97", +events_tab:"\u4E8B\u4EF6", +advanced_tab:"\u8FDB\u9636", +general_props:"\u4E00\u822C\u5C5E\u6027", +popup_props:"\u5F39\u51FA\u89C6\u7A97\u5C5E\u6027", +event_props:"\u4E8B\u4EF6", +advanced_props:"\u8FDB\u9636\u5C5E\u6027", +popup_opts:"\u9009\u9879", +anchor_names:"\u951A\u70B9", +target_same:"\u5728\u76EE\u524D\u89C6\u7A97/\u6846\u5F00\u542F", +target_parent:"\u5728\u6BCD\u89C6\u7A97/\u6846\u5F00\u542F", +target_top:"\u5728\u9876\u5C42\u7A97\u6846\u5F00\u542F(\u53D6\u4EE3\u6240\u6709\u7A97\u6846)", +target_blank:"\u5728\u65B0\u89C6\u7A97\u5F00\u542F", +popup:"JavaScript\u5F39\u51FA\u89C6\u7A97", +popup_url:"\u5F39\u51FA\u89C6\u7A97URL", +popup_name:"\u89C6\u7A97\u540D\u79F0", +popup_return:"\u63D2\u5165\"return false\"", +popup_scrollbars:"\u663E\u793A\u5377\u52A8\u8F74", +popup_statusbar:"\u663E\u793A\u72B6\u6001\u533A", +popup_toolbar:"\u663E\u793A\u5DE5\u5177\u680F", +popup_menubar:"\u663E\u793A\u9009\u5355\u5217", +popup_location:"\u663E\u793A\u7F51\u5740\u5217", +popup_resizable:"\u89C6\u7A97\u53EF\u91CD\u8BBE\u5927\u5C0F", +popup_dependent:"\u6D4F\u89C8\u5668\u9650\u5236(\u4EC5\u5BF9Mozilla/Firefox\u6709\u6548)", +popup_size:"\u5927\u5C0F", +popup_position:"\u4F4D\u7F6E(X/Y)", +id:"ID", +style:"\u6837\u5F0F", +classes:"\u7C7B\u522B", +target_name:"\u76EE\u6807\u540D\u79F0", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +target_langcode:"\u76EE\u6807\u8BED\u8A00", +langcode:"\u8BED\u8A00\u7F16\u7801", +encoding:"\u76EE\u6807\u8BED\u8A00\u7F16\u7801", +mime:"\u76EE\u6807MIME\u7C7B\u578B", +rel:"\u7F51\u9875\u5230\u76EE\u6807\u7684\u5173\u8FDE", +rev:"\u76EE\u6807\u5230\u7F51\u9875\u7684\u5173\u8FDE", +tabindex:"Tab\u7D22\u5F15", +accesskey:"\u5FEB\u6377\u952E", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +link_list:"\u94FE\u63A5\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/cs.js deleted file mode 100644 index 5277d260..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/cs.js +++ /dev/null @@ -1,20 +0,0 @@ -// CZ lang variables - -tinyMCELang['lang_insert_link_target_same'] = 'Otevøít ve stejném oknì/rámu'; -tinyMCELang['lang_insert_link_target_parent'] = 'Otevøít v rodièovském oknì/rámu'; -tinyMCELang['lang_insert_link_target_top'] = 'Otevøít v nejvyšším rámu (pøepíše všechny rámy)'; -tinyMCELang['lang_insert_link_target_blank'] = 'Otevøít v novém oknì'; -tinyMCELang['lang_insert_link_target_named'] = 'Otevøít v oknì'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'Popup URL'; -tinyMCELang['lang_insert_link_popup_name'] = 'Název okna'; -tinyMCELang['lang_insert_link_popup_return'] = 'insert \'return false\''; -tinyMCELang['lang_insert_link_popup_scrollbars'] = 'Ukázat posuvníky'; -tinyMCELang['lang_insert_link_popup_statusbar'] = 'Ukázat stavový øádek'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'Ukázat ovl. lištu'; -tinyMCELang['lang_insert_link_popup_menubar'] = 'Ukázat menu'; -tinyMCELang['lang_insert_link_popup_location'] = 'Ukázat lištu umístìní'; -tinyMCELang['lang_insert_link_popup_resizable'] = 'Promìnná velikost okna'; -tinyMCELang['lang_insert_link_popup_size'] = 'Velikost'; -tinyMCELang['lang_insert_link_popup_position'] = 'Umístìní (X/Y)'; -tinyMCELang['lang_insert_link_popup_missingtarget'] = 'Vložte název cíle nebo vyberte jinou volbu.'; \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/cs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/cs_dlg.js new file mode 100644 index 00000000..0452f7e0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/cs_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('cs.advlink_dlg',{ +title:"Vlo\u017Eit/upravit odkaz", +url:"URL odkazu", +target:"C\u00EDl", +titlefield:"Titulek", +is_email:"Zadan\u00E9 URL vypad\u00E1 jako e-mailov\u00E1 adresa, chcete doplnit prefix mailto:?", +is_external:"Zadan\u00E9 URL vypad\u00E1 jako extern\u00ED odkaz, chtete doplnit prefix http://?", +list:"Seznam odkaz\u016F", +general_tab:"Hlavn\u00ED", +popup_tab:"Vyskakovac\u00ED okno", +events_tab:"Ud\u00E1losti", +advanced_tab:"Pokro\u010Dil\u00E9", +general_props:"Hlavn\u00ED nastaven\u00ED", +popup_props:"Vlastnosti vyskakovac\u00EDho okna", +event_props:"Ud\u00E1losti", +advanced_props:"Pokro\u010Dil\u00E9 nastaven\u00ED", +popup_opts:"Volby", +anchor_names:"Kotva", +target_same:"Otev\u0159\u00EDt v tomto okn\u011B/r\u00E1mu", +target_parent:"Otev\u0159\u00EDt v nad\u0159azen\u00E9m okn\u011B/r\u00E1mu", +target_top:"Otev\u0159\u00EDt v hlavn\u00EDm okn\u011B/r\u00E1mu (nahradit v\u0161echny r\u00E1my)", +target_blank:"Otev\u0159\u00EDt v nov\u00E9m okn\u011B/r\u00E1mu", +popup:"Javascriptov\u00E9 okno", +popup_url:"URL vyskakovac\u00EDho okna", +popup_name:"N\u00E1zev okna", +popup_return:"Vlo\u017Eit 'return false'", +popup_scrollbars:"Zobrazit posuvn\u00EDky", +popup_statusbar:"Zobrazit stavov\u00FD \u0159\u00E1dek", +popup_toolbar:"Zobrazit n\u00E1strojovou li\u0161tu", +popup_menubar:"Zobrazit menu", +popup_location:"Zobrazit pole s adresou", +popup_resizable:"Umo\u017Enit zm\u011Bnu velikosti vytvo\u0159en\u00E9ho okna", +popup_dependent:"Z\u00E1vislost (pouze Mozilla/Firefox)", +popup_size:"Velikost", +popup_position:"Pozice (X/Y)", +id:"ID", +style:"Styl", +classes:"T\u0159\u00EDdy", +target_name:"N\u00E1zev c\u00EDle", +langdir:"Sm\u011Br textu", +target_langcode:"Jazyk c\u00EDle", +langcode:"K\u00F3d jazyka", +encoding:"K\u00F3dov\u00E1n\u00ED", +mime:"MIME typ", +rel:"rel", +rev:"rev", +tabindex:"Tabindex", +accesskey:"P\u0159\u00EDstupov\u00E1 kl\u00E1vesa", +ltr:"Zleva doprava", +rtl:"Zprava doleva", +link_list:"Seznam odkaz\u016F" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/da_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/da_dlg.js new file mode 100644 index 00000000..dc8bfd78 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/da_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('da.advlink_dlg',{ +title:"Inds\u00E6t/rediger link", +url:"Link URL", +target:"M\u00E5l", +titlefield:"Titel", +is_email:"Den URL, der er indtastet, ser ud til at v\u00E6re en emailadresse. Vil du have tilf\u00F8jet det p\u00E5kr\u00E6vede mailto: foran?", +is_external:"Den URL, der er indtastet, ser ud til at v\u00E6re et eksternt link. Vil du have tilf\u00F8jet det p\u00E5kr\u00E6vede http:// foran?", +list:"Liste over links", +general_tab:"Generelt", +popup_tab:"Popup", +events_tab:"H\u00E6ndelser", +advanced_tab:"Advanceret", +general_props:"Generelle egenskaber", +popup_props:"Popup egenskaber", +event_props:"H\u00E6ndelser", +advanced_props:"Avancerede egenskaber", +popup_opts:"Indstillinger", +anchor_names:"Ankre", +target_same:"\u00C5ben i dette vindue / ramme", +target_parent:"\u00C5ben i overliggende vindue / ramme", +target_top:"\u00C5ben i \u00F8verste vindue / ramme (erstatter alle rammer)", +target_blank:"\u00C5ben i nyt vindue", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Vinduesnavn", +popup_return:"Inds\u00E6t 'return false'", +popup_scrollbars:"Vis rullepanel", +popup_statusbar:"Vis statuslinje", +popup_toolbar:"Vis v\u00E6rkt\u00F8jslinjer", +popup_menubar:"Vis menulinje", +popup_location:"Vis adresselinje", +popup_resizable:"Lad det v\u00E6re muligt at \u00E6ndre st\u00F8rrelsen p\u00E5 vinduet", +popup_dependent:"Afh\u00E6ngig (Kun Mozilla/Firefox)", +popup_size:"St\u00F8rrelse", +popup_position:"Position (X/Y)", +id:"Id", +style:"Stil", +classes:"Klasser", +target_name:"Destinationsnavn", +langdir:"Sprogretning", +target_langcode:"Destinationssprog", +langcode:"Sprogkode", +encoding:"Destinationstegns\u00E6t", +mime:"Destinations-MIME-type", +rel:"Relativ side til destination", +rev:"Relativ destination til side", +tabindex:"Tabindex", +accesskey:"Genvejstast", +ltr:"Venstre mod h\u00F8jre", +rtl:"H\u00F8jre mod venstre", +link_list:"Liste over links" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/de.js deleted file mode 100644 index 48263d1d..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/de.js +++ /dev/null @@ -1,20 +0,0 @@ -// DE lang variables - -tinyMCELang['lang_insert_link_target_same'] = 'Im selben Frame öffnen'; -tinyMCELang['lang_insert_link_target_parent'] = 'Im darüber liegenden Frame öffnen'; -tinyMCELang['lang_insert_link_target_top']= 'Im obersten Frame öffnen'; -tinyMCELang['lang_insert_link_target_blank']= 'In einem neuen Fenster öffnen'; -tinyMCELang['lang_insert_link_target_named']= 'Öffnen im Fenster/Frame'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'Popup URL'; -tinyMCELang['lang_insert_link_popup_name']= 'Fenstername'; -tinyMCELang['lang_insert_link_popup_return']= 'mit \'return false\''; -tinyMCELang['lang_insert_link_popup_scrollbars']= 'Scrollbars anzeigen'; -tinyMCELang['lang_insert_link_popup_statusbar'] = 'Statusbar anzeigen'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'Toolbars anzeigen'; -tinyMCELang['lang_insert_link_popup_menubar'] = 'Menu anzeigen'; -tinyMCELang['lang_insert_link_popup_location']= 'Adresszeile anzeigen'; -tinyMCELang['lang_insert_link_popup_resizable'] = 'Größe änderbar'; -tinyMCELang['lang_insert_link_popup_size']= 'Größe'; -tinyMCELang['lang_insert_link_popup_position']= 'Position (X/Y)'; -tinyMCELang['lang_insert_link_popup_missingtarget'] = 'Bitte geben Sie einen Namen für das Ziel an oder wählen Sie eine andere Option.'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/de_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/de_dlg.js new file mode 100644 index 00000000..a52dded7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/de_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('de.advlink_dlg',{ +title:"Link einf\u00FCgen/bearbeiten", +url:"Adresse", +target:"Fenster", +titlefield:"Titel", +is_email:"Bei der Adresse scheint es sich um eine E-Mail-Adresse zu handeln. Wollen Sie das dazu ben\u00F6tigte mailto: voranstellen?", +is_external:"Bei der Adresse scheint es sich um einen externen Link zu handeln. M\u00F6chten Sie, dass zur korrekten Verlinkung ein http:// vorangestellt wird?", +list:"Linkliste", +general_tab:"Allgemein", +popup_tab:"Popup", +events_tab:"Ereignisse", +advanced_tab:"Erweitert", +general_props:"Allemeine Eigenschaften", +popup_props:"Popup-Eigenschaften", +event_props:"Ereignisse", +advanced_props:"Erweiterte Eigenschaften", +popup_opts:"Optionen", +anchor_names:"Anker", +target_same:"Im selben Fenster/Frame \u00F6ffnen", +target_parent:"Im \u00FCbergeordneten Fenster/Frame \u00F6ffnen", +target_top:"Im obersten Frame \u00F6ffnen (sprengt das Frameset)", +target_blank:"In neuem Fenster \u00F6ffnen", +popup:"JavaScript-Popup", +popup_url:"Popup-Adresse", +popup_name:"Name des Fensters", +popup_return:"Link trotz Popup folgen", +popup_scrollbars:"Scrollbalken anzeigen", +popup_statusbar:"Statusleiste anzeigen", +popup_toolbar:"Werkzeugleisten anzeigen", +popup_menubar:"Browsermen\u00FC anzeigen", +popup_location:"Adressleiste anzeigen", +popup_resizable:"Vergr\u00F6\u00DFern des Fenster zulassen", +popup_dependent:"Vom Elternfenster abh\u00E4ngig
(nur Mozilla/Firefox) ", +popup_size:"Gr\u00F6\u00DFe", +popup_position:"Position (X/Y)", +id:"ID", +style:"Format", +classes:"Klassen", +target_name:"Name der Zielseite", +langdir:"Schriftrichtung", +target_langcode:"Sprache der Zielseite", +langcode:"Sprachcode", +encoding:"Zeichenkodierung der Zielseite", +mime:"MIME-Type der Zielseite", +rel:"Beziehung der Seite zum Linkziel", +rev:"Beziehung des Linkziels zur Seite", +tabindex:"Tabindex", +accesskey:"Tastenk\u00FCrzel", +ltr:"Links nach rechts", +rtl:"Rechts nach links", +link_list:"Linkliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/dv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/dv_dlg.js new file mode 100644 index 00000000..f898a854 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/dv_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('dv.advlink_dlg',{ +title:"Insert/edit link", +url:"Link URL", +target:"Target", +titlefield:"Title", +is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +list:"Link list", +general_tab:"General", +popup_tab:"Popup", +events_tab:"Events", +advanced_tab:"Advanced", +general_props:"General properties", +popup_props:"Popup properties", +event_props:"Events", +advanced_props:"Advanced properties", +popup_opts:"Options", +anchor_names:"Anchors", +target_same:"Open in this window / frame", +target_parent:"Open in parent window / frame", +target_top:"Open in top frame (replaces all frames)", +target_blank:"Open in new window", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Window name", +popup_return:"Insert 'return false'", +popup_scrollbars:"Show scrollbars", +popup_statusbar:"Show status bar", +popup_toolbar:"Show toolbars", +popup_menubar:"Show menu bar", +popup_location:"Show location bar", +popup_resizable:"Make window resizable", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"Size", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Target name", +langdir:"Language direction", +target_langcode:"Target language", +langcode:"Language code", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Left to right", +rtl:"Right to left", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/el_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/el_dlg.js new file mode 100644 index 00000000..70f1c41f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/el_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('el.advlink_dlg',{ +title:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03BF\u03C5", +url:"\u0394\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03BF\u03C5", +target:"\u03A3\u03C4\u03CC\u03C7\u03BF\u03C2", +titlefield:"\u03A4\u03AF\u03C4\u03BB\u03BF\u03C2", +is_email:"\u0397 \u03B4\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u03C0\u03BF\u03C5 \u03B5\u03B9\u03C3\u03AC\u03B3\u03B1\u03C4\u03B5 \u03C6\u03B1\u03AF\u03BD\u03B5\u03C4\u03B1\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 email, \u03BD\u03B1 \u03C0\u03C1\u03BF\u03C3\u03C4\u03B5\u03B8\u03B5\u03AF \u03C4\u03BF \u03B1\u03C0\u03B1\u03C1\u03B1\u03AF\u03C4\u03B7\u03C4\u03BF mailto: ;", +is_external:"\u0397 \u03B4\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u03C0\u03BF\u03C5 \u03B5\u03B9\u03C3\u03AC\u03B3\u03B1\u03C4\u03B5 \u03C6\u03B1\u03AF\u03BD\u03B5\u03C4\u03B1\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B5\u03BE\u03C9\u03C4\u03B5\u03C1\u03B9\u03BA\u03CC\u03C2 \u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03BC\u03BF\u03C2, \u03BD\u03B1 \u03C0\u03C1\u03BF\u03C3\u03C4\u03B5\u03B8\u03B5\u03AF \u03C4\u03BF \u03B1\u03C0\u03B1\u03C1\u03B1\u03AF\u03C4\u03B7\u03C4\u03BF http:// ;", +list:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03C9\u03BD", +general_tab:"\u0393\u03B5\u03BD\u03B9\u03BA\u03AC", +popup_tab:"Popup", +events_tab:"\u0393\u03B5\u03B3\u03BF\u03BD\u03CC\u03C4\u03B1", +advanced_tab:"\u0393\u03B9\u03B1 \u03C0\u03C1\u03BF\u03C7\u03C9\u03C1\u03B7\u03BC\u03AD\u03BD\u03BF\u03C5\u03C2", +general_props:"\u0393\u03B5\u03BD\u03B9\u03BA\u03AD\u03C2 \u03B9\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2", +popup_props:"\u0399\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 Popup", +event_props:"\u0393\u03B5\u03B3\u03BF\u03BD\u03CC\u03C4\u03B1", +advanced_props:"\u03A0\u03C1\u03BF\u03C7\u03C9\u03C1\u03B7\u03BC\u03AD\u03BD\u03B5\u03C2 \u03B9\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2", +popup_opts:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2", +anchor_names:"Anchors", +target_same:"\u0386\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C3\u03B5 \u03AF\u03B4\u03B9\u03BF \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF / frame", +target_parent:"\u0386\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C3\u03C4\u03BF \u03B3\u03BF\u03BD\u03B9\u03BA\u03CC window / frame", +target_top:"\u0386\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C3\u03C4\u03BF \u03C0\u03B9\u03BF \u03C0\u03AC\u03BD\u03C9 frame (\u03B1\u03BD\u03C4\u03B9\u03BA\u03B1\u03B8\u03B9\u03C3\u03C4\u03AC \u03CC\u03BB\u03B1 \u03C4\u03B1 frames)", +target_blank:"\u0386\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C3\u03B5 \u03BD\u03AD\u03BF \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF", +popup:"Javascript popup", +popup_url:"\u0394\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u03C4\u03BF\u03C5 Popup", +popup_name:"\u038C\u03BD\u03BF\u03BC\u03B1 \u03C0\u03B1\u03C1\u03B1\u03B8\u03CD\u03C1\u03BF\u03C5", +popup_return:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE 'return false'", +popup_scrollbars:"\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03C1\u03AC\u03B2\u03B4\u03C9\u03BD \u03BA\u03CD\u03BB\u03B9\u03C3\u03B7\u03C2", +popup_statusbar:"\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03BA\u03B1\u03C4\u03AC\u03C3\u03C4\u03B1\u03C3\u03B7\u03C2", +popup_toolbar:"\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD \u03B5\u03C1\u03B3\u03B1\u03BB\u03B5\u03AF\u03C9\u03BD", +popup_menubar:"\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03BC\u03B5\u03BD\u03BF\u03CD", +popup_location:"\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03C4\u03BF\u03C0\u03BF\u03B8\u03B5\u03C3\u03AF\u03B1\u03C2", +popup_resizable:"\u039D\u03B1 \u03B1\u03BB\u03BB\u03AC\u03B6\u03BF\u03C5\u03BD \u03BF\u03B9 \u03B4\u03B9\u03B1\u03C3\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2 \u03C4\u03BF\u03C5 \u03C0\u03B1\u03C1\u03B1\u03B8\u03CD\u03C1\u03BF\u03C5", +popup_dependent:"\u0395\u03BE\u03B1\u03C1\u03C4\u03CE\u03BC\u03B5\u03BD\u03BF (\u03BC\u03CC\u03BD\u03BF \u03B3\u03B9\u03B1 Mozilla/Firefox)", +popup_size:"\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2", +popup_position:"\u0398\u03AD\u03C3\u03B7 (X/Y)", +id:"Id", +style:"\u03A3\u03C4\u03C5\u03BB", +classes:"\u039A\u03BB\u03AC\u03C3\u03B5\u03B9\u03C2", +target_name:"\u038C\u03BD\u03BF\u03BC\u03B1 \u03C3\u03C4\u03CC\u03C7\u03BF\u03C5", +langdir:"\u039A\u03B1\u03C4\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2", +target_langcode:"\u0393\u03BB\u03CE\u03C3\u03C3\u03B1 \u03C3\u03C4\u03CC\u03C7\u03BF\u03C5", +langcode:"\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2", +encoding:"\u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03C9\u03BD \u03C3\u03C4\u03CC\u03C7\u03BF\u03C5", +mime:"\u03A4\u03CD\u03C0\u03BF\u03C2 MIME \u03C3\u03C4\u03CC\u03C7\u03BF\u03C5", +rel:"\u03A3\u03C7\u03AD\u03C3\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 \u03C0\u03C1\u03BF\u03C2 \u03C3\u03C4\u03CC\u03C7\u03BF (REL)", +rev:"\u03A3\u03C7\u03AD\u03C3\u03B7 \u03C3\u03C4\u03CC\u03C7\u03BF\u03C5 \u03C0\u03C1\u03BF\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 (REV)", +tabindex:"Tabindex", +accesskey:"\u03A0\u03BB\u03AE\u03BA\u03C4\u03C1\u03BF \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2", +ltr:"\u0391\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC \u03C0\u03C1\u03BF\u03C2 \u03B4\u03B5\u03BE\u03B9\u03AC", +rtl:"\u0394\u03B5\u03BE\u03B9\u03AC \u03C0\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +link_list:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03C9\u03BD" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en.js deleted file mode 100644 index a3a658b1..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en.js +++ /dev/null @@ -1,20 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insert_link_target_same'] = 'Open in this window / frame'; -tinyMCELang['lang_insert_link_target_parent'] = 'Open in parent window / frame'; -tinyMCELang['lang_insert_link_target_top'] = 'Open in top frame (replaces all frames)'; -tinyMCELang['lang_insert_link_target_blank'] = 'Open in new window'; -tinyMCELang['lang_insert_link_target_named'] = 'Open in the window'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'Popup URL'; -tinyMCELang['lang_insert_link_popup_name'] = 'Window name'; -tinyMCELang['lang_insert_link_popup_return'] = 'insert \'return false\''; -tinyMCELang['lang_insert_link_popup_scrollbars'] = 'Show scrollbars'; -tinyMCELang['lang_insert_link_popup_statusbar'] = 'Show statusbar'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'Show toolbars'; -tinyMCELang['lang_insert_link_popup_menubar'] = 'Show menubar'; -tinyMCELang['lang_insert_link_popup_location'] = 'Show locationbar'; -tinyMCELang['lang_insert_link_popup_resizable'] = 'Make window resizable'; -tinyMCELang['lang_insert_link_popup_size'] = 'Size'; -tinyMCELang['lang_insert_link_popup_position'] = 'Position (X/Y)'; -tinyMCELang['lang_insert_link_popup_missingtarget'] = 'Please insert a name for the target or choose another option.'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js new file mode 100644 index 00000000..c71ffbd0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('en.advlink_dlg',{ +title:"Insert/edit link", +url:"Link URL", +target:"Target", +titlefield:"Title", +is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +list:"Link list", +general_tab:"General", +popup_tab:"Popup", +events_tab:"Events", +advanced_tab:"Advanced", +general_props:"General properties", +popup_props:"Popup properties", +event_props:"Events", +advanced_props:"Advanced properties", +popup_opts:"Options", +anchor_names:"Anchors", +target_same:"Open in this window / frame", +target_parent:"Open in parent window / frame", +target_top:"Open in top frame (replaces all frames)", +target_blank:"Open in new window", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Window name", +popup_return:"Insert 'return false'", +popup_scrollbars:"Show scrollbars", +popup_statusbar:"Show status bar", +popup_toolbar:"Show toolbars", +popup_menubar:"Show menu bar", +popup_location:"Show location bar", +popup_resizable:"Make window resizable", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"Size", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Target name", +langdir:"Language direction", +target_langcode:"Target language", +langcode:"Language code", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Left to right", +rtl:"Right to left", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/es_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/es_dlg.js new file mode 100644 index 00000000..d99c45cc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/es_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('es.advlink_dlg',{ +title:"Insertar/editar hiperv\u00EDnculo", +url:"URL del hiperv\u00EDnculo", +target:"Destino", +titlefield:"T\u00EDtulo", +is_email:"La URL que ha introducido parece ser una direci\u00F3n de correo, \u00BFdesea agregar el prefijo mailto: necesario?", +is_external:"La URL que ha introducido parece ser un v\u00EDnculo externo, \u00BFdesea agregar el prefijo http:// necesario?", +list:"Lista de v\u00EDnculos", +general_tab:"General", +popup_tab:"Ventana emergente", +events_tab:"Eventos", +advanced_tab:"Avanzado", +general_props:"Propiedades generales", +popup_props:"Propiedades de ventanas emergentes", +event_props:"Eventos", +advanced_props:"Propiedades avanzadas", +popup_opts:"Opciones", +anchor_names:"Anclas", +target_same:"Abrir en esta ventana / marco", +target_parent:"Abrir en ventana padre / marco", +target_top:"Abrir en el marco superior (reemplaza todos los marcos)", +target_blank:"Abrir en ventana nueva", +popup:"Javascript popup", +popup_url:"URL de la ventana emergente", +popup_name:"Nombre de la ventana", +popup_return:"Insertar 'return false'", +popup_scrollbars:"Barras de desplazamiento", +popup_statusbar:"Barra de estado", +popup_toolbar:"Barra de herramientas", +popup_menubar:"Barra de men\u00FA", +popup_location:"Barra de localizaci\u00F3n", +popup_resizable:"Permitir cambiar el tama\u00F1o de la ventana", +popup_dependent:"Dependientes (s\u00F3lo Mozilla/Firefox)", +popup_size:"Tama\u00F1o", +popup_position:"Posici\u00F3n (X/Y)", +id:"Id", +style:"Estilo", +classes:"Clases", +target_name:"Nombre del Target", +langdir:"Direcci\u00F3n del lenguaje", +target_langcode:"Lenguaje del Target", +langcode:"C\u00F3digo del lenguaje", +encoding:"Codificaci\u00F3n de caracteres del Target", +mime:"Tipo MIME del Target", +rel:"Relaci\u00F3n p\u00E1gina a target", +rev:"Relaci\u00F3n target a p\u00E1gina", +tabindex:"Indice de tabulaci\u00F3n", +accesskey:"Tecla de acceso", +ltr:"Izquierda a derecha", +rtl:"Derecha a izquierda", +link_list:"Lista de v\u00EDnculo" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/et_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/et_dlg.js new file mode 100644 index 00000000..2b63520c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/et_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('et.advlink_dlg',{ +title:"Insert/edit link", +url:"Link URL", +target:"Target", +titlefield:"Title", +is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +list:"Link list", +general_tab:"General", +popup_tab:"Popup", +events_tab:"Events", +advanced_tab:"Advanced", +general_props:"General properties", +popup_props:"Popup properties", +event_props:"Events", +advanced_props:"Advanced properties", +popup_opts:"Options", +anchor_names:"Anchors", +target_same:"Open in this window / frame", +target_parent:"Open in parent window / frame", +target_top:"Open in top frame (replaces all frames)", +target_blank:"Open in new window", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Window name", +popup_return:"Insert 'return false'", +popup_scrollbars:"Show scrollbars", +popup_statusbar:"Show status bar", +popup_toolbar:"Show toolbars", +popup_menubar:"Show menu bar", +popup_location:"Show location bar", +popup_resizable:"Make window resizable", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"Size", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Target name", +langdir:"Language direction", +target_langcode:"Target language", +langcode:"Language code", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Left to right", +rtl:"Right to left", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fa.js deleted file mode 100644 index 1fc83a0f..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fa.js +++ /dev/null @@ -1,25 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_insert_link_target_same'] = 'در همین صÙحه / Ùریم باز Ú©Ù†'; -tinyMCELang['lang_insert_link_target_parent'] = 'در صÙحه / Ùریم اصلی باز Ú©Ù†'; -tinyMCELang['lang_insert_link_target_top'] = 'در Ùریم اصلی باز Ú©Ù† (همه Ùریمها نادیده گرÙته میشود)'; -tinyMCELang['lang_insert_link_target_blank'] = 'در صÙحه جدید باز Ú©Ù†'; -tinyMCELang['lang_insert_link_target_named'] = 'در پنجره باز Ú©Ù†'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'URL پنجره'; -tinyMCELang['lang_insert_link_popup_name'] = 'نام پنجره'; -tinyMCELang['lang_insert_link_popup_return'] = 'اÙزودن \'return false\''; -tinyMCELang['lang_insert_link_popup_scrollbars'] = 'نمایش scrollbars'; -tinyMCELang['lang_insert_link_popup_statusbar'] = 'نمایش statusbar'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'نمایش toolbars'; -tinyMCELang['lang_insert_link_popup_menubar'] = 'نمایش menubar'; -tinyMCELang['lang_insert_link_popup_location'] = 'نمایش locationbar'; -tinyMCELang['lang_insert_link_popup_resizable'] = 'قابل تغییر اندازه باشد'; -tinyMCELang['lang_insert_link_popup_size'] = 'اندازه'; -tinyMCELang['lang_insert_link_popup_position'] = 'موقعیت (X/Y)'; -tinyMCELang['lang_insert_link_popup_missingtarget'] = 'لطÙا یک نام برای مقصد انتخاب کنید در غیر این صورت گزینه دیگری را انتخاب نمایید.'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fa_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fa_dlg.js new file mode 100644 index 00000000..e970bd52 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fa_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('fa.advlink_dlg',{ +title:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0644\u06CC\u0646\u0643", +url:"URL \u0644\u06CC\u0646\u0643", +target:"\u0645\u0642\u0635\u062F (Target)", +titlefield:"\u0639\u0646\u0648\u0627\u0646", +is_email:"URL \u06CC \u0643\u0647 \u0648\u0627\u0631\u062F \u0643\u0631\u062F\u0647 \u0627\u06CC\u062F \u0628\u0647 \u0646\u0638\u0631 \u0645\u06CC \u0622\u06CC\u062F \u0643\u0647 \u06CC\u0643 \u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644 \u0645\u06CC \u0628\u0627\u0634\u062F \u060C \u0622\u06CC\u0627 \u0645\u0627\u06CC\u0644\u06CC\u062F \u062A\u0627 \u067E\u06CC\u0634\u0648\u0646\u062F \u0644\u0627\u0632\u0645\u0647 :mailto \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F\u061F", +is_external:"URL \u06CC \u0643\u0647 \u0648\u0627\u0631\u062F \u0643\u0631\u062F\u0647 \u0627\u06CC\u062F \u0628\u0647 \u0646\u0638\u0631 \u0645\u06CC \u0622\u06CC\u062F \u0643\u0647 \u06CC\u0643 \u0644\u06CC\u0646\u0643 \u062E\u0627\u0631\u062C\u06CC \u0645\u06CC \u0628\u0627\u0634\u062F \u060C \u0622\u06CC\u0627 \u0645\u0627\u06CC\u0644\u06CC\u062F \u062A\u0627 \u067E\u06CC\u0634\u0648\u0646\u062F \u0644\u0627\u0632\u0645\u0647 //:http \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F\u061F", +list:"\u0644\u06CC\u0633\u062A \u0644\u06CC\u0646\u0643", +general_tab:"\u0639\u0645\u0648\u0645\u06CC", +popup_tab:"\u067E\u0646\u062C\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)", +events_tab:"\u0631\u0648\u06CC\u062F\u0627\u062F\u0647\u0627", +advanced_tab:"\u067E\u06CC\u0634\u0631\u0641\u062A\u0647", +general_props:"\u0645\u0634\u062E\u0635\u0627\u062A \u0639\u0645\u0648\u0645\u06CC", +popup_props:"\u0645\u0634\u062E\u0635\u0627\u062A \u067E\u0646\u062C\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)", +event_props:"\u0631\u0648\u06CC\u062F\u0627\u062F\u0647\u0627", +advanced_props:"\u0645\u0634\u062E\u0635\u0627\u062A \u067E\u06CC\u0634\u0631\u0641\u062A\u0647", +popup_opts:"\u06AF\u0632\u06CC\u0646\u0647 \u0647\u0627", +anchor_names:"\u0644\u0646\u06AF\u0631\u0647\u0627 (Anchor)", +target_same:"\u0628\u0627\u0632\u0634\u062F\u0646 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0646\u062C\u0631\u0647 / \u0642\u0627\u0628 (Frame)", +target_parent:"\u0628\u0627\u0632\u0634\u062F\u0646 \u062F\u0631 \u067E\u0646\u062C\u0631\u0647 / \u0642\u0627\u0628 \u0648\u0627\u0644\u062F (Parent Frame)", +target_top:"\u0628\u0627\u0632\u0634\u062F\u0646 \u062F\u0631 \u0642\u0627\u0628 \u0628\u0627\u0644\u0627 (Top Frame) (\u062A\u0645\u0627\u0645\u06CC \u0642\u0627\u0628 \u0647\u0627 \u0631\u0627 \u062A\u0639\u0648\u06CC\u0636 \u0645\u06CC \u0643\u0646\u062F)", +target_blank:"\u0628\u0627\u0632\u0634\u062F\u0646 \u062F\u0631 \u067E\u0646\u062C\u0631\u0647 \u062C\u062F\u06CC\u062F", +popup:"\u067E\u0646\u062C\u0631\u0647 \u0628\u0627\u0632\u0634\u0648\u06CC Javascript", +popup_url:"URL \u067E\u0646\u062C\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)", +popup_name:"\u0646\u0627\u0645 \u067E\u0646\u062C\u0631\u0647", +popup_return:"\u062F\u0631\u062C 'return false'", +popup_scrollbars:"\u0646\u0645\u0627\u06CC\u0634 \u0646\u0648\u0627\u0631 \u067E\u06CC\u0645\u0627\u06CC\u0634 \u0647\u0627", +popup_statusbar:"\u0646\u0645\u0627\u06CC\u0634 \u0646\u0648\u0627\u0631 \u0648\u0636\u0639\u06CC\u062A", +popup_toolbar:"\u0646\u0645\u0627\u06CC\u0634 \u0646\u0648\u0627\u0631 \u0627\u0628\u0632\u0627\u0631", +popup_menubar:"\u0646\u0645\u0627\u06CC\u0634 \u0646\u0648\u0627\u0631 \u0645\u0646\u0648", +popup_location:"\u0646\u0645\u0627\u06CC\u0634 \u0646\u0648\u0627\u0631 \u0645\u0643\u0627\u0646", +popup_resizable:"\u0627\u06CC\u062C\u0627\u062F \u067E\u0646\u062C\u0631\u0647 \u0642\u0627\u0628\u0644 \u0627\u0646\u062F\u0627\u0632\u0647 \u0628\u0646\u062F\u06CC \u0645\u062C\u062F\u062F", +popup_dependent:"\u0648\u0627\u0628\u0633\u062A\u0647 (\u0641\u0642\u0637 Mozilla/Firefox)", +popup_size:"\u0627\u0646\u062F\u0627\u0632\u0647", +popup_position:"\u0645\u0648\u0642\u0639\u06CC\u062A (X/Y)", +id:"\u0634\u0646\u0627\u0633\u0647", +style:"\u0627\u0633\u062A\u06CC\u0644", +classes:"\u0643\u0644\u0627\u0633 \u0647\u0627", +target_name:"\u0646\u0627\u0645 \u0645\u0642\u0635\u062F (Target)", +langdir:"\u062C\u0647\u062A \u0632\u0628\u0627\u0646", +target_langcode:"\u0632\u0628\u0627\u0646 \u0645\u0642\u0635\u062F (Target)", +langcode:"\u0643\u062F \u0632\u0628\u0627\u0646", +encoding:"\u0631\u0645\u0632\u06AF\u0630\u0627\u0631\u06CC \u0643\u0627\u0631\u0627\u0643\u062A\u0631 \u0645\u0642\u0635\u062F (Target)", +mime:"\u0646\u0648\u0639 MIME \u0645\u0642\u0635\u062F (Target)", +rel:"\u0631\u0627\u0628\u0637\u0647 \u0635\u0641\u062D\u0647 \u0628\u0627 \u0645\u0642\u0635\u062F (Target)", +rev:"\u0631\u0627\u0628\u0637\u0647 \u0645\u0642\u0635\u062F (Target) \u0628\u0627 \u0635\u0641\u062D\u0647", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"\u0686\u067E \u0628\u0647 \u0631\u0627\u0633\u062A", +rtl:"\u0631\u0627\u0633\u062A \u0628\u0647 \u0686\u067E", +link_list:"\u0644\u06CC\u0633\u062A \u0644\u06CC\u0646\u0643" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fi_dlg.js new file mode 100644 index 00000000..2dd38715 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fi_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('fi.advlink_dlg',{ +title:"Lis\u00E4\u00E4/muokkaa linkki\u00E4", +url:"Linkin URL", +target:"Kohde (target)", +titlefield:"Otsikko", +is_email:"Sy\u00F6tt\u00E4m\u00E4si URL n\u00E4ytt\u00E4\u00E4 olevan s\u00E4hk\u00F6postiosoite, haluatko lis\u00E4t\u00E4 mailto: etuliitteen?", +is_external:"Sy\u00F6tt\u00E4m\u00E4si URL n\u00E4ytt\u00E4\u00E4 olevan sivuston ulkoinen osoite, haluatko lis\u00E4t\u00E4 http:// etuliitteen?", +list:"Linkkilista", +general_tab:"Yleiset", +popup_tab:"Ponnahdusikkuna", +events_tab:"Tapahtumat", +advanced_tab:"Edistynyt", +general_props:"Yleiset asetukset", +popup_props:"Ponnahdusikkunan asetukset", +event_props:"Tapahtumat (events)", +advanced_props:"Edistyneet asetukset", +popup_opts:"Valinta", +anchor_names:"Ankkurit", +target_same:"Avaa t\u00E4ss\u00E4 ikkunassa", +target_parent:"Avaa ylemm\u00E4ss\u00E4 ikkunassa", +target_top:"Avaa ylimm\u00E4ss\u00E4 ruudussa (korvaa kaikki ruudut)", +target_blank:"Avaa uudessa ikkunassa", +popup:"Javascript ponnahdusikkuna", +popup_url:"Ponnahdusikkunan URL", +popup_name:"Ikkunan nimi", +popup_return:"Lis\u00E4\u00E4 'return false'", +popup_scrollbars:"N\u00E4yt\u00E4 vierityspalkit", +popup_statusbar:"N\u00E4yt\u00E4 tilapalkki", +popup_toolbar:"N\u00E4yt\u00E4 ty\u00F6kalut", +popup_menubar:"N\u00E4yt\u00E4 valikkopalkki", +popup_location:"N\u00E4yt\u00E4 sijaintipalkki", +popup_resizable:"Tee ikkunan koko muokattavaksi", +popup_dependent:"Riippuvainen (vain Mozilla/Firefox)", +popup_size:"Koko", +popup_position:"Sijainti (X/Y)", +id:"Id", +style:"Tyyli", +classes:"Luokat", +target_name:"Kohteen nimi", +langdir:"Kielen suunta", +target_langcode:"Kohteen kieli", +langcode:"Kielen koodi", +encoding:"Kohteen merkist\u00F6koodaus", +mime:"Kohteen MIME-tyyppi", +rel:"Sivun suhde kohteeseen", +rev:"Kohteen suhde sivuun", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Vasemmalta oikealle", +rtl:"Oikealta vasemmalle", +link_list:"Linkkilista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr.js deleted file mode 100644 index 129c1541..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr.js +++ /dev/null @@ -1,20 +0,0 @@ -// French lang variables by Laurent Dran - -tinyMCELang['lang_insert_link_target_same'] = 'Ouvre dans la fenętre / Cadre(frame)'; -tinyMCELang['lang_insert_link_target_parent'] = 'Ouvre dans fenętre parente / Cadres(frame)'; -tinyMCELang['lang_insert_link_target_top'] = 'Ouvre dans le Top frame (remplace toutes les cadres(frames))'; -tinyMCELang['lang_insert_link_target_blank'] = 'Ouvre dans la fenętre'; -tinyMCELang['lang_insert_link_target_named'] = 'Ouvre dans la fenętre'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'URL de la Popup'; -tinyMCELang['lang_insert_link_popup_name'] = 'Nom de la fenętre'; -tinyMCELang['lang_insert_link_popup_return'] = 'Insert \'return false\''; -tinyMCELang['lang_insert_link_popup_scrollbars'] = 'Montrer la barre de défilement '; -tinyMCELang['lang_insert_link_popup_statusbar'] = 'Montrer la barre d\'état'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'Montrer la barre d\'outils'; -tinyMCELang['lang_insert_link_popup_menubar'] = 'Montrer la barre du menu'; -tinyMCELang['lang_insert_link_popup_location'] = 'Montre la barre d\'adresse'; -tinyMCELang['lang_insert_link_popup_resizable'] = 'Fabriquer une fenętre redimensionnable'; -tinyMCELang['lang_insert_link_popup_size'] = 'Taille'; -tinyMCELang['lang_insert_link_popup_position'] = 'Position (X/Y)'; -tinyMCELang['lang_insert_link_popup_missingtarget'] = 'Veuillez insérer un nom pour la cible ou choisissez une autre option.'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr_ca.js deleted file mode 100644 index 99631b32..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr_ca.js +++ /dev/null @@ -1,20 +0,0 @@ -// CA_FR lang variables - -tinyMCELang['lang_insert_link_target_same'] = 'Ouvrir dans la même fenêtre'; -tinyMCELang['lang_insert_link_target_parent'] = 'Ouvrir dans la fenêtre parent'; -tinyMCELang['lang_insert_link_target_top'] = 'Ouvrir dans le cadre supérieur'; -tinyMCELang['lang_insert_link_target_blank'] = 'Ouvrir dans une nouvelle fenêtre'; -tinyMCELang['lang_insert_link_target_named'] = 'Ouvrir à la destination'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'URL du popup'; -tinyMCELang['lang_insert_link_popup_name'] = 'Nom de la fenêtre'; -tinyMCELang['lang_insert_link_popup_return'] = 'Insérer le script \'return false\''; -tinyMCELang['lang_insert_link_popup_scrollbars'] = 'Barres de défilement'; -tinyMCELang['lang_insert_link_popup_statusbar'] = 'Barre de statut'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'Barres d\'outils'; -tinyMCELang['lang_insert_link_popup_menubar'] = 'Barre de menu'; -tinyMCELang['lang_insert_link_popup_location'] = 'Barre d\'adresse'; -tinyMCELang['lang_insert_link_popup_resizable'] = 'Fenêtre redimensionnable'; -tinyMCELang['lang_insert_link_popup_size'] = 'Dimensions'; -tinyMCELang['lang_insert_link_popup_position'] = 'Position (X/Y)'; -tinyMCELang['lang_insert_link_popup_missingtarget'] = 'S.v.p., entrer un nom de destination ou choisir une autre option.'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr_dlg.js new file mode 100644 index 00000000..fd84c77c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/fr_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('fr.advlink_dlg',{ +title:"Ins\u00E9rer/\u00C9diter lien", +url:"URL du lien", +target:"Cible", +titlefield:"Titre", +is_email:"L'url que vous avez entr\u00E9 semble \u00EAtre une adresse e-mail, voulez-vous ajouter le pr\u00E9fixe mailto:\u00A0?", +is_external:"L'url que vous avez entr\u00E9 semble \u00EAtre une adresse web externe, voulez-vous ajouter le pr\u00E9fixe http://\u00A0?", +list:"Liste de liens", +general_tab:"G\u00E9n\u00E9ral", +popup_tab:"Popup", +events_tab:"\u00C9v\u00E9nements", +advanced_tab:"Advanc\u00E9", +general_props:"Propri\u00E9t\u00E9s g\u00E9n\u00E9rales", +popup_props:"Propri\u00E9t\u00E9s du popup", +event_props:"\u00C9v\u00E9nements", +advanced_props:"Propri\u00E9t\u00E9s avanc\u00E9es", +popup_opts:"Options", +anchor_names:"Ancres", +target_same:"Ouvrir dans cette fen\u00EAtre / dans ce cadre", +target_parent:"Ouvrir dans la fen\u00EAtre / le cadre parent", +target_top:"Ouvrir dans le cadre principal (Remplace tous les cadres)", +target_blank:"Ouvrir dans une nouvelle fen\u00EAtre", +popup:"Popup en Javascript", +popup_url:"URL du popup", +popup_name:"Nom de la fen\u00EAtre", +popup_return:"Ins\u00E9rer 'return false'", +popup_scrollbars:"Afficher les ascenseurs", +popup_statusbar:"Afficher la barre de status", +popup_toolbar:"Afficher la barre d'outils", +popup_menubar:"Afficher la barre de menu", +popup_location:"Afficher la barre d'adresse", +popup_resizable:"Rendre la fen\u00EAtre redimensionable", +popup_dependent:"D\u00E9pendent (Seulement sous Mozilla/Firefox)", +popup_size:"Taille", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Nom de la cible", +langdir:"Sens de lecture", +target_langcode:"Langue de la cible", +langcode:"Code de la langue", +encoding:"Encodage de la cible", +mime:"Type MIME de la cible", +rel:"Relation de la page \u00E0 la cible", +rev:"Relation de la cible \u00E0 la page", +tabindex:"Tabindex", +accesskey:"Touche d'acc\u00E8s rapide", +ltr:"Gauche \u00E0 droite", +rtl:"Droite \u00E0 gauche", +link_list:"Liste des liens" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/gl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/gl_dlg.js new file mode 100644 index 00000000..523a1ab9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/gl_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('gl.advlink_dlg',{ +title:"Insertar/editar hiperv\u00EDnculo", +url:"URL do hiperv\u00EDnculo", +target:"Destino", +titlefield:"T\u00EDtulo", +is_email:"A URL introducida semella ser un enderezo de e-mail, \u00BFDesexa engadi-lo prefixo necesario mailto:?", +is_external:"A URL introducida semella ser un v\u00EDnculo externo, \u00BFDesexa engadi-lo prefixo necesario http://?", +list:"Lista de v\u00EDnculos", +general_tab:"Xeral", +popup_tab:"Ventana emerxente", +events_tab:"Eventos", +advanced_tab:"Avanzado", +general_props:"Propiedades xerales", +popup_props:"Propiedades de vent\u00E1s emerxentes", +event_props:"Eventos", +advanced_props:"Propiedades avanzadas", +popup_opts:"Opci\u00F3ns", +anchor_names:"\u00C1ncoras", +target_same:"Abrir nesta vent\u00E1 / marco", +target_parent:"Abrir na vent\u00E1 / marco padre", +target_top:"Abrir no marco superior (reemplaza todo-los marcos)", +target_blank:"Abrir en vent\u00E1 nova", +popup:"Javascript popup", +popup_url:"URL da vent\u00E1 emerxente", +popup_name:"Nome da vent\u00E1", +popup_return:"Insertar 'return false'", +popup_scrollbars:"Barras de desprazamento", +popup_statusbar:"Barra de estado", +popup_toolbar:"Barra de ferramentas", +popup_menubar:"Barra de men\u00FA", +popup_location:"Barra de localizaci\u00F3n", +popup_resizable:"Permitir cambia-lo tama\u00F1o da vent\u00E1", +popup_dependent:"Dependentes (s\u00F3lo Mozilla/Firefox)", +popup_size:"Tama\u00F1o", +popup_position:"Posici\u00F3n (X/Y)", +id:"Id", +style:"Estilo", +classes:"Clases", +target_name:"Nome do obxetivo", +langdir:"Direcci\u00F3n da lenguaxe", +target_langcode:"Lenguaxe do obxetivo", +langcode:"C\u00F3digo da lenguaxe", +encoding:"Codificaci\u00F3n de caracteres do obxetivo", +mime:"Tipo MIME do obxetivo", +rel:"Relaci\u00F3n p\u00E1xina a obxetivo", +rev:"Relaci\u00F3n obxetivo a p\u00E1xina", +tabindex:"\u00CDndice de tabulaci\u00F3n", +accesskey:"Tecla de acceso", +ltr:"Esquerda a dereita", +rtl:"Dereita a esquerda", +link_list:"Lista de v\u00EDnculo" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/he_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/he_dlg.js new file mode 100644 index 00000000..becee733 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/he_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('he.advlink_dlg',{ +title:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05E7\u05D9\u05E9\u05D5\u05E8", +url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D4\u05D4\u05D9\u05E4\u05E8-\u05E7\u05D9\u05E9\u05D5\u05E8", +target:"\u05D9\u05E2\u05D3", +titlefield:"\u05DB\u05D5\u05EA\u05E8\u05EA", +is_email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D4-URL \u05E9\u05D4\u05D5\u05DB\u05E0\u05E1\u05D4 \u05D4\u05D9\u05D0 \u05DB\u05DB\u05DC \u05D4\u05E0\u05E8\u05D0\u05D4 \u05DB\u05EA\u05D5\u05D1\u05EA \u05DE\u05D9\u05D9\u05DC \u05D4\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05D0\u05EA \u05D4\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA MAILTO \u05D4\u05E0\u05D3\u05E8\u05E9\u05EA?", +is_external:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D4-URL \u05E9\u05D4\u05D5\u05DB\u05E0\u05E1\u05D4 \u05D4\u05D9\u05D0 \u05DB\u05DB\u05DC \u05D4\u05E0\u05E8\u05D0\u05D4 \u05E7\u05D9\u05E9\u05D5\u05E8 \u05D7\u05D9\u05E6\u05D5\u05E0\u05D9 \u05D4\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05D0\u05EA \u05D4\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA http:// \u05D4\u05E0\u05D3\u05E8\u05E9\u05EA?", +list:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05E7\u05D9\u05E9\u05D5\u05E8\u05D9\u05DD", +general_tab:"\u05DB\u05DC\u05DC\u05D9", +popup_tab:"\u05D7\u05DC\u05D5\u05DF \u05DE\u05D5\u05E7\u05E4\u05E5", +events_tab:"\u05DE\u05D0\u05D5\u05E8\u05E2", +advanced_tab:"\u05DE\u05EA\u05E7\u05D3\u05DD", +general_props:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05DB\u05DC\u05DC\u05D9\u05D5\u05EA", +popup_props:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05D7\u05DC\u05D5\u05DF \u05DE\u05D5\u05E7\u05E4\u05E5", +event_props:"\u05DE\u05D0\u05D5\u05E8\u05E2\u05D5\u05EA", +advanced_props:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05DE\u05EA\u05E7\u05D3\u05DE\u05D5\u05EA", +popup_opts:"\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA", +anchor_names:"Anchors/\u05E2\u05D5\u05D2\u05DF", +target_same:"\u05E4\u05EA\u05D9\u05D7\u05D4 \u05D1\u05D7\u05DC\u05D5\u05DF \u05D7\u05D3\u05E9/\u05D7\u05DC\u05D5\u05DF \u05D1\u05DF", +target_parent:"\u05E4\u05EA\u05D9\u05D7\u05D4 \u05D1\u05DC\u05D5\u05DF \u05D4\u05D0\u05D1\u05D0/\u05D7\u05DC\u05D5\u05DF \u05D1\u05DF", +target_top:"\u05E4\u05EA\u05D9\u05D7\u05D4 \u05D1\u05D7\u05DC\u05D5\u05DF \u05D4\u05D1\u05DF \u05D4\u05E8\u05D0\u05E9\u05D9(\u05DE\u05D7\u05DC\u05D9\u05E3 \u05D0\u05EA \u05DB\u05DC \u05D7\u05DC\u05D5\u05E0\u05D5\u05EA \u05D4\u05D1\u05E0\u05D9\u05DD)", +target_blank:"\u05E4\u05EA\u05D9\u05D7\u05D4 \u05D1\u05D7\u05DC\u05D5\u05DF \u05D7\u05D3\u05E9", +popup:"\u05D7\u05DC\u05D5\u05DF \u05DE\u05D5\u05E7\u05E4\u05E5 javascript", +popup_url:"\u05D7\u05DC\u05D5\u05DF \u05DE\u05D5\u05E7\u05E4\u05E5 URL", +popup_name:"\u05E9\u05DD \u05D4\u05D7\u05DC\u05D5\u05DF", +popup_return:"\u05D9\u05E9 \u05DC\u05D4\u05DB\u05E0\u05D9\u05E1 'return false'", +popup_scrollbars:"\u05D4\u05E6\u05D2\u05EA scrollbar", +popup_statusbar:"\u05D4\u05E6\u05D2\u05EA status bar", +popup_toolbar:"\u05D4\u05E6\u05D2\u05EA toolbars", +popup_menubar:"\u05D4\u05E6\u05D2\u05EA menu bar", +popup_location:"\u05D4\u05E6\u05D2\u05EA location bar ", +popup_resizable:"\u05D7\u05DC\u05D5\u05DF \u05D3\u05D9\u05E0\u05D0\u05DE\u05D9(resizable)", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"\u05D2\u05D5\u05D3\u05DC", +popup_position:"\u05DE\u05D9\u05E7\u05D5\u05DD (X/Y)", +id:"\u05DE\u05E1\u05E4\u05E8 \u05E1\u05D9\u05D3\u05D5\u05E8\u05D9", +style:"\u05E1\u05D2\u05E0\u05D5\u05DF", +classes:"Classes", +target_name:"Target name", +langdir:"\u05DB\u05D9\u05D5\u05D5\u05DF \u05D4\u05E9\u05E4\u05D4", +target_langcode:"Target language", +langcode:"\u05E7\u05D5\u05D3 \u05D4\u05E9\u05E4\u05D4", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"\u05DE\u05E9\u05DE\u05D0\u05DC \u05DC\u05D9\u05DE\u05D9\u05DF", +rtl:"\u05DE\u05D9\u05DE\u05D9\u05DF \u05DC\u05E9\u05DE\u05D0\u05DC", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/hr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/hr_dlg.js new file mode 100644 index 00000000..243e04e8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/hr_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('hr.advlink_dlg',{ +title:"Umetni/uredi poveznicu", +url:"URL poveznice", +target:"Meta", +titlefield:"Naslov", +is_email:"URL koji ste unijeli izgleda kao e-mail adresa, \u017Eelite li dodati potrebni mailto: prefiks?", +is_external:"URL koji ste unijeli izgleda kao vanjska poveznica, \u017Eelite li dodati potrebni http:// prefiks?", +list:"Lista poveznica", +general_tab:"Osnovno", +popup_tab:"Popup", +events_tab:"Doga\u0111aj", +advanced_tab:"Napredno", +general_props:"Osnovna svojstva", +popup_props:"Svojstva popup prozora", +event_props:"Doga\u0111aji", +advanced_props:"Napredna svojstva", +popup_opts:"Opcije", +anchor_names:"Sidra", +target_same:"Otovori u novom prozoru / okviru", +target_parent:"Otvori u izvornom prozoru / okvir", +target_top:"Otvori u gornjem okviru (zamjenjuje sve okvire)", +target_blank:"Otvori u novom prozoru", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Ime prozora", +popup_return:"Umetni 'return false'", +popup_scrollbars:"Poka\u017Ei kliza\u010De", +popup_statusbar:"Poka\u017Ei statusnu traku", +popup_toolbar:"Poka\u017Ei alatne trake", +popup_menubar:"Poka\u017Ei izbornik", +popup_location:"Poka\u017Ei traku lokacije", +popup_resizable:"Prozor promjenjive veli\u010Dine", +popup_dependent:"Ovisan (samo za Mozilla/Firefox)", +popup_size:"Veli\u010Dina", +popup_position:"Pozicija (X/Y)", +id:"Id", +style:"Stil", +classes:"Klasa", +target_name:"Ime mete", +langdir:"Smjer jezika", +target_langcode:"Jezik", +langcode:"Kod jezika", +encoding:"Kodiranje znakova", +mime:"MIME tip", +rel:"Odnos stranice prema meti", +rev:"Odnos mete prema stranici", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"S lijeva na desno", +rtl:"S desna na lijevo", +link_list:"Lista poveznica" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/hu_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/hu_dlg.js new file mode 100644 index 00000000..2399ad88 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/hu_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('hu.advlink_dlg',{ +title:"Link besz\u00FAr\u00E1s/szerkeszt\u00E9s", +url:"Link URL", +target:"Target", +titlefield:"C\u00EDm", +is_email:"A be\u00EDrt URL e-mail c\u00EDmnek t\u0171nik, k\u00EDv\u00E1nja a sz\u00FCks\u00E9ges mailto:-t el\u00E9 tenni?", +is_external:"A be\u00EDrt URL k\u00FCls\u0151 hivatkoz\u00E1snak t\u0171nik, k\u00EDv\u00E1nja a sz\u00FCks\u00E9ges http://-t el\u00E9 tenni?", +list:"Link lista", +general_tab:"\u00C1ltal\u00E1nos", +popup_tab:"Felugr\u00F3 ablak", +events_tab:"Esem\u00E9nyek", +advanced_tab:"Halad\u00F3", +general_props:"\u00C1ltal\u00E1nos tulajdons\u00E1gok", +popup_props:"Felugr\u00F3 ablak tulajdons\u00E1gai", +event_props:"Esem\u00E9nyek", +advanced_props:"Halad\u00F3 tulajdons\u00E1gok", +popup_opts:"Be\u00E1ll\u00EDt\u00E1sok", +anchor_names:"Horgonyok", +target_same:"Azonos ablakban/keretben megnyit\u00E1s", +target_parent:"Sz\u00FCl\u0151 ablakban/keretben megnyit\u00E1s", +target_top:"Azonos ablakban/keretben megnyit\u00E1s legfel\u00FCl", +target_blank:"\u00DAj ablakban megnyit\u00E1s", +popup:"JavaScript felugr\u00F3 ablak", +popup_url:"Felugr\u00F3 ablak URL", +popup_name:"Ablakn\u00E9v", +popup_return:"'return false' besz\u00FAr\u00E1sa", +popup_scrollbars:"G\u00F6rget\u0151s\u00E1vok mutat\u00E1sa", +popup_statusbar:"St\u00E1tuszsor mutat\u00E1sa", +popup_toolbar:"Eszk\u00F6zsor mutat\u00E1sa", +popup_menubar:"Men\u00FCsor mutat\u00E1sa", +popup_location:"C\u00EDm mez\u0151 mutat\u00E1sa", +popup_resizable:"\u00C1tm\u00E9retezhet\u0151 ablak", +popup_dependent:"F\u00FCgg\u0151 (csak Mozilla/Firefox)", +popup_size:"M\u00E9ret", +popup_position:"Poz\u00EDci\u00F3 (X/Y)", +id:"Id", +style:"Style", +classes:"Class-ok", +target_name:"C\u00E9l neve", +langdir:"Nyelv \u00EDr\u00E1s ir\u00E1ny", +target_langcode:"C\u00E9l nyelv", +langcode:"Nyelv k\u00F3d", +encoding:"C\u00E9l karakterk\u00F3dol\u00E1s", +mime:"C\u00E9l MIME t\u00EDpus", +rel:"Oldal kapcsolata a c\u00E9llal", +rev:"C\u00E9l kapcsolata az oldallal", +tabindex:"Tabindex", +accesskey:"Gyorsgomb", +ltr:"Balr\u00F3l jobbra", +rtl:"Jobbr\u00F3l balra", +link_list:"Link lista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ia_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ia_dlg.js new file mode 100644 index 00000000..2ab34eb5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ia_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ia.advlink_dlg',{ +title:"\u63D2\u5165/\u7F16\u8F91 \u8FDE\u7ED3", +url:"\u8FDE\u7ED3\u5730\u5740", +target:"\u76EE\u6807", +titlefield:"\u67E5\u627E", +is_email:"\u60A8\u8F93\u5165\u7684\u5E94\u8BE5\u662F\u4E00\u4E2A\u7535\u5B50\u90AE\u5BC4\u5730\u5740\uFF0C\u662F\u5426\u9700\u8981\u5728\u7F51\u5740\u524D\u52A0\u4E0A mailto: ? ", +is_external:"\u60A8\u8F93\u5165\u7684\u7F51\u5740\u5E94\u8BE5\u662F\u4E00\u4E2A\u5916\u90E8\u8FDE\u7ED3\uFF0C\u662F\u5426\u9700\u8981\u5728\u7F51\u5740\u524D\u52A0\u4E0A http:// ?", +list:"\u8FDE\u7ED3\u6E05\u5355", +general_tab:"\u57FA\u672C", +popup_tab:"\u5FEB\u663E\u7A97\u53E3", +events_tab:"\u4E8B\u4EF6", +advanced_tab:"\u9AD8\u7EA7", +general_props:"\u57FA\u672C\u5C5E\u6027", +popup_props:"\u5FEB\u663E\u7A97\u53E3\u5C5E\u6027", +event_props:"\u4E8B\u4EF6", +advanced_props:"\u9AD8\u7EA7\u5C5E\u6027", +popup_opts:"\u9009\u9879", +anchor_names:"\u951A\u70B9", +target_same:"\u5728\u5F53\u524D\u7A97\u53E3\u6253\u5F00", +target_parent:"\u5728\u7236\u7A97\u53E3\u6253\u5F00", +target_top:"\u5728\u9876\u5C42\u7A97\u53E3\u6253\u5F00", +target_blank:"\u5728\u65B0\u7A97\u53E3\u6253\u5F00", +popup:"Javascript \u5FEB\u663E\u7A97\u53E3", +popup_url:"\u5F39\u51FA\u7A97\u53E3\u5730\u5740", +popup_name:"\u7A97\u53E3\u540D\u79F0", +popup_return:"\u63D2\u5165 'return false'", +popup_scrollbars:"\u663E\u793A\u6EDA\u52A8\u6761", +popup_statusbar:"\u663E\u793A\u72B6\u6001\u5217", +popup_toolbar:"\u663E\u793A\u5DE5\u5177\u5217", +popup_menubar:"\u663E\u793A\u83DC\u5355\u5217", +popup_location:"\u663E\u793A\u5730\u5740\u680F", +popup_resizable:"\u53EF\u8C03\u6574\u7A97\u53E3\u5927\u5C0F", +popup_dependent:"\u4ECE\u5C5E\u4E8E ( \u4EC5 Mozilla/Firefox \u6709\u6548 )", +popup_size:"\u5927\u5C0F", +popup_position:"\u5750\u6807 (X/Y)", +id:"Id", +style:"\u6837\u5F0F", +classes:"\u6837\u5F0F\u7C7B", +target_name:"\u76EE\u6807\u540D\u79F0", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +target_langcode:"\u76EE\u6807\u8BED\u8A00", +langcode:"\u8BED\u8A00\u7F16\u7801", +encoding:"\u76EE\u6807\u8BED\u8A00\u7F16\u7801", +mime:"\u76EE\u6807 MIME \u7C7B\u578B", +rel:"rel", +rev:"rev", +tabindex:"Tab\u7D22\u5F15", +accesskey:"\u5FEB\u901F\u952E", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +link_list:"\u8FDE\u7ED3\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ii_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ii_dlg.js new file mode 100644 index 00000000..1edc64a9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ii_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ii.advlink_dlg',{ +title:"\u63D2\u5165/\u7F16\u8F91 \u94FE\u63A5", +url:"\u94FE\u63A5URL", +target:"\u76EE\u6807", +titlefield:"\u6807\u9898", +is_email:"\u4F60\u8F93\u5165\u7684URL\u4F3C\u4E4E\u662F\u4E00\u4E2AEmail\u5730\u5740\uFF0C\u662F\u5426\u8981\u52A0\u4E0A\u5BF9\u5E94\u524D\u7F00 mailto: ?", +is_external:"\u4F60\u8F93\u5165\u7684URL\u4F3C\u4E4E\u662F\u4E00\u4E2A\u5916\u90E8\u94FE\u63A5\uFF0C\u662F\u5426\u8981\u52A0\u4E0A\u5BF9\u5E94\u524D\u7F00 http:// ?", +list:"\u94FE\u63A5\u6E05\u5355", +general_tab:"\u4E00\u822C", +popup_tab:"\u5F39\u51FA\u7A97\u53E3", +events_tab:"\u4E8B\u4EF6", +advanced_tab:"\u9AD8\u7EA7", +general_props:"\u4E00\u822C\u5C5E\u6027", +popup_props:"\u5F39\u51FA\u7A97\u53E3\u5C5E\u6027", +event_props:"\u4E8B\u4EF6", +advanced_props:"\u9AD8\u7EA7\u5C5E\u6027", +popup_opts:"\u9009\u9879", +anchor_names:"\u951A\u70B9", +target_same:"\u5728\u76EE\u524D\u7A97\u53E3/\u6846\u5F00\u542F", +target_parent:"\u5728\u6BCD\u7A97\u53E3/\u6846\u5F00\u542F", +target_top:"\u5728\u9876\u5C42\u7A97\u6846\u5F00\u542F(\u53D6\u4EE3\u6240\u6709\u7A97\u6846)", +target_blank:"\u5728\u65B0\u7A97\u53E3\u5F00\u542F", +popup:"Javascript \u5F39\u51FA\u7A97\u53E3", +popup_url:"\u5F39\u51FA\u7A97\u53E3URL", +popup_name:"\u7A97\u53E3\u540D\u79F0", +popup_return:"\u63D2\u5165 'return false'", +popup_scrollbars:"\u663E\u793A\u5377\u52A8\u8F74", +popup_statusbar:"\u663E\u793A\u72B6\u6001\u680F", +popup_toolbar:"\u663E\u793A\u5DE5\u5177\u680F", +popup_menubar:"\u663E\u793A\u9009\u5355\u5217", +popup_location:"\u663E\u793A\u7F51\u5740\u5217", +popup_resizable:"\u7A97\u53E3\u53EF\u91CD\u8BBE\u5927\u5C0F", +popup_dependent:"\u6D4F\u89C8\u5668\u9650\u5236 (\u4EC5 Mozilla/Firefox \u6709\u6548)", +popup_size:"\u5927\u5C0F", +popup_position:"\u4F4D\u7F6E (X/Y)", +id:"ID", +style:"\u6837\u5F0F", +classes:"\u7C7B\u522B", +target_name:"\u76EE\u6807\u540D\u79F0", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +target_langcode:"\u76EE\u6807\u8BED\u8A00", +langcode:"\u8BED\u8A00\u7F16\u7801", +encoding:"\u76EE\u6807\u8BED\u8A00\u7F16\u7801", +mime:"\u76EE\u6807 MIME \u7C7B\u578B", +rel:"\u7F51\u9875\u5230\u76EE\u6807\u7684\u5173\u8FDE", +rev:"\u76EE\u6807\u5230\u7F51\u9875\u7684\u5173\u8FDE", +tabindex:"Tab\u7D22\u5F15", +accesskey:"\u5FEB\u6377\u952E", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +link_list:"\u94FE\u63A5\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/is_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/is_dlg.js new file mode 100644 index 00000000..34e038b2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/is_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('is.advlink_dlg',{ +title:"Insert/edit link", +url:"Link URL", +target:"Target", +titlefield:"Title", +is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +list:"Link list", +general_tab:"General", +popup_tab:"Popup", +events_tab:"Events", +advanced_tab:"Advanced", +general_props:"General properties", +popup_props:"Popup properties", +event_props:"Events", +advanced_props:"Advanced properties", +popup_opts:"Options", +anchor_names:"Anchors", +target_same:"Open in this window / frame", +target_parent:"Open in parent window / frame", +target_top:"Open in top frame (replaces all frames)", +target_blank:"Open in new window", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Window name", +popup_return:"Insert 'return false'", +popup_scrollbars:"Show scrollbars", +popup_statusbar:"Show status bar", +popup_toolbar:"Show toolbars", +popup_menubar:"Show menu bar", +popup_location:"Show location bar", +popup_resizable:"Make window resizable", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"Size", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Target name", +langdir:"Language direction", +target_langcode:"Target language", +langcode:"Language code", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Left to right", +rtl:"Right to left", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/it_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/it_dlg.js new file mode 100644 index 00000000..aa1c25ab --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/it_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('it.advlink_dlg',{ +title:"Inserisci/modifica link", +url:"URL collegamento", +target:"Target", +titlefield:"Titolo", +is_email:"L'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?", +is_external:"L'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?", +list:"Lista collegamenti", +general_tab:"Generale", +popup_tab:"Popup", +events_tab:"Eventi", +advanced_tab:"Avanzate", +general_props:"Propriet\u00E0 generali", +popup_props:"Propriet\u00E0 popup", +event_props:"Eventi", +advanced_props:"Propriet\u00E0 avanzate", +popup_opts:"Opzioni", +anchor_names:"Ancore", +target_same:"Apri in questa finestra / cornice", +target_parent:"Apri nella finestra / cornice genitore", +target_top:"Apri nella cornice superiore (sostituisce tutte le cornici)", +target_blank:"Apri in una nuova finestra", +popup:"Popup Javascript", +popup_url:"URL Popup", +popup_name:"Nome finestra", +popup_return:"Inserisci 'return false'", +popup_scrollbars:"Mostra barre di scorrimento", +popup_statusbar:"Mostra barra di stato", +popup_toolbar:"Mostra barre strumenti", +popup_menubar:"Mostra barra menu", +popup_location:"Mostra barra navigazione", +popup_resizable:"Rendi la finestra ridimensionabile", +popup_dependent:"Dipendente (Solo in Mozilla/Firefox)", +popup_size:"Dimensioni", +popup_position:"Posizione (X/Y)", +id:"Id", +style:"Stile", +classes:"Classe", +target_name:"Nome target", +langdir:"Direzione del testo", +target_langcode:"Lingua del target", +langcode:"Lingua", +encoding:"Codifica carattere del target", +mime:"Tipo MIME del target", +rel:"Relazione da pagina a target", +rev:"Relazione da target a pagina", +tabindex:"Indice tabulazione", +accesskey:"Carattere di accesso", +ltr:"Sinistra verso destra", +rtl:"Destra verso sinistra", +link_list:"Lista collegamenti" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ja_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ja_dlg.js new file mode 100644 index 00000000..e0095174 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ja_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ja.advlink_dlg',{ +title:"\u30EA\u30F3\u30AF\u306E\u633F\u5165/\u7DE8\u96C6", +url:"\u30EA\u30F3\u30AFURL", +target:"\u30BF\u30FC\u30B2\u30C3\u30C8", +titlefield:"\u30BF\u30A4\u30C8\u30EB", +is_email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F\u3002\u30EA\u30F3\u30AF\u306Bmailto:\u3092\u4ED8\u52A0\u3057\u307E\u3059\u304B\uFF1F", +is_external:"\u30EA\u30F3\u30AF\u306Bhttp://\u3092\u4ED8\u52A0\u3057\u307E\u3059\u304B\uFF1F", +list:"\u4E00\u89A7\u304B\u3089\u9078\u3076", +general_tab:"\u4E00\u822C", +popup_tab:"\u30DD\u30C3\u30D7\u30A2\u30C3\u30D7", +events_tab:"\u30A4\u30D9\u30F3\u30C8", +advanced_tab:"\u4E0A\u7D1A\u8005\u5411\u3051", +general_props:"\u4E00\u822C", +popup_props:"\u30DD\u30C3\u30D7\u30A2\u30C3\u30D7", +event_props:"\u30A4\u30D9\u30F3\u30C8", +advanced_props:"\u4E0A\u7D1A\u8005\u5411\u3051", +popup_opts:"\u30AA\u30D7\u30B7\u30E7\u30F3", +anchor_names:"\u30A2\u30F3\u30AB\u30FC", +target_same:"\u3053\u306E\u30A6\u30A4\u30F3\u30C9\u30A6/\u30D5\u30EC\u30FC\u30E0\u3067\u958B\u304F", +target_parent:"\u89AA\u30A6\u30A4\u30F3\u30C9\u30A6/\u89AA\u30D5\u30EC\u30FC\u30E0\u3067\u958B\u304F", +target_top:"\u30C8\u30C3\u30D7\u306E\u30D5\u30EC\u30FC\u30E0\u3067\u958B\u304F", +target_blank:"\u65B0\u3057\u3044\u30A6\u30A4\u30F3\u30C9\u30A6\u3067\u958B\u304F", +popup:"Javascript\u30DD\u30C3\u30D7\u30A2\u30C3\u30D7", +popup_url:"\u30DD\u30C3\u30D7\u30A2\u30C3\u30D7URL", +popup_name:"\u30A6\u30A4\u30F3\u30C9\u30A6\u540D", +popup_return:"'return false'\u3092\u633F\u5165\u3059\u308B", +popup_scrollbars:"\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u3092\u8868\u793A", +popup_statusbar:"\u30B9\u30C6\u30FC\u30BF\u30B9\u30D0\u30FC\u3092\u8868\u793A", +popup_toolbar:"\u30C4\u30FC\u30EB\u30D0\u30FC\u3092\u8868\u793A", +popup_menubar:"\u30E1\u30CB\u30E5\u30FC\u30D0\u30FC\u3092\u8868\u793A", +popup_location:"\u30A2\u30C9\u30EC\u30B9\u30D0\u30FC\u3092\u8868\u793A", +popup_resizable:"\u30A6\u30A4\u30F3\u30C9\u30A6\u306E\u30B5\u30A4\u30BA\u5909\u66F4\u3092\u8A31\u53EF\u3059\u308B", +popup_dependent:"Dependent (Mozilla/Firefox\u306E\u307F)", +popup_size:"\u30B5\u30A4\u30BA", +popup_position:"\u4F4D\u7F6E (X/Y)", +id:"ID", +style:"\u30B9\u30BF\u30A4\u30EB", +classes:"\u30AF\u30E9\u30B9", +target_name:"\u30BF\u30FC\u30B2\u30C3\u30C8\u540D", +langdir:"\u6587\u7AE0\u306E\u65B9\u5411", +target_langcode:"\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u8A00\u8A9E", +langcode:"\u8A00\u8A9E\u30B3\u30FC\u30C9", +encoding:"\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0", +mime:"\u30BF\u30FC\u30B2\u30C3\u30C8\u306EMIME\u30BF\u30A4\u30D7", +rel:"\u3053\u306E\u30DA\u30FC\u30B8\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306B\u5BFE\u3059\u308B\u95A2\u4FC2", +rev:"\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u3053\u306E\u30DA\u30FC\u30B8\u306B\u5BFE\u3059\u308B\u95A2\u4FC2", +tabindex:"\u30BF\u30D6\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9", +accesskey:"\u30A2\u30AF\u30BB\u30B9\u30AD\u30FC", +ltr:"\u5DE6\u304B\u3089\u53F3", +rtl:"\u53F3\u304B\u3089\u5DE6", +link_list:"\u4E00\u89A7\u304B\u3089\u9078\u3076" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ko.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ko.js deleted file mode 100644 index 14b051a5..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ko.js +++ /dev/null @@ -1,19 +0,0 @@ -// KO lang variables - -tinyMCELang['lang_insert_link_target_same'] = '°°Àº â¿¡¼­ ¸µÅ©/ÇÁ·¹ÀÓ ¿­±â'; -tinyMCELang['lang_insert_link_target_parent'] = 'ºÎ¸ð â¿¡¼­ ¸µÅ©/ÇÁ·¹ÀÓ ¿­±â'; -tinyMCELang['lang_insert_link_target_top'] = 'TOP ÇÁ·¹ÀÓ¿¡¼­ ¿­±â (¸ðµç ÇÁ·¹ÀÓÀ» ´ëü)'; -tinyMCELang['lang_insert_link_target_blank'] = '»õ â¿¡¼­ ¿­±â'; -tinyMCELang['lang_insert_link_target_named'] = '»õ â¿¡¼­ ¿­±â'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'Æ˾÷ URL'; -tinyMCELang['lang_insert_link_popup_name'] = 'â À̸§'; -tinyMCELang['lang_insert_link_popup_return'] = '\'return false\' ³Ö±â'; -tinyMCELang['lang_insert_link_popup_scrollbars'] = '½ºÅ©·Ñ¹Ù¸¦ º¸¿©ÁÜ'; -tinyMCELang['lang_insert_link_popup_statusbar'] = '»óÅÂâÀ» º¸¿©ÁÜ'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'Åø¹Ù¸¦ º¸¿©ÁÜ'; -tinyMCELang['lang_insert_link_popup_menubar'] = '¸Þ´º¹Ù¸¦ º¸¿©ÁÜ'; -tinyMCELang['lang_insert_link_popup_location'] = 'À§Ä¡ Ç¥½ÃÁÙÀ» º¸¿©ÁÜ'; -tinyMCELang['lang_insert_link_popup_resizable'] = 'Å©±â Á¶Àý °¡´ÉÇÑ À©µµ¿ì »ý¼º'; -tinyMCELang['lang_insert_link_popup_size'] = 'Å©±â'; -tinyMCELang['lang_insert_link_popup_position'] = 'À§Ä¡ (X/Y)'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ko_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ko_dlg.js new file mode 100644 index 00000000..049d13b3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ko_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ko.advlink_dlg',{ +title:"\uB9C1\uD06C\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +url:"\uB9C1\uD06C URL", +target:"Target", +titlefield:"\uC81C\uBAA9", +is_email:"\uBA54\uC77C\uC8FC\uC18C\uAC00 \uC785\uB825\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBA54\uC77C\uC8FC\uC18C\uC758 \uC55E\uC5D0 mailto:\uB97C \uBD99\uC785\uB2C8\uAE4C?", +is_external:"\uC678\uBD80URL\uC774 \uC785\uB825\uB418\uC5C8\uC2B5\uB2C8\uB2E4.URL\uC758 \uC55E\uC5D0http://\uB97C \uBD99\uC785\uB2C8\uAE4C?", +list:"\uB9C1\uD06C \uBAA9\uB85D", +general_tab:"\uC77C\uBC18", +popup_tab:"\uD31D\uC5C5", +events_tab:"\uC774\uBCA4\uD2B8", +advanced_tab:"\uACE0\uAE09", +general_props:"\uC77C\uBC18 \uC124\uC815", +popup_props:"\uD31D\uC5C5 \uC124\uC815", +event_props:"\uC774\uBCA4\uD2B8", +advanced_props:"\uACE0\uAE09\uC758 \uC124\uC815", +popup_opts:"\uC635\uC158", +anchor_names:"\uC5E5\uCEE4", +target_same:"\uC774 \uCC3D/\uD504\uB808\uC784\uC73C\uB85C \uC5F4\uB9B0\uB2E4", +target_parent:"\uBD80\uBAA8\uCC3D/\uD504\uB808\uC784\uC73C\uB85C \uC5F4\uB9B0\uB2E4", +target_top:"\uCD5C\uC0C1\uC704 \uD504\uB808\uC784\uC73C\uB85C \uC5F4\uB9B0\uB2E4 (\uBAA8\uB4E0 \uD504\uB808\uC784 \uBCC0\uACBD)", +target_blank:"\uC0C8\uCC3D\uC73C\uB85C \uC5F4\uB9B0\uB2E4", +popup:"Javascript \uD31D\uC5C5", +popup_url:"\uD31D\uC5C5 URL", +popup_name:"Window \uC774\uB984", +popup_return:"'return false'\uB97C \uC0BD\uC785", +popup_scrollbars:"\uC2A4\uD06C\uB864\uBC14\uB97C \uD45C\uC2DC", +popup_statusbar:"\uC0C1\uD0DC\uC904\uC744 \uD45C\uC2DC", +popup_toolbar:"\uD234\uBC14\uB97C \uD45C\uC2DC", +popup_menubar:"\uBA54\uB274\uB97C \uD45C\uC2DC", +popup_location:"\uC8FC\uC18C\uBC14\uB97C \uD45C\uC2DC", +popup_resizable:"\uD06C\uAE30\uBCC0\uACBD \uAC00\uB2A5", +popup_dependent:"\uC5F0\uB3D9 (Mozilla/Firefox\uB9CC)", +popup_size:"\uD06C\uAE30", +popup_position:"\uC704\uCE58(X/Y)", +id:"Id", +style:"\uC2A4\uD0C0\uC77C", +classes:"\uD074\uB798\uC2A4", +target_name:"Target \uC774\uB984", +langdir:"\uD398\uC774\uC9C0 \uBB38\uC790 \uBC29\uD5A5", +target_langcode:"\uD398\uC774\uC9C0 \uC5B8\uC5B4", +langcode:"\uC5B8\uC5B4 \uCF54\uB4DC", +encoding:"\uBB38\uC790 \uC778\uCF54\uB529", +mime:"MIME\uD0C0\uC785", +rel:"\uB9C1\uD06C\uC5D0 \uAD00\uACC4", +rev:"\uB9C1\uD06C\uB85C\uBD80\uD130\uC758 \uAD00\uACC4", +tabindex:"\uD0ED \uC778\uB371\uC2A4", +accesskey:"\uC561\uC138\uC2A4 \uD0A4", +ltr:"\uC67C\uCABD\uC5D0\uC11C \uC624\uB978\uCABD", +rtl:"\uC624\uB978\uCABD\uC5D0\uC11C \uC67C\uCABD", +link_list:"\uB9C1\uD06C \uBAA9\uB85D" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/lt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/lt_dlg.js new file mode 100644 index 00000000..aa823d9b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/lt_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('lt.advlink_dlg',{ +title:"\u012Eterpti/Redaguoti nuorod\u0105", +url:"Nuorodos URL adresas", +target:"Taikinys", +titlefield:"Pavadinimas", +is_email:"URL adresas, kur\u012F \u012Fved\u0117te yra e-pa\u0161to adresas, ar norite prid\u0117ti reikaling\u0105 mailto: prefiks\u0105?", +is_external:"URL adresas, kur\u012F \u012Fved\u0117te yra i\u0161orin\u0117 nuoroda, ar norite prid\u0117ti reikaling\u0105 http:// prefiks\u0105?", +list:"Nuorod\u0173 s\u0105ra\u0161as", +general_tab:"Bendra", +popup_tab:"I\u0161\u0161okantis langas", +events_tab:"\u012Evykiai", +advanced_tab:"I\u0161pl\u0117sta", +general_props:"Bendri nustatymai", +popup_props:"I\u0161\u0161okan\u010Dio lango nustatymai", +event_props:"\u012Evykiai", +advanced_props:"I\u0161pl\u0117stiniai nustatymai", +popup_opts:"Nustatymai", +anchor_names:"Inkarai", +target_same:"Atidaryti tame pa\u010Diame lange", +target_parent:"Atidaryti t\u0117viniame lange", +target_top:"Atidaryti vir\u0161tiniame lange (pakei\u010Dia visus langus)", +target_blank:"Atidaryti naujame lange", +popup:"Javascript i\u0161\u0161okantis langas", +popup_url:"I\u0161\u0161okan\u010Dio lango URL adresas", +popup_name:"Lango vardas", +popup_return:"\u012Eterpti 'return false'", +popup_scrollbars:"Rodyti slankiojimo juostas", +popup_statusbar:"Rodyti statuso juost\u0105", +popup_toolbar:"Rodyti \u012Franki\u0173 juost\u0105", +popup_menubar:"Rodyti meniu juost\u0105", +popup_location:"Rodyti lokacijos juost\u0105", +popup_resizable:"Galima koreguoti lango i\u0161matavimus", +popup_dependent:"Proporcionaliai (tik Mozilla/Firefox)", +popup_size:"Dydis", +popup_position:"Pozicija (X/Y)", +id:"Id", +style:"Stilius", +classes:"Klas\u0117s", +target_name:"Taikinio vardas", +langdir:"Kalbos kryptis", +target_langcode:"Taikinio kalba", +langcode:"Kalbos kodas", +encoding:"Kalbos koduot\u0117", +mime:"Taikinio MIME tipas", +rel:"Santykis puslapio su taikiniu", +rev:"Santykis taikinio su puslapiu", +tabindex:"Tabuliacijos indeksas", +accesskey:"Prieities klavi\u0161as", +ltr:"I\u0161 kair\u0117s \u012F de\u0161in\u0119", +rtl:"I\u0161 de\u0161in\u0117s \u012F kair\u0119", +link_list:"Nuorod\u0173 s\u0105ra\u0161as" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/lv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/lv_dlg.js new file mode 100644 index 00000000..69f45ce7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/lv_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('lv.advlink_dlg',{ +title:"Ievietot/Redi\u0123\u0113t saiti", +url:"Saites URL", +target:"M\u0113r\u0137is", +titlefield:"Nosaukums", +is_email:"Ievad\u012Btais URL \u0161\u0137iet ir e-pasta adrese, vai J\u016Bs v\u0113laties pirms t\u0101s pievienot mailto: pried\u0113kli?", +is_external:"Ievad\u012Btais URL \u0161\u0137iet ir \u0101r\u0113j\u0101 saite, vai J\u016Bs v\u0113laties pirms t\u0101s pievienot http:// pried\u0113kli?", +list:"Link list", +general_tab:"General", +popup_tab:"Popup", +events_tab:"Events", +advanced_tab:"Advanced", +general_props:"General properties", +popup_props:"Popup properties", +event_props:"Events", +advanced_props:"Advanced properties", +popup_opts:"Options", +anchor_names:"Anchors", +target_same:"Open in this window / frame", +target_parent:"Open in parent window / frame", +target_top:"Open in top frame (replaces all frames)", +target_blank:"Open in new window", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Window name", +popup_return:"Insert 'return false'", +popup_scrollbars:"Show scrollbars", +popup_statusbar:"Show status bar", +popup_toolbar:"Show toolbars", +popup_menubar:"Show menu bar", +popup_location:"Show location bar", +popup_resizable:"Make window resizable", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"Size", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Target name", +langdir:"Language direction", +target_langcode:"Target language", +langcode:"Language code", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Left to right", +rtl:"Right to left", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/mk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/mk_dlg.js new file mode 100644 index 00000000..0f161fba --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/mk_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('mk.advlink_dlg',{ +title:"\u0412\u043C\u0435\u0442\u043D\u0438/uredi poveznicu", +url:"URL poveznice", +target:"Meta", +titlefield:"\u041D\u0430\u0441\u043B\u043E\u0432", +is_email:"URL koji ste uneli izgleda kao e-mail adresa, \u017Eelite li dodati potrebni mailto: prefiks?", +is_external:"URL koji ste uneli izgleda kao vanjska poveznica, \u017Eelite li dodati potrebni http:// prefiks?", +list:"Lista poveznica", +general_tab:"Osnovno", +popup_tab:"Popup", +events_tab:"Doga\u0111aj", +advanced_tab:"Napredno", +general_props:"Osnovna svojstva", +popup_props:"Svojstva popup prozora", +event_props:"Doga\u0111aji", +advanced_props:"Napredna svojstva", +popup_opts:"Opcije", +anchor_names:"Sidra", +target_same:"Otovori u novom prozoru / okviru", +target_parent:"Otvori u izvornom prozoru / okvir", +target_top:"Otvori u gornjem okviru (zamjenjuje sve okvire)", +target_blank:"Otvori u novom prozoru", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Ime prozora", +popup_return:"\u0412\u043C\u0435\u0442\u043D\u0438 'return false'", +popup_scrollbars:"Poka\u017Ei kliza\u010De", +popup_statusbar:"Poka\u017Ei statusnu traku", +popup_toolbar:"Poka\u017Ei alatne trake", +popup_menubar:"Poka\u017Ei izbornik", +popup_location:"Poka\u017Ei traku lokacije", +popup_resizable:"Prozor promjenjive veli\u010Dine", +popup_dependent:"Ovisan (samo za Mozilla/Firefox)", +popup_size:"Veli\u010Dina", +popup_position:"Pozicija (X/Y)", +id:"Id", +style:"Stil", +classes:"Klasa", +target_name:"Ime mete", +langdir:"Smjer jezika", +target_langcode:"Jezik", +langcode:"Kod jezika", +encoding:"Kodiranje znakova", +mime:"MIME tip", +rel:"Odnos stranice prema meti", +rev:"Odnos mete prema stranici", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"S leva na desno", +rtl:"S desna na levo", +link_list:"Lista poveznica" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/mn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/mn_dlg.js new file mode 100644 index 00000000..e772845c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/mn_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('mn.advlink_dlg',{ +title:"\u0425\u043E\u043B\u0431\u043E\u043E\u0441 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u0437\u0430\u0441\u0430\u0445", +url:"\u0425\u0430\u044F\u0433", +target:"\u0426\u043E\u043D\u0445", +titlefield:"\u0413\u0430\u0440\u0447\u0438\u0433", +is_email:"\u0425\u0430\u044F\u0433 \u0434\u044D\u044D\u0440 \u0418\u043C\u044D\u0439\u043B \u0445\u0430\u044F\u0433 \u0431\u0430\u0439\u0445 \u0448\u0438\u0433 \u0445\u0430\u0440\u0430\u0433\u0434\u0430\u043D\u0430. \u0422\u0430 \u0442\u04AF\u04AF\u043D\u0434 \u0448\u0430\u0430\u0440\u0434\u043B\u0430\u0433\u0430\u0442\u0430\u0439 mailto: \u043D\u044D\u043C\u044D\u0445\u0438\u0439\u0433 \u0445\u04AF\u0441\u044D\u0436 \u0431\u0430\u0439\u043D\u0430 \u0443\u0443?", +is_external:"\u0425\u0430\u044F\u0433 \u0434\u044D\u044D\u0440 \u0433\u0430\u0434\u0430\u0430\u0434 \u0445\u043E\u043B\u0431\u043E\u043E\u0441 \u0431\u0430\u0439\u0433\u0430\u0430 \u0445\u0430\u0440\u0430\u0433\u0434\u0430\u043D\u0430. \u0422\u0430 \u0437\u04E9\u0432 \u0445\u043E\u043B\u0431\u043E\u043E\u0441 \u0431\u043E\u043B\u0433\u043E\u0445\u044B\u043D \u0442\u0443\u043B\u0434 http:// \u043D\u044D\u043C\u044D\u0445\u0438\u0439\u0433 \u0445\u04AF\u0441\u044D\u0436 \u0431\u0430\u0439\u043D\u0430 \u0443\u0443?", +list:"\u0425\u043E\u043B\u0431\u043E\u043E\u0441\u044B\u043D \u0436\u0430\u0433\u0441\u0430\u0430\u043B\u0442", +general_tab:"\u0415\u0440\u04E9\u043D\u0445\u0438\u0439", +popup_tab:"\u041F\u043E\u043F\u0430\u043F", +events_tab:"\u04AE\u0437\u044D\u0433\u0434\u044D\u043B", +advanced_tab:"\u04E8\u0440\u0433\u04E9\u0442\u0433\u04E9\u0441\u04E9\u043D", +general_props:"\u0415\u0440\u04E9\u043D\u0445\u0438\u0439 \u0448\u0438\u043D\u0436", +popup_props:"\u041F\u043E\u043F\u0430\u043F-\u0448\u0438\u043D\u0436", +event_props:"\u04AE\u0437\u044D\u0433\u0434\u044D\u043B", +advanced_props:"\u04E8\u0440\u0433\u04E9\u0442\u0433\u04E9\u0441\u04E9\u043D \u0448\u0438\u043D\u0436", +popup_opts:"\u0421\u043E\u043D\u0433\u043E\u043B\u0442", +anchor_names:"\u0413\u0430\u0434\u0430\u0441", +target_same:"\u0422\u0443\u0445\u0430\u0439\u043D \u0446\u043E\u043D\u0445/\u0444\u0440\u044D\u0439\u043C\u0434 \u043D\u044D\u044D\u0445", +target_parent:"\u042D\u0445 \u0446\u043E\u043D\u0445/\u0444\u0440\u044D\u0439\u043C\u0434 \u043D\u044D\u044D\u0445", +target_top:"\u0425\u0430\u043C\u0433\u0438\u0439\u043D \u0434\u044D\u044D\u0434 \u0446\u043E\u043D\u0445/\u0444\u0440\u044D\u0439\u043C\u0434 \u043D\u044D\u044D\u0445", +target_blank:"\u0428\u0438\u043D\u044D \u0446\u043E\u043D\u0445\u043E\u043D\u0434 \u043D\u044D\u044D\u0445", +popup:"\u0416\u0430\u0432\u0430\u0441\u043A\u0440\u0438\u043F\u0442-\u043F\u043E\u043F\u0430\u043F", +popup_url:"\u041F\u043E\u043F\u0430\u043F-\u0445\u0430\u044F\u0433", +popup_name:"\u0426\u043E\u043D\u0445\u043D\u044B \u043D\u044D\u0440", +popup_return:"\u041F\u043E\u043F\u0430\u043F \u0431\u0430\u0439\u0441\u0430\u043D \u0447 \u0445\u043E\u043B\u0431\u043E\u043E\u0441\u044B\u0433 \u0434\u0430\u0433\u0430\u043D\u0430", +popup_scrollbars:"\u0413\u04AF\u0439\u043B\u0433\u044D\u0433\u0447 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0445", +popup_statusbar:"\u0422\u04E9\u043B\u04E9\u0432 \u0441\u0430\u043C\u0431\u0430\u0440 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0445", +popup_toolbar:"\u0411\u0430\u0433\u0430\u0436 \u0441\u0430\u043C\u0431\u0430\u0440 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0445", +popup_menubar:"\u0425\u04E9\u0442\u04E9\u0447\u0438\u0439\u043D \u0446\u044D\u0441 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0445", +popup_location:"\u0425\u0430\u044F\u0433\u0438\u0439\u043D \u0441\u0430\u043C\u0431\u0430\u0440 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0445", +popup_resizable:"\u0426\u043E\u043D\u0445 \u0442\u043E\u043C\u0440\u0443\u0443\u043B\u0430\u0445\u044B\u0433 \u0437\u04E9\u0432\u0448\u04E9\u04E9\u0440\u04E9\u0445", +popup_dependent:"\u042D\u0445 \u0446\u043E\u043D\u0445\u043D\u043E\u043E\u0441 \u0445\u0430\u043C\u0430\u0430\u0440\u0430\u043B\u0442\u0430\u0439 (\u0417\u04E9\u0432\u0445\u04E9\u043D Mozilla/Firefox)", +popup_size:"\u0425\u044D\u043C\u0436\u044D\u044D", +popup_position:"\u0411\u0430\u0439\u0440\u043B\u0430\u043B (X/Y)", +id:"\u0422\u0422", +style:"\u0424\u043E\u0440\u043C\u0430\u0442", +classes:"\u0410\u043D\u0433\u0438", +target_name:"\u0422\u043E\u0432\u043B\u043E\u0441\u043E\u043D \u0445\u0443\u0443\u0434\u0430\u0441\u043D\u044B \u043D\u044D\u0440", +langdir:"\u0411\u0438\u0447\u0433\u0438\u0439\u043D \u0447\u0438\u0433\u043B\u044D\u043B", +target_langcode:"\u0422\u043E\u0432\u043B\u043E\u0441\u043E\u043D \u0445\u0443\u0443\u0434\u0430\u0441\u043D\u044B \u0445\u044D\u043B", +langcode:"\u0425\u044D\u043B\u043D\u0438\u0439 \u043A\u043E\u0434", +encoding:"\u0422\u043E\u0432\u043B\u043E\u0441\u043E\u043D \u0445\u0443\u0443\u0434\u0430\u0441\u043D\u044B \u043A\u043E\u0434\u0447\u0438\u043B\u043E\u043B", +mime:"\u0422\u043E\u0432\u043B\u043E\u0441\u043E\u043D \u0445\u0443\u0443\u0434\u0430\u0441\u043D\u044B MIME \u0442\u04E9\u0440\u04E9\u043B", +rel:"\u0422\u043E\u0432\u043B\u043E\u0441\u043E\u043D \u0445\u043E\u043B\u0431\u043E\u043E\u0441\u043E\u043E\u0441 \u0445\u0443\u0443\u0434\u0430\u0441\u043D\u044B \u0445\u043E\u043B\u0431\u043E\u043B\u0442", +rev:"\u0425\u0443\u0443\u0434\u0430\u0441\u043D\u0430\u0430\u0441 \u0442\u043E\u0432\u043B\u043E\u0441\u043E\u043D \u0445\u043E\u043B\u0431\u043E\u043E\u0441\u043E\u043E\u0441 \u0445\u043E\u043B\u0431\u043E\u043B\u0442", +tabindex:"\u0422\u0430\u0431\u0443\u043B\u0430\u0442\u043E\u0440 \u0438\u043D\u0434\u0435\u043A\u0441", +accesskey:"\u0422\u043E\u0432\u0447\u0438\u043B\u0431\u043E\u0440", +ltr:"\u0417\u04AF\u04AF\u043D\u044D\u044D\u0441 \u0431\u0430\u0440\u0443\u0443\u043D", +rtl:"\u0411\u0430\u0440\u0443\u0443\u043D\u0430\u0430\u0441 \u0437\u04AF\u04AF\u043D", +link_list:"\u0425\u043E\u043B\u0431\u043E\u043E\u0441\u044B\u043D \u0436\u0430\u0433\u0441\u0430\u0430\u043B\u0442" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ms_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ms_dlg.js new file mode 100644 index 00000000..5482c2ca --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ms_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ms.advlink_dlg',{ +title:"Sisip/sunting pautan", +url:"Pautan URL", +target:"Sasaran", +titlefield:"Tajuk", +is_email:"URL yang dimasukkan adalah alamat emel, tambah \"mailto\": di awalan?", +is_external:"URL yang dimasukkan adalah pautan luar, tambah \"http://\" di awalan?", +list:"Senarai pautan", +general_tab:"Am", +popup_tab:"Popup", +events_tab:"Peristiwa", +advanced_tab:"Lanjutan", +general_props:"Alatan am", +popup_props:"Alatan Popup", +event_props:"Peristiwa", +advanced_props:"Alatan lanjutan", +popup_opts:"Pilihan", +anchor_names:"Sauh", +target_same:"Buka tetingkap ini", +target_parent:"Buka dalam tetingkap yang lain", +target_top:"Buka bingkaian atas (gantikan kesemua bingkai)", +target_blank:"Buka dalam tetingkap baru.", +popup:"Popup Javascript ", +popup_url:"Popup URL", +popup_name:"Nama tetingkap", +popup_return:"Masukkan 'return false'", +popup_scrollbars:"Tunjuk bar gulung", +popup_statusbar:"Tunjuk bar status", +popup_toolbar:"Tunjuk bar alatan", +popup_menubar:"Tunjuk bar menu", +popup_location:"Tunjuk bar lokasi", +popup_resizable:"Jadikan tetingkap boleh diubahsuai", +popup_dependent:"Tanggungan (Hanya Mozilla/Firefox)", +popup_size:"Saiz", +popup_position:"Posisi (X/Y)", +id:"Id", +style:"Gaya", +classes:"Kelas-kelas", +target_name:"Nama sasaran", +langdir:"Arah bahasa", +target_langcode:"Bahasa sasaran", +langcode:"Kod bahasa", +encoding:"Sasaran enkod perkataan", +mime:"Sasaran jenis MIME", +rel:"Kaitan halaman kepada sasaran", +rev:"Kaitan sasaran kepada halaman", +tabindex:"Tanda indeks", +accesskey:"Kunci akses", +ltr:"Kiri ke kanan", +rtl:"Kanan ke kiri", +link_list:"Senarai pautan" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nb_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nb_dlg.js new file mode 100644 index 00000000..5066c68d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nb_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('nb.advlink_dlg',{ +title:"Sett inn / rediger lenke", +url:"Lenkens URL", +target:"M\u00E5l", +titlefield:"Tittel", +is_email:"URL'en du oppga synes \u00E5 v\u00E6re en email adresse, \u00F8nsker du \u00E5 legge til den n\u00F8dvendige mailto: prefix?", +is_external:"URL'en du oppga synes \u00E5 v\u00E6re en ekstern lenke, \u00F8nsker du \u00E5 legge til den n\u00F8dvendige http:// prefix?", +list:"Lenkeliste", +general_tab:"Generelt", +popup_tab:"Popup", +events_tab:"Hendelser", +advanced_tab:"Avansert", +general_props:"Generelle egenskaper", +popup_props:"Popup-egenskaper", +event_props:"Hendelser", +advanced_props:"Generelle egenskaper", +popup_opts:"Innstillinger", +anchor_names:"Anker", +target_same:"\u00C5pne i samme vindu/ramme", +target_parent:"\u00C5pne i overordnet vindu/ramme", +target_top:"\u00C5pne i toppvindu (erstatter alle rammer)", +target_blank:"\u00C5pne i nytt vindu", +popup:"Javascript-popup", +popup_url:"Popup URL", +popup_name:"Vindunavn", +popup_return:"Sett inn \'return false\'", +popup_scrollbars:"Vis rullefelt", +popup_statusbar:"Vis statuslinje", +popup_toolbar:"Vis verkt\u00F8ylinjer", +popup_menubar:"Vis menylinje", +popup_location:"Vis plasseringslinje", +popup_resizable:"Gj\u00F8r vinduet skalerbart", +popup_dependent:"Avhengig vindu (bare i Mozilla/Firefox)", +popup_size:"St\u00F8rrelse", +popup_position:"Posisjon (X/Y)", +id:"Id", +style:"Stil", +classes:"Klasser", +target_name:"M\u00E5lnavn", +langdir:"Skriftretning", +target_langcode:"M\u00E5lspr\u00E5k", +langcode:"Spr\u00E5kkode", +encoding:"Tegnkonvertering", +mime:"M\u00E5lets MIME-type", +rel:"Sidens forhold til m\u00E5let", +rev:"M\u00E5lets forhold til siden", +tabindex:"Tabulatorindeks", +accesskey:"Hurtigtast", +ltr:"Venstre mot h\u00F8yre", +rtl:"H\u00F8yre mot venstre", +link_list:"Lenkeliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nl_dlg.js new file mode 100644 index 00000000..4db7120f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nl_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('nl.advlink_dlg',{ +title:"Link invoegen/bewerken", +url:"URL", +target:"Doel", +titlefield:"Titel", +is_email:"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?", +is_external:"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?", +list:"Lijst", +general_tab:"Algemeen", +popup_tab:"Popup", +events_tab:"Gebeurtenissen", +advanced_tab:"Geavanceerd", +general_props:"Algemene eigenschappen", +popup_props:"Popup eigenschappen", +event_props:"Gebeurtenissen", +advanced_props:"Geavanceerde eigenschappen", +popup_opts:"Opties", +anchor_names:"Ankers", +target_same:"In dit venster / frame openen", +target_parent:"In bovenliggend venster / frame openen", +target_top:"In bovenste frame openen (vervangt gehele pagina)", +target_blank:"In nieuw venster openen", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Venstertitel", +popup_return:"'return false' invoegen", +popup_scrollbars:"Scrollbalken weergeven", +popup_statusbar:"Statusbalk weergeven", +popup_toolbar:"Werkbalk weergeven", +popup_menubar:"Menubalk weergeven", +popup_location:"Lokatiebalk weergeven", +popup_resizable:"Aanpasbaar venster", +popup_dependent:"Afhankelijk (Alleen Mozilla/Firefox)", +popup_size:"Grootte", +popup_position:"Positie (X/Y)", +id:"Id", +style:"Stijl", +classes:"Klasses", +target_name:"Doel", +langdir:"Taalrichting", +target_langcode:"Taal", +langcode:"Taalcode", +encoding:"Taalcodering", +mime:"MIME type", +rel:"Relatie van pagina tot doel", +rev:"Relatie van doel tot pagina", +tabindex:"Tabvolgorde", +accesskey:"Toegangstoets", +ltr:"Van links naar rechts", +rtl:"Van rechts naar links", +link_list:"Lijst" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nn_dlg.js new file mode 100644 index 00000000..c1d18ea4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/nn_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('nn.advlink_dlg',{ +title:"Set inn / rediger lenkje", +url:"Lenkje-URL", +target:"M\u00E5l", +titlefield:"Tittel", +is_email:"URL-en du skreiv inn ser ut til \u00E5 vere ei e-postadresse. \u00D8nskjer du \u00E5 leggje til det obligatoriske mailto:-prefikset?", +is_external:"URL-en du skreiv inn ser ut til \u00E5 vere ei eksern lenkje. \u00D8nskjer du \u00E5 leggje til det obligatoriske http://-prefikset?", +list:"Lenkjeliste", +general_tab:"Generelt", +popup_tab:"Popup", +events_tab:"Hendingar", +advanced_tab:"Avansert", +general_props:"Generelt", +popup_props:"Popup-eigenskapar", +event_props:"Hendingar", +advanced_props:"Generelle eigenskapar", +popup_opts:"Innstillingar", +anchor_names:"Anker", +target_same:"Opne i same vindauge/ramme", +target_parent:"Opne i overordna vindauge/ramme", +target_top:"Opne i toppvindauge (erstattar alle rammer)", +target_blank:"Opne i nytt vindauge", +popup:"Javascript-popup", +popup_url:"Popup URL", +popup_name:"Namn p\u00E5 vindauge", +popup_return:"Set inn \'return false\'", +popup_scrollbars:"Vis rullefelt", +popup_statusbar:"Vis statusline", +popup_toolbar:"Vis verktyliner", +popup_menubar:"Vis menyline", +popup_location:"Vis plasseringsline", +popup_resizable:"Gjer vindauget skalerbart", +popup_dependent:"Avhengig vindu (berre i Mozilla/Firefox)", +popup_size:"Storleik", +popup_position:"Posisjon (X/Y)", +id:"Id", +style:"Stil", +classes:"Klasser", +target_name:"M\u00E5lnamn", +langdir:"Skriftretning", +target_langcode:"M\u00E5lspr\u00E5k", +langcode:"Spr\u00E5kkode", +encoding:"Teiknkonvertering", +mime:"M\u00E5let sin MIME-type", +rel:"Sida sitt forhold til m\u00E5let", +rev:"M\u00E5let sitt forhold til sida", +tabindex:"Tabulatorindeks", +accesskey:"Hurtigtast", +ltr:"Venstre mot h\u00F8gre", +rtl:"H\u00F8gre mot venstre", +link_list:"Lenkjeliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/pl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/pl_dlg.js new file mode 100644 index 00000000..f067c364 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/pl_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('pl.advlink_dlg',{ +title:"Wstaw/edytuj link", +url:"Link URL", +target:"Cel", +titlefield:"Tytu\u0142", +is_email:"Podany adres wydaje si\u0119 by\u0107 adresem emailowym, czy chcesz doda\u0107 wymagany prefix mailto: ?", +is_external:"Podany adres wydaje si\u0119 by\u0107 zewn\u0119trznym linkiem, czy chcesz doda\u0107 wymagany prefix http:// ?", +list:"Lista link\u00F3w", +general_tab:"Og\u00F3lny", +popup_tab:"Popup", +events_tab:"Wydarzenia", +advanced_tab:"Zaawansowany", +general_props:"Og\u00F3lne w\u0142a\u015Bciwo\u015Bci", +popup_props:"Popup w\u0142a\u015Bciwo\u015Bci", +event_props:"Wydarzenia", +advanced_props:"Zaawansowae w\u0142a\u015Bciwo\u015Bci", +popup_opts:"Opcje", +anchor_names:"Kotwice", +target_same:"Otw\u00F3rz w tym oknie / ramce", +target_parent:"Otw\u00F3rz w nadrz\u0119dnej oknie / ramce", +target_top:"Otw\u00F3rz w g\u00F3rnej ramce (zamie\u0144 wszystkie ramki)", +target_blank:"Otw\u00F3rz w nowym oknie", +popup:"Wyskakuj\u0105ce okienko", +popup_url:"URL okienka", +popup_name:"Nazwa okiena", +popup_return:"Wklej 'return false'", +popup_scrollbars:"Poka\u017C paski przewijania", +popup_statusbar:"Poka\u017C pasek statusu", +popup_toolbar:"Poka\u017C narz\u0119dzia", +popup_menubar:"Poka\u017C pasek menu", +popup_location:"Poka\u017C pasek adresu", +popup_resizable:"Stw\u00F3rz okno z w\u0142a\u015Bciwo\u015Bciami zmiany rozmiaru", +popup_dependent:"Podleg\u0142y (Mozilla/Firefox wy\u0142\u0105cznie)", +popup_size:"Rozmiar", +popup_position:"Pozycja (X/Y)", +id:"Id", +style:"Wz\u00F3r", +classes:"Klasy", +target_name:"Cel", +langdir:"Kierunek czytania tekstu", +target_langcode:"Docelowy kod j\u0119zyka", +langcode:"Kod j\u0119zyka", +encoding:"Kodowanie znak\u00F3w celu", +mime:"Cel MIME type", +rel:"Relacje strony do celu", +rev:"Relacje celu do strony", +tabindex:"Tabindex", +accesskey:"Klawisz skr\u00F3tu", +ltr:"Kierunek z lewej do prawej", +rtl:"Kierunek z prawej do lewej", +link_list:"Lista odno\u015Bnik\u00F3w" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/pt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/pt_dlg.js new file mode 100644 index 00000000..475b23f8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/pt_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('pt.advlink_dlg',{ +title:"Inserir/editar hyperlink", +url:"URL do hyperlink", +target:"Alvo", +titlefield:"T\u00EDtulo", +is_email:"A URL digitada parece ser um endere\u00E7o de e-mail. Deseja acrescentar o (necess\u00E1rio) prefixo mailto:?", +is_external:"A URL digitada parece conduzir a um link externo. Deseja acrescentar o (necess\u00E1rio) prefixo http://?", +list:"Lista de hyperlinks", +general_tab:"Geral", +popup_tab:"Popup", +events_tab:"Eventos", +advanced_tab:"Avan\u00E7ado", +general_props:"Propriedades gerais", +popup_props:"Propriedades de popup", +event_props:"Eventos", +advanced_props:"Propriedades avan\u00E7adas", +popup_opts:"Op\u00E7\u00F5es", +anchor_names:"\u00ED\u0082ncoras", +target_same:"Abrir nesta janela/quadro", +target_parent:"Abrir na janela/quadro pai", +target_top:"Abrir na p\u00E1gina inteira (substitui todos os quadros)", +target_blank:"Abrir numa nova janela", +popup:"Popup javascript", +popup_url:"URL do popup", +popup_name:"Nome da janela", +popup_return:"Inserir 'return false'", +popup_scrollbars:"Mostrar barras de scroll", +popup_statusbar:"Mostrar barra de status", +popup_toolbar:"Mostrar barras de ferramentas", +popup_menubar:"Mostrar barra de menu", +popup_location:"Mostrar barra de endere\u00E7os", +popup_resizable:"Permitir altera\u00E7\u00E3o do tamanho da janela", +popup_dependent:"Dependente (Mozilla/Firefox apenas)", +popup_size:"Tamanho", +popup_position:"Posi\u00E7\u00E3o (X/Y)", +id:"Id", +style:"Estilo", +classes:"Classes", +target_name:"Nome do alvo", +langdir:"Direc\u00E7\u00E3o do texto", +target_langcode:"linguagem alvo", +langcode:"C\u00F3digo da linguagem", +encoding:"Codifica\u00E7\u00E3o de caracteres", +mime:"Tipo MIME alvo", +rel:"Rela\u00E7\u00E3o p\u00E1gina/alvo", +rev:"Rela\u00E7\u00E3o alvo/p\u00E1gina", +tabindex:"Tabindex", +accesskey:"Chave de acesso", +ltr:"Da esquerda para a direita", +rtl:"Da direita para a esquerda", +link_list:"Lista de hyperlinks" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ro_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ro_dlg.js new file mode 100644 index 00000000..a5936708 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ro_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ro.advlink_dlg',{ +title:"Insereaz\u0103/editeaz\u0103 link", +url:"URL link", +target:"\u0162int\u0103", +titlefield:"Titlu", +is_email:"URL-ul pe care l-a\u0163i introdus pare a fi o adres\u0103 de email, dori\u0163i s\u0103 adaug \u015Fi prefixul mailto: necesar?", +is_external:"URL-ul pe care l-a\u0163i introdus pare a fi un link extern, dori\u0163i s\u0103 adaug \u015Fi prefixul http:// necesar?", +list:"List\u0103 linkuri", +general_tab:"General", +popup_tab:"Popup", +events_tab:"Evenimente", +advanced_tab:"Avansat", +general_props:"Propriet\u0103\u0163i generale", +popup_props:"Propriet\u0103\u0163i popup", +event_props:"Evenimente", +advanced_props:"Propriet\u0103\u0163i avansate", +popup_opts:"Op\u0163iuni", +anchor_names:"Ancore", +target_same:"Deschide link \u00EEn aceast\u0103 fereastr\u0103 / acest frame", +target_parent:"Deschide link \u00EEn fereastr\u0103 / frame-ul p\u0103rinte", +target_top:"Deschide \u00EEn frame-ul cel mai mare (\u00EEnlocuie\u015Fte celelalte frame-uri)", +target_blank:"Deschide \u00EEn fereastr\u0103 nou\u0103", +popup:"Popup Javascript", +popup_url:"Popup URL", +popup_name:"Nume fereastr\u0103", +popup_return:"Insereaz\u0103 'return false'", +popup_scrollbars:"Arat\u0103 b\u0103ri de derulare", +popup_statusbar:"Arat\u0103 bara de stare", +popup_toolbar:"Arat\u0103 toolbar-uri", +popup_menubar:"Arat\u0103 meniul", +popup_location:"Arat\u0103 bara de adres\u0103", +popup_resizable:"Fereastr\u0103 redimensionabil\u0103?", +popup_dependent:"Dependent (Mozilla/Firefox)?", +popup_size:"M\u0103rime", +popup_position:"Pozi\u0163ie (X/Y)", +id:"Id", +style:"Stil", +classes:"Clase", +target_name:"Nume \u0163int\u0103", +langdir:"Direc\u0163ie limb\u0103", +target_langcode:"Limb\u0103", +langcode:"Cod limb\u0103", +encoding:"Set de caractere \u0163int\u0103", +mime:"MIME type \u0163int\u0103", +rel:"Rela\u0163ia paginii cu \u0163inta", +rev:"Rela\u0163ia \u0163intei cu pagina", +tabindex:"Tabindex", +accesskey:"Cheie de acces", +ltr:"St\u00E2nga la dreapta", +rtl:"Dreapta la st\u00E2nga", +link_list:"List\u0103 linkuri" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ru_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ru_dlg.js new file mode 100644 index 00000000..e7538a60 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ru_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ru.advlink_dlg',{ +title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443", +url:"\u0410\u0434\u0440\u0435\u0441 \u0441\u0441\u044B\u043B\u043A\u0438", +target:"\u0426\u0435\u043B\u044C", +titlefield:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", +is_email:"\u0412\u0432\u0435\u0434\u0451\u043D\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 \u043F\u043E\u0445\u043E\u0436 \u043D\u0430 email, \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0444\u0438\u043A\u0441 mailto:?", +is_external:"\u0412\u0432\u0435\u0434\u0451\u043D\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 \u043F\u043E\u0445\u043E\u0436 \u043D\u0430 \u0432\u043D\u0435\u0448\u043D\u044E\u044E \u0441\u0441\u044B\u043B\u043A\u0443, \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0444\u0438\u043A\u0441 http://?", +list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0441\u0441\u044B\u043B\u043E\u043A", +general_tab:"\u041E\u0431\u0449\u0438\u0435", +popup_tab:"\u0412\u0441\u043F\u043B\u044B\u0432\u0430\u044E\u0449\u0435\u0435 \u043E\u043A\u043D\u043E", +events_tab:"\u0421\u043E\u0431\u044B\u0442\u0438\u044F", +advanced_tab:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435", +general_props:"\u041E\u0431\u0449\u0438\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430", +popup_props:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0432\u0441\u043F\u043B\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043E\u043A\u043D\u0430", +event_props:"\u0421\u043E\u0431\u044B\u0442\u0438\u044F", +advanced_props:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430", +popup_opts:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B", +anchor_names:"\u042F\u043A\u043E\u0440\u044F", +target_same:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u043E\u043A\u043D\u0435 / \u0444\u0440\u0435\u0439\u043C\u0435", +target_parent:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u043E\u043C \u043E\u043A\u043D\u0435 / \u0444\u0440\u0435\u0439\u043C\u0435", +target_top:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0432\u0435\u0440\u0445\u043D\u0435\u043C \u0444\u0440\u0435\u0439\u043C\u0435 (\u0437\u0430\u043C\u0435\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043E\u0441\u0442\u0430\u043B\u044C\u043D\u044B\u0435)", +target_blank:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u043C \u043E\u043A\u043D\u0435", +popup:"\u0412\u0441\u043F\u043B\u044B\u0432\u0430\u044E\u0449\u0435\u0435 Javascript-\u043E\u043A\u043D\u043E", +popup_url:"\u0410\u0434\u0440\u0435\u0441 \u0432\u0441\u043F\u043B\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043E\u043A\u043D\u0430", +popup_name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u043A\u043D\u0430", +popup_return:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C 'return false'", +popup_scrollbars:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438", +popup_statusbar:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F", +popup_toolbar:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432", +popup_menubar:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u043C\u0435\u043D\u044E", +popup_location:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0430\u0434\u0440\u0435\u0441\u0430", +popup_resizable:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0440 \u043E\u043A\u043D\u0430 \u0438\u0437\u043C\u0435\u043D\u044F\u0435\u043C\u044B\u043C", +popup_dependent:"\u0417\u0430\u0432\u0438\u0441\u0438\u043C\u044B\u0435 (\u0442\u043E\u043B\u044C\u043A\u043E Mozilla/Firefox)", +popup_size:"\u0420\u0430\u0437\u043C\u0435\u0440", +popup_position:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F (X/Y)", +id:"\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440", +style:"\u0421\u0442\u0438\u043B\u044C", +classes:"\u041A\u043B\u0430\u0441\u0441\u044B", +target_name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0446\u0435\u043B\u0438", +langdir:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u044F\u0437\u044B\u043A\u0430", +target_langcode:"\u0426\u0435\u043B\u0435\u0432\u043E\u0439 \u044F\u0437\u044B\u043A", +langcode:"\u041A\u043E\u0434 \u044F\u0437\u044B\u043A\u0430", +encoding:"\u0426\u0435\u043B\u0435\u0432\u0430\u044F \u043A\u043E\u0434\u0438\u0440\u043E\u0432\u043A\u0430", +mime:"\u0426\u0435\u043B\u0435\u0432\u043E\u0439 MIME-\u0442\u0438\u043F", +rel:"\u041E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043A \u0446\u0435\u043B\u0438", +rev:"\u041E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0435 \u0446\u0435\u043B\u044C \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435", +tabindex:"\u0418\u043D\u0434\u0435\u043A\u0441 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438", +accesskey:"\u041A\u043B\u0430\u0432\u0438\u0448\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u0430", +ltr:"\u0421\u043B\u0435\u0432\u0430 \u043D\u0430\u043F\u0440\u0430\u0432\u043E", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043D\u0430\u043B\u0435\u0432\u043E", +link_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0441\u0441\u044B\u043B\u043E\u043A" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sc_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sc_dlg.js new file mode 100644 index 00000000..3b1d7815 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sc_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('sc.advlink_dlg',{ +title:"\u63D2\u5165/\u7F16\u8F91 \u94FE\u63A5", +url:"\u94FE\u63A5\u5730\u5740", +target:"\u76EE\u6807", +titlefield:"\u6807\u9898", +is_email:"\u4F60\u8F93\u5165\u7684\u662F\u7535\u5B50\u90AE\u7BB1\u5730\u5740\uFF0C\u662F\u5426\u52A0\u5165\u524D\u7F00\uFF1Amailto: ? ", +is_external:"\u4F60\u8F93\u5165\u7684\u662F\u5916\u90E8\u94FE\u63A5\u5730\u5740, \u662F\u5426\u52A0\u5165\u524D\u7F00\uFF1Ahttp:// ?", +list:"\u94FE\u63A5\u5217\u8868", +general_tab:"\u57FA\u672C", +popup_tab:"\u5F39\u51FA\u7A97\u53E3", +events_tab:"\u4E8B\u4EF6", +advanced_tab:"\u9AD8\u7EA7", +general_props:"\u57FA\u672C\u5C5E\u6027", +popup_props:"\u5F39\u51FA\u7A97\u53E3\u5C5E\u6027", +event_props:"\u4E8B\u4EF6", +advanced_props:"\u9AD8\u7EA7\u5C5E\u6027", +popup_opts:"\u9009\u9879", +anchor_names:"\u951A\u70B9", +target_same:"\u5728\u5F53\u524D\u7A97\u53E3\u6253\u5F00", +target_parent:"\u5728\u7236\u7A97\u53E3\u6253\u5F00", +target_top:"\u5728\u9876\u5C42\u7A97\u53E3\u6253\u5F00", +target_blank:"\u5728\u65B0\u7A97\u53E3\u6253\u5F00", +popup:"Javascript \u5F39\u51FA\u7A97\u53E3", +popup_url:"\u5F39\u51FA\u7A97\u53E3\u5730\u5740", +popup_name:"\u7A97\u53E3\u540D\u79F0", +popup_return:"\u63D2\u5165 'return false'", +popup_scrollbars:"\u663E\u793A\u6EDA\u52A8\u6761", +popup_statusbar:"\u663E\u793A\u72B6\u6001\u680F", +popup_toolbar:"\u663E\u793A\u5DE5\u5177\u680F", +popup_menubar:"\u663E\u793A\u83DC\u5355\u680F", +popup_location:"\u663E\u793A\u5730\u5740\u680F", +popup_resizable:"\u53EF\u8C03\u6574\u7A97\u53E3\u5927\u5C0F", +popup_dependent:"\u4ECE\u5C5E\u4E8E\u6253\u5F00\u7A97\u53E3(\u4EC5Mozilla/Firefox\u6709\u6548)", +popup_size:"\u5927\u5C0F", +popup_position:"\u5750\u6807(X/Y)", +id:"Id", +style:"\u6837\u5F0F", +classes:"\u6837\u5F0F\u7C7B", +target_name:"\u76EE\u6807\u540D\u79F0", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +target_langcode:"\u76EE\u6807\u8BED\u8A00", +langcode:"\u8BED\u8A00\u7F16\u7801", +encoding:"\u76EE\u6807\u5B57\u7B26\u7F16\u7801", +mime:"\u76EE\u6807MIME\u7C7B\u578B", +rel:"rel", +rev:"rev", +tabindex:"Tab\u987A\u5E8F", +accesskey:"\u5FEB\u6377\u952E", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +link_list:"\u94FE\u63A5\u5217\u8868" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/se_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/se_dlg.js new file mode 100644 index 00000000..75c51f46 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/se_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('se.advlink_dlg',{ +title:"Infoga/redigera l\u00E4nk", +url:"L\u00E4nkens URL", +target:"M\u00E5l", +titlefield:"Titel", +is_email:"L\u00E4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00E5 l\u00E4nken?", +is_external:"L\u00E4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00E5 l\u00E4nken?", +list:"L\u00E4nklista", +general_tab:"Generellt", +popup_tab:"Popup", +events_tab:"H\u00E4ndelser", +advanced_tab:"Avancerat", +general_props:"Generella inst\u00E4llningar", +popup_props:"Popup-inst\u00E4llningar", +event_props:"H\u00E4ndelser", +advanced_props:"Avancerade inst\u00E4llningar", +popup_opts:"Inst\u00E4llningar", +anchor_names:"Bokm\u00E4rken", +target_same:"\u00D6ppna i detta f\u00F6nster/ram", +target_parent:"\u00D6ppna i \u00F6verliggande f\u00F6nster/ram", +target_top:"\u00D6ppna i toppramen (ers\u00E4tter alla ramar)", +target_blank:"\u00D6ppna i nytt f\u00F6nster", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"F\u00F6nsternamn", +popup_return:"Infoga 'return false'", +popup_scrollbars:"Rullningslister", +popup_statusbar:"Statusf\u00E4lt", +popup_toolbar:"Verktygsf\u00E4lt", +popup_menubar:"Menyrad", +popup_location:"Adressraden", +popup_resizable:"Skalbart f\u00F6nster", +popup_dependent:"Beroende av (Mozilla/Firefox enbart)", +popup_size:"Storlek", +popup_position:"Position (x/y)", +id:"Id", +style:"Stil", +classes:"Klasser", +target_name:"M\u00E5lnamn", +langdir:"Skriftriktning", +target_langcode:"M\u00E5lspr\u00E5k", +langcode:"Spr\u00E5kkod", +encoding:"Teckenformattering", +mime:"MIME type", +rel:"Relation (rel attribut)", +rev:"Omv\u00E4nd relation (rev)", +tabindex:"Tabbindex", +accesskey:"Snabbtangent", +ltr:"V\u00E4nster till h\u00F6ger", +rtl:"H\u00F6ger till v\u00E4nster", +link_list:"L\u00E4nklista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/si_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/si_dlg.js new file mode 100644 index 00000000..2d2d3f67 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/si_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('si.advlink_dlg',{ +title:"Insert/edit link", +url:"Link URL", +target:"Target", +titlefield:"Title", +is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +list:"Link list", +general_tab:"General", +popup_tab:"Popup", +events_tab:"Events", +advanced_tab:"Advanced", +general_props:"General properties", +popup_props:"Popup properties", +event_props:"Events", +advanced_props:"Advanced properties", +popup_opts:"Options", +anchor_names:"Anchors", +target_same:"Open in this window / frame", +target_parent:"Open in parent window / frame", +target_top:"Open in top frame (replaces all frames)", +target_blank:"Open in new window", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Window name", +popup_return:"Insert 'return false'", +popup_scrollbars:"Show scrollbars", +popup_statusbar:"Show status bar", +popup_toolbar:"Show toolbars", +popup_menubar:"Show menu bar", +popup_location:"Show location bar", +popup_resizable:"Make window resizable", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"Size", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Target name", +langdir:"Language direction", +target_langcode:"Target language", +langcode:"Language code", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Left to right", +rtl:"Right to left", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sk_dlg.js new file mode 100644 index 00000000..babef6e3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sk_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('sk.advlink_dlg',{ +title:"Vlo\u017Ei\u0165/editova\u0165 odkaz", +url:"URL odkazu", +target:"Cie\u013E", +titlefield:"N\u00E1zov", +is_email:"Zd\u00E1 sa, \u017Ee zadan\u00E1 URL je emailov\u00E1 adresa. Chce\u0161 vlo\u017Ei\u0165 povinn\u00FD prefix mailto: ?", +is_external:"Zd\u00E1 sa, \u017Ee zadan\u00E1 URL je extern\u00FD odkaz. Chce\u0161 vlo\u017Ei\u0165 povinn\u00FD prefix http:// ?", +list:"Zoznam odkazov", +general_tab:"Hlavn\u00E9", +popup_tab:"Popup", +events_tab:"Akcie", +advanced_tab:"Roz\u0161\u00EDren\u00E9", +general_props:"Hlavn\u00E9 nastavenia", +popup_props:"Vlastnosti popup okna", +event_props:"Akcie", +advanced_props:"Roz\u0161\u00EDren\u00E9 vlastnosti", +popup_opts:"Vlastnosti", +anchor_names:"Kotvy", +target_same:"Otvor\u00ED\u0165 v rovnakom okne/r\u00E1me", +target_parent:"Otvor\u00ED\u0165 v rodi\u010Dovsk\u00E9m okne/r\u00E1me", +target_top:"Otvori\u0165 v najvy\u0161\u0161om r\u00E1me (prep\u00ED\u0161e v\u0161etky r\u00E1my)", +target_blank:"Otvor\u00ED\u0165 v novom okne", +popup:"JavaScript popup", +popup_url:"Popup URL", +popup_name:"N\u00E1zov okna", +popup_return:"Vlo\u017Ei\u0165 'return false'", +popup_scrollbars:"Zobrazova\u0165 pos\u00FAvn\u00EDky", +popup_statusbar:"Zobrazova\u0165 stavov\u00FD riadok", +popup_toolbar:"Zobrazova\u0165 ovl\u00E1daciu li\u0161tu", +popup_menubar:"Zobrazova\u0165 menu", +popup_location:"Zobrazova\u0165 li\u0161tu umiestnen\u00ED", +popup_resizable:"Povoli\u0165 zmenu ve\u013Eksoti okna", +popup_dependent:"Z\u00E1vislos\u0165 (iba Mozilla/Firefox)", +popup_size:"Ve\u013Ekos\u0165", +popup_position:"Poz\u00EDcia (X/Y)", +id:"ID", +style:"CSS \u0161t\u00FDl", +classes:"Trieda", +target_name:"N\u00E1zov cie\u013Ea", +langdir:"Smer textu", +target_langcode:"Jazyk cie\u013Ea", +langcode:"K\u00F3d jazyka cie\u013Ea", +encoding:"Znakov\u00E9 k\u00F3dovanie cie\u013Ea", +mime:"MIME typ cie\u013Ea", +rel:"Vz\u0165ah str\u00E1nky k cie\u013Eu", +rev:"Vz\u0165ah cie\u013Ea k str\u00E1nke", +tabindex:"Poradie pre tabul\u00E1tor", +accesskey:"Kl\u00E1vesov\u00E1 skratka", +ltr:"Z \u013Eava do prava", +rtl:"Z prava do \u013Eava", +link_list:"Zoznam odkazov" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sl_dlg.js new file mode 100644 index 00000000..4f10e040 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sl_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('sl.advlink_dlg',{ +title:"Vstavi/uredi povezavo", +url:"Naslov URL", +target:"Cilj", +titlefield:"Naslov", +is_email:"Vneseni naslov verjetno prestavlja e-naslov, \u017Eelite da dodam zahtevano predpono \'mailto:\'?", +is_external:"Vneseni naslov verjetno predstavlja zunanjo povezavo, \u017Eelite da dodam zahtevano predpono", +list:"Seznam povezav", +general_tab:"Splo\u0161no", +popup_tab:"Dodatno okno", +events_tab:"Dogodki", +advanced_tab:"Napredno", +general_props:"Splo\u0161ne lastnosti", +popup_props:"Lastnosti okna", +event_props:"Dogodki", +advanced_props:"Napredne lastnosti", +popup_opts:"Mo\u017Enosti", +anchor_names:"Sidra", +target_same:"Odpri v tem oknu / okviru", +target_parent:"Odpri v nadrejenem oknu / okviru", +target_top:"Odpri v vrhnjem okviru (nadomesti vse okvire)", +target_blank:"Odpri v novem oknu", +popup:"Dodatno okno z javascriptom", +popup_url:"Naslov URL okna", +popup_name:"Ime okna", +popup_return:"Vstavi \'return false\'", +popup_scrollbars:"Prika\u017Ei drsnike", +popup_statusbar:"Prika\u017Ei vrstico stanja", +popup_toolbar:"Prika\u017Ei orodjarno", +popup_menubar:"Prika\u017Ei meni", +popup_location:"Prika\u017Ei vrstico naslova", +popup_resizable:"Omogo\u010Di pvoe\u010Devanje okna", +popup_dependent:"Odvisno (le za Mozillo/Firefox)", +popup_size:"Velikost", +popup_position:"Polo\u017Eaj (X/Y)", +id:"Id", +style:"Slog", +classes:"Razredi", +target_name:"Ime cilja", +langdir:"Smer pisave", +target_langcode:"Jezik cilja", +langcode:"Koda jezika", +encoding:"Kodiranje znakov cilja", +mime:"Tip MIME cilja", +rel:"Razmerje strani do cilja", +rev:"Razmerje cilja do strani", +tabindex:"Zap. \u0161t.", +accesskey:"Tipka dostopa", +ltr:"Od leve proti desni", +rtl:"Od desne proti levi", +link_list:"Seznam povezav" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sq_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sq_dlg.js new file mode 100644 index 00000000..745b7df1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sq_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('sq.advlink_dlg',{ +title:"Fut/edito lidhje", +url:"URL e lidhjes", +target:"Sh\u00EBnjestra", +titlefield:"Titulli", +is_email:"Adresa q\u00EB keni futur duket si email. D\u00EBshironi t\u00EB shtoni prefiksin mailto:?", +is_external:"Adresa q\u00EB keni futur duket si lidhje e jashtme. D\u00EBshironi t\u00EB shtoni prefiksin http://?", +list:"Lista e lidhjeve", +general_tab:"T\u00EB P\u00EBrgjithshme", +popup_tab:"Popup", +events_tab:"Ngjarjet", +advanced_tab:"T\u00EB Avancuara", +general_props:"Tipare t\u00EB p\u00EBrgjithshme", +popup_props:"Tiparet e popup", +event_props:"Ngjarjet", +advanced_props:"Tipare t\u00EB avancuara", +popup_opts:"Opsionet", +anchor_names:"Lidhjet", +target_same:"Hape n\u00EB k\u00EBt\u00EB dritare / frame", +target_parent:"Hape n\u00EB dritaren m\u00EBm\u00EB / frame", +target_top:"Hape n\u00EB frame-in e m\u00EBsip\u00EBrm", +target_blank:"Hape n\u00EB dritare t\u00EB re", +popup:"Popup me Javascript", +popup_url:"URL e popup", +popup_name:"Emri i dritares", +popup_return:"Fut 'return false'", +popup_scrollbars:"Shfaq ashensor\u00EBt", +popup_statusbar:"Shfaq shiritin e statusit", +popup_toolbar:"Shfaq butonat", +popup_menubar:"Shfaq menun\u00EB", +popup_location:"Shfaq shiritin e adres\u00EBs", +popup_resizable:"B\u00EBje dritaren t\u00EB zmadhueshme", +popup_dependent:"I varur (vet\u00EBm Mozilla/Firefox)", +popup_size:"Madh\u00EBsia", +popup_position:"Pozicioni (X/Y)", +id:"Id", +style:"Stili", +classes:"Klasat", +target_name:"Emri", +langdir:"Drejtimi i gjuh\u00EBs", +target_langcode:"Gjuha e sh\u00EBnjestr\u00EBs", +langcode:"Kodi i gjuh\u00EBs", +encoding:"Kodimi i karaktereve t\u00EB sh\u00EBnjestr\u00EBs", +mime:"Tipi MIME i sh\u00EBnjestr\u00EBs", +rel:"Marr\u00EBdh\u00EBnia faqe-sh\u00EBnjest\u00EBr", +rev:"Marr\u00EBdh\u00EBnia sh\u00EBnjest\u00EBr-faqe", +tabindex:"Indeksi i Tab", +accesskey:"Butoni i aksesit", +ltr:"Majtas-Djathtas", +rtl:"Djathtas-Majtas", +link_list:"Lista e lidhjeve" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sr_dlg.js new file mode 100644 index 00000000..7ff4d873 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sr_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('sr.advlink_dlg',{ +title:"Umetni/uredi poveznicu", +url:"URL poveznice", +target:"Meta", +titlefield:"Naslov", +is_email:"URL koji ste uneli izgleda kao e-mail adresa, \u017Eelite li dodati potrebni mailto: prefiks?", +is_external:"URL koji ste uneli izgleda kao vanjska poveznica, \u017Eelite li dodati potrebni http:// prefiks?", +list:"Lista poveznica", +general_tab:"Osnovno", +popup_tab:"Popup", +events_tab:"Doga\u0111aj", +advanced_tab:"Napredno", +general_props:"Osnovna svojstva", +popup_props:"Svojstva popup prozora", +event_props:"Doga\u0111aji", +advanced_props:"Napredna svojstva", +popup_opts:"Opcije", +anchor_names:"Sidra", +target_same:"Otovori u novom prozoru / okviru", +target_parent:"Otvori u izvornom prozoru / okvir", +target_top:"Otvori u gornjem okviru (zamjenjuje sve okvire)", +target_blank:"Otvori u novom prozoru", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Ime prozora", +popup_return:"Umetni 'return false'", +popup_scrollbars:"Poka\u017Ei kliza\u010De", +popup_statusbar:"Poka\u017Ei statusnu traku", +popup_toolbar:"Poka\u017Ei alatne trake", +popup_menubar:"Poka\u017Ei izbornik", +popup_location:"Poka\u017Ei traku lokacije", +popup_resizable:"Prozor promjenjive veli\u010Dine", +popup_dependent:"Ovisan (samo za Mozilla/Firefox)", +popup_size:"Veli\u010Dina", +popup_position:"Pozicija (X/Y)", +id:"Id", +style:"Stil", +classes:"Klasa", +target_name:"Ime mete", +langdir:"Smjer jezika", +target_langcode:"Jezik", +langcode:"Kod jezika", +encoding:"Kodiranje znakova", +mime:"MIME tip", +rel:"Odnos stranice prema meti", +rev:"Odnos mete prema stranici", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"S leva na desno", +rtl:"S desna na levo", +link_list:"Lista poveznica" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sv.js deleted file mode 100644 index d17f4e45..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sv.js +++ /dev/null @@ -1,20 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_insert_link_target_same'] = 'Öppna i samma fönster / ram'; -tinyMCELang['lang_insert_link_target_parent'] = 'Öppna i underliggande fönster / ram'; -tinyMCELang['lang_insert_link_target_top'] = 'Öppna i topp ramen (ersätter alla ramar)'; -tinyMCELang['lang_insert_link_target_blank'] = 'Öppna i ett nytt fönster'; -tinyMCELang['lang_insert_link_target_named'] = 'Öppna i ett specifikt fönster'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'Popup URL'; -tinyMCELang['lang_insert_link_popup_name'] = 'Fönstrets namn'; -tinyMCELang['lang_insert_link_popup_return'] = 'Sättin \'return false\''; -tinyMCELang['lang_insert_link_popup_scrollbars'] = 'Visa scrollbars'; -tinyMCELang['lang_insert_link_popup_statusbar'] = 'Visa statusbar'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'Visa toolbars'; -tinyMCELang['lang_insert_link_popup_menubar'] = 'Visa menubar'; -tinyMCELang['lang_insert_link_popup_location'] = 'Visa locationbar'; -tinyMCELang['lang_insert_link_popup_resizable'] = 'Gör fönstret skalbart'; -tinyMCELang['lang_insert_link_popup_size'] = 'Storlek'; -tinyMCELang['lang_insert_link_popup_position'] = 'Position (X/Y)'; -tinyMCELang['lang_insert_link_popup_missingtarget'] = 'Var god skriv ett namn för målet eller välj ett annat val.'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sv_dlg.js new file mode 100644 index 00000000..06f6b0a1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/sv_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('sv.advlink_dlg',{ +title:"Infoga/redigera l\u00E4nk", +url:"L\u00E4nkens URL", +target:"M\u00E5l", +titlefield:"Titel", +is_email:"L\u00E4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00E5 l\u00E4nken?", +is_external:"L\u00E4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00E5 l\u00E4nken?", +list:"L\u00E4nklista", +general_tab:"Generellt", +popup_tab:"Popup", +events_tab:"H\u00E4ndelser", +advanced_tab:"Avancerat", +general_props:"Generella inst\u00E4llningar", +popup_props:"Popup-inst\u00E4llningar", +event_props:"H\u00E4ndelser", +advanced_props:"Avancerade inst\u00E4llningar", +popup_opts:"Inst\u00E4llningar", +anchor_names:"Bokm\u00E4rken", +target_same:"\u00D6ppna i detta f\u00F6nster/ram", +target_parent:"\u00D6ppna i \u00F6verliggande f\u00F6nster/ram", +target_top:"\u00D6ppna i toppramen (ers\u00E4tter alla ramar)", +target_blank:"\u00D6ppna i nytt f\u00F6nster", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"F\u00F6nsternamn", +popup_return:"Infoga 'return false'", +popup_scrollbars:"Rullningslister", +popup_statusbar:"Statusf\u00E4lt", +popup_toolbar:"Verktygsf\u00E4lt", +popup_menubar:"Menyrad", +popup_location:"Adressraden", +popup_resizable:"Skalbart f\u00F6nster", +popup_dependent:"Beroende av (Mozilla/Firefox enbart)", +popup_size:"Storlek", +popup_position:"Position (x/y)", +id:"Id", +style:"Stil", +classes:"Klasser", +target_name:"M\u00E5lnamn", +langdir:"Skriftriktning", +target_langcode:"M\u00E5lspr\u00E5k", +langcode:"Spr\u00E5kkod", +encoding:"Teckenformattering", +mime:"MIME type", +rel:"Relation (rel attribut)", +rev:"Omv\u00E4nd relation (rev)", +tabindex:"Tabbindex", +accesskey:"Snabbtangent", +ltr:"V\u00E4nster till h\u00F6ger", +rtl:"H\u00F6ger till v\u00E4nster", +link_list:"L\u00E4nklista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tr_dlg.js new file mode 100644 index 00000000..83a83d53 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tr_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('tr.advlink_dlg',{ +title:"Ba\u011Flant\u0131 ekle/d\u00FCzenle", +url:"Ba\u011Flant\u0131 URL", +target:"Hedef", +titlefield:"Ba\u015Fl\u0131k", +is_email:"Girdi\u011Finiz URL bir e-posta adresi gibi g\u00F6z\u00FCk\u00FCyor, gerekli olan mailto: \u00F6nekinin eklenmesini ister misiniz?", +is_external:"Girdi\u011Finiz URL d\u0131\u015F bir ba\u011Flant\u0131 gibi g\u00F6z\u00FCk\u00FCyor, gerekli olan http:// \u00F6nekinin eklenmesini ister misiniz?", +list:"Link list", +general_tab:"General", +popup_tab:"A\u00E7\u0131lma", +events_tab:"Olaylar", +advanced_tab:"Geli\u015Fmi\u015F", +general_props:"Genel \u00F6zellikler", +popup_props:"A\u00E7\u0131l\u0131r pencere \u00F6zellikleri", +event_props:"Olaylar", +advanced_props:"Geli\u015Fmi\u015F \u00F6zellikler", +popup_opts:"Se\u00E7enekler", +anchor_names:"\u00C7engel noktalar\u0131", +target_same:"Bu pencere/\u00E7er\u00E7evede a\u00E7", +target_parent:"Ata pencere/\u00E7evrede a\u00E7", +target_top:"\u00DCst \u00E7er\u00E7evede a\u00E7 (t\u00FCm \u00E7er\u00E7eveleri de\u011Fi\u015Ftirir)", +target_blank:"Yeni pencerede a\u00E7", +popup:"Javascript a\u00E7\u0131l\u0131r pencere", +popup_url:"A\u00E7\u0131lacak URL", +popup_name:"Pencere ismi", +popup_return:"'return false' ekle", +popup_scrollbars:"Kayd\u0131rma \u00E7ubuklar\u0131n\u0131 g\u00F6ster", +popup_statusbar:"Durum \u00E7ubu\u011Funu g\u00F6ster", +popup_toolbar:"Ara\u00E7 \u00E7ubuklar\u0131n\u0131 g\u00F6ster", +popup_menubar:"Men\u00FC \u00E7ubu\u011Funu g\u00F6ster", +popup_location:"Konum \u00E7ubu\u011Funu g\u00F6ster", +popup_resizable:"Pencereyi boyutlanabilir yap", +popup_dependent:"Ba\u011F\u0131ml\u0131 (sadece Mozilla/Firefox)", +popup_size:"Boyut", +popup_position:"Konum (X/Y)", +id:"Id", +style:"Stil", +classes:"S\u0131n\u0131flar", +target_name:"Hedef ismi", +langdir:"Dil y\u00F6nelimi", +target_langcode:"Hedef dil", +langcode:"Dil kodu", +encoding:"Hedef karakter kodlamas\u0131", +mime:"Hedef MIME tipi", +rel:"Sayfadan hedefe ili\u015Fki", +rev:"Hedeften sayfaya ili\u015Fki", +tabindex:"Sekme indeksi", +accesskey:"Eri\u015Fim tu\u015Fu", +ltr:"Soldan sa\u011Fa", +rtl:"Sa\u011Fdan sola", +link_list:"Ba\u011Flant\u0131 listesi" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tt_dlg.js new file mode 100644 index 00000000..f69dbfda --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tt_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('tt.advlink_dlg',{ +title:"\u63D2\u5165/\u7DE8\u8F2F \u9023\u7D50", +url:"\u9023\u7D50\u5730\u5740", +target:"\u76EE\u6A19", +titlefield:"\u641C\u5C0B", +is_email:"\u60A8\u8F38\u5165\u7684\u61C9\u8A72\u662F\u4E00\u500B\u96FB\u5B50\u90F5\u4EF6\u5730\u5740\uFF0C\u662F\u5426\u9700\u8981\u5728\u7DB2\u5740\u524D\u52A0\u4E0A mailto: ? ", +is_external:"\u60A8\u8F38\u5165\u7684\u7DB2\u5740\u61C9\u8A72\u662F\u4E00\u500B\u5916\u90E8\u9023\u7D50\uFF0C\u662F\u5426\u9700\u8981\u5728\u7DB2\u5740\u524D\u52A0\u4E0A http:// ?", +list:"\u9023\u7D50\u6E05\u55AE", +general_tab:"\u57FA\u672C", +popup_tab:"\u5FEB\u986F\u7A97\u53E3", +events_tab:"\u4E8B\u4EF6", +advanced_tab:"\u9032\u968E", +general_props:"\u57FA\u672C\u5C6C\u6027", +popup_props:"\u5FEB\u986F\u8996\u7A97\u5C6C\u6027", +event_props:"\u4E8B\u4EF6", +advanced_props:"\u9032\u968E\u5C6C\u6027", +popup_opts:"\u9078\u9805", +anchor_names:"\u9328\u9EDE", +target_same:"\u5728\u7576\u524D\u7A97\u53E3\u6253\u958B", +target_parent:"\u5728\u7236\u7A97\u53E3\u6253\u958B", +target_top:"\u5728\u9802\u5C64\u7A97\u53E3\u6253\u958B", +target_blank:"\u5728\u65B0\u7A97\u53E3\u6253\u958B", +popup:"Javascript \u5FEB\u986F\u7A97\u53E3", +popup_url:"\u5F48\u51FA\u7A97\u53E3\u4F4D\u5740", +popup_name:"\u7A97\u53E3\u540D\u7A31", +popup_return:"\u63D2\u5165 'return false'", +popup_scrollbars:"\u986F\u793A\u6372\u8EF8", +popup_statusbar:"\u986F\u793A\u72C0\u614B\u5217", +popup_toolbar:"\u986F\u793A\u5DE5\u5177\u5217", +popup_menubar:"\u986F\u793A\u529F\u80FD\u8868\u5217", +popup_location:"\u986F\u793A\u4F4D\u5740\u6B04", +popup_resizable:"\u53EF\u8ABF\u6574\u7A97\u53E3\u5927\u5C0F", +popup_dependent:"\u5F9E\u5C6C\u65BC ( \u50C5 Mozilla/Firefox \u6709\u6548 )", +popup_size:"\u5927\u5C0F", +popup_position:"\u5EA7\u6A19 (X/Y)", +id:"Id", +style:"\u6A23\u5F0F", +classes:"\u6A23\u5F0F\u985E", +target_name:"\u76EE\u6A19\u540D\u7A31", +langdir:"\u8A9E\u8A00\u66F8\u5BEB\u65B9\u5411", +target_langcode:"\u76EE\u7684\u8A9E\u8A00", +langcode:"\u8A9E\u8A00\u7DE8\u78BC", +encoding:"\u76EE\u7684\u8A9E\u8A00\u7DE8\u78BC", +mime:"\u76EE\u6A19 MIME \u985E\u578B", +rel:"rel", +rev:"rev", +tabindex:"Tab\u7D22\u5F15", +accesskey:"\u5FEB\u901F\u9375", +ltr:"\u5F9E\u5DE6\u5230\u53F3", +rtl:"\u5F9E\u53F3\u5230\u5DE6", +link_list:"\u9023\u7D50\u6E05\u55AE" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tw_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tw_dlg.js new file mode 100644 index 00000000..c743cce6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/tw_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('tw.advlink_dlg',{ +title:"\u63D2\u5165/\u7DE8\u8F2F\u93C8\u7D50", +url:"\u93C8\u7D50\u4F4D\u5740", +target:"\u76EE\u6A19", +titlefield:"\u67E5\u627E", +is_email:"\u60A8\u8F38\u5165\u7684\u7DB2\u5740\u61C9\u8A72\u662F\u4E00\u500B\u96FB\u5B50\u90F5\u4EF6\u4F4D\u5740\uFF0C\u662F\u5426\u9700\u8981\u5728\u90F5\u5740\u524D\u65B9\u52A0\u5165mailto:\uFF1F", +is_external:"\u60A8\u8F38\u5165\u7684\u7DB2\u5740\u61C9\u8A72\u662F\u4E00\u500B\u5916\u90E8\u93C8\u7D50\uFF0C\u662F\u5426\u9700\u8981\u5728\u7DB2\u5740\u524D\u65B9\u52A0\u5165http://\uFF1F", +list:"\u93C8\u7D50\u6E05\u55AE", +general_tab:"\u4E00\u822C", +popup_tab:"\u5F48\u51FA\u7A97\u53E3", +events_tab:"\u4E8B\u4EF6", +advanced_tab:"\u9AD8\u7D1A", +general_props:"\u4E00\u822C\u5C6C\u6027", +popup_props:"\u5F48\u51FA\u8996\u7A97\u5C6C\u6027", +event_props:"\u4E8B\u4EF6", +advanced_props:"\u9AD8\u7D1A\u5C6C\u6027", +popup_opts:"\u9078\u9805", +anchor_names:"\u9328\u9EDE", +target_same:"\u6253\u958B\u5728\u65B0\u8996\u7A97/\u6846\u67B6", +target_parent:"\u6253\u958B\u5728\u7236\u8996\u7A97/\u6846\u67B6", +target_top:"\u6253\u958B\u5728\u6700\u4E0A\u5C64\u7684\u6846\u67B6(\u66FF\u63DB\u6240\u6709\u6846\u67B6)", +target_blank:"\u6253\u958B\u5728\u65B0\u8996\u7A97", +popup:"Javascript\u5F48\u51FA\u7A97\u53E3", +popup_url:"\u5F48\u51FA\u7A97\u53E3\u7DB2\u5740", +popup_name:"\u7A97\u53E3\u540D\u7A31", +popup_return:"\u63D2\u5165'return false'", +popup_scrollbars:"\u986F\u793A\u908A\u689D", +popup_statusbar:"\u986F\u793A\u72C0\u614B\u6B04", +popup_toolbar:"\u986F\u793A\u5DE5\u5177\u5217", +popup_menubar:"\u986F\u793A\u529F\u80FD\u8868", +popup_location:"\u986F\u793A\u7DB2\u5740\u5217", +popup_resizable:"\u53EF\u8ABF\u6574\u8996\u7A97\u5C3A\u5BF8", +popup_dependent:"\u5F9E\u5C6C(\u53EA\u6709Mozilla/Firefox\u6709\u6548)", +popup_size:"\u5C3A\u5BF8", +popup_position:"\u5EA7\u6A19(X/Y)", +id:"Id", +style:"\u6A23\u5F0F", +classes:"\u985E\u578B", +target_name:"\u76EE\u6A19\u540D\u7A31", +langdir:"\u8A9E\u8A00\u66F8\u5BEB\u65B9\u5411", +target_langcode:"\u76EE\u7684\u8A9E\u8A00", +langcode:"\u8A9E\u8A00\u7DE8\u78BC", +encoding:"\u7DE8\u78BC", +mime:"\u76EE\u6A19MIME\u985E\u578B", +rel:"\u9801\u5230\u76EE\u6A19\u7684\u95DC\u4FC2", +rev:"\u76EE\u6A19\u5230\u9801\u7684\u95DC\u4FC2", +tabindex:"Tab\u7D22\u5F15", +accesskey:"\u5FEB\u6377\u9375", +ltr:"\u7531\u5DE6\u5230\u53F3", +rtl:"\u7531\u53F3\u5230\u5DE6", +link_list:"\u93C8\u7D50\u6E05\u55AE" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/uk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/uk_dlg.js new file mode 100644 index 00000000..fb261878 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/uk_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('uk.advlink_dlg',{ +title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F", +url:"\u0410\u0434\u0440\u0435\u0441\u0430", +target:"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u0432...", +titlefield:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +is_email:"\u0412\u0432\u0435\u0434\u0435\u043D\u0438\u0439 URL \u0441\u0445\u043E\u0436\u0438\u0439 \u043D\u0430 email \u0430\u0434\u0440\u0435\u0441\u0443, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043E\u0434\u0430\u0442\u0438 \u043D\u0435\u043E\u0431\u0445\u0456\u0434\u043D\u0438\u0439 \u043F\u0440\u0435\u0444\u0456\u043A\u0441 mailto?", +is_external:"\u0412\u0432\u0435\u0434\u0435\u043D\u0438\u0439 URL \u0441\u0445\u043E\u0436\u0438\u0439 \u043D\u0430 \u0437\u043E\u0432\u043D\u0456\u0448\u043D\u0454 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043E\u0434\u0430\u0442\u0438 \u043D\u0435\u043E\u0431\u0445\u0456\u0434\u043D\u0438\u0439 \u043F\u0440\u0435\u0444\u0456\u043A\u0441 http://?", +list:"\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u044C", +general_tab:"\u0417\u0430\u0433\u0430\u043B\u044C\u043D\u0435", +popup_tab:"Popup", +events_tab:"\u041F\u043E\u0434\u0456\u0457", +advanced_tab:"\u0414\u043E\u0434\u0430\u0442\u043A\u043E\u0432\u043E", +general_props:"\u0417\u0430\u0433\u0430\u043B\u044C\u043D\u0456 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456", +popup_props:"\u0412\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456 Popup", +event_props:"\u041F\u043E\u0434\u0456\u0457", +advanced_props:"\u0420\u043E\u0437\u0448\u0438\u0440\u0435\u043D\u043D\u0456 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456", +popup_opts:"\u0412\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456", +anchor_names:"\u042F\u043A\u043E\u0440\u0456", +target_same:"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u0432 \u0446\u044C\u043E\u043C\u0443 \u0436 \u0432\u0456\u043A\u043D\u0456 / \u0444\u0440\u0435\u0439\u043C\u0456", +target_parent:"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u0432 \u0431\u0430\u0442\u044C\u043A\u0456\u0432\u0441\u044C\u043A\u043E\u043C\u0443 \u0432\u0456\u043A\u043D\u0456 / \u0444\u0440\u0435\u0439\u043C\u0456", +target_top:"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u0443 \u0432\u0435\u0440\u0445\u043D\u044C\u043E\u043C\u0443 \u0444\u0440\u0435\u0439\u043C\u0456 (\u0437\u0430\u043C\u0456\u043D\u0438\u0442\u0438 \u0432\u0441\u0456 \u0444\u0440\u0435\u0439\u043C\u0438)", +target_blank:"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u0432 \u043D\u043E\u0432\u043E\u043C\u0443 \u0432\u0456\u043A\u043D\u0456", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"\u041D\u0430\u0437\u0432\u0430 \u0432\u0456\u043A\u043D\u0430", +popup_return:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 'return false'", +popup_scrollbars:"\u041F\u043E\u043A\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u043A\u0440\u043E\u043B\u0435\u0440\u0438", +popup_statusbar:"\u041F\u043E\u043A\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441", +popup_toolbar:"\u041F\u043E\u043A\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u0456 \u0456\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0456\u0432", +popup_menubar:"\u041F\u043E\u043A\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043C\u0435\u043D\u044E", +popup_location:"\u041F\u043E\u043A\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043F\u0430\u043D\u0435\u043B\u044C location", +popup_resizable:"\u0414\u043E\u0437\u0432\u043E\u043B\u044F\u0442\u0438 \u0437\u043C\u0456\u043D\u044E\u0432\u0430\u0442\u0438 \u0440\u043E\u0437\u043C\u0456\u0440", +popup_dependent:"Dependent (\u043B\u0438\u0448\u0435 \u0434\u043B\u044F Mozilla/Firefox)", +popup_size:"\u0420\u043E\u0437\u043C\u0456\u0440", +popup_position:"\u041F\u043E\u0437\u0438\u0446\u0456\u044F (X/Y)", +id:"Id", +style:"\u0421\u0442\u0438\u043B\u044C", +classes:"\u041A\u043B\u0430\u0441\u0438", +target_name:"Target name", +langdir:"\u041D\u0430\u043F\u0440\u044F\u043C \u043C\u043E\u0432\u0438", +target_langcode:"Target language", +langcode:"\u041A\u043E\u0434 \u043C\u043E\u0432\u0438", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"\u0417\u043B\u0456\u0432\u0430 \u043F\u0440\u0430\u0432\u043E\u0440\u0443\u0447", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043B\u0456\u0432\u043E\u0440\u0443\u0447", +link_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u044C" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/vi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/vi_dlg.js new file mode 100644 index 00000000..f5ce67f6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/vi_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('vi.advlink_dlg',{ +title:"Ch\u00E8n/thay \u0111\u1ED5i li\u00EAn k\u1EBFt", +url:"Li\u00EAn k\u1EBFt", +target:"C\u1EEDa s\u1ED5 m\u1EDF li\u00EAn k\u1EBFt", +titlefield:"Tooltip", +is_email:"\u0110\u1ECBa ch\u1EC9 li\u00EAn k\u1EBFt g\u1EA7n gi\u1ED1ng \u0111\u1ECBnh d\u1EA1ng c\u1EE7a email, b\u1EA1n c\u00F3 mu\u1ED1n chuy\u1EC3n th\u00E0nh li\u00EAn k\u1EBFt email?", +is_external:"\u0110\u1ECBa ch\u1EC9 li\u00EAn k\u1EBFt c\u1EE7a b\u1EA1n d\u1EABn \u0111\u1EBFn m\u1ED9t \u0111\u1ECBa ch\u1EC9 ngo\u00E0i h\u1EC7 th\u1ED1ng, b\u1EA1n c\u00F3 mu\u1ED1n t\u1EF1 \u0111\u1ED9ng th\u00EAm chu\u1ED1i \"http://\" v\u00E0o tr\u01B0\u1EDBc li\u00EAn k\u1EBFt kh\u00F4ng ?", +list:"Link list", +general_tab:"C\u01A1 b\u1EA3n", +popup_tab:"Popup", +events_tab:"Events", +advanced_tab:"N\u00E2ng cao", +general_props:"T\u00F9y ch\u1ECDn c\u01A1 b\u1EA3n", +popup_props:"T\u00F9y ch\u1ECDn popup", +event_props:"Events", +advanced_props:"T\u00F9y ch\u1ECDn n\u00E2ng cao", +popup_opts:"Options", +anchor_names:"\u0110i\u1EC3m d\u00E1nh d\u1EA5u", +target_same:"M\u1EDF trong c\u1EEDa s\u1ED5/khung hi\u1EC7n t\u1EA1i", +target_parent:"M\u1EDF trong c\u1EEDa s\u1ED5/khung ch\u1EE9a c\u1EEDa s\u1ED5 n\u00E0y", +target_top:"M\u1EDF trong khung \u1EDF tr\u00EAn c\u00F9ng (thay th\u1EBF t\u1EA5t c\u1EA3 c\u00E1c khung)", +target_blank:"M\u1EDF trong c\u1EEDa s\u1ED5 m\u1EDBi", +popup:"Javascript popup", +popup_url:"Popup URL", +popup_name:"Window name", +popup_return:"Insert 'return false'", +popup_scrollbars:"Show scrollbars", +popup_statusbar:"Show status bar", +popup_toolbar:"Show toolbars", +popup_menubar:"Show menu bar", +popup_location:"Show location bar", +popup_resizable:"Make window resizable", +popup_dependent:"Dependent (Mozilla/Firefox only)", +popup_size:"Size", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Target name", +langdir:"Language direction", +target_langcode:"Target language", +langcode:"Language code", +encoding:"Target character encoding", +mime:"Target MIME type", +rel:"Relationship page to target", +rev:"Relationship target to page", +tabindex:"Tabindex", +accesskey:"Accesskey", +ltr:"Left to right", +rtl:"Right to left", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/zh_cn.js deleted file mode 100644 index 84c27bea..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/zh_cn.js +++ /dev/null @@ -1,20 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_insert_link_target_same'] = 'ÔÚ±¾´°¿Ú/¿ò¼ÜÖдò¿ª'; -tinyMCELang['lang_insert_link_target_parent'] = 'ÔÚ¸¸´°¿Ú/¿ò¼ÜÖдò¿ª'; -tinyMCELang['lang_insert_link_target_top'] = 'ÔÚ¸ù¿ò¼ÜÖдò¿ª£¨Ìæ»»ËùÓпò¼Ü£©'; -tinyMCELang['lang_insert_link_target_blank'] = 'ÔÚд°¿ÚÖдò¿ª'; -tinyMCELang['lang_insert_link_target_named'] = 'ÔÚ´Ë´°¿ÚÖдò¿ª'; -tinyMCELang['lang_insert_link_popup'] = 'JS-Popup'; -tinyMCELang['lang_insert_link_popup_url'] = 'µ¯³ö´°¿ÚµØÖ·'; -tinyMCELang['lang_insert_link_popup_name'] = '´°¿ÚÃû³Æ'; -tinyMCELang['lang_insert_link_popup_return'] = '²åÈë \'return false\''; -tinyMCELang['lang_insert_link_popup_scrollbars'] = 'ÏÔʾ¹ö¶¯Ìõ'; -tinyMCELang['lang_insert_link_popup_statusbar'] = 'ÏÔʾ״̬À¸'; -tinyMCELang['lang_insert_link_popup_toolbar'] = 'ÏÔʾ¹¤¾ßÀ¸'; -tinyMCELang['lang_insert_link_popup_menubar'] = 'ÏÔʾ²Ëµ¥À¸'; -tinyMCELang['lang_insert_link_popup_location'] = 'ÏÔʾµØÖ·À¸'; -tinyMCELang['lang_insert_link_popup_resizable'] = '¿ÉÖض¨Òå´°¿Ú´óС'; -tinyMCELang['lang_insert_link_popup_size'] = '³ß´ç'; -tinyMCELang['lang_insert_link_popup_position'] = 'λÖÃ(X/Y)'; -tinyMCELang['lang_insert_link_popup_missingtarget'] = 'Çë²åÈëÄ¿±êÃû³Æ»òÕßÑ¡ÔñÁíÍâµÄÑ¡Ïî¡£'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/zh_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/zh_dlg.js new file mode 100644 index 00000000..99279948 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/langs/zh_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('zh.advlink_dlg',{ +title:"\u63D2\u5165/\u7F16\u8F91\u94FE\u63A5", +url:"\u94FE\u63A5\u5730\u5740", +target:"\u76EE\u6807", +titlefield:"\u67E5\u627E", +is_email:"\u60A8\u8F93\u5165\u7684\u7F51\u5740\u5E94\u8BE5\u662F\u4E00\u4E2A\u7535\u5B50\u90AE\u4EF6\u5730\u5740\uFF0C\u662F\u5426\u9700\u8981\u5728\u90AE\u5740\u524D\u65B9\u52A0\u5165mailto:\uFF1F", +is_external:"\u60A8\u8F93\u5165\u7684\u7F51\u5740\u5E94\u8BE5\u662F\u4E00\u4E2A\u5916\u90E8\u94FE\u63A5\uFF0C\u662F\u5426\u9700\u8981\u5728\u7F51\u5740\u524D\u65B9\u52A0\u5165http://\uFF1F", +list:"\u94FE\u63A5\u6E05\u5355", +general_tab:"\u4E00\u822C", +popup_tab:"\u5F39\u51FA\u7A97\u53E3", +events_tab:"\u4E8B\u4EF6", +advanced_tab:"\u9AD8\u7EA7", +general_props:"\u4E00\u822C\u5C5E\u6027", +popup_props:"\u5F39\u51FA\u7A97\u53E3\u5C5E\u6027", +event_props:"\u4E8B\u4EF6", +advanced_props:"\u9AD8\u7EA7\u5C5E\u6027", +popup_opts:"\u9009\u9879", +anchor_names:"\u951A\u70B9", +target_same:"\u6253\u5F00\u5728\u65B0\u7A97\u53E3/\u6846\u67B6", +target_parent:"\u6253\u5F00\u5728\u7236\u7A97\u53E3/\u6846\u67B6", +target_top:"\u6253\u5F00\u5728\u6700\u4E0A\u5C42\u7684\u6846\u67B6(\u66FF\u6362\u6240\u6709\u6846\u67B6)", +target_blank:"\u6253\u5F00\u5728\u65B0\u7A97\u53E3", +popup:"Javascript\u5F39\u51FA\u7A97\u53E3", +popup_url:"\u5F39\u51FA\u7A97\u53E3\u7F51\u5740", +popup_name:"\u7A97\u53E3\u540D\u79F0", +popup_return:"\u63D2\u5165'return false'", +popup_scrollbars:"\u663E\u793A\u8FB9\u6761", +popup_statusbar:"\u663E\u793A\u72B6\u6001\u533A", +popup_toolbar:"\u663E\u793A\u5DE5\u5177\u5217", +popup_menubar:"\u663E\u793A\u83DC\u5355", +popup_location:"\u663E\u793A\u7F51\u5740\u5217", +popup_resizable:"\u53EF\u8C03\u6574\u7A97\u53E3\u5C3A\u5BF8", +popup_dependent:"\u4ECE\u5C5E(\u53EA\u6709Mozilla/Firefox\u6709\u6548)", +popup_size:"\u5C3A\u5BF8", +popup_position:"\u5750\u6807(X/Y)", +id:"Id", +style:"\u6837\u5F0F", +classes:"\u7C7B\u578B", +target_name:"\u76EE\u6807\u540D\u79F0", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +target_langcode:"\u76EE\u6807\u8BED\u8A00", +langcode:"\u8BED\u8A00\u7F16\u7801", +encoding:"\u7F16\u7801", +mime:"\u76EE\u6807MIME\u7C7B\u578B", +rel:"\u9875\u5230\u76EE\u6807\u7684\u5173\u7CFB", +rev:"\u76EE\u6807\u5230\u9875\u7684\u5173\u7CFB", +tabindex:"Tab\u7D22\u5F15", +accesskey:"\u5FEB\u6377\u952E", +ltr:"\u7531\u5DE6\u5230\u53F3", +rtl:"\u7531\u53F3\u5230\u5DE6", +link_list:"\u94FE\u63A5\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm index ba0f76c6..f46e8f83 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm +++ b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm @@ -1,421 +1,339 @@ - - - - -{$lang_insert_link_title} - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang_insert_link_title}
{$lang_insert_link_url}: - - - - -
{$lang_theme_insert_link_titlefield}:
{$lang_insert_link_target}: - - - - - - - - - - - - - - - - - - - - - -
 ({$lang_insert_link_target_same})
 ({$lang_insert_link_target_parent})
 ({$lang_insert_link_target_top})
 ({$lang_insert_link_target_blank})
- - - - - - -
 
-
- - - - - - - - - - - - - - - - - -
{$lang_insert_link_popup_url}: 
{$lang_insert_link_popup_name}: 
{$lang_insert_link_popup_size}:  - x - px -
{$lang_insert_link_popup_position}:  - / - (c /c = center) -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
 
   
 
-
-
- - + + + + {#advlink_dlg.title} + + + + + + + + + +
+ + +
+
+
+ {#advlink_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
 
 
 
 
+ +
+
+
+ + + +
+
+ {#advlink_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+
+ +
+
+ {#advlink_dlg.event_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/advlink/readme.txt deleted file mode 100644 index ab554efc..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/advlink/readme.txt +++ /dev/null @@ -1,19 +0,0 @@ - Advlink plugin for TinyMCE ------------------------------ - -About: - This is a more advanced link dialog mostly based on code contributed by Michael Keck. - This one supports popup windows and targets. - -Installation instructions: - * Copy the advlink directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "advlink". - * Add this "a[name|href|target|title|onclick]" to extended_valid_elements option. - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "advlink", - extended_valid_elements : "a[name|href|target|title|onclick]" - }); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js new file mode 100644 index 00000000..01a994ee --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.AutoSavePlugin',{init:function(ed,url){var t=this;t.editor=ed;window.onbeforeunload=tinymce.plugins.AutoSavePlugin._beforeUnloadHandler;},getInfo:function(){return{longname:'Auto save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',version:tinymce.majorVersion+"."+tinymce.minorVersion};},'static':{_beforeUnloadHandler:function(){var msg;tinymce.each(tinyMCE.editors,function(ed){if(ed.getParam("fullscreen_is_enabled"))return;if(ed.isDirty()){msg=ed.getLang("autosave.unload_msg");return false;}});return msg;}}});tinymce.PluginManager.add('autosave',tinymce.plugins.AutoSavePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js new file mode 100644 index 00000000..3c4325ab --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js @@ -0,0 +1,51 @@ +/** + * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.AutoSavePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + window.onbeforeunload = tinymce.plugins.AutoSavePlugin._beforeUnloadHandler; + }, + + getInfo : function() { + return { + longname : 'Auto save', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private plugin internal methods + + 'static' : { + _beforeUnloadHandler : function() { + var msg; + + tinymce.each(tinyMCE.editors, function(ed) { + if (ed.getParam("fullscreen_is_enabled")) + return; + + if (ed.isDirty()) { + msg = ed.getLang("autosave.unload_msg"); + return false; + } + }); + + return msg; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSavePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js new file mode 100644 index 00000000..88f7ea65 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.BBCodePlugin',{init:function(ed,url){var t=this,dialect=ed.getParam('bbcode_dialect','punbb').toLowerCase();ed.onBeforeSetContent.add(function(ed,o){o.content=t['_'+dialect+'_bbcode2html'](o.content);});ed.onPostProcess.add(function(ed,o){if(o.set)o.content=t['_'+dialect+'_bbcode2html'](o.content);if(o.get)o.content=t['_'+dialect+'_html2bbcode'](o.content);});},getInfo:function(){return{longname:'BBCode Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_punbb_html2bbcode:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str);};rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]");rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]");rep(/(.*?)<\/font>/gi,"[color=$1]$2[/color]");rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]");rep(/(.*?)<\/font>/gi,"$1");rep(//gi,"[img]$1[/img]");rep(/(.*?)<\/span>/gi,"[code]$1[/code]");rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]");rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");rep(/<\/(strong|b)>/gi,"[/b]");rep(/<(strong|b)>/gi,"[b]");rep(/<\/(em|i)>/gi,"[/i]");rep(/<(em|i)>/gi,"[i]");rep(/<\/u>/gi,"[/u]");rep(/(.*?)<\/span>/gi,"[u]$1[/u]");rep(//gi,"[u]");rep(/]*>/gi,"[quote]");rep(/<\/blockquote>/gi,"[/quote]");rep(/
/gi,"\n");rep(//gi,"\n");rep(/
/gi,"\n");rep(/

/gi,"");rep(/<\/p>/gi,"\n");rep(/ /gi," ");rep(/"/gi,"\"");rep(/</gi,"<");rep(/>/gi,">");rep(/&/gi,"&");return s;},_punbb_bbcode2html:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str);};rep(/\n/gi,"
");rep(/\[b\]/gi,"");rep(/\[\/b\]/gi,"");rep(/\[i\]/gi,"");rep(/\[\/i\]/gi,"");rep(/\[u\]/gi,"");rep(/\[\/u\]/gi,"");rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2");rep(/\[url\](.*?)\[\/url\]/gi,"$1");rep(/\[img\](.*?)\[\/img\]/gi,"");rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2");rep(/\[code\](.*?)\[\/code\]/gi,"$1 ");rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 ");return s;}});tinymce.PluginManager.add('bbcode',tinymce.plugins.BBCodePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js new file mode 100644 index 00000000..1d7493e2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -0,0 +1,117 @@ +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.BBCodePlugin', { + init : function(ed, url) { + var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase(); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t['_' + dialect + '_bbcode2html'](o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t['_' + dialect + '_bbcode2html'](o.content); + + if (o.get) + o.content = t['_' + dialect + '_html2bbcode'](o.content); + }); + }, + + getInfo : function() { + return { + longname : 'BBCode Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + // HTML -> BBCode in PunBB dialect + _punbb_html2bbcode : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: to [b] + rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"); + rep(/(.*?)<\/font>/gi,"$1"); + rep(//gi,"[img]$1[/img]"); + rep(/(.*?)<\/span>/gi,"[code]$1[/code]"); + rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]"); + rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"); + rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"); + rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"); + rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"); + rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"); + rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"); + rep(/<\/(strong|b)>/gi,"[/b]"); + rep(/<(strong|b)>/gi,"[b]"); + rep(/<\/(em|i)>/gi,"[/i]"); + rep(/<(em|i)>/gi,"[i]"); + rep(/<\/u>/gi,"[/u]"); + rep(/(.*?)<\/span>/gi,"[u]$1[/u]"); + rep(//gi,"[u]"); + rep(/]*>/gi,"[quote]"); + rep(/<\/blockquote>/gi,"[/quote]"); + rep(/
/gi,"\n"); + rep(//gi,"\n"); + rep(/
/gi,"\n"); + rep(/

/gi,""); + rep(/<\/p>/gi,"\n"); + rep(/ /gi," "); + rep(/"/gi,"\""); + rep(/</gi,"<"); + rep(/>/gi,">"); + rep(/&/gi,"&"); + + return s; + }, + + // BBCode -> HTML from PunBB dialect + _punbb_bbcode2html : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: [b] to + rep(/\n/gi,"
"); + rep(/\[b\]/gi,""); + rep(/\[\/b\]/gi,""); + rep(/\[i\]/gi,""); + rep(/\[\/i\]/gi,""); + rep(/\[u\]/gi,""); + rep(/\[\/u\]/gi,""); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); + rep(/\[url\](.*?)\[\/url\]/gi,"$1"); + rep(/\[img\](.*?)\[\/img\]/gi,""); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); + rep(/\[code\](.*?)\[\/code\]/gi,"$1 "); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 "); + + return s; + } + }); + + // Register plugin + tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/compat2x/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/compat2x/editor_plugin.js new file mode 100644 index 00000000..02a1da8b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/compat2x/editor_plugin.js @@ -0,0 +1 @@ +(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.Compat2x',{getInfo:function(){return{longname:'Compat2x',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/compat2x',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};}});(function(){tinymce.extend(tinyMCE,{addToLang:function(p,l){each(l,function(v,k){tinyMCE.i18n[(tinyMCE.settings.language||'en')+'.'+(p?p+'_':'')+k]=v;});},getInstanceById:function(n){return this.get(n);}});})();(function(){var EditorManager=tinymce.EditorManager;tinyMCE.instances={};tinyMCE.plugins={};tinymce.PluginManager.onAdd.add(function(pm,n,p){tinyMCE.plugins[n]=p;});tinyMCE.majorVersion=tinymce.majorVersion;tinyMCE.minorVersion=tinymce.minorVersion;tinyMCE.releaseDate=tinymce.releaseDate;tinyMCE.baseURL=tinymce.baseURL;tinyMCE.isIE=tinyMCE.isMSIE=tinymce.isIE||tinymce.isOpera;tinyMCE.isMSIE5=tinymce.isIE;tinyMCE.isMSIE5_0=tinymce.isIE;tinyMCE.isMSIE7=tinymce.isIE;tinyMCE.isGecko=tinymce.isGecko;tinyMCE.isSafari=tinymce.isWebKit;tinyMCE.isOpera=tinymce.isOpera;tinyMCE.isMac=false;tinyMCE.isNS7=false;tinyMCE.isNS71=false;tinyMCE.compat=true;TinyMCE_Engine=tinyMCE;tinymce.extend(tinyMCE,{getParam:function(n,dv){return this.activeEditor.getParam(n,dv);},addEvent:function(e,na,f,sc){tinymce.dom.Event.add(e,na,f,sc||this);},getControlHTML:function(n){return EditorManager.activeEditor.controlManager.createControl(n);},loadCSS:function(u){tinymce.DOM.loadCSS(u);},importCSS:function(doc,u){if(doc==document)this.loadCSS(u);else new tinymce.dom.DOMUtils(doc).loadCSS(u);},log:function(){console.debug.apply(console,arguments);},getLang:function(n,dv){var v=EditorManager.activeEditor.getLang(n.replace(/^lang_/g,''),dv);if(/^[0-9\-.]+$/g.test(v))return parseInt(v);return v;},isInstance:function(o){return o!=null&&typeof(o)=="object"&&o.execCommand;},triggerNodeChange:function(){EditorManager.activeEditor.nodeChanged();},regexpReplace:function(in_str,reg_exp,replace_str,opts){var re;if(in_str==null)return in_str;if(typeof(opts)=="undefined")opts='g';re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);},trim:function(s){return tinymce.trim(s);},xmlEncode:function(s){return tinymce.DOM.encode(s);},explode:function(s,d){var o=[];tinymce.each(s.split(d),function(v){if(v!='')o.push(v);});return o;},switchClass:function(id,cls){var b;if(/^mceButton/.test(cls)){b=EditorManager.activeEditor.controlManager.get(id);if(!b)return;switch(cls){case"mceButtonNormal":b.setDisabled(false);b.setActive(false);return;case"mceButtonDisabled":b.setDisabled(true);return;case"mceButtonSelected":b.setActive(true);b.setDisabled(false);return;}}},addCSSClass:function(e,n,b){return tinymce.DOM.addClass(e,n,b);},hasCSSClass:function(e,n){return tinymce.DOM.hasClass(e,n);},removeCSSClass:function(e,n){return tinymce.DOM.removeClass(e,n);},getCSSClasses:function(){var cl=EditorManager.activeEditor.dom.getClasses(),o=[];each(cl,function(c){o.push(c['class']);});return o;},setWindowArg:function(n,v){EditorManager.activeEditor.windowManager.params[n]=v;},getWindowArg:function(n,dv){var wm=EditorManager.activeEditor.windowManager,v;v=wm.getParam(n);if(v==='')return'';return v||wm.getFeature(n)||dv;},getParentNode:function(n,f){return this._getDOM().getParent(n,f);},selectElements:function(n,na,f){var i,a=[],nl,x;for(x=0,na=na.split(',');x';}return "";}function TinyMCE_emotions_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=150;template['height']=180;tinyMCE.openWindow(template,{editor_id:editor_id});return true;}return false;} \ No newline at end of file +(function(){tinymce.create('tinymce.plugins.EmotionsPlugin',{init:function(ed,url){ed.addCommand('mceEmotion',function(){ed.windowManager.open({file:url+'/emotions.htm',width:250+parseInt(ed.getLang('emotions.delta_width',0)),height:160+parseInt(ed.getLang('emotions.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('emotions',{title:'emotions.emotions_desc',cmd:'mceEmotion'});},getInfo:function(){return{longname:'Emotions',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('emotions',tinymce.plugins.EmotionsPlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js index da8e5c42..df0d370a 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js @@ -1,36 +1,40 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('emotions', 'en,sv,zh_cn,cs,fa,fr_ca,fr,de'); - -/** - * Returns the HTML contents of the emotions control. - */ -function TinyMCE_emotions_getControlHTML(control_name) { - switch (control_name) { - case "emotions": - return ''; - } - - return ""; -} - -/** - * Executes the mceEmotion command. - */ -function TinyMCE_emotions_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceEmotion": - var template = new Array(); - - template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme - template['width'] = 150; - template['height'] = 180; - - tinyMCE.openWindow(template, {editor_id : editor_id}); - - return true; - } - - // Pass to next handler in chain - return false; -} +/** + * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.EmotionsPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceEmotion', function() { + ed.windowManager.open({ + file : url + '/emotions.htm', + width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)), + height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'}); + }, + + getInfo : function() { + return { + longname : 'Emotions', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm index 32411c8b..8110ee02 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm @@ -1,45 +1,41 @@ - - -{$lang_insert_emotions_title} - - - - -

-
{$lang_insert_emotions_title}:

- - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - + + + + {#emotions_dlg.title} + + + + + +
+
{#emotions_dlg.title}:

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{#emotions_dlg.cool}{#emotions_dlg.cry}{#emotions_dlg.embarassed}{#emotions_dlg.foot_in_mouth}
{#emotions_dlg.frown}{#emotions_dlg.innocent}{#emotions_dlg.kiss}{#emotions_dlg.laughing}
{#emotions_dlg.money_mouth}{#emotions_dlg.sealed}{#emotions_dlg.smile}{#emotions_dlg.surprised}
{#emotions_dlg.tongue-out}{#emotions_dlg.undecided}{#emotions_dlg.wink}{#emotions_dlg.yell}
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/emotions.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/emotions.gif deleted file mode 100644 index d34f0e0b..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/emotions.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/readme.txt deleted file mode 100644 index cc2cf3fe..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -These emotions where taken from Mozilla Thunderbird. -I hope they don't get angry if I use them here after all this is a open source project aswell. diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-cool.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-cool.gif deleted file mode 100644 index 1e2c1d62..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-cool.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-cry.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-cry.gif deleted file mode 100644 index e0dcf8a8..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-cry.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-embarassed.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-embarassed.gif deleted file mode 100644 index 8e3f07a5..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-embarassed.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif deleted file mode 100644 index b3e47cc3..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-foot-in-mouth.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-frown.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-frown.gif deleted file mode 100644 index 9335e994..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-frown.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-innocent.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-innocent.gif deleted file mode 100644 index cdb72568..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-innocent.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-kiss.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-kiss.gif deleted file mode 100644 index 242c38c1..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-kiss.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-laughing.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-laughing.gif deleted file mode 100644 index 09a9ec7e..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-laughing.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif deleted file mode 100644 index 12b1138a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-money-mouth.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-sealed.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-sealed.gif deleted file mode 100644 index 76002b2f..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-sealed.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-smile.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-smile.gif deleted file mode 100644 index 8cf2b5da..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-smile.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-surprised.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-surprised.gif deleted file mode 100644 index ece78a39..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-surprised.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif deleted file mode 100644 index 16b13a5a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-tongue-out.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-undecided.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-undecided.gif deleted file mode 100644 index 2aec732f..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-undecided.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-wink.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-wink.gif deleted file mode 100644 index 5d975f67..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-wink.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-yell.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-yell.gif deleted file mode 100644 index 7719bc43..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-yell.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif new file mode 100644 index 00000000..ba90cc36 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif new file mode 100644 index 00000000..74d897a4 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif new file mode 100644 index 00000000..963a96b8 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif new file mode 100644 index 00000000..16f68cc1 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif new file mode 100644 index 00000000..716f55e1 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif new file mode 100644 index 00000000..334d49e0 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif new file mode 100644 index 00000000..4efd549e Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif new file mode 100644 index 00000000..1606c119 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif new file mode 100644 index 00000000..ca2451e1 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif new file mode 100644 index 00000000..b33d3cca Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif new file mode 100644 index 00000000..e6a9e60d Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif new file mode 100644 index 00000000..cb99cdd9 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif new file mode 100644 index 00000000..2075dc16 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif new file mode 100644 index 00000000..bef7e257 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif new file mode 100644 index 00000000..9faf1aff Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-yell.gif b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-yell.gif new file mode 100644 index 00000000..648e6e87 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-yell.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/js/emotions.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/js/emotions.js new file mode 100644 index 00000000..c5493670 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/js/emotions.js @@ -0,0 +1,22 @@ +tinyMCEPopup.requireLangPack(); + +var EmotionsDialog = { + init : function(ed) { + tinyMCEPopup.resizeToInnerSize(); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { + src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, + alt : ed.getLang(title), + title : ed.getLang(title), + border : 0 + })); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ar_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ar_dlg.js new file mode 100644 index 00000000..4a30cace --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ar_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ar.emotions_dlg',{ +title:"\u0625\u062F\u0631\u0627\u062C \u0627\u0628\u062A\u0633\u0627\u0645\u0629", +desc:"\u0627\u0644\u0625\u0628\u062A\u0633\u0627\u0645\u0627\u062A", +cool:"\u0647\u0627\u062F\u0626", +cry:"\u0635\u0631\u062E\u0629", +embarassed:"\u0645\u062D\u0631\u062C", +foot_in_mouth:"\u0641\u064A \u0627\u0644\u0642\u062F\u0645 \u0648\u0627\u0644\u0641\u0645", +frown:"\u0639\u0628\u0648\u0633", +innocent:"\u0628\u0631\u064A\u0621", +kiss:"\u0642\u0628\u0644\u0629", +laughing:"\u0636\u062D\u0643", +money_mouth:"\u0627\u0644\u0645\u0627\u0644 \u0627\u0644\u0641\u0645", +sealed:"\u0645\u063A\u0644\u0642", +smile:"\u0627\u0628\u062A\u0633\u0627\u0645\u0629", +surprised:"\u0645\u0646\u062F\u0647\u0634", +tongue_out:"\u0644\u0633\u0627\u0646 \u062E\u0627\u0631\u062C", +undecided:"\u0645\u062A\u0631\u062F\u062F", +wink:"\u063A\u0645\u0632\u0629", +yell:"\u0647\u062A\u0627\u0641" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/bg_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/bg_dlg.js new file mode 100644 index 00000000..b612cbc2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/bg_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('bg.emotions_dlg',{ +title:"\u0412\u043C\u044A\u043A\u043D\u0438 \u0435\u043C\u043E\u0442\u0438\u043A\u043E\u043D", +desc:"\u0415\u043C\u043E\u0442\u0438\u043A\u043E\u043D\u0438", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/br_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/br_dlg.js new file mode 100644 index 00000000..ba9e4550 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/br_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('br.emotions_dlg',{ +title:"Inserir emoticon", +desc:"Emoticons", +cool:"Fixe", +cry:"Chor\u00C3\u0083\u00C2\u00A3o", +embarassed:"Embara\u00C3\u0083\u00C2\u00A7ado", +foot_in_mouth:"Disse asneira", +frown:"Decep\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +innocent:"Inocente", +kiss:"Beijo", +laughing:"Riso", +money_mouth:"Avarez", +sealed:"Boca Fechada", +smile:"Sorriso", +surprised:"Surpresa", +tongue_out:"L\u00C3\u0083\u00C2\u00ADngua de fora", +undecided:"Indeciso", +wink:"Piscadela", +yell:"Irado" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/bs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/bs_dlg.js new file mode 100644 index 00000000..d5dad36b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/bs_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('bs.emotions_dlg',{ +title:"Umetni emociju", +desc:"Emocije", +cool:"Cool", +cry:"Pla\u010D", +embarassed:"Sramim se", +foot_in_mouth:"Izlanuo se", +frown:"Mr\u0161ti se", +innocent:"Nevina\u0161ce", +kiss:"Poljubac", +laughing:"Smijeh", +money_mouth:"Bogata\u0161", +sealed:"\u0160utim", +smile:"Osmijeh", +surprised:"Iznena\u0111en", +tongue_out:"Belji se", +undecided:"Neodlu\u010Dan", +wink:"Namigiva", +yell:"Vi\u010De" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ca_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ca_dlg.js new file mode 100644 index 00000000..68445510 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ca_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ca.emotions_dlg',{ +title:"Insereix emoticona", +desc:"Emoticones", +cool:"Ben parit", +cry:"Plor", +embarassed:"Vergonya", +foot_in_mouth:"Muts i a la g\u00E0bia", +frown:"Indiferent", +innocent:"Innocent", +kiss:"Pet\u00F3", +laughing:"Rialla", +money_mouth:"Boca de diner", +sealed:"Segellada", +smile:"Somriure", +surprised:"Sorpresa", +tongue_out:"Treu la llengua", +undecided:"Indecisa", +wink:"Pica l'ullet", +yell:"Crit" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ch_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ch_dlg.js new file mode 100644 index 00000000..5180c43f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ch_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ch.emotions_dlg',{ +title:"\u63D2\u5165\u8868\u60C5", +desc:"\u8868\u60C5\u6E05\u5355", +cool:"\u51B7\u9177", +cry:"\u54ED\u6CE3", +embarassed:"\u5C34\u5C2C", +foot_in_mouth:"\u54A7\u5634", +frown:"\u76B1\u7709", +innocent:"\u5929\u771F", +kiss:"\u543B", +laughing:"\u5927\u7B11", +money_mouth:"\u53D1\u8D22", +sealed:"\u4FDD\u5BC6", +smile:"\u5FAE\u7B11", +surprised:"\u60CA\u5413", +tongue_out:"\u5410\u820C\u5934", +undecided:"\u601D\u8003", +wink:"\u7728\u773C", +yell:"\u53EB\u56B7" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/cs.js deleted file mode 100644 index 0fadf38e..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/cs.js +++ /dev/null @@ -1,4 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insert_emotions_title'] = 'Vložit emotikon'; -tinyMCELang['lang_emotions_desc'] = 'Emotikony'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/cs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/cs_dlg.js new file mode 100644 index 00000000..7ce422da --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/cs_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('cs.emotions_dlg',{ +title:"Vlo\u017Eit emotikon", +desc:"Emotikony", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/da_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/da_dlg.js new file mode 100644 index 00000000..0e37b795 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/da_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('da.emotions_dlg',{ +title:"Inds\u00E6t hum\u00F8rikon", +desc:"Hum\u00F8rikoner", +cool:"Cool", +cry:"Gr\u00E6de", +embarassed:"Flov", +foot_in_mouth:"Fod i munden", +frown:"Forskr\u00E6kket", +innocent:"Uskyldig", +kiss:"Kys", +laughing:"Grine", +money_mouth:"Pengemund", +sealed:"Lukket", +smile:"Smil", +surprised:"Overrasket", +tongue_out:"Tunge ud", +undecided:"Ubeslutsom", +wink:"Vink", +yell:"R\u00E5be" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/de.js deleted file mode 100644 index fcec1317..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/de.js +++ /dev/null @@ -1,6 +0,0 @@ -// DE lang variables - - -tinyMCELang['lang_insert_emotions_title'] = 'Emotion einfügen'; -tinyMCELang['lang_emotions_desc'] = 'Emotion'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/de_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/de_dlg.js new file mode 100644 index 00000000..3940a2a5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/de_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('de.emotions_dlg',{ +title:"Smiley einf\u00FCgen", +desc:"Smilies", +cool:"Cool", +cry:"Weinend", +embarassed:"Verlegen", +foot_in_mouth:"Reingefallen", +frown:"Stirnrunzelnd", +innocent:"Unschuldig", +kiss:"K\u00FCssend", +laughing:"Lachend", +money_mouth:"Geld", +sealed:"Verschlossen", +smile:"L\u00E4chelnd", +surprised:"\u00DCberrascht", +tongue_out:"Zunge raus", +undecided:"Unentschlossen", +wink:"Zwinkernd", +yell:"Br\u00FCllend" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/dv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/dv_dlg.js new file mode 100644 index 00000000..94d9d2df --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/dv_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('dv.emotions_dlg',{ +title:"Insert emotion", +desc:"Emotions", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/el.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/el.js deleted file mode 100644 index 91ed1b18..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/el.js +++ /dev/null @@ -1,5 +0,0 @@ -// Greek lang variables by Jacaranda Bill - -tinyMCELang['lang_insert_emotions_title'] = 'ÅéóáãùãÞ åíüò åéêïíéäßïõ emoticon'; -tinyMCELang['lang_emotions_desc'] = 'Åéêïíßäéá emoticons'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/el_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/el_dlg.js new file mode 100644 index 00000000..c11a96c7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/el_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('el.emotions_dlg',{ +title:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03C3\u03C5\u03BD\u03B1\u03B9\u03C3\u03B8\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2", +desc:"\u03A3\u03C5\u03BD\u03B1\u03B9\u03C3\u03B8\u03AE\u03BC\u03B1\u03C4\u03B1", +cool:"\u0386\u03BD\u03B5\u03C4\u03BF\u03C2", +cry:"\u0394\u03B1\u03BA\u03C1\u03C5\u03C3\u03BC\u03AD\u03BD\u03BF\u03C2", +embarassed:"\u0391\u03BC\u03AE\u03C7\u03B1\u03BD\u03BF\u03C2", +foot_in_mouth:"\u039A\u03BB\u03C9\u03C4\u03C3\u03B9\u03AC \u03C3\u03C4\u03BF \u03C3\u03C4\u03CC\u03BC\u03B1", +frown:"\u039A\u03B1\u03C4\u03C3\u03BF\u03C5\u03C6\u03B9\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF\u03C2", +innocent:"\u0391\u03B8\u03CE\u03BF\u03C2", +kiss:"\u03A6\u03B9\u03BB\u03AF", +laughing:"\u0393\u03AD\u03BB\u03B9\u03BF", +money_mouth:"\u039B\u03B5\u03C6\u03C4\u03AC \u03C9\u03C2 \u03C3\u03C4\u03CC\u03BC\u03B1", +sealed:"\u03A3\u03C6\u03C1\u03B1\u03B3\u03B9\u03C3\u03BC\u03AD\u03BD\u03BF \u03C3\u03C4\u03CC\u03BC\u03B1", +smile:"\u03A7\u03B1\u03BC\u03CC\u03B3\u03B5\u03BB\u03BF", +surprised:"\u0388\u03BA\u03C0\u03BB\u03B7\u03BA\u03C4\u03BF\u03C2", +tongue_out:"\u0393\u03BB\u03CE\u03C3\u03C3\u03B1 \u03AD\u03BE\u03C9", +undecided:"\u0391\u03BD\u03B1\u03C0\u03BF\u03C6\u03AC\u03C3\u03B9\u03C3\u03C4\u03BF\u03C2", +wink:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF \u03BC\u03B1\u03C4\u03B9\u03BF\u03CD", +yell:"\u03A6\u03C9\u03BD\u03AC\u03B6\u03C9" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en.js deleted file mode 100644 index 2e350084..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en.js +++ /dev/null @@ -1,5 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insert_emotions_title'] = 'Insert emotion'; -tinyMCELang['lang_emotions_desc'] = 'Emotions'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js new file mode 100644 index 00000000..3b57ad9e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('en.emotions_dlg',{ +title:"Insert emotion", +desc:"Emotions", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/es_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/es_dlg.js new file mode 100644 index 00000000..1cc3ac92 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/es_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('es.emotions_dlg',{ +title:"Insertar emoticon", +desc:"Emoticones", +cool:"Todo bien", +cry:"Llora", +embarassed:"Verg\u00C3\u0083\u00C2\u00BCenza", +foot_in_mouth:"Pie en la boca", +frown:"Triste", +innocent:"Inocente", +kiss:"Beso", +laughing:"Risa", +money_mouth:"Dinero boca", +sealed:"Sellado", +smile:"Sonrisa", +surprised:"Sorprendido", +tongue_out:"Lengua fuera", +undecided:"Indeciso", +wink:"Gui\u00F1o", +yell:"Enfadado" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/et_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/et_dlg.js new file mode 100644 index 00000000..398a4de9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/et_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('et.emotions_dlg',{ +title:"Sisesta emotsioon", +desc:"Emotsioonid", +cool:"Lahe", +cry:"Nutt", +embarassed:"H\u00E4bitunne", +foot_in_mouth:"Jalg suus", +frown:"Kulmu kortsutamine", +innocent:"S\u00FC\u00FCtu", +kiss:"Suudlus", +laughing:"Naermine", +money_mouth:"Rahasuu", +sealed:"Suletud", +smile:"Naeratus", +surprised:"\u00DCllatunud", +tongue_out:"Keel v\u00E4ljas", +undecided:"K\u00F5hklev", +wink:"Silmapilgutus", +yell:"Karje" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fa.js deleted file mode 100644 index 2deb3396..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fa.js +++ /dev/null @@ -1,10 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_insert_emotions_title'] = 'اÙزودن Ø´Ú©Ù„Ú©'; -tinyMCELang['lang_emotions_desc'] = 'شکلکها'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fa_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fa_dlg.js new file mode 100644 index 00000000..9c29a18b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fa_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('fa.emotions_dlg',{ +title:"\u062F\u0631\u062C \u0634\u0643\u0644\u0643", +desc:"\u0634\u0643\u0644\u0643 \u0647\u0627", +cool:"\u0622\u0631\u0627\u0645", +cry:"\u06AF\u0631\u06CC\u0647", +embarassed:"\u062E\u062C\u0627\u0644\u062A\u06CC", +foot_in_mouth:"\u067E\u0627 \u062F\u0631 \u062F\u0647\u0627\u0646", +frown:"\u0627\u062E\u0645", +innocent:"\u0628\u06CC \u062A\u0642\u0635\u06CC\u0631", +kiss:"\u0628\u0648\u0633\u0647", +laughing:"\u062E\u0646\u062F\u0647", +money_mouth:"\u067E\u0648\u0644 \u062F\u0631 \u062F\u0647\u0627\u0646", +sealed:"\u0645\u0647\u0631 \u0634\u062F\u0647", +smile:"\u0644\u0628\u062E\u0646\u062F", +surprised:"\u0645\u062A\u0639\u062C\u0628", +tongue_out:"\u0632\u0628\u0627\u0646 \u062F\u0631\u0627\u0632\u06CC", +undecided:"\u0645\u0631\u062F\u062F", +wink:"\u0686\u0634\u0645\u0643", +yell:"\u0641\u0631\u06CC\u0627\u062F" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fi_dlg.js new file mode 100644 index 00000000..b34fe0df --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fi_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('fi.emotions_dlg',{ +title:"Lis\u00E4\u00E4 hymi\u00F6", +desc:"Hymi\u00F6t", +cool:"Cool", +cry:"Itku", +embarassed:"Nolostunut", +foot_in_mouth:"Jalka suussa", +frown:"Otsan rypistys", +innocent:"Viaton", +kiss:"Pusu", +laughing:"Nauru", +money_mouth:"Klink Klink (raha)", +sealed:"Tukittu", +smile:"Hymy", +surprised:"Yll\u00E4ttynyt", +tongue_out:"Kieli ulkona", +undecided:"P\u00E4\u00E4tt\u00E4m\u00E4t\u00F6n", +wink:"Silm\u00E4nisku", +yell:"Huuto" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr.js deleted file mode 100644 index 5dedb617..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr.js +++ /dev/null @@ -1,5 +0,0 @@ -// French lang variables by Laurent Dran - -tinyMCELang['lang_insert_emotions_title'] = 'Insèrer un émoticon'; -tinyMCELang['lang_emotions_desc'] = 'Émoticons'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr_ca.js deleted file mode 100644 index 9836513a..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr_ca.js +++ /dev/null @@ -1,5 +0,0 @@ -// CAN_FR lang variables - -tinyMCELang['lang_insert_emotions_title'] = 'Insérer un émoticon'; -tinyMCELang['lang_emotions_desc'] = 'Émoticons'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr_dlg.js new file mode 100644 index 00000000..b4757186 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/fr_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('fr.emotions_dlg',{ +title:"Ins\u00E9rer \u00E9motion", +desc:"\u00C9motions", +cool:"Cool", +cry:"En pleurs", +embarassed:"Embarass\u00E9", +foot_in_mouth:"Pied de nez", +frown:"D\u00E9\u00E7u", +innocent:"Innocent", +kiss:"Bisou", +laughing:"Rigolant", +money_mouth:"Avare", +sealed:"Bouche cousue", +smile:"Sourire", +surprised:"Surpris", +tongue_out:"Langue tir\u00E9e", +undecided:"Non d\u00E9cid\u00E9", +wink:"Clin d'oeil", +yell:"Criant" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/gl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/gl_dlg.js new file mode 100644 index 00000000..20c507d8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/gl_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('gl.emotions_dlg',{ +title:"Insertar emoticon", +desc:"Emoticones", +cool:"Guay", +cry:"Chora", +embarassed:"Vergo\u00F1a", +foot_in_mouth:"A que dixen", +frown:"Triste", +innocent:"Inocente", +kiss:"Beso", +laughing:"Risa", +money_mouth:"Cartos", +sealed:"Selado", +smile:"Sorriso", +surprised:"Sorprendido", +tongue_out:"Canso", +undecided:"Indeciso", +wink:"Gui\u00F1o", +yell:"Anoxado" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/he_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/he_dlg.js new file mode 100644 index 00000000..061473f0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/he_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('he.emotions_dlg',{ +title:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05E1\u05DE\u05D9\u05D9\u05DC\u05D9", +desc:"\u05E1\u05DE\u05D9\u05D9\u05DC\u05D9\u05DD", +cool:"\u05DE\u05D2\u05E0\u05D9\u05D1", +cry:"\u05D1\u05D5\u05DB\u05D4", +embarassed:"\u05E0\u05D1\u05D5\u05DA", +foot_in_mouth:"\u05E8\u05D2\u05DC \u05D1\u05E4\u05D4", +frown:"\u05DE\u05D6\u05E2\u05D9\u05E3 \u05D0\u05EA \u05D4\u05E4\u05D4", +innocent:"\u05EA\u05DE\u05D9\u05DD", +kiss:"\u05E0\u05E9\u05D9\u05E7\u05D4", +laughing:"\u05E6\u05D5\u05D7\u05E7", +money_mouth:"\u05DB\u05E1\u05E3", +sealed:"\u05D0\u05D8\u05D5\u05DD", +smile:"\u05D7\u05D9\u05D5\u05DA", +surprised:"\u05DE\u05D5\u05E4\u05EA\u05E2", +tongue_out:"\u05DC\u05E9\u05D5\u05DF \u05D1\u05D7\u05D5\u05E5", +undecided:"\u05D4\u05E1\u05E0\u05E0\u05D9", +wink:"\u05E7\u05E8\u05D9\u05E6\u05D4", +yell:"\u05E6\u05E2\u05E7\u05D4" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/hr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/hr_dlg.js new file mode 100644 index 00000000..7d8f68af --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/hr_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('hr.emotions_dlg',{ +title:"Umetni emociju", +desc:"Emocije", +cool:"Cool", +cry:"Pla\u010D", +embarassed:"Sramim se", +foot_in_mouth:"Izlanuo se", +frown:"Mr\u0161ti se", +innocent:"Nevina\u0161ce", +kiss:"Poljubac", +laughing:"Smijeh", +money_mouth:"Bogata\u0161", +sealed:"\u0160utim", +smile:"Osmijeh", +surprised:"Iznena\u0111en", +tongue_out:"Belji se", +undecided:"Neodlu\u010Dan", +wink:"Namigiva", +yell:"Vi\u010De" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/hu_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/hu_dlg.js new file mode 100644 index 00000000..083e6abf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/hu_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('hu.emotions_dlg',{ +title:"Hangulatjel besz\u00FAr\u00E1sa", +desc:"Hangulatjelek", +cool:"Kir\u00E1ly", +cry:"S\u00EDr\u00F3s", +embarassed:"Zavarban van", +foot_in_mouth:"L\u00E1b a sz\u00E1jban", +frown:"Rosszall", +innocent:"\u00C1rtatlan", +kiss:"Cs\u00F3k", +laughing:"Nevet\u00E9s", +money_mouth:"P\u00E9nz besz\u00E9l", +sealed:"Lakat a sz\u00E1j\u00E1n", +smile:"Vigyor", +surprised:"Meglepett", +tongue_out:"Nyelv\u00F6lt\u00E9s", +undecided:"Hat\u00E1rozatlan", +wink:"Kacsint\u00E1s", +yell:"\u00DCv\u00F6lt\u00E9s" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ia_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ia_dlg.js new file mode 100644 index 00000000..bea24eb3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ia_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ia.emotions_dlg',{ +title:"\u63D2\u5165\u8868\u60C5", +desc:"\u8868\u60C5\u5217\u8868", +cool:"\u51B7\u9177", +cry:"\u54ED\u6CE3", +embarassed:"\u5C34\u5C2C", +foot_in_mouth:"\u54A7\u5634", +frown:"\u76B1\u7709", +innocent:"\u5929\u771F", +kiss:"\u543B", +laughing:"\u5927\u7B11", +money_mouth:"\u53D1\u8D22", +sealed:"\u4FDD\u5BC6", +smile:"\u5FAE\u7B11", +surprised:"\u60CA\u5413", +tongue_out:"\u5410\u820C\u5934", +undecided:"\u601D\u8003", +wink:"\u7728\u773C", +yell:"\u53EB\u56B7" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ii_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ii_dlg.js new file mode 100644 index 00000000..4242c997 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ii_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ii.emotions_dlg',{ +title:"\u63D2\u5165\u8868\u60C5", +desc:"\u8868\u60C5\u6E05\u5355", +cool:"\u51B7\u9177", +cry:"\u54ED\u6CE3", +embarassed:"\u5C34\u5C2C", +foot_in_mouth:"\u54A7\u5634", +frown:"\u76B1\u7709", +innocent:"\u5929\u771F", +kiss:"\u543B", +laughing:"\u5927\u7B11", +money_mouth:"\u53D1\u8D22", +sealed:"\u4FDD\u5BC6", +smile:"\u5FAE\u7B11", +surprised:"\u60CA\u5413", +tongue_out:"\u5410\u820C\u5934", +undecided:"\u601D\u8003", +wink:"\u7728\u773C", +yell:"\u53EB\u56B7" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/is_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/is_dlg.js new file mode 100644 index 00000000..11c49af4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/is_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('is.emotions_dlg',{ +title:"Setja inn broskall", +desc:"Broskarlar", +cool:"T\u00F6ff", +cry:"Gr\u00E1tandi", +embarassed:"Skammast s\u00EDn", +foot_in_mouth:"F\u00F3tur \u00ED munni", +frown:"Frown", +innocent:"Saklaus", +kiss:"Koss", +laughing:"Hl\u00E6gjandi", +money_mouth:"Peningamunnur", +sealed:"Rennil\u00E1samunnur", +smile:"Bros", +surprised:"Hissa", +tongue_out:"Tungan \u00FAt", +undecided:"\u00D3\u00E1kve\u00F0inn", +wink:"Wink", +yell:"\u00D6skrandi" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/it.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/it.js deleted file mode 100644 index 55365162..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/it.js +++ /dev/null @@ -1,5 +0,0 @@ -//IT lang variables - -tinyMCELang['lang_insert_emotions_title'] = 'Inserisci una emoticon'; -tinyMCELang['lang_emotions_desc'] = 'Emoticon'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/it_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/it_dlg.js new file mode 100644 index 00000000..8b9efb78 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/it_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('it.emotions_dlg',{ +title:"Inserisci faccina", +desc:"Faccina", +cool:"Fico", +cry:"Piango", +embarassed:"Imbarazzato", +foot_in_mouth:"Piede in bocca", +frown:"Triste", +innocent:"Santarellino", +kiss:"Bacio", +laughing:"Risatona", +money_mouth:"Bocca danarosa", +sealed:"Bocca sigillata", +smile:"Sorridente", +surprised:"Sorpreso", +tongue_out:"Linguaccia", +undecided:"Indeciso", +wink:"Occhiolino", +yell:"Arrabbiato" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ja_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ja_dlg.js new file mode 100644 index 00000000..cf988a7f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ja_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ja.emotions_dlg',{ +title:"\u8868\u60C5\u30A2\u30A4\u30B3\u30F3\u306E\u633F\u5165", +desc:"\u8868\u60C5\u30A2\u30A4\u30B3\u30F3", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ko.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ko.js deleted file mode 100644 index d48edc34..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ko.js +++ /dev/null @@ -1,5 +0,0 @@ -// KO lang variables - -tinyMCELang['lang_insert_emotions_title'] = 'À̸ðƼÄÜ ³Ö±â'; -tinyMCELang['lang_emotions_desc'] = 'À̸ðƼÄÜ'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ko_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ko_dlg.js new file mode 100644 index 00000000..91c5b6d9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ko_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ko.emotions_dlg',{ +title:"\uC774\uBAA8\uD2F0\uCF58 \uC0BD\uC785", +desc:"\uC774\uBAA8\uD2F0\uCF58", +cool:"\uCFE8", +cry:"\uC6B8\uC74C", +embarassed:"\uBD80\uB044\uB7EC\uC6C0", +foot_in_mouth:"\uC2E4\uC5B8", +frown:"\uCC21\uADF8\uB9B0 \uC5BC\uAD74", +innocent:"\uCC9C\uC9C4\uB09C\uB9CC", +kiss:"Kiss", +laughing:"\uC6C3\uC74C", +money_mouth:"\uB3C8", +sealed:"\uBD09\uC778", +smile:"\uC2A4\uB9C8\uC77C", +surprised:"\uB180\uB77C\uC6C0", +tongue_out:"\uBA54\uB871", +undecided:"\uACE0\uBBFC\uD55C\uB2E4", +wink:"\uC719\uD06C", +yell:"\uC678\uCE5C\uB2E4" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/lt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/lt_dlg.js new file mode 100644 index 00000000..f52877d0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/lt_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('lt.emotions_dlg',{ +title:"\u012Eterpti emotikon\u0105", +desc:"Emotikonai", +cool:"J\u0117ga", +cry:"Verksmas", +embarassed:"Susig\u0117d\u0119s", +foot_in_mouth:"Koja burnoje", +frown:"Susirauk\u0119s", +innocent:"Nekaltas", +kiss:"Bu\u010Dinys", +laughing:"Juokimasis", +money_mouth:"Piniginga burna", +sealed:"Sandarus", +smile:"\u0160ypsena", +surprised:"Nusteb\u0119s", +tongue_out:"I\u0161ki\u0161tas lie\u017Euvis", +undecided:"Neapsisprend\u0119s", +wink:"Mirk\u010Diojimas", +yell:"Klyksmas" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/lv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/lv_dlg.js new file mode 100644 index 00000000..77c612e3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/lv_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('lv.emotions_dlg',{ +title:"Ievietot smaidi\u0146u", +desc:"Smaidi\u0146i", +cool:"V\u0113sais", +cry:"Raudul\u012Bgais", +embarassed:"Nokautr\u0113jies", +foot_in_mouth:"K\u0101jmutis", +frown:"Satraukts", +innocent:"Nevain\u012Bgs", +kiss:"Sk\u016Bpsts", +laughing:"Smejo\u0161s", +money_mouth:"Naudmutis", +sealed:"Nosl\u0113gts", +smile:"Smaid\u012Bgs", +surprised:"P\u0101rsteigts", +tongue_out:"M\u0113d\u012Bgs", +undecided:"Neizl\u0113m\u012Bgs", +wink:"Aci miedzo\u0161s", +yell:"Kliedzo\u0161s" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/mk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/mk_dlg.js new file mode 100644 index 00000000..e4538140 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/mk_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('mk.emotions_dlg',{ +title:"\u0412\u043C\u0435\u0442\u043D\u0438 emociju", +desc:"Emocije", +cool:"Cool", +cry:"Pla\u010D", +embarassed:"Sramim se", +foot_in_mouth:"Izlanuo se", +frown:"Mr\u0161ti se", +innocent:"Nevina\u0161ce", +kiss:"Poljubac", +laughing:"Smeh", +money_mouth:"Bogata\u0161", +sealed:"\u0160utim", +smile:"Osmeh", +surprised:"Iznena\u0111en", +tongue_out:"Belji se", +undecided:"Neodlu\u010Dan", +wink:"Namigiva", +yell:"Vi\u010De" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/mn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/mn_dlg.js new file mode 100644 index 00000000..702106ff --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/mn_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('mn.emotions_dlg',{ +title:"\u0421\u044D\u0442\u0433\u044D\u043B \u0445\u04E9\u0434\u043B\u04E9\u043B \u043E\u0440\u0443\u0443\u043B\u0430\u0445", +desc:"\u0421\u044D\u0442\u0433\u044D\u043B \u0445\u04E9\u0434\u043B\u04E9\u043B", +cool:"\u0414\u043E\u0440\u0438\u0443\u043D", +cry:"\u0423\u0439\u043B\u0430\u0445", +embarassed:"\u0421\u0430\u043D\u0434\u0430\u0440\u0441\u0430\u043D", +foot_in_mouth:"\u0425\u0443\u0443\u0440\u0442\u0430\u0433\u0434\u0430\u0445", +frown:"\u0425\u04E9\u043C\u0441\u04E9\u0433 \u0437\u0430\u043D\u0433\u0438\u0434\u0430\u0445", +innocent:"\u0411\u0443\u0440\u0443\u0443\u0433\u04AF\u0439", +kiss:"\u04AE\u043D\u0441\u044D\u0445", +laughing:"\u0418\u043D\u044D\u044D\u0445", +money_mouth:"\u041C\u04E9\u043D\u0433\u04E9", +sealed:"\u0411\u0438\u0442\u04AF\u04AF\u043C\u0436\u0438\u043B\u0441\u044D\u043D", +smile:"\u0418\u043D\u044D\u044D\u0445", +surprised:"\u0413\u0430\u0439\u0445\u0441\u0430\u043D", +tongue_out:"\u0425\u044D\u043B\u044D\u044D \u0433\u0430\u0440\u0433\u0430\u0445", +undecided:"\u0428\u0438\u0439\u0434\u044D\u044D\u0433\u04AF\u0439", +wink:"\u041D\u04AF\u0434 \u0438\u0440\u043C\u044D\u0445", +yell:"\u041E\u0440\u0438\u043B\u043E\u0445" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ms_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ms_dlg.js new file mode 100644 index 00000000..efeddb37 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ms_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ms.emotions_dlg',{ +title:"Masukkan emosi", +desc:"Simbol Emosi", +cool:"Tampan", +cry:"Menangis", +embarassed:"Malu", +foot_in_mouth:"Kaki dalam mulut", +frown:"Mengerut", +innocent:"Tidak bersalah", +kiss:"Cium", +laughing:"Gelak", +money_mouth:"Duit mulut", +sealed:"Kacip", +smile:"Senyum", +surprised:"Terkejut", +tongue_out:"Jelir lidah", +undecided:"Tak pasti", +wink:"Kenyit", +yell:"Menguap" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nb_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nb_dlg.js new file mode 100644 index 00000000..b593f7c8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nb_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('nb.emotions_dlg',{ +title:"Sett inn hum\u00F8rfjes", +desc:"Hum\u00F8rfjes", +cool:"Cool", +cry:"Gr\u00E5ter", +embarassed:"Flau", +foot_in_mouth:"Fot i munnen", +frown:"Skuffet", +innocent:"Uskyldig", +kiss:"Kyss", +laughing:"Ler", +money_mouth:"Penger i munnen", +sealed:"Hemmelig", +smile:"Glad", +surprised:"Overrasket", +tongue_out:"Rekke tunge", +undecided:"Skeptisk", +wink:"Blunke", +yell:"Skri" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nl_dlg.js new file mode 100644 index 00000000..f98e1da7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nl_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('nl.emotions_dlg',{ +title:"Emotie invoegen", +desc:"Emoties", +cool:"Stoer", +cry:"Huilen", +embarassed:"Schamen", +foot_in_mouth:"Verstomd", +frown:"Wenkbrouw ophalen", +innocent:"Onschuldig", +kiss:"Zoenen", +laughing:"Lachen", +money_mouth:"Hebberig", +sealed:"Afgesloten", +smile:"Lachen", +surprised:"Verrast", +tongue_out:"Tong uitsteken", +undecided:"Onbeslist", +wink:"Knipogen", +yell:"Roepen" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nn_dlg.js new file mode 100644 index 00000000..3967fbc9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/nn_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('nn.emotions_dlg',{ +title:"Set inn hum\u00F8rfjes", +desc:"Hum\u00F8rfjes", +cool:"Cool", +cry:"Gret", +embarassed:"Flau", +foot_in_mouth:"Fot i munnen", +frown:"Skuffa", +innocent:"Uskyldig", +kiss:"Kyss", +laughing:"Ler", +money_mouth:"Pengar i munnen", +sealed:"Hemmeleg", +smile:"Glad", +surprised:"Overraska", +tongue_out:"Rekkje tunge", +undecided:"Skeptisk", +wink:"Blunke", +yell:"Skri" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/pl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/pl_dlg.js new file mode 100644 index 00000000..e34861e2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/pl_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('pl.emotions_dlg',{ +title:"Wstaw emotikon\u0119", +desc:"Emotikony", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/pt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/pt_dlg.js new file mode 100644 index 00000000..c79cec8e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/pt_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('pt.emotions_dlg',{ +title:"Inserir emoticon", +desc:"Emoticons", +cool:"Fixe", +cry:"Chor\u00E3o", +embarassed:"Embara\u00E7ado", +foot_in_mouth:"Disse asneira", +frown:"Decep\u00E7\u00E3o", +innocent:"Inocente", +kiss:"Beijo", +laughing:"Riso", +money_mouth:"Avarez", +sealed:"Boca Fechada", +smile:"Sorriso", +surprised:"Surpresa", +tongue_out:"L\u00EDngua de fora", +undecided:"Indeciso", +wink:"Piscadela", +yell:"Irado" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ro_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ro_dlg.js new file mode 100644 index 00000000..18e1bc75 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ro_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ro.emotions_dlg',{ +title:"Insereaz\u0103 emoticon", +desc:"Emo\u0163ii", +cool:"Cool", +cry:"Trist", +embarassed:"Ru\u015Finat", +foot_in_mouth:"Picior \u00EEn gur\u0103", +frown:"\u00CEncruntat", +innocent:"Nevinovat", +kiss:"Pupic", +laughing:"R\u00E2de", +money_mouth:"Bani \u00EEn gur\u0103", +sealed:"Sigilat", +smile:"Z\u00E2mbet", +surprised:"Surprins", +tongue_out:"Cu limba afar\u0103", +undecided:"Indecis", +wink:"Face cu ochiul", +yell:"\u0162ipa" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ru_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ru_dlg.js new file mode 100644 index 00000000..e9b5fca0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ru_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ru.emotions_dlg',{ +title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u043C\u0430\u0439\u043B\u0438\u043A", +desc:"\u0421\u043C\u0430\u0439\u043B\u0438\u043A\u0438", +cool:"\u041A\u043B\u0451\u0432\u044B\u0439", +cry:"\u041F\u043B\u0430\u0447\u0435\u0442", +embarassed:"\u041E\u0431\u0430\u043B\u0434\u0435\u043B", +foot_in_mouth:"\u0412_\u0440\u043E\u0442_\u043C\u043D\u0435_\u043D\u043E\u0433\u0438!", +frown:"\u0425\u043C\u0443\u0440\u044B\u0439", +innocent:"\u041D\u0435\u0432\u0438\u043D\u043D\u043E\u0441\u0442\u044C", +kiss:"\u041F\u043E\u0446\u0435\u043B\u0443\u0439", +laughing:"\u0421\u043C\u0435\u0451\u0442\u0441\u044F", +money_mouth:"\u041C\u043D\u043E\u0433\u043E \u0434\u0435\u043D\u0435\u0433", +sealed:"\u0417\u0430\u043F\u0435\u0447\u0430\u0442\u0430\u043D\u043E", +smile:"\u0423\u043B\u044B\u0431\u0430\u0435\u0442\u0441\u044F", +surprised:"\u0423\u0434\u0438\u0432\u043B\u0451\u043D", +tongue_out:"\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442 \u044F\u0437\u044B\u043A", +undecided:"\u0412 \u043D\u0435\u0440\u0435\u0448\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438", +wink:"\u041F\u043E\u0434\u043C\u0438\u0433\u0438\u0432\u0430\u0435\u0442", +yell:"\u0412\u043E\u043F\u0438\u0442" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sc_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sc_dlg.js new file mode 100644 index 00000000..a1bc67ae --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sc_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('sc.emotions_dlg',{ +title:"\u63D2\u5165\u8868\u60C5", +desc:"\u8868\u60C5\u5217\u8868", +cool:"\u51B7\u9177", +cry:"\u54ED\u6CE3", +embarassed:"\u5C34\u5C2C", +foot_in_mouth:"\u54A7\u5634", +frown:"\u76B1\u7709", +innocent:"\u5929\u771F", +kiss:"\u543B", +laughing:"\u5927\u7B11", +money_mouth:"\u53D1\u8D22", +sealed:"\u4FDD\u5BC6", +smile:"\u5FAE\u7B11", +surprised:"\u60CA\u5413", +tongue_out:"\u5410\u820C\u5934", +undecided:"\u601D\u8003", +wink:"\u7728\u773C", +yell:"\u53EB\u56B7" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/se_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/se_dlg.js new file mode 100644 index 00000000..5ba24f39 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/se_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('se.emotions_dlg',{ +title:"Infoga smiley", +desc:"Smileys", +cool:"Cool", +cry:"Gr\u00E5ter", +embarassed:"Sk\u00E4ms", +foot_in_mouth:"Foten i munnen", +frown:"Rynkar p\u00E5 n\u00E4san", +innocent:"Oskyldig", +kiss:"Kyss", +laughing:"Skrattande", +money_mouth:"Guld i mun", +sealed:"Tyst", +smile:"Glad", +surprised:"F\u00F6rv\u00E5nad", +tongue_out:"Tungan ute", +undecided:"Obest\u00E4md", +wink:"Fl\u00F6rt", +yell:"Skrikandes" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/si_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/si_dlg.js new file mode 100644 index 00000000..f43ce4a9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/si_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('si.emotions_dlg',{ +title:"Insert emotion", +desc:"Emotions", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sk_dlg.js new file mode 100644 index 00000000..8cdd1c19 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sk_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('sk.emotions_dlg',{ +title:"Vlo\u017Ei\u0165 emotikon", +desc:"Emotikony", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sl_dlg.js new file mode 100644 index 00000000..3dd3f6fe --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sl_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('sl.emotions_dlg',{ +title:"Vstavi sme\u0161ka", +desc:"Sme\u0161ki", +cool:"kul", +cry:"jok", +embarassed:"v zadregi", +foot_in_mouth:"zare\u010Deni kruh", +frown:"nagubano \u010Delo", +innocent:"nedol\u017Een", +kiss:"poljub", +laughing:"smeh", +money_mouth:"zlati kljun", +sealed:"zape\u010Dateno", +smile:"nasmeh", +surprised:"presene\u010Den", +tongue_out:"ka\u017Ee jezik", +undecided:"neodlo\u010Den", +wink:"me\u017Eik", +yell:"krik" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sq_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sq_dlg.js new file mode 100644 index 00000000..05349ec7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sq_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('sq.emotions_dlg',{ +title:"Fut emocion", +desc:"Emocionet", +cool:"I/e lezetsh\u00EBm", +cry:"Qaj", +embarassed:"Turp", +foot_in_mouth:"K\u00EBmba n\u00EB goj\u00EB", +frown:"Rrudh vetullat", +innocent:"I/e pafajsh\u00EBm", +kiss:"Puth", +laughing:"Qesh", +money_mouth:"Lek\u00EB n\u00EB goj\u00EB", +sealed:"Dh\u00EBmb\u00EBt e mbyllur", +smile:"Buz\u00EBqesh", +surprised:"I/e \u00E7uditur", +tongue_out:"Gjuha jasht\u00EB", +undecided:"I/e pavendosur", +wink:"Shkel syrin", +yell:"B\u00EBrtit" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sr_dlg.js new file mode 100644 index 00000000..92616410 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sr_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('sr.emotions_dlg',{ +title:"Umetni emociju", +desc:"Emocije", +cool:"Cool", +cry:"Pla\u010D", +embarassed:"Sramim se", +foot_in_mouth:"Izlanuo se", +frown:"Mr\u0161ti se", +innocent:"Nevina\u0161ce", +kiss:"Poljubac", +laughing:"Smeh", +money_mouth:"Bogata\u0161", +sealed:"\u0160utim", +smile:"Osmeh", +surprised:"Iznena\u0111en", +tongue_out:"Belji se", +undecided:"Neodlu\u010Dan", +wink:"Namigiva", +yell:"Vi\u010De" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sv.js deleted file mode 100644 index 7507a586..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sv.js +++ /dev/null @@ -1,4 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_insert_emotions_title'] = 'Klistain kännsla'; -tinyMCELang['lang_emotions_desc'] = 'Kännslor'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sv_dlg.js new file mode 100644 index 00000000..cc6c3568 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/sv_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('sv.emotions_dlg',{ +title:"Infoga smiley", +desc:"Smileys", +cool:"Cool", +cry:"Gr\u00E5ter", +embarassed:"Sk\u00E4ms", +foot_in_mouth:"Foten i munnen", +frown:"Rynkar p\u00E5 n\u00E4san", +innocent:"Oskyldig", +kiss:"Kyss", +laughing:"Skrattande", +money_mouth:"Guld i mun", +sealed:"Tyst", +smile:"Glad", +surprised:"F\u00F6rv\u00E5nad", +tongue_out:"Tungan ute", +undecided:"Obest\u00E4md", +wink:"Fl\u00F6rt", +yell:"Skrikandes" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tr_dlg.js new file mode 100644 index 00000000..4af690cf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tr_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('tr.emotions_dlg',{ +title:"\u0130fade ekle", +desc:"\u0130fadeler", +cool:"Haval\u0131", +cry:"A\u011Fla", +embarassed:"Mah\u00E7up", +foot_in_mouth:"A\u011Fz\u0131 kulaklar\u0131nda", +frown:"Ka\u015F \u00E7atm\u0131\u015F", +innocent:"Masum", +kiss:"\u00D6p\u00FCc\u00FCk", +laughing:"Kahkaha", +money_mouth:"Parag\u00F6z", +sealed:"T\u0131p", +smile:"G\u00FCl\u00FCmse", +surprised:"\u015Ea\u015F\u0131rm\u0131\u015F", +tongue_out:"Dil \u00E7\u0131kar", +undecided:"Karars\u0131z", +wink:"G\u00F6z k\u0131rp", +yell:"Esne" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tt_dlg.js new file mode 100644 index 00000000..10e1f346 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tt_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('tt.emotions_dlg',{ +title:"\u63D2\u5165\u8868\u60C5", +desc:"\u8868\u60C5\u5217\u8868", +cool:"\u51B7\u9177", +cry:"\u54ED\u6CE3", +embarassed:"\u5C37\u5C2C", +foot_in_mouth:"\u54A7\u5634", +frown:"\u76BA\u7709", +innocent:"\u5929\u771F", +kiss:"\u543B", +laughing:"\u5927\u7B11", +money_mouth:"\u767C\u8CA1", +sealed:"\u4FDD\u5BC6", +smile:"\u5FAE\u7B11", +surprised:"\u9A5A\u5687", +tongue_out:"\u5410\u820C\u982D", +undecided:"\u601D\u8003", +wink:"\u7728\u773C", +yell:"\u53EB\u56B7" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tw_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tw_dlg.js new file mode 100644 index 00000000..48b19adc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/tw_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('tw.emotions_dlg',{ +title:"\u63D2\u5165\u8868\u60C5\u7B26\u865F", +desc:"\u8868\u60C5\u7B26\u865F", +cool:"\u51B7\u9177", +cry:"\u54ED\u6CE3", +embarassed:"\u5C37\u5C2C", +foot_in_mouth:"\u54A7\u5634", +frown:"\u76BA\u7709", +innocent:"\u5929\u771F", +kiss:"\u543B", +laughing:"\u5927\u7B11", +money_mouth:"\u767C\u8CA1", +sealed:"\u4FDD\u5BC6", +smile:"\u5FAE\u7B11", +surprised:"\u9A5A\u5687", +tongue_out:"\u5410\u820C\u982D", +undecided:"\u8003\u616E", +wink:"\u7728\u773C", +yell:"\u53EB\u56B7" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/uk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/uk_dlg.js new file mode 100644 index 00000000..bedb694f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/uk_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('uk.emotions_dlg',{ +title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0441\u043C\u0430\u0439\u043B", +desc:"\u0421\u043C\u0430\u0439\u043B\u0438", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/vi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/vi_dlg.js new file mode 100644 index 00000000..6cd56f17 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/vi_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('vi.emotions_dlg',{ +title:"Ch\u00E8n bi\u1EC3u t\u01B0\u1EE3ng c\u1EA3m x\u00FAc", +desc:"Bi\u1EC3u t\u01B0\u1EE3ng c\u1EA3m x\u00FAc", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/zh_cn.js deleted file mode 100644 index ab36dd08..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/zh_cn.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_insert_emotions_title'] = '²åÈë±íÇé'; -tinyMCELang['lang_emotions_desc'] = '±íÇé'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/zh_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/zh_dlg.js new file mode 100644 index 00000000..1ed28cc3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/langs/zh_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('zh.emotions_dlg',{ +title:"\u63D2\u5165\u8868\u60C5\u7B26\u53F7", +desc:"\u8868\u60C5\u7B26\u53F7", +cool:"\u51B7\u9177", +cry:"\u54ED\u6CE3", +embarassed:"\u5C34\u5C2C", +foot_in_mouth:"\u54A7\u5634", +frown:"\u76B1\u7709", +innocent:"\u5929\u771F", +kiss:"\u543B", +laughing:"\u5927\u7B11", +money_mouth:"\u53D1\u8D22", +sealed:"\u4FDD\u5BC6", +smile:"\u5FAE\u7B11", +surprised:"\u60CA\u5413", +tongue_out:"\u5410\u820C\u5934", +undecided:"\u8003\u8651", +wink:"\u7728\u773C", +yell:"\u53EB\u56B7" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/emotions/readme.txt deleted file mode 100644 index 71d5f4d7..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/emotions/readme.txt +++ /dev/null @@ -1,20 +0,0 @@ - Emotions plugin for TinyMCE ------------------------------- - -Installation instructions: - * Copy the emotions directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "emotions". - * Add the emotions button name to button list, example: theme_advanced_buttons3_add : "emotions". - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "emotions", - theme_advanced_buttons3_add : "emotions" - }); - -Copyright notice: - These emotions where taken from Mozilla Thunderbird. - I hope they don't get angry if I use them here after all this is a open source project - aswell and I realy love their product. diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/example/dialog.htm b/includes/tinymce/jscripts/tiny_mce/plugins/example/dialog.htm new file mode 100644 index 00000000..b4c62840 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/example/dialog.htm @@ -0,0 +1,27 @@ + + + + {#example_dlg.title} + + + + + +
+

Here is a example dialog.

+

Selected text:

+

Custom arg:

+ +
+
+ +
+ +
+ +
+
+
+ + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js new file mode 100644 index 00000000..cb7010d1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.PluginManager.requireLangPack('example');tinymce.create('tinymce.plugins.ExamplePlugin',{init:function(ed,url){ed.addCommand('mceExample',function(){ed.windowManager.open({file:url+'/dialog.htm',width:320+parseInt(ed.getLang('example.delta_width',0)),height:120+parseInt(ed.getLang('example.delta_height',0)),inline:1},{plugin_url:url,some_custom_arg:'custom arg'});});ed.addButton('example',{title:'example.desc',cmd:'mceExample',image:url+'/img/example.gif'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('example',n.nodeName=='IMG');});},createControl:function(n,cm){return null;},getInfo:function(){return{longname:'Example plugin',author:'Some author',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',version:"1.0"};}});tinymce.PluginManager.add('example',tinymce.plugins.ExamplePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin_src.js new file mode 100644 index 00000000..50505504 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin_src.js @@ -0,0 +1,81 @@ +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + // Load plugin specific language pack + tinymce.PluginManager.requireLangPack('example'); + + tinymce.create('tinymce.plugins.ExamplePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceExample', function() { + ed.windowManager.open({ + file : url + '/dialog.htm', + width : 320 + parseInt(ed.getLang('example.delta_width', 0)), + height : 120 + parseInt(ed.getLang('example.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, // Plugin absolute URL + some_custom_arg : 'custom arg' // Custom argument + }); + }); + + // Register example button + ed.addButton('example', { + title : 'example.desc', + cmd : 'mceExample', + image : url + '/img/example.gif' + }); + + // Add a node change handler, selects the button in the UI when a image is selected + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('example', n.nodeName == 'IMG'); + }); + }, + + /** + * Creates control instances based in the incomming name. This method is normally not + * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons + * but you sometimes need to create more complex controls like listboxes, split buttons etc then this + * method can be used to create those. + * + * @param {String} n Name of the control to create. + * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. + * @return {tinymce.ui.Control} New control instance or null if no control was created. + */ + createControl : function(n, cm) { + return null; + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Example plugin', + author : 'Some author', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example', + version : "1.0" + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/example/img/example.gif b/includes/tinymce/jscripts/tiny_mce/plugins/example/img/example.gif new file mode 100644 index 00000000..1ab5da44 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/example/img/example.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js b/includes/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js new file mode 100644 index 00000000..fa834113 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js @@ -0,0 +1,19 @@ +tinyMCEPopup.requireLangPack(); + +var ExampleDialog = { + init : function() { + var f = document.forms[0]; + + // Get the selected contents as text and place it in the input + f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); + f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); + }, + + insert : function() { + // Insert the contents from the input into the document + tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/example/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/example/langs/en.js new file mode 100644 index 00000000..e0784f80 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/example/langs/en.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example',{ + desc : 'This is just a template button' +}); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/example/langs/en_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/example/langs/en_dlg.js new file mode 100644 index 00000000..ebcf948d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/example/langs/en_dlg.js @@ -0,0 +1,3 @@ +tinyMCE.addI18n('en.example_dlg',{ + title : 'This is just a example title' +}); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/editor_plugin.js deleted file mode 100644 index 392ab08b..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/editor_plugin.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('flash','en,de,sv,zh_cn,cs,fa,fr_ca,fr');function TinyMCE_flash_getControlHTML(control_name){switch(control_name){case "flash":return '';}return "";}function TinyMCE_flash_parseAttributes(attribute_string){var attributeName="";var attributeValue="";var withInName;var withInValue;var attributes=new Array();var whiteSpaceRegExp=new RegExp('^[ \n\r\t]+','g');if(attribute_string==null||attribute_string.length<2)return null;withInName=withInValue=false;for(var i=0;i','gi'),'');content=content.replace(new RegExp('<[ ]*object','gi'),'','gi'),'');while((startPos=content.indexOf('',startPos);var attribs=TinyMCE_flash_parseAttributes(content.substring(startPos+6,endPos));embedList[embedList.length]=attribs;}var index=0;while((startPos=content.indexOf('',startPos);endPos=content.indexOf('/>',endPos);if(endPos==-1){endPos=content.indexOf('',endPos);endPos+=8;}else endPos+=2;if(index>=embedList.length)break;var attribs=embedList[index];var contentAfter=content.substring(endPos+1);content=content.substring(0,startPos);content+=''+content.substring(endPos+1);content+=contentAfter;index++;startPos++;}break;case "get_from_editor":var startPos=0;while((startPos=content.indexOf('',startPos);var attribs=TinyMCE_flash_parseAttributes(content.substring(startPos+4,endPos));if(attribs['name']!="mce_plugin_flash")break;endPos+=2;var embedHTML='';embedHTML+='';embedHTML+='';embedHTML+='';embedHTML+='';embedHTML+='';content=content.substring(0,startPos)+embedHTML+content.substring(endPos+1);startPos++;}break;}return content;}function TinyMCE_flash_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}tinyMCE.switchClassSticky(editor_id+'_flash','mceButtonNormal');if(node==null)return;do{if(node.nodeName.toLowerCase()=="img"&&getAttrib(node,'name').indexOf('mce_plugin_flash')==0)tinyMCE.switchClassSticky(editor_id+'_flash','mceButtonSelected');}while((node=node.parentNode));return true;} \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/editor_plugin_src.js deleted file mode 100644 index deeb2de9..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/editor_plugin_src.js +++ /dev/null @@ -1,213 +0,0 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('flash', 'en,de,sv,zh_cn,cs,fa,fr_ca,fr'); - -function TinyMCE_flash_getControlHTML(control_name) { - switch (control_name) { - case "flash": - return ''; - } - - return ""; -} - -function TinyMCE_flash_parseAttributes(attribute_string) { - var attributeName = ""; - var attributeValue = ""; - var withInName; - var withInValue; - var attributes = new Array(); - var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g'); - - if (attribute_string == null || attribute_string.length < 2) - return null; - - withInName = withInValue = false; - - for (var i=0; i','gi'),''); - content = content.replace(new RegExp('<[ ]*object','gi'),'','gi'),''); - - // Parse all embed tags - while ((startPos = content.indexOf('', startPos); - var attribs = TinyMCE_flash_parseAttributes(content.substring(startPos + 6, endPos)); - embedList[embedList.length] = attribs; - } - - // Parse all object tags and replace them with images from the embed data - var index = 0; - while ((startPos = content.indexOf('', startPos); - - // Find end of embed - endPos = content.indexOf('/>', endPos); - if (endPos == -1) { - endPos = content.indexOf('', endPos); - endPos += 8; - } else - endPos += 2; - - if (index >= embedList.length) - break; - - var attribs = embedList[index]; - - // Insert image - var contentAfter = content.substring(endPos+1); - content = content.substring(0, startPos); - content += '' + content.substring(endPos+1); - content += contentAfter; - index++; - - startPos++; - } - break; - - case "get_from_editor": - // Parse all img tags and replace them with object+embed - var startPos = 0; - while ((startPos = content.indexOf('', startPos); - var attribs = TinyMCE_flash_parseAttributes(content.substring(startPos + 4, endPos)); - - // Is not flash - if (attribs['name'] != "mce_plugin_flash") - break; - - endPos += 2; - - var embedHTML = ''; - - // Insert object + embed - embedHTML += ''; - embedHTML += ''; - embedHTML += ''; - embedHTML += ''; - embedHTML += ''; - -/* - - - - - - - -*/ - - content = content.substring(0, startPos) + embedHTML + content.substring(endPos+1); - - startPos++; - } - break; - } - - // Pass through to next handler in chain - return content; -} - -function TinyMCE_flash_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - function getAttrib(elm, name) { - return elm.getAttribute(name) ? elm.getAttribute(name) : ""; - } - - tinyMCE.switchClassSticky(editor_id + '_flash', 'mceButtonNormal'); - - if (node == null) - return; - - do { - if (node.nodeName.toLowerCase() == "img" && getAttrib(node, 'name').indexOf('mce_plugin_flash') == 0) - tinyMCE.switchClassSticky(editor_id + '_flash', 'mceButtonSelected'); - } while ((node = node.parentNode)); - - return true; -} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/flash.htm b/includes/tinymce/jscripts/tiny_mce/plugins/flash/flash.htm deleted file mode 100644 index 6864d569..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/flash.htm +++ /dev/null @@ -1,169 +0,0 @@ - - - - -{$lang_insert_flash} - - - - - - -
- - - - - - - - - - - - - - - -
{$lang_insert_flash}

- - - - - - - - - - - -
{$lang_insert_flash_file}: - - - - - -
-
{$lang_insert_flash_size}: - -  x  - -

- -
-
- - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/images/flash.gif b/includes/tinymce/jscripts/tiny_mce/plugins/flash/images/flash.gif deleted file mode 100644 index 4950e673..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/flash/images/flash.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/cs.js deleted file mode 100644 index c408809d..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/cs.js +++ /dev/null @@ -1,5 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insert_flash'] = 'Vložit/editovat Flash Movie'; -tinyMCELang['lang_insert_flash_file'] = 'Flash soubor (.swf)'; -tinyMCELang['lang_insert_flash_size'] = 'Velikost'; \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/de.js deleted file mode 100644 index db106f4f..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/de.js +++ /dev/null @@ -1,6 +0,0 @@ -// DE lang variables - -tinyMCELang['lang_insert_flash'] = 'Flash Movie einfügen / bearbeiten'; -tinyMCELang['lang_insert_flash_file'] = 'Flash-Datei'; -tinyMCELang['lang_insert_flash_size'] = 'Größe'; -tinyMCELang['lang_insert_flash_list'] = 'Flash Dateien'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/en.js deleted file mode 100644 index b34e8b5b..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/en.js +++ /dev/null @@ -1,6 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insert_flash'] = 'Insert / edit Flash Movie'; -tinyMCELang['lang_insert_flash_file'] = 'Flash-File (.swf)'; -tinyMCELang['lang_insert_flash_size'] = 'Size'; -tinyMCELang['lang_insert_flash_list'] = 'Flash files'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fa.js deleted file mode 100644 index 4caa3717..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fa.js +++ /dev/null @@ -1,10 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_insert_flash'] = 'اÙزودن Ùˆ ویرایش Ùایل Ùلش'; -tinyMCELang['lang_insert_flash_file'] = 'Ùایل Ùلش (.swf)'; -tinyMCELang['lang_insert_flash_size'] = 'ابعاد'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fr.js deleted file mode 100644 index cdcd38c6..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fr.js +++ /dev/null @@ -1,6 +0,0 @@ -// French lang variables by Laurent Dran - -tinyMCELang['lang_insert_flash'] = 'Insérer / éditer une animation Flash'; -tinyMCELang['lang_insert_flash_file'] = 'Fichier-Flash (.swf)'; -tinyMCELang['lang_insert_flash_size'] = 'Taille'; -tinyMCELang['lang_insert_flash_list'] = 'Fichiers Flash'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fr_ca.js deleted file mode 100644 index f2e46fc7..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/fr_ca.js +++ /dev/null @@ -1,5 +0,0 @@ -// CA_FR lang variables - -tinyMCELang['lang_insert_flash'] = 'Insérer / Modifier une animation Flash'; -tinyMCELang['lang_insert_flash_file'] = 'Fichier Flash (.swf)'; -tinyMCELang['lang_insert_flash_size'] = 'Dimension'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/sv.js deleted file mode 100644 index 8fb32022..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/sv.js +++ /dev/null @@ -1,6 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_insert_flash'] = 'Skapa / uppdatera flash film'; -tinyMCELang['lang_insert_flash_file'] = 'Flash film (.swf)'; -tinyMCELang['lang_insert_flash_size'] = 'Storlek'; -tinyMCELang['lang_insert_flash_list'] = 'Flash filer'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/zh_cn.js deleted file mode 100644 index cef37551..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/langs/zh_cn.js +++ /dev/null @@ -1,6 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_insert_flash'] = '²åÈë/±à¼­ FlashµçÓ°'; -tinyMCELang['lang_insert_flash_file'] = 'FlashÎļþ(.swf)'; -tinyMCELang['lang_insert_flash_size'] = '³ß´ç'; -tinyMCELang['lang_insert_flash_list'] = 'Flash files'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/flash/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/flash/readme.txt deleted file mode 100644 index a0ff3989..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/flash/readme.txt +++ /dev/null @@ -1,48 +0,0 @@ - FLASH plugin for TinyMCE ------------------------------ - -About: - This is the INSERT FLASH Dialog contributed by Michael Keck. - This one supports popup windows and targets. - -Note: - The placeholder for Flash is called 'mce_plugin_flash' and needs a class 'mce_plugin_flash' in the 'css_-style'. - Do not name another image 'name="mce_plugin_flash"! - -Installation instructions: - * Copy the flash directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "flash". - * Add this "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]" to extended_valid_elements option. - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "flash", - extended_valid_elements : "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]" - flash_external_list_url : "example_flash_list.js" // Optional URL to a list of Flash movies - }); - - ----------------------------------------------------------------- -ADDITIONAL NOTE: - -The flash plugin has been heavily modified (the original is editor_plugin_original.js) since the original did not play nicely with html content that -already contained existing flash tags and in fact stripped out the object -tags for existing flash html. The rewrite corrects this as well attempts -to preserve the existing flash tags where possible. The tinyMCE.init call -should be be something like: - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "flash", - extended_valid_elements : "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]" - }); - -Note the extra obj,param,embed attributes for the img tag. These attributes -are used to serialize data from existing flash tags so that they can be -properly restored. Editing a flash tag with the plugin will cause this -information to be lost (sorry !) but still produces a working flash nevertheless. - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css new file mode 100644 index 00000000..7a3334f0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css @@ -0,0 +1,182 @@ +/* Hide the advanced tab */ +#advanced_tab { + display: none; +} + +#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright { + width: 280px; +} + +#doctype, #docencoding { + width: 200px; +} + +#langcode { + width: 30px; +} + +#bgimage { + width: 220px; +} + +#fontface { + width: 240px; +} + +#leftmargin, #rightmargin, #topmargin, #bottommargin { + width: 50px; +} + +.panel_wrapper div.current { + height: 400px; +} + +#stylesheet, #style { + width: 240px; +} + +/* Head list classes */ + +.headlistwrapper { + width: 100%; +} + +.addbutton, .removebutton, .moveupbutton, .movedownbutton { + border-top: 1px solid; + border-left: 1px solid; + border-bottom: 1px solid; + border-right: 1px solid; + border-color: #F0F0EE; + cursor: default; + display: block; + width: 20px; + height: 20px; +} + +#doctypes { + width: 200px; +} + +.addbutton:hover, .removebutton:hover, .moveupbutton:hover, .movedownbutton:hover { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.addbutton { + background-image: url('../images/add.gif'); + float: left; + margin-right: 3px; +} + +.removebutton { + background-image: url('../images/remove.gif'); + float: left; +} + +.moveupbutton { + background-image: url('../images/move_up.gif'); + float: left; + margin-right: 3px; +} + +.movedownbutton { + background-image: url('../images/move_down.gif'); + float: left; +} + +.selected { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.toolbar { + width: 100%; +} + +#headlist { + width: 100%; + margin-top: 3px; + font-size: 11px; +} + +#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element { + display: none; +} + +#addmenu { + position: absolute; + border: 1px solid gray; + display: none; + z-index: 100; + background-color: white; +} + +#addmenu a { + display: block; + width: 100%; + line-height: 20px; + text-decoration: none; + background-color: white; +} + +#addmenu a:hover { + background-color: #B6BDD2; + color: black; +} + +#addmenu span { + padding-left: 10px; + padding-right: 10px; +} + +#updateElementPanel { + display: none; +} + +#script_element .panel_wrapper div.current { + height: 108px; +} + +#style_element .panel_wrapper div.current { + height: 108px; +} + +#link_element .panel_wrapper div.current { + height: 140px; +} + +#element_script_value { + width: 100%; + height: 100px; +} + +#element_comment_value { + width: 100%; + height: 120px; +} + +#element_style_value { + width: 100%; + height: 100px; +} + +#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title { + width: 250px; +} + +.updateElementButton { + margin-top: 3px; +} + +/* MSIE specific styles */ + +* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton { + width: 22px; + height: 22px; +} + +textarea { + height: 55px; +} + +.panel_wrapper div.current {height:420px;} \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js new file mode 100644 index 00000000..727beb57 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.FullPagePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceFullPageProperties',function(){ed.windowManager.open({file:url+'/fullpage.htm',width:430+parseInt(ed.getLang('fullpage.delta_width',0)),height:495+parseInt(ed.getLang('fullpage.delta_height',0)),inline:1},{plugin_url:url,head_html:t.head});});ed.addButton('fullpage',{title:'fullpage.desc',cmd:'mceFullPageProperties'});ed.onBeforeSetContent.add(t._setContent,t);ed.onSetContent.add(t._setBodyAttribs,t);ed.onGetContent.add(t._getContent,t);},getInfo:function(){return{longname:'Fullpage',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_setBodyAttribs:function(ed,o){var bdattr,i,len,kv,k,v,t,attr=this.head.match(/body(.*?)>/i);if(attr&&attr[1]){bdattr=attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(bdattr){for(i=0,len=bdattr.length;i',sp);t.head=c.substring(0,sp+1);ep=c.indexOf('\n';t.head+=ed.getParam('fullpage_default_doctype','');t.head+='\n\n\n'+ed.getParam('fullpage_default_title','Untitled document')+'\n';if(v=ed.getParam('fullpage_default_encoding'))t.head+='\n';if(v=ed.getParam('fullpage_default_font_family'))st+='font-family: '+v+';';if(v=ed.getParam('fullpage_default_font_size'))st+='font-size: '+v+';';if(v=ed.getParam('fullpage_default_text_color'))st+='color: '+v+';';t.head+='\n\n';t.foot='\n\n';}},_getContent:function(ed,o){var t=this;o.content=tinymce.trim(t.head)+'\n'+tinymce.trim(o.content)+'\n'+tinymce.trim(t.foot);}});tinymce.PluginManager.add('fullpage',tinymce.plugins.FullPagePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js new file mode 100644 index 00000000..019682d6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js @@ -0,0 +1,142 @@ +/** + * $Id: editor_plugin_src.js 920 2008-09-09 14:05:33Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.FullPagePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceFullPageProperties', function() { + ed.windowManager.open({ + file : url + '/fullpage.htm', + width : 430 + parseInt(ed.getLang('fullpage.delta_width', 0)), + height : 495 + parseInt(ed.getLang('fullpage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + head_html : t.head + }); + }); + + // Register buttons + ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'}); + + ed.onBeforeSetContent.add(t._setContent, t); + ed.onSetContent.add(t._setBodyAttribs, t); + ed.onGetContent.add(t._getContent, t); + }, + + getInfo : function() { + return { + longname : 'Fullpage', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private plugin internal methods + + _setBodyAttribs : function(ed, o) { + var bdattr, i, len, kv, k, v, t, attr = this.head.match(/body(.*?)>/i); + + if (attr && attr[1]) { + bdattr = attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g); + + if (bdattr) { + for(i = 0, len = bdattr.length; i < len; i++) { + kv = bdattr[i].split('='); + k = kv[0].replace(/\s/,''); + v = kv[1]; + + if (v) { + v = v.replace(/^\s+/,'').replace(/\s+$/,''); + t = v.match(/^["'](.*)["']$/); + + if (t) + v = t[1]; + } else + v = k; + + ed.dom.setAttrib(ed.getBody(), 'style', v); + } + } + } + }, + + _createSerializer : function() { + return new tinymce.dom.Serializer({ + dom : this.editor.dom, + apply_source_formatting : true + }); + }, + + _setContent : function(ed, o) { + var t = this, sp, ep, c = o.content, v, st = ''; + + // Parse out head, body and footer + c = c.replace(/<(\/?)BODY/gi, '<$1body'); + sp = c.indexOf('', sp); + t.head = c.substring(0, sp + 1); + + ep = c.indexOf('\n'; + + t.head += ed.getParam('fullpage_default_doctype', ''); + t.head += '\n\n\n' + ed.getParam('fullpage_default_title', 'Untitled document') + '\n'; + + if (v = ed.getParam('fullpage_default_encoding')) + t.head += '\n'; + + if (v = ed.getParam('fullpage_default_font_family')) + st += 'font-family: ' + v + ';'; + + if (v = ed.getParam('fullpage_default_font_size')) + st += 'font-size: ' + v + ';'; + + if (v = ed.getParam('fullpage_default_text_color')) + st += 'color: ' + v + ';'; + + t.head += '\n\n'; + t.foot = '\n\n'; + } + }, + + _getContent : function(ed, o) { + var t = this; + + o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot); + } + }); + + // Register plugin + tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm new file mode 100644 index 00000000..d74da0d7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm @@ -0,0 +1,577 @@ + + + + {#fullpage_dlg.title} + + + + + + + + +
+ + +
+
+
+ {#fullpage_dlg.meta_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
 
 
 
 
  + +
+
+ +
+ {#fullpage_dlg.langprops} + + + + + + + + + + + + + + + + + + + + + + +
+ +
  + +
 
+ +
 
+
+
+ +
+
+ {#fullpage_dlg.appearance_textprops} + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + + +
 
+
+
+ +
+ {#fullpage_dlg.appearance_bgprops} + + + + + + + + + + +
+ + + + + +
 
+
+ + + + + +
 
+
+
+ +
+ {#fullpage_dlg.appearance_marginprops} + + + + + + + + + + + + + + +
+
+ +
+ {#fullpage_dlg.appearance_linkprops} + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + +
 
+
+ + + + + +
 
+
  
+
+ +
+ {#fullpage_dlg.appearance_style} + + + + + + + + + + +
+ + + + +
 
+
+
+ +
+ + +
+ {#fullpage_dlg.head_elements} + +
+
+
+ + +
+
+ + +
+
+
+ +
+
+ +
+ {#fullpage_dlg.meta_element} + + + + + + + + + + + + + + +
+ + +
+ +
+ {#fullpage_dlg.title_element} + + + + + + +
+ + +
+ +
+ {#fullpage_dlg.script_element} + + + +
+ +
+
+ + + + + + + + + + + + + + + + + +
+ + + + +
 
+
+ +
+ +
+
+ + +
+ +
+ {#fullpage_dlg.style_element} + + + +
+ +
+
+ + + + + + + + + +
+
+ +
+ +
+
+ + +
+ +
+ {#fullpage_dlg.base_element} + + + + + + + + + + +
+ + +
+ + + +
+ {#fullpage_dlg.comment_element} + + + + +
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js new file mode 100644 index 00000000..89059ef6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js @@ -0,0 +1,461 @@ +tinyMCEPopup.requireLangPack(); + +var doc; + +var defaultDocTypes = + 'XHTML 1.0 Transitional=,' + + 'XHTML 1.0 Frameset=,' + + 'XHTML 1.0 Strict=,' + + 'XHTML 1.1=,' + + 'HTML 4.01 Transitional=,' + + 'HTML 4.01 Strict=,' + + 'HTML 4.01 Frameset='; + +var defaultEncodings = + 'Western european (iso-8859-1)=iso-8859-1,' + + 'Central European (iso-8859-2)=iso-8859-2,' + + 'Unicode (UTF-8)=utf-8,' + + 'Chinese traditional (Big5)=big5,' + + 'Cyrillic (iso-8859-5)=iso-8859-5,' + + 'Japanese (iso-2022-jp)=iso-2022-jp,' + + 'Greek (iso-8859-7)=iso-8859-7,' + + 'Korean (iso-2022-kr)=iso-2022-kr,' + + 'ASCII (us-ascii)=us-ascii'; + +var defaultMediaTypes = + 'all=all,' + + 'screen=screen,' + + 'print=print,' + + 'tty=tty,' + + 'tv=tv,' + + 'projection=projection,' + + 'handheld=handheld,' + + 'braille=braille,' + + 'aural=aural'; + +var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; +var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; + +function init() { + var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style; + + // Setup doctype select box + doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(','); + for (i=0; i 1) + addSelectValue(f, 'doctypes', p[0], p[1]); + } + + // Setup fonts select box + fonts = ed.getParam("fullpage_fonts", defaultFontNames).split(';'); + for (i=0; i 1) + addSelectValue(f, 'fontface', p[0], p[1]); + } + + // Setup fontsize select box + fonts = ed.getParam("fullpage_fontsizes", defaultFontSizes).split(','); + for (i=0; i 1) { + addSelectValue(f, 'element_style_media', p[0], p[1]); + addSelectValue(f, 'element_link_media', p[0], p[1]); + } + } + + // Setup encodings select box + encodings = ed.getParam("fullpage_encodings", defaultEncodings).split(','); + for (i=0; i 1) { + addSelectValue(f, 'docencoding', p[0], p[1]); + addSelectValue(f, 'element_script_charset', p[0], p[1]); + addSelectValue(f, 'element_link_charset', p[0], p[1]); + } + } + + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); + //document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color'); + document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); + document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); + document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); + document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); + document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage'); + document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage'); + document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); + + // Resize some elements + if (isVisible('stylesheetbrowser')) + document.getElementById('stylesheet').style.width = '220px'; + + if (isVisible('link_href_browser')) + document.getElementById('element_link_href').style.width = '230px'; + + if (isVisible('bgimage_browser')) + document.getElementById('bgimage').style.width = '210px'; + + // Add iframe + dom.add(document.body, 'iframe', {id : 'documentIframe', src : 'javascript:""', style : {display : 'none'}}); + doc = dom.get('documentIframe').contentWindow.document; + h = tinyMCEPopup.getWindowArg('head_html'); + + // Preprocess the HTML disable scripts and urls + h = h.replace(/ + + + + +
+ +
+ + + + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js index 5401f234..06dae75d 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js @@ -1,2 +1 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('iespell','cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de');function TinyMCE_iespell_getControlHTML(control_name){if(control_name=="iespell"&&tinyMCE.isMSIE)return '';return "";}function TinyMCE_iespell_execCommand(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;} \ No newline at end of file +(function(){tinymce.create('tinymce.plugins.IESpell',{init:function(ed,url){var t=this,sp;if(!tinymce.isIE)return;t.editor=ed;ed.addCommand('mceIESpell',function(){try{sp=new ActiveXObject("ieSpell.ieSpellExtension");sp.CheckDocumentNode(ed.getDoc().documentElement);}catch(e){if(e.number==-2146827859){ed.windowManager.confirm(ed.getLang("iespell.download"),function(s){if(s)window.open('http://www.iespell.com/download.php','ieSpellDownload','');});}else ed.windowManager.alert("Error Loading ieSpell: Exception "+e.number);}});ed.addButton('iespell',{title:'iespell.iespell_desc',cmd:'mceIESpell'});},getInfo:function(){return{longname:'IESpell (IE Only)',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('iespell',tinymce.plugins.IESpell);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js index 7b184f8f..a68f69a2 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js @@ -1,37 +1,51 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('iespell', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de'); - -/** - * Returns the HTML contents of the iespell control. - */ -function TinyMCE_iespell_getControlHTML(control_name) { - // Is it the iespell control and is the brower MSIE. - if (control_name == "iespell" && tinyMCE.isMSIE) - return ''; - - return ""; -} - -/** - * Executes the mceIESpell command. - */ -function TinyMCE_iespell_execCommand(editor_id, element, command, user_interface, value) { - // Handle ieSpellCommand - if (command == "mceIESpell") { - try { - var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension"); - ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement); - } catch (e) { - if (e.number == -2146827859) { - if (confirm(tinyMCE.getLang("lang_iespell_download", "", true))) - window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); - } else - alert("Error Loading ieSpell: Exception " + e.number); - } - - return true; - } - - // Pass to next handler in chain - return false; -} \ No newline at end of file +/** + * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.IESpell', { + init : function(ed, url) { + var t = this, sp; + + if (!tinymce.isIE) + return; + + t.editor = ed; + + // Register commands + ed.addCommand('mceIESpell', function() { + try { + sp = new ActiveXObject("ieSpell.ieSpellExtension"); + sp.CheckDocumentNode(ed.getDoc().documentElement); + } catch (e) { + if (e.number == -2146827859) { + ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { + if (s) + window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); + }); + } else + ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); + } + }); + + // Register buttons + ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); + }, + + getInfo : function() { + return { + longname : 'IESpell (IE Only)', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/images/iespell.gif b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/images/iespell.gif deleted file mode 100644 index 46c0c4a6..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/images/iespell.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/cs.js deleted file mode 100644 index 06e8c515..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/cs.js +++ /dev/null @@ -1,4 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_iespell_desc'] = 'Spustit kontrolu pravopisu'; -tinyMCELang['lang_iespell_download'] = "ieSpell nedetekován. Kliknìte na OK a otevøete stahovací stránku." \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/de.js deleted file mode 100644 index 4b1417b4..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/de.js +++ /dev/null @@ -1,4 +0,0 @@ -// DE lang variables by Tobias Heer - -tinyMCELang['lang_iespell_desc'] = 'Rechtschreibprüfung'; -tinyMCELang['lang_iespell_download'] = "ieSpell nicht gefunden. Klicken Sie OK um auf die Download Seite zu gelangen." diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/el.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/el.js deleted file mode 100644 index 83ac3b83..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/el.js +++ /dev/null @@ -1,4 +0,0 @@ -// Greek lang variables by Jacaranda Bill - -tinyMCELang['lang_iespell_desc'] = 'Ïñèïãñáöéêüò Ýëåã÷ïò'; -tinyMCELang['lang_iespell_download'] = "Ôï ðñüãñáììá ieSpell äåí âñÝèçêå. ÐáôÞóôå OK ãéá íá ìåôáâåßôå óôçí éóôïóåëßäá ëÞøçò ôïõ ðñïãñÜììáôïò." diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/en.js deleted file mode 100644 index d4fe21c6..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/en.js +++ /dev/null @@ -1,4 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_iespell_desc'] = 'Run spell checking'; -tinyMCELang['lang_iespell_download'] = "ieSpell not detected. Click OK to go to download page." diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/fr.js deleted file mode 100644 index ae0f273a..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/fr.js +++ /dev/null @@ -1,4 +0,0 @@ -// French lang variables by Laurent Dran - -tinyMCELang['lang_iespell_desc'] = 'Executer le vérificateur d\'orthographe'; -tinyMCELang['lang_iespell_download'] = "ieSpell n\'a pas été trouvé. Cliquez sur OK pour aller au site de téléchargement." diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/fr_ca.js deleted file mode 100644 index 2cef91be..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/fr_ca.js +++ /dev/null @@ -1,4 +0,0 @@ -// CAN_FR lang variables - -tinyMCELang['lang_iespell_desc'] = 'Executer le vérificateur d\'orthographe'; -tinyMCELang['lang_iespell_download'] = "ieSpell n\'a pas été trouvé. Cliquez sur OK pour aller au site de téléchargement."; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/it.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/it.js deleted file mode 100644 index 711ac6d9..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/it.js +++ /dev/null @@ -1,4 +0,0 @@ -// IT lang variables - -tinyMCELang['lang_iespell_desc'] = 'Avvia il controllo ortografico'; -tinyMCELang['lang_iespell_download'] = "ieSpell non trovato. Clicca OK per andare alla pagina di download." diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/ko.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/ko.js deleted file mode 100644 index c66f4de8..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/ko.js +++ /dev/null @@ -1,4 +0,0 @@ -// KO lang variables - -tinyMCELang['lang_iespell_desc'] = '¸ÂÃã¹ý °Ë»ç ½ÇÇà'; -tinyMCELang['lang_iespell_download'] = "ieSpellÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù. OK¸¦ ´©¸£¸é ´Ù¿î·Îµå ÆäÀÌÁö·Î À̵¿ÇÕ´Ï´Ù." diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/sv.js deleted file mode 100644 index f77b39ff..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/sv.js +++ /dev/null @@ -1,4 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_iespell_desc'] = 'Kör rättstavningskontroll'; -tinyMCELang['lang_iespell_download'] = "ieSpell verkar inte vara installerad. Klicka OK för att ladda hem." diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/zh_cn.js deleted file mode 100644 index 41401203..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/langs/zh_cn.js +++ /dev/null @@ -1,4 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_iespell_desc'] = 'ÔËÐÐƴд¼ì²é'; -tinyMCELang['lang_iespell_download'] = "δ¼ì²âµ½ieSpellƴд¼ì²é£¬µã»÷ OK Ç°ÍùÏÂÔØÒ³Ãæ¡£" diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/iespell/readme.txt deleted file mode 100644 index d87b47e6..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/iespell/readme.txt +++ /dev/null @@ -1,20 +0,0 @@ - ieSpell plugin for TinyMCE ----------------------------- - -Installation instructions: - * Copy the iespell directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "iespell". - * Add the iespell button name to button list, example: theme_advanced_buttons3_add : "iespell". - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "iespell", - theme_advanced_buttons3_add : "iespell" - }); - -Requirements: - The end user will need MSIE on Windows with the ieSpell installed. This can be downloaded - from http://www.iespell.com/download.php. Notice on other browsers than MSIE the spellchecking - button will not be visible. diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js new file mode 100644 index 00000000..5560b6b1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js @@ -0,0 +1 @@ +(function(){var DOM=tinymce.DOM,Element=tinymce.dom.Element,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.InlinePopups',{init:function(ed,url){ed.onBeforeRenderUI.add(function(){ed.windowManager=new tinymce.InlineWindowManager(ed);DOM.loadCSS(url+'/skins/'+(ed.settings.inlinepopups_skin||'clearlooks2')+"/window.css");});},getInfo:function(){return{longname:'InlinePopups',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager',{InlineWindowManager:function(ed){var t=this;t.parent(ed);t.zIndex=300000;t.count=0;t.windows={};},open:function(f,p){var t=this,id,opt='',ed=t.editor,dw=0,dh=0,vp,po,mdf,clf,we,w,u;f=f||{};p=p||{};if(!f.inline)return t.parent(f,p);if(!f.type)t.bookmark=ed.selection.getBookmark('simple');id=DOM.uniqueId();vp=DOM.getViewPort();f.width=parseInt(f.width||320);f.height=parseInt(f.height||240)+(tinymce.isIE?8:0);f.min_width=parseInt(f.min_width||150);f.min_height=parseInt(f.min_height||100);f.max_width=parseInt(f.max_width||2000);f.max_height=parseInt(f.max_height||2000);f.left=f.left||Math.round(Math.max(vp.x,vp.x+(vp.w/ 2.0) - (f.width /2.0)));f.top=f.top||Math.round(Math.max(vp.y,vp.y+(vp.h/ 2.0) - (f.height /2.0)));f.movable=f.resizable=true;p.mce_width=f.width;p.mce_height=f.height;p.mce_inline=true;p.mce_window_id=id;p.mce_auto_focus=f.auto_focus;t.features=f;t.params=p;t.onOpen.dispatch(t,f,p);if(f.type){opt+=' mceModal';if(f.type)opt+=' mce'+f.type.substring(0,1).toUpperCase()+f.type.substring(1);f.resizable=false;}if(f.statusbar)opt+=' mceStatusbar';if(f.resizable)opt+=' mceResizable';if(f.minimizable)opt+=' mceMinimizable';if(f.maximizable)opt+=' mceMaximizable';if(f.movable)opt+=' mceMovable';t._addAll(DOM.doc.body,['div',{id:id,'class':ed.settings.inlinepopups_skin||'clearlooks2',style:'width:100px;height:100px'},['div',{id:id+'_wrapper','class':'mceWrapper'+opt},['div',{id:id+'_top','class':'mceTop'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_title'},f.title||'']],['div',{id:id+'_middle','class':'mceMiddle'},['div',{id:id+'_left','class':'mceLeft'}],['span',{id:id+'_content'}],['div',{id:id+'_right','class':'mceRight'}]],['div',{id:id+'_bottom','class':'mceBottom'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_status'},'Content']],['a',{'class':'mceMove',tabindex:'-1',href:'javascript:;'}],['a',{'class':'mceMin',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMax',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMed',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceClose',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{id:id+'_resize_n','class':'mceResize mceResizeN',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_s','class':'mceResize mceResizeS',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_w','class':'mceResize mceResizeW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_e','class':'mceResize mceResizeE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_nw','class':'mceResize mceResizeNW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_ne','class':'mceResize mceResizeNE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_sw','class':'mceResize mceResizeSW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_se','class':'mceResize mceResizeSE',tabindex:'-1',href:'javascript:;'}]]]);DOM.setStyles(id,{top:-10000,left:-10000});if(tinymce.isGecko)DOM.setStyle(id,'overflow','auto');if(!f.type){dw+=DOM.get(id+'_left').clientWidth;dw+=DOM.get(id+'_right').clientWidth;dh+=DOM.get(id+'_top').clientHeight;dh+=DOM.get(id+'_bottom').clientHeight;}DOM.setStyles(id,{top:f.top,left:f.left,width:f.width+dw,height:f.height+dh});u=f.url||f.file;if(u){if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);}if(!f.type){DOM.add(id+'_content','iframe',{id:id+'_ifr',src:'javascript:""',frameBorder:0,style:'border:0;width:10px;height:10px'});DOM.setStyles(id+'_ifr',{width:f.width,height:f.height});DOM.setAttrib(id+'_ifr','src',u);}else{DOM.add(id+'_wrapper','a',{id:id+'_ok','class':'mceButton mceOk',href:'javascript:;',onmousedown:'return false;'},'Ok');if(f.type=='confirm')DOM.add(id+'_wrapper','a',{'class':'mceButton mceCancel',href:'javascript:;',onmousedown:'return false;'},'Cancel');DOM.add(id+'_middle','div',{'class':'mceIcon'});DOM.setHTML(id+'_content',f.content.replace('\n','
'));}mdf=Event.add(id,'mousedown',function(e){var n=e.target,w,vp;w=t.windows[id];t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){if(n.className=='mceMax'){w.oldPos=w.element.getXY();w.oldSize=w.element.getSize();vp=DOM.getViewPort();vp.w-=2;vp.h-=2;w.element.moveTo(vp.x,vp.y);w.element.resizeTo(vp.w,vp.h);DOM.setStyles(id+'_ifr',{width:vp.w-w.deltaWidth,height:vp.h-w.deltaHeight});DOM.addClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMed'){w.element.moveTo(w.oldPos.x,w.oldPos.y);w.element.resizeTo(w.oldSize.w,w.oldSize.h);w.iframeElement.resizeTo(w.oldSize.w-w.deltaWidth,w.oldSize.h-w.deltaHeight);DOM.removeClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMove')return t._startDrag(id,e,n.className);else if(DOM.hasClass(n,'mceResize'))return t._startDrag(id,e,n.className.substring(13));}});clf=Event.add(id,'click',function(e){var n=e.target;t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){switch(n.className){case'mceClose':t.close(null,id);return Event.cancel(e);case'mceButton mceOk':case'mceButton mceCancel':f.button_func(n.className=='mceButton mceOk');return Event.cancel(e);}}});w=t.windows[id]={id:id,mousedown_func:mdf,click_func:clf,element:new Element(id,{blocker:1,container:ed.getContainer()}),iframeElement:new Element(id+'_ifr'),features:f,deltaWidth:dw,deltaHeight:dh};w.iframeElement.on('focus',function(){t.focus(id);});if(t.count==0&&t.editor.getParam('dialog_type','modal')=='modal'){DOM.add(DOM.doc.body,'div',{id:'mceModalBlocker','class':(t.editor.settings.inlinepopups_skin||'clearlooks2')+'_modalBlocker',style:{zIndex:t.zIndex-1}});DOM.show('mceModalBlocker');}else DOM.setStyle('mceModalBlocker','z-index',t.zIndex-1);if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceModalBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});t.focus(id);t._fixIELayout(id,1);if(DOM.get(id+'_ok'))DOM.get(id+'_ok').focus();t.count++;return w;},focus:function(id){var t=this,w;if(w=t.windows[id]){w.zIndex=this.zIndex++;w.element.setStyle('zIndex',w.zIndex);w.element.update();id=id+'_wrapper';DOM.removeClass(t.lastId,'mceFocus');DOM.addClass(id,'mceFocus');t.lastId=id;}},_addAll:function(te,ne){var i,n,t=this,dom=tinymce.DOM;if(is(ne,'string'))te.appendChild(dom.doc.createTextNode(ne));else if(ne.length){te=te.appendChild(dom.create(ne[0],ne[1]));for(i=2;iix){fw=w;ix=w.zIndex;}});if(fw)t.focus(fw.id);}},setTitle:function(w,ti){var e;w=this._findId(w);if(e=DOM.get(w+'_title'))e.innerHTML=DOM.encode(ti);},alert:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'alert',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},confirm:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'confirm',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},_findId:function(w){var t=this;if(typeof(w)=='string')return w;each(t.windows,function(wo){var ifr=DOM.get(wo.id+'_ifr');if(ifr&&w==ifr.contentWindow){w=wo.id;return false;}});return w;},_fixIELayout:function(id,s){var w,img;if(!tinymce.isIE6)return;each(['n','s','w','e','nw','ne','sw','se'],function(v){var e=DOM.get(id+'_resize_'+v);DOM.setStyles(e,{width:s?e.clientWidth:'',height:s?e.clientHeight:'',cursor:DOM.getStyle(e,'cursor',1)});DOM.setStyle(id+"_bottom",'bottom','-1px');e=0;});if(w=this.windows[id]){w.element.hide();w.element.show();each(DOM.select('div,a',id),function(e,i){if(e.currentStyle.backgroundImage!='none'){img=new Image();img.src=e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,'$1');}});DOM.get(id).style.filter='';}}});tinymce.PluginManager.add('inlinepopups',tinymce.plugins.InlinePopups);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js new file mode 100644 index 00000000..027a23cd --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js @@ -0,0 +1,632 @@ +/** + * $Id: editor_plugin_src.js 961 2008-11-14 10:31:07Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; + + tinymce.create('tinymce.plugins.InlinePopups', { + init : function(ed, url) { + // Replace window manager + ed.onBeforeRenderUI.add(function() { + ed.windowManager = new tinymce.InlineWindowManager(ed); + DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css"); + }); + }, + + getInfo : function() { + return { + longname : 'InlinePopups', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', { + InlineWindowManager : function(ed) { + var t = this; + + t.parent(ed); + t.zIndex = 300000; + t.count = 0; + t.windows = {}; + }, + + open : function(f, p) { + var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u; + + f = f || {}; + p = p || {}; + + // Run native windows + if (!f.inline) + return t.parent(f, p); + + // Only store selection if the type is a normal window + if (!f.type) + t.bookmark = ed.selection.getBookmark('simple'); + + id = DOM.uniqueId(); + vp = DOM.getViewPort(); + f.width = parseInt(f.width || 320); + f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0); + f.min_width = parseInt(f.min_width || 150); + f.min_height = parseInt(f.min_height || 100); + f.max_width = parseInt(f.max_width || 2000); + f.max_height = parseInt(f.max_height || 2000); + f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0))); + f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0))); + f.movable = f.resizable = true; + p.mce_width = f.width; + p.mce_height = f.height; + p.mce_inline = true; + p.mce_window_id = id; + p.mce_auto_focus = f.auto_focus; + + // Transpose +// po = DOM.getPos(ed.getContainer()); +// f.left -= po.x; +// f.top -= po.y; + + t.features = f; + t.params = p; + t.onOpen.dispatch(t, f, p); + + if (f.type) { + opt += ' mceModal'; + + if (f.type) + opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1); + + f.resizable = false; + } + + if (f.statusbar) + opt += ' mceStatusbar'; + + if (f.resizable) + opt += ' mceResizable'; + + if (f.minimizable) + opt += ' mceMinimizable'; + + if (f.maximizable) + opt += ' mceMaximizable'; + + if (f.movable) + opt += ' mceMovable'; + + // Create DOM objects + t._addAll(DOM.doc.body, + ['div', {id : id, 'class' : ed.settings.inlinepopups_skin || 'clearlooks2', style : 'width:100px;height:100px'}, + ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, + ['div', {id : id + '_top', 'class' : 'mceTop'}, + ['div', {'class' : 'mceLeft'}], + ['div', {'class' : 'mceCenter'}], + ['div', {'class' : 'mceRight'}], + ['span', {id : id + '_title'}, f.title || ''] + ], + + ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, + ['div', {id : id + '_left', 'class' : 'mceLeft'}], + ['span', {id : id + '_content'}], + ['div', {id : id + '_right', 'class' : 'mceRight'}] + ], + + ['div', {id : id + '_bottom', 'class' : 'mceBottom'}, + ['div', {'class' : 'mceLeft'}], + ['div', {'class' : 'mceCenter'}], + ['div', {'class' : 'mceRight'}], + ['span', {id : id + '_status'}, 'Content'] + ], + + ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}], + ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}] + ] + ] + ); + + DOM.setStyles(id, {top : -10000, left : -10000}); + + // Fix gecko rendering bug, where the editors iframe messed with window contents + if (tinymce.isGecko) + DOM.setStyle(id, 'overflow', 'auto'); + + // Measure borders + if (!f.type) { + dw += DOM.get(id + '_left').clientWidth; + dw += DOM.get(id + '_right').clientWidth; + dh += DOM.get(id + '_top').clientHeight; + dh += DOM.get(id + '_bottom').clientHeight; + } + + // Resize window + DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh}); + + u = f.url || f.file; + if (u) { + if (tinymce.relaxedDomain) + u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; + + u = tinymce._addVer(u); + } + + if (!f.type) { + DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'}); + DOM.setStyles(id + '_ifr', {width : f.width, height : f.height}); + DOM.setAttrib(id + '_ifr', 'src', u); + } else { + DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok'); + + if (f.type == 'confirm') + DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel'); + + DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'}); + DOM.setHTML(id + '_content', f.content.replace('\n', '
')); + } + + // Register events + mdf = Event.add(id, 'mousedown', function(e) { + var n = e.target, w, vp; + + w = t.windows[id]; + t.focus(id); + + if (n.nodeName == 'A' || n.nodeName == 'a') { + if (n.className == 'mceMax') { + w.oldPos = w.element.getXY(); + w.oldSize = w.element.getSize(); + + vp = DOM.getViewPort(); + + // Reduce viewport size to avoid scrollbars + vp.w -= 2; + vp.h -= 2; + + w.element.moveTo(vp.x, vp.y); + w.element.resizeTo(vp.w, vp.h); + DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight}); + DOM.addClass(id + '_wrapper', 'mceMaximized'); + } else if (n.className == 'mceMed') { + // Reset to old size + w.element.moveTo(w.oldPos.x, w.oldPos.y); + w.element.resizeTo(w.oldSize.w, w.oldSize.h); + w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight); + + DOM.removeClass(id + '_wrapper', 'mceMaximized'); + } else if (n.className == 'mceMove') + return t._startDrag(id, e, n.className); + else if (DOM.hasClass(n, 'mceResize')) + return t._startDrag(id, e, n.className.substring(13)); + } + }); + + clf = Event.add(id, 'click', function(e) { + var n = e.target; + + t.focus(id); + + if (n.nodeName == 'A' || n.nodeName == 'a') { + switch (n.className) { + case 'mceClose': + t.close(null, id); + return Event.cancel(e); + + case 'mceButton mceOk': + case 'mceButton mceCancel': + f.button_func(n.className == 'mceButton mceOk'); + return Event.cancel(e); + } + } + }); + + // Add window + w = t.windows[id] = { + id : id, + mousedown_func : mdf, + click_func : clf, + element : new Element(id, {blocker : 1, container : ed.getContainer()}), + iframeElement : new Element(id + '_ifr'), + features : f, + deltaWidth : dw, + deltaHeight : dh + }; + + w.iframeElement.on('focus', function() { + t.focus(id); + }); + + // Setup blocker + if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') { + DOM.add(DOM.doc.body, 'div', { + id : 'mceModalBlocker', + 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker', + style : {zIndex : t.zIndex - 1} + }); + + DOM.show('mceModalBlocker'); // Reduces flicker in IE + } else + DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); + + if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) + DOM.setStyles('mceModalBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2}); + + t.focus(id); + t._fixIELayout(id, 1); + + // Focus ok button + if (DOM.get(id + '_ok')) + DOM.get(id + '_ok').focus(); + + t.count++; + + return w; + }, + + focus : function(id) { + var t = this, w; + + if (w = t.windows[id]) { + w.zIndex = this.zIndex++; + w.element.setStyle('zIndex', w.zIndex); + w.element.update(); + + id = id + '_wrapper'; + DOM.removeClass(t.lastId, 'mceFocus'); + DOM.addClass(id, 'mceFocus'); + t.lastId = id; + } + }, + + _addAll : function(te, ne) { + var i, n, t = this, dom = tinymce.DOM; + + if (is(ne, 'string')) + te.appendChild(dom.doc.createTextNode(ne)); + else if (ne.length) { + te = te.appendChild(dom.create(ne[0], ne[1])); + + for (i=2; i ix) { + fw = w; + ix = w.zIndex; + } + }); + + if (fw) + t.focus(fw.id); + } + }, + + setTitle : function(w, ti) { + var e; + + w = this._findId(w); + + if (e = DOM.get(w + '_title')) + e.innerHTML = DOM.encode(ti); + }, + + alert : function(txt, cb, s) { + var t = this, w; + + w = t.open({ + title : t, + type : 'alert', + button_func : function(s) { + if (cb) + cb.call(s || t, s); + + t.close(null, w.id); + }, + content : DOM.encode(t.editor.getLang(txt, txt)), + inline : 1, + width : 400, + height : 130 + }); + }, + + confirm : function(txt, cb, s) { + var t = this, w; + + w = t.open({ + title : t, + type : 'confirm', + button_func : function(s) { + if (cb) + cb.call(s || t, s); + + t.close(null, w.id); + }, + content : DOM.encode(t.editor.getLang(txt, txt)), + inline : 1, + width : 400, + height : 130 + }); + }, + + // Internal functions + + _findId : function(w) { + var t = this; + + if (typeof(w) == 'string') + return w; + + each(t.windows, function(wo) { + var ifr = DOM.get(wo.id + '_ifr'); + + if (ifr && w == ifr.contentWindow) { + w = wo.id; + return false; + } + }); + + return w; + }, + + _fixIELayout : function(id, s) { + var w, img; + + if (!tinymce.isIE6) + return; + + // Fixes the bug where hover flickers and does odd things in IE6 + each(['n','s','w','e','nw','ne','sw','se'], function(v) { + var e = DOM.get(id + '_resize_' + v); + + DOM.setStyles(e, { + width : s ? e.clientWidth : '', + height : s ? e.clientHeight : '', + cursor : DOM.getStyle(e, 'cursor', 1) + }); + + DOM.setStyle(id + "_bottom", 'bottom', '-1px'); + + e = 0; + }); + + // Fixes graphics glitch + if (w = this.windows[id]) { + // Fixes rendering bug after resize + w.element.hide(); + w.element.show(); + + // Forced a repaint of the window + //DOM.get(id).style.filter = ''; + + // IE has a bug where images used in CSS won't get loaded + // sometimes when the cache in the browser is disabled + // This fix tries to solve it by loading the images using the image object + each(DOM.select('div,a', id), function(e, i) { + if (e.currentStyle.backgroundImage != 'none') { + img = new Image(); + img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1'); + } + }); + + DOM.get(id).style.filter = ''; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups); +})(); + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif new file mode 100644 index 00000000..94abd087 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif new file mode 100644 index 00000000..e671094c Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif new file mode 100644 index 00000000..6baf64ad Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif new file mode 100644 index 00000000..497307a8 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif new file mode 100644 index 00000000..c894b2e8 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif new file mode 100644 index 00000000..c2a2ad45 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif new file mode 100644 index 00000000..43a735f2 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css new file mode 100644 index 00000000..5e6fd7d3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css @@ -0,0 +1,90 @@ +/* Clearlooks 2 */ + +/* Reset */ +.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} + +/* General */ +.clearlooks2 {position:absolute; direction:ltr} +.clearlooks2 .mceWrapper {position:static} +.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%} +.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)} +.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none} + +/* Top */ +.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px} +.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)} +.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)} +.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0} +.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold} +.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0} +.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px} +.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0} +.clearlooks2 .mceFocus .mceTop span {color:#FFF} + +/* Middle */ +.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0} +.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)} +.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0} +.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF} +.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)} + +/* Bottom */ +.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px} +.clearlooks2 .mceBottom {left:0; bottom:0; width:100%} +.clearlooks2 .mceBottom div {top:0} +.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px} +.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px} +.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0} +.clearlooks2 .mceBottom span {display:none} +.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px} +.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0} +.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px} +.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0} +.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px} + +/* Actions */ +.clearlooks2 a {width:29px; height:16px; top:3px;} +.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0} +.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} +.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} +.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} +.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} +.clearlooks2 .mceMovable .mceMove {display:block} +.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px} +.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} +.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} +.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} +.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} +.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} + +/* Resize */ +.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} +.clearlooks2 .mceResizable .mceResize {display:block} +.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none} +.clearlooks2 .mceMinimizable .mceMin {display:block} +.clearlooks2 .mceMaximizable .mceMax {display:block} +.clearlooks2 .mceMaximized .mceMed {display:block} +.clearlooks2 .mceMaximized .mceMax {display:none} +.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} +.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize} +.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} +.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} +.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} +.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} +.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} +.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize} + +/* Alert/Confirm */ +.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} +.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} +.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} +.clearlooks2 a:hover {font-weight:bold;} +.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5} +.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} +.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} +.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} +.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} +.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/template.htm b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/template.htm new file mode 100644 index 00000000..f9ec6421 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/inlinepopups/template.htm @@ -0,0 +1,387 @@ + + + +Template for dialogs + + + + +
+
+
+
+
+
+
+ Blured +
+ +
+
+ Content +
+
+ +
+
+
+
+ Statusbar text. +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+ Focused +
+ +
+
+ Content +
+
+ +
+
+
+
+ Statusbar text. +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+ Statusbar +
+ +
+
+ Content +
+
+ +
+
+
+
+ Statusbar text. +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+ Statusbar, Resizable +
+ +
+
+ Content +
+
+ +
+
+
+
+ Statusbar text. +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+ Resizable, Maximizable +
+ +
+
+ Content +
+
+ +
+
+
+
+ Statusbar text. +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+ Blurred, Maximizable, Statusbar, Resizable +
+ +
+
+ Content +
+
+ +
+
+
+
+ Statusbar text. +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+ Maximized, Maximizable, Minimizable +
+ +
+
+ Content +
+
+ +
+
+
+
+ Statusbar text. +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+ Blured +
+ +
+
+ Content +
+
+ +
+
+
+
+ Statusbar text. +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+
+ Alert +
+ +
+
+ + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
+
+
+ +
+
+
+
+
+ + + Ok + +
+
+ +
+
+
+
+
+
+ Confirm +
+ +
+
+ + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
+
+
+ +
+
+
+
+
+ + + Ok + Cancel + +
+
+
+ + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js index 49b883a6..34d4ceca 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js @@ -1,2 +1 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('insertdatetime','cs,el,en,fr_ca,it,ko,sv,zh_cn,fa,fr,de');function TinyMCE_insertdatetime_getControlHTML(control_name){switch(control_name){case "insertdate":return '';case "inserttime":return '';}return "";}function TinyMCE_insertdatetime_execCommand(editor_id,element,command,user_interface,value){function addZeros(value,len){value=""+value;if(value.length'; - - case "inserttime": - return ''; - } - - return ""; -} - -/** - * Executes the mceInsertDate command. - */ -function TinyMCE_insertdatetime_execCommand(editor_id, element, command, user_interface, value) { - /* Adds zeros infront of value */ - function addZeros(value, len) { - value = "" + value; - - if (value.length < len) { - for (var i=0; i<(len-value.length); i++) - value = "0" + value; - } - - return value; - } - - /* Returns the date object in the specified format */ - function getDateTime(date, format) { - format = tinyMCE.regexpReplace(format, "%D", "%m/%d/%y"); - format = tinyMCE.regexpReplace(format, "%r", "%I:%M:%S %p"); - format = tinyMCE.regexpReplace(format, "%Y", "" + date.getFullYear()); - format = tinyMCE.regexpReplace(format, "%y", "" + date.getYear()); - format = tinyMCE.regexpReplace(format, "%m", addZeros(date.getMonth()+1, 2)); - format = tinyMCE.regexpReplace(format, "%d", addZeros(date.getDate(), 2)); - format = tinyMCE.regexpReplace(format, "%H", "" + addZeros(date.getHours(), 2)); - format = tinyMCE.regexpReplace(format, "%M", "" + addZeros(date.getMinutes(), 2)); - format = tinyMCE.regexpReplace(format, "%S", "" + addZeros(date.getSeconds(), 2)); - format = tinyMCE.regexpReplace(format, "%I", "" + (date.getHours() < 12 ? (date.getHours()+1) : 24-date.getHours())); - format = tinyMCE.regexpReplace(format, "%p", "" + (date.getHours() < 12 ? "AM" : "PM")); - format = tinyMCE.regexpReplace(format, "%%", "%"); - - return format; - } - - // Handle commands - switch (command) { - case "mceInsertDate": - tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_dateFormat", "%Y-%m-%d"))); - return true; - - case "mceInsertTime": - tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, getDateTime(new Date(), tinyMCE.getParam("plugin_insertdate_timeFormat", "%H:%M:%S"))); - return true; - } - - // Pass to next handler in chain - return false; -} +/** + * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.InsertDateTime', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + ed.addCommand('mceInsertDate', function() { + var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_dateFormat", ed.getLang('insertdatetime.date_fmt'))); + + ed.execCommand('mceInsertContent', false, str); + }); + + ed.addCommand('mceInsertTime', function() { + var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_timeFormat", ed.getLang('insertdatetime.time_fmt'))); + + ed.execCommand('mceInsertContent', false, str); + }); + + ed.addButton('insertdate', {title : 'insertdatetime.insertdate_desc', cmd : 'mceInsertDate'}); + ed.addButton('inserttime', {title : 'insertdatetime.inserttime_desc', cmd : 'mceInsertTime'}); + }, + + getInfo : function() { + return { + longname : 'Insert date/time', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _getDateTime : function(d, fmt) { + var ed = this.editor; + + function addZeros(value, len) { + value = "" + value; + + if (value.length < len) { + for (var i=0; i<(len-value.length); i++) + value = "0" + value; + } + + return value; + }; + + fmt = fmt.replace("%D", "%m/%d/%y"); + fmt = fmt.replace("%r", "%I:%M:%S %p"); + fmt = fmt.replace("%Y", "" + d.getFullYear()); + fmt = fmt.replace("%y", "" + d.getYear()); + fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); + fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); + fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); + fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); + fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); + fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); + fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); + fmt = fmt.replace("%B", "" + ed.getLang("insertdatetime.months_long").split(',')[d.getMonth()]); + fmt = fmt.replace("%b", "" + ed.getLang("insertdatetime.months_short").split(',')[d.getMonth()]); + fmt = fmt.replace("%A", "" + ed.getLang("insertdatetime.day_long").split(',')[d.getDay()]); + fmt = fmt.replace("%a", "" + ed.getLang("insertdatetime.day_short").split(',')[d.getDay()]); + fmt = fmt.replace("%%", "%"); + + return fmt; + } + }); + + // Register plugin + tinymce.PluginManager.add('insertdatetime', tinymce.plugins.InsertDateTime); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/images/insertdate.gif b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/images/insertdate.gif deleted file mode 100644 index 5002f874..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/images/insertdate.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/images/inserttime.gif b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/images/inserttime.gif deleted file mode 100644 index eb76a832..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/images/inserttime.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/cs.js deleted file mode 100644 index 3cdd3c5f..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/cs.js +++ /dev/null @@ -1,4 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insertdate_desc'] = 'Vložit datum'; -tinyMCELang['lang_inserttime_desc'] = 'Vložit èas'; \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/de.js deleted file mode 100644 index 033ae643..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/de.js +++ /dev/null @@ -1,4 +0,0 @@ -// DE lang variables - -tinyMCELang['lang_insertdate_desc'] = 'Datum einfügen'; -tinyMCELang['lang_inserttime_desc'] = 'Zeit einfügen'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/el.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/el.js deleted file mode 100644 index 46039f16..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/el.js +++ /dev/null @@ -1,4 +0,0 @@ -// Greek lang variables by Jacaranda Bill - -tinyMCELang['lang_insertdate_desc'] = 'ÅéóáãùãÞ çìåñïìçíßáò'; -tinyMCELang['lang_inserttime_desc'] = 'ÅéóáãùãÞ þñáò'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/en.js deleted file mode 100644 index 34abd9ea..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/en.js +++ /dev/null @@ -1,4 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_insertdate_desc'] = 'Insert date'; -tinyMCELang['lang_inserttime_desc'] = 'Insert time'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fa.js deleted file mode 100644 index 720ed6c6..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fa.js +++ /dev/null @@ -1,9 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_insertdate_desc'] = 'اÙزودن تاریخ'; -tinyMCELang['lang_inserttime_desc'] = 'اÙزودن زمان'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fr.js deleted file mode 100644 index 8bce0175..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fr.js +++ /dev/null @@ -1,4 +0,0 @@ -// French lang variables by Laurent Dran - -tinyMCELang['lang_insertdate_desc'] = 'Insèrer la date'; -tinyMCELang['lang_inserttime_desc'] = 'Insèrer l\'heure'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fr_ca.js deleted file mode 100644 index 4df3045c..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/fr_ca.js +++ /dev/null @@ -1,4 +0,0 @@ -// CAN_FR lang variables - -tinyMCELang['lang_insertdate_desc'] = 'Insérer la date'; -tinyMCELang['lang_inserttime_desc'] = 'Insérer l\'heure'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/it.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/it.js deleted file mode 100644 index cdac505a..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/it.js +++ /dev/null @@ -1,4 +0,0 @@ -// IT lang variables - -tinyMCELang['lang_insertdate_desc'] = 'Inserisci data'; -tinyMCELang['lang_inserttime_desc'] = 'Inserisci ora'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/ko.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/ko.js deleted file mode 100644 index 410f49d1..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/ko.js +++ /dev/null @@ -1,4 +0,0 @@ -// KO lang variables - -tinyMCELang['lang_insertdate_desc'] = '³¯Â¥ ³Ö±â'; -tinyMCELang['lang_inserttime_desc'] = '½Ã°£ ³Ö±â'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/sv.js deleted file mode 100644 index a205c7f6..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/sv.js +++ /dev/null @@ -1,4 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_insertdate_desc'] = 'Klistra in datum'; -tinyMCELang['lang_inserttime_desc'] = 'Klistra in tid'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/zh_cn.js deleted file mode 100644 index dc52a850..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/langs/zh_cn.js +++ /dev/null @@ -1,4 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_insertdate_desc'] = '²åÈ뵱ǰÈÕÆÚ'; -tinyMCELang['lang_inserttime_desc'] = '²åÈ뵱ǰʱ¼ä'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/readme.txt deleted file mode 100644 index b2f7e6d6..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/insertdatetime/readme.txt +++ /dev/null @@ -1,35 +0,0 @@ - InsertDateTime plugin for TinyMCE ------------------------------------ - -Installation instructions: - * Copy the insertdatetime directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "insertdatetime". - * Add the insertdate or inserttime button name to button list, example: theme_advanced_buttons3_add : "insertdate,inserttime". - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "insertdatetime", - theme_advanced_buttons3_add : "insertdate,inserttime", - plugin_insertdate_dateFormat : "%Y-%m-%d", - plugin_insertdate_timeFormat : "%H:%M:%S" - }); - -Configuration: - plugin_insertdate_dateFormat - Format that the date is output as. Defaults to: "%Y-%m-%d". - Replacement variables: - %y - year as a decimal number without a century (range 00 to 99) - %Y - year as a decimal number including the century - %d - day of the month as a decimal number (range 01 to 31) - %m - month as a decimal number (range 01 to 12) - %D - same as %m/%d/%y - %r - time in a.m. and p.m. notation - %H - hour as a decimal number using a 24-hour clock (range 00 to 23) - %I - hour as a decimal number using a 12-hour clock (range 01 to 12) - %M - minute as a decimal number (range 00-59) - %S - second as a decimal number (range 00-59) - %p - either `am' or `pm' according to the given time value - %% - a literal `%' character - - plugin_insertdate_timeFormat - Format that the time is output as. Defaults to: "%H:%M:%S". diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js new file mode 100644 index 00000000..4cd9427b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.Layer',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceInsertLayer',t._insertLayer,t);ed.addCommand('mceMoveForward',function(){t._move(1);});ed.addCommand('mceMoveBackward',function(){t._move(-1);});ed.addCommand('mceMakeAbsolute',function(){t._toggleAbsolute();});ed.addButton('moveforward',{title:'layer.forward_desc',cmd:'mceMoveForward'});ed.addButton('movebackward',{title:'layer.backward_desc',cmd:'mceMoveBackward'});ed.addButton('absolute',{title:'layer.absolute_desc',cmd:'mceMakeAbsolute'});ed.addButton('insertlayer',{title:'layer.insertlayer_desc',cmd:'mceInsertLayer'});ed.onInit.add(function(){if(tinymce.isIE)ed.getDoc().execCommand('2D-Position',false,true);});ed.onNodeChange.add(t._nodeChange,t);ed.onVisualAid.add(t._visualAid,t);},getInfo:function(){return{longname:'Layer',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_nodeChange:function(ed,cm,n){var le,p;le=this._getParentLayer(n);p=ed.dom.getParent(n,'DIV,P,IMG');if(!p){cm.setDisabled('absolute',1);cm.setDisabled('moveforward',1);cm.setDisabled('movebackward',1);}else{cm.setDisabled('absolute',0);cm.setDisabled('moveforward',!le);cm.setDisabled('movebackward',!le);cm.setActive('absolute',le&&le.style.position.toLowerCase()=="absolute");}},_visualAid:function(ed,e,s){var dom=ed.dom;tinymce.each(dom.select('div,p',e),function(e){if(/^(absolute|relative|static)$/i.test(e.style.position)){if(s)dom.addClass(e,'mceItemVisualAid');else dom.removeClass(e,'mceItemVisualAid');}});},_move:function(d){var ed=this.editor,i,z=[],le=this._getParentLayer(ed.selection.getNode()),ci=-1,fi=-1,nl;nl=[];tinymce.walk(ed.getBody(),function(n){if(n.nodeType==1&&/^(absolute|relative|static)$/i.test(n.style.position))nl.push(n);},'childNodes');for(i=0;i-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else{if(z[ci]>0)nl[ci].style.zIndex=z[ci]-1;}}else{for(i=0;iz[ci]){fi=i;break;}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else nl[ci].style.zIndex=z[ci]+1;}ed.execCommand('mceRepaint');},_getParentLayer:function(n){return this.editor.dom.getParent(n,function(n){return n.nodeType==1&&/^(absolute|relative|static)$/i.test(n.style.position);});},_insertLayer:function(){var ed=this.editor,p=ed.dom.getPos(ed.dom.getParent(ed.selection.getNode(),'*'));ed.dom.add(ed.getBody(),'div',{style:{position:'absolute',left:p.x,top:(p.y>20?p.y:20),width:100,height:100},'class':'mceItemVisualAid'},ed.selection.getContent()||ed.getLang('layer.content'));},_toggleAbsolute:function(){var ed=this.editor,le=this._getParentLayer(ed.selection.getNode());if(!le)le=ed.dom.getParent(ed.selection.getNode(),'DIV,P,IMG');if(le){if(le.style.position.toLowerCase()=="absolute"){ed.dom.setStyles(le,{position:'',left:'',top:'',width:'',height:''});ed.dom.removeClass(le,'mceItemVisualAid');}else{if(le.style.left=="")le.style.left=20+'px';if(le.style.top=="")le.style.top=20+'px';if(le.style.width=="")le.style.width=le.width?(le.width+'px'):'100px';if(le.style.height=="")le.style.height=le.height?(le.height+'px'):'100px';le.style.position="absolute";ed.addVisual(ed.getBody());}ed.execCommand('mceRepaint');ed.nodeChanged();}}});tinymce.PluginManager.add('layer',tinymce.plugins.Layer);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin_src.js new file mode 100644 index 00000000..a72f6c36 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin_src.js @@ -0,0 +1,209 @@ +/** + * $Id: editor_plugin_src.js 652 2008-02-29 13:09:46Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.Layer', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceInsertLayer', t._insertLayer, t); + + ed.addCommand('mceMoveForward', function() { + t._move(1); + }); + + ed.addCommand('mceMoveBackward', function() { + t._move(-1); + }); + + ed.addCommand('mceMakeAbsolute', function() { + t._toggleAbsolute(); + }); + + // Register buttons + ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'}); + ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'}); + ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'}); + ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'}); + + ed.onInit.add(function() { + if (tinymce.isIE) + ed.getDoc().execCommand('2D-Position', false, true); + }); + + ed.onNodeChange.add(t._nodeChange, t); + ed.onVisualAid.add(t._visualAid, t); + }, + + getInfo : function() { + return { + longname : 'Layer', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var le, p; + + le = this._getParentLayer(n); + p = ed.dom.getParent(n, 'DIV,P,IMG'); + + if (!p) { + cm.setDisabled('absolute', 1); + cm.setDisabled('moveforward', 1); + cm.setDisabled('movebackward', 1); + } else { + cm.setDisabled('absolute', 0); + cm.setDisabled('moveforward', !le); + cm.setDisabled('movebackward', !le); + cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute"); + } + }, + + // Private methods + + _visualAid : function(ed, e, s) { + var dom = ed.dom; + + tinymce.each(dom.select('div,p', e), function(e) { + if (/^(absolute|relative|static)$/i.test(e.style.position)) { + if (s) + dom.addClass(e, 'mceItemVisualAid'); + else + dom.removeClass(e, 'mceItemVisualAid'); + } + }); + }, + + _move : function(d) { + var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl; + + nl = []; + tinymce.walk(ed.getBody(), function(n) { + if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) + nl.push(n); + }, 'childNodes'); + + // Find z-indexes + for (i=0; i -1) { + nl[ci].style.zIndex = z[fi]; + nl[fi].style.zIndex = z[ci]; + } else { + if (z[ci] > 0) + nl[ci].style.zIndex = z[ci] - 1; + } + } else { + // Move forward + + // Try find a higher one + for (i=0; i z[ci]) { + fi = i; + break; + } + } + + if (fi > -1) { + nl[ci].style.zIndex = z[fi]; + nl[fi].style.zIndex = z[ci]; + } else + nl[ci].style.zIndex = z[ci] + 1; + } + + ed.execCommand('mceRepaint'); + }, + + _getParentLayer : function(n) { + return this.editor.dom.getParent(n, function(n) { + return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position); + }); + }, + + _insertLayer : function() { + var ed = this.editor, p = ed.dom.getPos(ed.dom.getParent(ed.selection.getNode(), '*')); + + ed.dom.add(ed.getBody(), 'div', { + style : { + position : 'absolute', + left : p.x, + top : (p.y > 20 ? p.y : 20), + width : 100, + height : 100 + }, + 'class' : 'mceItemVisualAid' + }, ed.selection.getContent() || ed.getLang('layer.content')); + }, + + _toggleAbsolute : function() { + var ed = this.editor, le = this._getParentLayer(ed.selection.getNode()); + + if (!le) + le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG'); + + if (le) { + if (le.style.position.toLowerCase() == "absolute") { + ed.dom.setStyles(le, { + position : '', + left : '', + top : '', + width : '', + height : '' + }); + + ed.dom.removeClass(le, 'mceItemVisualAid'); + } else { + if (le.style.left == "") + le.style.left = 20 + 'px'; + + if (le.style.top == "") + le.style.top = 20 + 'px'; + + if (le.style.width == "") + le.style.width = le.width ? (le.width + 'px') : '100px'; + + if (le.style.height == "") + le.style.height = le.height ? (le.height + 'px') : '100px'; + + le.style.position = "absolute"; + ed.addVisual(ed.getBody()); + } + + ed.execCommand('mceRepaint'); + ed.nodeChanged(); + } + } + }); + + // Register plugin + tinymce.PluginManager.add('layer', tinymce.plugins.Layer); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/css/content.css b/includes/tinymce/jscripts/tiny_mce/plugins/media/css/content.css new file mode 100644 index 00000000..1bf6a758 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/media/css/content.css @@ -0,0 +1,6 @@ +.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;} +.mceItemShockWave {background-image: url(../img/shockwave.gif);} +.mceItemFlash {background-image:url(../img/flash.gif);} +.mceItemQuickTime {background-image:url(../img/quicktime.gif);} +.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);} +.mceItemRealMedia {background-image:url(../img/realmedia.gif);} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/css/media.css b/includes/tinymce/jscripts/tiny_mce/plugins/media/css/media.css new file mode 100644 index 00000000..2d087944 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/media/css/media.css @@ -0,0 +1,16 @@ +#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } +#hspace, #vspace { width: 50px } +#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } +#flash_base, #flash_flashvars { width: 240px } +#width, #height { width: 40px } +#src, #media_type { width: 250px } +#class { width: 120px } +#prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto } +.panel_wrapper div.current { height: 390px; overflow: auto } +#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } +.mceAddSelectValue { background-color: #DDDDDD } +#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } +#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } +#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } +#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } +#qt_qtsrc { width: 200px } diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js new file mode 100644 index 00000000..b226b00d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js @@ -0,0 +1 @@ +(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.onPreInit.add(function(){ed.serializer.addRules('param[name|value|_mce_value]');});ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};ed.selection.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.selection.onBeforeSetContent.add(t._objectsToSpans,t);if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(t._objectsToSpans,t);ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){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=ed.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(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_mce_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='';}return im;});});}},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};},_objectsToSpans:function(ed,o){var t=this,h=o.content;h=h.replace(/]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return''});h=h.replace(/]*)>/gi,'');h=h.replace(/]*)\/?>/gi,'');h=h.replace(/]*)>/gi,'');h=h.replace(/<\/(object)([^>]*)>/gi,'');h=h.replace(/<\/embed>/gi,'');h=h.replace(/]*)>/gi,function(a,b){return''});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam">');o.content=h;},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title),stc;stc=ed.getParam('media_strict',true)&&o.type=='application/x-shockwave-flash';p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;if(p.src)p.src=ed.convertURL(p.src,'src',n);if(stc){ob=dom.create('span',{mce_name:'object',type:'application/x-shockwave-flash',data:p.src,width:o.width,height:o.height});}else{ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});}each(p,function(v,k){if(!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)){if(o.type=='application/x-mplayer2'&&k=='src')k='url';if(v)dom.add(ob,'span',{mce_name:'param',name:k,'_mce_value':v});}});if(!stc)dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='',args;args=['id','name','width','height','bgcolor','align','flashvars','src','wmode','allowfullscreen','quality'];im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(args,function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_mce_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}n=dom.select('.mceItemEmbed',n)[0];if(n){each(args,function(na){var v=dom.getAttrib(n,na);if(v&&!pa[na])pa[na]=v;});}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js new file mode 100644 index 00000000..beec3bf0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js @@ -0,0 +1,400 @@ +/** + * $Id: editor_plugin_src.js 952 2008-11-03 17:56:04Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var each = tinymce.each; + + tinymce.create('tinymce.plugins.MediaPlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + t.url = url; + + function isMediaElm(n) { + return /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className); + }; + + ed.onPreInit.add(function() { + // Force in _value parameter this extra parameter is required for older Opera versions + ed.serializer.addRules('param[name|value|_mce_value]'); + }); + + // Register commands + ed.addCommand('mceMedia', function() { + ed.windowManager.open({ + file : url + '/media.htm', + width : 430 + parseInt(ed.getLang('media.delta_width', 0)), + height : 470 + parseInt(ed.getLang('media.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'}); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('media', n.nodeName == 'IMG' && isMediaElm(n)); + }); + + ed.onInit.add(function() { + var lo = { + mceItemFlash : 'flash', + mceItemShockWave : 'shockwave', + mceItemWindowsMedia : 'windowsmedia', + mceItemQuickTime : 'quicktime', + mceItemRealMedia : 'realmedia' + }; + + ed.selection.onSetContent.add(function() { + t._spansToImgs(ed.getBody()); + }); + + ed.selection.onBeforeSetContent.add(t._objectsToSpans, t); + + if (ed.settings.content_css !== false) + ed.dom.loadCSS(url + "/css/content.css"); + + if (ed.theme.onResolveName) { + ed.theme.onResolveName.add(function(th, o) { + if (o.name == 'img') { + each(lo, function(v, k) { + if (ed.dom.hasClass(o.node, k)) { + o.name = v; + o.title = ed.dom.getAttrib(o.node, 'title'); + return false; + } + }); + } + }); + } + + if (ed && ed.plugins.contextmenu) { + ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { + if (e.nodeName == 'IMG' && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)) { + m.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'}); + } + }); + } + }); + + ed.onBeforeSetContent.add(t._objectsToSpans, t); + + ed.onSetContent.add(function() { + t._spansToImgs(ed.getBody()); + }); + + ed.onPreProcess.add(function(ed, o) { + var dom = ed.dom; + + if (o.set) { + t._spansToImgs(o.node); + + each(dom.select('IMG', o.node), function(n) { + var p; + + if (isMediaElm(n)) { + p = t._parse(n.title); + dom.setAttrib(n, 'width', dom.getAttrib(n, 'width', p.width || 100)); + dom.setAttrib(n, 'height', dom.getAttrib(n, 'height', p.height || 100)); + } + }); + } + + if (o.get) { + each(dom.select('IMG', o.node), function(n) { + var ci, cb, mt; + + if (ed.getParam('media_use_script')) { + if (isMediaElm(n)) + n.className = n.className.replace(/mceItem/g, 'mceTemp'); + + return; + } + + switch (n.className) { + 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 = ed.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 (ci) { + dom.replace(t._buildObj({ + classid : ci, + codebase : cb, + type : mt + }, n), n); + } + }); + } + }); + + ed.onPostProcess.add(function(ed, o) { + o.content = o.content.replace(/_mce_value=/g, 'value='); + }); + + if (ed.getParam('media_use_script')) { + function getAttr(s, n) { + n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); + + return n ? ed.dom.decode(n[1]) : ''; + }; + + ed.onPostProcess.add(function(ed, o) { + o.content = o.content.replace(/]+>/g, function(im) { + var cl = getAttr(im, 'class'); + + if (/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)) { + at = t._parse(getAttr(im, 'title')); + at.width = getAttr(im, 'width'); + at.height = getAttr(im, 'height'); + im = ''; + } + + return im; + }); + }); + } + }, + + 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 + }; + }, + + // Private methods + _objectsToSpans : function(ed, o) { + var t = this, h = o.content; + + h = h.replace(/]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) { + var o = t._parse(c); + + return '' + }); + + h = h.replace(/]*)>/gi, ''); + h = h.replace(/]*)\/?>/gi, ''); + h = h.replace(/]*)>/gi, ''); + h = h.replace(/<\/(object)([^>]*)>/gi, ''); + h = h.replace(/<\/embed>/gi, ''); + h = h.replace(/]*)>/gi, function(a, b) {return ''}); + h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam">'); + + o.content = h; + }, + + _buildObj : function(o, n) { + var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title), stc; + + stc = ed.getParam('media_strict', true) && o.type == 'application/x-shockwave-flash'; + + p.width = o.width = dom.getAttrib(n, 'width') || 100; + p.height = o.height = dom.getAttrib(n, 'height') || 100; + + if (p.src) + p.src = ed.convertURL(p.src, 'src', n); + + if (stc) { + ob = dom.create('span', { + mce_name : 'object', + type : 'application/x-shockwave-flash', + data : p.src, + width : o.width, + height : o.height + }); + } else { + ob = dom.create('span', { + mce_name : 'object', + classid : "clsid:" + o.classid, + codebase : o.codebase, + width : o.width, + height : o.height + }); + } + + each (p, function(v, k) { + if (!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)) { + // Use url instead of src in IE for Windows media + if (o.type == 'application/x-mplayer2' && k == 'src') + k = 'url'; + + if (v) + dom.add(ob, 'span', {mce_name : 'param', name : k, '_mce_value' : v}); + } + }); + + if (!stc) + dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type}, p)); + + return ob; + }, + + _spansToImgs : function(p) { + var t = this, dom = t.editor.dom, im, ci; + + each(dom.select('span', p), function(n) { + // Convert object into image + if (dom.getAttrib(n, 'class') == 'mceItemObject') { + ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, ''); + + switch (ci) { + case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000': + dom.replace(t._createImg('mceItemFlash', n), n); + break; + + case 'clsid:166b1bca-3f9c-11cf-8075-444553540000': + dom.replace(t._createImg('mceItemShockWave', n), n); + break; + + case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6': + case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95': + case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a': + dom.replace(t._createImg('mceItemWindowsMedia', n), n); + break; + + case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b': + dom.replace(t._createImg('mceItemQuickTime', n), n); + break; + + case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa': + dom.replace(t._createImg('mceItemRealMedia', n), n); + break; + + default: + dom.replace(t._createImg('mceItemFlash', n), n); + } + + return; + } + + // Convert embed into image + if (dom.getAttrib(n, 'class') == 'mceItemEmbed') { + switch (dom.getAttrib(n, 'type')) { + case 'application/x-shockwave-flash': + dom.replace(t._createImg('mceItemFlash', n), n); + break; + + case 'application/x-director': + dom.replace(t._createImg('mceItemShockWave', n), n); + break; + + case 'application/x-mplayer2': + dom.replace(t._createImg('mceItemWindowsMedia', n), n); + break; + + case 'video/quicktime': + dom.replace(t._createImg('mceItemQuickTime', n), n); + break; + + case 'audio/x-pn-realaudio-plugin': + dom.replace(t._createImg('mceItemRealMedia', n), n); + break; + + default: + dom.replace(t._createImg('mceItemFlash', n), n); + } + } + }); + }, + + _createImg : function(cl, n) { + var im, dom = this.editor.dom, pa = {}, ti = '', args; + + args = ['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode', 'allowfullscreen', 'quality']; + + // Create image + im = dom.create('img', { + src : this.url + '/img/trans.gif', + width : dom.getAttrib(n, 'width') || 100, + height : dom.getAttrib(n, 'height') || 100, + 'class' : cl + }); + + // Setup base parameters + each(args, function(na) { + var v = dom.getAttrib(n, na); + + if (v) + pa[na] = v; + }); + + // Add optional parameters + each(dom.select('span', n), function(n) { + if (dom.hasClass(n, 'mceItemParam')) + pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_mce_value'); + }); + + // Use src not movie + if (pa.movie) { + pa.src = pa.movie; + delete pa.movie; + } + + // Merge with embed args + n = dom.select('.mceItemEmbed', n)[0]; + if (n) { + each(args, function(na) { + var v = dom.getAttrib(n, na); + + if (v && !pa[na]) + pa[na] = v; + }); + } + + delete pa.width; + delete pa.height; + + im.title = this._serialize(pa); + + return im; + }, + + _parse : function(s) { + return tinymce.util.JSON.parse('{' + s + '}'); + }, + + _serialize : function(o) { + return tinymce.util.JSON.serialize(o).replace(/[{}]/g, ''); + } + }); + + // Register plugin + tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/img/flash.gif b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/flash.gif new file mode 100644 index 00000000..cb192e6c Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/flash.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/img/flv_player.swf b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/flv_player.swf new file mode 100644 index 00000000..042c2ab9 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/flv_player.swf differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/img/quicktime.gif b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/quicktime.gif new file mode 100644 index 00000000..3b049914 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/quicktime.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/img/realmedia.gif b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/realmedia.gif new file mode 100644 index 00000000..fdfe0b9a Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/realmedia.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/img/shockwave.gif b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/shockwave.gif new file mode 100644 index 00000000..5f235dfc Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/shockwave.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/img/trans.gif b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/trans.gif new file mode 100644 index 00000000..38848651 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/trans.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/img/windowsmedia.gif b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/windowsmedia.gif new file mode 100644 index 00000000..ab50f2d8 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/media/img/windowsmedia.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js b/includes/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js new file mode 100644 index 00000000..f8dc8105 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ''); + +function init() { + var pl = "", f, val; + var type = "flash", fe, i; + + ed = tinyMCEPopup.editor; + + tinyMCEPopup.resizeToInnerSize(); + f = document.forms[0] + + fe = ed.selection.getNode(); + if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { + pl = fe.title; + + switch (ed.dom.getAttrib(fe, 'class')) { + case 'mceItemFlash': + type = 'flash'; + break; + + case 'mceItemFlashVideo': + type = 'flv'; + break; + + case 'mceItemShockWave': + type = 'shockwave'; + break; + + case 'mceItemWindowsMedia': + type = 'wmp'; + break; + + case 'mceItemQuickTime': + type = 'qt'; + break; + + case 'mceItemRealMedia': + type = 'rmp'; + break; + } + + document.forms[0].insert.value = ed.getLang('update', 'Insert', true); + } + + document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var html = getMediaListHTML('medialist','src','media','media'); + if (html == "") + document.getElementById("linklistrow").style.display = 'none'; + else + document.getElementById("linklistcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('filebrowser')) + document.getElementById('src').style.width = '230px'; + + // Setup form + if (pl != "") { + pl = tinyMCEPopup.editor.plugins.media._parse(pl); + + switch (type) { + case "flash": + setBool(pl, 'flash', 'play'); + setBool(pl, 'flash', 'loop'); + setBool(pl, 'flash', 'menu'); + setBool(pl, 'flash', 'swliveconnect'); + setStr(pl, 'flash', 'quality'); + setStr(pl, 'flash', 'scale'); + setStr(pl, 'flash', 'salign'); + setStr(pl, 'flash', 'wmode'); + setStr(pl, 'flash', 'base'); + setStr(pl, 'flash', 'flashvars'); + break; + + case "qt": + setBool(pl, 'qt', 'loop'); + setBool(pl, 'qt', 'autoplay'); + setBool(pl, 'qt', 'cache'); + setBool(pl, 'qt', 'controller'); + setBool(pl, 'qt', 'correction'); + setBool(pl, 'qt', 'enablejavascript'); + setBool(pl, 'qt', 'kioskmode'); + setBool(pl, 'qt', 'autohref'); + setBool(pl, 'qt', 'playeveryframe'); + setBool(pl, 'qt', 'tarsetcache'); + setStr(pl, 'qt', 'scale'); + setStr(pl, 'qt', 'starttime'); + setStr(pl, 'qt', 'endtime'); + setStr(pl, 'qt', 'tarset'); + setStr(pl, 'qt', 'qtsrcchokespeed'); + setStr(pl, 'qt', 'volume'); + setStr(pl, 'qt', 'qtsrc'); + break; + + case "shockwave": + setBool(pl, 'shockwave', 'sound'); + setBool(pl, 'shockwave', 'progress'); + setBool(pl, 'shockwave', 'autostart'); + setBool(pl, 'shockwave', 'swliveconnect'); + setStr(pl, 'shockwave', 'swvolume'); + setStr(pl, 'shockwave', 'swstretchstyle'); + setStr(pl, 'shockwave', 'swstretchhalign'); + setStr(pl, 'shockwave', 'swstretchvalign'); + break; + + case "wmp": + setBool(pl, 'wmp', 'autostart'); + setBool(pl, 'wmp', 'enabled'); + setBool(pl, 'wmp', 'enablecontextmenu'); + setBool(pl, 'wmp', 'fullscreen'); + setBool(pl, 'wmp', 'invokeurls'); + setBool(pl, 'wmp', 'mute'); + setBool(pl, 'wmp', 'stretchtofit'); + setBool(pl, 'wmp', 'windowlessvideo'); + setStr(pl, 'wmp', 'balance'); + setStr(pl, 'wmp', 'baseurl'); + setStr(pl, 'wmp', 'captioningid'); + setStr(pl, 'wmp', 'currentmarker'); + setStr(pl, 'wmp', 'currentposition'); + setStr(pl, 'wmp', 'defaultframe'); + setStr(pl, 'wmp', 'playcount'); + setStr(pl, 'wmp', 'rate'); + setStr(pl, 'wmp', 'uimode'); + setStr(pl, 'wmp', 'volume'); + break; + + case "rmp": + setBool(pl, 'rmp', 'autostart'); + setBool(pl, 'rmp', 'loop'); + setBool(pl, 'rmp', 'autogotourl'); + setBool(pl, 'rmp', 'center'); + setBool(pl, 'rmp', 'imagestatus'); + setBool(pl, 'rmp', 'maintainaspect'); + setBool(pl, 'rmp', 'nojava'); + setBool(pl, 'rmp', 'prefetch'); + setBool(pl, 'rmp', 'shuffle'); + setStr(pl, 'rmp', 'console'); + setStr(pl, 'rmp', 'controls'); + setStr(pl, 'rmp', 'numloop'); + setStr(pl, 'rmp', 'scriptcallbacks'); + break; + } + + setStr(pl, null, 'src'); + setStr(pl, null, 'id'); + setStr(pl, null, 'name'); + setStr(pl, null, 'vspace'); + setStr(pl, null, 'hspace'); + setStr(pl, null, 'bgcolor'); + setStr(pl, null, 'align'); + setStr(pl, null, 'width'); + setStr(pl, null, 'height'); + + if ((val = ed.dom.getAttrib(fe, "width")) != "") + pl.width = f.width.value = val; + + if ((val = ed.dom.getAttrib(fe, "height")) != "") + pl.height = f.height.value = val; + + oldWidth = pl.width ? parseInt(pl.width) : 0; + oldHeight = pl.height ? parseInt(pl.height) : 0; + } else + oldWidth = oldHeight = 0; + + selectByValue(f, 'media_type', type); + changedType(type); + updateColor('bgcolor_pick', 'bgcolor'); + + TinyMCE_EditableSelects.init(); + generatePreview(); +} + +function insertMedia() { + var fe, f = document.forms[0], h; + + tinyMCEPopup.restoreSelection(); + + if (!AutoValidator.validate(f)) { + tinyMCEPopup.alert(ed.getLang('invalid_data')); + return false; + } + + f.width.value = f.width.value == "" ? 100 : f.width.value; + f.height.value = f.height.value == "" ? 100 : f.height.value; + + fe = ed.selection.getNode(); + if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + fe.className = "mceItemFlash"; + break; + + case "flv": + fe.className = "mceItemFlashVideo"; + break; + + case "shockwave": + fe.className = "mceItemShockWave"; + break; + + case "qt": + fe.className = "mceItemQuickTime"; + break; + + case "wmp": + fe.className = "mceItemWindowsMedia"; + break; + + case "rmp": + fe.className = "mceItemRealMedia"; + break; + } + + if (fe.width != f.width.value || fe.height != f.height.height) + ed.execCommand('mceRepaint'); + + fe.title = serializeParameters(); + fe.width = f.width.value; + fe.height = f.height.value; + fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : ''); + fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : ''); + fe.align = f.align.options[f.align.selectedIndex].value; + } else { + h = ' 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; +} + +function getType(v) { + var fo, i, c, el, x, f = document.forms[0]; + + fo = ed.getParam("media_types", "flash=swf;flv=flv;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.match(/watch\?v=(.+)(.*)/)) { + f.width.value = '425'; + f.height.value = '350'; + f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1]; + 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 0 ? s.substring(0, s.length - 1) : s; + + return s; +} + +function setBool(pl, p, n) { + if (typeof(pl[n]) == "undefined") + return; + + document.forms[0].elements[p + "_" + n].checked = pl[n]; +} + +function setStr(pl, p, n) { + var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n]; + + if (typeof(pl[n]) == "undefined") + return; + + if (e.type == "text") + e.value = pl[n]; + else + selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]); +} + +function getBool(p, n, d, tv, fv) { + var v = document.forms[0].elements[p + "_" + n].checked; + + tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; + fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; + + return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ','); +} + +function getStr(p, n, d) { + var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; + var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; + + if (n == 'src') + v = tinyMCEPopup.editor.convertURL(v, 'src', null); + + return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',"); +} + +function getInt(p, n, d) { + var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; + var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; + + return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ","); +} + +function jsEncode(s) { + s = s.replace(new RegExp('\\\\', 'g'), '\\\\'); + s = s.replace(new RegExp('"', 'g'), '\\"'); + s = s.replace(new RegExp("'", 'g'), "\\'"); + + return s; +} + +function generatePreview(c) { + var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh; + + p.innerHTML = ''; + + nw = parseInt(f.width.value); + nh = parseInt(f.height.value); + + if (f.width.value != "" && f.height.value != "") { + if (f.constrain.checked) { + if (c == 'width' && oldWidth != 0) { + wp = nw / oldWidth; + nh = Math.round(wp * nh); + f.height.value = nh; + } else if (c == 'height' && oldHeight != 0) { + hp = nh / oldHeight; + nw = Math.round(hp * nw); + f.width.value = nw; + } + } + } + + if (f.width.value != "") + oldWidth = nw; + + if (f.height.value != "") + oldHeight = nh; + + // After constrain + pl = serializeParameters(); + + switch (f.media_type.options[f.media_type.selectedIndex].value) { + case "flash": + cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; + codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; + type = 'application/x-shockwave-flash'; + break; + + case "shockwave": + cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000'; + codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'; + type = 'application/x-director'; + break; + + case "qt": + cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'; + codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'; + type = 'video/quicktime'; + break; + + case "wmp": + cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'; + codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; + type = 'application/x-mplayer2'; + break; + + case "rmp": + cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'; + codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; + type = 'audio/x-pn-realaudio-plugin'; + break; + } + + if (pl == '') { + p.innerHTML = ''; + return; + } + + pl = tinyMCEPopup.editor.plugins.media._parse(pl); + + if (!pl.src) { + p.innerHTML = ''; + return; + } + + pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src); + pl.width = !pl.width ? 100 : pl.width; + pl.height = !pl.height ? 100 : pl.height; + pl.id = !pl.id ? 'obj' : pl.id; + pl.name = !pl.name ? 'eobj' : pl.name; + pl.align = !pl.align ? '' : pl.align; + + // Avoid annoying warning about insecure items + if (!tinymce.isIE || document.location.protocol != 'https:') { + h += ''; + + for (n in pl) { + h += ''; + + // Add extra url parameter if it's an absolute URL + if (n == 'src' && pl[n].indexOf('://') != -1) + h += ''; + } + } + + h += ' + + + {#media_dlg.title} + + + + + + + + + + +
+ + +
+
+
+ {#media_dlg.general} + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
 
+
 
+ + + + + + +
x   
+
+
+ +
+ {#media_dlg.preview} + +
+
+ +
+
+ {#media_dlg.advanced} + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 
+
+
+ +
+ {#media_dlg.flash_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + + + + + + + +
+
+ +
+ {#media_dlg.flv_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+
+ +
+ {#media_dlg.qt_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+  
+ + + + + +
 
+
+
+ +
+ {#media_dlg.wmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+
+ +
+ {#media_dlg.rmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+   +
+
+ +
+ {#media_dlg.shockwave_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js new file mode 100644 index 00000000..4fce503c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.Nonbreaking',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceNonBreaking',function(){ed.execCommand('mceInsertContent',false,(ed.plugins.visualchars&&ed.plugins.visualchars.state)?'·':' ');});ed.addButton('nonbreaking',{title:'nonbreaking.nonbreaking_desc',cmd:'mceNonBreaking'});if(ed.getParam('nonbreaking_force_tab')){ed.onKeyDown.add(function(ed,e){if(tinymce.isIE&&e.keyCode==9){ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');tinymce.dom.Event.cancel(e);}});}},getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('nonbreaking',tinymce.plugins.Nonbreaking);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js new file mode 100644 index 00000000..b7237566 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @@ -0,0 +1,50 @@ +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.Nonbreaking', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceNonBreaking', function() { + ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '·' : ' '); + }); + + // Register buttons + ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); + + if (ed.getParam('nonbreaking_force_tab')) { + ed.onKeyDown.add(function(ed, e) { + if (tinymce.isIE && e.keyCode == 9) { + ed.execCommand('mceNonBreaking'); + ed.execCommand('mceNonBreaking'); + ed.execCommand('mceNonBreaking'); + tinymce.dom.Event.cancel(e); + } + }); + } + }, + + getInfo : function() { + return { + longname : 'Nonbreaking space', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + + // Private methods + }); + + // Register plugin + tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js new file mode 100644 index 00000000..8a1b8f07 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js @@ -0,0 +1 @@ +(function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.NonEditablePlugin',{init:function(ed,url){var t=this,editClass,nonEditClass;t.editor=ed;editClass=ed.getParam("noneditable_editable_class","mceEditable");nonEditClass=ed.getParam("noneditable_noneditable_class","mceNonEditable");ed.onNodeChange.addToTop(function(ed,cm,n){var sc,ec;sc=ed.dom.getParent(ed.selection.getStart(),function(n){return ed.dom.hasClass(n,nonEditClass);});ec=ed.dom.getParent(ed.selection.getEnd(),function(n){return ed.dom.hasClass(n,nonEditClass);});if(sc||ec){t._setDisabled(1);return false;}else t._setDisabled(0);});},getInfo:function(){return{longname:'Non editable elements',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_block:function(ed,e){var k=e.keyCode;if((k>32&&k<41)||(k>111&&k<124))return;return Event.cancel(e);},_setDisabled:function(s){var t=this,ed=t.editor;tinymce.each(ed.controlManager.controls,function(c){c.setDisabled(s);});if(s!==t.disabled){if(s){ed.onKeyDown.addToTop(t._block);ed.onKeyPress.addToTop(t._block);ed.onKeyUp.addToTop(t._block);ed.onPaste.addToTop(t._block);}else{ed.onKeyDown.remove(t._block);ed.onKeyPress.remove(t._block);ed.onKeyUp.remove(t._block);ed.onPaste.remove(t._block);}t.disabled=s;}}});tinymce.PluginManager.add('noneditable',tinymce.plugins.NonEditablePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js new file mode 100644 index 00000000..77db577c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -0,0 +1,87 @@ +/** + * $Id: editor_plugin_src.js 743 2008-03-23 17:47:33Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var Event = tinymce.dom.Event; + + tinymce.create('tinymce.plugins.NonEditablePlugin', { + init : function(ed, url) { + var t = this, editClass, nonEditClass; + + t.editor = ed; + editClass = ed.getParam("noneditable_editable_class", "mceEditable"); + nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable"); + + ed.onNodeChange.addToTop(function(ed, cm, n) { + var sc, ec; + + // Block if start or end is inside a non editable element + sc = ed.dom.getParent(ed.selection.getStart(), function(n) { + return ed.dom.hasClass(n, nonEditClass); + }); + + ec = ed.dom.getParent(ed.selection.getEnd(), function(n) { + return ed.dom.hasClass(n, nonEditClass); + }); + + // Block or unblock + if (sc || ec) { + t._setDisabled(1); + return false; + } else + t._setDisabled(0); + }); + }, + + getInfo : function() { + return { + longname : 'Non editable elements', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _block : function(ed, e) { + var k = e.keyCode; + + // Don't block arrow keys, pg up/down, and F1-F12 + if ((k > 32 && k < 41) || (k > 111 && k < 124)) + return; + + return Event.cancel(e); + }, + + _setDisabled : function(s) { + var t = this, ed = t.editor; + + tinymce.each(ed.controlManager.controls, function(c) { + c.setDisabled(s); + }); + + if (s !== t.disabled) { + if (s) { + ed.onKeyDown.addToTop(t._block); + ed.onKeyPress.addToTop(t._block); + ed.onKeyUp.addToTop(t._block); + ed.onPaste.addToTop(t._block); + } else { + ed.onKeyDown.remove(t._block); + ed.onKeyPress.remove(t._block); + ed.onKeyUp.remove(t._block); + ed.onPaste.remove(t._block); + } + + t.disabled = s; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/css/content.css b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/css/content.css new file mode 100644 index 00000000..c949d58c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/css/content.css @@ -0,0 +1 @@ +.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../img/pagebreak.gif) no-repeat center top;} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js new file mode 100644 index 00000000..177ea95b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.PageBreakPlugin',{init:function(ed,url){var pb='',cls='mcePageBreak',sep=ed.getParam('pagebreak_separator',''),pbRE;pbRE=new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return'\\'+a;}),'g');ed.addCommand('mcePageBreak',function(){ed.execCommand('mceInsertContent',0,pb);});ed.addButton('pagebreak',{title:'pagebreak.desc',cmd:cls});ed.onInit.add(function(){if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.node.nodeName=='IMG'&&ed.dom.hasClass(o.node,cls))o.name='pagebreak';});}});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='IMG'&&ed.dom.hasClass(e,cls))ed.selection.select(e);});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('pagebreak',n.nodeName==='IMG'&&ed.dom.hasClass(n,cls));});ed.onBeforeSetContent.add(function(ed,o){o.content=o.content.replace(pbRE,pb);});ed.onPostProcess.add(function(ed,o){if(o.get)o.content=o.content.replace(/]+>/g,function(im){if(im.indexOf('class="mcePageBreak')!==-1)im=sep;return im;});});},getInfo:function(){return{longname:'PageBreak',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('pagebreak',tinymce.plugins.PageBreakPlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js new file mode 100644 index 00000000..16f57482 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js @@ -0,0 +1,74 @@ +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.PageBreakPlugin', { + init : function(ed, url) { + var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; + + pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); + + // Register commands + ed.addCommand('mcePageBreak', function() { + ed.execCommand('mceInsertContent', 0, pb); + }); + + // Register buttons + ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); + + ed.onInit.add(function() { + if (ed.settings.content_css !== false) + ed.dom.loadCSS(url + "/css/content.css"); + + if (ed.theme.onResolveName) { + ed.theme.onResolveName.add(function(th, o) { + if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) + o.name = 'pagebreak'; + }); + } + }); + + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls)) + ed.selection.select(e); + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls)); + }); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = o.content.replace(pbRE, pb); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.get) + o.content = o.content.replace(/]+>/g, function(im) { + if (im.indexOf('class="mcePageBreak') !== -1) + im = sep; + + return im; + }); + }); + }, + + getInfo : function() { + return { + longname : 'PageBreak', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif new file mode 100644 index 00000000..acdf4085 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/trans.gif b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/trans.gif new file mode 100644 index 00000000..38848651 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/trans.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/paste/blank.htm b/includes/tinymce/jscripts/tiny_mce/plugins/paste/blank.htm new file mode 100644 index 00000000..7ba26bd6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/paste/blank.htm @@ -0,0 +1,22 @@ + + +blank_page + + + + + + + + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/paste/css/blank.css b/includes/tinymce/jscripts/tiny_mce/plugins/paste/css/blank.css new file mode 100644 index 00000000..6b16bac2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/paste/css/blank.css @@ -0,0 +1,14 @@ +html, body {height:98%} +body { +background-color: #FFFFFF; +font-family: Verdana, Arial, Helvetica, sans-serif; +font-size: 10px; +scrollbar-3dlight-color: #F0F0EE; +scrollbar-arrow-color: #676662; +scrollbar-base-color: #F0F0EE; +scrollbar-darkshadow-color: #DDDDDD; +scrollbar-face-color: #E0E0DD; +scrollbar-highlight-color: #F0F0EE; +scrollbar-shadow-color: #F0F0EE; +scrollbar-track-color: #F5F5F5; +} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/paste/css/pasteword.css b/includes/tinymce/jscripts/tiny_mce/plugins/paste/css/pasteword.css new file mode 100644 index 00000000..b3be6270 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/paste/css/pasteword.css @@ -0,0 +1,3 @@ +.sourceIframe { + border: 1px solid #808080; +} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js new file mode 100644 index 00000000..eeeebd5b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js @@ -0,0 +1 @@ +(function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.PastePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mcePasteText',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pastetext.htm',width:450,height:400,inline:1},{plugin_url:url});}else t._insertText(clipboardData.getData("Text"),true);}else t._insertText(v.html,v.linebreaks);});ed.addCommand('mcePasteWord',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pasteword.htm',width:450,height:400,inline:1},{plugin_url:url});}else t._insertText(t._clipboardHTML());}else t._insertWordContent(v);});ed.addCommand('mceSelectAll',function(){ed.execCommand('selectall');});ed.addButton('pastetext',{title:'paste.paste_text_desc',cmd:'mcePasteText',ui:true});ed.addButton('pasteword',{title:'paste.paste_word_desc',cmd:'mcePasteWord',ui:true});ed.addButton('selectall',{title:'paste.selectall_desc',cmd:'mceSelectAll'});if(ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onPaste.add(function(ed,e){return t._handlePasteEvent(e)});}if(!tinymce.isIE&&ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onKeyDown.add(function(ed,e){if(e.ctrlKey&&e.keyCode==86){window.setTimeout(function(){ed.execCommand("mcePasteText",true);},1);Event.cancel(e);}});}},getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_handlePasteEvent:function(e){var html=this._clipboardHTML(),ed=this.editor,sel=ed.selection,r;if(ed&&(r=sel.getRng())&&r.text.length>0)ed.execCommand('delete');if(html&&html.length>0)ed.execCommand('mcePasteWord',false,html);return Event.cancel(e);},_insertText:function(content,bLinebreaks){content=this.editor.dom.encode(content);if(content&&content.length>0){if(!this.editor.selection.isCollapsed())this.editor.execCommand("Delete");if(bLinebreaks){if(this.editor.getParam("paste_create_paragraphs",true)){var rl=this.editor.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i

');content=content.replace(/\r\r/g,'

');content=content.replace(/\n\n/g,'

');if((pos=content.indexOf('

'))!=-1){this.editor.execCommand("Delete");var node=this.editor.selection.getNode();var breakElms=[];do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="

";before+=content.substring(0,pos);for(var i=0;i";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";}before+="

";content=before+content.substring(pos+7)+after;}}if(this.editor.getParam("paste_create_linebreaks",true)){content=content.replace(/\r\n/g,'
');content=content.replace(/\r/g,'
');content=content.replace(/\n/g,'
');}}this.editor.execCommand("mceInsertRawHTML",false,content);}},_insertWordContent:function(content){var t=this,ed=t.editor;if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','before',content);var rl=ed.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i(.*?)<\/p>','gi'),'

$1

');}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)
","gi"),"

"+middot+"$1

");content=content.replace(new RegExp('','gi'),""+bull);content=content.replace(/<\/o:p>/gi,"");content=content.replace(new RegExp('
]+>/g,"");if(this.editor.getParam("paste_remove_spans",true))content=content.replace(/<\/?span[^>]*>/gi,"");if(this.editor.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(this.editor.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break;}content=content.replace(new RegExp('href="?'+this._reEscape(""+document.location)+'','gi'),'href="'+this.editor.documentBaseURI.getURI());content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*

 <\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!this.editor.getParam('force_p_newlines')){content=content.replace('','','gi');content=content.replace('

','

','gi');}if(!tinymce.isIE&&!this.editor.getParam('force_p_newlines')){content=content.replace(/<\/?p[^>]*>/gi,"");}content=content.replace(/<\/?div[^>]*>/gi,"");if(this.editor.getParam("paste_convert_middot_lists",true)){var div=ed.dom.create("div",null,content);var className=this.editor.getParam("paste_unindented_list_class","unIndentedList");while(this._convertMiddots(div,"--list--"));while(this._convertMiddots(div,middot,className));while(this._convertMiddots(div,bull));content=div.innerHTML;}if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/ <\/h[1-6]>/gi,'

  

');content=content.replace(//gi,'

');content=content.replace(/<\/h[1-6]>/gi,'

');content=content.replace(/ <\/b>/gi,'  ');content=content.replace(/^( )*/gi,'');}content=content.replace(/--list--/gi,"");if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','after',content);this.editor.execCommand("mceInsertContent",false,content);if(this.editor.getParam('paste_force_cleanup_wordpaste',true)){var ed=this.editor;window.setTimeout(function(){ed.execCommand("mceCleanup");},1);}}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i 0) + ed.execCommand('delete'); + + if (html && html.length > 0) + ed.execCommand('mcePasteWord', false, html); + + return Event.cancel(e); + }, + + _insertText : function(content, bLinebreaks) { + content = this.editor.dom.encode(content); + + if (content && content.length > 0) { + // Delete any highlighted text before pasting + if (!this.editor.selection.isCollapsed()) + this.editor.execCommand("Delete"); + + if (bLinebreaks) { + // Special paragraph treatment + if (this.editor.getParam("paste_create_paragraphs", true)) { + var rl = this.editor.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); + for (var i=0; i

'); + content = content.replace(/\r\r/g, '

'); + content = content.replace(/\n\n/g, '

'); + + // Has paragraphs + if ((pos = content.indexOf('

')) != -1) { + this.editor.execCommand("Delete"); + + var node = this.editor.selection.getNode(); + + // Get list of elements to break + var breakElms = []; + + do { + if (node.nodeType == 1) { + // Don't break tables and break at body + if (node.nodeName == "TD" || node.nodeName == "BODY") + break; + + breakElms[breakElms.length] = node; + } + } while(node = node.parentNode); + + var before = "", after = "

"; + before += content.substring(0, pos); + + for (var i=0; i"; + after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">"; + } + + before += "

"; + content = before + content.substring(pos+7) + after; + } + } + + if (this.editor.getParam("paste_create_linebreaks", true)) { + content = content.replace(/\r\n/g, '
'); + content = content.replace(/\r/g, '
'); + content = content.replace(/\n/g, '
'); + } + } + + this.editor.execCommand("mceInsertRawHTML", false, content); + } + }, + + _insertWordContent : function(content) { + var t = this, ed = t.editor; + + if (content && content.length > 0) { + // Cleanup Word content + var bull = String.fromCharCode(8226); + var middot = String.fromCharCode(183); + + if (ed.getParam('paste_insert_word_content_callback')) + content = ed.execCallback('paste_insert_word_content_callback', 'before', content); + + var rl = ed.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); + for (var i=0; i(.*?)<\/p>', 'gi'), '

$1

'); + } + + content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--"); + content = content.replace(new RegExp(bull + "(.*?)
", "gi"), "

" + middot + "$1

"); + content = content.replace(new RegExp('', 'gi'), "" + bull); // Covert to bull list + content = content.replace(/<\/o:p>/gi, ""); + content = content.replace(new RegExp('
]+>/g, ""); // Header elements + + if (this.editor.getParam("paste_remove_spans", true)) + content = content.replace(/<\/?span[^>]*>/gi, ""); + + if (this.editor.getParam("paste_remove_styles", true)) + content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3"); + + content = content.replace(/<\/?font[^>]*>/gi, ""); + + // Strips class attributes. + switch (this.editor.getParam("paste_strip_class_attributes", "all")) { + case "all": + content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); + break; + + case "mso": + content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3"); + break; + } + + content = content.replace(new RegExp('href="?' + this._reEscape("" + document.location) + '', 'gi'), 'href="' + this.editor.documentBaseURI.getURI()); + content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); + content = content.replace(/<\\?\?xml[^>]*>/gi, ""); + content = content.replace(/<\/?\w+:[^>]*>/gi, ""); + content = content.replace(/-- page break --\s*

 <\/p>/gi, ""); // Remove pagebreaks + content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks + + // content = content.replace(/\/? */gi, "");   + // content = content.replace(/

 <\/p>/gi, ''); + + if (!this.editor.getParam('force_p_newlines')) { + content = content.replace('', '' ,'gi'); + content = content.replace('

', '

' ,'gi'); + } + + if (!tinymce.isIE && !this.editor.getParam('force_p_newlines')) { + content = content.replace(/<\/?p[^>]*>/gi, ""); + } + + content = content.replace(/<\/?div[^>]*>/gi, ""); + + // Convert all middlot lists to UL lists + if (this.editor.getParam("paste_convert_middot_lists", true)) { + var div = ed.dom.create("div", null, content); + + // Convert all middot paragraphs to li elements + var className = this.editor.getParam("paste_unindented_list_class", "unIndentedList"); + + while (this._convertMiddots(div, "--list--")) ; // bull + while (this._convertMiddots(div, middot, className)) ; // Middot + while (this._convertMiddots(div, bull)) ; // bull + + content = div.innerHTML; + } + + // Replace all headers with strong and fix some other issues + if (this.editor.getParam("paste_convert_headers_to_strong", false)) { + content = content.replace(/ <\/h[1-6]>/gi, '

  

'); + content = content.replace(//gi, '

'); + content = content.replace(/<\/h[1-6]>/gi, '

'); + content = content.replace(/ <\/b>/gi, '  '); + content = content.replace(/^( )*/gi, ''); + } + + content = content.replace(/--list--/gi, ""); // Remove --list-- + + if (ed.getParam('paste_insert_word_content_callback')) + content = ed.execCallback('paste_insert_word_content_callback', 'after', content); + + // Insert cleaned content + this.editor.execCommand("mceInsertContent", false, content); + + if (this.editor.getParam('paste_force_cleanup_wordpaste', true)) { + var ed = this.editor; + + window.setTimeout(function() { + ed.execCommand("mceCleanup"); + }, 1); // Do normal cleanup detached from this thread + } + } + }, + + _reEscape : function(s) { + var l = "?.\\*[](){}+^$:"; + var o = ""; + + for (var i=0; i + + {#paste.paste_text_desc} + + + + + + +
+
{#paste.paste_text_desc}
+ +
+ +
+ +
+ +
{#paste_dlg.text_title}
+ + + +
+
+ +
+ +
+ +
+
+
+ + \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm b/includes/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm new file mode 100644 index 00000000..9e5ab1b5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm @@ -0,0 +1,29 @@ + + + + {#paste.paste_word_desc} + + + + + + +
+
{#paste.paste_word_desc}
+ +
{#paste_dlg.word_title}
+ +
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js index 5e896ebe..deb4bce9 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js @@ -1,2 +1 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('preview','cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr');function TinyMCE_preview_getControlHTML(control_name){switch(control_name){case "preview":return '';}return "";}function TinyMCE_preview_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")});}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="";html+='';html+='';html+='';html+=''+tinyMCE.getLang('lang_preview_desc')+'';html+='';html+='';html+='';html+='';html+=tinyMCE.getContent();html+='';html+='';win.document.write(html);win.document.close();}return true;}return false;} \ No newline at end of file +(function(){tinymce.create('tinymce.plugins.Preview',{init:function(ed,url){var t=this,css=tinymce.explode(ed.settings.content_css);t.editor=ed;tinymce.each(css,function(u,k){css[k]=ed.documentBaseURI.toAbsolute(u);});ed.addCommand('mcePreview',function(){ed.windowManager.open({file:ed.getParam("plugin_preview_pageurl",url+"/preview.html"),width:parseInt(ed.getParam("plugin_preview_width","550")),height:parseInt(ed.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:css.join(','),inline:ed.getParam("plugin_preview_inline",1)},{base:ed.documentBaseURI.getURI()});});ed.addButton('preview',{title:'preview.preview_desc',cmd:'mcePreview'});},getInfo:function(){return{longname:'Preview',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('preview',tinymce.plugins.Preview);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js index d1c4a612..b2d27f7c 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js @@ -1,61 +1,50 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('preview', 'cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr'); - /** - * Returns the HTML contents of the preview control. + * $Id: editor_plugin_src.js 895 2008-07-10 14:34:23Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. */ -function TinyMCE_preview_getControlHTML(control_name) { - switch (control_name) { - case "preview": - return ''; - } - return ""; -} +(function() { + tinymce.create('tinymce.plugins.Preview', { + init : function(ed, url) { + var t = this, css = tinymce.explode(ed.settings.content_css); -/** - * Executes the mcePreview command. - */ -function TinyMCE_preview_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mcePreview": - var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null); - var previewWidth = tinyMCE.getParam("plugin_preview_width", "550"); - var previewHeight = tinyMCE.getParam("plugin_preview_height", "600"); + t.editor = ed; - // Use a custom preview page - if (previewPage) { - var template = new Array(); + // Force absolute CSS urls + tinymce.each(css, function(u, k) { + css[k] = ed.documentBaseURI.toAbsolute(u); + }); - template['file'] = previewPage; - template['width'] = previewWidth; - template['height'] = previewHeight; + ed.addCommand('mcePreview', function() { + ed.windowManager.open({ + file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"), + width : parseInt(ed.getParam("plugin_preview_width", "550")), + height : parseInt(ed.getParam("plugin_preview_height", "600")), + resizable : "yes", + scrollbars : "yes", + popup_css : css.join(','), + inline : ed.getParam("plugin_preview_inline", 1) + }, { + base : ed.documentBaseURI.getURI() + }); + }); - tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")}); - } else { - var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight); - var html = ""; + ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'}); + }, - html += ''; - html += ''; - html += ''; - html += '' + tinyMCE.getLang('lang_preview_desc') + ''; - html += ''; - html += ''; - html += ''; - html += ''; - html += tinyMCE.getContent(); - html += ''; - html += ''; + getInfo : function() { + return { + longname : 'Preview', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); - win.document.write(html); - win.document.close(); - } - - return true; - } - - // Pass to next handler in chain - return false; -} + // Register plugin + tinymce.PluginManager.add('preview', tinymce.plugins.Preview); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/preview/example.html b/includes/tinymce/jscripts/tiny_mce/plugins/preview/example.html index 15ed4713..b2c3d90c 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/preview/example.html +++ b/includes/tinymce/jscripts/tiny_mce/plugins/preview/example.html @@ -1,14 +1,28 @@ - - - - -Example of a custom preview page - - - - -Editor contents:
-{$content} - - - + + + + + +Example of a custom preview page + + + +Editor contents:
+
+ +
+ + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/preview/images/preview.gif b/includes/tinymce/jscripts/tiny_mce/plugins/preview/images/preview.gif deleted file mode 100644 index 4e7900c3..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/preview/images/preview.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js b/includes/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js new file mode 100644 index 00000000..f8dc8105 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ' + + + + +{#preview.preview_desc} + + + + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/preview/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/preview/readme.txt deleted file mode 100644 index a8acc993..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/preview/readme.txt +++ /dev/null @@ -1,23 +0,0 @@ - Preview plugin for TinyMCE ------------------------------------ - -Installation instructions: - * Copy the preview directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "preview". - * Add the preview button name to button list, example: theme_advanced_buttons3_add : "preview". - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "preview", - theme_advanced_buttons3_add : "preview", - plugin_preview_width : "500", - plugin_preview_height : "600" - }); - -Configuration: - plugin_preview_width - Preview window width. Defaults to 550. - plugin_preview_height - Preview window height. Defaults to 600. - plugin_preview_pageurl - Custom preview page URL relative from theme - use "../../plugins/preview/example.html" for a example. diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js index 8311d6fa..7d09a87c 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js @@ -1,2 +1 @@ -/* Import theme specific language pack */ - tinyMCE.importPluginLanguagePack('print','en,sv,zh_cn,fa,fr_ca,fr,de');function TinyMCE_print_getControlHTML(control_name){switch(control_name){case "print":return '';}return "";}function TinyMCE_print_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePrint":tinyMCE.getInstanceById(editor_id).contentWindow.print();return true;}return false;} \ No newline at end of file +(function(){tinymce.create('tinymce.plugins.Print',{init:function(ed,url){ed.addCommand('mcePrint',function(){ed.getWin().print();});ed.addButton('print',{title:'print.print_desc',cmd:'mcePrint'});},getInfo:function(){return{longname:'Print',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('print',tinymce.plugins.Print);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js index ebc84fea..51fe1567 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js @@ -1,26 +1,31 @@ -/* Import theme specific language pack */ -tinyMCE.importPluginLanguagePack('print', 'en,sv,zh_cn,fa,fr_ca,fr,de'); - -function TinyMCE_print_getControlHTML(control_name) { - switch (control_name) { - case "print": - return ''; - } - - return ""; -} - -/** - * Executes the search/replace commands. - */ -function TinyMCE_print_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mcePrint": - tinyMCE.getInstanceById(editor_id).contentWindow.print(); - return true; - } - - // Pass to next handler in chain - return false; -} +/** + * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.Print', { + init : function(ed, url) { + ed.addCommand('mcePrint', function() { + ed.getWin().print(); + }); + + ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'}); + }, + + getInfo : function() { + return { + longname : 'Print', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('print', tinymce.plugins.Print); +})(); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/images/print.gif b/includes/tinymce/jscripts/tiny_mce/plugins/print/images/print.gif deleted file mode 100644 index 1172f4db..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/print/images/print.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/de.js deleted file mode 100644 index c4175fde..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/de.js +++ /dev/null @@ -1,3 +0,0 @@ -// DE lang variables - -tinyMCELang['lang_print_desc'] = 'Drucken'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/en.js deleted file mode 100644 index 7c9e2335..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/en.js +++ /dev/null @@ -1,3 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_print_desc'] = 'Print'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fa.js deleted file mode 100644 index 53deb6f9..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fa.js +++ /dev/null @@ -1,8 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_print_desc'] = 'چاپ'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fr.js deleted file mode 100644 index 33c33c80..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fr.js +++ /dev/null @@ -1,3 +0,0 @@ -// French lang variables by Laurent Dran - -tinyMCELang['lang_print_desc'] = 'Imprimer'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fr_ca.js deleted file mode 100644 index 58b5068c..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/fr_ca.js +++ /dev/null @@ -1,3 +0,0 @@ -// CA_FR lang variables - -tinyMCELang['lang_print_desc'] = 'Imprimer'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/sv.js deleted file mode 100644 index c041266d..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/sv.js +++ /dev/null @@ -1,3 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_print_desc'] = 'Skrivut'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/zh_cn.js deleted file mode 100644 index 72957fb0..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/langs/zh_cn.js +++ /dev/null @@ -1,3 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_print_desc'] = '´òÓ¡'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/print/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/print/readme.txt deleted file mode 100644 index 28169c53..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/print/readme.txt +++ /dev/null @@ -1,17 +0,0 @@ - Print plugin for TinyMCE ------------------------------ - -About: - This plugin adds a print button to TinyMCE. - -Installation instructions: - * Copy the print directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "print". - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "print", - theme_advanced_buttons1_add : "print", - }); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/readme.txt deleted file mode 100644 index 9192b26a..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/readme.txt +++ /dev/null @@ -1 +0,0 @@ -This is the location you place TinyMCE plugins. diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/safari/blank.htm b/includes/tinymce/jscripts/tiny_mce/plugins/safari/blank.htm new file mode 100644 index 00000000..266808ce --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/safari/blank.htm @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/safari/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/safari/editor_plugin.js new file mode 100644 index 00000000..4daac19f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/safari/editor_plugin.js @@ -0,0 +1 @@ +(function(){var Event=tinymce.dom.Event,grep=tinymce.grep,each=tinymce.each,inArray=tinymce.inArray,isOldWebKit=tinymce.isOldWebKit;function isEmpty(d,e,f){var w,n;w=d.createTreeWalker(e,NodeFilter.SHOW_ALL,null,false);while(n=w.nextNode()){if(f){if(!f(n))return false;}if(n.nodeType==3&&n.nodeValue&&/[^\s\u00a0]+/.test(n.nodeValue))return false;if(n.nodeType==1&&/^(HR|IMG|TABLE)$/.test(n.nodeName))return false;}return true;};tinymce.create('tinymce.plugins.Safari',{init:function(ed){var t=this,dom;if(!tinymce.isWebKit)return;t.editor=ed;t.webKitFontSizes=['x-small','small','medium','large','x-large','xx-large','-webkit-xxx-large'];t.namedFontSizes=['xx-small','x-small','small','medium','large','x-large','xx-large'];ed.addCommand('CreateLink',function(u,v){var n=ed.selection.getNode(),dom=ed.dom,a;if(n&&(/^(left|right)$/i.test(dom.getStyle(n,'float',1))||/^(left|right)$/i.test(dom.getAttrib(n,'align')))){a=dom.create('a',{href:v},n.cloneNode());n.parentNode.replaceChild(a,n);ed.selection.select(a);}else ed.getDoc().execCommand("CreateLink",false,v);});ed.onPaste.add(function(ed,e){function removeStyles(e){e=e.target;if(e.nodeType==1){e.style.cssText='';each(ed.dom.select('*',e),function(e){e.style.cssText='';});}};Event.add(ed.getDoc(),'DOMNodeInserted',removeStyles);window.setTimeout(function(){Event.remove(ed.getDoc(),'DOMNodeInserted',removeStyles);},0);});ed.onKeyUp.add(function(ed,e){var h,b,r,n,s;if(e.keyCode==46||e.keyCode==8){b=ed.getBody();h=b.innerHTML;s=ed.selection;if(b.childNodes.length==1&&!/<(img|hr)/.test(h)&&tinymce.trim(h.replace(/<[^>]+>/g,'')).length==0){ed.setContent('


',{format:'raw'});n=b.firstChild;r=s.getRng();r.setStart(n,0);r.setEnd(n,0);s.setRng(r);}}});ed.addCommand('FormatBlock',function(u,v){var dom=ed.dom,e=dom.getParent(ed.selection.getNode(),dom.isBlock);if(e)dom.replace(dom.create(v),e,1);else ed.getDoc().execCommand("FormatBlock",false,v);});ed.addCommand('mceInsertContent',function(u,v){ed.getDoc().execCommand("InsertText",false,'mce_marker');ed.getBody().innerHTML=ed.getBody().innerHTML.replace(/mce_marker/g,ed.dom.processHTML(v)+'XX');ed.selection.select(ed.dom.get('_mce_tmp'));ed.getDoc().execCommand("Delete",false,' ');});ed.onKeyPress.add(function(ed,e){var se,li,lic,r1,r2,n,sel,doc,be,af,pa;if(e.keyCode==13){sel=ed.selection;se=sel.getNode();if(e.shiftKey||ed.settings.force_br_newlines&&se.nodeName!='LI'){t._insertBR(ed);Event.cancel(e);}if(li=dom.getParent(se,'LI')){lic=dom.getParent(li,'OL,UL');doc=ed.getDoc();pa=dom.create('p');dom.add(pa,'br',{mce_bogus:"1"});if(isEmpty(doc,li)){if(n=dom.getParent(lic.parentNode,'LI,OL,UL'))return;n=dom.getParent(lic,'p,h1,h2,h3,h4,h5,h6,div')||lic;r1=doc.createRange();r1.setStartBefore(n);r1.setEndBefore(li);r2=doc.createRange();r2.setStartAfter(li);r2.setEndAfter(n);be=r1.cloneContents();af=r2.cloneContents();if(!isEmpty(doc,af))dom.insertAfter(af,n);dom.insertAfter(pa,n);if(!isEmpty(doc,be))dom.insertAfter(be,n);dom.remove(n);n=pa.firstChild;r1=doc.createRange();r1.setStartBefore(n);r1.setEndBefore(n);sel.setRng(r1);return Event.cancel(e);}}}});ed.onExecCommand.add(function(ed,cmd){var sel,dom,bl,bm;if(cmd=='InsertUnorderedList'||cmd=='InsertOrderedList'){sel=ed.selection;dom=ed.dom;if(bl=dom.getParent(sel.getNode(),function(n){return/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName);})){bm=sel.getBookmark();dom.remove(bl,1);sel.moveToBookmark(bm);}}});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName=='IMG'){t.selElm=e;ed.selection.select(e);}else t.selElm=null;});ed.onInit.add(function(){t._fixWebKitSpans();if(isOldWebKit)t._patchSafari2x(ed);});ed.onSetContent.add(function(){dom=ed.dom;each(['strong','b','em','u','strike','sub','sup','a'],function(v){each(grep(dom.select(v)).reverse(),function(n){var nn=n.nodeName.toLowerCase(),st;if(nn=='a'){if(n.name)dom.replace(dom.create('img',{mce_name:'a',name:n.name,'class':'mceItemAnchor'}),n);return;}switch(nn){case'b':case'strong':if(nn=='b')nn='strong';st='font-weight: bold;';break;case'em':st='font-style: italic;';break;case'u':st='text-decoration: underline;';break;case'sub':st='vertical-align: sub;';break;case'sup':st='vertical-align: super;';break;case'strike':st='text-decoration: line-through;';break;}dom.replace(dom.create('span',{mce_name:nn,style:st,'class':'Apple-style-span'}),n,1);});});});ed.onPreProcess.add(function(ed,o){dom=ed.dom;each(grep(o.node.getElementsByTagName('span')).reverse(),function(n){var v,bg;if(o.get){if(dom.hasClass(n,'Apple-style-span')){bg=n.style.backgroundColor;switch(dom.getAttrib(n,'mce_name')){case'font':if(!ed.settings.convert_fonts_to_spans)dom.setAttrib(n,'style','');break;case'strong':case'em':case'sub':case'sup':dom.setAttrib(n,'style','');break;case'strike':case'u':if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');else dom.setAttrib(n,'mce_name','');break;default:if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');}if(bg)n.style.backgroundColor=bg;}}if(dom.hasClass(n,'mceItemRemoved'))dom.remove(n,1);});});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/
<\/(h[1-6]|div|p|address|pre)>/g,'');o.content=o.content.replace(/ id=\"undefined\"/g,'');});},getInfo:function(){return{longname:'Safari compatibility',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_fixWebKitSpans:function(){var t=this,ed=t.editor;if(!isOldWebKit){Event.add(ed.getDoc(),'DOMNodeInserted',function(e){e=e.target;if(e&&e.nodeType==1)t._fixAppleSpan(e);});}else{ed.onExecCommand.add(function(){each(ed.dom.select('span'),function(n){t._fixAppleSpan(n);});ed.nodeChanged();});}},_fixAppleSpan:function(e){var ed=this.editor,dom=ed.dom,fz=this.webKitFontSizes,fzn=this.namedFontSizes,s=ed.settings,st,p;if(dom.getAttrib(e,'mce_fixed'))return;if(e.nodeName=='SPAN'&&e.className=='Apple-style-span'){st=e.style;if(!s.convert_fonts_to_spans){if(st.fontSize){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'size',inArray(fz,st.fontSize)+1);}if(st.fontFamily){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'face',st.fontFamily);}if(st.color){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'color',dom.toHex(st.color));}if(st.backgroundColor){dom.setAttrib(e,'mce_name','font');dom.setStyle(e,'background-color',st.backgroundColor);}}else{if(st.fontSize)dom.setStyle(e,'fontSize',fzn[inArray(fz,st.fontSize)]);}if(st.fontWeight=='bold')dom.setAttrib(e,'mce_name','strong');if(st.fontStyle=='italic')dom.setAttrib(e,'mce_name','em');if(st.textDecoration=='underline')dom.setAttrib(e,'mce_name','u');if(st.textDecoration=='line-through')dom.setAttrib(e,'mce_name','strike');if(st.verticalAlign=='super')dom.setAttrib(e,'mce_name','sup');if(st.verticalAlign=='sub')dom.setAttrib(e,'mce_name','sub');dom.setAttrib(e,'mce_fixed','1');}},_patchSafari2x:function(ed){var t=this,setContent,getNode,dom=ed.dom,lr;if(ed.windowManager.onBeforeOpen){ed.windowManager.onBeforeOpen.add(function(){r=ed.selection.getRng();});}ed.selection.select=function(n){this.getSel().setBaseAndExtent(n,0,n,1);};getNode=ed.selection.getNode;ed.selection.getNode=function(){return t.selElm||getNode.call(this);};ed.selection.getRng=function(){var t=this,s=t.getSel(),d=ed.getDoc(),r,rb,ra,di;if(s.anchorNode){r=d.createRange();try{rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(1);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(1);di=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;r.setStart(di?s.anchorNode:s.focusNode,di?s.anchorOffset:s.focusOffset);r.setEnd(di?s.focusNode:s.anchorNode,di?s.focusOffset:s.anchorOffset);lr=r;}catch(ex){}}return r||lr;};setContent=ed.selection.setContent;ed.selection.setContent=function(h,s){var r=this.getRng(),b;try{setContent.call(this,h,s);}catch(ex){b=dom.create('body');b.innerHTML=h;each(b.childNodes,function(n){r.insertNode(n.cloneNode(true));});}};},_insertBR:function(ed){var dom=ed.dom,s=ed.selection,r=s.getRng(),br;r.insertNode(br=dom.create('br'));r.setStartAfter(br);r.setEndAfter(br);s.setRng(r);if(s.getSel().focusNode==br.previousSibling){s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'),br));s.collapse(1);}ed.getWin().scrollTo(0,dom.getPos(s.getRng().startContainer).y);}});tinymce.PluginManager.add('safari',tinymce.plugins.Safari);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/safari/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/safari/editor_plugin_src.js new file mode 100644 index 00000000..642d659e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/safari/editor_plugin_src.js @@ -0,0 +1,514 @@ +/** + * $Id: editor_plugin_src.js 264 2007-04-26 20:53:09Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var Event = tinymce.dom.Event, grep = tinymce.grep, each = tinymce.each, inArray = tinymce.inArray, isOldWebKit = tinymce.isOldWebKit; + + function isEmpty(d, e, f) { + var w, n; + + w = d.createTreeWalker(e, NodeFilter.SHOW_ALL, null, false); + while (n = w.nextNode()) { + // Filter func + if (f) { + if (!f(n)) + return false; + } + + // Non whitespace text node + if (n.nodeType == 3 && n.nodeValue && /[^\s\u00a0]+/.test(n.nodeValue)) + return false; + + // Is non text element byt still content + if (n.nodeType == 1 && /^(HR|IMG|TABLE)$/.test(n.nodeName)) + return false; + } + + return true; + }; + + tinymce.create('tinymce.plugins.Safari', { + init : function(ed) { + var t = this, dom; + + // Ignore on non webkit + if (!tinymce.isWebKit) + return; + + t.editor = ed; + t.webKitFontSizes = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large']; + t.namedFontSizes = ['xx-small', 'x-small','small','medium','large','x-large', 'xx-large']; + + // Safari CreateLink command will not work correctly on images that is aligned + ed.addCommand('CreateLink', function(u, v) { + var n = ed.selection.getNode(), dom = ed.dom, a; + + if (n && (/^(left|right)$/i.test(dom.getStyle(n, 'float', 1)) || /^(left|right)$/i.test(dom.getAttrib(n, 'align')))) { + a = dom.create('a', {href : v}, n.cloneNode()); + n.parentNode.replaceChild(a, n); + ed.selection.select(a); + } else + ed.getDoc().execCommand("CreateLink", false, v); + }); + + ed.onPaste.add(function(ed, e) { + function removeStyles(e) { + e = e.target; + + if (e.nodeType == 1) { + e.style.cssText = ''; + + each(ed.dom.select('*', e), function(e) { + e.style.cssText = ''; + }); + } + }; + + Event.add(ed.getDoc(), 'DOMNodeInserted', removeStyles); + + window.setTimeout(function() { + Event.remove(ed.getDoc(), 'DOMNodeInserted', removeStyles); + }, 0); + }); + + ed.onKeyUp.add(function(ed, e) { + var h, b, r, n, s; + + // If backspace or delete key + if (e.keyCode == 46 || e.keyCode == 8) { + b = ed.getBody(); + h = b.innerHTML; + s = ed.selection; + + // If there is no text content or images or hr elements then remove everything + if (b.childNodes.length == 1 && !/<(img|hr)/.test(h) && tinymce.trim(h.replace(/<[^>]+>/g, '')).length == 0) { + // Inject paragrah and bogus br + ed.setContent('


', {format : 'raw'}); + + // Move caret before bogus br + n = b.firstChild; + r = s.getRng(); + r.setStart(n, 0); + r.setEnd(n, 0); + s.setRng(r); + } + } + }); + + // Workaround for FormatBlock bug, http://bugs.webkit.org/show_bug.cgi?id=16004 + ed.addCommand('FormatBlock', function(u, v) { + var dom = ed.dom, e = dom.getParent(ed.selection.getNode(), dom.isBlock); + + if (e) + dom.replace(dom.create(v), e, 1); + else + ed.getDoc().execCommand("FormatBlock", false, v); + }); + + // Workaround for InsertHTML bug, http://bugs.webkit.org/show_bug.cgi?id=16382 + ed.addCommand('mceInsertContent', function(u, v) { + ed.getDoc().execCommand("InsertText", false, 'mce_marker'); + ed.getBody().innerHTML = ed.getBody().innerHTML.replace(/mce_marker/g, ed.dom.processHTML(v) + 'XX'); + ed.selection.select(ed.dom.get('_mce_tmp')); + ed.getDoc().execCommand("Delete", false, ' '); + }); + + ed.onKeyPress.add(function(ed, e) { + var se, li, lic, r1, r2, n, sel, doc, be, af, pa; + + if (e.keyCode == 13) { + sel = ed.selection; + se = sel.getNode(); + + // Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973 + if (e.shiftKey || ed.settings.force_br_newlines && se.nodeName != 'LI') { + t._insertBR(ed); + Event.cancel(e); + } + + // Workaround for DIV elements produced by Safari + if (li = dom.getParent(se, 'LI')) { + lic = dom.getParent(li, 'OL,UL'); + doc = ed.getDoc(); + + pa = dom.create('p'); + dom.add(pa, 'br', {mce_bogus : "1"}); + + if (isEmpty(doc, li)) { + // If list in list then use browser default behavior + if (n = dom.getParent(lic.parentNode, 'LI,OL,UL')) + return; + + n = dom.getParent(lic, 'p,h1,h2,h3,h4,h5,h6,div') || lic; + + // Create range from the start of block element to the list item + r1 = doc.createRange(); + r1.setStartBefore(n); + r1.setEndBefore(li); + + // Create range after the list to the end of block element + r2 = doc.createRange(); + r2.setStartAfter(li); + r2.setEndAfter(n); + + be = r1.cloneContents(); + af = r2.cloneContents(); + + if (!isEmpty(doc, af)) + dom.insertAfter(af, n); + + dom.insertAfter(pa, n); + + if (!isEmpty(doc, be)) + dom.insertAfter(be, n); + + dom.remove(n); + + n = pa.firstChild; + r1 = doc.createRange(); + r1.setStartBefore(n); + r1.setEndBefore(n); + sel.setRng(r1); + + return Event.cancel(e); + } + } + } + }); + + // Safari doesn't place lists outside block elements + ed.onExecCommand.add(function(ed, cmd) { + var sel, dom, bl, bm; + + if (cmd == 'InsertUnorderedList' || cmd == 'InsertOrderedList') { + sel = ed.selection; + dom = ed.dom; + + if (bl = dom.getParent(sel.getNode(), function(n) {return /^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName);})) { + bm = sel.getBookmark(); + dom.remove(bl, 1); + sel.moveToBookmark(bm); + } + } + }); + + // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName == 'IMG') { + t.selElm = e; + ed.selection.select(e); + } else + t.selElm = null; + }); + + ed.onInit.add(function() { + t._fixWebKitSpans(); + + if (isOldWebKit) + t._patchSafari2x(ed); + }); + + ed.onSetContent.add(function() { + dom = ed.dom; + + // Convert strong,b,em,u,strike to spans + each(['strong','b','em','u','strike','sub','sup','a'], function(v) { + each(grep(dom.select(v)).reverse(), function(n) { + var nn = n.nodeName.toLowerCase(), st; + + // Convert anchors into images + if (nn == 'a') { + if (n.name) + dom.replace(dom.create('img', {mce_name : 'a', name : n.name, 'class' : 'mceItemAnchor'}), n); + + return; + } + + switch (nn) { + case 'b': + case 'strong': + if (nn == 'b') + nn = 'strong'; + + st = 'font-weight: bold;'; + break; + + case 'em': + st = 'font-style: italic;'; + break; + + case 'u': + st = 'text-decoration: underline;'; + break; + + case 'sub': + st = 'vertical-align: sub;'; + break; + + case 'sup': + st = 'vertical-align: super;'; + break; + + case 'strike': + st = 'text-decoration: line-through;'; + break; + } + + dom.replace(dom.create('span', {mce_name : nn, style : st, 'class' : 'Apple-style-span'}), n, 1); + }); + }); + }); + + ed.onPreProcess.add(function(ed, o) { + dom = ed.dom; + + each(grep(o.node.getElementsByTagName('span')).reverse(), function(n) { + var v, bg; + + if (o.get) { + if (dom.hasClass(n, 'Apple-style-span')) { + bg = n.style.backgroundColor; + + switch (dom.getAttrib(n, 'mce_name')) { + case 'font': + if (!ed.settings.convert_fonts_to_spans) + dom.setAttrib(n, 'style', ''); + break; + + case 'strong': + case 'em': + case 'sub': + case 'sup': + dom.setAttrib(n, 'style', ''); + break; + + case 'strike': + case 'u': + if (!ed.settings.inline_styles) + dom.setAttrib(n, 'style', ''); + else + dom.setAttrib(n, 'mce_name', ''); + + break; + + default: + if (!ed.settings.inline_styles) + dom.setAttrib(n, 'style', ''); + } + + + if (bg) + n.style.backgroundColor = bg; + } + } + + if (dom.hasClass(n, 'mceItemRemoved')) + dom.remove(n, 1); + }); + }); + + ed.onPostProcess.add(function(ed, o) { + // Safari adds BR at end of all block elements + o.content = o.content.replace(/
<\/(h[1-6]|div|p|address|pre)>/g, ''); + + // Safari adds id="undefined" to HR elements + o.content = o.content.replace(/ id=\"undefined\"/g, ''); + }); + }, + + getInfo : function() { + return { + longname : 'Safari compatibility', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Internal methods + + _fixWebKitSpans : function() { + var t = this, ed = t.editor; + + if (!isOldWebKit) { + // Use mutator events on new WebKit + Event.add(ed.getDoc(), 'DOMNodeInserted', function(e) { + e = e.target; + + if (e && e.nodeType == 1) + t._fixAppleSpan(e); + }); + } else { + // Do post command processing in old WebKit since the browser crashes on Mutator events :( + ed.onExecCommand.add(function() { + each(ed.dom.select('span'), function(n) { + t._fixAppleSpan(n); + }); + + ed.nodeChanged(); + }); + } + }, + + _fixAppleSpan : function(e) { + var ed = this.editor, dom = ed.dom, fz = this.webKitFontSizes, fzn = this.namedFontSizes, s = ed.settings, st, p; + + if (dom.getAttrib(e, 'mce_fixed')) + return; + + // Handle Apple style spans + if (e.nodeName == 'SPAN' && e.className == 'Apple-style-span') { + st = e.style; + + if (!s.convert_fonts_to_spans) { + if (st.fontSize) { + dom.setAttrib(e, 'mce_name', 'font'); + dom.setAttrib(e, 'size', inArray(fz, st.fontSize) + 1); + } + + if (st.fontFamily) { + dom.setAttrib(e, 'mce_name', 'font'); + dom.setAttrib(e, 'face', st.fontFamily); + } + + if (st.color) { + dom.setAttrib(e, 'mce_name', 'font'); + dom.setAttrib(e, 'color', dom.toHex(st.color)); + } + + if (st.backgroundColor) { + dom.setAttrib(e, 'mce_name', 'font'); + dom.setStyle(e, 'background-color', st.backgroundColor); + } + } else { + if (st.fontSize) + dom.setStyle(e, 'fontSize', fzn[inArray(fz, st.fontSize)]); + } + + if (st.fontWeight == 'bold') + dom.setAttrib(e, 'mce_name', 'strong'); + + if (st.fontStyle == 'italic') + dom.setAttrib(e, 'mce_name', 'em'); + + if (st.textDecoration == 'underline') + dom.setAttrib(e, 'mce_name', 'u'); + + if (st.textDecoration == 'line-through') + dom.setAttrib(e, 'mce_name', 'strike'); + + if (st.verticalAlign == 'super') + dom.setAttrib(e, 'mce_name', 'sup'); + + if (st.verticalAlign == 'sub') + dom.setAttrib(e, 'mce_name', 'sub'); + + dom.setAttrib(e, 'mce_fixed', '1'); + } + }, + + _patchSafari2x : function(ed) { + var t = this, setContent, getNode, dom = ed.dom, lr; + + // Inline dialogs + if (ed.windowManager.onBeforeOpen) { + ed.windowManager.onBeforeOpen.add(function() { + r = ed.selection.getRng(); + }); + } + + // Fake select on 2.x + ed.selection.select = function(n) { + this.getSel().setBaseAndExtent(n, 0, n, 1); + }; + + getNode = ed.selection.getNode; + ed.selection.getNode = function() { + return t.selElm || getNode.call(this); + }; + + // Fake range on Safari 2.x + ed.selection.getRng = function() { + var t = this, s = t.getSel(), d = ed.getDoc(), r, rb, ra, di; + + // Fake range on Safari 2.x + if (s.anchorNode) { + r = d.createRange(); + + try { + // Setup before range + rb = d.createRange(); + rb.setStart(s.anchorNode, s.anchorOffset); + rb.collapse(1); + + // Setup after range + ra = d.createRange(); + ra.setStart(s.focusNode, s.focusOffset); + ra.collapse(1); + + // Setup start/end points by comparing locations + di = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; + r.setStart(di ? s.anchorNode : s.focusNode, di ? s.anchorOffset : s.focusOffset); + r.setEnd(di ? s.focusNode : s.anchorNode, di ? s.focusOffset : s.anchorOffset); + + lr = r; + } catch (ex) { + // Sometimes fails, at least we tried to do it by the book. I hope Safari 2.x will go disappear soooon!!! + } + } + + return r || lr; + }; + + // Fix setContent so it works + setContent = ed.selection.setContent; + ed.selection.setContent = function(h, s) { + var r = this.getRng(), b; + + try { + setContent.call(this, h, s); + } catch (ex) { + // Workaround for Safari 2.x + b = dom.create('body'); + b.innerHTML = h; + + each(b.childNodes, function(n) { + r.insertNode(n.cloneNode(true)); + }); + } + }; + }, + + _insertBR : function(ed) { + var dom = ed.dom, s = ed.selection, r = s.getRng(), br; + + // Insert BR element + r.insertNode(br = dom.create('br')); + + // Place caret after BR + r.setStartAfter(br); + r.setEndAfter(br); + s.setRng(r); + + // Could not place caret after BR then insert an nbsp entity and move the caret + if (s.getSel().focusNode == br.previousSibling) { + s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'), br)); + s.collapse(1); + } + + // Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117 + ed.getWin().scrollTo(0, dom.getPos(s.getRng().startContainer).y); + } + }); + + // Register plugin + tinymce.PluginManager.add('safari', tinymce.plugins.Safari); +})(); + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js index 1a0dee94..8a13e7d3 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js @@ -1,2 +1 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('save','en,zh_cn,cs,fa,fr_ca,fr,de');function TinyMCE_save_getControlHTML(control_name){switch(control_name){case "save":return '';}return "";}function TinyMCE_save_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceSave":var formObj=tinyMCE.selectedInstance.formElement.form;if(formObj){tinyMCE.triggerSave();for(var i=0;i'; - } - return ""; -} - -/** - * Executes the save command. - */ -function TinyMCE_save_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceSave": - var formObj = tinyMCE.selectedInstance.formElement.form; - - if (formObj) { - tinyMCE.triggerSave(); - - // Disable all UI form elements that TinyMCE created - for (var i=0; i';case "replace":return '';}return "";}function TinyMCE_searchreplace_execCommand(editor_id,element,command,user_interface,value){function defValue(key,default_value){value[key]=typeof(value[key])=="undefined"?default_value:value[key];}function replaceSel(search_str,str){if(!tinyMCE.isMSIE){var sel=instance.contentWindow.getSelection();var rng=sel.getRangeAt(0);}else{var rng=instance.contentWindow.document.selection.createRange();}if(!tinyMCE.isMSIE){var doc=instance.contentWindow.document;if(str.indexOf(search_str)==-1){rng.deleteContents();rng.insertNode(rng.createContextualFragment(str));rng.collapse(false);}else{doc.execCommand("insertimage",false,"#mce_temp_url#");var elm=tinyMCE.getElementByAttributeValue(doc.body,"img","src","#mce_temp_url#");elm.parentNode.replaceChild(doc.createTextNode(str),elm);}}else{if(rng.item)rng.item(0).outerHTML=str;else rng.pasteHTML(str);}}var instance=tinyMCE.getInstanceById(editor_id);if(!value)value=new Array();defValue("editor_id",editor_id);defValue("searchstring","");defValue("replacestring",null);defValue("replacemode","none");defValue("casesensitive",false);defValue("backwards",false);defValue("wrap",false);defValue("wholeword",false);switch(command){case "mceResetSearch":tinyMCE.lastSearchRng=null;return true;case "mceSearch":if(user_interface){var template=new Array();if(value['replacestring']!=null){template['file']='../../plugins/searchreplace/replace.htm';template['width']=310;template['height']=180;}else{template['file']='../../plugins/searchreplace/search.htm';template['width']=280;template['height']=180;}tinyMCE.openWindow(template,value);}else{var win=tinyMCE.getInstanceById(editor_id).contentWindow;var doc=tinyMCE.getInstanceById(editor_id).contentWindow.document;if(value['replacemode']=="current"){replaceSel(value['string'],value['replacestring']);value['replacemode']="none";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}if(tinyMCE.isMSIE){var rng=tinyMCE.lastSearchRng?tinyMCE.lastSearchRng:doc.selection.createRange();var flags=0;if(value['wholeword'])flags=flags|2;if(value['casesensitive'])flags=flags|4;if(value['replacemode']=="all"){while(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(false);replaceSel(value['string'],value['replacestring']);}alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(rng.findText(value['string'],value['backwards']?-1:1,flags)){rng.scrollIntoView();rng.select();rng.collapse(value['backwards']);tinyMCE.lastSearchRng=rng;}else alert(tinyMCE.getLang('lang_searchreplace_notfound'));}else{if(value['replacemode']=="all"){while(win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))replaceSel(value['string'],value['replacestring']);alert(tinyMCE.getLang('lang_searchreplace_allreplaced'));return true;}if(!win.find(value['string'],value['casesensitive'],value['backwards'],value['wrap'],value['wholeword'],false,false))alert(tinyMCE.getLang('lang_searchreplace_notfound'));}}return true;case "mceSearchReplace":value['replacestring']="";tinyMCE.execInstanceCommand(editor_id,'mceSearch',user_interface,value,false);return true;}return false;}function TinyMCE_searchreplace_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){return true;} \ No newline at end of file +(function(){tinymce.create('tinymce.plugins.SearchReplacePlugin',{init:function(ed,url){function open(m){ed.windowManager.open({file:url+'/searchreplace.htm',width:420+parseInt(ed.getLang('searchreplace.delta_width',0)),height:160+parseInt(ed.getLang('searchreplace.delta_height',0)),inline:1,auto_focus:0},{mode:m,search_string:ed.selection.getContent({format:'text'}),plugin_url:url});};ed.addCommand('mceSearch',function(){open('search');});ed.addCommand('mceReplace',function(){open('replace');});ed.addButton('search',{title:'searchreplace.search_desc',cmd:'mceSearch'});ed.addButton('replace',{title:'searchreplace.replace_desc',cmd:'mceReplace'});ed.addShortcut('ctrl+f','searchreplace.search_desc','mceSearch');},getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('searchreplace',tinymce.plugins.SearchReplacePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js index 41e71e06..59edc3b2 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js @@ -1,166 +1,54 @@ -/* Import theme specific language pack */ -tinyMCE.importPluginLanguagePack('searchreplace', 'en,sv,zh_cn,fa,fr_ca,fr,de'); - -function TinyMCE_searchreplace_getControlHTML(control_name) { - switch (control_name) { - case "search": - return ''; - - case "replace": - return ''; - } - - return ""; -} - -/** - * Executes the search/replace commands. - */ -function TinyMCE_searchreplace_execCommand(editor_id, element, command, user_interface, value) { - function defValue(key, default_value) { - value[key] = typeof(value[key]) == "undefined" ? default_value : value[key]; - } - - function replaceSel(search_str, str) { - // Get current selection - if (!tinyMCE.isMSIE) { - var sel = instance.contentWindow.getSelection(); - var rng = sel.getRangeAt(0); - } else { - var rng = instance.contentWindow.document.selection.createRange(); - } - - // Replace current one - if (!tinyMCE.isMSIE) { - var doc = instance.contentWindow.document; - - // This way works when the replace doesn't contain the search string - if (str.indexOf(search_str) == -1) { - rng.deleteContents(); - rng.insertNode(rng.createContextualFragment(str)); - rng.collapse(false); - } else { - // Insert content ugly way! Needed to move selection to after replace item - doc.execCommand("insertimage", false, "#mce_temp_url#"); - var elm = tinyMCE.getElementByAttributeValue(doc.body, "img", "src", "#mce_temp_url#"); - elm.parentNode.replaceChild(doc.createTextNode(str), elm); - } - } else { - if (rng.item) - rng.item(0).outerHTML = str; - else - rng.pasteHTML(str); - } - } - - var instance = tinyMCE.getInstanceById(editor_id); - - if (!value) - value = new Array(); - - // Setup defualt values - defValue("editor_id", editor_id); - defValue("searchstring", ""); - defValue("replacestring", null); - defValue("replacemode", "none"); - defValue("casesensitive", false); - defValue("backwards", false); - defValue("wrap", false); - defValue("wholeword", false); - - // Handle commands - switch (command) { - case "mceResetSearch": - tinyMCE.lastSearchRng = null; - return true; - - case "mceSearch": - if (user_interface) { - // Open search dialog - var template = new Array(); - - if (value['replacestring'] != null) { - template['file'] = '../../plugins/searchreplace/replace.htm'; // Relative to theme - template['width'] = 310; - template['height'] = 180; - } else { - template['file'] = '../../plugins/searchreplace/search.htm'; // Relative to theme - template['width'] = 280; - template['height'] = 180; - } - - tinyMCE.openWindow(template, value); - } else { - var win = tinyMCE.getInstanceById(editor_id).contentWindow; - var doc = tinyMCE.getInstanceById(editor_id).contentWindow.document; - - // Handle replace current - if (value['replacemode'] == "current") { - replaceSel(value['string'], value['replacestring']); - - // Search next one - value['replacemode'] = "none"; - tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false); - - return true; - } - - if (tinyMCE.isMSIE) { - var rng = tinyMCE.lastSearchRng ? tinyMCE.lastSearchRng : doc.selection.createRange(); - var flags = 0; - - if (value['wholeword']) - flags = flags | 2; - - if (value['casesensitive']) - flags = flags | 4; - - // Handle replace all mode - if (value['replacemode'] == "all") { - while (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) { - rng.scrollIntoView(); - rng.select(); - rng.collapse(false); - replaceSel(value['string'], value['replacestring']); - } - - alert(tinyMCE.getLang('lang_searchreplace_allreplaced')); - return true; - } - - if (rng.findText(value['string'], value['backwards'] ? -1 : 1, flags)) { - rng.scrollIntoView(); - rng.select(); - rng.collapse(value['backwards']); - tinyMCE.lastSearchRng = rng; - } else - alert(tinyMCE.getLang('lang_searchreplace_notfound')); - } else { - if (value['replacemode'] == "all") { - while (win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false)) - replaceSel(value['string'], value['replacestring']); - - alert(tinyMCE.getLang('lang_searchreplace_allreplaced')); - return true; - } - - if (!win.find(value['string'], value['casesensitive'], value['backwards'], value['wrap'], value['wholeword'], false, false)) - alert(tinyMCE.getLang('lang_searchreplace_notfound')); - } - } - return true; - - case "mceSearchReplace": - value['replacestring'] = ""; - - tinyMCE.execInstanceCommand(editor_id, 'mceSearch', user_interface, value, false); - return true; - } - - // Pass to next handler in chain - return false; -} - -function TinyMCE_searchreplace_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - return true; -} +/** + * $Id: editor_plugin_src.js 686 2008-03-09 18:13:49Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.SearchReplacePlugin', { + init : function(ed, url) { + function open(m) { + ed.windowManager.open({ + file : url + '/searchreplace.htm', + width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), + height : 160 + parseInt(ed.getLang('searchreplace.delta_height', 0)), + inline : 1, + auto_focus : 0 + }, { + mode : m, + search_string : ed.selection.getContent({format : 'text'}), + plugin_url : url + }); + }; + + // Register commands + ed.addCommand('mceSearch', function() { + open('search'); + }); + + ed.addCommand('mceReplace', function() { + open('replace'); + }); + + // Register buttons + ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'}); + ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'}); + + ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch'); + }, + + getInfo : function() { + return { + longname : 'Search/Replace', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/images/replace.gif b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/images/replace.gif deleted file mode 100644 index e62354b0..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/images/replace.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/images/search.gif b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/images/search.gif deleted file mode 100644 index 40ae68e0..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/images/search.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js new file mode 100644 index 00000000..a8585ccc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js @@ -0,0 +1,126 @@ +tinyMCEPopup.requireLangPack(); + +var SearchReplaceDialog = { + init : function(ed) { + var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); + + this.switchMode(m); + + f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string"); + + // Focus input field + f[m + '_panel_searchstring'].focus(); + }, + + switchMode : function(m) { + var f, lm = this.lastMode; + + if (lm != m) { + f = document.forms[0]; + + if (lm) { + f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value; + f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked; + f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked; + f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked; + } + + mcTabs.displayTab(m + '_tab', m + '_panel'); + document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none"; + document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none"; + this.lastMode = m; + } + }, + + searchNext : function(a) { + var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0; + + // Get input + f = document.forms[0]; + s = f[m + '_panel_searchstring'].value; + b = f[m + '_panel_backwardsu'].checked; + ca = f[m + '_panel_casesensitivebox'].checked; + rs = f['replace_panel_replacestring'].value; + + if (s == '') + return; + + function fix() { + // Correct Firefox graphics glitches + r = se.getRng().cloneRange(); + ed.getDoc().execCommand('SelectAll', false, null); + se.setRng(r); + }; + + function replace() { + if (tinymce.isIE) + ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE + else + ed.getDoc().execCommand('InsertHTML', false, rs); + }; + + // IE flags + if (ca) + fl = fl | 4; + + switch (a) { + case 'all': + // Move caret to beginning of text + ed.execCommand('SelectAll'); + ed.selection.collapse(true); + + if (tinymce.isIE) { + while (r.findText(s, b ? -1 : 1, fl)) { + r.scrollIntoView(); + r.select(); + replace(); + fo = 1; + } + + tinyMCEPopup.storeSelection(); + } else { + while (w.find(s, ca, b, false, false, false, false)) { + replace(); + fo = 1; + } + } + + if (fo) + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced')); + else + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + + return; + + case 'current': + if (!ed.selection.isCollapsed()) + replace(); + + break; + } + + se.collapse(b); + r = se.getRng(); + + // Whats the point + if (!s) + return; + + if (tinymce.isIE) { + if (r.findText(s, b ? -1 : 1, fl)) { + r.scrollIntoView(); + r.select(); + } else + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + + tinyMCEPopup.storeSelection(); + } else { + if (!w.find(s, ca, b, false, false, false, false)) + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + else + fix(); + } + } +}; + +tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ar_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ar_dlg.js new file mode 100644 index 00000000..d66415dc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ar_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ar.searchreplace_dlg',{ +searchnext_desc:"\u0628\u062D\u062B \u0645\u0646 \u062C\u062F\u064A\u062F", +notfound:"\u0627\u0646\u062A\u0647\u0649 \u0627\u0644\u0628\u062D\u062B. \u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0643\u0644\u0645\u0629 \u0627\u0644\u0628\u062D\u062B.", +search_title:"\u0628\u062D\u062B", +replace_title:"\u0628\u062D\u062B/\u0627\u0633\u062A\u0628\u062F\u0627\u0644", +allreplaced:"\u062C\u0645\u064A\u0639 \u0627\u0644\u0643\u0644\u0645\u0627\u062A \u0627\u0644\u062A\u064A \u062A\u0648\u0627\u0641\u0642 \u0643\u0644\u0645\u0629 \u0627\u0644\u0628\u062D\u062B \u062A\u0645 \u0627\u0633\u062A\u0628\u062F\u0627\u0644\u0647\u0627.", +findwhat:"\u0627\u0644\u0628\u062D\u062B \u0639\u0646", +replacewith:"\u0627\u0633\u062A\u0628\u062F\u0627\u0644 \u0628\u0640", +direction:"\u0627\u0644\u0625\u062A\u062C\u0627\u0647", +up:"\u0627\u0639\u0644\u0649", +down:"\u0627\u0633\u0641\u0644", +mcase:"\u0627\u0644\u062A\u0623\u0643\u062F \u0645\u0646 \u062D\u0627\u0644\u0629 \u0627\u0644\u0623\u062D\u0631\u0641", +findnext:"\u0628\u062D\u062B \u0639\u0646 \u0627\u0644\u062A\u0627\u0644\u064A", +replace:"\u0627\u0633\u062A\u0628\u062F\u0627\u0644", +replaceall:"\u0627\u0633\u062A\u0628\u062F\u0627\u0644 \u0627\u0644\u0643\u0644" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/bg_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/bg_dlg.js new file mode 100644 index 00000000..7347d334 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/bg_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('bg.searchreplace_dlg',{ +searchnext_desc:"\u0422\u044A\u0440\u0441\u0438 \u043E\u0442\u043D\u043E\u0432\u043E", +notfound:"\u0422\u044A\u0440\u0441\u0435\u043D\u0435\u0442\u043E \u0437\u0430\u0432\u044A\u0440\u0448\u0438. \u0422\u044A\u0440\u0441\u0435\u043D\u0438\u0442\u0435 \u0434\u0443\u043C\u0438 \u043D\u0435 \u0431\u044F\u0445\u0430 \u043E\u0442\u043A\u0440\u0438\u0442\u0438.", +search_title:"\u0422\u044A\u0440\u0441\u0438", +replace_title:"\u0422\u044A\u0440\u0441\u0438/\u0417\u0430\u043C\u0435\u0441\u0442\u0438", +allreplaced:"\u0412\u0441\u0438\u0447\u043A\u0438 \u043D\u0430\u043C\u0435\u0440\u0435\u043D\u0438 \u0434\u0443\u043C\u0438 \u0431\u044F\u0445\u0430 \u0437\u0430\u043C\u0435\u0441\u0442\u0435\u043D\u0438.", +findwhat:"\u0422\u044A\u0440\u0441\u0438", +replacewith:"\u0417\u0430\u043C\u0435\u0441\u0442\u0438 \u0441", +direction:"\u041F\u043E\u0441\u043E\u043A\u0430", +up:"\u041D\u0430\u0433\u043E\u0440\u0435", +down:"\u041D\u0430\u0434\u043E\u043B\u0443", +mcase:"\u0421\u044A\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435 \u043D\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u044A\u0440\u0430", +findnext:"\u0422\u044A\u0440\u0441\u0438 \u0441\u043B\u0435\u0434\u0432\u0430\u0449\u0438", +replace:"\u0417\u0430\u043C\u0435\u0441\u0442\u0438", +replaceall:"\u0417\u0430\u043C\u0435\u0441\u0442\u0438 \u0432\u0441\u0438\u0447\u043A\u0438" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/br_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/br_dlg.js new file mode 100644 index 00000000..2771bfdc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/br_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('br.searchreplace_dlg',{ +searchnext_desc:"Localizar novamente", +notfound:"A pesquisa foi conclu\u00C3\u0083\u00C2\u00ADda sem resultados.", +search_title:"Localizar", +replace_title:"Localizar/substituir", +allreplaced:"Todas as substitui\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00B5es foram efectuadas.", +findwhat:"Localizar", +replacewith:"Substituir com", +direction:"Direc\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +up:"Acima", +down:"Abaixo", +mcase:"Diferenciar mai\u00C3\u0083\u00C2\u00BAsculas/min\u00C3\u0083\u00C2\u00BAsculas", +findnext:"Localizar o seguinte", +replace:"Substituir", +replaceall:"Substituir todos" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/bs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/bs_dlg.js new file mode 100644 index 00000000..72f08cf9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/bs_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('bs.searchreplace_dlg',{ +searchnext_desc:"Prona\u0111i opet", +notfound:"Pretra\u017Eivanje je zavr\u0161eno. Tra\u017Eeni tekst nije prona\u0111en.", +search_title:"Prona\u0111i", +replace_title:"Prona\u0111i/Zamijeni", +allreplaced:"Sva pojavljivanja tra\u017Eenog teksta su zamijenjena.", +findwhat:"Prona\u0111i tekst", +replacewith:"Zamijeni sa", +direction:"Smjer", +up:"Gore", +down:"Dolje", +mcase:"Match case", +findnext:"Prona\u0111i sljede\u0107e", +replace:"Zamijeni", +replaceall:"Zamijeni sve" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ca_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ca_dlg.js new file mode 100644 index 00000000..e504d3b0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ca_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ca.searchreplace_dlg',{ +searchnext_desc:"Torna a buscar", +notfound:"S'ha completat la recerca. No s'ha trobat la cadena buscada.", +search_title:"Busca", +replace_title:"Busca/Substitueix", +allreplaced:"S'han substitu\u00EFt totes les ocurr\u00E8ncies de la cadena buscada.", +findwhat:"Busca", +replacewith:"Substitueix per", +direction:"Direcci\u00F3", +up:"Amunt", +down:"Avall", +mcase:"Distingeix maj\u00FAscules i min\u00FAscules", +findnext:"Seg\u00FCent", +replace:"Substitueix", +replaceall:"Substitueix tot" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ch_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ch_dlg.js new file mode 100644 index 00000000..f81d3884 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ch_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ch.searchreplace_dlg',{ +searchnext_desc:"\u518D\u6B21\u641C\u5BFB", +notfound:"\u641C\u5BFB\u5B8C\u6BD5\uFF0C\u6CA1\u6709\u627E\u5230\u7B26\u5408\u7684\u5B57\u7B26\u4E32\u3002 ", +search_title:"\u641C\u5BFB", +replace_title:"\u641C\u5BFB/\u53D6\u4EE3", +allreplaced:"\u6240\u6709\u7B26\u5408\u7684\u5B57\u7B26\u4E32\u5747\u5DF2\u53D6\u4EE3\u3002 ", +findwhat:"\u641C\u5BFB\u76EE\u6807", +replacewith:"\u53D6\u4EE3\u4E3A", +direction:"\u65B9\u5411", +up:"\u5411\u4E0A", +down:"\u5411\u4E0B", +mcase:"\u533A\u5206\u5927\u5C0F\u5199", +findnext:"\u641C\u5BFB\u4E0B\u4E00\u4E2A", +replace:"\u53D6\u4EE3", +replaceall:"\u5168\u90E8\u53D6\u4EE3" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/cs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/cs_dlg.js new file mode 100644 index 00000000..a1928789 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/cs_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('cs.searchreplace_dlg',{ +searchnext_desc:"Naj\u00EDt dal\u0161\u00ED", +notfound:"Hled\u00E1n\u00ED bylo dokon\u010Deno. Hledan\u00FD text nebyl nalezen.", +search_title:"Naj\u00EDt", +replace_title:"Naj\u00EDt/nahradit", +allreplaced:"V\u0161echny v\u00FDskyty byly nahrazeny.", +findwhat:"Co hledat", +replacewith:"\u010C\u00EDm nahradit", +direction:"Sm\u011Br", +up:"Nahoru", +down:"Dol\u016F", +mcase:"Rozli\u0161ovat velikost", +findnext:"Naj\u00EDt dal\u0161\u00ED", +replace:"Nahradit", +replaceall:"Nahradit v\u0161e" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/da_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/da_dlg.js new file mode 100644 index 00000000..9c49354d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/da_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('da.searchreplace_dlg',{ +searchnext_desc:"S\u00F8g igen", +notfound:"S\u00F8gningen gav intet resultat.", +search_title:"S\u00F8g", +replace_title:"S\u00F8g / erstat", +allreplaced:"Alle forekomster af s\u00F8gestrengen er erstattet.", +findwhat:"S\u00F8g efter", +replacewith:"Erstat med", +direction:"Retning", +up:"Op", +down:"Ned", +mcase:"Forskel p\u00E5 store og sm\u00E5 bogstaver", +findnext:"Find n\u00E6ste", +replace:"Erstat", +replaceall:"Erstat alle" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/de.js deleted file mode 100644 index 9e44ac32..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/de.js +++ /dev/null @@ -1,19 +0,0 @@ -// DE lang variables - -tinyMCELang['lang_searchreplace_search_desc'] = 'Suchen'; -tinyMCELang['lang_searchreplace_searchnext_desc'] = 'Erneut suchen'; -tinyMCELang['lang_searchreplace_replace_desc'] = 'Suchen/Ersetzen'; -tinyMCELang['lang_searchreplace_notfound'] = 'Die Suche wurde abgeschlossen. Das Suchwort wurde nicht gefunden.'; -tinyMCELang['lang_searchreplace_search_title'] = 'Suchen'; -tinyMCELang['lang_searchreplace_replace_title'] = 'Suchen/Ersetzen'; -tinyMCELang['lang_searchreplace_allreplaced'] = 'Die Suche wurde abgeschlossen. Alle Vorkommen wurden ersetzt.'; -tinyMCELang['lang_searchreplace_findwhat'] = 'Suchen nach'; -tinyMCELang['lang_searchreplace_replacewith'] = 'Ersetzem durch'; -tinyMCELang['lang_searchreplace_direction'] = 'Suchrichtung'; -tinyMCELang['lang_searchreplace_up'] = 'Rückwärts'; -tinyMCELang['lang_searchreplace_down'] = 'Vorwürts'; -tinyMCELang['lang_searchreplace_case'] = 'Groß-/Kleinschreibung beachten'; -tinyMCELang['lang_searchreplace_findnext'] = 'Weiter suchen'; -tinyMCELang['lang_searchreplace_replace'] = 'Ersetzen'; -tinyMCELang['lang_searchreplace_replaceall'] = 'Alle ersetzen'; -tinyMCELang['lang_searchreplace_cancel'] = 'Abbrechen'; \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/de_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/de_dlg.js new file mode 100644 index 00000000..52c0b062 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/de_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('de.searchreplace_dlg',{ +searchnext_desc:"Weitersuchen", +notfound:"Die Suche ist am Ende angelangt. Die Zeichenkette konnte nicht gefunden werden.", +search_title:"Suchen", +replace_title:"Suchen/Ersetzen", +allreplaced:"Alle Vorkommen der Zeichenkette wurden ersetzt.", +findwhat:"Zu suchender Text", +replacewith:"Ersetzen durch", +direction:"Suchrichtung", +up:"Aufw\u00E4rts", +down:"Abw\u00E4rts", +mcase:"Gro\u00DF-/Kleinschreibung beachten", +findnext:"Weitersuchen", +replace:"Ersetzen", +replaceall:"Alle ersetzen" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/dv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/dv_dlg.js new file mode 100644 index 00000000..4c88a545 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/dv_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('dv.searchreplace_dlg',{ +searchnext_desc:"Find again", +notfound:"The search has been completed. The search string could not be found.", +search_title:"Find", +replace_title:"Find/Replace", +allreplaced:"All occurrences of the search string were replaced.", +findwhat:"Find what", +replacewith:"Replace with", +direction:"Direction", +up:"Up", +down:"Down", +mcase:"Match case", +findnext:"Find next", +replace:"Replace", +replaceall:"Replace all" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/el_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/el_dlg.js new file mode 100644 index 00000000..6ece85fc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/el_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('el.searchreplace_dlg',{ +searchnext_desc:"\u0395\u03CD\u03C1\u03B5\u03C3\u03B7 \u03BE\u03B1\u03BD\u03AC", +notfound:"\u0397 \u03B1\u03BD\u03B1\u03B6\u03AE\u03C4\u03B7\u03C3\u03B7 \u03C4\u03B5\u03BB\u03B5\u03AF\u03C9\u03C3\u03B5. \u03A4\u03BF \u03B6\u03B7\u03C4\u03BF\u03CD\u03BC\u03B5\u03BD\u03BF \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03B4\u03B5\u03BD \u03B2\u03C1\u03AD\u03B8\u03B7\u03BA\u03B5.", +search_title:"\u0395\u03CD\u03C1\u03B5\u03C3\u03B7", +replace_title:"\u0395\u03CD\u03C1\u03B5\u03C3\u03B7/\u0391\u03BD\u03B1\u03B6\u03AE\u03C4\u03B7\u03C3\u03B7", +allreplaced:"\u038C\u03BB\u03B5\u03C2 \u03BF\u03B9 \u03B5\u03BC\u03C6\u03B1\u03BD\u03AF\u03C3\u03B5\u03B9\u03C2 \u03C4\u03BF\u03C5 \u03B6\u03B7\u03C4\u03BF\u03CD\u03BC\u03B5\u03BD\u03BF\u03C5 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 \u03B1\u03BD\u03C4\u03B9\u03BA\u03B1\u03C4\u03B1\u03C3\u03C4\u03AC\u03B8\u03B7\u03BA\u03B1\u03BD.", +findwhat:"\u0395\u03CD\u03C1\u03B5\u03C3\u03B7 \u03C4\u03BF\u03C5", +replacewith:"\u0391\u03BD\u03C4\u03B9\u03BA\u03B1\u03C4\u03AC\u03C3\u03C4\u03B1\u03C3\u03B7 \u03BC\u03B5", +direction:"\u039A\u03B1\u03C4\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7", +up:"\u03A0\u03AC\u03BD\u03C9", +down:"\u039A\u03AC\u03C4\u03C9", +mcase:"\u03A4\u03B1\u03AF\u03C1\u03B9\u03B1\u03C3\u03BC\u03B1 \u03BA\u03B5\u03C6\u03B1\u03BB\u03B1\u03AF\u03B1/\u03BC\u03B9\u03BA\u03C1\u03AC", +findnext:"\u0392\u03C1\u03B5\u03C2 \u03B5\u03C0\u03CC\u03BC\u03B5\u03BD\u03BF", +replace:"\u0391\u03BD\u03C4\u03B9\u03BA\u03B1\u03C4\u03AC\u03C3\u03C4\u03B1\u03C3\u03B7", +replaceall:"\u0391\u03BD\u03C4\u03B9\u03BA\u03B1\u03C4. \u03CC\u03BB\u03C9\u03BD" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en.js deleted file mode 100644 index f9861ee5..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en.js +++ /dev/null @@ -1,19 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_searchreplace_search_desc'] = 'Find'; -tinyMCELang['lang_searchreplace_searchnext_desc'] = 'Find again'; -tinyMCELang['lang_searchreplace_replace_desc'] = 'Find/Replace'; -tinyMCELang['lang_searchreplace_notfound'] = 'The search has been compleated. The search string could not be found.'; -tinyMCELang['lang_searchreplace_search_title'] = 'Find'; -tinyMCELang['lang_searchreplace_replace_title'] = 'Find/Replace'; -tinyMCELang['lang_searchreplace_allreplaced'] = 'All occurrences of the search string was replaced.'; -tinyMCELang['lang_searchreplace_findwhat'] = 'Find what'; -tinyMCELang['lang_searchreplace_replacewith'] = 'Replace with'; -tinyMCELang['lang_searchreplace_direction'] = 'Direction'; -tinyMCELang['lang_searchreplace_up'] = 'Up'; -tinyMCELang['lang_searchreplace_down'] = 'Down'; -tinyMCELang['lang_searchreplace_case'] = 'Match case'; -tinyMCELang['lang_searchreplace_findnext'] = 'Find next'; -tinyMCELang['lang_searchreplace_replace'] = 'Replace'; -tinyMCELang['lang_searchreplace_replaceall'] = 'Replace all'; -tinyMCELang['lang_searchreplace_cancel'] = 'Cancel'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js new file mode 100644 index 00000000..370959af --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('en.searchreplace_dlg',{ +searchnext_desc:"Find again", +notfound:"The search has been completed. The search string could not be found.", +search_title:"Find", +replace_title:"Find/Replace", +allreplaced:"All occurrences of the search string were replaced.", +findwhat:"Find what", +replacewith:"Replace with", +direction:"Direction", +up:"Up", +down:"Down", +mcase:"Match case", +findnext:"Find next", +replace:"Replace", +replaceall:"Replace all" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/es_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/es_dlg.js new file mode 100644 index 00000000..b54c74bb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/es_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('es.searchreplace_dlg',{ +searchnext_desc:"Buscar de nuevo", +notfound:"La b\u00FAsqueda se ha completado. No se encontr\u00F3 el texto introducido.", +search_title:"Buscar", +replace_title:"Buscar/Reemplazar", +allreplaced:"Se ha reemplazado el texto.", +findwhat:"Qu\u00E9 buscar", +replacewith:"Reemplazar por", +direction:"Direcci\u00F3n", +up:"Arriba", +down:"Abajo", +mcase:"Min\u00FAs./May\u00FAs.", +findnext:"Buscar siguiente", +replace:"Reemplazar", +replaceall:"Reemplazar todo" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/et_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/et_dlg.js new file mode 100644 index 00000000..fcafedd7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/et_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('et.searchreplace_dlg',{ +searchnext_desc:"Otsi uuesti", +notfound:"Otsing on l\u00F5petatud. Otsis\u00F5na ei leitud.", +search_title:"Otsi", +replace_title:"Otsi/Asenda", +allreplaced:"K\u00F5ik otsis\u00F5na ilmingud on asendatud.", +findwhat:"Otsi mida", +replacewith:"Asenda millega", +direction:"Suund", +up:"\u00DCles", +down:"Alla", +mcase:"Vasta suurusele", +findnext:"Otsi j\u00E4rgmine", +replace:"Asenda", +replaceall:"Asenda k\u00F5ik" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fa.js deleted file mode 100644 index 6e6fa739..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fa.js +++ /dev/null @@ -1,24 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_searchreplace_search_desc'] = 'جستجو'; -tinyMCELang['lang_searchreplace_searchnext_desc'] = 'جستجوي مجدد'; -tinyMCELang['lang_searchreplace_replace_desc'] = 'جستجو/جايگزيني'; -tinyMCELang['lang_searchreplace_notfound'] = 'جستجو پايان ياÙت. هيچ موردي ياÙت نشد.'; -tinyMCELang['lang_searchreplace_search_title'] = 'جستجو'; -tinyMCELang['lang_searchreplace_replace_title'] = 'جستجو/جايگزيني'; -tinyMCELang['lang_searchreplace_allreplaced'] = 'همه موارد جايگزين گرديد.'; -tinyMCELang['lang_searchreplace_findwhat'] = 'جستجو به دنبال'; -tinyMCELang['lang_searchreplace_replacewith'] = 'جايگزيني با'; -tinyMCELang['lang_searchreplace_direction'] = 'جهت جستجو'; -tinyMCELang['lang_searchreplace_up'] = 'به سمت بالا'; -tinyMCELang['lang_searchreplace_down'] = 'به سمت پايين'; -tinyMCELang['lang_searchreplace_case'] = 'تطبيق حرو٠کوچک Ùˆ بزرگ'; -tinyMCELang['lang_searchreplace_findnext'] = 'مورد-بعدي'; -tinyMCELang['lang_searchreplace_replace'] = 'جايگزين-Ú©Ù†'; -tinyMCELang['lang_searchreplace_replaceall'] = 'جايگزيني-همه'; -tinyMCELang['lang_searchreplace_cancel'] = 'بيخيال'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fa_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fa_dlg.js new file mode 100644 index 00000000..4302fcc9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fa_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('fa.searchreplace_dlg',{ +searchnext_desc:"\u062C\u0633\u062A\u062C\u0648\u06CC \u0645\u062C\u062F\u062F", +notfound:"\u062C\u0633\u062A\u062C\u0648 \u0643\u0627\u0645\u0644 \u0634\u062F. \u0631\u0634\u062A\u0647 \u062C\u0633\u062A\u062C\u0648 \u06CC\u0627\u0641\u062A\u0647 \u0646\u0634\u062F.", +search_title:"\u062C\u0633\u062A\u062C\u0648", +replace_title:"\u062C\u0633\u062A\u062C\u0648/\u062A\u0639\u0648\u06CC\u0636", +allreplaced:"\u062A\u0645\u0627\u0645\u06CC \u0631\u0634\u062A\u0647 \u062C\u0633\u062A\u062C\u0648 \u0647\u0627\u06CC \u0631\u062E\u062F\u0627\u062F\u0647 \u062A\u0639\u0648\u06CC\u0636 \u0634\u062F\u0646\u062F.", +findwhat:"\u062C\u0633\u062A\u062C\u0648\u06CC \u0686\u0647 \u0686\u06CC\u0632\u06CC", +replacewith:"\u062A\u0639\u0648\u06CC\u0636 \u0628\u0627", +direction:"\u062C\u0647\u062A", +up:"\u0628\u0627\u0644\u0627", +down:"\u067E\u0627\u06CC\u06CC\u0646", +mcase:"\u0647\u0645\u0633\u0627\u0646 \u0628\u0648\u062F\u0646 \u062D\u0631\u0648\u0641", +findnext:"\u062C\u0633\u062A\u062C\u0648\u06CC \u0628\u0639\u062F\u06CC", +replace:"\u062A\u0639\u0648\u06CC\u0636", +replaceall:"\u062A\u0639\u0648\u06CC\u0636 \u0647\u0645\u0647" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fi_dlg.js new file mode 100644 index 00000000..37012504 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fi_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('fi.searchreplace_dlg',{ +searchnext_desc:"Etsi uudestaan", +notfound:"Haku on valmis. Haettua teksti\u00E4 ei l\u00F6ytynyt.", +search_title:"Haku", +replace_title:"Etsi ja korvaa", +allreplaced:"Kaikki l\u00F6ydetyt merkkijonot korvattiin.", +findwhat:"Etsit\u00E4\u00E4n", +replacewith:"Korvataan", +direction:"Suunta", +up:"Yl\u00F6s", +down:"Alas", +mcase:"Huomioi isot ja pienet kirjaimet", +findnext:"Etsi seuraavaa", +replace:"Korvaa", +replaceall:"Korvaa kaikki" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr.js deleted file mode 100644 index a916c789..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr.js +++ /dev/null @@ -1,19 +0,0 @@ -// Franch lang variables by Laurent Dran - -tinyMCELang['lang_searchreplace_search_desc'] = 'Trouver'; -tinyMCELang['lang_searchreplace_searchnext_desc'] = 'Trouver encore'; -tinyMCELang['lang_searchreplace_replace_desc'] = 'Trouver/Remplacer'; -tinyMCELang['lang_searchreplace_notfound'] = 'Votre recherche a été compléé. La recherche de la chaine pourra ne pas aboutir.'; -tinyMCELang['lang_searchreplace_search_title'] = 'Trouver'; -tinyMCELang['lang_searchreplace_replace_title'] = 'Trouver/Remplacer'; -tinyMCELang['lang_searchreplace_allreplaced'] = 'Toutes les occurences de la chaine ont été remplcées.'; -tinyMCELang['lang_searchreplace_findwhat'] = 'Trouver le mot'; -tinyMCELang['lang_searchreplace_replacewith'] = 'Remplacer avec'; -tinyMCELang['lang_searchreplace_direction'] = 'Direction'; -tinyMCELang['lang_searchreplace_up'] = 'Haut'; -tinyMCELang['lang_searchreplace_down'] = 'Base'; -tinyMCELang['lang_searchreplace_case'] = 'Respecter la casse'; -tinyMCELang['lang_searchreplace_findnext'] = 'Trouver le prochain'; -tinyMCELang['lang_searchreplace_replace'] = 'Remplacer'; -tinyMCELang['lang_searchreplace_replaceall'] = 'Remplacer tout'; -tinyMCELang['lang_searchreplace_cancel'] = 'Annuler'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr_ca.js deleted file mode 100644 index 7ad80ae7..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr_ca.js +++ /dev/null @@ -1,20 +0,0 @@ -// CA_FR lang variables - -tinyMCELang['lang_searchreplace_search_desc'] = 'Chercher'; -tinyMCELang['lang_searchreplace_searchnext_desc'] = 'Chercher suivant'; -tinyMCELang['lang_searchreplace_replace_desc'] = 'Chercher/Remplacer'; -tinyMCELang['lang_searchreplace_notfound'] = 'La recherche est terminée. Aucune occurence trouvée.'; -tinyMCELang['lang_searchreplace_search_title'] = 'Chercher'; -tinyMCELang['lang_searchreplace_replace_title'] = 'Chercher/Remplacer'; -tinyMCELang['lang_searchreplace_allreplaced'] = 'Toutes les occurences ont été remplacées.'; -tinyMCELang['lang_searchreplace_findwhat'] = 'Chercher quoi'; -tinyMCELang['lang_searchreplace_replacewith'] = 'Remplacer par'; -tinyMCELang['lang_searchreplace_direction'] = 'Direction'; -tinyMCELang['lang_searchreplace_up'] = 'Monter'; -tinyMCELang['lang_searchreplace_down'] = 'Descendre'; -tinyMCELang['lang_searchreplace_case'] = 'Sensible à la case'; -tinyMCELang['lang_searchreplace_findnext'] = 'Chercher suivant'; -tinyMCELang['lang_searchreplace_replace'] = 'Remplacer'; -tinyMCELang['lang_searchreplace_replaceall'] = 'Remplacer tous'; -tinyMCELang['lang_searchreplace_cancel'] = 'Annuler'; - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr_dlg.js new file mode 100644 index 00000000..fbdd1f35 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/fr_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('fr.searchreplace_dlg',{ +searchnext_desc:"Suivant", +notfound:"La recherche est termin\u00E9e. La cha\u00EEne recherch\u00E9e n'a pas \u00E9t\u00E9 trouv\u00E9e.", +search_title:"Chercher", +replace_title:"Chercher/Remplacer", +allreplaced:"Toutes les occurences de la cha\u00EEne recherch\u00E9e ont \u00E9t\u00E9 remplac\u00E9es.", +findwhat:"Chercher", +replacewith:"Remplacer par", +direction:"Direction", +up:"Haut", +down:"Bas", +mcase:"Prendre la casse en compte", +findnext:"Chercher suivant", +replace:"Remplacer", +replaceall:"Rempl. tous" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/gl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/gl_dlg.js new file mode 100644 index 00000000..fefcd080 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/gl_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('gl.searchreplace_dlg',{ +searchnext_desc:"Buscar outra vez", +notfound:"A busca rematou. No se atopou o texto buscado.", +search_title:"Buscar", +replace_title:"Buscar/Reemplazar", +allreplaced:"T\u00F3da-las coincidencias do texto buscado foron reemplazadas.", +findwhat:"Localizar", +replacewith:"Reemplazar por", +direction:"Direcci\u00F3n", +up:"Arriba", +down:"Abaixo", +mcase:"Min\u00FAs./Mai\u00FAs.", +findnext:"Buscar seginte", +replace:"Reemplazar", +replaceall:"Reemplazar todo" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/he_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/he_dlg.js new file mode 100644 index 00000000..b205c31a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/he_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('he.searchreplace_dlg',{ +searchnext_desc:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05D4\u05D1\u05D0", +notfound:"\u05D4\u05D7\u05D9\u05E4\u05D5\u05E9 \u05D4\u05E1\u05EA\u05D9\u05D9\u05DD. \u05E4\u05E8\u05D9\u05D8 \u05D4\u05D7\u05D9\u05E4\u05D5\u05E9 \u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0.", +search_title:"\u05D7\u05D9\u05E4\u05D5\u05E9", +replace_title:"\u05D7\u05D9\u05E4\u05D5\u05E9 \u05D5\u05D4\u05D7\u05DC\u05E4\u05D4", +allreplaced:"\u05DB\u05DC \u05E4\u05E8\u05D9\u05D8\u05D9 \u05D4\u05D7\u05D9\u05E4\u05D5\u05E9 \u05D4\u05D5\u05D7\u05DC\u05E4\u05D5", +findwhat:"\u05DC\u05D7\u05E4\u05E9 \u05D0\u05EA", +replacewith:"\u05DC\u05D4\u05D7\u05DC\u05D9\u05E3 \u05D1", +direction:"\u05DB\u05D9\u05D5\u05D5\u05DF", +up:"\u05DC\u05DE\u05E2\u05DC\u05D4", +down:"\u05DC\u05DE\u05D8\u05D4", +mcase:"\u05D4\u05EA\u05D0\u05DD \u05E8\u05D9\u05E9\u05D9\u05D5\u05EA", +findnext:"\u05D7\u05E4\u05E9 \u05D0\u05EA \u05D4\u05D1\u05D0", +replace:"\u05D4\u05D7\u05DC\u05E3", +replaceall:"\u05D4\u05D7\u05DC\u05E4\u05EA \u05D4\u05DB\u05DC" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/hr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/hr_dlg.js new file mode 100644 index 00000000..ad95bfc6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/hr_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('hr.searchreplace_dlg',{ +searchnext_desc:"Prona\u0111i opet", +notfound:"Pretra\u017Eivanje je zavr\u0161eno. Tra\u017Eeni tekst nije prona\u0111en.", +search_title:"Prona\u0111i", +replace_title:"Prona\u0111i/Zamijeni", +allreplaced:"Sva pojavljivanja tra\u017Eenog teksta su zamijenjena.", +findwhat:"Prona\u0111i tekst", +replacewith:"Zamijeni sa", +direction:"Smjer", +up:"Gore", +down:"Dolje", +mcase:"Match case", +findnext:"Prona\u0111i sljede\u0107e", +replace:"Zamijeni", +replaceall:"Zamijeni sve" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/hu_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/hu_dlg.js new file mode 100644 index 00000000..7c6dee71 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/hu_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('hu.searchreplace_dlg',{ +searchnext_desc:"Keres\u00E9s megint", +notfound:"A keres\u00E9s v\u00E9get \u00E9rt. A keresett sz\u00F6vegr\u00E9sz nem tal\u00E1lhat\u00F3.", +search_title:"Keres\u00E9s", +replace_title:"Keres\u00E9s/Csere", +allreplaced:"A keresett r\u00E9szsz\u00F6veg minden el\u0151fordul\u00E1sa cser\u00E9lve lett.", +findwhat:"Mit cser\u00E9l", +replacewith:"Mire cser\u00E9l", +direction:"Ir\u00E1ny", +up:"Fel", +down:"Le", +mcase:"Kis- \u00E9s nagybet\u0171k megk\u00FCl\u00F6nb\u00F6ztet\u00E9se", +findnext:"Keres\u00E9s", +replace:"Csere", +replaceall:"Minden tal\u00E1lat cser\u00E9je" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ia_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ia_dlg.js new file mode 100644 index 00000000..4a9bad64 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ia_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ia.searchreplace_dlg',{ +searchnext_desc:"\u518D\u6B21\u67E5\u627E", +notfound:"\u67E5\u627E\u5DF2\u5B8C\u6210 ! \u627E\u4E0D\u5230\u4EFB\u4F55\u76EE\u6807\u3002 ", +search_title:"\u67E5\u627E", +replace_title:"\u67E5\u627E/\u66FF\u6362", +allreplaced:"\u5DF2\u66FF\u6362\u6240\u6709\u5339\u914D\u7684\u5B57\u7B26\u4E32.", +findwhat:"\u67E5\u627E\u76EE\u6807", +replacewith:"\u66FF\u6362\u4E3A", +direction:"\u65B9\u5411", +up:"\u5411\u4E0A", +down:"\u5411\u4E0B", +mcase:"\u533A\u5206\u5927\u5C0F\u5199", +findnext:"\u67E5\u627E\u4E0B\u4E00\u4E2A", +replace:"\u66FF\u6362", +replaceall:"\u5168\u90E8\u66FF\u6362" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ii_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ii_dlg.js new file mode 100644 index 00000000..759863bb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ii_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ii.searchreplace_dlg',{ +searchnext_desc:"\u518D\u6B21\u641C\u5BFB", +notfound:"\u641C\u5BFB\u5B8C\u6BD5\uFF0C\u6CA1\u6709\u627E\u5230\u7B26\u5408\u7684\u5B57\u7B26\u4E32\u3002", +search_title:"\u641C\u5BFB", +replace_title:"\u641C\u5BFB/\u53D6\u4EE3", +allreplaced:"\u6240\u6709\u7B26\u5408\u7684\u5B57\u7B26\u4E32\u5747\u5DF2\u53D6\u4EE3\u3002", +findwhat:"\u641C\u5BFB\u76EE\u6807", +replacewith:"\u53D6\u4EE3\u4E3A", +direction:"\u65B9\u5411", +up:"\u5411\u4E0A", +down:"\u5411\u4E0B", +mcase:"\u533A\u5206\u5927\u5C0F\u5199", +findnext:"\u641C\u5BFB\u4E0B\u4E00\u4E2A", +replace:"\u53D6\u4EE3", +replaceall:"\u5168\u90E8\u53D6\u4EE3" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/is_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/is_dlg.js new file mode 100644 index 00000000..70a527d8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/is_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('is.searchreplace_dlg',{ +searchnext_desc:"Finna aftur", +notfound:"Leitinni er loki\u00F0. Leitarstrengurinn fannst ekki.", +search_title:"Finna", +replace_title:"Finna/Skipta \u00FAt", +allreplaced:"\u00D6llum ni\u00F0urst\u00F6\u00F0um leitar var skipt \u00FAt.", +findwhat:"Finna hva\u00F0", +replacewith:"Skipta \u00FAt me\u00F0", +direction:"\u00C1tt", +up:"Upp", +down:"Ni\u00F0ur", +mcase:"Match case", +findnext:"Finna n\u00E6sta", +replace:"Skipta \u00FAt", +replaceall:"Skipta \u00FAt \u00F6llu" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/it_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/it_dlg.js new file mode 100644 index 00000000..cbaf13ab --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/it_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('it.searchreplace_dlg',{ +searchnext_desc:"Trova successivo", +notfound:"Ricerca completata. Nessun risultato trovato.", +search_title:"Trova", +replace_title:"Trova/Sostituisci", +allreplaced:"Tutte le occorrenze del criterio di ricerca sono state sostituite.", +findwhat:"Trova:", +replacewith:"Sostituisci con:", +direction:"Direzione", +up:"Avanti", +down:"Indietro", +mcase:"Maiuscole/minuscole", +findnext:"Trova succ.", +replace:"Sostituisci", +replaceall:"Sost. tutto" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ja_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ja_dlg.js new file mode 100644 index 00000000..926a6766 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ja_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ja.searchreplace_dlg',{ +searchnext_desc:"\u518D\u691C\u7D22", +notfound:"\u6700\u5F8C\u307E\u3067\u691C\u7D22\u3057\u307E\u3057\u305F\u304C\u3001\u691C\u7D22\u6587\u5B57\u5217\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002", +search_title:"\u691C\u7D22", +replace_title:"\u691C\u7D22/\u7F6E\u63DB", +allreplaced:"\u5168\u3066\u7F6E\u63DB\u3055\u308C\u307E\u3057\u305F\u3002", +findwhat:"\u691C\u7D22\u6587\u5B57\u5217", +replacewith:"\u7F6E\u63DB\u6587\u5B57\u5217", +direction:"\u65B9\u5411", +up:"\u4E0A\u3078", +down:"\u4E0B\u3078", +mcase:"\u5927\u6587\u5B57/\u5C0F\u6587\u5B57\u3092\u533A\u5225\u3059\u308B", +findnext:"\u6B21\u3078", +replace:"\u7F6E\u63DB", +replaceall:"\u5168\u3066\u7F6E\u63DB" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ko_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ko_dlg.js new file mode 100644 index 00000000..d559f6bd --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ko_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ko.searchreplace_dlg',{ +searchnext_desc:"\uC7AC\uAC80\uC0C9", +notfound:"\uAC80\uC0C9\uC774 \uC644\uB8CC\uD588\uC2B5\uB2C8\uB2E4. \uAC80\uC0C9 \uBB38\uC790\uC5F4\uC740 \uBC1C\uACAC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.", +search_title:"\uAC80\uC0C9", +replace_title:"\uAC80\uC0C9/\uCE58\uD658", +allreplaced:"\uBAA8\uB450 \uCE58\uD658\uB418\uC5C8\uC2B5\uB2C8\uB2E4.", +findwhat:"\uAC80\uC0C9 \uBB38\uC790\uC5F4", +replacewith:"\uCE58\uD658 \uBB38\uC790\uC5F4", +direction:"\uBC29\uD5A5", +up:"\uC704\uC5D0", +down:"\uC544\uB798\uC5D0", +mcase:"\uB300\uBB38\uC790/\uC18C\uBB38\uC790\uB97C \uAD6C\uBCC4", +findnext:"\uAC80\uC0C9", +replace:"\uCE58\uD658", +replaceall:"\uBAA8\uB450 \uCE58\uD658" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/lt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/lt_dlg.js new file mode 100644 index 00000000..88a807e5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/lt_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('lt.searchreplace_dlg',{ +searchnext_desc:"Ie\u0161koti dar kart\u0105", +notfound:"Paie\u0161ka baigta. Paie\u0161kos fraz\u0117 nerasta.", +search_title:"Ie\u0161koti", +replace_title:"Ie\u0161koti/Pakeisti", +allreplaced:"Visi paie\u0161kos fraz\u0117s pasikartojimai pakeisti.", +findwhat:"Ko ie\u0161koti", +replacewith:"Kuo pakeisti", +direction:"Kryptis", +up:"\u012E vir\u0161\u0173", +down:"\u012E apa\u010Di\u0105", +mcase:"Visi\u0161kas atitikimas", +findnext:"Ie\u0161koti sek.", +replace:"Pakeisti", +replaceall:"Pakeisti visus" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/lv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/lv_dlg.js new file mode 100644 index 00000000..e947d21a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/lv_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('lv.searchreplace_dlg',{ +searchnext_desc:"Mekl\u0113t v\u0113lreiz", +notfound:"Mekl\u0113\u0161ana pabeigta. Mekl\u0113t\u0101 fr\u0101ze/v\u0101rds netika atrasta.", +search_title:"Mekl\u0113t", +replace_title:"Mekl\u0113t/Aizvietot", +allreplaced:"Visas fr\u0101zes/v\u0101rdi tika veiksm\u012Bgi aizvietoti.", +findwhat:"Ko atrast", +replacewith:"Aizvietot ar", +direction:"Virziens", +up:"Uz aug\u0161u", +down:"Uz leju", +mcase:"Re\u0123istrj\u016Bt\u012Bgs", +findnext:"Mekl\u0113t n\u0101kamo", +replace:"Aizvietot", +replaceall:"Aizvietot visu" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/mk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/mk_dlg.js new file mode 100644 index 00000000..d7d531fd --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/mk_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('mk.searchreplace_dlg',{ +searchnext_desc:"Prona\u0111i opet", +notfound:"Pretra\u017Eivanje je zavr\u0161eno. Tra\u017Eeni tekst nije prona\u0111en.", +search_title:"Prona\u0111i", +replace_title:"Prona\u0111i/Zameni", +allreplaced:"Sva pojavljivanja tra\u017Eenog teksta su zamenjena.", +findwhat:"Prona\u0111i tekst", +replacewith:"Zameni sa", +direction:"Smjer", +up:"Gore", +down:"Dolje", +mcase:"Match case", +findnext:"Prona\u0111i sljede\u0107e", +replace:"Zameni", +replaceall:"Zameni sve" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/mn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/mn_dlg.js new file mode 100644 index 00000000..07b8fc39 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/mn_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('mn.searchreplace_dlg',{ +searchnext_desc:"\u0426\u0430\u0430\u0448 \u0445\u0430\u0439\u0445", +notfound:"\u0425\u0430\u0439\u043B\u0442 \u0442\u04E9\u0433\u0441\u0433\u04E9\u043B\u0434 \u0445\u04AF\u0440\u044D\u0432. \u0422\u044D\u043C\u0434\u044D\u0433\u0442 \u043C\u04E9\u0440 \u043E\u043B\u0434\u0441\u043E\u043D\u0433\u04AF\u0439.", +search_title:"\u0425\u0430\u0439\u0445", +replace_title:"\u0425\u0430\u0439\u0445/\u043E\u0440\u043B\u0443\u0443\u043B\u0430\u0445", +allreplaced:"\u0422\u044D\u043C\u0434\u044D\u0433\u0442 \u043C\u04E9\u0440\u0438\u0439\u043D \u0431\u04AF\u0445 \u0442\u043E\u0445\u0438\u043E\u043B\u0434\u043B\u0443\u0443\u0434 \u043E\u0440\u043B\u0443\u0443\u043B\u0430\u0433\u0434\u0441\u0430\u043D.", +findwhat:"\u0425\u0430\u0439\u0445 \u0431\u0438\u0447\u0432\u044D\u0440", +replacewith:"\u041E\u0440\u043B\u0443\u0443\u043B\u0430\u0433\u0430", +direction:"\u0425\u0430\u0439\u0445 \u0447\u0438\u0433\u043B\u044D\u043B", +up:"\u0413\u044D\u0434\u0440\u044D\u0433", +down:"\u0426\u0430\u0430\u0448", +mcase:"\u0422\u043E\u043C/\u0416\u0438\u0436\u0438\u0433 \u0431\u0438\u0447\u0438\u043B\u0442 \u044F\u043B\u0433\u0430\u0445", +findnext:"\u0426\u0430\u0430\u0448 \u0445\u0430\u0439\u0445", +replace:"\u041E\u0440\u043B\u0443\u0443\u043B", +replaceall:"\u0411\u04AF\u0433\u0434\u0438\u0439\u0433 \u043E\u0440\u043B\u0443\u0443\u043B" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ms_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ms_dlg.js new file mode 100644 index 00000000..bd52c34e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ms_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ms.searchreplace_dlg',{ +searchnext_desc:"Cari lagi", +notfound:"Carian tamat. Perkataan yang dicari tiada.", +search_title:"Cari", +replace_title:"Cari/Ganti", +allreplaced:"Kesemua perkataan telah digantikan.", +findwhat:"Cari apa", +replacewith:"Ganti dengan", +direction:"Arah", +up:"Atas", +down:"Bawah", +mcase:"Samakan kes", +findnext:"Carian seterusnya", +replace:"Ganti", +replaceall:"Ganti kesemuanya" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nb_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nb_dlg.js new file mode 100644 index 00000000..670df521 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nb_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('nb.searchreplace_dlg',{ +searchnext_desc:"S\u00F8k igjen", +notfound:"S\u00F8ket er avsluttet. Fant ikke s\u00F8kestrengen.", +search_title:"S\u00F8k", +replace_title:"S\u00F8k/Erstatt", +allreplaced:"Alle forekomster av s\u00F8kestrengen er erstattet.", +findwhat:"Finn hva", +replacewith:"Erstatt med", +direction:"Retning", +up:"Oppover", +down:"Nedover", +mcase:"Skill mellom store og sm\u00E5 tegn", +findnext:"Finn neste", +replace:"Erstatt", +replaceall:"Erstatt alt" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nl_dlg.js new file mode 100644 index 00000000..6ad59dbf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nl_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('nl.searchreplace_dlg',{ +searchnext_desc:"Opnieuw zoeken", +notfound:"Het doorzoeken is voltooid. De zoekterm kon niet meer worden gevonden.", +search_title:"Zoeken", +replace_title:"Zoeken/Vervangen", +allreplaced:"Alle instanties van de zoekterm zijn vervangen.", +findwhat:"Zoeken naar", +replacewith:"Vervangen door", +direction:"Richting", +up:"Omhoog", +down:"Omlaag", +mcase:"Identieke hoofdletters/kleine letters", +findnext:"Zoeken", +replace:"Vervangen", +replaceall:"Alles verv." +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nn_dlg.js new file mode 100644 index 00000000..3bb232d3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/nn_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('nn.searchreplace_dlg',{ +searchnext_desc:"S\u00F8k igjen", +notfound:"S\u00F8ket avslutta. Fann ikkje s\u00F8kjestrengen.", +search_title:"S\u00F8k", +replace_title:"S\u00F8k/Erstatt", +allreplaced:"Alle f\u00F8rekomstar av s\u00F8kjestrengen er erstatta.", +findwhat:"Finn kva", +replacewith:"Erstatt med", +direction:"Retning", +up:"Oppover", +down:"Nedover", +mcase:"Skill mellom store og sm\u00E5 teikn", +findnext:"Finn neste", +replace:"Erstatt", +replaceall:"Erstatt alt" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/pl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/pl_dlg.js new file mode 100644 index 00000000..1716f5f6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/pl_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('pl.searchreplace_dlg',{ +searchnext_desc:"Znajd\u017A ponownie", +notfound:"Wyszukiwanie zako\u0144czone. Poszukiwany fragment nie zosta\u0142 znaleziony.", +search_title:"Znajd\u017A", +replace_title:"Znajd\u017A/Zamie\u0144", +allreplaced:"Wszystkie wyst\u0105pienia szukanego fragmentu zosta\u0142y zast\u0105pione.", +findwhat:"Znajd\u017A...", +replacewith:"Zamie\u0144 z...", +direction:"Kierunek", +up:"W g\u00F3r\u0119", +down:"W d\u00F3\u0142", +mcase:"Dopasuj case", +findnext:"Znajd\u017A nast\u0119pny", +replace:"Zamie\u0144", +replaceall:"Zamien wszystko" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/pt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/pt_dlg.js new file mode 100644 index 00000000..c2aad6ef --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/pt_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('pt.searchreplace_dlg',{ +searchnext_desc:"Localizar novamente", +notfound:"A pesquisa foi conclu\u00EDda sem resultados.", +search_title:"Localizar", +replace_title:"Localizar/substituir", +allreplaced:"Todas as substitui\u00E7\u00F5es foram efectuadas.", +findwhat:"Localizar", +replacewith:"Substituir com", +direction:"Direc\u00E7\u00E3o", +up:"Acima", +down:"Abaixo", +mcase:"Diferenciar mai\u00FAsculas/min\u00FAsculas", +findnext:"Localizar o seguinte", +replace:"Substituir", +replaceall:"Substituir todos" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ro_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ro_dlg.js new file mode 100644 index 00000000..76abeef7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ro_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ro.searchreplace_dlg',{ +searchnext_desc:"Caut\u0103 din nou", +notfound:"C\u0103utarea a fost terminat\u0103. Nu am g\u0103sit termenul c\u0103utat.", +search_title:"Caut\u0103", +replace_title:"Caut\u0103/\u00CEnlocuie\u015Fte", +allreplaced:"Toate instan\u0163ele termenului c\u0103utat au fost \u00EEnlocuite.", +findwhat:"Termen c\u0103utat:", +replacewith:"\u00CEnlocuie\u015Fte cu:", +direction:"Direc\u0163ia", +up:"\u00CEn sus", +down:"\u00CEn jos", +mcase:"Conteaz\u0103 litere mici/mari?", +findnext:"Caut\u0103 urm\u0103torul", +replace:"\u00CEnlocuie\u015Fte", +replaceall:"\u00CEnlocuie\u015Fte toate" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ru_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ru_dlg.js new file mode 100644 index 00000000..9070407b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ru_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ru.searchreplace_dlg',{ +searchnext_desc:"\u041D\u0430\u0439\u0442\u0438 \u0441\u043D\u043E\u0432\u0430", +notfound:"\u041F\u043E\u0438\u0441\u043A \u0437\u0430\u043A\u043E\u043D\u0447\u0435\u043D. \u0421\u0442\u0440\u043E\u043A\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.", +search_title:"\u041D\u0430\u0439\u0442\u0438", +replace_title:"\u041D\u0430\u0439\u0442\u0438/\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C", +allreplaced:"\u0412\u0441\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044E\u0449\u0438\u0435\u0441\u044F \u0441\u0442\u0440\u043E\u043A\u0438 \u0431\u044B\u043B\u0438 \u0437\u0430\u043C\u0435\u043D\u0435\u043D\u044B.", +findwhat:"\u0427\u0442\u043E \u043D\u0430\u0439\u0442\u0438", +replacewith:"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0430", +direction:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", +up:"\u0412\u0432\u0435\u0440\u0445", +down:"\u0412\u043D\u0438\u0437", +mcase:"\u0423\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440", +findnext:"\u041D\u0430\u0439\u0442\u0438 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E", +replace:"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C", +replaceall:"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sc_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sc_dlg.js new file mode 100644 index 00000000..a1d73c2f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sc_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('sc.searchreplace_dlg',{ +searchnext_desc:"\u518D\u6B21\u67E5\u627E", +notfound:"\u67E5\u627E\u5DF2\u5B8C\u6210 ! \u627E\u4E0D\u5230\u6307\u5B9A\u5B57\u7B26\u4E32\u3002 ", +search_title:"\u67E5\u627E", +replace_title:"\u67E5\u627E/\u66FF\u6362", +allreplaced:"\u5DF2\u66FF\u6362\u6240\u6709\u5339\u914D\u7684\u5B57\u7B26\u4E32.", +findwhat:"\u67E5\u627E", +replacewith:"\u66FF\u6362\u4E3A", +direction:"\u65B9\u5411", +up:"\u5411\u4E0A", +down:"\u5411\u4E0B", +mcase:"\u533A\u5206\u5927\u5C0F\u5199", +findnext:"\u67E5\u627E\u4E0B\u4E00\u4E2A", +replace:"\u66FF\u6362", +replaceall:"\u5168\u90E8\u66FF\u6362" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/se_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/se_dlg.js new file mode 100644 index 00000000..71c695b1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/se_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('se.searchreplace_dlg',{ +searchnext_desc:"S\u00F6k igen", +notfound:"S\u00F6kningen har slutf\u00F6rts. S\u00F6kstr\u00E4ngen kunde inte hittas.", +search_title:"S\u00F6k", +replace_title:"S\u00F6k/ers\u00E4tt", +allreplaced:"Alla st\u00E4llen d\u00E4r s\u00F6kstr\u00E4ngen kunde hittas har ersatts.", +findwhat:"Hitta vad", +replacewith:"Ers\u00E4tt med", +direction:"Riktning", +up:"Upp\u00E5t", +down:"Ner\u00E5t", +mcase:"Matcha gemener/versaler", +findnext:"Hitta n\u00E4sta", +replace:"Ers\u00E4tt", +replaceall:"Ers\u00E4tt alla" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/si_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/si_dlg.js new file mode 100644 index 00000000..ecdf51af --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/si_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('si.searchreplace_dlg',{ +searchnext_desc:"Find again", +notfound:"The search has been completed. The search string could not be found.", +search_title:"Find", +replace_title:"Find/Replace", +allreplaced:"All occurrences of the search string were replaced.", +findwhat:"Find what", +replacewith:"Replace with", +direction:"Direction", +up:"Up", +down:"Down", +mcase:"Match case", +findnext:"Find next", +replace:"Replace", +replaceall:"Replace all" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sk_dlg.js new file mode 100644 index 00000000..abf2f449 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sk_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('sk.searchreplace_dlg',{ +searchnext_desc:"N\u00E1jdi znova", +notfound:"Vyh\u013Ead\u00E1vanie ukon\u010Den\u00E9. Re\u0165azec nemusel by\u0165 n\u00E1jden\u00FD.", +search_title:"N\u00E1jdi", +replace_title:"N\u00E1jdi/Nahra\u010F", +allreplaced:"V\u0161etky v\u00FDskyty re\u0165azca boly zmenen\u00E9.", +findwhat:"N\u00E1jdi v\u00FDraz", +replacewith:"Nahra\u010F s", +direction:"Smer", +up:"Nahor", +down:"Dolu", +mcase:"Presn\u00E1 zhoda", +findnext:"N\u00E1jdi \u010Fal\u0161\u00ED", +replace:"Nahra\u010F", +replaceall:"Nahradi\u0165 v\u0161etko" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sl_dlg.js new file mode 100644 index 00000000..67abcc69 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sl_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('sl.searchreplace_dlg',{ +searchnext_desc:"Najdi znova", +notfound:"Preiskovanje zaklju\u010Deno. Iskanega besedila nisem na\u0161el.", +search_title:"Najdi", +replace_title:"Najdi/zamenjaj", +allreplaced:"Vse pojavitve iskanega besedila so bile zamenjane.", +findwhat:"I\u0161\u010Dem za", +replacewith:"Zamenjam z", +direction:"Smer", +up:"navzgor", +down:"navzdol", +mcase:"ujemanje velikosti", +findnext:"Najdi nasled.", +replace:"Zamenjaj", +replaceall:"Zamenjaj vse" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sq_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sq_dlg.js new file mode 100644 index 00000000..7287d211 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sq_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('sq.searchreplace_dlg',{ +searchnext_desc:"K\u00EBrko p\u00EBrs\u00EBri", +notfound:"K\u00EBrkimi p\u00EBrfundoi dhe nuk ktheu asnj\u00EB rezultat.", +search_title:"K\u00EBrko", +replace_title:"K\u00EBrko/Z\u00EBvend\u00EBso", +allreplaced:"T\u00EB gjitha tekstet e gjetura u z\u00EBvend\u00EBsuan.", +findwhat:"K\u00EBrko p\u00EBr", +replacewith:"Z\u00EBvend\u00EBso me", +direction:"Drejtimi", +up:"Lart", +down:"Posht\u00EB", +mcase:"P\u00EBrshtat madh\u00EBsin\u00EB e g\u00EBrm\u00EBs", +findnext:"K\u00EBrko tjetr\u00EBn", +replace:"Z\u00EBvend\u00EBso", +replaceall:"Z\u00EBv. t\u00EB gjitha" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sr_dlg.js new file mode 100644 index 00000000..e3632519 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sr_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('sr.searchreplace_dlg',{ +searchnext_desc:"Prona\u0111i opet", +notfound:"Pretra\u017Eivanje je zavr\u0161eno. Tra\u017Eeni tekst nije prona\u0111en.", +search_title:"Prona\u0111i", +replace_title:"Prona\u0111i/Zameni", +allreplaced:"Sva pojavljivanja tra\u017Eenog teksta su zamenjena.", +findwhat:"Prona\u0111i tekst", +replacewith:"Zameni sa", +direction:"Smjer", +up:"Gore", +down:"Dolje", +mcase:"Match case", +findnext:"Prona\u0111i sljede\u0107e", +replace:"Zameni", +replaceall:"Zameni sve" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sv.js deleted file mode 100644 index d5fb893e..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sv.js +++ /dev/null @@ -1,19 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_searchreplace_search_desc'] = 'Sök'; -tinyMCELang['lang_searchreplace_searchnext_desc'] = 'Sög igen'; -tinyMCELang['lang_searchreplace_replace_desc'] = 'Sök/Ersätt'; -tinyMCELang['lang_searchreplace_notfound'] = 'Sökningen är slutförd. Söksträngen kunde inte hittas.'; -tinyMCELang['lang_searchreplace_search_title'] = 'Sök'; -tinyMCELang['lang_searchreplace_replace_title'] = 'Sök/Ersätt'; -tinyMCELang['lang_searchreplace_allreplaced'] = 'Alla träffar på söksträngen ersattes'; -tinyMCELang['lang_searchreplace_findwhat'] = 'Sök på'; -tinyMCELang['lang_searchreplace_replacewith'] = 'Ersätt med'; -tinyMCELang['lang_searchreplace_direction'] = 'Sökriktning'; -tinyMCELang['lang_searchreplace_up'] = 'Uppåt'; -tinyMCELang['lang_searchreplace_down'] = 'Neråt'; -tinyMCELang['lang_searchreplace_case'] = 'Matcha gemener/VERSALER'; -tinyMCELang['lang_searchreplace_findnext'] = 'Sök nästa'; -tinyMCELang['lang_searchreplace_replace'] = 'Ersätt'; -tinyMCELang['lang_searchreplace_replaceall'] = 'Ersätt alla'; -tinyMCELang['lang_searchreplace_cancel'] = 'Avbryt'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sv_dlg.js new file mode 100644 index 00000000..a3f6f196 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/sv_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('sv.searchreplace_dlg',{ +searchnext_desc:"S\u00F6k igen", +notfound:"S\u00F6kningen har slutf\u00F6rts. S\u00F6kstr\u00E4ngen kunde inte hittas.", +search_title:"S\u00F6k", +replace_title:"S\u00F6k/ers\u00E4tt", +allreplaced:"Alla st\u00E4llen d\u00E4r s\u00F6kstr\u00E4ngen kunde hittas har ersatts.", +findwhat:"Hitta vad", +replacewith:"Ers\u00E4tt med", +direction:"Riktning", +up:"Upp\u00E5t", +down:"Ner\u00E5t", +mcase:"Matcha gemener/versaler", +findnext:"Hitta n\u00E4sta", +replace:"Ers\u00E4tt", +replaceall:"Ers\u00E4tt alla" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tr_dlg.js new file mode 100644 index 00000000..17c495eb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tr_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('tr.searchreplace_dlg',{ +searchnext_desc:"Tekrar ara", +notfound:"Arama tamamland\u0131. Aranan metin bulunamad\u0131.", +search_title:"Bul", +replace_title:"Bul/De\u011Fi\u015Ftir", +allreplaced:"Aranan metin bulundu\u011Fu yerlerde de\u011Fi\u015Ftirildi.", +findwhat:"Aranacak", +replacewith:"De\u011Fi\u015Ftirilecek", +direction:"Y\u00F6n", +up:"Yukar\u0131", +down:"A\u015Fa\u011F\u0131", +mcase:"B\u00FCy\u00FCk/k\u00FC\u00E7\u00FCk harf e\u015Fle", +findnext:"Sonrakini bul", +replace:"De\u011Fi\u015Ftir", +replaceall:"T\u00FCm\u00FCn\u00FC de\u011Fi\u015Ftir" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tt_dlg.js new file mode 100644 index 00000000..62f741c8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tt_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('tt.searchreplace_dlg',{ +searchnext_desc:"\u518D\u6B21\u641C\u5C0B", +notfound:"\u641C\u5C0B\u5DF2\u5B8C\u6210 ! \u627E\u4E0D\u5230\u4EFB\u4F55\u76EE\u6A19\u3002 ", +search_title:"\u641C\u5C0B", +replace_title:"\u641C\u5C0B/\u53D6\u4EE3", +allreplaced:"\u5DF2\u53D6\u4EE3\u6240\u6709\u5339\u914D\u7684\u5B57\u4E32.", +findwhat:"\u641C\u5C0B\u76EE\u6A19", +replacewith:"\u53D6\u4EE3\u7232", +direction:"\u65B9\u5411", +up:"\u5411\u4E0A", +down:"\u5411\u4E0B", +mcase:"\u5340\u5206\u5927\u5C0F\u5BEB", +findnext:"\u641C\u5C0B\u4E0B\u4E00\u500B", +replace:"\u53D6\u4EE3", +replaceall:"\u5168\u90E8\u53D6\u4EE3" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tw_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tw_dlg.js new file mode 100644 index 00000000..cca3e52c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/tw_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('tw.searchreplace_dlg',{ +searchnext_desc:"\u518D\u6B21\u67E5\u627E", +notfound:"\u67E5\u627E\u5DF2\u5B8C\u6210!\u627E\u4E0D\u5230\u4EFB\u4F55\u76EE\u6A19\u3002", +search_title:"\u67E5\u627E", +replace_title:"\u67E5\u627E/\u66FF\u63DB", +allreplaced:"\u5DF2\u66FF\u63DB\u6240\u6709\u5339\u914D\u7684\u7B26\u4E32.", +findwhat:"\u67E5\u627E\u76EE\u6A19", +replacewith:"\u66FF\u63DB\u70BA", +direction:"\u65B9\u5411", +up:"\u5411\u4E0A", +down:"\u5411\u4E0B", +mcase:"\u5927\u5C0F\u5BEB\u5339\u914D", +findnext:"\u4E0B\u4E00\u500B", +replace:"\u66FF\u63DB", +replaceall:"\u66FF\u63DB\u5168\u90E8" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/uk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/uk_dlg.js new file mode 100644 index 00000000..87198426 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/uk_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('uk.searchreplace_dlg',{ +searchnext_desc:"\u0417\u043D\u0430\u0439\u0442\u0438 \u0449\u0435", +notfound:"\u041F\u043E\u0448\u0443\u043A \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E. \u041F\u043E\u0448\u0443\u043A\u043E\u0432\u0438\u0439 \u0440\u044F\u0434\u043E \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E.", +search_title:"\u0417\u043D\u0430\u0439\u0442\u0438", +replace_title:"\u0417\u043D\u0430\u0439\u0442\u0438/\u0417\u0430\u043C\u0456\u043D\u0438\u0442\u0438", +allreplaced:"\u0412\u0441\u0456 \u0432\u0445\u043E\u0434\u0436\u0435\u043D\u043D\u044F \u0440\u044F\u0434\u043A\u0430 \u0431\u0443\u043B\u0438 \u0437\u0430\u043C\u0456\u043D\u0435\u043D\u0456.", +findwhat:"\u0417\u043D\u0430\u0439\u0442\u0438", +replacewith:"\u0417\u0430\u043C\u0456\u043D\u0438\u0442\u0438 \u043D\u0430", +direction:"\u041D\u0430\u043F\u0440\u044F\u043C", +up:"\u0412\u0433\u043E\u0440\u0443", +down:"\u0412\u043D\u0438\u0437", +mcase:"\u0412\u0440\u0430\u0445\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440", +findnext:"\u0417\u043D\u0430\u0439\u0442\u0438 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435", +replace:"\u0417\u0430\u043C\u0456\u043D\u0438\u0442\u0438", +replaceall:"\u0417\u0430\u043C\u0456\u043D\u0438\u0442\u0438 \u0432\u0441\u0435" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/vi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/vi_dlg.js new file mode 100644 index 00000000..4134ee92 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/vi_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('vi.searchreplace_dlg',{ +searchnext_desc:"T\u00ECm l\u1EA1i", +notfound:"K\u1EBFt th\u00FAc t\u00ECm ki\u1EBFm. Kh\u00F4ng th\u1EC3 t\u00ECm th\u1EA5y chu\u1ED7i t\u1EEB c\u1EA7n t\u00ECm.", +search_title:"T\u00ECm ki\u1EBFm", +replace_title:"T\u00ECm ki\u1EBFm/Thay th\u1EBF", +allreplaced:"\u0110\u00E3 thay th\u1EBF t\u1EA5t c\u1EA3 chu\u1ED7i t\u1EEB c\u1EA7n t\u00ECm.", +findwhat:"Chu\u1ED7i t\u1EEB c\u1EA7n t\u00ECm", +replacewith:"Thay th\u1EBF b\u1EB1ng chu\u1ED7i t\u1EEB", +direction:"H\u01B0\u1EDBng t\u00ECm ki\u1EBFm", +up:"L\u00EAn", +down:"Xu\u1ED1ng", +mcase:"Ph\u00E2n bi\u1EC7t ch\u1EEF hoa, ch\u1EEF th\u01B0\u1EDDng ", +findnext:"Ti\u1EBFp t\u1EE5c t\u00ECm", +replace:"Thay th\u1EBF", +replaceall:"Thay th\u1EBF t\u1EA5t c\u1EA3" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/zh_cn.js deleted file mode 100644 index d939041a..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/zh_cn.js +++ /dev/null @@ -1,19 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_searchreplace_search_desc'] = '²éÕÒ'; -tinyMCELang['lang_searchreplace_searchnext_desc'] = 'ÔٴβéÕÒ'; -tinyMCELang['lang_searchreplace_replace_desc'] = '²éÕÒ/Ìæ»»'; -tinyMCELang['lang_searchreplace_notfound'] = 'ËÑË÷Íê±Ï£¬Ã»ÓÐÕÒµ½Òª²éÕÒµÄ×Ö·û´®¡£'; -tinyMCELang['lang_searchreplace_search_title'] = '²éÕÒ'; -tinyMCELang['lang_searchreplace_replace_title'] = '²éÕÒ/Ìæ»»'; -tinyMCELang['lang_searchreplace_allreplaced'] = 'ËùÓгöÏÖµÄ×Ö·û´®ÒÑÌæ»»Íê±Ï¡£'; -tinyMCELang['lang_searchreplace_findwhat'] = '²éÕÒ'; -tinyMCELang['lang_searchreplace_replacewith'] = 'Ì滻Ϊ'; -tinyMCELang['lang_searchreplace_direction'] = '·½Ïò'; -tinyMCELang['lang_searchreplace_up'] = 'ÏòÉÏ'; -tinyMCELang['lang_searchreplace_down'] = 'ÏòÏÂ'; -tinyMCELang['lang_searchreplace_case'] = 'Æ¥Åä´óСд'; -tinyMCELang['lang_searchreplace_findnext'] = '²éÕÒÏÂÒ»¸ö'; -tinyMCELang['lang_searchreplace_replace'] = 'Ìæ»»'; -tinyMCELang['lang_searchreplace_replaceall'] = 'È«²¿Ìæ»»'; -tinyMCELang['lang_searchreplace_cancel'] = 'È¡Ïû'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/zh_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/zh_dlg.js new file mode 100644 index 00000000..5c8acc43 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/zh_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('zh.searchreplace_dlg',{ +searchnext_desc:"\u518D\u6B21\u67E5\u627E", +notfound:"\u67E5\u627E\u5DF2\u5B8C\u6210!\u627E\u4E0D\u5230\u4EFB\u4F55\u76EE\u6807\u3002", +search_title:"\u67E5\u627E", +replace_title:"\u67E5\u627E/\u66FF\u6362", +allreplaced:"\u5DF2\u66FF\u6362\u6240\u6709\u5339\u914D\u7684\u7B26\u4E32.", +findwhat:"\u67E5\u627E\u76EE\u6807", +replacewith:"\u66FF\u6362\u4E3A", +direction:"\u65B9\u5411", +up:"\u5411\u4E0A", +down:"\u5411\u4E0B", +mcase:"\u5927\u5C0F\u5199\u5339\u914D", +findnext:"\u4E0B\u4E00\u4E2A", +replace:"\u66FF\u6362", +replaceall:"\u66FF\u6362\u5168\u90E8" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/readme.txt deleted file mode 100644 index 228387b4..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/readme.txt +++ /dev/null @@ -1,18 +0,0 @@ - searchreplace plugin for TinyMCE ------------------------------ - -About: - This plugin adds search/replace dialogs to TinyMCE. - -Installation instructions: - * Copy the searchreplace directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "searchreplace". - * Add buttons "search,replace" to the button list. - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "searchreplace", - theme_advanced_buttons1_add : "search,replace", - }); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/replace.htm b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/replace.htm deleted file mode 100644 index 26156001..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/replace.htm +++ /dev/null @@ -1,90 +0,0 @@ - - - - -{$lang_searchreplace_replace_title} - - - - -
- - - - - - - - - - - - - - - -
{$lang_searchreplace_findwhat}: 
{$lang_searchreplace_replacewith}: 
- - - - - - - -
{$lang_searchreplace_direction}: {$lang_searchreplace_up}{$lang_searchreplace_down}
- - - - -
{$lang_searchreplace_case}
- - - - - - - -
-
- - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/search.htm b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/search.htm deleted file mode 100644 index ba6f19c2..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/search.htm +++ /dev/null @@ -1,76 +0,0 @@ - - - - -{$lang_searchreplace_search_title} - - - - -
- - - - - - - - - - -
{$lang_searchreplace_findwhat}: 
- - - - - - - -
{$lang_searchreplace_direction}: {$lang_searchreplace_up}{$lang_searchreplace_down}
- - - - -
{$lang_searchreplace_case}
- - - - - -
-
- - diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm new file mode 100644 index 00000000..9c95a6a3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm @@ -0,0 +1,105 @@ + + + + {#searchreplace_dlg.replace_title} + + + + + + + + +
+ + +
+
+ + + + + + + + + + + +
+ + + + + + + + +
+
+ + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + +
+ + + + + + + + +
+
+ + + + + +
+
+
+ +
+ +
+
+ + + +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css b/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css new file mode 100644 index 00000000..24efa021 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css @@ -0,0 +1 @@ +.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js new file mode 100644 index 00000000..9cb67996 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js @@ -0,0 +1 @@ +(function(){var JSONRequest=tinymce.util.JSONRequest,each=tinymce.each,DOM=tinymce.DOM;tinymce.create('tinymce.plugins.SpellcheckerPlugin',{getInfo:function(){return{longname:'Spellchecker',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',version:tinymce.majorVersion+"."+tinymce.minorVersion};},init:function(ed,url){var t=this,cm;t.url=url;t.editor=ed;ed.addCommand('mceSpellCheck',function(){if(!t.active){ed.setProgressState(1);t._sendRPC('checkWords',[t.selectedLang,t._getWords()],function(r){if(r.length>0){t.active=1;t._markWords(r);ed.setProgressState(0);ed.nodeChanged();}else{ed.setProgressState(0);ed.windowManager.alert('spellchecker.no_mpell');}});}else t._done();});ed.onInit.add(function(){if(ed.settings.content_css!==false)ed.dom.loadCSS(url+'/css/content.css');});ed.onClick.add(t._showMenu,t);ed.onContextMenu.add(t._showMenu,t);ed.onBeforeGetContent.add(function(){if(t.active)t._removeWords();});ed.onNodeChange.add(function(ed,cm){cm.setActive('spellchecker',t.active);});ed.onSetContent.add(function(){t._done();});ed.onBeforeGetContent.add(function(){t._done();});ed.onBeforeExecCommand.add(function(ed,cmd){if(cmd=='mceFullScreen')t._done();});t.languages={};each(ed.getParam('spellchecker_languages','+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv','hash'),function(v,k){if(k.indexOf('+')===0){k=k.substring(1);t.selectedLang=v;}t.languages[k]=v;});},createControl:function(n,cm){var t=this,c,ed=t.editor;if(n=='spellchecker'){c=cm.createSplitButton(n,{title:'spellchecker.desc',cmd:'mceSpellCheck',scope:t});c.onRenderMenu.add(function(c,m){m.add({title:'spellchecker.langs','class':'mceMenuItemTitle'}).setDisabled(1);each(t.languages,function(v,k){var o={icon:1},mi;o.onclick=function(){mi.setSelected(1);t.selectedItem.setSelected(0);t.selectedItem=mi;t.selectedLang=v;};o.title=k;mi=m.add(o);mi.setSelected(v==t.selectedLang);if(v==t.selectedLang)t.selectedItem=mi;})});return c;}},_walk:function(n,f){var d=this.editor.getDoc(),w;if(d.createTreeWalker){w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while((n=w.nextNode())!=null)f.call(this,n);}else tinymce.walk(n,f,'childNodes');},_getSeparators:function(){var re='',i,str=this.editor.getParam('spellchecker_word_separator_chars','\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c');for(i=0;i$1$2');v=v.replace(r3,'$1$2');dom.replace(dom.create('span',{'class':'mceItemHidden'},v),n);}}});se.moveToBookmark(b);},_showMenu:function(ed,e){var t=this,ed=t.editor,m=t._menu,p1,dom=ed.dom,vp=dom.getViewPort(ed.getWin());if(!m){p1=DOM.getPos(ed.getContentAreaContainer());m=ed.controlManager.createDropMenu('spellcheckermenu',{offset_x:p1.x,offset_y:p1.y,'class':'mceNoIcons'});t._menu=m;}if(dom.hasClass(e.target,'mceItemHiddenSpellWord')){m.removeAll();m.add({title:'spellchecker.wait','class':'mceMenuItemTitle'}).setDisabled(1);t._sendRPC('getSuggestions',[t.selectedLang,dom.decode(e.target.innerHTML)],function(r){m.removeAll();if(r.length>0){m.add({title:'spellchecker.sug','class':'mceMenuItemTitle'}).setDisabled(1);each(r,function(v){m.add({title:v,onclick:function(){dom.replace(ed.getDoc().createTextNode(v),e.target);t._checkDone();}});});m.addSeparator();}else m.add({title:'spellchecker.no_sug','class':'mceMenuItemTitle'}).setDisabled(1);m.add({title:'spellchecker.ignore_word',onclick:function(){dom.remove(e.target,1);t._checkDone();}});m.add({title:'spellchecker.ignore_words',onclick:function(){t._removeWords(dom.decode(e.target.innerHTML));t._checkDone();}});m.update();});ed.selection.select(e.target);p1=dom.getPos(e.target);m.showMenu(p1.x,p1.y+e.target.offsetHeight-vp.y);return tinymce.dom.Event.cancel(e);}else m.hideMenu();},_checkDone:function(){var t=this,ed=t.editor,dom=ed.dom,o;each(dom.select('span'),function(n){if(n&&dom.hasClass(n,'mceItemHiddenSpellWord')){o=true;return false;}});if(!o)t._done();},_done:function(){var t=this,la=t.active;if(t.active){t.active=0;t._removeWords();if(t._menu)t._menu.hideMenu();if(la)t.editor.nodeChanged();}},_sendRPC:function(m,p,cb){var t=this,url=t.editor.getParam("spellchecker_rpc_url","{backend}");if(url=='{backend}'){t.editor.setProgressState(0);alert('Please specify: spellchecker_rpc_url');return;}JSONRequest.sendRPC({url:url,method:m,params:p,success:cb,error:function(e,x){t.editor.setProgressState(0);t.editor.windowManager.alert(e.errstr||('Error response: '+x.responseText));}});}});tinymce.PluginManager.add('spellchecker',tinymce.plugins.SpellcheckerPlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js new file mode 100644 index 00000000..c913c460 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js @@ -0,0 +1,338 @@ +/** + * $Id: editor_plugin_src.js 425 2007-11-21 15:17:39Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.SpellcheckerPlugin', { + getInfo : function() { + return { + longname : 'Spellchecker', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + init : function(ed, url) { + var t = this, cm; + + t.url = url; + t.editor = ed; + + // Register commands + ed.addCommand('mceSpellCheck', function() { + if (!t.active) { + ed.setProgressState(1); + t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { + if (r.length > 0) { + t.active = 1; + t._markWords(r); + ed.setProgressState(0); + ed.nodeChanged(); + } else { + ed.setProgressState(0); + ed.windowManager.alert('spellchecker.no_mpell'); + } + }); + } else + t._done(); + }); + + ed.onInit.add(function() { + if (ed.settings.content_css !== false) + ed.dom.loadCSS(url + '/css/content.css'); + }); + + ed.onClick.add(t._showMenu, t); + ed.onContextMenu.add(t._showMenu, t); + ed.onBeforeGetContent.add(function() { + if (t.active) + t._removeWords(); + }); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('spellchecker', t.active); + }); + + ed.onSetContent.add(function() { + t._done(); + }); + + ed.onBeforeGetContent.add(function() { + t._done(); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd) { + if (cmd == 'mceFullScreen') + t._done(); + }); + + // Find selected language + t.languages = {}; + each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { + if (k.indexOf('+') === 0) { + k = k.substring(1); + t.selectedLang = v; + } + + t.languages[k] = v; + }); + }, + + createControl : function(n, cm) { + var t = this, c, ed = t.editor; + + if (n == 'spellchecker') { + c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + c.onRenderMenu.add(function(c, m) { + m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(t.languages, function(v, k) { + var o = {icon : 1}, mi; + + o.onclick = function() { + mi.setSelected(1); + t.selectedItem.setSelected(0); + t.selectedItem = mi; + t.selectedLang = v; + }; + + o.title = k; + mi = m.add(o); + mi.setSelected(v == t.selectedLang); + + if (v == t.selectedLang) + t.selectedItem = mi; + }) + }); + + return c; + } + }, + + // Internal functions + + _walk : function(n, f) { + var d = this.editor.getDoc(), w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(this, n); + } else + tinymce.walk(n, f, 'childNodes'); + }, + + _getSeparators : function() { + var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c'); + + // Build word separator regexp + for (i=0; i$1$2'); + v = v.replace(r3, '$1$2'); + + dom.replace(dom.create('span', {'class' : 'mceItemHidden'}, v), n); + } + } + }); + + se.moveToBookmark(b); + }, + + _showMenu : function(ed, e) { + var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()); + + if (!m) { + p1 = DOM.getPos(ed.getContentAreaContainer()); + //p2 = DOM.getPos(ed.getContainer()); + + m = ed.controlManager.createDropMenu('spellcheckermenu', { + offset_x : p1.x, + offset_y : p1.y, + 'class' : 'mceNoIcons' + }); + + t._menu = m; + } + + if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) { + m.removeAll(); + m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { + m.removeAll(); + + if (r.length > 0) { + m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(r, function(v) { + m.add({title : v, onclick : function() { + dom.replace(ed.getDoc().createTextNode(v), e.target); + t._checkDone(); + }}); + }); + + m.addSeparator(); + } else + m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + m.add({ + title : 'spellchecker.ignore_word', + onclick : function() { + dom.remove(e.target, 1); + t._checkDone(); + } + }); + + m.add({ + title : 'spellchecker.ignore_words', + onclick : function() { + t._removeWords(dom.decode(e.target.innerHTML)); + t._checkDone(); + } + }); + + m.update(); + }); + + ed.selection.select(e.target); + p1 = dom.getPos(e.target); + m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y); + + return tinymce.dom.Event.cancel(e); + } else + m.hideMenu(); + }, + + _checkDone : function() { + var t = this, ed = t.editor, dom = ed.dom, o; + + each(dom.select('span'), function(n) { + if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { + o = true; + return false; + } + }); + + if (!o) + t._done(); + }, + + _done : function() { + var t = this, la = t.active; + + if (t.active) { + t.active = 0; + t._removeWords(); + + if (t._menu) + t._menu.hideMenu(); + + if (la) + t.editor.nodeChanged(); + } + }, + + _sendRPC : function(m, p, cb) { + var t = this, url = t.editor.getParam("spellchecker_rpc_url", "{backend}"); + + if (url == '{backend}') { + t.editor.setProgressState(0); + alert('Please specify: spellchecker_rpc_url'); + return; + } + + JSONRequest.sendRPC({ + url : url, + method : m, + params : p, + success : cb, + error : function(e, x) { + t.editor.setProgressState(0); + t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); + } + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/img/wline.gif b/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/img/wline.gif new file mode 100644 index 00000000..7d0a4dbc Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/plugins/spellchecker/img/wline.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/css/props.css b/includes/tinymce/jscripts/tiny_mce/plugins/style/css/props.css new file mode 100644 index 00000000..eb1f2649 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/css/props.css @@ -0,0 +1,13 @@ +#text_font {width:250px;} +#text_size {width:70px;} +.mceAddSelectValue {background:#DDD;} +select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} +#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} +#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} +#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} +.panel_wrapper div.current {padding-top:10px;height:230px;} +.delim {border-left:1px solid gray;} +.tdelim {border-bottom:1px solid gray;} +#block_display {width:145px;} +#list_type {width:115px;} +.disabled {background:#EEE;} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js new file mode 100644 index 00000000..6ebaa91c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.StylePlugin',{init:function(ed,url){ed.addCommand('mceStyleProps',function(){ed.windowManager.open({file:url+'/props.htm',width:480+parseInt(ed.getLang('style.delta_width',0)),height:320+parseInt(ed.getLang('style.delta_height',0)),inline:1},{plugin_url:url,style_text:ed.selection.getNode().style.cssText});});ed.addCommand('mceSetElementStyle',function(ui,v){if(e=ed.selection.getNode()){ed.dom.setAttrib(e,'style',v);ed.execCommand('mceRepaint');}});ed.onNodeChange.add(function(ed,cm,n){cm.setDisabled('styleprops',n.nodeName==='BODY');});ed.addButton('styleprops',{title:'style.desc',cmd:'mceStyleProps'});},getInfo:function(){return{longname:'Style',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('style',tinymce.plugins.StylePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js new file mode 100644 index 00000000..6c817ce4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js @@ -0,0 +1,52 @@ +/** + * $Id: editor_plugin_src.js 787 2008-04-10 11:40:57Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.StylePlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceStyleProps', function() { + ed.windowManager.open({ + file : url + '/props.htm', + width : 480 + parseInt(ed.getLang('style.delta_width', 0)), + height : 320 + parseInt(ed.getLang('style.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + style_text : ed.selection.getNode().style.cssText + }); + }); + + ed.addCommand('mceSetElementStyle', function(ui, v) { + if (e = ed.selection.getNode()) { + ed.dom.setAttrib(e, 'style', v); + ed.execCommand('mceRepaint'); + } + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setDisabled('styleprops', n.nodeName === 'BODY'); + }); + + // Register buttons + ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'}); + }, + + getInfo : function() { + return { + longname : 'Style', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/js/props.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/js/props.js new file mode 100644 index 00000000..cafd6b1c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/js/props.js @@ -0,0 +1,641 @@ +tinyMCEPopup.requireLangPack(); + +var defaultFonts = "" + + "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Courier New, Courier, mono=Courier New, Courier, mono;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + + "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + + "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; + +var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; +var defaultMeasurement = "+pixels=px;points=pt;em;in;cm;mm;picas;ems;exs;%"; +var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%"; +var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%"; +var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; +var defaultTextStyle = "normal;italic;oblique"; +var defaultVariant = "normal;small-caps"; +var defaultLineHeight = "normal"; +var defaultAttachment = "fixed;scroll"; +var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y"; +var defaultPosH = "left;center;right"; +var defaultPosV = "top;center;bottom"; +var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom"; +var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none"; +var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset"; +var defaultBorderWidth = "thin;medium;thick"; +var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; + +function init() { + var ce = document.getElementById('container'), h; + + ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); + + h = getBrowserHTML('background_image_browser','background_image','image','advimage'); + document.getElementById("background_image_browser").innerHTML = h; + + document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); + document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); + document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); + document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); + document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); + document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); + + fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); + fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); + fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); + fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); + fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); + fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); + fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); + fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); + fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); + + fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); + fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); + + fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); + fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); + fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); + fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); + fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); + fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); + fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); + + fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); + fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); + fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); + + fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); + + fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); + fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); + + fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); + fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); + + fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); + + fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); + + TinyMCE_EditableSelects.init(); + setupFormData(); + showDisabledControls(); +} + +function setupFormData() { + var ce = document.getElementById('container'), f = document.forms[0], s, b, i; + + // Setup text fields + + selectByValue(f, 'text_font', ce.style.fontFamily, true, true); + selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true); + selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize)); + selectByValue(f, 'text_weight', ce.style.fontWeight, true, true); + selectByValue(f, 'text_style', ce.style.fontStyle, true, true); + selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true); + selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight)); + selectByValue(f, 'text_case', ce.style.textTransform, true, true); + selectByValue(f, 'text_variant', ce.style.fontVariant, true, true); + f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color); + updateColor('text_color_pick', 'text_color'); + f.text_underline.checked = inStr(ce.style.textDecoration, 'underline'); + f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); + f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); + f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); + + // Setup background fields + + f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor); + updateColor('background_color_pick', 'background_color'); + f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true); + selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true); + selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true); + selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0))); + selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true); + selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1))); + + // Setup block fields + + selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true); + selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing)); + selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true); + selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing)); + selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true); + selectByValue(f, 'block_text_align', ce.style.textAlign, true, true); + f.block_text_indent.value = getNum(ce.style.textIndent); + selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent)); + selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true); + selectByValue(f, 'block_display', ce.style.display, true, true); + + // Setup box fields + + f.box_width.value = getNum(ce.style.width); + selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width)); + + f.box_height.value = getNum(ce.style.height); + selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height)); + + if (tinymce.isGecko) + selectByValue(f, 'box_float', ce.style.cssFloat, true, true); + else + selectByValue(f, 'box_float', ce.style.styleFloat, true, true); + + selectByValue(f, 'box_clear', ce.style.clear, true, true); + + setupBox(f, ce, 'box_padding', 'padding', ''); + setupBox(f, ce, 'box_margin', 'margin', ''); + + // Setup border fields + + setupBox(f, ce, 'border_style', 'border', 'Style'); + setupBox(f, ce, 'border_width', 'border', 'Width'); + setupBox(f, ce, 'border_color', 'border', 'Color'); + + updateColor('border_color_top_pick', 'border_color_top'); + updateColor('border_color_right_pick', 'border_color_right'); + updateColor('border_color_bottom_pick', 'border_color_bottom'); + updateColor('border_color_left_pick', 'border_color_left'); + + f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value); + f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value); + f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value); + f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value); + + // Setup list fields + + selectByValue(f, 'list_type', ce.style.listStyleType, true, true); + selectByValue(f, 'list_position', ce.style.listStylePosition, true, true); + f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + + // Setup box fields + + selectByValue(f, 'positioning_type', ce.style.position, true, true); + selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true); + selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true); + f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : ""; + + f.positioning_width.value = getNum(ce.style.width); + selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width)); + + f.positioning_height.value = getNum(ce.style.height); + selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height)); + + setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']); + + s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1"); + s = s.replace(/,/g, ' '); + + if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = getNum(getVal(s, 1)); + selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1))); + f.positioning_clip_bottom.value = getNum(getVal(s, 2)); + selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2))); + f.positioning_clip_left.value = getNum(getVal(s, 3)); + selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3))); + } else { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value; + } + +// setupBox(f, ce, '', 'border', 'Color'); +} + +function getMeasurement(s) { + return s.replace(/^([0-9]+)(.*)$/, "$2"); +} + +function getNum(s) { + if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s)) + return s.replace(/[^0-9]/g, ''); + + return s; +} + +function inStr(s, n) { + return new RegExp(n, 'gi').test(s); +} + +function getVal(s, i) { + var a = s.split(' '); + + if (a.length > 1) + return a[i]; + + return ""; +} + +function setValue(f, n, v) { + if (f.elements[n].type == "text") + f.elements[n].value = v; + else + selectByValue(f, n, v, true, true); +} + +function setupBox(f, ce, fp, pr, sf, b) { + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (isSame(ce, pr, sf, b)) { + f.elements[fp + "_same"].checked = true; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + f.elements[fp + "_right"].value = ""; + f.elements[fp + "_right"].disabled = true; + f.elements[fp + "_bottom"].value = ""; + f.elements[fp + "_bottom"].disabled = true; + f.elements[fp + "_left"].value = ""; + f.elements[fp + "_left"].disabled = true; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + f.elements[fp + "_left_measurement"].disabled = true; + f.elements[fp + "_bottom_measurement"].disabled = true; + f.elements[fp + "_right_measurement"].disabled = true; + } + } else { + f.elements[fp + "_same"].checked = false; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf])); + f.elements[fp + "_right"].disabled = false; + + setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf])); + f.elements[fp + "_bottom"].disabled = false; + + setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left"].disabled = false; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf])); + selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf])); + selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left_measurement"].disabled = false; + f.elements[fp + "_bottom_measurement"].disabled = false; + f.elements[fp + "_right_measurement"].disabled = false; + } + } +} + +function isSame(e, pr, sf, b) { + var a = [], i, x; + + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (typeof(sf) == "undefined" || sf == null) + sf = ""; + + a[0] = e.style[pr + b[0] + sf]; + a[1] = e.style[pr + b[1] + sf]; + a[2] = e.style[pr + b[2] + sf]; + a[3] = e.style[pr + b[3] + sf]; + + for (i=0; i 0 ? s.substring(1) : s; + + if (f.text_none.checked) + s = "none"; + + ce.style.textDecoration = s; + + // Build background styles + + ce.style.backgroundColor = f.background_color.value; + ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : ""; + ce.style.backgroundRepeat = f.background_repeat.value; + ce.style.backgroundAttachment = f.background_attachment.value; + + if (f.background_hpos.value != "") { + s = ""; + s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " "; + s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : ""); + ce.style.backgroundPosition = s; + } + + // Build block styles + + ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : ""); + ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : ""); + ce.style.verticalAlign = f.block_vertical_alignment.value; + ce.style.textAlign = f.block_text_align.value; + ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : ""); + ce.style.whiteSpace = f.block_whitespace.value; + ce.style.display = f.block_display.value; + + // Build box styles + + ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : ""); + ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : ""); + ce.style.styleFloat = f.box_float.value; + + if (tinymce.isGecko) + ce.style.cssFloat = f.box_float.value; + + ce.style.clear = f.box_clear.value; + + if (!f.box_padding_same.checked) { + ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : ""); + ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : ""); + ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : ""); + } else + ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + + if (!f.box_margin_same.checked) { + ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : ""); + ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : ""); + ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : ""); + } else + ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + + // Build border styles + + if (!f.border_style_same.checked) { + ce.style.borderTopStyle = f.border_style_top.value; + ce.style.borderRightStyle = f.border_style_right.value; + ce.style.borderBottomStyle = f.border_style_bottom.value; + ce.style.borderLeftStyle = f.border_style_left.value; + } else + ce.style.borderStyle = f.border_style_top.value; + + if (!f.border_width_same.checked) { + ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); + ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); + ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); + } else + ce.style.borderWidth = f.border_width_top.value; + + if (!f.border_color_same.checked) { + ce.style.borderTopColor = f.border_color_top.value; + ce.style.borderRightColor = f.border_color_right.value; + ce.style.borderBottomColor = f.border_color_bottom.value; + ce.style.borderLeftColor = f.border_color_left.value; + } else + ce.style.borderColor = f.border_color_top.value; + + // Build list styles + + ce.style.listStyleType = f.list_type.value; + ce.style.listStylePosition = f.list_position.value; + ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : ""; + + // Build positioning styles + + ce.style.position = f.positioning_type.value; + ce.style.visibility = f.positioning_visibility.value; + + if (ce.style.width == "") + ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : ""); + + if (ce.style.height == "") + ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : ""); + + ce.style.zIndex = f.positioning_zindex.value; + ce.style.overflow = f.positioning_overflow.value; + + if (!f.positioning_placement_same.checked) { + ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : ""); + ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : ""); + ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : ""); + } else { + s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.top = s; + ce.style.right = s; + ce.style.bottom = s; + ce.style.left = s; + } + + if (!f.positioning_clip_same.checked) { + s = "rect("; + s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto"); + s += ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } else { + s = "rect("; + t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto"; + s += t + " "; + s += t + " "; + s += t + " "; + s += t + ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } + + ce.style.cssText = ce.style.cssText; +} + +function isNum(s) { + return new RegExp('[0-9]+', 'g').test(s); +} + +function showDisabledControls() { + var f = document.forms, i, a; + + for (i=0; i 1) { + addSelectValue(f, s, p[0], p[1]); + + if (se) + selectByValue(f, s, p[1]); + } else { + addSelectValue(f, s, p[0], p[0]); + + if (se) + selectByValue(f, s, p[0]); + } + } +} + +function toggleSame(ce, pre) { + var el = document.forms[0].elements, i; + + if (ce.checked) { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = true; + el[pre + "_bottom"].disabled = true; + el[pre + "_left"].disabled = true; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = true; + el[pre + "_bottom_measurement"].disabled = true; + el[pre + "_left_measurement"].disabled = true; + } + } else { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = false; + el[pre + "_bottom"].disabled = false; + el[pre + "_left"].disabled = false; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = false; + el[pre + "_bottom_measurement"].disabled = false; + el[pre + "_left_measurement"].disabled = false; + } + } + + showDisabledControls(); +} + +function synch(fr, to) { + var f = document.forms[0]; + + f.elements[to].value = f.elements[fr].value; + + if (f.elements[fr + "_measurement"]) + selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); +} + +tinyMCEPopup.onInit.add(init); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ar_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ar_dlg.js new file mode 100644 index 00000000..b7e94843 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ar_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ar.style_dlg',{ +title:"\u062A\u0639\u062F\u064A\u0644 CSS Style", +apply:"\u062A\u0637\u0628\u064A\u0642", +text_tab:"\u0646\u0635", +background_tab:"\u0627\u0644\u062E\u0644\u0641\u064A\u0629", +block_tab:"\u0642\u0637\u0639\u0629", +box_tab:"\u0635\u0646\u062F\u0648\u0642", +border_tab:"\u0627\u0644\u062D\u062F\u0648\u062F", +list_tab:"\u0642\u0627\u0626\u0645\u0629", +positioning_tab:"\u0648\u0636\u0639", +text_props:"\u0646\u0635", +text_font:"\u062E\u0637", +text_size:"\u062D\u062C\u0645", +text_weight:"\u0639\u0631\u0636", +text_style:"\u0646\u0633\u0642", +text_variant:"\u0645\u062A\u063A\u064A\u0631", +text_lineheight:"\u0627\u0631\u062A\u0641\u0627\u0639 \u0627\u0644\u062E\u0637", +text_case:"\u062D\u0627\u0644\u0629", +text_color:"\u0627\u0644\u0644\u0648\u0646", +text_decoration:"\u0632\u062E\u0631\u0641\u0629", +text_overline:"\u0623\u0639\u0644\u0649 \u0627\u0644\u062E\u0637", +text_underline:"\u0623\u0633\u0641\u0644 \u0627\u0644\u062E\u0637", +text_striketrough:"\u062A\u0634\u0637\u064A\u0628", +text_blink:"\u0637\u0631\u0641\u0629 \u0639\u064A\u0646", +text_none:"\u0628\u0644\u0627", +background_color:"\u0644\u0648\u0646 \u0627\u0644\u062E\u0644\u0641\u064A\u0629", +background_image:"\u0635\u0648\u0631\u0629 \u0627\u0644\u062E\u0644\u0641\u064A\u0629", +background_repeat:"\u0627\u0639\u0627\u062F\u0629", +background_attachment:"\u0645\u0631\u0641\u0642", +background_hpos:"\u0627\u0644\u0648\u0636\u0639\u064A\u0629 \u0627\u0644\u0623\u0641\u0642\u064A\u0629", +background_vpos:"\u0627\u0644\u0648\u0636\u0639\u064A\u0629 \u0627\u0644\u0639\u0645\u0648\u062F\u064A\u0629", +block_wordspacing:"\u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0628\u0627\u0639\u062F\u0629", +block_letterspacing:"\u0631\u0633\u0627\u0644\u0629 \u0627\u0644\u0645\u0628\u0627\u0639\u062F\u0629", +block_vertical_alignment:"\u0627\u0644\u0645\u0648\u0627\u0621\u0645\u0629 \u0627\u0644\u0639\u0645\u0648\u062F\u064A\u0629", +block_text_align:"\u0645\u0648\u0627\u0621\u0645\u0629 \u0627\u0644\u0646\u0635", +block_text_indent:"\u0627\u0632\u0627\u062D\u0629 \u0627\u0644\u0646\u0635", +block_whitespace:"\u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0628\u064A\u0636\u0627\u0621", +block_display:"\u0627\u0644\u0639\u0631\u0636", +box_width:"\u0627\u0644\u0639\u0631\u0636", +box_height:"\u0627\u0644\u0625\u0631\u062A\u0641\u0627\u0639", +box_float:"\u0627\u0644\u0637\u0641\u0648", +box_clear:"\u0648\u0627\u0636\u062D", +padding:"\u0627\u0644\u0628\u0637\u0627\u0646\u0629", +same:"\u0646\u0641\u0633 \u0644\u0644\u0643\u0644", +top:"\u0623\u0639\u0644\u0649", +right:"\u064A\u0645\u064A\u0646", +bottom:"\u0623\u0633\u0641\u0644", +left:"\u064A\u0633\u0627\u0631", +margin:"\u0647\u0627\u0645\u0634", +style:"\u0646\u0633\u0642", +width:"\u0627\u0644\u0639\u0631\u0636", +height:"\u0627\u0644\u0625\u0631\u062A\u0641\u0627\u0639", +color:"\u0627\u0644\u0644\u0648\u0646", +list_type:"\u0646\u0648\u0639", +bullet_image:"\u0635\u0648\u0631\u0629 \u0627\u0644\u0631\u0635\u0627\u0635\u0629", +position:"\u0627\u0644\u0645\u0648\u0636\u0639", +positioning_type:"\u0627\u0644\u0646\u0648\u0639", +visibility:"\u0627\u0644\u0631\u0624\u064A\u0629", +zindex:"\u062A\u0631\u062A\u064A\u0628 \u0627\u0644\u0646\u0648\u0627\u0641\u0630 Z-index", +overflow:"\u0627\u0644\u0641\u064A\u0636", +placement:"\u0627\u0644\u0645\u0648\u0636\u0639", +clip:"\u0645\u0634\u0628\u0643" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/bg_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/bg_dlg.js new file mode 100644 index 00000000..4d1271e0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/bg_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('bg.style_dlg',{ +title:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 CSS \u0441\u0442\u0438\u043B", +apply:"\u041F\u043E\u0442\u0432\u044A\u0440\u0434\u0438", +text_tab:"\u0422\u0435\u043A\u0441\u0442", +background_tab:"\u0424\u043E\u043D", +block_tab:"\u0411\u043B\u043E\u043A", +box_tab:"\u041A\u0443\u0442\u0438\u044F", +border_tab:"\u0420\u0430\u043C\u043A\u0430", +list_tab:"\u0421\u043F\u0438\u0441\u044A\u043A", +positioning_tab:"\u041F\u043E\u0437\u0438\u0446\u0438\u043E\u043D\u0438\u0440\u0430\u043D\u0435", +text_props:"\u0422\u0435\u043A\u0441\u0442", +text_font:"\u0428\u0440\u0438\u0444\u0442", +text_size:"\u0420\u0430\u0437\u043C\u0435\u0440", +text_weight:"\u0422\u0435\u0433\u043B\u043E", +text_style:"\u0421\u0442\u0438\u043B", +text_variant:"\u041F\u0440\u043E\u043C\u0435\u043D\u043B\u0438\u0432", +text_lineheight:"\u0412\u0438\u0441\u043E\u0447\u0438\u043D\u0430 \u043D\u0430 \u0440\u0435\u0434\u0430", +text_case:"\u0420\u0435\u0433\u0438\u0441\u0442\u044A\u0440", +text_color:"\u0426\u0432\u044F\u0442", +text_decoration:"\u0414\u0435\u043A\u043E\u0440\u0430\u0446\u0438\u044F", +text_overline:"\u043D\u0430\u0434\u0447\u0435\u0440\u0442\u0430\u043D", +text_underline:"\u043F\u043E\u0434\u0447\u0435\u0440\u0442\u0430\u043D", +text_striketrough:"\u0437\u0430\u0447\u0435\u0440\u0442\u0430\u043D", +text_blink:"\u043C\u0438\u0433\u0430", +text_none:"\u043D\u0438\u0449\u043E", +background_color:"\u0424\u043E\u043D\u0438\u0432 \u0446\u0432\u044F\u0442", +background_image:"\u0424\u043E\u043D\u043E\u0432\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +background_repeat:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438", +background_attachment:"\u041F\u0440\u0438\u043A\u0440\u0435\u043F\u0438", +background_hpos:"\u0425\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u043D\u0430 \u043F\u043E\u0437\u0438\u0446\u0438\u044F", +background_vpos:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u043D\u0430 \u043F\u043E\u0437\u0438\u0446\u0438\u044F", +block_wordspacing:"\u0420\u0430\u0437\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043C\u0435\u0436\u0434\u0443 \u0434\u0443\u043C\u0438\u0442\u0435", +block_letterspacing:"\u0420\u0430\u0437\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043C\u0435\u0436\u0434\u0443 \u0431\u0443\u043A\u0432\u0438\u0442\u0435", +block_vertical_alignment:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u043D\u043E \u043F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435", +block_text_align:"\u041F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435 \u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430", +block_text_indent:"\u041E\u0442\u0441\u0442\u044A\u043F \u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430", +block_whitespace:"\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B", +block_display:"\u041F\u043E\u043A\u0430\u0437\u0432\u0430\u043D\u0435", +box_width:"\u0428\u0438\u0440\u0438\u043D\u0430", +box_height:"\u0412\u0438\u0441\u043E\u0447\u0438\u043D\u0430", +box_float:"Float", +box_clear:"\u0418\u0437\u0447\u0438\u0441\u0442\u0438", +padding:"Padding", +same:"\u0417\u0430 \u0432\u0441\u0438\u0447\u043A\u0438", +top:"\u0413\u043E\u0440\u0435", +right:"\u0414\u044F\u0441\u043D\u043E", +bottom:"\u0414\u043E\u043B\u0443", +left:"\u041B\u044F\u0432\u043E", +margin:"Margin", +style:"\u0421\u0442\u0438\u043B", +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +height:"\u0412\u0438\u0441\u043E\u0447\u0438\u043D\u0430", +color:"\u0426\u0432\u044F\u0442", +list_type:"\u0422\u0438\u043F", +bullet_image:"\u0413\u0440\u0430\u0444\u0438\u043A\u0430 \u043D\u0430 \u0432\u043E\u0434\u0430\u0447\u0438\u0442\u0435", +position:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F", +positioning_type:"\u0422\u0438\u043F", +visibility:"\u0412\u0438\u0434\u0438\u043C\u043E\u0441\u0442", +zindex:"Z-index", +overflow:"Overflow", +placement:"\u0420\u0430\u0437\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", +clip:"\u041E\u0442\u0440\u0435\u0436\u0438" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/br_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/br_dlg.js new file mode 100644 index 00000000..7d2cad01 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/br_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('br.style_dlg',{ +title:"Editar CSS", +apply:"Aplicar", +text_tab:"Texto", +background_tab:"Fundo", +block_tab:"Bloco", +box_tab:"Caixa", +border_tab:"Limites", +list_tab:"Lista", +positioning_tab:"Posicionamento", +text_props:"Texto", +text_font:"Fonte", +text_size:"Tamanho", +text_weight:"Peso", +text_style:"Estilo", +text_variant:"Variante", +text_lineheight:"Altura da linha", +text_case:"Mai\u00C3\u0083\u00C2\u00BAscula/min\u00C3\u0083\u00C2\u00BAscula", +text_color:"Cor", +text_decoration:"Decora\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +text_overline:"Sobrelinha", +text_underline:"Sublinhado", +text_striketrough:"Rasurado", +text_blink:"Piscar", +text_none:"nenhum", +background_color:"Cor de fundo", +background_image:"Imagem de fundo", +background_repeat:"Repetir", +background_attachment:"Fixar", +background_hpos:"Posi\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o horizontal", +background_vpos:"Posi\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o vertical", +block_wordspacing:"Espa\u00C3\u0083\u00C2\u00A7amento de palavras", +block_letterspacing:"Espa\u00C3\u0083\u00C2\u00A7amento de letras", +block_vertical_alignment:"Alinhamento vertical", +block_text_align:"Alinhamento de texto", +block_text_indent:"Indent", +block_whitespace:"Espa\u00C3\u0083\u00C2\u00A7o", +block_display:"Display", +box_width:"Largura", +box_height:"Altura", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"O mesmo para todos", +top:"Topo", +right:"Direita", +bottom:"Abaixo", +left:"Esquerda", +margin:"Margem", +style:"Estilo", +width:"Largura", +height:"Altura", +color:"Cor", +list_type:"Tipo", +bullet_image:"Imagem de lista", +position:"Posi\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +positioning_type:"Tipo", +visibility:"Visibilidade", +zindex:"Z-index", +overflow:"Overflow", +placement:"Posicionamento", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/bs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/bs_dlg.js new file mode 100644 index 00000000..9362342b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/bs_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('bs.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ca_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ca_dlg.js new file mode 100644 index 00000000..9a4131a2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ca_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ca.style_dlg',{ +title:"Edita l'Estil CSS", +apply:"Aplica", +text_tab:"Text", +background_tab:"Fons", +block_tab:"Bloc", +box_tab:"Caixa", +border_tab:"Vora", +list_tab:"Llista", +positioning_tab:"Posicionament", +text_props:"Text", +text_font:"Tipografia", +text_size:"Mida", +text_weight:"Pes", +text_style:"Estil", +text_variant:"Variaci\u00F3", +text_lineheight:"Al\u00E7ada de la L\u00EDnia", +text_case:"Caixa", +text_color:"Color", +text_decoration:"Decoraci\u00F3", +text_overline:"sobreratllat", +text_underline:"subratllat", +text_striketrough:"tatxat", +text_blink:"intermitent", +text_none:"cap", +background_color:"Color de fons", +background_image:"Imatge de fons", +background_repeat:"Repeteix", +background_attachment:"Adjunci\u00F3", +background_hpos:"Posici\u00F3 horitzontal", +background_vpos:"Posici\u00F3 vertical", +block_wordspacing:"Espaiat de paraules", +block_letterspacing:"Espaiat de lletres", +block_vertical_alignment:"Alineaci\u00F3 vertical", +block_text_align:"Alineaci\u00F3 del text", +block_text_indent:"Sagnat del text", +block_whitespace:"Espai en blanc", +block_display:"Mostra", +box_width:"Amplada", +box_height:"Al\u00E7ada", +box_float:"Flota", +box_clear:"Neteja", +padding:"Farciment", +same:"Igual per a tots", +top:"Dalt", +right:"Dreta", +bottom:"Baix", +left:"Esquerra", +margin:"Marge", +style:"Estil", +width:"Amplada", +height:"Al\u00E7ada", +color:"Color", +list_type:"Tipus", +bullet_image:"Imatge de pic", +position:"Posici\u00F3", +positioning_type:"Tipus", +visibility:"Visibilitat", +zindex:"Z-index", +overflow:"Sobreeiximent", +placement:"Col\u00B7locaci\u00F3", +clip:"Retall" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ch_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ch_dlg.js new file mode 100644 index 00000000..52df4067 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ch_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ch.style_dlg',{ +title:"\u7F16\u8F91CSS\u6837\u5F0F\u8868\u5355\u5355", +apply:"\u5957\u7528", +text_tab:"\u6587\u5B57", +background_tab:"\u80CC\u666F", +block_tab:"\u533A\u5757", +box_tab:"\u65B9\u5757", +border_tab:"\u8FB9\u6846", +list_tab:"\u8868\u5217", +positioning_tab:"\u4F4D\u7F6E", +text_props:"\u6587\u5B57", +text_font:"\u5B57\u578B", +text_size:"\u5927\u5C0F", +text_weight:"\u5BBD", +text_style:"\u6837\u5F0F", +text_variant:"\u53D8\u4F53", +text_lineheight:"\u884C\u9AD8", +text_case:"\u5B57\u578B", +text_color:"\u989C\u8272", +text_decoration:"\u88C5\u9970", +text_overline:"\u9876\u7EBF", +text_underline:"\u5E95\u7EBF", +text_striketrough:"\u5220\u9664\u7EBF", +text_blink:"\u95EA\u70C1", +text_none:"\u65E0", +background_color:"\u80CC\u666F\u989C\u8272", +background_image:"\u80CC\u666F\u56FE\u7247", +background_repeat:"\u91CD\u590D", +background_attachment:"\u9644\u4EF6", +background_hpos:"\u6C34\u5E73\u4F4D\u7F6E", +background_vpos:"\u5782\u76F4\u4F4D\u7F6E", +block_wordspacing:"\u8BCD\u95F4\u8DDD", +block_letterspacing:"\u5B57\u6BCD\u95F4\u8DDD", +block_vertical_alignment:"\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F", +block_text_align:"\u6587\u5B57\u5BF9\u9F50", +block_text_indent:"\u6587\u5B57\u7F29\u6392", +block_whitespace:"\u7A7A\u683C", +block_display:"\u663E\u793A", +box_width:"\u5BBD", +box_height:"\u9AD8", +box_float:"\u6D6E\u52A8", +box_clear:"\u6E05\u9664", +padding:"\u5185\u8FB9\u8DDD", +same:"\u5168\u90E8\u76F8\u540C", +top:"\u9876\u90E8", +right:"\u53F3\u4FA7", +bottom:"\u5E95\u90E8", +left:"\u5DE6\u4FA7", +margin:"\u8FB9\u754C", +style:"\u6837\u5F0F", +width:"\u5BBD", +height:"\u9AD8", +color:"\u989C\u8272", +list_type:"\u7C7B\u578B", +bullet_image:"\u5217\u5355\u56FE\u7247", +position:"\u4F4D\u7F6E", +positioning_type:"\u7C7B\u578B", +visibility:"\u53EF\u663E\u793A", +zindex:"Z-\u5750\u6807", +overflow:"\u6EA2\u51FA", +placement:"\u5E03\u7F6E", +clip:"\u526A\u8F91" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/cs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/cs_dlg.js new file mode 100644 index 00000000..a04d2965 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/cs_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('cs.style_dlg',{ +title:"Upravit CSS styl", +apply:"Pou\u017E\u00EDt", +text_tab:"Text", +background_tab:"Pozad\u00ED", +block_tab:"Blok", +box_tab:"Box", +border_tab:"Ohrani\u010Den\u00ED", +list_tab:"Seznam", +positioning_tab:"Um\u00EDst\u011Bn\u00ED", +text_props:"Text", +text_font:"Font", +text_size:"Velikost", +text_weight:"S\u00EDla textu", +text_style:"Styl textu", +text_variant:"Varianta", +text_lineheight:"Tlou\u0161\u0139\u013Dka \u010D\u00E1ry", +text_case:"P\u0159\u00EDpad", +text_color:"Barva", +text_decoration:"Dekorace", +text_overline:"nadtr\u017Een\u00ED", +text_underline:"podtr\u017Een\u00ED", +text_striketrough:"P\u0159e\u0161krtnut\u00ED", +text_blink:"blik\u00E1n\u00ED", +text_none:"\u017E\u00E1dn\u00E9", +background_color:"Barva pozad\u00ED", +background_image:"Obr\u00E1zek pozad\u00ED", +background_repeat:"Opakov\u00E1n\u00ED", +background_attachment:"P\u0159\u00EDloha", +background_hpos:"Horizont\u00E1ln\u00ED pozice", +background_vpos:"Vertik\u00E1ln\u00ED pozice", +block_wordspacing:"Rozestup slov", +block_letterspacing:"Rozestup znak\u016F", +block_vertical_alignment:"Vertik\u00E1ln\u00ED zarovn\u00E1n\u00ED", +block_text_align:"Zarovn\u00E1n\u00ED textu", +block_text_indent:"Odsazen\u00ED textu", +block_whitespace:"Pr\u00E1zdn\u00E9 mezery", +block_display:"Blokov\u00E9 zobrazen\u00ED", +box_width:"\u0160\u00ED\u0159ka", +box_height:"V\u00FD\u0161ka", +box_float:"Plovouc\u00ED", +box_clear:"Vy\u010Distit", +padding:"Odsazen\u00ED (padding)", +same:"Stejn\u00E9 pro v\u0161echny", +top:"Naho\u0159e", +right:"Vpravo", +bottom:"Dole", +left:"Vlevo", +margin:"Okraj", +style:"Styl", +width:"\u0160\u00ED\u0159ka", +height:"V\u00FD\u0161ka", +color:"Barva", +list_type:"Typ", +bullet_image:"Styl odr\u00E1\u017Eek", +position:"Pozice", +positioning_type:"Typ", +visibility:"Viditelnost", +zindex:"Z-index", +overflow:"P\u0159ete\u010Den\u00ED (overflow)", +placement:"Um\u00EDstn\u011Bni", +clip:"P\u0159ipnut\u00ED (clip)" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/da_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/da_dlg.js new file mode 100644 index 00000000..210a87a5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/da_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('da.style_dlg',{ +title:"Rediger CSS stil", +apply:"Anvend", +text_tab:"Tekst", +background_tab:"Baggrund", +block_tab:"Blok", +box_tab:"Boks", +border_tab:"Kant", +list_tab:"Liste", +positioning_tab:"Positionering", +text_props:"Tekst", +text_font:"Skrifttype", +text_size:"St\u00F8rrelse", +text_weight:"V\u00E6gt", +text_style:"Stil", +text_variant:"Variant", +text_lineheight:"Linieh\u00F8jde", +text_case:"Vesaltilstand", +text_color:"Farve", +text_decoration:"Dekoration", +text_overline:"overstreget", +text_underline:"understreget", +text_striketrough:"gennemstreget", +text_blink:"blink", +text_none:"ingen", +background_color:"Baggrundsfarve", +background_image:"Baggrundsbillede", +background_repeat:"Gentag", +background_attachment:"Vedh\u00E6ftede fil", +background_hpos:"Horisontal position", +background_vpos:"Vertikal position", +block_wordspacing:"Afstand mellem ord", +block_letterspacing:"Afstand mellem bogstaver", +block_vertical_alignment:"Vertikal justering", +block_text_align:"Tekstjustering", +block_text_indent:"Tekstindrykning", +block_whitespace:"Mellemrum", +block_display:"Vis", +box_width:"Bredde", +box_height:"H\u00F8jde", +box_float:"Flydende", +box_clear:"Ryd", +padding:"Afstand til indhold", +same:"Ens for alle", +top:"Top", +right:"H\u00F8jre", +bottom:"Bund", +left:"Venstre", +margin:"Margin", +style:"Style", +width:"Bredde", +height:"H\u00F8jde", +color:"Farve", +list_type:"Type", +bullet_image:"Punktopstillings-billede", +position:"Position", +positioning_type:"Type", +visibility:"Synlighed", +zindex:"Z-index", +overflow:"Overl\u00F8b", +placement:"Placering", +clip:"Klip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/de_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/de_dlg.js new file mode 100644 index 00000000..57a62ff9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/de_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('de.style_dlg',{ +title:"CSS-Styles bearbeiten", +apply:"\u00DCbernehmen", +text_tab:"Text", +background_tab:"Hintergrund", +block_tab:"Block", +box_tab:"Box", +border_tab:"Rahmen", +list_tab:"Liste", +positioning_tab:"Positionierung", +text_props:"Text", +text_font:"Schriftart", +text_size:"Gr\u00F6\u00DFe", +text_weight:"Dicke", +text_style:"Stil", +text_variant:"Variante", +text_lineheight:"Zeilenh\u00F6he", +text_case:"Schreibung", +text_color:"Farbe", +text_decoration:"Gestaltung", +text_overline:"\u00FCberstrichen", +text_underline:"unterstrichen", +text_striketrough:"durchgestrichen", +text_blink:"blinkend", +text_none:"keine", +background_color:"Hintergrundfarbe", +background_image:"Hintergrundbild", +background_repeat:"Wiederholung", +background_attachment:"Wasserzeicheneffekt", +background_hpos:"Position X", +background_vpos:"Position Y", +block_wordspacing:"Wortabstand", +block_letterspacing:"Buchstabenabstand", +block_vertical_alignment:"Vertikale Ausrichtung", +block_text_align:"Ausrichtung", +block_text_indent:"Einr\u00FCckung", +block_whitespace:"Automatischer Umbruch", +block_display:"Umbruchverhalten", +box_width:"Breite", +box_height:"H\u00F6he", +box_float:"Umflie\u00DFung", +box_clear:"Umflie\u00DFung verhindern", +padding:"Innerer Abstand", +same:"Alle gleich", +top:"Oben", +right:"Rechts", +bottom:"Unten", +left:"Links", +margin:"\u00C4u\u00DFerer Abstand", +style:"Format", +width:"Breite", +height:"H\u00F6he", +color:"Textfarbe", +list_type:"Listenpunkt-Art", +bullet_image:"Listenpunkt-Grafik", +position:"Positionierung", +positioning_type:"Art der Positionierung", +visibility:"Sichtbar", +zindex:"Z-Wert", +overflow:"Verhalten bei \u00DCbergr\u00F6\u00DFe", +placement:"Platzierung", +clip:"Ausschnitt" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/dv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/dv_dlg.js new file mode 100644 index 00000000..6ea606fd --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/dv_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('dv.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/el_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/el_dlg.js new file mode 100644 index 00000000..b7a2debc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/el_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('el.style_dlg',{ +title:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03A3\u03C4\u03C5\u03BB CSS", +apply:"\u0395\u03C6\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE", +text_tab:"\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF", +background_tab:"\u03A6\u03CC\u03BD\u03C4\u03BF", +block_tab:"\u039C\u03C0\u03BB\u03BF\u03BA", +box_tab:"\u039A\u03BF\u03C5\u03C4\u03AF", +border_tab:"\u03A0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF", +list_tab:"\u039B\u03AF\u03C3\u03C4\u03B1", +positioning_tab:"\u03A4\u03BF\u03C0\u03BF\u03B8\u03AD\u03C4\u03B7\u03C3\u03B7", +text_props:"\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF", +text_font:"\u0393\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC", +text_size:"\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AC\u03C4\u03C9\u03BD", +text_weight:"\u0392\u03AC\u03C1\u03BF\u03C2", +text_style:"\u03A3\u03C4\u03C5\u03BB", +text_variant:"\u03A0\u03B1\u03C1\u03B1\u03BB\u03BB\u03B1\u03B3\u03AE", +text_lineheight:"\u038E\u03C8\u03BF\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2", +text_case:"\u039A\u03B5\u03C6./\u039C\u03B9\u03BA\u03C1\u03AC", +text_color:"\u03A7\u03C1\u03CE\u03BC\u03B1", +text_decoration:"\u0394\u03B9\u03B1\u03BA\u03CC\u03C3\u03BC\u03B7\u03C3\u03B7", +text_overline:"\u03A5\u03C0\u03B5\u03C1\u03B3\u03C1\u03AC\u03BC\u03BC\u03B9\u03C3\u03B7", +text_underline:"\u03A5\u03C0\u03BF\u03B3\u03C1\u03AC\u03BC\u03BC\u03B9\u03C3\u03B7", +text_striketrough:"\u0394\u03B9\u03B1\u03B3\u03C1\u03AC\u03BC\u03BC\u03B9\u03C3\u03B7", +text_blink:"\u039D\u03B1 \u03B1\u03BD\u03B1\u03B2\u03BF\u03C3\u03B2\u03AE\u03BD\u03B5\u03B9", +text_none:"\u039A\u03B1\u03BC\u03AF\u03B1", +background_color:"\u03A7\u03C1\u03CE\u03BC\u03B1 \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5", +background_image:"\u0395\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5", +background_repeat:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7", +background_attachment:"\u03A0\u03C1\u03BF\u03C3\u03AC\u03C1\u03C4\u03B7\u03BC\u03B1", +background_hpos:"\u039F\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B1 \u03B8\u03AD\u03C3\u03B7", +background_vpos:"\u039A\u03B1\u03C4\u03B1\u03BA\u03CC\u03C1\u03C5\u03C6\u03B7 \u03B8\u03AD\u03C3\u03B7", +block_wordspacing:"\u0391\u03C0\u03CC\u03C3\u03C4\u03B1\u03C3\u03B7 \u03BB\u03AD\u03BE\u03B5\u03C9\u03BD", +block_letterspacing:"\u0391\u03C0\u03CC\u03C3\u03C4\u03B1\u03C3\u03B7 \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03C9\u03BD", +block_vertical_alignment:"\u039A\u03B1\u03C4\u03B1\u03BA\u03CC\u03C1\u03C5\u03C6\u03B7 \u03C3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7", +block_text_align:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5", +block_text_indent:"\u0395\u03C3\u03BF\u03C7\u03AE \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5", +block_whitespace:"\u039A\u03B5\u03BD\u03CC\u03C2 \u03C7\u03CE\u03C1\u03BF\u03C2", +block_display:"\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7", +box_width:"\u03A0\u03BB\u03AC\u03C4\u03BF\u03C2", +box_height:"\u038E\u03C8\u03BF\u03C2", +box_float:"Float", +box_clear:"Clear", +padding:"\u0393\u03AD\u03BC\u03B9\u03C3\u03BC\u03B1", +same:"\u038A\u03B4\u03B9\u03BF \u03B3\u03B9\u03B1 \u03CC\u03BB\u03B1", +top:"\u03A0\u03AC\u03BD\u03C9", +right:"\u0394\u03B5\u03BE\u03B9\u03AC", +bottom:"\u039A\u03AC\u03C4\u03C9", +left:"\u0391\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +margin:"\u03A0\u03B5\u03C1\u03B9\u03B8\u03CE\u03C1\u03B9\u03BF", +style:"\u03A3\u03C4\u03C5\u03BB", +width:"\u03A0\u03BB\u03AC\u03C4\u03BF\u03C2", +height:"\u038E\u03C8\u03BF\u03C2", +color:"\u03A7\u03C1\u03CE\u03BC\u03B1", +list_type:"\u03A4\u03CD\u03C0\u03BF\u03C2", +bullet_image:"\u0395\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03AF\u03B1\u03C2", +position:"\u0398\u03AD\u03C3\u03B7", +positioning_type:"\u03A4\u03CD\u03C0\u03BF\u03C2", +visibility:"\u039F\u03C1\u03B1\u03C4\u03CC\u03C4\u03B7\u03C4\u03B1", +zindex:"Z-index", +overflow:"\u03A5\u03C0\u03B5\u03C1\u03C7\u03B5\u03AF\u03BB\u03B9\u03C3\u03B7", +placement:"\u03A4\u03BF\u03C0\u03BF\u03B8\u03AD\u03C4\u03B7\u03C3\u03B7", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js new file mode 100644 index 00000000..5026313e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('en.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/es_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/es_dlg.js new file mode 100644 index 00000000..abf4b1db --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/es_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('es.style_dlg',{ +title:"Editar Estilo CSS", +apply:"Aplicar", +text_tab:"Texto", +background_tab:"Fondo", +block_tab:"Bloque", +box_tab:"Caja", +border_tab:"Borde", +list_tab:"Lista", +positioning_tab:"Posici\u00F3n", +text_props:"Texto", +text_font:"Fuente", +text_size:"Tama\u00F1o", +text_weight:"Peso", +text_style:"Estilo", +text_variant:"Variante", +text_lineheight:"Ancho de la fila", +text_case:"Min\u00FAs./May\u00FAs.", +text_color:"Color", +text_decoration:"Decorativos", +text_overline:"Subrayado superior", +text_underline:"Subrayado", +text_striketrough:"Tachado", +text_blink:"Parpadeo", +text_none:"Ninguno", +background_color:"Color de fondo", +background_image:"Imagen de fondo", +background_repeat:"Repetici\u00F3n", +background_attachment:"Adjunto", +background_hpos:"Posici\u00F3n horizontal", +background_vpos:"Posici\u00F3n vertical", +block_wordspacing:"Espacio entre palabra", +block_letterspacing:"Espacio entre letra", +block_vertical_alignment:"Alineaci\u00F3n vertical", +block_text_align:"Alineaci\u00F3n del texto", +block_text_indent:"Sangr\u00EDa", +block_whitespace:"Espacio en blanco", +block_display:"Display", +box_width:"Ancho", +box_height:"Alto", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Lo mismo en todos", +top:"Arriba", +right:"Derecha", +bottom:"Debajo", +left:"Izquierda", +margin:"Margen", +style:"Estilo", +width:"Ancho", +height:"Alto", +color:"Color", +list_type:"Tipo", +bullet_image:"Imagen de la vi\u00F1eta", +position:"Posici\u00F3n", +positioning_type:"Tipo", +visibility:"Visibilidad", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/et_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/et_dlg.js new file mode 100644 index 00000000..85ffd292 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/et_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('et.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fa_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fa_dlg.js new file mode 100644 index 00000000..4c634364 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fa_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('fa.style_dlg',{ +title:"\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0627\u0633\u062A\u06CC\u0644 CSS", +apply:"\u0628\u0643\u0627\u0631\u06AF\u06CC\u0631\u06CC", +text_tab:"\u0645\u062A\u0646", +background_tab:"\u0632\u0645\u06CC\u0646\u0647", +block_tab:"\u0628\u0644\u0648\u0643", +box_tab:"\u062C\u0639\u0628\u0647", +border_tab:"\u062D\u0627\u0634\u06CC\u0647", +list_tab:"\u0644\u06CC\u0633\u062A", +positioning_tab:"\u0645\u0648\u0642\u0639\u06CC\u062A", +text_props:"\u0645\u062A\u0646", +text_font:"\u0642\u0644\u0645", +text_size:"\u0627\u0646\u062F\u0627\u0632\u0647", +text_weight:"\u062D\u0627\u0644\u062A", +text_style:"\u0627\u0633\u062A\u06CC\u0644", +text_variant:"\u0646\u0648\u0639 \u062A\u063A\u06CC\u06CC\u0631", +text_lineheight:"\u0628\u0644\u0646\u062F\u06CC \u062E\u0637", +text_case:"\u062D\u0627\u0644\u062A", +text_color:"\u0631\u0646\u06AF", +text_decoration:"\u0622\u0631\u0627\u06CC\u0634", +text_overline:"\u0628\u0627\u0644\u0627 \u062E\u0637", +text_underline:"\u0632\u06CC\u0631 \u062E\u0637", +text_striketrough:"\u062E\u0637 \u0648\u0633\u0637", +text_blink:"\u0686\u0634\u0645\u0643 \u0632\u0646", +text_none:"\u0647\u06CC\u0686 \u0643\u062F\u0627\u0645", +background_color:"\u0631\u0646\u06AF \u0632\u0645\u06CC\u0646\u0647", +background_image:"\u062A\u0635\u0648\u06CC\u0631 \u0632\u0645\u06CC\u0646\u0647", +background_repeat:"\u062A\u0643\u0631\u0627\u0631", +background_attachment:"\u0632\u0645\u06CC\u0645\u0647", +background_hpos:"\u0645\u0648\u0642\u0639\u06CC\u062A \u0627\u0641\u0642\u06CC", +background_vpos:"\u0645\u0648\u0642\u0639\u06CC\u062A \u0639\u0645\u0648\u062F\u06CC", +block_wordspacing:"\u0641\u0627\u0635\u0644\u0647 \u0643\u0644\u0645\u0627\u062A", +block_letterspacing:"\u0641\u0627\u0635\u0644\u0647 \u062D\u0631\u0648\u0641", +block_vertical_alignment:"\u062A\u0631\u0627\u0632 \u0639\u0645\u0648\u062F\u06CC", +block_text_align:"\u062A\u0631\u0627\u0632 \u0645\u062A\u0646", +block_text_indent:"\u062A\u0648\u0631\u0641\u062A\u06AF\u06CC \u0645\u062A\u0646", +block_whitespace:"\u0641\u0627\u0635\u0644\u0647 \u0633\u0641\u06CC\u062F", +block_display:"\u0646\u0645\u0627\u06CC\u0634", +box_width:"\u067E\u0647\u0646\u0627", +box_height:"\u0627\u0631\u062A\u0641\u0627\u0639", +box_float:"\u0634\u0646\u0627\u0648\u0631", +box_clear:"\u067E\u0627\u0643 \u0633\u0627\u0632\u06CC", +padding:"\u0644\u0627\u06CC\u0647 \u06AF\u0630\u0627\u0631\u06CC", +same:"\u0647\u0645\u0633\u0627\u0646 \u0628\u0631\u0627\u06CC \u0647\u0645\u0647", +top:"\u0628\u0627\u0644\u0627", +right:"\u0631\u0627\u0633\u062A", +bottom:"\u067E\u0627\u06CC\u06CC\u0646", +left:"\u0686\u067E", +margin:"\u062D\u0627\u0634\u06CC\u0647", +style:"\u0627\u0633\u062A\u06CC\u0644", +width:"\u067E\u0647\u0646\u0627", +height:"\u0627\u0631\u062A\u0641\u0627\u0639", +color:"\u0631\u0646\u06AF", +list_type:"\u0646\u0648\u0639", +bullet_image:"\u062A\u0635\u0648\u06CC\u0631 \u06AF\u0644\u0648\u0644\u0647", +position:"\u0645\u0648\u0642\u0639\u06CC\u062A", +positioning_type:"\u0646\u0648\u0639", +visibility:"\u0642\u0627\u0628\u0644\u06CC\u062A \u0631\u0648\u06CC\u062A", +zindex:"\u0645\u062D\u0648\u0631 Z", +overflow:"\u0633\u0631 \u0631\u06CC\u0632", +placement:"\u0645\u0648\u0642\u0639\u06CC\u062A \u0645\u0643\u0627\u0646\u06CC", +clip:"\u0628\u0631\u0634 (Clip)" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fi_dlg.js new file mode 100644 index 00000000..c04fb042 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fi_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('fi.style_dlg',{ +title:"Muokkaa CSS tyyli\u00E4", +apply:"K\u00E4yt\u00E4", +text_tab:"Teksti", +background_tab:"Tausta", +block_tab:"Palkki", +box_tab:"Laatikko", +border_tab:"Kehys", +list_tab:"Lista", +positioning_tab:"Sijainti", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Sama kaikille", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fr_dlg.js new file mode 100644 index 00000000..d4ddea7b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/fr_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('fr.style_dlg',{ +title:"\u00C9diter la feuille de style CSS", +apply:"Appliquer", +text_tab:"Texte", +background_tab:"Fond", +block_tab:"Bloc", +box_tab:"Bo\u00EEte", +border_tab:"Bordure", +list_tab:"Liste", +positioning_tab:"Positionement", +text_props:"Texte", +text_font:"Police", +text_size:"Taille", +text_weight:"Poids", +text_style:"Style", +text_variant:"Variante", +text_lineheight:"Hauteur de ligne", +text_case:"Casse", +text_color:"Couleur", +text_decoration:"D\u00E9coration", +text_overline:"surlign\u00E9", +text_underline:"soulign\u00E9", +text_striketrough:"barr\u00E9", +text_blink:"clignotant", +text_none:"aucun", +background_color:"Couleur de fond", +background_image:"Image de fond", +background_repeat:"R\u00E9p\u00E9ter", +background_attachment:"Attachement", +background_hpos:"Position horizontale", +background_vpos:"Position verticale", +block_wordspacing:"Espacement des mots ", +block_letterspacing:"Espacement des lettres", +block_vertical_alignment:"Alignement vertical", +block_text_align:"Alignement du texte", +block_text_indent:"Indentation du texte", +block_whitespace:"Fin de ligne", +block_display:"Affichage", +box_width:"Largeur", +box_height:"Hauteur", +box_float:"Flottant", +box_clear:"Vider", +padding:"Espacement", +same:"Identique pour tous", +top:"Haut", +right:"Droit", +bottom:"Bas", +left:"Gauche", +margin:"Marge", +style:"Style", +width:"Largeur", +height:"Hauter", +color:"Couleur", +list_type:"Type", +bullet_image:"Image de puce", +position:"Position", +positioning_type:"Type", +visibility:"Visibilit\u00E9", +zindex:"Z-index", +overflow:"D\u00E9bordement", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/gl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/gl_dlg.js new file mode 100644 index 00000000..83d83d2b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/gl_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('gl.style_dlg',{ +title:"Editar Estilo CSS", +apply:"Aplicar", +text_tab:"Texto", +background_tab:"Fondo", +block_tab:"Bloque", +box_tab:"Caixa", +border_tab:"Borde", +list_tab:"Lista", +positioning_tab:"Posici\u00F3n", +text_props:"Texto", +text_font:"Fonte", +text_size:"Tama\u00F1o", +text_weight:"Peso", +text_style:"Estilo", +text_variant:"Variante", +text_lineheight:"Ancho da fila", +text_case:"Min\u00FAs./May\u00FAs.", +text_color:"Cor", +text_decoration:"Decorativos", +text_overline:"Li\u00F1a superior", +text_underline:"Suli\u00F1ado", +text_striketrough:"Tachado", +text_blink:"Parpadeo", +text_none:"Neng\u00FAn", +background_color:"Cor de fondo", +background_image:"Imaxe de fondo", +background_repeat:"Repetir", +background_attachment:"Adxunto", +background_hpos:"Posici\u00F3n horizontal", +background_vpos:"Posici\u00F3n vertical", +block_wordspacing:"Espacio entre verbas", +block_letterspacing:"Espacio entre letras", +block_vertical_alignment:"Ali\u00F1aci\u00F3n vertical", +block_text_align:"Ali\u00F1aci\u00F3n do texto", +block_text_indent:"Sangr\u00EDa", +block_whitespace:"Espacio en branco", +block_display:"Display", +box_width:"Ancho", +box_height:"Alto", +box_float:"Float", +box_clear:"Limpar", +padding:"Recheo", +same:"O mesmo en todos", +top:"Arriba", +right:"Dereita", +bottom:"Abaixo", +left:"Esquerda", +margin:"Marxe", +style:"Estilo", +width:"Ancho", +height:"Alto", +color:"Cor", +list_type:"Tipo", +bullet_image:"Imaxe da vi\u00F1eta", +position:"Posici\u00F3n", +positioning_type:"Tipo", +visibility:"Visibilidade", +zindex:"\u00CDndize Z", +overflow:"Desbodramento", +placement:"Colocaci\u00F3n", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/he_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/he_dlg.js new file mode 100644 index 00000000..305342c9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/he_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('he.style_dlg',{ +title:"\u05E2\u05D3\u05DB\u05D5\u05DF \u05D4\u05D2\u05D3\u05E8\u05D5\u05EA CSS", +apply:"\u05D4\u05D7\u05DC", +text_tab:"Text", +background_tab:"\u05E8\u05E7\u05E2", +block_tab:"\u05D7\u05E1\u05D5\u05DD", +box_tab:"\u05E7\u05D5\u05E4\u05E1\u05D0", +border_tab:"\u05D2\u05D1\u05D5\u05DC", +list_tab:"\u05E8\u05E9\u05D9\u05DE\u05D4", +positioning_tab:"\u05DE\u05D9\u05E7\u05D5\u05DD", +text_props:"Text", +text_font:"\u05E4\u05D5\u05E0\u05D8", +text_size:"\u05D2\u05D5\u05D3\u05DC", +text_weight:"Weight", +text_style:"\u05E1\u05D2\u05E0\u05D5\u05DF", +text_variant:"Variant", +text_lineheight:"\u05D2\u05D5\u05D1\u05D4 \u05E9\u05D5\u05E8\u05D4", +text_case:"Case", +text_color:"\u05E6\u05D1\u05E2", +text_decoration:"\u05E2\u05D9\u05E6\u05D5\u05D1", +text_overline:"\u05E9\u05D5\u05E8\u05D4 \u05DE\u05E2\u05DC", +text_underline:"\u05E9\u05D5\u05E8\u05D4 \u05DE\u05EA\u05D7\u05EA", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"\u05E6\u05D1\u05E2 \u05E8\u05E7\u05E2", +background_image:"\u05EA\u05DE\u05D5\u05E0\u05EA \u05E8\u05E7\u05E2", +background_repeat:"\u05D7\u05D6\u05D5\u05E8", +background_attachment:"\u05E7\u05D1\u05E6\u05D9\u05DD \u05DE\u05E6\u05D5\u05E8\u05E4\u05D9\u05DD", +background_hpos:"\u05DE\u05D9\u05E7\u05D5\u05DD \u05D0\u05D5\u05E4\u05E7\u05D9", +background_vpos:"\u05DE\u05D9\u05E7\u05D5\u05DD \u05E8\u05D5\u05D7\u05D1\u05D9", +block_wordspacing:"\u05DE\u05E8\u05D7\u05E7 \u05D1\u05D9\u05DF \u05DE\u05D9\u05DC\u05D9\u05DD", +block_letterspacing:"\u05DE\u05E8\u05D7\u05E7 \u05D1\u05D9\u05DF \u05D0\u05D5\u05EA\u05D9\u05D5\u05EA", +block_vertical_alignment:"Vertical alignment", +block_text_align:"\u05DE\u05D9\u05E7\u05D5\u05DD \u05D8\u05E7\u05E1\u05D8", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"\u05D4\u05E6\u05D2", +box_width:"\u05E8\u05D5\u05D7\u05D1", +box_height:"\u05D2\u05D5\u05D1\u05D4", +box_float:"Float", +box_clear:"\u05E0\u05E7\u05D4", +padding:"Padding", +same:"\u05D0\u05D5\u05EA\u05D5 \u05D3\u05D1\u05E8 \u05E2\u05D1\u05D5\u05E8 \u05DB\u05D5\u05DC\u05DD", +top:"\u05E2\u05DC\u05D9\u05D5\u05DF", +right:"\u05D9\u05DE\u05D9\u05DF", +bottom:"\u05EA\u05D7\u05EA\u05D9\u05EA", +left:"\u05E9\u05DE\u05D0\u05DC", +margin:"Margin", +style:"\u05E1\u05D2\u05E0\u05D5\u05DF", +width:"\u05E8\u05D5\u05D7\u05D1", +height:"\u05D2\u05D5\u05D1\u05D4", +color:"\u05E6\u05D1\u05E2", +list_type:"\u05E1\u05D5\u05D2", +bullet_image:"Bullet image", +position:"\u05DE\u05D9\u05E7\u05D5\u05DD", +positioning_type:"\u05E1\u05D5\u05D2", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"\u05DE\u05D9\u05E7\u05D5\u05DD", +clip:"\u05E7\u05DC\u05D9\u05E4" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/hr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/hr_dlg.js new file mode 100644 index 00000000..e7515dfa --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/hr_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('hr.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/hu_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/hu_dlg.js new file mode 100644 index 00000000..580d0e8c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/hu_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('hu.style_dlg',{ +title:"CSS st\u00EDlus szerkest\u00E9se", +apply:"Alkalmaz", +text_tab:"Sz\u00F6veg", +background_tab:"H\u00E1tt\u00E9r", +block_tab:"Blokk", +box_tab:"Doboz", +border_tab:"Keret", +list_tab:"Lista", +positioning_tab:"Poz\u00EDci\u00F3", +text_props:"Sz\u00F6veg", +text_font:"Bet\u0171t\u00EDpus", +text_size:"M\u00E9ret", +text_weight:"Sz\u00E9less\u00E9g", +text_style:"St\u00EDlus", +text_variant:"V\u00E1ltozat", +text_lineheight:"Sormagass\u00E1g", +text_case:"eset", +text_color:"sz\u00EDn", +text_decoration:"dekor\u00E1ci\u00F3", +text_overline:"fel\u00FClh\u00FAz\u00E1s", +text_underline:"alulh\u00FAz\u00E1s", +text_striketrough:"\u00E1th\u00FAz\u00E1s", +text_blink:"villog\u00E1s", +text_none:"egyik sem", +background_color:"H\u00E1tt\u00E9rsz\u00EDn", +background_image:"H\u00E1tt\u00E9rk\u00E9p", +background_repeat:"Ism\u00E9tl\u00E9s", +background_attachment:"Csatolm\u00E1ny", +background_hpos:"V\u00EDzszintes hely", +background_vpos:"F\u00FCgg\u0151leges hely", +block_wordspacing:"Sz\u00F3t\u00E1vols\u00E1g", +block_letterspacing:"Bet\u0171t\u00E1vols\u00E1g", +block_vertical_alignment:"F\u00FCgg\u0151leges igaz\u00EDt\u00E1s", +block_text_align:"Sz\u00F6veg igaz\u00EDt\u00E1sa", +block_text_indent:"Sz\u00F6veg beh\u00FAz\u00E1sa", +block_whitespace:"\u00DCres helyek", +block_display:"Megjelen\u00EDt\u00E9s", +box_width:"Sz\u00E9less\u00E9g", +box_height:"Magass\u00E1g", +box_float:"Lebeg\u00E9s (float)", +box_clear:"Lebeg\u00E9s (float) t\u00F6rl\u00E9se", +padding:"Bels\u0151 marg\u00F3", +same:"Mindenhol ugyanaz", +top:"Fel\u00FCl", +right:"Jobbra", +bottom:"Lent", +left:"Balra", +margin:"Marg\u00F3", +style:"St\u00EDlus", +width:"Sz\u00E9less\u00E9g", +height:"Magass\u00E1g", +color:"Sz\u00EDn", +list_type:"T\u00EDpus", +bullet_image:"Elemk\u00E9p", +position:"Poz\u00EDci\u00F3", +positioning_type:"T\u00EDpus", +visibility:"L\u00E1that\u00F3s\u00E1g", +zindex:"Z-index", +overflow:"Kifut\u00E1s", +placement:"Elhelyez\u00E9s", +clip:"Lev\u00E1g\u00E1s" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ia_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ia_dlg.js new file mode 100644 index 00000000..59fe26b2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ia_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ia.style_dlg',{ +title:"\u7F16\u8F91 CSS \u6837\u5F0F\u8868", +apply:"\u5E94\u7528", +text_tab:"\u6587\u5B57", +background_tab:"\u80CC\u666F", +block_tab:"\u533A\u5757", +box_tab:"\u76D2\u6A21\u578B", +border_tab:"\u8FB9\u6846", +list_tab:"\u5217\u8868", +positioning_tab:"\u4F4D\u7F6E", +text_props:"\u6587\u5B57", +text_font:"\u5B57\u4F53", +text_size:"\u5927\u5C0F", +text_weight:"\u5BBD\u5EA6", +text_style:"\u6837\u5F0F", +text_variant:"\u53D8\u4F53", +text_lineheight:"\u884C\u9AD8", +text_case:"\u5B57\u4F53", +text_color:"\u989C\u8272", +text_decoration:"\u88C5\u9970", +text_overline:"\u4E0A\u5212\u7EBF", +text_underline:"\u5E95\u7EBF", +text_striketrough:"\u4E2D\u5212\u7EBF", +text_blink:"\u95EA\u70C1", +text_none:"\u65E0", +background_color:"\u80CC\u666F\u989C\u8272", +background_image:"\u80CC\u666F\u56FE\u7247", +background_repeat:"\u91CD\u590D", +background_attachment:"\u9644\u4EF6", +background_hpos:"\u6C34\u5E73\u4F4D\u7F6E", +background_vpos:"\u5782\u76F4\u4F4D\u7F6E", +block_wordspacing:"\u8BCD\u95F4\u8DDD", +block_letterspacing:"\u5B57\u6BCD\u95F4\u8DDD", +block_vertical_alignment:"\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F", +block_text_align:"\u6587\u5B57\u5BF9\u9F50", +block_text_indent:"\u6587\u5B57\u7F29\u8FDB", +block_whitespace:"\u7A7A\u683C", +block_display:"\u663E\u793A\u65B9\u5F0F", +box_width:"\u5BBD\u5EA6", +box_height:"\u9AD8\u5EA6", +box_float:"\u6D6E\u52A8", +box_clear:"\u6E05\u9664", +padding:"\u5185\u8FB9\u8DDD", +same:"\u5168\u90E8\u76F8\u540C", +top:"\u9876\u90E8", +right:"\u53F3\u4FA7", +bottom:"\u5E95\u90E8", +left:"\u5DE6\u4FA7", +margin:"\u8FB9\u8DDD", +style:"\u6837\u5F0F", +width:"\u5BBD\u5EA6", +height:"\u9AD8\u5EA6", +color:"\u989C\u8272", +list_type:"\u5217\u8868\u7C7B\u578B", +bullet_image:"\u6E05\u5355\u56FE\u7247", +position:"\u56FE\u7247\u4F4D\u7F6E", +positioning_type:"\u4F4D\u7F6E\u7C7B\u578B", +visibility:"\u662F\u5426\u53EF\u89C1", +zindex:"Z\u5750\u6807", +overflow:"\u6EA2\u51FA", +placement:"\u5E03\u7F6E", +clip:"\u526A\u8F91" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ii_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ii_dlg.js new file mode 100644 index 00000000..7b57bc48 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ii_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ii.style_dlg',{ +title:"\u7F16\u8F91 CSS \u6837\u5F0F\u8868\u5355", +apply:"\u5957\u7528", +text_tab:"\u6587\u5B57", +background_tab:"\u80CC\u666F", +block_tab:"\u533A\u5757", +box_tab:"\u65B9\u5757", +border_tab:"\u8FB9\u6846", +list_tab:"\u8868\u5217", +positioning_tab:"\u4F4D\u7F6E", +text_props:"\u6587\u5B57", +text_font:"\u5B57\u578B", +text_size:"\u5927\u5C0F", +text_weight:"\u5BBD", +text_style:"\u6837\u5F0F", +text_variant:"\u53D8\u4F53", +text_lineheight:"\u884C\u9AD8", +text_case:"\u5B57\u578B", +text_color:"\u989C\u8272", +text_decoration:"\u88C5\u9970", +text_overline:"\u9876\u7EBF", +text_underline:"\u5E95\u7EBF", +text_striketrough:"\u5220\u9664\u7EBF", +text_blink:"\u95EA\u70C1", +text_none:"\u65E0", +background_color:"\u80CC\u666F\u989C\u8272", +background_image:"\u80CC\u666F\u56FE\u6863", +background_repeat:"\u91CD\u590D", +background_attachment:"\u9644\u4EF6", +background_hpos:"\u6C34\u5E73\u4F4D\u7F6E", +background_vpos:"\u5782\u76F4\u4F4D\u7F6E", +block_wordspacing:"\u8BCD\u95F4\u8DDD", +block_letterspacing:"\u5B57\u6BCD\u95F4\u8DDD", +block_vertical_alignment:"\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F", +block_text_align:"\u6587\u5B57\u5BF9\u9F50", +block_text_indent:"\u6587\u5B57\u7F29\u6392", +block_whitespace:"\u7A7A\u683C", +block_display:"\u663E\u793A", +box_width:"\u5BBD", +box_height:"\u9AD8", +box_float:"\u6D6E\u52A8", +box_clear:"\u6E05\u9664", +padding:"\u5185\u8FB9\u8DDD", +same:"\u5168\u90E8\u76F8\u540C", +top:"\u9876\u90E8", +right:"\u53F3\u4FA7", +bottom:"\u5E95\u90E8", +left:"\u5DE6\u4FA7", +margin:"\u8FB9\u754C", +style:"\u6837\u5F0F", +width:"\u5BBD", +height:"\u9AD8", +color:"\u989C\u8272", +list_type:"\u7C7B\u578B", +bullet_image:"\u5217\u5355\u56FE\u6863", +position:"\u4F4D\u7F6E", +positioning_type:"\u7C7B\u578B", +visibility:"\u53EF\u663E\u793A", +zindex:"Z-\u5750\u6807", +overflow:"\u6EA2\u51FA", +placement:"\u5E03\u7F6E", +clip:"\u526A\u8F91" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/is_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/is_dlg.js new file mode 100644 index 00000000..8a9aac5b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/is_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('is.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/it_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/it_dlg.js new file mode 100644 index 00000000..ad983ed8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/it_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('it.style_dlg',{ +title:"Modifica stile CSS", +apply:"Applica", +text_tab:"Testo", +background_tab:"Sfondo", +block_tab:"Blocco", +box_tab:"Contenitore", +border_tab:"Bordi", +list_tab:"Liste", +positioning_tab:"Posizionamento", +text_props:"Testo", +text_font:"Carattere", +text_size:"Dimensione", +text_weight:"Spessore", +text_style:"Stile", +text_variant:"Variante", +text_lineheight:"Altezza linea", +text_case:"Tipo", +text_color:"Colore", +text_decoration:"Decorazione", +text_overline:"sopralineato", +text_underline:"sottolineato", +text_striketrough:"barrato", +text_blink:"lampeggiante", +text_none:"nessuna", +background_color:"Colore sfondo", +background_image:"Immagine sfondo", +background_repeat:"Repetizione", +background_attachment:"Allegato", +background_hpos:"Posizione orizzontale", +background_vpos:"Posizione verticale", +block_wordspacing:"Spaziatura parole", +block_letterspacing:"Spaziatura caratteri", +block_vertical_alignment:"Allineamento verticale", +block_text_align:"Allineamento testo", +block_text_indent:"Indentazione testo", +block_whitespace:"Whitespace", +block_display:"Visualizzazione", +box_width:"Larghezza", +box_height:"Altezza", +box_float:"Float", +box_clear:"Clear", +padding:"Spazio dal bordo", +same:"Uguale per tutti", +top:"Superiore", +right:"Destro", +bottom:"Inferiore", +left:"Sinistro", +margin:"Margine", +style:"Stile", +width:"Larghezza", +height:"Altezza", +color:"Colore", +list_type:"Tipo", +bullet_image:"Immagine bullet", +position:"Posizione", +positioning_type:"Tipo", +visibility:"Visibilit\u00E0", +zindex:"Z-index", +overflow:"Overflow", +placement:"Piazzamento", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ja_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ja_dlg.js new file mode 100644 index 00000000..7cdbee03 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ja_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ja.style_dlg',{ +title:"CSS\u7DE8\u96C6", +apply:"\u9069\u7528", +text_tab:"\u6587\u5B57", +background_tab:"\u80CC\u666F", +block_tab:"\u30D6\u30ED\u30C3\u30AF", +box_tab:"\u30DC\u30C3\u30AF\u30B9", +border_tab:"\u67A0\u7DDA", +list_tab:"\u30EA\u30B9\u30C8", +positioning_tab:"\u30DD\u30B8\u30B7\u30E7\u30F3", +text_props:"Text", +text_font:"\u30D5\u30A9\u30F3\u30C8", +text_size:"\u30B5\u30A4\u30BA", +text_weight:"\u592A\u3055", +text_style:"\u30B9\u30BF\u30A4\u30EB", +text_variant:"\u5909\u5F62", +text_lineheight:"\u884C\u9AD8\u3055", +text_case:"\u5927\u6587\u5B57/\u5C0F\u6587\u5B57", +text_color:"\u8272", +text_decoration:"\u88C5\u98FE", +text_overline:"\u4E0A\u7DDA", +text_underline:"\u4E0B\u7DDA", +text_striketrough:"\u6253\u6D88\u3057\u7DDA", +text_blink:"\u70B9\u6EC5", +text_none:"\u306A\u3057", +background_color:"\u80CC\u666F\u8272", +background_image:"\u80CC\u666F\u753B\u50CF", +background_repeat:"\u7E70\u308A\u8FD4\u3057", +background_attachment:"Attachment", +background_hpos:"\u6C34\u5E73\u4F4D\u7F6E", +background_vpos:"\u5782\u76F4\u4F4D\u7F6E", +block_wordspacing:"\u5358\u8A9E\u611F\u899A", +block_letterspacing:"\u6587\u5B57\u9593\u9694", +block_vertical_alignment:"\u5782\u76F4\u914D\u7F6E", +block_text_align:"\u6C34\u5E73\u914D\u7F6E", +block_text_indent:"\u30A4\u30F3\u30C7\u30F3\u30C8", +block_whitespace:"\u7A7A\u767D\u6587\u5B57", +block_display:"\u30C7\u30A3\u30B9\u30D7\u30EC\u30A4", +box_width:"\u5E45", +box_height:"\u9AD8\u3055", +box_float:"\u56DE\u308A\u8FBC\u307F", +box_clear:"\u56DE\u308A\u8FBC\u307F\u89E3\u9664", +padding:"\u30D1\u30C7\u30A3\u30F3\u30B0", +same:"\u5168\u3066\u540C\u3058\u306B\u3059\u308B", +top:"\u4E0A", +right:"\u53F3", +bottom:"\u4E0B", +left:"\u5DE6", +margin:"\u30DE\u30FC\u30B8\u30F3", +style:"\u30B9\u30BF\u30A4\u30EB", +width:"\u5E45", +height:"\u9AD8\u3055", +color:"\u8272", +list_type:"\u30DE\u30FC\u30AB\u30FC\u7A2E\u985E", +bullet_image:"\u30DE\u30FC\u30AB\u30FC\u753B\u50CF", +position:"\u30DE\u30FC\u30AB\u30FC\u8868\u793A\u4F4D\u7F6E", +positioning_type:"\u914D\u7F6E\u65B9\u6CD5", +visibility:"\u8868\u793A", +zindex:"Z-Index", +overflow:"\u30AA\u30FC\u30D0\u30FC\u30D5\u30ED\u30FC", +placement:"\u4F4D\u7F6E", +clip:"\u5207\u308A\u629C\u304D" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ko_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ko_dlg.js new file mode 100644 index 00000000..420e65f4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ko_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ko.style_dlg',{ +title:"CSS\uD3B8\uC9D1", +apply:"\uC801\uC6A9", +text_tab:"\uD14D\uC2A4\uD2B8", +background_tab:"\uBC30\uACBD", +block_tab:"\uBE14\uB85D", +box_tab:"\uBC15\uC2A4", +border_tab:"\uD14C\uB450\uB9AC\uC120", +list_tab:"\uB9AC\uC2A4\uD2B8", +positioning_tab:"\uC704\uCE58", +text_props:"\uD14D\uC2A4\uD2B8", +text_font:"\uD3F0\uD2B8", +text_size:"\uD06C\uAE30", +text_weight:"\uAD75\uAE30", +text_style:"\uC2A4\uD0C0\uC77C", +text_variant:"Variant", +text_lineheight:"\uD589 \uB192\uC774", +text_case:"\uB300/\uC18C\uBB38\uC790", +text_color:"\uC0C9", +text_decoration:"\uC7A5\uC2DD", +text_overline:"\uC717\uC904", +text_underline:"\uBC11\uC904", +text_striketrough:"\uCDE8\uC18C\uC120", +text_blink:"\uC810\uBA78", +text_none:"\uC5C6\uC74C", +background_color:"\uBC30\uACBD\uC0C9", +background_image:"\uBC30\uACBD \uC774\uBBF8\uC9C0", +background_repeat:"\uBC18\uBCF5", +background_attachment:"\uCCA8\uBD80", +background_hpos:"\uC218\uD3C9 \uC704\uCE58", +background_vpos:"\uC218\uC9C1 \uC704\uCE58", +block_wordspacing:"\uB2E8\uC5B4 \uAC04\uACA9", +block_letterspacing:"\uBB38\uC790 \uAC04\uACA9", +block_vertical_alignment:"\uC218\uC9C1 \uC704\uCE58", +block_text_align:"\uD14D\uC2A4\uD2B8 \uC815\uB82C", +block_text_indent:"\uB4E4\uC5EC\uC4F0\uAE30", +block_whitespace:"\uACF5\uBC31 \uBB38\uC790", +block_display:"\uD45C\uC2DC", +box_width:"\uD3ED", +box_height:"\uB192\uC774", +box_float:"float", +box_clear:"Clear", +padding:"padding", +same:"\uBAA8\uB450 \uB611\uAC19\uC774", +top:"\uC0C1", +right:"\uC6B0", +bottom:"\uD558", +left:"\uC88C", +margin:"\uB9C8\uC9C4", +style:"\uC2A4\uD0C0\uC77C", +width:"\uD3ED", +height:"\uB192\uC774", +color:"\uC0C9", +list_type:"\uBAA9\uB85D\uC885\uB958", +bullet_image:"\uBE14\uB9BF \uC774\uBBF8\uC9C0", +position:"\uC704\uCE58", +positioning_type:"\uD0C0\uC785", +visibility:"\uAC00\uC2DC\uC131", +zindex:"Z-index", +overflow:"\uC624\uBC84\uD50C\uB85C\uC6B0", +placement:"\uC704\uCE58(placement)", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/lt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/lt_dlg.js new file mode 100644 index 00000000..83151a32 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/lt_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('lt.style_dlg',{ +title:"Redaguoti CSS stili\u0173", +apply:"Taikyti", +text_tab:"Tekstas", +background_tab:"Fonas", +block_tab:"Blokas", +box_tab:"D\u0117\u017Eut\u0117", +border_tab:"R\u0117melis", +list_tab:"S\u0105ra\u0161as", +positioning_tab:"Pozicionavimas", +text_props:"Tekstas", +text_font:"\u0160triftas", +text_size:"Dydis", +text_weight:"Storis", +text_style:"Stilius", +text_variant:"Variantas", +text_lineheight:"Eilut\u0117s au\u0161tis", +text_case:"Ma\u017Eosios/did\u017Eiosios raid\u0117s", +text_color:"Spalva", +text_decoration:"Dekoracija", +text_overline:"pabraukta vir\u0161uje", +text_underline:"pabraukta apa\u010Dioje", +text_striketrough:"perbraukta", +text_blink:"mirg\u0117jimas", +text_none:"joks", +background_color:"Fono spalva", +background_image:"Fono paveiksl\u0117lis", +background_repeat:"Kartoti", +background_attachment:"Prisegtukas", +background_hpos:"Horizontali pozicija", +background_vpos:"Vertikali pozicija", +block_wordspacing:"Tarpai tarp \u017Eod\u017Ei\u0173", +block_letterspacing:"Tarpai tarp raid\u017Ei\u0173", +block_vertical_alignment:"Vertikalus lygiavimas", +block_text_align:"Teksto lygiavimas", +block_text_indent:"Teksto atitraukimas", +block_whitespace:"Tarpai", +block_display:"Rodymas", +box_width:"Ilgis", +box_height:"Auk\u0161tis", +box_float:"Plaukiojimas", +box_clear:"I\u0161valyti", +padding:"U\u017Epildymas", +same:"Tas pats visiems", +top:"Vir\u0161uje", +right:"De\u0161in\u0117je", +bottom:"Apa\u010Dioje", +left:"Kair\u0117je", +margin:"Para\u0161t\u0117", +style:"Stilius", +width:"Ilgis", +height:"Auk\u0161tis", +color:"Spalva", +list_type:"Tipas", +bullet_image:"Kulkos paveiksl\u0117lis", +position:"Pozicija", +positioning_type:"Tipas", +visibility:"Matomumas", +zindex:"Z-indeksas", +overflow:"Perpildymas", +placement:"Talpinimas", +clip:"\u012Era\u0161as" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/lv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/lv_dlg.js new file mode 100644 index 00000000..d711135f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/lv_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('lv.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/mk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/mk_dlg.js new file mode 100644 index 00000000..75c4b8d9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/mk_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('mk.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/mn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/mn_dlg.js new file mode 100644 index 00000000..681f9bdf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/mn_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('mn.style_dlg',{ +title:"CSS-Styles \u0437\u0430\u0441\u0432\u0430\u0440\u043B\u0430\u0445", +apply:"\u0425\u044D\u0440\u044D\u0433\u043B\u044D\u0445", +text_tab:"\u0411\u0438\u0447\u0432\u044D\u0440", +background_tab:"\u0414\u044D\u0432\u0441\u0433\u044D\u0440", +block_tab:"\u0411\u043B\u043E\u043A", +box_tab:"\u0425\u0430\u0439\u0440\u0446\u0430\u0433", +border_tab:"\u0425\u04AF\u0440\u044D\u044D", +list_tab:"\u0416\u0430\u0433\u0441\u0430\u0430\u043B\u0442", +positioning_tab:"\u0411\u0430\u0439\u0440\u0448\u0438\u043B", +text_props:"\u0411\u0438\u0447\u0432\u044D\u0440", +text_font:"\u0424\u043E\u043D\u0442", +text_size:"\u0425\u044D\u043C\u0436\u044D\u044D", +text_weight:"\u04E8\u0440\u0433\u04E9\u043D \u043D\u0430\u0440\u0438\u0439\u043D", +text_style:"\u0425\u044D\u043B\u0431\u044D\u0440", +text_variant:"\u0412\u0430\u0440\u0438\u0430\u043D\u0442", +text_lineheight:"\u041C\u04E9\u0440\u043D\u0438\u0439 \u04E9\u043D\u0434\u04E9\u0440", +text_case:"\u0411\u0438\u0447\u0432\u044D\u0440", +text_color:"\u04E8\u043D\u0433\u04E9", +text_decoration:"\u0427\u0438\u043C\u044D\u0433\u043B\u044D\u043B", +text_overline:"\u0434\u044D\u044D\u0433\u04AF\u04AF\u0440 \u043D\u044C \u0437\u0443\u0440\u0441\u0430\u043D", +text_underline:"\u0434\u043E\u043E\u0433\u0443\u0443\u0440 \u043D\u044C \u0437\u0443\u0440\u0441\u0430\u043D", +text_striketrough:"\u0434\u0430\u0440\u0441\u0430\u043D", +text_blink:"\u0430\u043D\u0438\u0432\u0447\u0438\u043B\u0442", +text_none:"\u0431\u0430\u0439\u0445\u0433\u04AF\u0439", +background_color:"\u0414\u044D\u0432\u0441\u0433\u044D\u0440 \u04E9\u043D\u0433\u04E9", +background_image:"\u0414\u044D\u0432\u0441\u0433\u044D\u0440 \u0437\u0443\u0440\u0430\u0433", +background_repeat:"\u0414\u0430\u0432\u0442\u0430\u043B\u0442", +background_attachment:"\u0423\u0441\u0430\u043D \u0442\u044D\u043C\u0434\u0433\u0438\u0439\u043D \u044D\u0444\u0444\u0435\u043A\u0442", +background_hpos:"\u0411\u0430\u0439\u0440\u043B\u0430\u043B X", +background_vpos:"\u0411\u0430\u0439\u0440\u043B\u0430\u043B Y", +block_wordspacing:"\u04AE\u0433 \u0445\u043E\u043E\u0440\u043E\u043D\u0434\u044B\u043D \u0437\u0430\u0439", +block_letterspacing:"\u04AE\u0441\u044D\u0433 \u0445\u043E\u043E\u0440\u043E\u043D\u0434\u044B\u043D \u0437\u0430\u0439", +block_vertical_alignment:"\u0411\u043E\u0441\u043E\u043E \u0436\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u044D\u043B\u0442", +block_text_align:"\u0416\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u044D\u043B\u0442", +block_text_indent:"\u0414\u043E\u0433\u043E\u043B \u043C\u04E9\u0440", +block_whitespace:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442 \u043C\u04E9\u0440 \u043E\u0440\u043E\u043E\u043B\u0442", +block_display:"\u041E\u0440\u043E\u043E\u0445 \u0445\u044D\u043B\u0431\u044D\u0440", +box_width:"\u04E8\u0440\u0433\u04E9\u043D", +box_height:"\u04E8\u043D\u0434\u04E9\u0440", +box_float:"\u0413\u04AF\u0439\u043B\u0433\u044D\u043B\u0442", +box_clear:"\u0413\u04AF\u0439\u043B\u0433\u044D\u043B\u0442 \u0445\u0430\u0430\u0445", +padding:"\u0414\u043E\u0442\u043E\u043E\u0434 \u0437\u0430\u0439", +same:"\u0411\u04AF\u0433\u0434 \u0438\u0436\u0438\u043B", +top:"\u0414\u044D\u044D\u0440", +right:"\u0411\u0430\u0440\u0443\u0443\u043D", +bottom:"\u0414\u043E\u043E\u0440", +left:"\u0417\u04AF\u04AF\u043D", +margin:"\u0413\u0430\u0434\u0430\u0430\u0434 \u0437\u0430\u0439", +style:"\u0424\u043E\u0440\u043C\u0430\u0442", +width:"\u04E8\u0440\u0433\u04E9\u043D", +height:"\u04E8\u043D\u0434\u04E9\u0440", +color:"\u0411\u0438\u0447\u0432\u044D\u0440\u0438\u0439\u043D \u04E9\u043D\u0433\u04E9", +list_type:"\u0422\u043E\u043E\u0447\u0438\u043B\u0442\u044B\u043D \u0446\u044D\u0433\u0438\u0439\u043D \u0445\u044D\u043B\u0431\u044D\u0440", +bullet_image:"\u0413\u0440\u0430\u0444\u0438\u043A \u0442\u043E\u043E\u0447\u0438\u043B\u0442\u044B\u043D \u0446\u044D\u0433", +position:"\u0411\u0430\u0439\u0440\u0448\u0438\u043B", +positioning_type:"\u0411\u0430\u0439\u0440\u0448\u043B\u044B\u043D \u0442\u04E9\u0440\u04E9\u043B", +visibility:"\u0425\u0430\u0440\u0430\u0433\u0434\u0430\u0445\u0443\u0439\u0446", +zindex:"Z \u0443\u0442\u0433\u0430", +overflow:"\u0425\u044D\u0442\u044D\u0440\u0441\u044D\u043D \u0445\u044D\u043C\u0436\u044D\u044D\u043D\u0438\u0439 \u0445\u0430\u0440\u044C\u0446\u0430\u0430", +placement:"\u0411\u0430\u0439\u0440\u0448\u0438\u043B", +clip:"\u0422\u0430\u0439\u0440\u0434\u0430\u0441" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ms_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ms_dlg.js new file mode 100644 index 00000000..38a17421 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ms_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ms.style_dlg',{ +title:"Sunting Gaya CSS", +apply:"Guna", +text_tab:"Teks", +background_tab:"Latar belakang", +block_tab:"Landasan", +box_tab:"Kotak", +border_tab:"Sempadan", +list_tab:"Senarai", +positioning_tab:"Kedudukan", +text_props:"Teks", +text_font:"Huruf", +text_size:"Saiz", +text_weight:"Beban", +text_style:"Gaya", +text_variant:"Varian", +text_lineheight:"Tinggi garisan", +text_case:"Kes", +text_color:"Warna", +text_decoration:"Dekorasi", +text_overline:"garis atas", +text_underline:"garis bawah", +text_striketrough:"garis tengah", +text_blink:"kelip", +text_none:"tiada", +background_color:"Warna Latar", +background_image:"Imej Latar", +background_repeat:"Ulangan", +background_attachment:"Sisipan", +background_hpos:"Posisi mengufuk", +background_vpos:"Posisi tegak", +block_wordspacing:"Jarak perkataan", +block_letterspacing:"Jarak huruf", +block_vertical_alignment:"Penjajaran tegak", +block_text_align:"Penjajaran teks", +block_text_indent:"Takukan teks", +block_whitespace:"Ruangan putih", +block_display:"Pamer", +box_width:"Lebar", +box_height:"Tinggi", +box_float:"Apungan", +box_clear:"Ruangan jelas", +padding:"Lapisan", +same:"Samakan kesemuanya", +top:"Atas", +right:"Kanan", +bottom:"Bawah", +left:"Kiri", +margin:"Ruangan tepi", +style:"Gaya", +width:"Lebar", +height:"Tinggi", +color:"Warna", +list_type:"Jenis", +bullet_image:"Imej peluru", +position:"Posisi", +positioning_type:"Jenis", +visibility:"Kelihatan", +zindex:"Indeks-Z", +overflow:"Limpahan", +placement:"Penempatan", +clip:"Klip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nb_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nb_dlg.js new file mode 100644 index 00000000..483f128a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nb_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('nb.style_dlg',{ +title:"Rediger CSS-stil", +apply:"Legg til", +text_tab:"Tekst", +background_tab:"Bakgrunn", +block_tab:"Blokk", +box_tab:"Boks", +border_tab:"Ramme", +list_tab:"Liste", +positioning_tab:"Posisjon", +text_props:"Skriftegenskaper", +text_font:"Skrifttype", +text_size:"Skriftst\u00F8rrelse", +text_weight:"Skriftvekt", +text_style:"Skriftstil", +text_variant:"Variant", +text_lineheight:"Linjeh\u00F8yde", +text_case:"Kapiteler/minuskler", +text_color:"Farge", +text_decoration:"Dekorasjon", +text_overline:"Hevet skrift", +text_underline:"Senket skrift", +text_striketrough:"Gjennomstreking", +text_blink:"Blink", +text_none:"Ingen", +background_color:"Bakgrunnsfarge", +background_image:"Bakgrunnsbilde", +background_repeat:"Gjenta", +background_attachment:"Vedlegg", +background_hpos:"Horisontal posisjon", +background_vpos:"Vertikal posisjon", +block_wordspacing:"Ordmellomrom", +block_letterspacing:"Bokstavmellomrom", +block_vertical_alignment:"Vertikal justering", +block_text_align:"Justering", +block_text_indent:"Innrykk", +block_whitespace:"Mellomrom", +block_display:"Framvising", +box_width:"Bredde", +box_height:"H\u00F8yde", +box_float:"Flyt", +box_clear:"Slett", +padding:"Utfylling", +same:"Likt i alle", +top:"Topp", +right:"H\u00F8yre", +bottom:"Bunn", +left:"Venstre", +margin:"Marg", +style:"Stil", +width:"Bredde", +height:"H\u00F8yde", +color:"Farge", +list_type:"Type", +bullet_image:"Kulepunktbilde", +position:"Posisjon", +positioning_type:"Type", +visibility:"Synlighet", +zindex:"Z-indeks", +overflow:"Overfylt", +placement:"Plassering", +clip:"Klip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nl_dlg.js new file mode 100644 index 00000000..854a0be0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nl_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('nl.style_dlg',{ +title:"CSS Stijl bewerken", +apply:"Toepassen", +text_tab:"Tekst", +background_tab:"Achtergrond", +block_tab:"Blok", +box_tab:"Box", +border_tab:"Rand", +list_tab:"Lijst", +positioning_tab:"Positionering", +text_props:"Tekst", +text_font:"Lettertype", +text_size:"Tekengrootte", +text_weight:"Gewicht", +text_style:"Stijl", +text_variant:"Variant", +text_lineheight:"Lijnhoogte", +text_case:"Hoofdlettergebruik", +text_color:"Kleur", +text_decoration:"Decoratie", +text_overline:"Overhalen", +text_underline:"Onderstrepen", +text_striketrough:"Doorhalen", +text_blink:"Knipperen", +text_none:"Niets", +background_color:"Achtergrondkleur", +background_image:"Achtergrondafbeelding", +background_repeat:"Herhalen", +background_attachment:"Bijlage", +background_hpos:"Horizontale positie", +background_vpos:"Verticale positie", +block_wordspacing:"Woordruimte", +block_letterspacing:"Letterruimte", +block_vertical_alignment:"Verticale uitlijning", +block_text_align:"Tekstuitlijning", +block_text_indent:"Inspringen", +block_whitespace:"Witruimte", +block_display:"Weergave", +box_width:"Breedte", +box_height:"Hoogte", +box_float:"Zweven", +box_clear:"Vrijhouden", +padding:"Opening", +same:"Alles hetzelfde", +top:"Boven", +right:"Rechts", +bottom:"Onder", +left:"Links", +margin:"Marge", +style:"Stijl", +width:"Breedte", +height:"Hoogte", +color:"Kleur", +list_type:"Type", +bullet_image:"Opsommingsteken", +position:"Positie", +positioning_type:"Type", +visibility:"Zichtbaarheid", +zindex:"Z-index", +overflow:"Overvloeien", +placement:"Plaatsing", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nn_dlg.js new file mode 100644 index 00000000..4e09d3ff --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/nn_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('nn.style_dlg',{ +title:"Rediger CSS-stil", +apply:"Legg til", +text_tab:"Tekst", +background_tab:"Bakgrunn", +block_tab:"Blokk", +box_tab:"Boks", +border_tab:"Ramme", +list_tab:"Liste", +positioning_tab:"Posisjon", +text_props:"Eigenskapar for skrift", +text_font:"Skrifttype", +text_size:"Skriftstorleik", +text_weight:"Skriftvekt", +text_style:"Skriftstil", +text_variant:"Variant", +text_lineheight:"Linjeh\u00F8gd", +text_case:"Kapitelar/minusklar", +text_color:"Farge", +text_decoration:"Dekorasjon", +text_overline:"Heva skrift", +text_underline:"Senka skrift", +text_striketrough:"Gjennomstreking", +text_blink:"Blink", +text_none:"Ingen", +background_color:"Bakgrunnsfarge", +background_image:"Bakgrunnsbilete", +background_repeat:"Gjenta", +background_attachment:"Vedlegg", +background_hpos:"Horisontal posisjon", +background_vpos:"Vertikal posisjon", +block_wordspacing:"Ordmellomrom", +block_letterspacing:"Bokstavmellomrom", +block_vertical_alignment:"Vertikal justering", +block_text_align:"Justering", +block_text_indent:"Innrykk", +block_whitespace:"Mellomrom", +block_display:"Framsyning", +box_width:"Breidd", +box_height:"H\u00F8gd", +box_float:"Flyt", +box_clear:"Slett", +padding:"Utfylling", +same:"Likt i alle", +top:"Topp", +right:"H\u00F8gre", +bottom:"Bunn", +left:"Venstre", +margin:"Marg", +style:"Stil", +width:"Breidd", +height:"H\u00F8gd", +color:"Farge", +list_type:"Type", +bullet_image:"Kulepunktbilete", +position:"Posisjon", +positioning_type:"Type", +visibility:"Synlegheit", +zindex:"Z-indeks", +overflow:"Overfylt", +placement:"Plassering", +clip:"Klipp" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/pl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/pl_dlg.js new file mode 100644 index 00000000..014e2bb8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/pl_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('pl.style_dlg',{ +title:"Edytuj CSS Style", +apply:"Zastosuj", +text_tab:"Text", +background_tab:"T\u0142o", +block_tab:"Zablokuj", +box_tab:"Box", +border_tab:"Obramowanie", +list_tab:"Lista", +positioning_tab:"Pozycjonowanie", +text_props:"Tekst", +text_font:"Wz\u00F3r czcionki", +text_size:"Rozmiar", +text_weight:"Waga", +text_style:"Styl", +text_variant:"Wariant", +text_lineheight:"Linia wysoko\u015Bci", +text_case:"Case", +text_color:"Kolor", +text_decoration:"Dekoracja", +text_overline:"Nadkre\u015Blenie", +text_underline:"Podkre\u015Blenie", +text_striketrough:"Przekre\u015Blenie", +text_blink:"Miganie", +text_none:"\u017Baden", +background_color:"Kolor t\u0142a", +background_image:"Obrazek t\u0142a", +background_repeat:"Powt\u00F3rz", +background_attachment:"Za\u0142\u0105cznik", +background_hpos:"Pozycja pozioma", +background_vpos:"Pozycja pionowa", +block_wordspacing:"Odst\u0119p mi\u0119dzy wyrazami", +block_letterspacing:"Odst\u0119p mi\u0119dzy literami", +block_vertical_alignment:"Pionowe wyr\u00F3wnanie", +block_text_align:"Wyr\u00F3wna\u0107 tekst", +block_text_indent:"Akapit w tek\u015Bcie", +block_whitespace:"Bia\u0142a przestrze\u0144", +block_display:"Widoczno\u015B\u0107", +box_width:"Szeroko\u015B\u0107", +box_height:"Wysoko\u015B\u0107", +box_float:"P\u0142ywanie", +box_clear:"Wyczy\u015B\u0107", +padding:"Odst\u0119py", +same:"To samo dla wszystkich", +top:"G\u00F3ra", +right:"Prawy", +bottom:"D\u00F3\u0142", +left:"Lewy", +margin:"Margines", +style:"Styl", +width:"Szeroko\u015B\u0107", +height:"Wysoko\u015B\u0107", +color:"Kolor", +list_type:"Typ", +bullet_image:"Obrazek listy", +position:"Pozycja", +positioning_type:"Typ", +visibility:"Widoczno\u015B\u0107", +zindex:"Z-index", +overflow:"Przepe\u0142niony", +placement:"Umieszczenie", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/pt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/pt_dlg.js new file mode 100644 index 00000000..4d969548 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/pt_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('pt.style_dlg',{ +title:"Editar CSS", +apply:"Aplicar", +text_tab:"Texto", +background_tab:"Fundo", +block_tab:"Bloco", +box_tab:"Caixa", +border_tab:"Limites", +list_tab:"Lista", +positioning_tab:"Posicionamento", +text_props:"Texto", +text_font:"Fonte", +text_size:"Tamanho", +text_weight:"Peso", +text_style:"Estilo", +text_variant:"Variante", +text_lineheight:"Altura da linha", +text_case:"Mai\u00FAscula/min\u00FAscula", +text_color:"Cor", +text_decoration:"Decora\u00E7\u00E3o", +text_overline:"Sobrelinha", +text_underline:"Sublinhado", +text_striketrough:"Rasurado", +text_blink:"Piscar", +text_none:"nenhum", +background_color:"Cor de fundo", +background_image:"Imagem de fundo", +background_repeat:"Repetir", +background_attachment:"Fixar", +background_hpos:"Posi\u00E7\u00E3o horizontal", +background_vpos:"Posi\u00E7\u00E3o vertical", +block_wordspacing:"Espa\u00E7amento de palavras", +block_letterspacing:"Espa\u00E7amento de letras", +block_vertical_alignment:"Alinhamento vertical", +block_text_align:"Alinhamento de texto", +block_text_indent:"Indent", +block_whitespace:"Espa\u00E7o", +block_display:"Display", +box_width:"Largura", +box_height:"Altura", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"O mesmo para todos", +top:"Topo", +right:"Direita", +bottom:"Abaixo", +left:"Esquerda", +margin:"Margem", +style:"Estilo", +width:"Largura", +height:"Altura", +color:"Cor", +list_type:"Tipo", +bullet_image:"Imagem de lista", +position:"Posi\u00E7\u00E3o", +positioning_type:"Tipo", +visibility:"Visibilidade", +zindex:"Z-index", +overflow:"Overflow", +placement:"Posicionamento", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ro_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ro_dlg.js new file mode 100644 index 00000000..53520cd0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ro_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ro.style_dlg',{ +title:"Editare CSS", +apply:"Aplic\u0103", +text_tab:"Text", +background_tab:"Fundal", +block_tab:"Block", +box_tab:"Box", +border_tab:"Bordur\u0103", +list_tab:"List\u0103", +positioning_tab:"Pozi\u0163ionare", +text_props:"Text", +text_font:"Font", +text_size:"M\u0103rime", +text_weight:"Greutate", +text_style:"Stil", +text_variant:"Variant\u0103", +text_lineheight:"\u00CEn\u0103l\u0163ime linie", +text_case:"Caz", +text_color:"Culoare", +text_decoration:"Decora\u0163ii", +text_overline:"Peste linie", +text_underline:"Sub linie", +text_striketrough:"T\u0103iere", +text_blink:"Blink", +text_none:"Nici unul", +background_color:"Culoare fundal", +background_image:"Imagine fundal", +background_repeat:"Repet\u0103", +background_attachment:"Ata\u015Fament", +background_hpos:"Pozi\u0163ionare orizontal\u0103", +background_vpos:"Pozi\u0163ionare vertical\u0103", +block_wordspacing:"Spa\u0163iere cuvinte", +block_letterspacing:"Spa\u0163iere litere", +block_vertical_alignment:"Aliniere vertical\u0103", +block_text_align:"Aliniere text", +block_text_indent:"Indentare text", +block_whitespace:"Spa\u0163iu alb", +block_display:"Afi\u015Fare", +box_width:"L\u0103\u0163ime", +box_height:"\u00CEn\u0103l\u0163ime", +box_float:"Float", +box_clear:"Anulare float", +padding:"Margini interne", +same:"La fel pentru toate", +top:"Sus", +right:"Dreapta", +bottom:"Jos", +left:"St\u00E2nga", +margin:"Margini", +style:"Stil", +width:"L\u0103\u0163ime", +height:"\u00CEn\u0103l\u0163ime", +color:"Culoare", +list_type:"Tip", +bullet_image:"Imagine", +position:"Pozi\u0163ionare", +positioning_type:"Tip", +visibility:"Vizibilitate", +zindex:"Z-index", +overflow:"Overflow", +placement:"Plasament", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ru_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ru_dlg.js new file mode 100644 index 00000000..14d37253 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/ru_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ru.style_dlg',{ +title:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0438\u043B\u044C CSS", +apply:"\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C", +text_tab:"\u0422\u0435\u043A\u0441\u0442", +background_tab:"\u0424\u043E\u043D", +block_tab:"\u0411\u043B\u043E\u043A", +box_tab:"\u041A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440", +border_tab:"\u0413\u0440\u0430\u043D\u0438\u0446\u0430", +list_tab:"\u0421\u043F\u0438\u0441\u043E\u043A", +positioning_tab:"\u041F\u043E\u0437\u0438\u0446\u0438\u043E\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435", +text_props:"\u0422\u0435\u043A\u0441\u0442", +text_font:"\u0428\u0440\u0438\u0444\u0442", +text_size:"\u0420\u0430\u0437\u043C\u0435\u0440", +text_weight:"\u0412\u0435\u0441", +text_style:"\u0421\u0442\u0438\u043B\u044C", +text_variant:"\u041D\u0430\u0447\u0435\u0440\u0442\u0430\u043D\u0438\u0435", +text_lineheight:"\u0412\u044B\u0441\u043E\u0442\u0430 \u0441\u0442\u0440\u043E\u043A\u0438", +text_case:"\u0420\u0435\u0433\u0438\u0441\u0442\u0440", +text_color:"\u0426\u0432\u0435\u0442", +text_decoration:"\u0423\u043A\u0440\u0430\u0448\u0435\u043D\u0438\u0435", +text_overline:"\u043D\u0430\u0434\u0447\u0451\u0440\u043A\u043D\u0443\u0442\u044B\u0439", +text_underline:"\u043F\u043E\u0434\u0447\u0451\u0440\u043A\u043D\u0443\u0442\u044B\u0439", +text_striketrough:"\u043F\u0435\u0440\u0435\u0447\u0451\u0440\u043A\u043D\u0443\u0442\u044B\u0439", +text_blink:"\u043C\u0438\u0433\u0430\u044E\u0449\u0438\u0439", +text_none:"\u043D\u0438\u043A\u0430\u043A\u043E\u0433\u043E", +background_color:"\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430", +background_image:"\u0424\u043E\u043D\u043E\u0432\u043E\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +background_repeat:"\u041F\u043E\u0432\u0442\u043E\u0440", +background_attachment:"\u041F\u0440\u0438\u043A\u0440\u0435\u043F\u043B\u0435\u043D\u0438\u0435", +background_hpos:"\u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u0437\u0438\u0446\u0438\u044F", +background_vpos:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u0437\u0438\u0446\u0438\u044F", +block_wordspacing:"\u041F\u0440\u043E\u043C\u0435\u0436\u0443\u0442\u043A\u0438 \u043C\u0435\u0436\u0434\u0443 \u0441\u043B\u043E\u0432\u0430\u043C\u0438", +block_letterspacing:"\u041F\u0440\u043E\u043C\u0435\u0436\u0443\u0442\u043A\u0438 \u043C\u0435\u0436\u0434\u0443 \u0441\u0438\u043C\u0432\u043E\u043B\u0430\u043C\u0438", +block_vertical_alignment:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +block_text_align:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430", +block_text_indent:"\u041E\u0442\u0441\u0442\u0443\u043F \u0442\u0435\u043A\u0441\u0442\u0430", +block_whitespace:"\u041F\u0440\u043E\u0431\u0435\u043B", +block_display:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +box_width:"\u0428\u0438\u0440\u0438\u043D\u0430", +box_height:"\u0412\u044B\u0441\u043E\u0442\u0430", +box_float:"\u041F\u043B\u0430\u0432\u0430\u044E\u0449\u0435\u0435", +box_clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C", +padding:"\u041D\u0430\u0431\u0438\u0432\u043A\u0430", +same:"\u041E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u043E \u0434\u043B\u044F \u0432\u0441\u0435\u0445", +top:"\u0421\u0432\u0435\u0440\u0445\u0443", +right:"\u0421\u043F\u0440\u0430\u0432\u0430", +bottom:"\u0421\u043D\u0438\u0437\u0443", +left:"\u0421\u043B\u0435\u0432\u0430", +margin:"\u041F\u043E\u043B\u044F", +style:"\u0421\u0442\u0438\u043B\u044C", +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +height:"\u0412\u044B\u0441\u043E\u0442\u0430", +color:"\u0426\u0432\u0435\u0442", +list_type:"\u0422\u0438\u043F", +bullet_image:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043C\u0430\u0440\u043A\u0435\u0440\u0430", +position:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F", +positioning_type:"\u0422\u0438\u043F", +visibility:"\u0412\u0438\u0434\u0438\u043C\u043E\u0441\u0442\u044C", +zindex:"Z-\u0438\u043D\u0434\u0435\u043A\u0441", +overflow:"\u041E\u0431\u0442\u0435\u043A\u0430\u043D\u0438\u0435", +placement:"\u0420\u0430\u0437\u043C\u0435\u0449\u0435\u043D\u0438\u0435", +clip:"\u041E\u0431\u0440\u0435\u0437\u044B\u0432\u0430\u043D\u0438\u0435" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sc_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sc_dlg.js new file mode 100644 index 00000000..9ea03bcf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sc_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('sc.style_dlg',{ +title:"\u7F16\u8F91CSS\u6837\u5F0F\u8868", +apply:"\u5E94\u7528", +text_tab:"\u6587\u5B57", +background_tab:"\u80CC\u666F", +block_tab:"\u533A\u5757", +box_tab:"\u76D2\u6A21\u578B", +border_tab:"\u8FB9\u6846", +list_tab:"\u5217\u8868", +positioning_tab:"\u4F4D\u7F6E", +text_props:"\u6587\u5B57", +text_font:"\u5B57\u4F53", +text_size:"\u5927\u5C0F", +text_weight:"\u5BBD\u5EA6", +text_style:"\u6837\u5F0F", +text_variant:"\u53D8\u4F53", +text_lineheight:"\u884C\u9AD8", +text_case:"\u5B57\u4F53", +text_color:"\u989C\u8272", +text_decoration:"\u88C5\u9970", +text_overline:"\u4E0A\u5212\u7EBF", +text_underline:"\u5E95\u7EBF", +text_striketrough:"\u4E2D\u5212\u7EBF", +text_blink:"\u95EA\u70C1", +text_none:"\u65E0", +background_color:"\u80CC\u666F\u989C\u8272", +background_image:"\u80CC\u666F\u56FE\u7247", +background_repeat:"\u91CD\u590D", +background_attachment:"\u9644\u7740", +background_hpos:"\u6C34\u5E73\u4F4D\u7F6E", +background_vpos:"\u5782\u76F4\u4F4D\u7F6E", +block_wordspacing:"\u8BCD\u95F4\u8DDD", +block_letterspacing:"\u5B57\u6BCD\u95F4\u8DDD", +block_vertical_alignment:"\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F", +block_text_align:"\u6587\u5B57\u5BF9\u9F50", +block_text_indent:"\u6587\u5B57\u7F29\u8FDB", +block_whitespace:"\u7A7A\u683C", +block_display:"\u663E\u793A\u65B9\u5F0F", +box_width:"\u5BBD\u5EA6", +box_height:"\u9AD8\u5EA6", +box_float:"\u6D6E\u52A8", +box_clear:"\u6E05\u9664", +padding:"\u5185\u8FB9\u8DDD", +same:"\u5168\u90E8\u76F8\u540C", +top:"\u9876\u90E8", +right:"\u53F3\u4FA7", +bottom:"\u5E95\u90E8", +left:"\u5DE6\u4FA7", +margin:"\u8FB9\u8DDD", +style:"\u6837\u5F0F", +width:"\u5BBD\u5EA6", +height:"\u9AD8\u5EA6", +color:"\u989C\u8272", +list_type:"\u5217\u8868\u7C7B\u578B", +bullet_image:"\u5217\u8868\u56FE\u7247", +position:"\u56FE\u7247\u4F4D\u7F6E", +positioning_type:"\u4F4D\u7F6E\u7C7B\u578B", +visibility:"\u662F\u5426\u53EF\u89C1", +zindex:"Z\u5750\u6807", +overflow:"\u6EA2\u51FA", +placement:"\u5E03\u7F6E", +clip:"\u526A\u8F91" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/se_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/se_dlg.js new file mode 100644 index 00000000..b983cd8e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/se_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('se.style_dlg',{ +title:"Redigera inline CSS", +apply:"Applicera", +text_tab:"Text", +background_tab:"Bakgrund", +block_tab:"Block", +box_tab:"Box", +border_tab:"Ramar", +list_tab:"Listor", +positioning_tab:"Positionering", +text_props:"Text", +text_font:"Typsnitt", +text_size:"Storlek", +text_weight:"Tjocklek", +text_style:"Stil", +text_variant:"Variant", +text_lineheight:"Radh\u00F6jd", +text_case:"Sm\u00E5/stora", +text_color:"F\u00E4rg", +text_decoration:"Dekoration", +text_overline:"\u00D6verstruken", +text_underline:"Understruken", +text_striketrough:"Genomstruken", +text_blink:"Blinka", +text_none:"Inget", +background_color:"Bakgrundsf\u00E4rg", +background_image:"Bakgrundsbild", +background_repeat:"Upprepning", +background_attachment:"F\u00E4stpunkt", +background_hpos:"Horisontell position", +background_vpos:"Vertikal position", +block_wordspacing:"Ordavbrytning", +block_letterspacing:"Teckenmellanrum", +block_vertical_alignment:"Vertikal justering", +block_text_align:"Textjustering", +block_text_indent:"Textindrag", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Bredd", +box_height:"H\u00F6jd", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Samma f\u00F6r alla", +top:"Toppen", +right:"H\u00F6ger", +bottom:"Botten", +left:"V\u00E4nster", +margin:"Marginal", +style:"Stil", +width:"Bredd", +height:"H\u00F6jd", +color:"F\u00E4rg", +list_type:"Listtyp", +bullet_image:"Punktbild", +position:"Position", +positioning_type:"Positionstyp", +visibility:"Synlighet", +zindex:"Z-index", +overflow:"\u00D6verfl\u00F6de", +placement:"Placering", +clip:"Besk\u00E4rning" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/si_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/si_dlg.js new file mode 100644 index 00000000..0814ed0d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/si_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('si.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sk_dlg.js new file mode 100644 index 00000000..a3e99bb2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sk_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('sk.style_dlg',{ +title:"Editova\u0165 CSS \u0161t\u00FDl", +apply:"Aplikova\u0165", +text_tab:"Text", +background_tab:"Pozadie", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Ve\u013Ekos\u0165", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Farba", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"\u0160\u00EDrka", +box_height:"V\u00FD\u0161ka", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"\u0160\u00EDrka", +height:"V\u00FD\u0161ka", +color:"Farba", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sl_dlg.js new file mode 100644 index 00000000..6c995faf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sl_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('sl.style_dlg',{ +title:"Uredi sloge CSS", +apply:"Uporabi", +text_tab:"Besedilo", +background_tab:"Ozadje", +block_tab:"Blok", +box_tab:"Okvir", +border_tab:"Obroba", +list_tab:"Seznam", +positioning_tab:"Polo\u017Eaj", +text_props:"Besedilo", +text_font:"Pisava", +text_size:"Velikost", +text_weight:"Ute\u017E", +text_style:"Slog", +text_variant:"Razli\u010Dica", +text_lineheight:"Vi\u0161ina vrstice", +text_case:"Velikost", +text_color:"Barva", +text_decoration:"Okras", +text_overline:"nad\u010Drtano", +text_underline:"pod\u010Drtano", +text_striketrough:"pre\u010Drtano", +text_blink:"utripajo\u010De", +text_none:"brez", +background_color:"Barva ozadja", +background_image:"Slika ozadja", +background_repeat:"Ponavljaj", +background_attachment:"Priponka", +background_hpos:"Vodoravni polo\u017Eaj", +background_vpos:"Navpi\u010Dni polo\u017Eaj", +block_wordspacing:"Razmik besed", +block_letterspacing:"Razmik znakov", +block_vertical_alignment:"Navpi\u010Dna poravnava", +block_text_align:"Poravnava besedila", +block_text_indent:"Zamik besedila", +block_whitespace:"Beli prostor", +block_display:"Prikaz", +box_width:"\u0160irina", +box_height:"Vi\u0161ina", +box_float:"Plavojo\u010De", +box_clear:"\u010Cisto", +padding:"Podlaganje", +same:"Enako za vse", +top:"Zgoraj", +right:"Desno", +bottom:"Spodaj", +left:"Levo", +margin:"Rob", +style:"Slog", +width:"\u0160irina", +height:"Vi\u0161ina", +color:"Barva", +list_type:"Vrsta", +bullet_image:"Slika alineje", +position:"Polo\u017Eaj", +positioning_type:"Vrsta", +visibility:"Vidnost", +zindex:"Indeks-Z", +overflow:"Prelivanje", +placement:"Polo\u017Eaj", +clip:"Obre\u017Ei" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sq_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sq_dlg.js new file mode 100644 index 00000000..a8e30ab6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sq_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('sq.style_dlg',{ +title:"Edito t\u00EB gjitha stilet", +apply:"Apliko", +text_tab:"Teksti", +background_tab:"Fusha", +block_tab:"Bllok", +box_tab:"Kuti", +border_tab:"Korniza", +list_tab:"Lista", +positioning_tab:"Pozicionimi", +text_props:"Teksti", +text_font:"Teksti", +text_size:"Madh\u00EBsia", +text_weight:"Pesha", +text_style:"Stili", +text_variant:"Varianti", +text_lineheight:"Gjat\u00EBsia e linj\u00EBs", +text_case:"Madh\u00EBsia e g\u00EBrm\u00EBs", +text_color:"Ngjyra", +text_decoration:"Zbukurimi", +text_overline:"mbi linj\u00EB", +text_underline:"n\u00EBn linj\u00EB", +text_striketrough:"n\u00EB mes", +text_blink:"fik-ndiz", +text_none:"asnj\u00EB", +background_color:"Ngjyra e fush\u00EBs", +background_image:"Foto e fush\u00EBs", +background_repeat:"P\u00EBrs\u00EBritja", +background_attachment:"Bashk\u00EBngjitja", +background_hpos:"Pozicionimi horizontal", +background_vpos:"Pozicionimi vertikal", +block_wordspacing:"Hap\u00EBsira e fjal\u00EBve", +block_letterspacing:"Hap\u00EBsira e g\u00EBrmave", +block_vertical_alignment:"Drejtimi vertikal", +block_text_align:"Drejtimi i tekstit", +block_text_indent:"Kryerradha", +block_whitespace:"Hap\u00EBsira bosh", +block_display:"Shfaqja", +box_width:"Gjer\u00EBsia", +box_height:"Gjat\u00EBsia", +box_float:"Pluskimi", +box_clear:"Pastro", +padding:"Hap\u00EBsira e br\u00EBndshme", +same:"E nj\u00EBjt\u00EB p\u00EBr t\u00EB gjitha", +top:"Krye", +right:"Djathtas", +bottom:"Fund", +left:"Majtas", +margin:"Hap\u00EBsira", +style:"Stili", +width:"Gjer\u00EBsia", +height:"Gjat\u00EBsia", +color:"Ngjyra", +list_type:"Tipi", +bullet_image:"Foto ndar\u00EBse", +position:"Pozicioni", +positioning_type:"Tipi", +visibility:"Shikueshm\u00EBria", +zindex:"Indeksi Z", +overflow:"Mbivendosja", +placement:"Vendosja", +clip:"Prerja" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sr_dlg.js new file mode 100644 index 00000000..275b5ca2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sr_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('sr.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sv_dlg.js new file mode 100644 index 00000000..54443d7e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/sv_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('sv.style_dlg',{ +title:"Redigera inline CSS", +apply:"Applicera", +text_tab:"Text", +background_tab:"Bakgrund", +block_tab:"Block", +box_tab:"Box", +border_tab:"Ramar", +list_tab:"Listor", +positioning_tab:"Positionering", +text_props:"Text", +text_font:"Typsnitt", +text_size:"Storlek", +text_weight:"Tjocklek", +text_style:"Stil", +text_variant:"Variant", +text_lineheight:"Radh\u00F6jd", +text_case:"Sm\u00E5/stora", +text_color:"F\u00E4rg", +text_decoration:"Dekoration", +text_overline:"\u00D6verstruken", +text_underline:"Understruken", +text_striketrough:"Genomstruken", +text_blink:"Blinka", +text_none:"Inget", +background_color:"Bakgrundsf\u00E4rg", +background_image:"Bakgrundsbild", +background_repeat:"Upprepning", +background_attachment:"F\u00E4stpunkt", +background_hpos:"Horisontell position", +background_vpos:"Vertikal position", +block_wordspacing:"Ordavbrytning", +block_letterspacing:"Teckenmellanrum", +block_vertical_alignment:"Vertikal justering", +block_text_align:"Textjustering", +block_text_indent:"Textindrag", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Bredd", +box_height:"H\u00F6jd", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Samma f\u00F6r alla", +top:"Toppen", +right:"H\u00F6ger", +bottom:"Botten", +left:"V\u00E4nster", +margin:"Marginal", +style:"Stil", +width:"Bredd", +height:"H\u00F6jd", +color:"F\u00E4rg", +list_type:"Listtyp", +bullet_image:"Punktbild", +position:"Position", +positioning_type:"Positionstyp", +visibility:"Synlighet", +zindex:"Z-index", +overflow:"\u00D6verfl\u00F6de", +placement:"Placering", +clip:"Besk\u00E4rning" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tr_dlg.js new file mode 100644 index 00000000..1c97a7aa --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tr_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('tr.style_dlg',{ +title:"CSS Stili D\u00FCzenle", +apply:"Uygula", +text_tab:"Metin", +background_tab:"Arkaplan", +block_tab:"Blok", +box_tab:"Kutu", +border_tab:"Kenarl\u0131k", +list_tab:"Liste", +positioning_tab:"Konumland\u0131rma", +text_props:"Metin", +text_font:"Yaz\u0131 Tipi", +text_size:"Boyut", +text_weight:"Kal\u0131nl\u0131k", +text_style:"Stil", +text_variant:"De\u011Fi\u015Fken", +text_lineheight:"Sat\u0131r y\u00FCksekli\u011Fi", +text_case:"B\u00FCy\u00FCk/k\u00FC\u00E7\u00FCk", +text_color:"Renk", +text_decoration:"Dekorasyon", +text_overline:"\u00DCst \u00E7izgi", +text_underline:"Alt \u00E7izgi", +text_striketrough:"Ortas\u0131 \u00E7izgili", +text_blink:"yan\u0131p s\u00F6n", +text_none:"hi\u00E7biri", +background_color:"Arkaplan rengi", +background_image:"Arkaplan resmi", +background_repeat:"Tekrarla", +background_attachment:"Eklenti", +background_hpos:"Yatay konum", +background_vpos:"Dikey konum", +block_wordspacing:"S\u00F6zc\u00FCk bo\u015Flu\u011Fu", +block_letterspacing:"Harf bo\u015Flu\u011Fu", +block_vertical_alignment:"Dikey hizalama", +block_text_align:"Metin hizalama", +block_text_indent:"Metin kayd\u0131rma", +block_whitespace:"Bo\u015Fluk", +block_display:"G\u00F6r\u00FCnt\u00FCleme", +box_width:"Geni\u015Flik", +box_height:"Y\u00FCkseklik", +box_float:"Kayan", +box_clear:"Serbest", +padding:"Dolgu", +same:"T\u00FCm\u00FC i\u00E7in ayn\u0131", +top:"\u00DCst", +right:"Sa\u011F", +bottom:"Alt", +left:"Sol", +margin:"Kenar bo\u015Flu\u011Fu", +style:"Stil", +width:"Geni\u015Flik", +height:"Y\u00FCkseklik", +color:"Renk", +list_type:"Tip", +bullet_image:"Madde imi resmi", +position:"Konum", +positioning_type:"Tip", +visibility:"G\u00F6r\u00FCn\u00FCrl\u00FCk", +zindex:"Z-s\u0131ras\u0131", +overflow:"Ta\u015Fma", +placement:"Yerle\u015Ftirme", +clip:"K\u0131rpma" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tt_dlg.js new file mode 100644 index 00000000..1ace7163 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tt_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('tt.style_dlg',{ +title:"\u7DE8\u8F2F CSS \u6A23\u5F0F\u8868", +apply:"\u61C9\u7528", +text_tab:"\u6587\u5B57", +background_tab:"\u80CC\u666F", +block_tab:"\u5340\u584A", +box_tab:"\u76D2\u6A21\u578B", +border_tab:"\u908A\u6846", +list_tab:"\u5217\u8868", +positioning_tab:"\u4F4D\u7F6E", +text_props:"\u6587\u5B57", +text_font:"\u5B57\u9AD4", +text_size:"\u5927\u5C0F", +text_weight:"\u5BEC\u5EA6", +text_style:"\u6A23\u5F0F", +text_variant:"\u8B8A\u9AD4", +text_lineheight:"\u884C\u9AD8", +text_case:"\u5B57\u9AD4", +text_color:"\u9854\u8272", +text_decoration:"\u88DD\u98FE", +text_overline:"\u4E0A\u5283\u7DDA", +text_underline:"\u5E95\u7DDA", +text_striketrough:"\u4E2D\u5283\u7DDA", +text_blink:"\u9583\u720D", +text_none:"\u7121", +background_color:"\u80CC\u666F\u9854\u8272", +background_image:"\u80CC\u666F\u5716\u7247", +background_repeat:"\u91CD\u5FA9", +background_attachment:"\u9644\u4EF6", +background_hpos:"\u6C34\u5E73\u4F4D\u7F6E", +background_vpos:"\u5782\u76F4\u4F4D\u7F6E", +block_wordspacing:"\u8A5E\u9593\u8DDD", +block_letterspacing:"\u5B57\u6BCD\u9593\u8DDD", +block_vertical_alignment:"\u5782\u76F4\u5C0D\u9F4A\u65B9\u5F0F", +block_text_align:"\u6587\u5B57\u5C0D\u9F4A", +block_text_indent:"\u6587\u5B57\u7E2E\u6392", +block_whitespace:"\u7A7A\u683C", +block_display:"\u986F\u793A\u65B9\u5F0F", +box_width:"\u5BEC\u5EA6", +box_height:"\u9AD8\u5EA6", +box_float:"\u6D6E\u52D5", +box_clear:"\u6E05\u9664", +padding:"\u5167\u908A\u8DDD", +same:"\u5168\u90E8\u76F8\u540C", +top:"\u9802\u90E8", +right:"\u53F3\u5074", +bottom:"\u5E95\u90E8", +left:"\u5DE6\u5074", +margin:"\u908A\u8DDD", +style:"\u6A23\u5F0F", +width:"\u5BEC\u5EA6", +height:"\u9AD8\u5EA6", +color:"\u9854\u8272", +list_type:"\u5217\u8868\u985E\u578B", +bullet_image:"\u6E05\u55AE\u5716\u7247", +position:"\u5716\u7247\u4F4D\u7F6E", +positioning_type:"\u4F4D\u7F6E\u985E\u578B", +visibility:"\u662F\u5426\u53EF\u898B", +zindex:"Z\u5EA7\u6A19", +overflow:"\u6EA2\u51FA", +placement:"\u4F48\u7F6E", +clip:"\u526A\u8F2F" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tw_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tw_dlg.js new file mode 100644 index 00000000..25798ea1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/tw_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('tw.style_dlg',{ +title:"\u7DE8\u8F2FCSS\u6A23\u5F0F\u8868", +apply:"\u5957\u7528", +text_tab:"\u6587\u5B57", +background_tab:"\u80CC\u666F", +block_tab:"\u584A", +box_tab:"\u7BB1\u578B", +border_tab:"\u908A\u6846", +list_tab:"\u5217\u8868", +positioning_tab:"\u4F4D\u7F6E", +text_props:"\u6587\u5B57", +text_font:"\u5B57\u9AD4", +text_size:"\u5C3A\u5BF8", +text_weight:"\u5BEC\u5EA6", +text_style:"\u6A23\u5F0F", +text_variant:"\u8B8A\u9AD4", +text_lineheight:"\u884C\u9AD8", +text_case:"\u5B57\u9AD4", +text_color:"\u984F\u8272", +text_decoration:"\u4FEE\u98FE", +text_overline:"\u4E0A\u5283\u7DDA", +text_underline:"\u5E95\u7DDA", +text_striketrough:"\u522A\u9664\u7DDA", +text_blink:"\u9583\u720D", +text_none:"\u7121", +background_color:"\u80CC\u666F\u984F\u8272", +background_image:"\u80CC\u666F\u5716\u7247", +background_repeat:"\u91CD\u8907", +background_attachment:"\u9644\u4EF6", +background_hpos:"\u5782\u76F4\u4F4D\u7F6E", +background_vpos:"\u6C34\u6E96\u4F4D\u7F6E", +block_wordspacing:"\u55AE\u5B57\u9593\u8DDD", +block_letterspacing:"\u5B57\u5143\u9593\u8DDD", +block_vertical_alignment:"\u6C34\u6E96\u5C0D\u9F4A\u65B9\u5F0F", +block_text_align:"\u6587\u5B57\u5C0D\u9F4A", +block_text_indent:"\u6587\u5B57\u7E2E\u6392", +block_whitespace:"\u7A7A\u767D", +block_display:"\u986F\u793A\u65B9\u5F0F", +box_width:"\u5BEC\u5EA6", +box_height:"\u9AD8\u5EA6", +box_float:"\u6D6E\u52D5", +box_clear:"\u6E05\u9664", +padding:"\u7559\u767D", +same:"\u5168\u90E8\u4E00\u6A23", +top:"\u4E0A\u65B9", +right:"\u9760\u53F3", +bottom:"\u4E0B\u65B9", +left:"\u9760\u5DE6", +margin:"\u908A\u754C", +style:"\u6A23\u5F0F", +width:"\u5BEC\u5EA6", +height:"\u9AD8\u5EA6", +color:"\u984F\u8272", +list_type:"\u985E\u578B", +bullet_image:"\u5C08\u6848\u5716\u793A", +position:"\u5716\u793A\u4F4D\u7F6E", +positioning_type:"\u985E\u578B", +visibility:"\u53EF\u898B\u6027", +zindex:"Z\u8EF8\u6DF1\u5EA6", +overflow:"\u6EA2\u51FA", +placement:"\u4F48\u7F6E", +clip:"\u526A\u8F2F" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/uk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/uk_dlg.js new file mode 100644 index 00000000..273479d1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/uk_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('uk.style_dlg',{ +title:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043D\u043D\u044F CSS \u0441\u0442\u0438\u043B\u044E", +apply:"\u0417\u0430\u0441\u0442\u043E\u0441\u0443\u0432\u0430\u0442\u0438", +text_tab:"\u0422\u0435\u043A\u0441\u0442", +background_tab:"\u0424\u043E\u043D", +block_tab:"\u0411\u043B\u043E\u043A", +box_tab:"Box", +border_tab:"\u0413\u0440\u0430\u043D\u0438\u0446\u044F", +list_tab:"\u0421\u043F\u0438\u0441\u043E\u043A", +positioning_tab:"\u041F\u043E\u0437\u0438\u0446\u0456\u043E\u043D\u0443\u0432\u0430\u043D\u043D\u044F", +text_props:"\u0422\u0435\u043A\u0441\u0442", +text_font:"\u0428\u0440\u0438\u0444\u0442", +text_size:"\u0420\u043E\u0437\u043C\u0456\u0440", +text_weight:"\u0422\u043E\u0432\u0449\u0438\u043D\u0430", +text_style:"\u0421\u0442\u0438\u043B\u044C", +text_variant:"Variant", +text_lineheight:"\u0412\u0438\u0441\u043E\u0442\u0430 \u0440\u044F\u0434\u043A\u0443", +text_case:"Case", +text_color:"\u041A\u043E\u043B\u0456\u0440", +text_decoration:"\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u043D\u044F", +text_overline:"\u0432\u0435\u0440\u0445\u043D\u044F \u0440\u0438\u0441\u043A\u0430", +text_underline:"\u043D\u0438\u0436\u043D\u044F \u0440\u0438\u0441\u043A\u0430", +text_striketrough:"\u0437\u0430\u043A\u0440\u0435\u0441\u043B\u0435\u043D\u0438\u0439", +text_blink:"\u043C\u0435\u0440\u0435\u0445\u0442\u0456\u043D\u043D\u044F", +text_none:"\u043D\u0456\u0447\u043E\u0433\u043E", +background_color:"\u041A\u043E\u043B\u0456\u0440 \u0444\u043E\u043D\u0443", +background_image:"\u0424\u043E\u043D\u043E\u0432\u0435 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +background_repeat:"\u041F\u043E\u0432\u0442\u043E\u0440", +background_attachment:"Attachment", +background_hpos:"\u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0430 \u043F\u043E\u0437\u0438\u0446\u0456\u044F", +background_vpos:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u0430 \u043F\u043E\u0437\u0438\u0446\u0456\u044F", +block_wordspacing:"\u0412\u0456\u0434\u0441\u0442\u0443\u043F\u0438 \u043C\u0456\u0436 \u0441\u043B\u043E\u0432\u0430\u043C\u0438", +block_letterspacing:"\u0412\u0456\u0434\u0441\u0442\u0443\u043F\u0438 \u043C\u0456\u0436 \u043B\u0456\u0442\u0435\u0440\u0430\u043C\u0438", +block_vertical_alignment:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u0435 \u0432\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F", +block_text_align:"\u0412\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F \u0442\u0435\u043A\u0441\u0442\u0443", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"\u0428\u0438\u0440\u0438\u043D\u0430", +box_height:"\u0412\u0438\u0441\u043E\u0442\u0430", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"\u041E\u0434\u043D\u0430\u043A\u043E\u0435 \u0434\u043B\u044F \u0432\u0441\u0456\u0445", +top:"\u0412\u0433\u043E\u0440\u0443", +right:"\u041F\u0440\u0430\u0432\u043E\u0440\u0443\u0447", +bottom:"\u0417\u043D\u0438\u0437\u0443", +left:"\u041B\u0456\u0432\u043E\u0440\u0443\u0447", +margin:"Margin", +style:"\u0421\u0442\u0438\u043B\u044C", +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +height:"\u0412\u0438\u0441\u043E\u0442\u0430", +color:"\u041A\u043E\u043B\u0456\u0440", +list_type:"\u0422\u0438\u043F", +bullet_image:"Bullet image", +position:"\u041F\u043E\u0437\u0438\u0446\u0456\u044F", +positioning_type:"\u0422\u0438\u043F", +visibility:"\u0412\u0438\u0434\u0438\u043C\u0456\u0441\u0442\u044C", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/vi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/vi_dlg.js new file mode 100644 index 00000000..68d52f33 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/vi_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('vi.style_dlg',{ +title:"Edit CSS Style", +apply:"Apply", +text_tab:"Text", +background_tab:"Background", +block_tab:"Block", +box_tab:"Box", +border_tab:"Border", +list_tab:"List", +positioning_tab:"Positioning", +text_props:"Text", +text_font:"Font", +text_size:"Size", +text_weight:"Weight", +text_style:"Style", +text_variant:"Variant", +text_lineheight:"Line height", +text_case:"Case", +text_color:"Color", +text_decoration:"Decoration", +text_overline:"overline", +text_underline:"underline", +text_striketrough:"strikethrough", +text_blink:"blink", +text_none:"none", +background_color:"Background color", +background_image:"Background image", +background_repeat:"Repeat", +background_attachment:"Attachment", +background_hpos:"Horizontal position", +background_vpos:"Vertical position", +block_wordspacing:"Word spacing", +block_letterspacing:"Letter spacing", +block_vertical_alignment:"Vertical alignment", +block_text_align:"Text align", +block_text_indent:"Text indent", +block_whitespace:"Whitespace", +block_display:"Display", +box_width:"Width", +box_height:"Height", +box_float:"Float", +box_clear:"Clear", +padding:"Padding", +same:"Same for all", +top:"Top", +right:"Right", +bottom:"Bottom", +left:"Left", +margin:"Margin", +style:"Style", +width:"Width", +height:"Height", +color:"Color", +list_type:"Type", +bullet_image:"Bullet image", +position:"Position", +positioning_type:"Type", +visibility:"Visibility", +zindex:"Z-index", +overflow:"Overflow", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/zh_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/zh_dlg.js new file mode 100644 index 00000000..57818820 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/langs/zh_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('zh.style_dlg',{ +title:"\u7F16\u8F91CSS\u6837\u5F0F\u8868", +apply:"\u5E94\u7528", +text_tab:"\u6587\u5B57", +background_tab:"\u80CC\u666F", +block_tab:"\u5757", +box_tab:"\u7BB1\u578B", +border_tab:"\u8FB9\u6846", +list_tab:"\u5217\u8868", +positioning_tab:"\u4F4D\u7F6E", +text_props:"\u6587\u5B57", +text_font:"\u5B57\u4F53", +text_size:"\u5C3A\u5BF8", +text_weight:"\u5BBD\u5EA6", +text_style:"\u6837\u5F0F", +text_variant:"\u53D8\u4F53", +text_lineheight:"\u884C\u9AD8", +text_case:"\u5B57\u4F53", +text_color:"\u989C\u8272", +text_decoration:"\u4FEE\u9970", +text_overline:"\u4E0A\u5212\u7EBF", +text_underline:"\u4E0B\u5212\u7EBF", +text_striketrough:"\u5220\u9664\u7EBF", +text_blink:"\u95EA\u70C1", +text_none:"\u65E0", +background_color:"\u80CC\u666F\u989C\u8272", +background_image:"\u80CC\u666F\u56FE\u7247", +background_repeat:"\u91CD\u590D", +background_attachment:"\u9644\u4EF6", +background_hpos:"\u5782\u76F4\u4F4D\u7F6E", +background_vpos:"\u6C34\u5E73\u4F4D\u7F6E", +block_wordspacing:"\u5355\u5B57\u95F4\u8DDD", +block_letterspacing:"\u5B57\u7B26\u95F4\u8DDD", +block_vertical_alignment:"\u6C34\u5E73\u5BF9\u9F50\u65B9\u5F0F", +block_text_align:"\u6587\u5B57\u5BF9\u9F50", +block_text_indent:"\u6587\u5B57\u7F29\u6392", +block_whitespace:"\u7A7A\u767D", +block_display:"\u663E\u793A\u65B9\u5F0F", +box_width:"\u5BBD\u5EA6", +box_height:"\u9AD8\u5EA6", +box_float:"\u6D6E\u52A8", +box_clear:"\u6E05\u9664", +padding:"\u7559\u767D", +same:"\u5168\u90E8\u4E00\u6837", +top:"\u4E0A\u65B9", +right:"\u9760\u53F3", +bottom:"\u4E0B\u65B9", +left:"\u9760\u5DE6", +margin:"\u8FB9\u754C", +style:"\u6837\u5F0F", +width:"\u5BBD\u5EA6", +height:"\u9AD8\u5EA6", +color:"\u989C\u8272", +list_type:"\u7C7B\u578B", +bullet_image:"\u9879\u76EE\u56FE\u6807", +position:"\u56FE\u6807\u4F4D\u7F6E", +positioning_type:"\u7C7B\u578B", +visibility:"\u53EF\u89C1\u6027", +zindex:"Z\u8F74\u6DF1\u5EA6", +overflow:"\u6EA2\u51FA", +placement:"\u5E03\u7F6E", +clip:"\u526A\u8F91" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/style/props.htm b/includes/tinymce/jscripts/tiny_mce/plugins/style/props.htm new file mode 100644 index 00000000..54538e35 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/style/props.htm @@ -0,0 +1,731 @@ + + + + {#style_dlg.title} + + + + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
 
+
+ +
+ + + +
+ + + + + + +
+ +  
+
+ +
+ + + + + +
 
+
{#style_dlg.text_decoration} + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
 
+
+ + + + +
 
+
+ + + + + + +
 
+
+ + + + + + +
 
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
 
+
+ + + + + + +
 
+
+ + + + + + +
 
+
+
+ +
+ + + + + + + + + + + + + + +
+ + + + + + +
 
+
   
+ + + + + + +
 
+
   
+
+
+ {#style_dlg.padding} + + + + + + + + + + + + + + + + + + + + + + +
 
+ + + + + + +
 
+
+ + + + + + +
 
+
+ + + + + + +
 
+
+ + + + + + +
 
+
+
+
+ +
+
+ {#style_dlg.margin} + + + + + + + + + + + + + + + + + + + + + + +
 
+ + + + + + +
 
+
+ + + + + + +
 
+
+ + + + + + +
 
+
+ + + + + + +
 
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
      
{#style_dlg.top}   + + + + + + +
 
+
  + + + + + +
 
+
{#style_dlg.right}   + + + + + + +
 
+
  + + + + + +
 
+
{#style_dlg.bottom}   + + + + + + +
 
+
  + + + + + +
 
+
{#style_dlg.left}   + + + + + + +
 
+
  + + + + + +
 
+
+
+ +
+ + + + + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
   
+ + + + + + +
 
+
   
+ + + + + + +
 
+
   
+ +
+
+ {#style_dlg.placement} + + + + + + + + + + + + + + + + + + + + + + +
 
{#style_dlg.top} + + + + + + +
 
+
{#style_dlg.right} + + + + + + +
 
+
{#style_dlg.bottom} + + + + + + +
 
+
{#style_dlg.left} + + + + + + +
 
+
+
+
+ +
+
+ {#style_dlg.clip} + + + + + + + + + + + + + + + + + + + + + + +
 
{#style_dlg.top} + + + + + + +
 
+
{#style_dlg.right} + + + + + + +
 
+
{#style_dlg.bottom} + + + + + + +
 
+
{#style_dlg.left} + + + + + + +
 
+
+
+
+
+
+
+ +
+
+
+ +
 
+
+
+ +
+ +
+
+
+ +
+
+
+ + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/cell.htm b/includes/tinymce/jscripts/tiny_mce/plugins/table/cell.htm index 1a1ab8ad..60264db8 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/cell.htm +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/cell.htm @@ -1,120 +1,184 @@ - - - - -{$lang_table_cell_title} - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang_table_cell_title}
{$lang_insert_table_align}:{$lang_insert_table_class}:
{$lang_insert_table_valign}:  
{$lang_insert_table_width}:{$lang_insert_table_height}:
  
-
- - + + + + {#table_dlg.cell_title} + + + + + + + + + +
+ + +
+
+
+ {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+
+ +
+
+ {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + + +
 
+
+ + + + + +
 
+
+ + + + + +
 
+
+
+
+
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css b/includes/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css new file mode 100644 index 00000000..a067ecdf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css @@ -0,0 +1,17 @@ +/* CSS file for cell dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#class { + width: 150px; +} \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/css/row.css b/includes/tinymce/jscripts/tiny_mce/plugins/table/css/row.css new file mode 100644 index 00000000..1f7755da --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/css/row.css @@ -0,0 +1,25 @@ +/* CSS file for row dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#rowtype,#align,#valign,#class,#height { + width: 150px; +} + +#height { + width: 50px; +} + +.col2 { + padding-left: 20px; +} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/css/table.css b/includes/tinymce/jscripts/tiny_mce/plugins/table/css/table.css new file mode 100644 index 00000000..d11c3f69 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/css/table.css @@ -0,0 +1,13 @@ +/* CSS file for table dialog in the table plugin */ + +.panel_wrapper div.current { + height: 245px; +} + +.advfield { + width: 200px; +} + +#class { + width: 150px; +} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js index 68c0b3db..97a9d256 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js @@ -1,2 +1 @@ -/* Import plugin specific language pack */ - tinyMCE.importPluginLanguagePack('table','en,ar,cs,da,de,el,es,fi,fr_ca,hu,it,ja,ko,nl,no,pl,pt,sv,tw,zh_cn,fr,de');function TinyMCE_table_getControlHTML(control_name){var controls=new Array(['table','table.gif','{$lang_table_desc}','mceInsertTable',true],['delete_col','table_delete_col.gif','{$lang_table_delete_col_desc}','mceTableDeleteCol'],['delete_row','table_delete_row.gif','{$lang_table_delete_row_desc}','mceTableDeleteRow'],['col_after','table_insert_col_after.gif','{$lang_table_insert_col_after_desc}','mceTableInsertColAfter'],['col_before','table_insert_col_before.gif','{$lang_table_insert_col_before_desc}','mceTableInsertColBefore'],['row_after','table_insert_row_after.gif','{$lang_table_insert_row_after_desc}','mceTableInsertRowAfter'],['row_before','table_insert_row_before.gif','{$lang_table_insert_row_before_desc}','mceTableInsertRowBefore'],['row_props','table_row_props.gif','{$lang_table_row_desc}','mceTableRowProps',true],['cell_props','table_cell_props.gif','{$lang_table_cell_desc}','mceTableCellProps',true]);for(var i=0;i';else if(but[0]==control_name)return '';}if(control_name=="tablecontrols"){var html="";html+=tinyMCE.getControlHTML("table");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("row_props");html+=tinyMCE.getControlHTML("cell_props");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("row_before");html+=tinyMCE.getControlHTML("row_after");html+=tinyMCE.getControlHTML("delete_row");html+=tinyMCE.getControlHTML("separator");html+=tinyMCE.getControlHTML("col_before");html+=tinyMCE.getControlHTML("col_after");html+=tinyMCE.getControlHTML("delete_col");return html;}return "";}function TinyMCE_table_execCommand(editor_id,element,command,user_interface,value){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}var inst=tinyMCE.getInstanceById(editor_id);var focusElm=inst.getFocusElement();var tdElm=tinyMCE.getParentElement(focusElm,"td");var trElm=tinyMCE.getParentElement(focusElm,"tr");switch(command){case "mceTableRowProps":if(trElm==null)return true;if(user_interface){var template=new Array();template['file']='../../plugins/table/row.htm';template['width']=340;template['height']=220;tinyMCE.openWindow(template,{editor_id:inst.editorId,align:getAttrib(trElm,'align'),valign:getAttrib(trElm,'valign'),height:getAttrib(trElm,'height'),className:getAttrib(trElm,'className')});}else{trElm.setAttribute('align',value['align']);trElm.setAttribute('vAlign',value['valign']);trElm.setAttribute('height',value['height']);trElm.setAttribute('class',value['className']);trElm.setAttribute('className',value['className']);}return true;case "mceTableCellProps":if(tdElm==null)return true;if(user_interface){var template=new Array();template['file']='../../plugins/table/cell.htm';template['width']=340;template['height']=220;tinyMCE.openWindow(template,{editor_id:inst.editorId,align:getAttrib(tdElm,'align'),valign:getAttrib(tdElm,'valign'),width:getAttrib(tdElm,'width'),height:getAttrib(tdElm,'height'),className:getAttrib(tdElm,'className')});}else{tdElm.setAttribute('align',value['align']);tdElm.setAttribute('vAlign',value['valign']);tdElm.setAttribute('width',value['width']);tdElm.setAttribute('height',value['height']);tdElm.setAttribute('class',value['className']);tdElm.setAttribute('className',value['className']);}return true;case "mceInsertTable":if(user_interface){var cols=2,rows=2,border=0,cellpadding="",cellspacing="",align="",width="",height="",action="insert",className="";tinyMCE.tableElement=tinyMCE.getParentElement(inst.getFocusElement(),"table");if(tinyMCE.tableElement){var rowsAr=tinyMCE.tableElement.rows;var cols=0;for(var i=0;icols)cols=rowsAr[i].cells.length;cols=cols;rows=rowsAr.length;border=tinyMCE.getAttrib(tinyMCE.tableElement,'border',border);cellpadding=tinyMCE.getAttrib(tinyMCE.tableElement,'cellpadding',"");cellspacing=tinyMCE.getAttrib(tinyMCE.tableElement,'cellspacing',"");width=tinyMCE.getAttrib(tinyMCE.tableElement,'width',width);height=tinyMCE.getAttrib(tinyMCE.tableElement,'height',height);align=tinyMCE.getAttrib(tinyMCE.tableElement,'align',align);className=tinyMCE.getAttrib(tinyMCE.tableElement,tinyMCE.isMSIE?'className':"class","");if(tinyMCE.isMSIE){width=tinyMCE.tableElement.style.pixelWidth==0?tinyMCE.tableElement.getAttribute("width"):tinyMCE.tableElement.style.pixelWidth;height=tinyMCE.tableElement.style.pixelHeight==0?tinyMCE.tableElement.getAttribute("height"):tinyMCE.tableElement.style.pixelHeight;}action="update";}var template=new Array();template['file']='../../plugins/table/table.htm';template['width']=340;template['height']=220;template['width']+=tinyMCE.getLang('lang_insert_table_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_table_delta_height',0);tinyMCE.openWindow(template,{editor_id:inst.editorId,cols:cols,rows:rows,border:border,cellpadding:cellpadding,cellspacing:cellspacing,align:align,width:width,height:height,action:action,className:className});}else{var html='';var cols=2,rows=2,border=0,cellpadding=-1,cellspacing=-1,align,width,height,className;if(typeof(value)=='object'){cols=value['cols'];rows=value['rows'];border=value['border']!=""?value['border']:0;cellpadding=value['cellpadding']!=""?value['cellpadding']:-1;cellspacing=value['cellspacing']!=""?value['cellspacing']:-1;align=value['align'];width=value['width'];height=value['height'];className=value['className'];}if(tinyMCE.tableElement){tinyMCE.setAttrib(tinyMCE.tableElement,'cellPadding',cellpadding);tinyMCE.setAttrib(tinyMCE.tableElement,'cellSpacing',cellspacing);tinyMCE.setAttrib(tinyMCE.tableElement,'border',border);tinyMCE.setAttrib(tinyMCE.tableElement,'width',width);tinyMCE.setAttrib(tinyMCE.tableElement,'height',height);tinyMCE.setAttrib(tinyMCE.tableElement,'align',align,true);tinyMCE.setAttrib(tinyMCE.tableElement,tinyMCE.isMSIE?'className':"class",className,true);if(tinyMCE.isMSIE){tinyMCE.tableElement.style.pixelWidth=(width==null||width=="")?0:width;tinyMCE.tableElement.style.pixelHeight=(height==null||height=="")?0:height;}tinyMCE.handleVisualAid(tinyMCE.tableElement,false,inst.visualAid);tinyMCE.tableElement.outerHTML=tinyMCE.tableElement.outerHTML;tinyMCE.triggerNodeChange();return true;}html+='";for(var x=0;x';else html+='";}html+="";}html+="
';html+=" 
";inst.execCommand('mceInsertContent',false,html);}return true;case "mceTableInsertRowBefore":case "mceTableInsertRowAfter":case "mceTableDeleteRow":case "mceTableInsertColBefore":case "mceTableInsertColAfter":case "mceTableDeleteCol":var trElement=tinyMCE.getParentElement(inst.getFocusElement(),"tr");var tdElement=tinyMCE.getParentElement(inst.getFocusElement(),"td");var tableElement=tinyMCE.getParentElement(inst.getFocusElement(),"table");if(!tableElement)return true;var doc=inst.contentWindow.document;var tableBorder=tableElement.getAttribute("border");var visualAidStyle=inst.visualAid?tinyMCE.settings['visual_table_style']:"";if(tableElement.firstChild&&tableElement.firstChild.nodeName.toLowerCase()=="tbody")tableElement=tableElement.firstChild;if(tableElement&&trElement){switch(command){case "mceTableInsertRowBefore":var numcells=trElement.cells.length;var rowCount=0;var tmpTR=trElement;while(tmpTR){if(tmpTR.nodeName.toLowerCase()=="tr")rowCount++;tmpTR=tmpTR.previousSibling;}var r=tableElement.insertRow(rowCount==0?1:rowCount-1);for(var i=0;inumCols)numCols=tableElement.rows[y].cells.length;}if(numCols<=1){if(tinyMCE.isGecko)inst.selectNode(selElm);tableElement.parentNode.removeChild(tableElement);tinyMCE.triggerNodeChange();return true;}for(var y=0;y0)selElm=tableElement.rows[0].cells[index-1];if(tinyMCE.isGecko)inst.selectNode(selElm);break;}tinyMCE.triggerNodeChange();}return true;}return false;}function TinyMCE_table_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_table','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_row_props','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_cell_props','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_row_before','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_row_after','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_delete_row','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_col_before','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_col_after','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_delete_col','mceButtonDisabled',true);if(tinyMCE.getParentElement(node,"tr"))tinyMCE.switchClassSticky(editor_id+'_row_props','mceButtonSelected',false);if(tinyMCE.getParentElement(node,"td")){tinyMCE.switchClassSticky(editor_id+'_cell_props','mceButtonSelected',false);tinyMCE.switchClassSticky(editor_id+'_row_before','mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_row_after','mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_delete_row','mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_col_before','mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_col_after','mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_delete_col','mceButtonNormal',false);}if(tinyMCE.getParentElement(node,"table"))tinyMCE.switchClassSticky(editor_id+'_table','mceButtonSelected');} \ No newline at end of file +(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TablePlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;each([['table','table.desc','mceInsertTable',true],['delete_table','table.del','mceTableDelete'],['delete_col','table.delete_col_desc','mceTableDeleteCol'],['delete_row','table.delete_row_desc','mceTableDeleteRow'],['col_after','table.col_after_desc','mceTableInsertColAfter'],['col_before','table.col_before_desc','mceTableInsertColBefore'],['row_after','table.row_after_desc','mceTableInsertRowAfter'],['row_before','table.row_before_desc','mceTableInsertRowBefore'],['row_props','table.row_desc','mceTableRowProps',true],['cell_props','table.cell_desc','mceTableCellProps',true],['split_cells','table.split_cells_desc','mceTableSplitCells',true],['merge_cells','table.merge_cells_desc','mceTableMergeCells',true]],function(c){ed.addButton(c[0],{title:c[1],cmd:c[2],ui:c[3]});});if(ed.getParam('inline_styles')){ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('table',o.node),function(n){var v;if(v=dom.getAttrib(n,'width')){dom.setStyle(n,'width',v);dom.setAttrib(n,'width');}if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height');}});});}ed.onInit.add(function(){if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){var sm,se=ed.selection,el=se.getNode()||ed.getBody();if(ed.dom.getParent(e,'td')||ed.dom.getParent(e,'th')){m.removeAll();if(el.nodeName=='A'&&!ed.dom.getAttrib(el,'name')){m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});m.addSeparator();}if(el.nodeName=='IMG'&&el.className.indexOf('mceItem')==-1){m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();}m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true,value:{action:'insert'}});m.add({title:'table.props_desc',icon:'table_props',cmd:'mceInsertTable',ui:true});m.add({title:'table.del',icon:'delete_table',cmd:'mceTableDelete',ui:true});m.addSeparator();sm=m.addMenu({title:'table.cell'});sm.add({title:'table.cell_desc',icon:'cell_props',cmd:'mceTableCellProps',ui:true});sm.add({title:'table.split_cells_desc',icon:'split_cells',cmd:'mceTableSplitCells',ui:true});sm.add({title:'table.merge_cells_desc',icon:'merge_cells',cmd:'mceTableMergeCells',ui:true});sm=m.addMenu({title:'table.row'});sm.add({title:'table.row_desc',icon:'row_props',cmd:'mceTableRowProps',ui:true});sm.add({title:'table.row_before_desc',icon:'row_before',cmd:'mceTableInsertRowBefore'});sm.add({title:'table.row_after_desc',icon:'row_after',cmd:'mceTableInsertRowAfter'});sm.add({title:'table.delete_row_desc',icon:'delete_row',cmd:'mceTableDeleteRow'});sm.addSeparator();sm.add({title:'table.cut_row_desc',icon:'cut',cmd:'mceTableCutRow'});sm.add({title:'table.copy_row_desc',icon:'copy',cmd:'mceTableCopyRow'});sm.add({title:'table.paste_row_before_desc',icon:'paste',cmd:'mceTablePasteRowBefore'});sm.add({title:'table.paste_row_after_desc',icon:'paste',cmd:'mceTablePasteRowAfter'});sm=m.addMenu({title:'table.col'});sm.add({title:'table.col_before_desc',icon:'col_before',cmd:'mceTableInsertColBefore'});sm.add({title:'table.col_after_desc',icon:'col_after',cmd:'mceTableInsertColAfter'});sm.add({title:'table.delete_col_desc',icon:'delete_col',cmd:'mceTableDeleteCol'});}else m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true});});}});ed.onKeyDown.add(function(ed,e){if(e.keyCode==9&&ed.dom.getParent(ed.selection.getNode(),'TABLE')){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(ed.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(e);}ed.undoManager.add();}});if(!tinymce.isIE){if(ed.getParam('table_selection',true)){ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='TABLE')ed.selection.select(e);});}}ed.onNodeChange.add(function(ed,cm,n){var p=ed.dom.getParent(n,'td,th,caption');cm.setActive('table',n.nodeName==='TABLE'||!!p);if(p&&p.nodeName==='CAPTION')p=null;cm.setDisabled('delete_table',!p);cm.setDisabled('delete_col',!p);cm.setDisabled('delete_table',!p);cm.setDisabled('delete_row',!p);cm.setDisabled('col_after',!p);cm.setDisabled('col_before',!p);cm.setDisabled('row_after',!p);cm.setDisabled('row_before',!p);cm.setDisabled('row_props',!p);cm.setDisabled('cell_props',!p);cm.setDisabled('split_cells',!p||(parseInt(ed.dom.getAttrib(p,'colspan','1'))<2&&parseInt(ed.dom.getAttrib(p,'rowspan','1'))<2));cm.setDisabled('merge_cells',!p);});if(!tinymce.isIE){ed.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?'<$1$2> ':'<$1$2>
');});}},execCommand:function(cmd,ui,val){var ed=this.editor,b;switch(cmd){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":ed.execCommand('mceBeginUndoLevel');this._doExecCommand(cmd,ui,val);ed.execCommand('mceEndUndoLevel');return true;}return false;},getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_doExecCommand:function(command,user_interface,value){var inst=this.editor,ed=inst,url=this.url;var focusElm=inst.selection.getNode();var trElm=inst.dom.getParent(focusElm,"tr");var tdElm=inst.dom.getParent(focusElm,"td,th");var tableElm=inst.dom.getParent(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i0&&inArray(ar[i],v))return true;if(ar[i]==v)return true;}return false;}function select(dx,dy){var td;grid=getTableGrid(tableElm);dx=dx||0;dy=dy||0;dx=Math.max(cpos.cellindex+dx,0);dy=Math.max(cpos.rowindex+dy,0);inst.execCommand('mceRepaint');td=getCell(grid,dy,dx);if(td){inst.selection.select(td.firstChild||td);inst.selection.collapse(1);}};function makeTD(){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
';}function getColRowSpan(td){var colspan=inst.dom.getAttrib(td,"colspan");var rowspan=inst.dom.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan};}function getCellPos(grid,td){var x,y;for(y=0;y1){for(var i=x;i1)td.rowSpan=sd.rowspan+1;lastElm=td;}deleteMarked(tableElm);}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node;}return null;}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td);}while((td=nexttd)!=null);}}while((tr=next)!=null);}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i';if(tinymce.isIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR");}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=inst.dom.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i';}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm;}return newTR;}switch(command){case"mceTableMoveToNextRow":var nextCell=getNextCell(tableElm,tdElm);if(!nextCell){inst.execCommand("mceTableInsertRowAfter",tdElm);nextCell=getNextCell(tableElm,tdElm);}inst.selection.select(nextCell);inst.selection.collapse(true);return true;case"mceTableRowProps":if(trElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/row.htm',width:400+parseInt(inst.getLang('table.rowprops_delta_width',0)),height:295+parseInt(inst.getLang('table.rowprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/cell.htm',width:400+parseInt(inst.getLang('table.cellprops_delta_width',0)),height:295+parseInt(inst.getLang('table.cellprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceInsertTable":if(user_interface){inst.windowManager.open({url:url+'/table.htm',width:400+parseInt(inst.getLang('table.table_delta_width',0)),height:320+parseInt(inst.getLang('table.table_delta_height',0)),inline:1},{plugin_url:url,action:value?value.action:0});}return true;case"mceTableDelete":var table=inst.dom.getParent(inst.selection.getNode(),"table");if(table){table.parentNode.removeChild(table);inst.execCommand('mceRepaint');}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(trElm&&tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}trElm.parentNode.insertBefore(newTR,trElm);select(0,1);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR);}select(0,1);break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD);}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1;}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true;}lastTDElm=tdElm;}}deleteMarked(tableElm);select(0,-1);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='
';newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm);}else tdElm.colSpan++;lastTDElm=tdElm;}}select();break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='
';newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD);}else tdElm.colSpan++;lastTDElm=tdElm;}}select(1);break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if((grid.length>1&&grid[0].length<=1)&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm);}lastTDElm=tdElm;}}select(-1);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i';trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan);}addRows(tdElm,trElm,rowspan);}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");break;case"mceTableMergeCells":var rows=[];var sel=inst.selection.getSel();var grid=getTableGrid(tableElm);if(tinymce.isIE||sel.rangeCount==1){if(user_interface){var sp=getColRowSpan(tdElm);inst.windowManager.open({url:url+'/merge_cells.htm',width:240+parseInt(inst.getLang('table.merge_cells_delta_width',0)),height:110+parseInt(inst.getLang('table.merge_cells_delta_height',0)),inline:1},{action:"update",numcols:sp.colspan,numrows:sp.rowspan,plugin_url:url});return true;}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y0)rows[rows.length]=rowCells;var td=getCell(grid,cpos.rowindex,cpos.cellindex);each(ed.dom.select('br',td),function(e,i){if(i>0&&ed.dom.getAttrib('mce_bogus'))ed.dom.remove(e);});}}}else{var cells=[];var sel=inst.selection.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i0)rows[rows.length]=rowCells;}var curRow=[];var lastTR=null;for(var y=0;ycolSpan)colSpan=rowColSpan;lastRowSpan=-1;}var lastColSpan=-1;for(var x=0;xrowSpan)rowSpan=colRowSpan;lastColSpan=-1;}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm;}if(tdElm.rowSpan>1)tdElm.rowSpan--;}}}}each(ed.dom.select('br',tdElm),function(e,i){if(i>0&&ed.dom.getAttrib(e,'mce_bogus'))ed.dom.remove(e);});break;}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");inst.addVisual(tableElm);inst.nodeChanged();}return true;}return false;}});tinymce.PluginManager.add('table',tinymce.plugins.TablePlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js index ef74e180..80cf748a 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js @@ -1,472 +1,1136 @@ -/* Import plugin specific language pack */ -tinyMCE.importPluginLanguagePack('table', 'en,ar,cs,da,de,el,es,fi,fr_ca,hu,it,ja,ko,nl,no,pl,pt,sv,tw,zh_cn,fr,de'); - -/** - * Returns the HTML contents of the table control. - */ -function TinyMCE_table_getControlHTML(control_name) { - var controls = new Array( - ['table', 'table.gif', '{$lang_table_desc}', 'mceInsertTable', true], - ['delete_col', 'table_delete_col.gif', '{$lang_table_delete_col_desc}', 'mceTableDeleteCol'], - ['delete_row', 'table_delete_row.gif', '{$lang_table_delete_row_desc}', 'mceTableDeleteRow'], - ['col_after', 'table_insert_col_after.gif', '{$lang_table_insert_col_after_desc}', 'mceTableInsertColAfter'], - ['col_before', 'table_insert_col_before.gif', '{$lang_table_insert_col_before_desc}', 'mceTableInsertColBefore'], - ['row_after', 'table_insert_row_after.gif', '{$lang_table_insert_row_after_desc}', 'mceTableInsertRowAfter'], - ['row_before', 'table_insert_row_before.gif', '{$lang_table_insert_row_before_desc}', 'mceTableInsertRowBefore'], - ['row_props', 'table_row_props.gif', '{$lang_table_row_desc}', 'mceTableRowProps', true], - ['cell_props', 'table_cell_props.gif', '{$lang_table_cell_desc}', 'mceTableCellProps', true]); - - // Render table control - for (var i=0; i'; - else - if (but[0] == control_name) - return ''; - } - - // Special tablecontrols - if (control_name == "tablecontrols") { - var html = ""; - - html += tinyMCE.getControlHTML("table"); - html += tinyMCE.getControlHTML("separator"); - html += tinyMCE.getControlHTML("row_props"); - html += tinyMCE.getControlHTML("cell_props"); - html += tinyMCE.getControlHTML("separator"); - html += tinyMCE.getControlHTML("row_before"); - html += tinyMCE.getControlHTML("row_after"); - html += tinyMCE.getControlHTML("delete_row"); - html += tinyMCE.getControlHTML("separator"); - html += tinyMCE.getControlHTML("col_before"); - html += tinyMCE.getControlHTML("col_after"); - html += tinyMCE.getControlHTML("delete_col"); - - return html; - } - - return ""; -} - -/** - * Executes the table commands. - */ -function TinyMCE_table_execCommand(editor_id, element, command, user_interface, value) { - function getAttrib(elm, name) { - return elm.getAttribute(name) ? elm.getAttribute(name) : ""; - } - - var inst = tinyMCE.getInstanceById(editor_id); - var focusElm = inst.getFocusElement(); - var tdElm = tinyMCE.getParentElement(focusElm, "td"); - var trElm = tinyMCE.getParentElement(focusElm, "tr"); - - // Handle commands - switch (command) { - case "mceTableRowProps": - if (trElm == null) - return true; - - if (user_interface) { - // Setup template - var template = new Array(); - - template['file'] = '../../plugins/table/row.htm'; - template['width'] = 340; - template['height'] = 220; - - // Open window - tinyMCE.openWindow(template, {editor_id : inst.editorId, align : getAttrib(trElm, 'align'), valign : getAttrib(trElm, 'valign'), height : getAttrib(trElm, 'height'), className : getAttrib(trElm, 'className')}); - } else { - trElm.setAttribute('align', value['align']); - trElm.setAttribute('vAlign', value['valign']); - trElm.setAttribute('height', value['height']); - trElm.setAttribute('class', value['className']); - trElm.setAttribute('className', value['className']); - } - - return true; - - case "mceTableCellProps": - if (tdElm == null) - return true; - - if (user_interface) { - // Setup template - var template = new Array(); - - template['file'] = '../../plugins/table/cell.htm'; - template['width'] = 340; - template['height'] = 220; - - // Open window - tinyMCE.openWindow(template, {editor_id : inst.editorId, align : getAttrib(tdElm, 'align'), valign : getAttrib(tdElm, 'valign'), width : getAttrib(tdElm, 'width'), height : getAttrib(tdElm, 'height'), className : getAttrib(tdElm, 'className')}); - } else { - tdElm.setAttribute('align', value['align']); - tdElm.setAttribute('vAlign', value['valign']); - tdElm.setAttribute('width', value['width']); - tdElm.setAttribute('height', value['height']); - tdElm.setAttribute('class', value['className']); - tdElm.setAttribute('className', value['className']); - } - - return true; - - case "mceInsertTable": - if (user_interface) { - var cols = 2, rows = 2, border = 0, cellpadding = "", cellspacing = "", align = "", width = "", height = "", action = "insert", className = ""; - - tinyMCE.tableElement = tinyMCE.getParentElement(inst.getFocusElement(), "table"); - - if (tinyMCE.tableElement) { - var rowsAr = tinyMCE.tableElement.rows; - var cols = 0; - for (var i=0; i cols) - cols = rowsAr[i].cells.length; - - cols = cols; - rows = rowsAr.length; - - border = tinyMCE.getAttrib(tinyMCE.tableElement, 'border', border); - cellpadding = tinyMCE.getAttrib(tinyMCE.tableElement, 'cellpadding', ""); - cellspacing = tinyMCE.getAttrib(tinyMCE.tableElement, 'cellspacing', ""); - width = tinyMCE.getAttrib(tinyMCE.tableElement, 'width', width); - height = tinyMCE.getAttrib(tinyMCE.tableElement, 'height', height); - align = tinyMCE.getAttrib(tinyMCE.tableElement, 'align', align); - className = tinyMCE.getAttrib(tinyMCE.tableElement, tinyMCE.isMSIE ? 'className' : "class", ""); - - if (tinyMCE.isMSIE) { - width = tinyMCE.tableElement.style.pixelWidth == 0 ? tinyMCE.tableElement.getAttribute("width") : tinyMCE.tableElement.style.pixelWidth; - height = tinyMCE.tableElement.style.pixelHeight == 0 ? tinyMCE.tableElement.getAttribute("height") : tinyMCE.tableElement.style.pixelHeight; - } - - action = "update"; - } - - // Setup template - var template = new Array(); - - template['file'] = '../../plugins/table/table.htm'; - template['width'] = 340; - template['height'] = 220; - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_insert_table_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_insert_table_delta_height', 0); - - // Open window - tinyMCE.openWindow(template, {editor_id : inst.editorId, cols : cols, rows : rows, border : border, cellpadding : cellpadding, cellspacing : cellspacing, align : align, width : width, height : height, action : action, className : className}); - } else { - var html = ''; - var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className; - - if (typeof(value) == 'object') { - cols = value['cols']; - rows = value['rows']; - border = value['border'] != "" ? value['border'] : 0; - cellpadding = value['cellpadding'] != "" ? value['cellpadding'] : -1; - cellspacing = value['cellspacing'] != "" ? value['cellspacing'] : -1; - align = value['align']; - width = value['width']; - height = value['height']; - className = value['className']; - } - - // Update table - if (tinyMCE.tableElement) { - tinyMCE.setAttrib(tinyMCE.tableElement, 'cellPadding', cellpadding); - tinyMCE.setAttrib(tinyMCE.tableElement, 'cellSpacing', cellspacing); - tinyMCE.setAttrib(tinyMCE.tableElement, 'border', border); - tinyMCE.setAttrib(tinyMCE.tableElement, 'width', width); - tinyMCE.setAttrib(tinyMCE.tableElement, 'height', height); - tinyMCE.setAttrib(tinyMCE.tableElement, 'align', align, true); - tinyMCE.setAttrib(tinyMCE.tableElement, tinyMCE.isMSIE ? 'className' : "class", className, true); - - if (tinyMCE.isMSIE) { - tinyMCE.tableElement.style.pixelWidth = (width == null || width == "") ? 0 : width; - tinyMCE.tableElement.style.pixelHeight = (height == null || height == "") ? 0 : height; - } - - tinyMCE.handleVisualAid(tinyMCE.tableElement, false, inst.visualAid); - - // Fix for stange MSIE align bug - tinyMCE.tableElement.outerHTML = tinyMCE.tableElement.outerHTML; - - //inst.contentWindow.dispatchEvent(createEvent("click")); - - tinyMCE.triggerNodeChange(); - return true; - } - - // Create new table - html += ''; - else - html += '"; - } - html += ""; - } - - html += "
'; - - html += " 
"; - - inst.execCommand('mceInsertContent', false, html); - } - - return true; - - case "mceTableInsertRowBefore": - case "mceTableInsertRowAfter": - case "mceTableDeleteRow": - case "mceTableInsertColBefore": - case "mceTableInsertColAfter": - case "mceTableDeleteCol": - var trElement = tinyMCE.getParentElement(inst.getFocusElement(), "tr"); - var tdElement = tinyMCE.getParentElement(inst.getFocusElement(), "td"); - var tableElement = tinyMCE.getParentElement(inst.getFocusElement(), "table"); - - // No table just return (invalid command) - if (!tableElement) - return true; - - var doc = inst.contentWindow.document; - var tableBorder = tableElement.getAttribute("border"); - var visualAidStyle = inst.visualAid ? tinyMCE.settings['visual_table_style'] : ""; - - // Table has a tbody use that reference - if (tableElement.firstChild && tableElement.firstChild.nodeName.toLowerCase() == "tbody") - tableElement = tableElement.firstChild; - - if (tableElement && trElement) { - switch (command) { - case "mceTableInsertRowBefore": - var numcells = trElement.cells.length; - var rowCount = 0; - var tmpTR = trElement; - - // Count rows - while (tmpTR) { - if (tmpTR.nodeName.toLowerCase() == "tr") - rowCount++; - - tmpTR = tmpTR.previousSibling; - } - - var r = tableElement.insertRow(rowCount == 0 ? 1 : rowCount-1); - for (var i=0; i numCols) - numCols = tableElement.rows[y].cells.length; - } - - // Remove whole table - if (numCols <= 1) { - if (tinyMCE.isGecko) - inst.selectNode(selElm); - - tableElement.parentNode.removeChild(tableElement); - tinyMCE.triggerNodeChange(); - return true; - } - - // Remove columns - for (var y=0; y 0) - selElm = tableElement.rows[0].cells[index-1]; - - if (tinyMCE.isGecko) - inst.selectNode(selElm); - break; - } - - tinyMCE.triggerNodeChange(); - } - - return true; - } - - // Pass to next handler in chain - return false; -} - -function TinyMCE_table_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - // Reset table controls - tinyMCE.switchClassSticky(editor_id + '_table', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_row_props', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_cell_props', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_row_before', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_row_after', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_delete_row', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_col_before', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_col_after', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_delete_col', 'mceButtonDisabled', true); - - // Within a tr element - if (tinyMCE.getParentElement(node, "tr")) - tinyMCE.switchClassSticky(editor_id + '_row_props', 'mceButtonSelected', false); - - // Within a td element - if (tinyMCE.getParentElement(node, "td")) { - tinyMCE.switchClassSticky(editor_id + '_cell_props', 'mceButtonSelected', false); - tinyMCE.switchClassSticky(editor_id + '_row_before', 'mceButtonNormal', false); - tinyMCE.switchClassSticky(editor_id + '_row_after', 'mceButtonNormal', false); - tinyMCE.switchClassSticky(editor_id + '_delete_row', 'mceButtonNormal', false); - tinyMCE.switchClassSticky(editor_id + '_col_before', 'mceButtonNormal', false); - tinyMCE.switchClassSticky(editor_id + '_col_after', 'mceButtonNormal', false); - tinyMCE.switchClassSticky(editor_id + '_delete_col', 'mceButtonNormal', false); - } - - // Within table - if (tinyMCE.getParentElement(node, "table")) - tinyMCE.switchClassSticky(editor_id + '_table', 'mceButtonSelected'); -} +/** + * $Id: editor_plugin_src.js 953 2008-11-04 10:16:50Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var each = tinymce.each; + + tinymce.create('tinymce.plugins.TablePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + t.url = url; + + // Register buttons + each([ + ['table', 'table.desc', 'mceInsertTable', true], + ['delete_table', 'table.del', 'mceTableDelete'], + ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], + ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], + ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], + ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], + ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], + ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], + ['row_props', 'table.row_desc', 'mceTableRowProps', true], + ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], + ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], + ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] + ], function(c) { + ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); + }); + + if (ed.getParam('inline_styles')) { + // Force move of attribs to styles in strict mode + ed.onPreProcess.add(function(ed, o) { + var dom = ed.dom; + + each(dom.select('table', o.node), function(n) { + var v; + + if (v = dom.getAttrib(n, 'width')) { + dom.setStyle(n, 'width', v); + dom.setAttrib(n, 'width'); + } + + if (v = dom.getAttrib(n, 'height')) { + dom.setStyle(n, 'height', v); + dom.setAttrib(n, 'height'); + } + }); + }); + } + + ed.onInit.add(function() { + if (ed && ed.plugins.contextmenu) { + ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { + var sm, se = ed.selection, el = se.getNode() || ed.getBody(); + + if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th')) { + m.removeAll(); + + if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + m.addSeparator(); + } + + if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + m.addSeparator(); + } + + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true, value : {action : 'insert'}}); + m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable', ui : true}); + m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete', ui : true}); + m.addSeparator(); + + // Cell menu + sm = m.addMenu({title : 'table.cell'}); + sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps', ui : true}); + sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells', ui : true}); + sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells', ui : true}); + + // Row menu + sm = m.addMenu({title : 'table.row'}); + sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps', ui : true}); + sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); + sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); + sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); + sm.addSeparator(); + sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); + sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); + sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}); + sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}); + + // Column menu + sm = m.addMenu({title : 'table.col'}); + sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); + sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); + sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); + } else + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true}); + }); + } + }); + + // Add undo level when new rows are created using the tab key + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode == 9 && ed.dom.getParent(ed.selection.getNode(), 'TABLE')) { + if (!tinymce.isGecko && !tinymce.isOpera) { + tinyMCE.execInstanceCommand(ed.editorId, "mceTableMoveToNextRow", true); + return tinymce.dom.Event.cancel(e); + } + + ed.undoManager.add(); + } + }); + + // Select whole table is a table border is clicked + if (!tinymce.isIE) { + if (ed.getParam('table_selection', true)) { + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'TABLE') + ed.selection.select(e); + }); + } + } + + ed.onNodeChange.add(function(ed, cm, n) { + var p = ed.dom.getParent(n, 'td,th,caption'); + + cm.setActive('table', n.nodeName === 'TABLE' || !!p); + if (p && p.nodeName === 'CAPTION') + p = null; + + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_col', !p); + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_row', !p); + cm.setDisabled('col_after', !p); + cm.setDisabled('col_before', !p); + cm.setDisabled('row_after', !p); + cm.setDisabled('row_before', !p); + cm.setDisabled('row_props', !p); + cm.setDisabled('cell_props', !p); + cm.setDisabled('split_cells', !p || (parseInt(ed.dom.getAttrib(p, 'colspan', '1')) < 2 && parseInt(ed.dom.getAttrib(p, 'rowspan', '1')) < 2)); + cm.setDisabled('merge_cells', !p); + }); + + // Padd empty table cells + if (!tinymce.isIE) { + ed.onBeforeSetContent.add(function(ed, o) { + if (o.initial) + o.content = o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g, tinymce.isOpera ? '<$1$2> ' : '<$1$2>
'); + }); + } + }, + + execCommand : function(cmd, ui, val) { + var ed = this.editor, b; + + // Is table command + switch (cmd) { + case "mceTableMoveToNextRow": + case "mceInsertTable": + case "mceTableRowProps": + case "mceTableCellProps": + case "mceTableSplitCells": + case "mceTableMergeCells": + case "mceTableInsertRowBefore": + case "mceTableInsertRowAfter": + case "mceTableDeleteRow": + case "mceTableInsertColBefore": + case "mceTableInsertColAfter": + case "mceTableDeleteCol": + case "mceTableCutRow": + case "mceTableCopyRow": + case "mceTablePasteRowBefore": + case "mceTablePasteRowAfter": + case "mceTableDelete": + ed.execCommand('mceBeginUndoLevel'); + this._doExecCommand(cmd, ui, val); + ed.execCommand('mceEndUndoLevel'); + + return true; + } + + // Pass to next handler in chain + return false; + }, + + getInfo : function() { + return { + longname : 'Tables', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private plugin internal methods + + /** + * Executes the table commands. + */ + _doExecCommand : function(command, user_interface, value) { + var inst = this.editor, ed = inst, url = this.url; + var focusElm = inst.selection.getNode(); + var trElm = inst.dom.getParent(focusElm, "tr"); + var tdElm = inst.dom.getParent(focusElm, "td,th"); + var tableElm = inst.dom.getParent(focusElm, "table"); + var doc = inst.contentWindow.document; + var tableBorder = tableElm ? tableElm.getAttribute("border") : ""; + + // Get first TD if no TD found + if (trElm && tdElm == null) + tdElm = trElm.cells[0]; + + function inArray(ar, v) { + for (var i=0; i 0 && inArray(ar[i], v)) + return true; + + // Found value + if (ar[i] == v) + return true; + } + + return false; + } + + function select(dx, dy) { + var td; + + grid = getTableGrid(tableElm); + dx = dx || 0; + dy = dy || 0; + dx = Math.max(cpos.cellindex + dx, 0); + dy = Math.max(cpos.rowindex + dy, 0); + + // Recalculate grid and select + inst.execCommand('mceRepaint'); + td = getCell(grid, dy, dx); + + if (td) { + inst.selection.select(td.firstChild || td); + inst.selection.collapse(1); + } + }; + + function makeTD() { + var newTD = doc.createElement("td"); + + if (!tinymce.isIE) + newTD.innerHTML = '
'; + } + + function getColRowSpan(td) { + var colspan = inst.dom.getAttrib(td, "colspan"); + var rowspan = inst.dom.getAttrib(td, "rowspan"); + + colspan = colspan == "" ? 1 : parseInt(colspan); + rowspan = rowspan == "" ? 1 : parseInt(rowspan); + + return {colspan : colspan, rowspan : rowspan}; + } + + function getCellPos(grid, td) { + var x, y; + + for (y=0; y 1) { // Remove due to colspan + for (var i=x; i 1) + td.rowSpan = sd.rowspan + 1; + + lastElm = td; + } + + deleteMarked(tableElm); + } + } + + function prevElm(node, name) { + while ((node = node.previousSibling) != null) { + if (node.nodeName == name) + return node; + } + + return null; + } + + function nextElm(node, names) { + var namesAr = names.split(','); + + while ((node = node.nextSibling) != null) { + for (var i=0; i 1) { + do { + var nexttd = nextElm(td, "TD,TH"); + + if (td._delete) + td.parentNode.removeChild(td); + } while ((td = nexttd) != null); + } + } while ((tr = next) != null); + } + + function addRows(td_elm, tr_elm, rowspan) { + // Add rows + td_elm.rowSpan = 1; + var trNext = nextElm(tr_elm, "TR"); + for (var i=1; i 1) { + var newTD = cells[x].cloneNode(true); + var sd = getColRowSpan(cells[x]); + + newTD.rowSpan = sd.rowspan - 1; + + var nextTD = nextTR.cells[x]; + + if (nextTD == null) + nextTR.appendChild(newTD); + else + nextTR.insertBefore(newTD, nextTD); + } + } + + // Delete cells + var lastTDElm = null; + for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { + if (tdElm != lastTDElm) { + var sd = getColRowSpan(tdElm); + + if (sd.rowspan > 1) { + tdElm.rowSpan = sd.rowspan - 1; + } else { + trElm = tdElm.parentNode; + + if (trElm.parentNode) + trElm._delete = true; + } + + lastTDElm = tdElm; + } + } + + deleteMarked(tableElm); + + select(0, -1); + break; + + case "mceTableInsertColBefore": + if (!trElm || !tdElm) + return true; + + var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); + var cpos = getCellPos(grid, tdElm); + var lastTDElm = null; + + for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { + if (tdElm != lastTDElm) { + var sd = getColRowSpan(tdElm); + + if (sd['colspan'] == 1) { + var newTD = doc.createElement(tdElm.nodeName); + + if (!tinymce.isIE) + newTD.innerHTML = '
'; + + newTD.rowSpan = tdElm.rowSpan; + + tdElm.parentNode.insertBefore(newTD, tdElm); + } else + tdElm.colSpan++; + + lastTDElm = tdElm; + } + } + + select(); + break; + + case "mceTableInsertColAfter": + if (!trElm || !tdElm) + return true; + + var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); + var cpos = getCellPos(grid, tdElm); + var lastTDElm = null; + + for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { + if (tdElm != lastTDElm) { + var sd = getColRowSpan(tdElm); + + if (sd['colspan'] == 1) { + var newTD = doc.createElement(tdElm.nodeName); + + if (!tinymce.isIE) + newTD.innerHTML = '
'; + + newTD.rowSpan = tdElm.rowSpan; + + var nextTD = nextElm(tdElm, "TD,TH"); + if (nextTD == null) + tdElm.parentNode.appendChild(newTD); + else + nextTD.parentNode.insertBefore(newTD, nextTD); + } else + tdElm.colSpan++; + + lastTDElm = tdElm; + } + } + + select(1); + break; + + case "mceTableDeleteCol": + if (!trElm || !tdElm) + return true; + + var grid = getTableGrid(tableElm); + var cpos = getCellPos(grid, tdElm); + var lastTDElm = null; + + // Only one col, remove whole table + if ((grid.length > 1 && grid[0].length <= 1) && tableElm.nodeName == 'TBODY') { + inst.dom.remove(inst.dom.getParent(tableElm, "table")); + return true; + } + + // Delete cells + for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { + if (tdElm != lastTDElm) { + var sd = getColRowSpan(tdElm); + + if (sd['colspan'] > 1) + tdElm.colSpan = sd['colspan'] - 1; + else { + if (tdElm.parentNode) + tdElm.parentNode.removeChild(tdElm); + } + + lastTDElm = tdElm; + } + } + + select(-1); + break; + + case "mceTableSplitCells": + if (!trElm || !tdElm) + return true; + + var spandata = getColRowSpan(tdElm); + + var colspan = spandata["colspan"]; + var rowspan = spandata["rowspan"]; + + // Needs splitting + if (colspan > 1 || rowspan > 1) { + // Generate cols + tdElm.colSpan = 1; + for (var i=1; i 1) + addRows(newTD, trElm, rowspan); + } + + addRows(tdElm, trElm, rowspan); + } + + // Apply visual aids + tableElm = inst.dom.getParent(inst.selection.getNode(), "table"); + break; + + case "mceTableMergeCells": + var rows = []; + var sel = inst.selection.getSel(); + var grid = getTableGrid(tableElm); + + if (tinymce.isIE || sel.rangeCount == 1) { + if (user_interface) { + // Setup template + var sp = getColRowSpan(tdElm); + + inst.windowManager.open({ + url : url + '/merge_cells.htm', + width : 240 + parseInt(inst.getLang('table.merge_cells_delta_width', 0)), + height : 110 + parseInt(inst.getLang('table.merge_cells_delta_height', 0)), + inline : 1 + }, { + action : "update", + numcols : sp.colspan, + numrows : sp.rowspan, + plugin_url : url + }); + + return true; + } else { + var numRows = parseInt(value['numrows']); + var numCols = parseInt(value['numcols']); + var cpos = getCellPos(grid, tdElm); + + if (("" + numRows) == "NaN") + numRows = 1; + + if (("" + numCols) == "NaN") + numCols = 1; + + // Get rows and cells + var tRows = tableElm.rows; + for (var y=cpos.rowindex; y 0) + rows[rows.length] = rowCells; + + var td = getCell(grid, cpos.rowindex, cpos.cellindex); + each(ed.dom.select('br', td), function(e, i) { + if (i > 0 && ed.dom.getAttrib('mce_bogus')) + ed.dom.remove(e); + }); + } + + //return true; + } + } else { + var cells = []; + var sel = inst.selection.getSel(); + var lastTR = null; + var curRow = null; + var x1 = -1, y1 = -1, x2, y2; + + // Only one cell selected, whats the point? + if (sel.rangeCount < 2) + return true; + + // Get all selected cells + for (var i=0; i 0) + rows[rows.length] = rowCells; + } + + // Find selected cells in grid and box + var curRow = []; + var lastTR = null; + for (var y=0; y colSpan) + colSpan = rowColSpan; + + lastRowSpan = -1; + } + + // Validate vertical and get total rowspan + var lastColSpan = -1; + for (var x=0; x rowSpan) + rowSpan = colRowSpan; + + lastColSpan = -1; + } + + // Setup td + tdElm = rows[0][0]; + tdElm.rowSpan = rowSpan; + tdElm.colSpan = colSpan; + + // Merge cells + for (var y=0; y 0)) + tdElm.innerHTML += html; + + // Not current cell + if (rows[y][x] != tdElm && !rows[y][x]._deleted) { + var cpos = getCellPos(grid, rows[y][x]); + var tr = rows[y][x].parentNode; + + tr.removeChild(rows[y][x]); + rows[y][x]._deleted = true; + + // Empty TR, remove it + if (!tr.hasChildNodes()) { + tr.parentNode.removeChild(tr); + + var lastCell = null; + for (var x=0; cellElm = getCell(grid, cpos.rowindex, x); x++) { + if (cellElm != lastCell && cellElm.rowSpan > 1) + cellElm.rowSpan--; + + lastCell = cellElm; + } + + if (tdElm.rowSpan > 1) + tdElm.rowSpan--; + } + } + } + } + + // Remove all but one bogus br + each(ed.dom.select('br', tdElm), function(e, i) { + if (i > 0 && ed.dom.getAttrib(e, 'mce_bogus')) + ed.dom.remove(e); + }); + + break; + } + + tableElm = inst.dom.getParent(inst.selection.getNode(), "table"); + inst.addVisual(tableElm); + inst.nodeChanged(); + } + + return true; + } + + // Pass to next handler in chain + return false; + } + }); + + // Register plugin + tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/buttons.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/buttons.gif deleted file mode 100644 index 7a7d93bc..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/buttons.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table.gif deleted file mode 100644 index f8a00544..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_cell_props.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_cell_props.gif deleted file mode 100644 index 9e0f3739..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_cell_props.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_delete_col.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_delete_col.gif deleted file mode 100644 index 0b2f0fb6..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_delete_col.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_delete_row.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_delete_row.gif deleted file mode 100644 index 1997065f..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_delete_row.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_col_after.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_col_after.gif deleted file mode 100644 index c30dafab..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_col_after.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_col_before.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_col_before.gif deleted file mode 100644 index 5d1ff37a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_col_before.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_row_after.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_row_after.gif deleted file mode 100644 index c3aa15f9..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_row_after.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_row_before.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_row_before.gif deleted file mode 100644 index c3271e54..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_insert_row_before.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_row_props.gif b/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_row_props.gif deleted file mode 100644 index a53cdd8b..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/plugins/table/images/table_row_props.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js new file mode 100644 index 00000000..f23b0675 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js @@ -0,0 +1,269 @@ +tinyMCEPopup.requireLangPack(); + +var ed; + +function init() { + ed = tinyMCEPopup.editor; + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') + + var inst = ed; + var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th"); + var formObj = document.forms[0]; + var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); + + // Get table cell data + var celltype = tdElm.nodeName.toLowerCase(); + var align = ed.dom.getAttrib(tdElm, 'align'); + var valign = ed.dom.getAttrib(tdElm, 'valign'); + var width = trimSize(getStyle(tdElm, 'width', 'width')); + var height = trimSize(getStyle(tdElm, 'height', 'height')); + var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); + var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); + var className = ed.dom.getAttrib(tdElm, 'class'); + var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; + var id = ed.dom.getAttrib(tdElm, 'id'); + var lang = ed.dom.getAttrib(tdElm, 'lang'); + var dir = ed.dom.getAttrib(tdElm, 'dir'); + var scope = ed.dom.getAttrib(tdElm, 'scope'); + + // Setup form + addClassesToList('class', 'table_cell_styles'); + TinyMCE_EditableSelects.init(); + + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.width.value = width; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = ed.dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'celltype', celltype); + selectByValue(formObj, 'dir', dir); + selectByValue(formObj, 'scope', scope); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); +} + +function updateAction() { + var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getNode(); + tdElm = ed.dom.getParent(el, "td,th"); + trElm = ed.dom.getParent(el, "tr"); + tableElm = ed.dom.getParent(el, "table"); + + ed.execCommand('mceBeginUndoLevel'); + + switch (getSelectValue(formObj, 'action')) { + case "cell": + var celltype = getSelectValue(formObj, 'celltype'); + var scope = getSelectValue(formObj, 'scope'); + + function doUpdate(s) { + if (s) { + updateCell(tdElm); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + } + }; + + if (ed.getParam("accessibility_warnings", 1)) { + if (celltype == "th" && scope == "") + tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); + else + doUpdate(1); + + return; + } + + updateCell(tdElm); + break; + + case "row": + var cell = trElm.firstChild; + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + cell = updateCell(cell, true); + } while ((cell = nextCell(cell)) != null); + + break; + + case "all": + var rows = tableElm.getElementsByTagName("tr"); + + for (var i=0; i colLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit)); + return false; + } else if (rowLimit && rows > rowLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit)); + return false; + } else if (cellLimit && cols * rows > cellLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit)); + return false; + } + + // Update table + if (action == "update") { + inst.execCommand('mceBeginUndoLevel'); + + dom.setAttrib(elm, 'cellPadding', cellpadding, true); + dom.setAttrib(elm, 'cellSpacing', cellspacing, true); + dom.setAttrib(elm, 'border', border); + dom.setAttrib(elm, 'align', align); + dom.setAttrib(elm, 'frame', frame); + dom.setAttrib(elm, 'rules', rules); + dom.setAttrib(elm, 'class', className); + dom.setAttrib(elm, 'style', style); + dom.setAttrib(elm, 'id', id); + dom.setAttrib(elm, 'summary', summary); + dom.setAttrib(elm, 'dir', dir); + dom.setAttrib(elm, 'lang', lang); + + capEl = inst.dom.select('caption', elm)[0]; + + if (capEl && !caption) + capEl.parentNode.removeChild(capEl); + + if (!capEl && caption) { + capEl = elm.ownerDocument.createElement('caption'); + + if (!tinymce.isIE) + capEl.innerHTML = '
'; + + elm.insertBefore(capEl, elm.firstChild); + } + + if (width && inst.settings.inline_styles) { + dom.setStyle(elm, 'width', width); + dom.setAttrib(elm, 'width', ''); + } else { + dom.setAttrib(elm, 'width', width, true); + dom.setStyle(elm, 'width', ''); + } + + // Remove these since they are not valid XHTML + dom.setAttrib(elm, 'borderColor', ''); + dom.setAttrib(elm, 'bgColor', ''); + dom.setAttrib(elm, 'background', ''); + + if (height && inst.settings.inline_styles) { + dom.setStyle(elm, 'height', height); + dom.setAttrib(elm, 'height', ''); + } else { + dom.setAttrib(elm, 'height', height, true); + dom.setStyle(elm, 'height', ''); + } + + if (background != '') + elm.style.backgroundImage = "url('" + background + "')"; + else + elm.style.backgroundImage = ''; + +/* if (tinyMCEPopup.getParam("inline_styles")) { + if (width != '') + elm.style.width = getCSSSize(width); + }*/ + + if (bordercolor != "") { + elm.style.borderColor = bordercolor; + elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle; + elm.style.borderWidth = border == "" ? "1px" : border; + } else + elm.style.borderColor = ''; + + elm.style.backgroundColor = bgcolor; + elm.style.height = getCSSSize(height); + + inst.addVisual(); + + // Fix for stange MSIE align bug + //elm.outerHTML = elm.outerHTML; + + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + + // Repaint if dimensions changed + if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight) + inst.execCommand('mceRepaint'); + + tinyMCEPopup.close(); + return true; + } + + // Create new table + html += '/g, '>'); + + return ' ' + attrib + '="' + value + '"'; +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); + var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; + var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules, frame; + var inst = tinyMCEPopup.editor, dom = inst.dom; + var formObj = document.forms[0]; + var elm = dom.getParent(inst.selection.getNode(), "table"); + + action = tinyMCEPopup.getWindowArg('action'); + + if (!action) + action = elm ? "update" : "insert"; + + if (elm && action != "insert") { + var rowsAr = elm.rows; + var cols = 0; + for (var i=0; i cols) + cols = rowsAr[i].cells.length; + + cols = cols; + rows = rowsAr.length; + + st = dom.parseStyle(dom.getAttrib(elm, "style")); + border = trimSize(getStyle(elm, 'border', 'borderWidth')); + cellpadding = dom.getAttrib(elm, 'cellpadding', ""); + cellspacing = dom.getAttrib(elm, 'cellspacing', ""); + width = trimSize(getStyle(elm, 'width', 'width')); + height = trimSize(getStyle(elm, 'height', 'height')); + bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); + bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); + align = dom.getAttrib(elm, 'align', align); + frame = dom.getAttrib(elm, 'frame'); + rules = dom.getAttrib(elm, 'rules'); + className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, '')); + id = dom.getAttrib(elm, 'id'); + summary = dom.getAttrib(elm, 'summary'); + style = dom.serializeStyle(st); + dir = dom.getAttrib(elm, 'dir'); + lang = dom.getAttrib(elm, 'lang'); + background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; + + orgTableWidth = width; + orgTableHeight = height; + + action = "update"; + formObj.insert.value = inst.getLang('update'); + } + + addClassesToList('class', "table_styles"); + TinyMCE_EditableSelects.init(); + + // Update form + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'frame', frame); + selectByValue(formObj, 'rules', rules); + selectByValue(formObj, 'class', className, true, true); + formObj.cols.value = cols; + formObj.rows.value = rows; + formObj.border.value = border; + formObj.cellpadding.value = cellpadding; + formObj.cellspacing.value = cellspacing; + formObj.width.value = width; + formObj.height.value = height; + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.id.value = id; + formObj.summary.value = summary; + formObj.style.value = style; + formObj.dir.value = dir; + formObj.lang.value = lang; + formObj.backgroundimage.value = background; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + // Disable some fields in update mode + if (action == "update") { + formObj.cols.disabled = true; + formObj.rows.disabled = true; + } +} + +function changedSize() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + +/* var width = formObj.width.value; + if (width != "") + st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : ""; + else + st['width'] = "";*/ + + var height = formObj.height.value; + if (height != "") + st['height'] = getCSSSize(height); + else + st['height'] = ""; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedBackgroundImage() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedBorder() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + // Update border width if the element has a color + if (formObj.border.value != "" && formObj.bordercolor.value != "") + st['border-width'] = formObj.border.value + "px"; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedColor() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-color'] = formObj.bgcolor.value; + + if (formObj.bordercolor.value != "") { + st['border-color'] = formObj.bordercolor.value; + + // Add border-width if it's missing + if (!st['border-width']) + st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px"; + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedStyle() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + if (st['background-image']) + formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + else + formObj.backgroundimage.value = ''; + + if (st['width']) + formObj.width.value = trimSize(st['width']); + + if (st['height']) + formObj.height.value = trimSize(st['height']); + + if (st['background-color']) { + formObj.bgcolor.value = st['background-color']; + updateColor('bgcolor_pick','bgcolor'); + } + + if (st['border-color']) { + formObj.bordercolor.value = st['border-color']; + updateColor('bordercolor_pick','bordercolor'); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ar.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ar.js deleted file mode 100644 index 4f62d717..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ar.js +++ /dev/null @@ -1,30 +0,0 @@ -// Arabic lang variables - -tinyMCELang['lang_table_desc'] = 'إدراج/تحرير جدول'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Insert row before'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Insert row after'; -tinyMCELang['lang_table_delete_row_desc'] = 'حذف صفوف'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Insert column before'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Insert column after'; -tinyMCELang['lang_table_delete_col_desc'] = 'حذف أعمدة'; -tinyMCELang['lang_insert_table_title'] = 'إدراج/تحرير جدول'; -tinyMCELang['lang_insert_table_width'] = 'العرض'; -tinyMCELang['lang_insert_table_height'] = 'الارتفاع'; -tinyMCELang['lang_insert_table_cols'] = 'أعمدة'; -tinyMCELang['lang_insert_table_rows'] = 'صفوف'; -tinyMCELang['lang_insert_table_cellspacing'] = 'تباعد الخلايا'; -tinyMCELang['lang_insert_table_cellpadding'] = 'المسافة البادئة'; -tinyMCELang['lang_insert_table_border'] = 'سمك الحدود'; -tinyMCELang['lang_insert_table_align'] = 'المحاذاة'; -tinyMCELang['lang_insert_table_align_default'] = 'Default'; -tinyMCELang['lang_insert_table_align_left'] = 'يسار'; -tinyMCELang['lang_insert_table_align_right'] = 'يمين'; -tinyMCELang['lang_insert_table_align_middle'] = 'وسط'; -tinyMCELang['lang_insert_table_class'] = 'Class'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ar_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ar_dlg.js new file mode 100644 index 00000000..c42e8af7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ar_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ar.table_dlg',{ +general_tab:"\u0639\u0627\u0645", +advanced_tab:"\u0645\u062A\u0642\u062F\u0645", +general_props:"\u062E\u0635\u0627\u0626\u0635 \u0639\u0627\u0645\u0629", +advanced_props:"\u062E\u0635\u0627\u0626\u0635 \u0645\u062A\u0642\u062F\u0645\u0629", +rowtype:"\u0627\u0644\u0645\u0642\u0637\u0639 \u0635\u0641 \u0641\u064A \u062C\u062F\u0648\u0644", +title:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u062C\u062F\u0648\u0644", +width:"\u0627\u0644\u0639\u0631\u0636", +height:"\u0627\u0644\u0625\u0631\u062A\u0641\u0627\u0639", +cols:"\u0627\u0639\u0645\u062F\u0629", +rows:"\u0623\u0633\u0637\u0631", +cellspacing:"\u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0628\u064A\u0646 \u0627\u0644\u062E\u0644\u0627\u064A\u0627", +cellpadding:"\u062D\u062C\u0645 \u0627\u0644\u062E\u0644\u064A\u0629", +border:"\u0627\u0644\u062D\u062F\u0648\u062F", +align:"\u0645\u062D\u0627\u0630\u0627\u0629", +align_default:"\u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A", +align_left:"\u064A\u0633\u0627\u0631", +align_right:"\u064A\u0645\u064A\u0646", +align_middle:"\u0648\u0633\u0637", +row_title:"\u062E\u0635\u0627\u0626\u0635 \u0623\u0633\u0637\u0631 \u0627\u0644\u062C\u062F\u0648\u0644", +cell_title:"\u062E\u0635\u0627\u0626\u0635 \u0623\u0639\u0645\u062F\u0629 \u0627\u0644\u062C\u062F\u0648\u0644", +cell_type:"\u0646\u0648\u0639 \u0627\u0644\u062E\u064A\u0629", +valign:"\u0627\u0644\u0645\u062D\u0627\u0630\u0627\u0629 \u0627\u0644\u0639\u0645\u0648\u062F\u064A\u0629", +align_top:"\u0623\u0639\u0644\u0649", +align_bottom:"\u0623\u0633\u0641\u0644", +bordercolor:"\u0644\u0648\u0646 \u0627\u0644\u062D\u062F\u0648\u062F", +bgcolor:"\u0644\u0648\u0646 \u0627\u0644\u062E\u0644\u0641\u064A\u0629", +merge_cells_title:"\u062F\u0645\u062C \u062E\u0644\u0627\u064A\u0627 \u0627\u0644\u062C\u062F\u0648\u0644", +id:"Id", +style:"\u0646\u0633\u0642", +langdir:"\u0627\u062A\u062C\u0627\u0647 \u0627\u0644\u0644\u063A\u0629", +langcode:"\u0634\u0641\u0631\u0629 \u0627\u0644\u0644\u063A\u0629", +mime:"\u0627\u0644\u0645\u0633\u0627\u0631 MIME type", +ltr:"\u064A\u0633\u0627\u0631 to \u064A\u0645\u064A\u0646", +rtl:"\u064A\u0645\u064A\u0646 to \u064A\u0633\u0627\u0631", +bgimage:"\u0635\u0648\u0631\u0629 \u0627\u0644\u062E\u0644\u0641\u064A\u0629", +summary:"\u0645\u0648\u062C\u0632", +td:"\u0627\u0644\u0645\u062D\u062A\u0648\u0649", +th:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646", +cell_cell:"\u062A\u062D\u062F\u064A\u062B \u0627\u0644\u062E\u0644\u064A\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629", +cell_row:"\u062A\u062D\u062F\u064A\u062B \u062C\u0645\u064A\u0639 \u0627\u0644\u062E\u0644\u0627\u064A\u0627 \u0627\u0644\u0645\u0648\u062D\u0648\u062F\u0629 \u0641\u064A \u0627\u0644\u0633\u0637\u0631", +cell_all:"\u062A\u062D\u062F\u064A\u062B \u062C\u0645\u064A\u0639 \u0627\u0644\u062E\u0644\u0627\u064A\u0627 \u0627\u0644\u0645\u0648\u062C\u0648\u062F\u0629 \u0641\u064A \u0627\u0644\u062C\u062F\u0648\u0644", +row_row:"\u062A\u062D\u062F\u064A\u062B \u0627\u0644\u0633\u0637\u0631 \u0627\u0644\u062D\u0627\u0644\u064A", +row_odd:"\u062A\u062D\u062F\u064A\u062B \u0627\u0644\u0623\u0633\u0637\u0631 \u0627\u0644\u0641\u0631\u062F\u064A\u0629", +row_even:"\u062A\u062D\u062F\u064A \u0627\u0644\u0623\u0633\u0637\u0631 \u0627\u0644\u0632\u0648\u062C\u064A\u0629", +row_all:"\u062A\u062D\u062F\u064A\u062B \u062C\u0645\u064A\u0639 \u0627\u0644\u0623\u0633\u0637\u0631", +thead:"\u0631\u0623\u0633 \u0627\u0644\u062C\u062F\u0648\u0644", +tbody:"\u062C\u0633\u0645 \u0627\u0644\u062C\u062F\u0648\u0644", +tfoot:"\u0642\u062F\u0645 \u0627\u0644\u062C\u062F\u0648\u0644", +scope:"\u0627\u0644\u0645\u062F\u0649", +rowgroup:"\u0645\u062C\u0645\u0648\u0639\u0629 \u0623\u0633\u0637\u0631", +colgroup:"\u0645\u062C\u0645\u0648\u0639\u0629 \u062E\u0644\u0627\u064A\u0627", +col_limit:"\u0644\u0642\u062F \u062A\u0639\u062F\u064A\u062A \u0627\u0644\u0639\u062F\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647 \u0644\u0644\u0623\u0639\u0645\u062F\u0629 \u0627\u0644\u062E\u0627\u0635 \u0628\u0640{$cols}.", +row_limit:"\u0644\u0642\u062F \u062A\u0639\u062F\u064A\u062A \u0627\u0644\u0639\u062F\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647 \u0644\u0644\u0623\u0633\u0637\u0631 \u0627\u0644\u062E\u0627\u0635 \u0628\u0640{$rows}.", +cell_limit:"\u0644\u0642\u062F \u062A\u0639\u062F\u064A\u062A \u0627\u0644\u0639\u062F\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0628\u0647 \u0644\u0644\u062E\u0644\u0627\u064A\u0627 \u0627\u0644\u062E\u0627\u0635 \u0628\u0640{$cells}.", +missing_scope:"\u0647\u0644 \u062A\u0631\u064A\u062F \u062D\u0642\u0627 \u0623\u0646 \u062A\u0648\u0627\u0635\u0644 \u0628\u062F\u0648\u0646 \u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0645\u062F\u0649 \u0627\u0644\u062E\u0627\u0635 \u0628\u062E\u0644\u064A\u0629 \u0627\u0644\u062A\u0631\u0648\u064A\u0633\u0629 \u0647\u0630\u0647. \u0645\u0646 \u062F\u0648\u0646\u0647\u060C \u0633\u064A\u0643\u0648\u0646 \u0645\u0646 \u0627\u0644\u0635\u0639\u0628 \u0639\u0644\u0649 \u0627\u0644\u0632\u0627\u0626\u0631 \u0641\u0647\u0645 \u0645\u062D\u062A\u0648\u064A\u0627\u062A \u0627\u0644\u062C\u062F\u0648\u0644", +caption:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u062C\u062F\u0648\u0644", +frame:"\u0627\u0644\u0627\u0637\u0627\u0631", +frame_none:"\u0641\u0627\u0631\u063A", +frame_groups:"\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A", +frame_rows:"\u0627\u0644\u0623\u0633\u0637\u0631", +frame_cols:"\u0627\u0644\u0623\u0639\u0645\u062F\u0629", +frame_all:"\u0627\u0644\u0643\u0644", +rules:"\u0627\u0644\u0642\u0648\u0627\u0639\u062F", +rules_void:"void", +rules_above:"\u0623\u0639\u0644\u0649", +rules_below:"\u0623\u0633\u0641\u0644", +rules_hsides:"\u0627\u0644\u062C\u0648\u0627\u0646\u0628 \u0627\u0644\u0623\u0641\u0642\u064A\u0629", +rules_lhs:"\u0627\u0644\u062C\u0627\u0646\u0628 \u0627\u0644\u0623\u0641\u0642\u064A \u0627\u0644\u0623\u064A\u0633\u0631", +rules_rhs:"\u0627\u0644\u062C\u0627\u0646\u0628 \u0627\u0644\u0623\u0641\u0642\u064A \u0627\u0644\u0623\u064A\u0645\u0646", +rules_vsides:"\u0627\u0644\u062C\u0648\u0627\u0646\u0628 \u0627\u0644\u0639\u0645\u0648\u062F\u064A\u0629", +rules_box:"\u0635\u0646\u062F\u0648\u0642", +rules_border:"\u0627\u0644\u062D\u062F\u0648\u062F" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/bg_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/bg_dlg.js new file mode 100644 index 00000000..8ae1e38e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/bg_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('bg.table_dlg',{ +general_tab:"\u041E\u0431\u0449\u0438", +advanced_tab:"\u0417\u0430 \u043D\u0430\u043F\u0440\u0435\u0434\u043D\u0430\u043B\u0438", +general_props:"\u041E\u0431\u0449\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438", +advanced_props:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0437\u0430 \u043D\u0430\u043F\u0440\u0435\u0434\u043D\u0430\u043B\u0438", +rowtype:"\u0420\u043E\u043B\u044F \u043D\u0430 \u0440\u0435\u0434\u0430", +title:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u0442\u0430\u0431\u043B\u0438\u0446\u0430", +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +height:"\u0412\u0438\u0441\u043E\u0447\u0438\u043D\u0430", +cols:"\u041A\u043E\u043B\u043E\u043D\u0438", +rows:"\u0420\u0435\u0434\u043E\u0432\u0435", +cellspacing:"\u0420\u0430\u0437\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043C\u044A\u0436\u0434\u0443 \u043A\u043B\u0435\u0442\u043A\u0438\u0442\u0435", +cellpadding:"Padding \u043D\u0430 \u043A\u043B\u0435\u0442\u043A\u0438\u0442\u0435", +border:"\u0420\u0430\u043C\u043A\u0430", +align:"\u041F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435", +align_default:"\u041F\u043E \u043F\u043E\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043D\u0435", +align_left:"\u041B\u044F\u0432\u043E", +align_right:"\u0414\u044F\u0441\u043D\u043E", +align_middle:"\u0426\u0435\u043D\u0442\u044A\u0440", +row_title:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043D\u0430 \u0440\u0435\u0434\u0430", +cell_title:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043D\u0430 \u043A\u043B\u0435\u0442\u043A\u0430\u0442\u0430", +cell_type:"\u0422\u0438\u043F \u043D\u0430 \u043A\u043B\u0435\u0442\u043A\u0430\u0442\u0430", +valign:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u043D\u043E \u043F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435", +align_top:"\u0413\u043E\u0440\u0435", +align_bottom:"\u0414\u043E\u043B\u0443", +bordercolor:"\u0426\u0432\u044F\u0442 \u043D\u0430 \u0440\u0430\u043C\u043A\u0430\u0442\u0430", +bgcolor:"\u0426\u0432\u044F\u0442 \u043D\u0430 \u0444\u043E\u043D\u0430", +merge_cells_title:"\u0421\u043B\u0435\u0439 \u043A\u043B\u0435\u0442\u043A\u0438\u0442\u0435", +id:"Id", +style:"\u0421\u0442\u0438\u043B", +langdir:"\u041F\u043E\u0441\u043E\u043A\u0430 \u043D\u0430 \u0435\u0437\u0438\u043A\u0430", +langcode:"\u041A\u043E\u0434 \u043D\u0430 \u0435\u0437\u0438\u043A\u0430", +mime:"MIME \u0442\u0438\u043F", +ltr:"\u041E\u0442\u043B\u044F\u0432\u043E \u043D\u0430 \u0434\u044F\u0441\u043D\u043E", +rtl:"\u041E\u0442\u0434\u044F\u0441\u043D\u043E \u043D\u0430 \u043B\u044F\u0432\u043E", +bgimage:"\u0424\u043E\u043D\u043E\u0432\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +summary:"\u041E\u0431\u043E\u0431\u0449\u0435\u043D\u0438\u0435", +td:"\u0414\u0430\u043D\u0438\u043D", +th:"\u0413\u043B\u0430\u0432\u0430", +cell_cell:"\u041E\u0431\u043D\u043E\u0432\u0438 \u0442\u0435\u043A\u0443\u0449\u0430\u0442\u0430 \u043A\u043B\u0435\u0442\u043A\u0430Update current cell", +cell_row:"\u041E\u0431\u043D\u043E\u0432\u0438 \u0432\u0441\u0438\u0447\u043A\u0438 \u043A\u043B\u0435\u0442\u043A\u0438 \u043D\u0430 \u0440\u0435\u0434\u0430", +cell_all:"\u041E\u0431\u043D\u043E\u0432\u0438 \u0432\u0441\u0438\u0447\u043A\u0438 \u043A\u043B\u0435\u0442\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430", +row_row:"\u041E\u0431\u043D\u043E\u0432\u0438 \u0442\u0435\u043A\u0443\u0449\u0438\u044F \u0440\u0435\u0434", +row_odd:"\u041E\u0431\u043D\u043E\u0432\u0438 \u043D\u0435\u0447\u0435\u0442\u043D\u0438\u0442\u0435 \u0440\u0435\u0434\u043E\u0432\u0435 \u0432 \u0442\u0430\u043B\u0438\u0446\u0430\u0442\u0430", +row_even:"\u041E\u0431\u043D\u043E\u0432\u0438 \u0447\u0435\u0442\u043D\u0438\u0442\u0435 \u0440\u0435\u0434\u043E\u0432\u0435 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430", +row_all:"\u041E\u0431\u043D\u043E\u0432\u0438 \u0432\u0441\u0438\u0447\u043A\u0438 \u0440\u0435\u0434\u043E\u0432\u0435 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430", +thead:"\u0413\u043B\u0430\u0432\u0430 \u043D\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430", +tbody:"\u0422\u044F\u043B\u043E \u043D\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430", +tfoot:"\u0414\u044A\u043D\u043E \u043D\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430", +scope:"\u041E\u0431\u0445\u0432\u0430\u0442", +rowgroup:"\u0413\u0440\u0443\u043F\u0430 \u0440\u0435\u0434\u043E\u0432\u0435", +colgroup:"\u0413\u0440\u0443\u043F\u0430 \u043A\u043E\u043B\u043E\u043D\u0438", +col_limit:"\u041F\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u043D\u0430\u0442\u0430 \u0431\u0440\u043E\u0439\u043A\u0430 \u043A\u043E\u043B\u043E\u043D\u0438: {$cols}.", +row_limit:"\u041F\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u043D\u0430\u0442\u0430 \u0431\u0440\u043E\u0439\u043A\u0430 \u0440\u0435\u0434\u043E\u0432\u0435: {$rows}.", +cell_limit:"\u041F\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u043D\u0430\u0442\u0430 \u0431\u0440\u043E\u0439\u043A\u0430 \u043A\u043B\u0435\u0442\u043A\u0438: {$cells}.", +missing_scope:"\u0421\u0438\u0433\u0443\u0440\u0435\u043D \u043B\u0438 \u0441\u0442\u0435 \u0447\u0435 \u0436\u0435\u043B\u0430\u0435\u0442\u0435 \u0434\u0430 \u043F\u0440\u043E\u0434\u0443\u043B\u0436\u0438\u0442\u0435 \u0431\u0435\u0437 \u0434\u0430 \u0441\u043B\u043E\u0436\u0438\u0442\u0435 \u043E\u0431\u0445\u0432\u0430\u0442 \u043D\u0430 \u0433\u043B\u0430\u0432\u0430\u0442\u0430 \u043D\u0430 \u043A\u043B\u0435\u0442\u043A\u0430\u0442\u0430. \u0411\u0435\u0437 \u043D\u0435\u0433\u043E, \u043D\u044F\u043A\u043E\u0438 \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u0438 \u0441 \u043D\u0435\u0434\u044A\u0437\u0438 \u043C\u043E\u0433\u0430\u0442 \u0434\u0430 \u0438\u043C\u0430\u0442 \u043F\u0440\u043E\u0431\u043B\u0435\u043C \u0434\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0430\u0442 \u0434\u0430\u043D\u043D\u0438\u0442\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430.", +caption:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435 \u043D\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u0430\u0442\u0430", +frame:"\u0424\u0440\u0435\u0439\u043C", +frame_none:"\u0431\u0435\u0437", +frame_groups:"\u0433\u0440\u0443\u043F\u0438", +frame_rows:"\u0440\u0435\u0434\u043E\u0432\u0435", +frame_cols:"\u043A\u043E\u043B\u043E\u043D\u0438", +frame_all:"\u0432\u0441\u0438\u0447\u043A\u0438", +rules:"\u041F\u0440\u0430\u0432\u0438\u043B\u0430", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/br_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/br_dlg.js new file mode 100644 index 00000000..7deec454 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/br_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('br.table_dlg',{ +general_tab:"Geral", +advanced_tab:"Avan\u00C3\u0083\u00C2\u00A7ado", +general_props:"Propriedades gerais", +advanced_props:"Propriedades avan\u00C3\u0083\u00C2\u00A7adas", +rowtype:"Linha na parte da tabela", +title:"Inserir/modificar tabela", +width:"Largura", +height:"Altura", +cols:"Colunas", +rows:"Linhas", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Limites", +align:"Alinhamento", +align_default:"Padr\u00C3\u0083\u00C2\u00A3o", +align_left:"Esquerda", +align_right:"Direita", +align_middle:"Centro", +row_title:"Propriedades de linhas", +cell_title:"Propriedades de c\u00C3\u0083\u00C2\u00A9lulas", +cell_type:"Tipo de c\u00C3\u0083\u00C2\u00A9lula", +valign:"Alinhamento vertical", +align_top:"Topo", +align_bottom:"Abaixo", +bordercolor:"Cor dos limites", +bgcolor:"Cor de fundo", +merge_cells_title:"Unir c\u00C3\u0083\u00C2\u00A9lulas", +id:"Id", +style:"Estilo", +langdir:"Direc\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o do texto", +langcode:"C\u00C3\u0083\u00C2\u00B3digo da linguagem", +mime:"MIME alvo", +ltr:"Da esquerda para a direita", +rtl:"Da direita para a esquerda", +bgimage:"Imagem de fundo", +summary:"Sum\u00C3\u0083\u00C2\u00A1rio", +td:"Dados", +th:"Campo", +cell_cell:"Actualizar esta c\u00C3\u0083\u00C2\u00A9lula", +cell_row:"Actualizar todas as c\u00C3\u0083\u00C2\u00A9lulas na linha", +cell_all:"Actualizar todas as c\u00C3\u0083\u00C2\u00A9lulas na tabela", +row_row:"Atcualizar esta linha", +row_odd:"Actualizar linhas \u00C3\u0083\u00C2\u00ADmpares", +row_even:"Actualizar linhas pares", +row_all:"Actualizar todas as linhas", +thead:"Topo da tabela", +tbody:"Corpo da tabela", +tfoot:"Rodap\u00C3\u0083\u00C2\u00A9 da tabela", +scope:"Alcance", +rowgroup:"Grupo linhas", +colgroup:"Grupo colunas", +col_limit:"Excedeu o n\u00C3\u0083\u00C2\u00BAmero m\u00C3\u0083\u00C2\u00A1ximo de colunas de {$cols}.", +row_limit:"Excedeu o n\u00C3\u0083\u00C2\u00BAmero m\u00C3\u0083\u00C2\u00A1ximo de linhas de {$rows}.", +cell_limit:"Excedeu o n\u00C3\u0083\u00C2\u00BAmero m\u00C3\u0083\u00C2\u00A1ximo de c\u00C3\u0083\u00C2\u00A9lulas de {$cells}.", +missing_scope:"Tem certeza de que quer continuar sem especificar um escopo para esta c\u00C3\u0083\u00C2\u00A9lula? (Isso poder\u00C3\u0083\u00C2\u00A1 causar dificuldades a usu\u00C3\u0083\u00C2\u00A1rios deficientes)", +caption:"T\u00C3\u0083\u00C2\u00ADtulo da tabela", +frame:"Frame", +frame_none:"Nenhum", +frame_groups:"Grupos", +frame_rows:"Linhas", +frame_cols:"colunas", +frame_all:"Todos", +rules:"Regras", +rules_void:"Void", +rules_above:"Acima", +rules_below:"Abaixo", +rules_hsides:"Hsides", +rules_lhs:"Lhs", +rules_rhs:"Rhs", +rules_vsides:"Vsides", +rules_box:"Box", +rules_border:"Limites" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/bs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/bs_dlg.js new file mode 100644 index 00000000..39772b19 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/bs_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('bs.table_dlg',{ +general_tab:"Osnovno", +advanced_tab:"Napredno", +general_props:"Osnovna svojstva", +advanced_props:"Napredna svojstva", +rowtype:"Row in table part", +title:"Umetni/uredi tablicu", +width:"\u0160irina", +height:"Visina", +cols:"Stupaca", +rows:"Redaka", +cellspacing:"Razmak \u0107elija", +cellpadding:"Dopuna \u0107elije", +border:"Obrub", +align:"Poravnavanje", +align_default:"Zadano", +align_left:"Lijevo", +align_right:"Desno", +align_middle:"Sredina", +row_title:"Svojstva retka", +cell_title:"Svojstva \u0107elije", +cell_type:"Tip \u0107elije", +valign:"Okomito poravnavanje", +align_top:"Vrh", +align_bottom:"Dno", +bordercolor:"Boja obruba", +bgcolor:"Background color", +merge_cells_title:"Spoji \u0107elije", +id:"Id", +style:"Stil", +langdir:"Smjer jezika", +langcode:"Kod jezika", +mime:"MIME tip", +ltr:"S lijeva na desno", +rtl:"S desna na lijevo", +bgimage:"Slika pozadine", +summary:"Sa\u017Eetak", +td:"Podatkovna", +th:"Zaglavlje", +cell_cell:"Primjeni na odabranu \u0107eliju", +cell_row:"Primjeni na sve \u0107elije u retku", +cell_all:"Primjeni na sve \u0107elije u tablici", +row_row:"Primjeni na odabrani redak", +row_odd:"Primjeni na neparne retke u tablici", +row_even:"Primjeni na parne retke u tablici", +row_all:"Primjeni na sve retke u tablici", +thead:"Zaglavlje tablice", +tbody:"Tijelo tablice", +tfoot:"Podno\u017Eje tablice", +scope:"Domet", +rowgroup:"Grupa redaka", +colgroup:"Grupa stupaca", +col_limit:"Prema\u0161ili ste maksimalni broj stupaca ({$cols}).", +row_limit:"Prema\u0161ili ste maksimalni broj redaka ({$rows}).", +cell_limit:"Prema\u0161ili ste maksimalni broj \u0107elija ({$cells}).", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Opis tablice", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ca_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ca_dlg.js new file mode 100644 index 00000000..abd88d1c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ca_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ca.table_dlg',{ +general_tab:"General", +advanced_tab:"Avan\u00E7at", +general_props:"Propietats generals", +advanced_props:"Propietats avan\u00E7ades", +rowtype:"Part de la taula on \u00E9s la fila", +title:"Insereix/Modifica taula", +width:"Amplada", +height:"Al\u00E7ada", +cols:"Columnes", +rows:"Files", +cellspacing:"Espai de Cel.la", +cellpadding:"Espai de marge", +border:"Vora", +align:"Alineaci\u00F3", +align_default:"Per defecte", +align_left:"Esquerra", +align_right:"Dreta", +align_middle:"Centrat", +row_title:"Propietats de la fila de la taula", +cell_title:"Propietats de la cel\u00B7la de la taula", +cell_type:"Tipus de cel\u00B7la", +valign:"Alineaci\u00F3 vertical", +align_top:"Dalt", +align_bottom:"Baix", +bordercolor:"Color de la vora", +bgcolor:"Color del fons", +merge_cells_title:"Refon les cel\u00B7les de la taula", +id:"Id", +style:"Estil", +langdir:"Direcci\u00F3 de l'Idioma", +langcode:"Codi de l'idioma", +mime:"Tipus MIME de l'objectiu", +ltr:"D'esquerra a dreta", +rtl:"De dreta a esquerra", +bgimage:"Imatge de fons", +summary:"Resum", +td:"Dades", +th:"Cap\u00E7alera", +cell_cell:"Actualitza la cel\u00B7la actual", +cell_row:"Actualitza totes les cel\u00B7les de la fila", +cell_all:"Actualitza totes les cel\u00B7les de la taula", +row_row:"Actualitza la fila actual", +row_odd:"Actualitza les files senars de la taula", +row_even:"Actualitza les files parelles de la taula", +row_all:"Actualitza les files de la taula", +thead:"Cap\u00E7alera de la Taula", +tbody:"Cos de la Taula", +tfoot:"Peu de la Taula", +scope:"Abast", +rowgroup:"Grup de Files", +colgroup:"Grup de Columnes", +col_limit:"Has excedit el nombre m\u00E0xim de columnes de {$cols}.", +row_limit:"Has excedit el nombre m\u00E0xim de files de {$rows}.", +cell_limit:"Has excedit el nombre m\u00E0xim de cel\u00B7les de {$cells}.", +missing_scope:"Segur que vols continuar sense especificar un abast per a les cel\u00B7les de cap\u00E7alera d'aquesta taula? Sense aix\u00F2, alguns usuaris/es amb discapacitats tindran dificultats per entendre el contingut o les dades mostrades a la taula.", +caption:"T\u00EDtol de la taula", +frame:"Marc", +frame_none:"cap", +frame_groups:"grups", +frame_rows:"files", +frame_cols:"columnes", +frame_all:"totes", +rules:"Regles", +rules_void:"salta regles", +rules_above:"sobre", +rules_below:"sota", +rules_hsides:"banda horitzontal", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"banda vertical", +rules_box:"caixa", +rules_border:"vora" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ch_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ch_dlg.js new file mode 100644 index 00000000..b83707d4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ch_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ch.table_dlg',{ +general_tab:"\u57FA\u672C", +advanced_tab:"\u8FDB\u9636", +general_props:"\u4E00\u822C\u5C5E\u6027", +advanced_props:"\u8FDB\u9636\u5C5E\u6027", +rowtype:"\u5217\u6240\u5728\u7684\u8868\u683C\u4F4D\u7F6E", +title:"\u63D2\u5165/\u7F16\u8F91\u8868\u683C", +width:"\u5BBD", +height:"\u9AD8", +cols:"\u680F\u6570", +rows:"\u5217\u6570", +cellspacing:"\u5355\u5143\u683C\u95F4\u8DDD", +cellpadding:"\u5355\u5143\u683C\u5185\u8DDD", +border:"\u8FB9\u6846", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_default:"\u9884\u8BBE", +align_left:"\u7F6E\u5DE6", +align_right:"\u7F6E\u53F3", +align_middle:"\u7F6E\u4E2D", +row_title:"\u4F8B\u6807\u9898", +cell_title:"\u5355\u5143\u683C\u6807\u9898", +cell_type:"\u5355\u5143\u683C\u7C7B\u578B", +valign:"\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F", +align_top:"\u9876\u90E8", +align_bottom:"\u5E95\u90E8", +bordercolor:"\u8FB9\u6846\u989C\u8272", +bgcolor:"\u80CC\u666F\u989C\u8272", +merge_cells_title:"\u5408\u5E76\u5355\u5143\u683C", +id:"ID", +style:"\u6837\u5F0F", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +mime:"\u76EE\u6807MIME\u7C7B\u578B", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +bgimage:"\u80CC\u666F\u56FE\u7247", +summary:"\u6458\u8981", +td:"\u8D44\u6599", +th:"\u8868\u5934", +cell_cell:"\u66F4\u65B0\u5F53\u524D\u5355\u5143\u683C", +cell_row:"\u66F4\u65B0\u76EE\u524D\u5217\u7684\u5355\u5143\u683C", +cell_all:"\u66F4\u65B0\u6240\u6709\u5355\u5143\u683C", +row_row:"\u66F4\u65B0\u76EE\u524D\u5217", +row_odd:"\u66F4\u65B0\u8868\u683C\u7684\u5947\u6570\u5217", +row_even:"\u66F4\u65B0\u8868\u683C\u7684\u5076\u6570\u5217", +row_all:"\u66F4\u65B0\u8868\u683C\u7684\u6240\u6709\u5217", +thead:"\u8868\u683C\u8868\u5934", +tbody:"\u8868\u683C\u4E3B\u4F53", +tfoot:"\u8868\u683C\u811A\u6CE8", +scope:"\u8303\u56F4", +rowgroup:"\u5217\u7FA4\u7EC4", +colgroup:"\u680F\u7FA4\u7EC4", +col_limit:"\u5DF2\u8D85\u8FC7\u6700\u5927\u680F\u6570\u9650\u5236{$cols}\u680F\u3002 ", +row_limit:"\u5DF2\u8D85\u8FC7\u6700\u5927\u5217\u6570\u9650\u5236{$rows}\u5217\u3002 ", +cell_limit:"\u5DF2\u8D85\u8FC7\u6700\u5927\u5355\u5143\u683C\u9650\u5236{$cells}\u5355\u5143\u683C\u3002 ", +missing_scope:"\u60A8\u786E\u5B9A\u4E0D\u6307\u5B9A\u8868\u5934\u5355\u5143\u683C\u7684\u8303\u56F4\u5417\uFF1F\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u90E8\u5206\u7528\u6237\u5C06\u5F88\u96BE\u67E5\u770B\u8868\u683C\u5185\u5BB9\u3002 ", +caption:"\u8868\u683C\u6807\u9898", +frame:"\u7A97\u6846", +frame_none:"\u65E0", +frame_groups:"\u7FA4\u7EC4", +frame_rows:"\u5217", +frame_cols:"\u680F", +frame_all:"\u5168\u90E8", +rules:"\u6807\u5C3A", +rules_void:"\u7A7A", +rules_above:"\u4E4B\u4E0A", +rules_below:"\u4E4B\u4E0B", +rules_hsides:"\u6C34\u5E73\u5927\u5C0F", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"\u5782\u76F4\u5927\u5C0F", +rules_box:"\u76D2", +rules_border:"\u6846\u7EBF" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/cs.js deleted file mode 100644 index 47206cd9..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/cs.js +++ /dev/null @@ -1,30 +0,0 @@ -// CZ lang variables thanks to "Pavel Novák" - -tinyMCELang['lang_table_desc'] = 'Vložit novou tabulku'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Vložit øádek pøed'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Vložit øádek po'; -tinyMCELang['lang_table_delete_row_desc'] = 'Smazat øádek'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Vložit sloupec pøed'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Vložit sloupec po'; -tinyMCELang['lang_table_delete_col_desc'] = 'Odstranit sloupec'; -tinyMCELang['lang_insert_table_title'] = 'Vložit/upravit tabulku'; -tinyMCELang['lang_insert_table_width'] = 'Šíøka'; -tinyMCELang['lang_insert_table_height'] = 'Výška'; -tinyMCELang['lang_insert_table_cols'] = 'Sloupce'; -tinyMCELang['lang_insert_table_rows'] = 'Øádky'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Vnìjší okraj bunìk'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Vnitøní okraj bunìk'; -tinyMCELang['lang_insert_table_border'] = 'Rámeèek'; -tinyMCELang['lang_insert_table_align'] = 'Zarovnání'; -tinyMCELang['lang_insert_table_align_default'] = 'Výchozí'; -tinyMCELang['lang_insert_table_align_left'] = 'Vlevo'; -tinyMCELang['lang_insert_table_align_right'] = 'Vpravo'; -tinyMCELang['lang_insert_table_align_middle'] = 'Na støed'; -tinyMCELang['lang_insert_table_class'] = 'Class'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/cs_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/cs_dlg.js new file mode 100644 index 00000000..9c8df6b2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/cs_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('cs.table_dlg',{ +general_tab:"Hlavn\u00ED", +advanced_tab:"Pokro\u010Dil\u00E9", +general_props:"Hlavn\u00ED nastaven\u00ED", +advanced_props:"Pokro\u010Dil\u00E9 nastaven\u00ED", +rowtype:"Typ \u0159\u00E1dku", +title:"Vlo\u017Eit/upravit tabulku", +width:"\u0160\u00ED\u0159ka", +height:"V\u00FD\u0161ka", +cols:"Sloupce", +rows:"\u0158\u00E1dky", +cellspacing:"Rozestup bun\u011Bk", +cellpadding:"Odsazen\u00ED obsahu", +border:"R\u00E1me\u010Dek", +align:"Zarovn\u00E1n\u00ED", +align_default:"V\u00FDchoz\u00ED", +align_left:"Vlevo", +align_right:"Vpravo", +align_middle:"Doprost\u0159ed", +row_title:"Vlastnosti \u0159\u00E1dku", +cell_title:"Vlastnosti bu\u0148ky", +cell_type:"Typ bu\u0148ky", +valign:"Vertik\u00E1ln\u00ED zarovn\u00E1n\u00ED", +align_top:"Nahoru", +align_bottom:"Dol\u016F", +bordercolor:"Barva r\u00E1me\u010Dku", +bgcolor:"Barva pozad\u00ED", +merge_cells_title:"Spojit bu\u0148ky", +id:"ID", +style:"Styl", +langdir:"Sm\u011Br textu", +langcode:"K\u00F3d jazyka", +mime:"MIME typ c\u00EDle", +ltr:"Zleva doprava", +rtl:"Zprava doleva", +bgimage:"Obr\u00E1zek pozad\u00ED", +summary:"Sum\u00E1\u0159", +td:"Data", +th:"Z\u00E1hlav\u00ED", +cell_cell:"Aktualizovat zvolenou bu\u0148ku", +cell_row:"Aktualizovat v\u0161echny bu\u0148ky v \u0159\u00E1dku", +cell_all:"Aktualizovat v\u0161echny bu\u0148ky v tabulce", +row_row:"Aktualizovat zvolen\u00FD \u0159\u00E1dek", +row_odd:"Aktualizovat lich\u00E9 \u0159\u00E1dky tabulky", +row_even:"Aktualizovat sud\u00E9 \u0159\u00E1dky tabulky", +row_all:"Aktualizovat v\u0161echny \u0159\u00E1dky tabulky", +thead:"Hlavi\u010Dka tabulky", +tbody:"T\u011Blo tabulky", +tfoot:"Pata tabulky", +scope:"Zv\u00FDrazn\u011Bn\u00ED", +rowgroup:"Skupina \u0159\u00E1dk\u016F", +colgroup:"Skupina sloupc\u016F", +col_limit:"P\u0159ekro\u010Dili jste maxim\u00E1ln\u00ED po\u010Det sloupc\u016F {$cols}.", +row_limit:"P\u0159ekro\u010Dili jste maxim\u00E1ln\u00ED po\u010Det \u0159\u00E1dk\u016F {$rows}.", +cell_limit:"P\u0159ekro\u010Dili jste maxim\u00E1ln\u00ED po\u010Det bun\u011Bk {$cells}.", +missing_scope:"Jste si jist\u00ED, \u017Ee nechcete definovat zv\u00FDrazn\u011Bn\u00ED pro tuto hlavi\u010Dkovou bu\u0148ku (hlavi\u010Dku \u0159\u00E1dku nebo sloupce)? Bez n\u011Bj mo\u017En\u00E1 nebude mo\u017En\u00E9 spr\u00E1vn\u011B pochopit zobrazen\u00FD obsah \u010Di data tabulky.", +caption:"Nadpis tabulky", +frame:"R\u00E1m (frame)", +frame_none:"\u017E\u00E1dn\u00FD", +frame_groups:"skupiny", +frame_rows:"\u0159\u00E1dky", +frame_cols:"sloupce", +frame_all:"v\u0161e", +rules:"Pravidla (rules)", +rules_void:"void", +rules_above:"nad", +rules_below:"pod", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"r\u00E1me\u010Dek" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/da.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/da.js deleted file mode 100644 index b9e94c53..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/da.js +++ /dev/null @@ -1,30 +0,0 @@ -// DK lang variables contributed by Jan Moelgaard - -tinyMCELang['lang_table_desc'] = 'Indsætter en ny tabel'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Indsæt række foran'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Indsæt række efter'; -tinyMCELang['lang_table_delete_row_desc'] = 'Slet række'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Indsæt kolonne foran'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Indslt kolonne efter'; -tinyMCELang['lang_table_delete_col_desc'] = 'Fjern kolonne'; -tinyMCELang['lang_insert_table_title'] = 'Indsæt/rediger tabel'; -tinyMCELang['lang_insert_table_width'] = 'Bredde'; -tinyMCELang['lang_insert_table_height'] = 'Højde'; -tinyMCELang['lang_insert_table_cols'] = 'Kolonner'; -tinyMCELang['lang_insert_table_rows'] = 'Rækker'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Afstand mellem celler'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Cellemargen'; -tinyMCELang['lang_insert_table_border'] = 'Kant'; -tinyMCELang['lang_insert_table_align'] = 'Justering'; -tinyMCELang['lang_insert_table_align_default'] = 'Standard'; -tinyMCELang['lang_insert_table_align_left'] = 'Venstre'; -tinyMCELang['lang_insert_table_align_right'] = 'Højre'; -tinyMCELang['lang_insert_table_align_middle'] = 'Midt i'; -tinyMCELang['lang_insert_table_class'] = 'Klasse'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/da_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/da_dlg.js new file mode 100644 index 00000000..6deb5686 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/da_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('da.table_dlg',{ +general_tab:"Generelt", +advanced_tab:"Avanceret", +general_props:"Generelle egenskaber", +advanced_props:"Avancerede egenskaber", +rowtype:"Row in table part", +title:"Inds\u00E6t/rediger tabel", +width:"Bredde", +height:"H\u00F8jde", +cols:"Kolonner", +rows:"R\u00E6kker", +cellspacing:"Afstand mellem celler", +cellpadding:"Afstand til celleindhold", +border:"Kant", +align:"Justering", +align_default:"Standard", +align_left:"Venstre", +align_right:"H\u00F8jre", +align_middle:"Centreret", +row_title:"R\u00E6kkeegenskaber", +cell_title:"Celleegenskaber", +cell_type:"Celletype", +valign:"Vertikal justering", +align_top:"Top", +align_bottom:"Bund", +bordercolor:"Kantfarve", +bgcolor:"Baggrundsfarve", +merge_cells_title:"Flet celler", +id:"Id", +style:"Style", +langdir:"Sprogretning", +langcode:"Sprogkode", +mime:"Destinations-MIME-type", +ltr:"Venstre mod h\u00F8jre", +rtl:"H\u00F8jre mod venstre", +bgimage:"Baggrundsbillede", +summary:"Beskrivelse", +td:"Data", +th:"Hoved", +cell_cell:"Opdater aktuelle celle", +cell_row:"Opdater alle celler i r\u00E6kken", +cell_all:"Opdater alle celler i tabellen", +row_row:"Opdater aktuelle celle", +row_odd:"Opdater ulige r\u00E6kker", +row_even:"Opdater lige r\u00E6kker", +row_all:"Opdater alle r\u00E6kker", +thead:"Tabelhoved", +tbody:"Tabelkrop", +tfoot:"Tabelfod", +scope:"Forklaring", +rowgroup:"R\u00E6kkegruppe", +colgroup:"Kolonnegruppe", +col_limit:"Du har overskredet antallet af tilladte kolonner p\u00E5 {$cols}.", +row_limit:"Du har overskredet antallet af tilladte r\u00E6kker p\u00E5 {$rows}.", +cell_limit:"Du har overskredet antallet af tilladte celler p\u00E5 {$cells}.", +missing_scope:"Er du sikker p\u00E5, du vil forts\u00E6tte uden at angive forklaring for denne overskriftscelle? Uden forklaring vil v\u00E6re sv\u00E6rt for f.ek.s blinde at l\u00E6se og forst\u00E5 indholdet i tabellen.", +caption:"Tabeloverskrift", +frame:"Ramme", +frame_none:"ingen", +frame_groups:"grupper", +frame_rows:"r\u00E6kker", +frame_cols:"kolonner", +frame_all:"alle", +rules:"Regler", +rules_void:"void", +rules_above:"over", +rules_below:"under", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"boks", +rules_border:"kant" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/de.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/de.js deleted file mode 100644 index c469dcd2..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/de.js +++ /dev/null @@ -1,30 +0,0 @@ -// DE lang variables - -tinyMCELang['lang_table_desc'] = 'Neue Tabelle einfügen / Tabelle bearbeiten'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Zeile davor einfügen'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Zeile danach einfügen'; -tinyMCELang['lang_table_delete_row_desc'] = 'Zeile löschen'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Spalte davor einfügen'; -tinyMCELang['lang_table_insert_col_after_desc'] = ' Spalte danach einfügen'; -tinyMCELang['lang_table_delete_col_desc'] = 'Spalte löschen'; -tinyMCELang['lang_insert_table_title'] = 'Tabelle Einfügen/Bearbeiten'; -tinyMCELang['lang_insert_table_width'] = 'Breite'; -tinyMCELang['lang_insert_table_height'] = 'Höhe'; -tinyMCELang['lang_insert_table_cols'] = 'Spalten'; -tinyMCELang['lang_insert_table_rows'] = 'Zeilen'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Außenabstand'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Innenabstand'; -tinyMCELang['lang_insert_table_border'] = 'Rahmen'; -tinyMCELang['lang_insert_table_align'] = 'Ausrichten'; -tinyMCELang['lang_insert_table_align_default'] = 'Normal'; -tinyMCELang['lang_insert_table_align_left'] = 'Links'; -tinyMCELang['lang_insert_table_align_right'] = 'Rechts'; -tinyMCELang['lang_insert_table_align_middle'] = 'Zentriert'; -tinyMCELang['lang_insert_table_class'] = 'Klasse'; -tinyMCELang['lang_table_row_title'] = 'Zeileneigenschaften'; -tinyMCELang['lang_table_cell_title'] = 'Zelleneigenschaften'; -tinyMCELang['lang_table_row_desc'] = 'Reiheneigenschaften'; -tinyMCELang['lang_table_cell_desc'] = 'Zelleneigenschaften'; -tinyMCELang['lang_insert_table_valign'] = 'Vertikale Ausrichtung'; -tinyMCELang['lang_insert_table_align_top'] = 'Oben'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Unten'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/de_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/de_dlg.js new file mode 100644 index 00000000..7bbe7fa1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/de_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('de.table_dlg',{ +general_tab:"Allgemein", +advanced_tab:"Erweitert", +general_props:"Allgemeine Einstellungen", +advanced_props:"Erweiterte Einstellungen", +rowtype:"Row in table part", +title:"Tabelle einf\u00FCgen/bearbeiten", +width:"Breite", +height:"H\u00F6he", +cols:"Spalten", +rows:"Zeilen", +cellspacing:"Zellenabstand", +cellpadding:"Abstand innerhalb der Zellen", +border:"Rahmen", +align:"Ausrichtung", +align_default:"Standard", +align_left:"Links", +align_right:"Rechts", +align_middle:"Mittig", +row_title:"Eigenschaften der Zeile", +cell_title:"Eigenschaften der Zelle", +cell_type:"Zellentyp", +valign:"Vertikale Ausrichtung", +align_top:"Oben", +align_bottom:"Unten", +bordercolor:"Rahmenfarbe", +bgcolor:"Hintergrundfarbe", +merge_cells_title:"Zellen vereinen", +id:"ID", +style:"Format", +langdir:"Schriftrichtung", +langcode:"Sprachcode", +mime:"MIME-Type des Inhalts", +ltr:"Links nach rechts", +rtl:"Rechts nach links", +bgimage:"Hintergrundbild", +summary:"Zusammenfassung", +td:"Textzelle", +th:"\u00DCberschrift", +cell_cell:"Diese Zelle ver\u00E4ndern", +cell_row:"Alle Zellen in dieser Zeile ver\u00E4ndern", +cell_all:"Alle Zellen der Tabelle ver\u00E4ndern", +row_row:"Diese Zeile ver\u00E4ndern", +row_odd:"Ungerade Zeilen ver\u00E4ndern", +row_even:"Gerade Zeilen ver\u00E4ndern", +row_all:"Alle Zeilen ver\u00E4ndern", +thead:"Tabellenkopf", +tbody:"Tabelleninhalt", +tfoot:"Tabellenfu\u00DF", +scope:"Zusammenhang", +rowgroup:"Vertikal gruppieren", +colgroup:"Horizontal gruppieren", +col_limit:"Sie haben die maximale Spaltenzahl von {$cols} \u00FCberschritten.", +row_limit:"Sie haben die maximale Zeilenzahl von {$rows} \u00FCberschritten.", +cell_limit:"Sie haben die maximale Zellenzahl von {$cells} \u00FCberschritten.", +missing_scope:"Sind Sie sicher, dass Sie keinen Zusammenhang f\u00FCr diese \u00DCberschrift angeben wollen? Benutzer mit k\u00F6rperlichen Einschr\u00E4nkungen k\u00F6nnten Schwierigkeiten haben, den Inhalt der Tabelle zu verstehen.", +caption:"Beschriftung der Tabelle", +frame:"Gitter", +frame_none:"keins", +frame_groups:"Gruppen", +frame_rows:"Zeilen", +frame_cols:"Spalten", +frame_all:"Alle", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/dv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/dv_dlg.js new file mode 100644 index 00000000..91cf6a7b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/dv_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('dv.table_dlg',{ +general_tab:"General", +advanced_tab:"Advanced", +general_props:"General properties", +advanced_props:"Advanced properties", +rowtype:"Row in table part", +title:"Insert/Modify table", +width:"Width", +height:"Height", +cols:"Cols", +rows:"Rows", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Border", +align:"Alignment", +align_default:"Default", +align_left:"Left", +align_right:"Right", +align_middle:"Center", +row_title:"Table row properties", +cell_title:"Table cell properties", +cell_type:"Cell type", +valign:"Vertical alignment", +align_top:"Top", +align_bottom:"Bottom", +bordercolor:"Border color", +bgcolor:"Background color", +merge_cells_title:"Merge table cells", +id:"Id", +style:"Style", +langdir:"Language direction", +langcode:"Language code", +mime:"Target MIME type", +ltr:"Left to right", +rtl:"Right to left", +bgimage:"Background image", +summary:"Summary", +td:"Data", +th:"Header", +cell_cell:"Update current cell", +cell_row:"Update all cells in row", +cell_all:"Update all cells in table", +row_row:"Update current row", +row_odd:"Update odd rows in table", +row_even:"Update even rows in table", +row_all:"Update all rows in table", +thead:"Table Head", +tbody:"Table Body", +tfoot:"Table Foot", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/el.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/el.js deleted file mode 100644 index 45569479..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/el.js +++ /dev/null @@ -1,30 +0,0 @@ -// Greek lang variables by Jacaranda Bill - -tinyMCELang['lang_table_desc'] = 'ÅéóáãùãÞ ðßíáêá'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'ÅéóáãùãÞ ãñáììÞò åðÜíù'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'ÅéóáãùãÞ ãñáììÞò êÜôù'; -tinyMCELang['lang_table_delete_row_desc'] = 'ÄéáãñáöÞ ãñáììÞò'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'ÅéóáãùãÞ óôÞëçò áñéóôåñÜ'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'ÅéóáãùãÞ óôÞëçò äåîéÜ'; -tinyMCELang['lang_table_delete_col_desc'] = 'ÄéáãñáöÞ óôÞëçò'; -tinyMCELang['lang_insert_table_title'] = 'ÅéóáãùãÞ/Äéüñèùóç ðßíáêá'; -tinyMCELang['lang_insert_table_width'] = 'ÐëÜôïò'; -tinyMCELang['lang_insert_table_height'] = '¾øïò'; -tinyMCELang['lang_insert_table_cols'] = 'ÓôÞëåò'; -tinyMCELang['lang_insert_table_rows'] = 'ÃñáììÝò'; -tinyMCELang['lang_insert_table_cellspacing'] = 'ÄéÜóôé÷ï'; -tinyMCELang['lang_insert_table_cellpadding'] = 'ÃÝìéóìá'; -tinyMCELang['lang_insert_table_border'] = 'Ðåñßãñáììá'; -tinyMCELang['lang_insert_table_align'] = 'Óôïß÷éóç'; -tinyMCELang['lang_insert_table_align_default'] = 'Ðñïêáè.'; -tinyMCELang['lang_insert_table_align_left'] = 'ÁñéóôåñÜ'; -tinyMCELang['lang_insert_table_align_right'] = 'ÄåîéÜ'; -tinyMCELang['lang_insert_table_align_middle'] = 'Óôï êÝíôñï'; -tinyMCELang['lang_insert_table_class'] = 'ÊëÜóç'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/el_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/el_dlg.js new file mode 100644 index 00000000..60706df7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/el_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('el.table_dlg',{ +general_tab:"\u0393\u03B5\u03BD\u03B9\u03BA\u03AC", +advanced_tab:"\u0393\u03B9\u03B1 \u03C0\u03C1\u03BF\u03C7\u03C9\u03C1\u03B7\u03BC\u03AD\u03BD\u03BF\u03C5\u03C2", +general_props:"\u0393\u03B5\u03BD\u03B9\u03BA\u03AD\u03C2 \u03B9\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2", +advanced_props:"\u03A0\u03C1\u03BF\u03C7\u03C9\u03C1\u03B7\u03BC\u03AD\u03BD\u03B5\u03C2 \u03B9\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2", +rowtype:"\u0393\u03C1\u03B1\u03BC\u03BC\u03AE \u03C3\u03B5 \u03BC\u03AD\u03C1\u03BF\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +title:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +width:"\u03A0\u03BB\u03AC\u03C4\u03BF\u03C2", +height:"\u038E\u03C8\u03BF\u03C2", +cols:"\u03A3\u03C4\u03AE\u03BB\u03B5\u03C2", +rows:"\u0393\u03C1\u03B1\u03BC\u03BC\u03AD\u03C2", +cellspacing:"\u0391\u03C0\u03CC\u03C3\u03C4\u03B1\u03C3\u03B7 \u03BA\u03B5\u03BB\u03B9\u03CE\u03BD", +cellpadding:"\u0393\u03AD\u03BC\u03B9\u03C3\u03BC\u03B1 \u03BA\u03B5\u03BB\u03B9\u03CE\u03BD", +border:"\u03A0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF", +align:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7", +align_default:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03B7", +align_left:"\u0391\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +align_right:"\u0394\u03B5\u03BE\u03B9\u03AC", +align_middle:"\u039A\u03AD\u03BD\u03C4\u03C1\u03BF", +row_title:"\u0399\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +cell_title:"\u0399\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03BA\u03B5\u03BB\u03B9\u03BF\u03CD \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +cell_type:"\u03A4\u03CD\u03C0\u03BF\u03C2 \u03BA\u03B5\u03BB\u03B9\u03BF\u03CD", +valign:"\u039A\u03B1\u03C4\u03B1\u03BA\u03CC\u03C1\u03C5\u03C6\u03B7 \u03C3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7", +align_top:"\u03A0\u03AC\u03BD\u03C9", +align_bottom:"\u039A\u03AC\u03C4\u03C9", +bordercolor:"\u03A7\u03C1\u03CE\u03BC\u03B1 \u03C0\u03BB\u03B1\u03B9\u03C3\u03AF\u03BF\u03C5", +bgcolor:"\u03A7\u03C1\u03CE\u03BC\u03B1 \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5", +merge_cells_title:"\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 \u03BA\u03B5\u03BB\u03B9\u03CE\u03BD \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +id:"Id", +style:"\u03A3\u03C4\u03C5\u03BB", +langdir:"\u039A\u03B1\u03C4\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2", +langcode:"\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2", +mime:"\u03A4\u03CD\u03C0\u03BF\u03C2 MIME \u03C3\u03C4\u03CC\u03C7\u03BF\u03C5", +ltr:"\u0391\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC \u03C0\u03C1\u03BF\u03C2 \u03B4\u03B5\u03BE\u03B9\u03AC", +rtl:"\u0394\u03B5\u03BE\u03B9\u03AC \u03C0\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +bgimage:"\u0395\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5", +summary:"\u03A0\u03B5\u03C1\u03AF\u03BB\u03B7\u03C8\u03B7", +td:"\u0394\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03B1", +th:"\u0395\u03C0\u03B9\u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1", +cell_cell:"\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 \u03C4\u03C1\u03AD\u03C7\u03BF\u03BD\u03C4\u03BF\u03C2 \u03BA\u03B5\u03BB\u03B9\u03BF\u03CD", +cell_row:"\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03BA\u03B5\u03BB\u03B9\u03CE\u03BD \u03C4\u03B7\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2", +cell_all:"\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03BA\u03B5\u03BB\u03B9\u03CE\u03BD \u03C4\u03BF\u03C5 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +row_row:"\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 \u03C4\u03B7\u03C2 \u03C4\u03C1\u03AD\u03C7\u03BF\u03C5\u03C3\u03B1\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2", +row_odd:"\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 \u03C4\u03C9\u03BD \u03BC\u03BF\u03BD\u03CE\u03BD \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD \u03C4\u03BF\u03C5 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +row_even:"\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 \u03C4\u03C9\u03BD \u03B6\u03C5\u03B3\u03CE\u03BD \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD \u03C4\u03BF\u03C5 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +row_all:"\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD \u03C4\u03BF\u03C5 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +thead:"\u039A\u03BF\u03C1\u03C5\u03C6\u03AE \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +tbody:"\u03A3\u03CE\u03BC\u03B1 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +tfoot:"\u0392\u03AC\u03C3\u03B7 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +scope:"\u0395\u03BC\u03B2\u03AD\u03BB\u03B5\u03B9\u03B1", +rowgroup:"\u039F\u03BC\u03AC\u03B4\u03B1 \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD", +colgroup:"\u039F\u03BC\u03AC\u03B4\u03B1 \u03C3\u03C4\u03B7\u03BB\u03CE\u03BD", +col_limit:"\u0388\u03C7\u03B5\u03C4\u03B5 \u03BE\u03B5\u03C0\u03B5\u03C1\u03AC\u03C3\u03B5\u03B9 \u03C4\u03BF \u03CC\u03C1\u03B9\u03BF \u03C4\u03C9\u03BD \u03C3\u03C4\u03B7\u03BB\u03C9\u03BD \u03C0\u03BF\u03C5 \u03B5\u03AF\u03BD\u03B1\u03B9 {$cols}.", +row_limit:"\u0388\u03C7\u03B5\u03C4\u03B5 \u03BE\u03B5\u03C0\u03B5\u03C1\u03AC\u03C3\u03B5\u03B9 \u03C4\u03BF \u03CC\u03C1\u03B9\u03BF \u03C4\u03C9\u03BD \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD \u03C0\u03BF\u03C5 \u03B5\u03AF\u03BD\u03B1\u03B9 {$rows}.", +cell_limit:"\u0388\u03C7\u03B5\u03C4\u03B5 \u03BE\u03B5\u03C0\u03B5\u03C1\u03AC\u03C3\u03B5\u03B9 \u03C4\u03BF \u03CC\u03C1\u03B9\u03BF \u03C4\u03C9\u03BD \u03BA\u03B5\u03BB\u03B9\u03CE\u03BD \u03C0\u03BF\u03C5 \u03B5\u03AF\u03BD\u03B1\u03B9 {$cells}.", +missing_scope:"\u03A3\u03AF\u03B3\u03BF\u03C5\u03C1\u03B1 \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03C3\u03C5\u03BD\u03B5\u03C7\u03AF\u03C3\u03B5\u03C4\u03B5 \u03C7\u03C9\u03C1\u03AF\u03C2 \u03BD\u03B1 \u03AD\u03C7\u03B5\u03C4\u03B5 \u03BA\u03B1\u03B8\u03BF\u03C1\u03AF\u03C3\u03B5\u03B9 \u03C4\u03B7\u03BD \u03B5\u03BC\u03B2\u03AD\u03BB\u03B5\u03B9\u03B1 \u03C4\u03BF\u03C5 \u03BA\u03B5\u03BB\u03B9\u03BF\u03CD \u03C4\u03B7\u03C2 \u03BA\u03BF\u03C1\u03C5\u03C6\u03AE\u03C2 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1. \u03A7\u03C9\u03C1\u03AF\u03C2 \u03B1\u03C5\u03C4\u03AE, \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B4\u03CD\u03C3\u03BA\u03BF\u03BB\u03BF \u03B3\u03B9\u03B1 \u03BA\u03AC\u03C0\u03BF\u03B9\u03BF\u03C5\u03C2 \u03C7\u03C1\u03AE\u03C3\u03C4\u03B5\u03C2 \u03BC\u03B5 \u03C0\u03C1\u03BF\u03B2\u03BB\u03AE\u03BC\u03B1\u03C4\u03B1 \u03BD\u03B1 \u03BA\u03B1\u03C4\u03B1\u03BB\u03AC\u03B2\u03BF\u03C5\u03BD \u03C4\u03BF \u03C0\u03B5\u03C1\u03B9\u03B5\u03C7\u03CC\u03BC\u03B5\u03BD\u03BF \u03C4\u03BF\u03C5 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1.", +caption:"\u0395\u03C0\u03B9\u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1 \u03C0\u03AF\u03BD\u03B1\u03BA\u03B1", +frame:"Frame", +frame_none:"\u03BA\u03B1\u03BD\u03AD\u03BD\u03B1", +frame_groups:"\u03BF\u03BC\u03AC\u03B4\u03B5\u03C2", +frame_rows:"\u03B3\u03C1\u03B1\u03BC\u03BC\u03AD\u03C2", +frame_cols:"\u03C3\u03C4\u03AE\u03BB\u03B5\u03C2", +frame_all:"\u03CC\u03BB\u03B1", +rules:"\u039A\u03B1\u03BD\u03CC\u03BD\u03B5\u03C2", +rules_void:"\u03BA\u03B5\u03BD\u03CC", +rules_above:"\u03B1\u03C0\u03CC \u03C0\u03AC\u03BD\u03C9", +rules_below:"\u03B1\u03C0\u03CC \u03BA\u03AC\u03C4\u03C9", +rules_hsides:"\u03BF\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B5\u03C2 \u03C0\u03BB\u03B5\u03C5\u03C1\u03AD\u03C2", +rules_lhs:"\u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AE \u03BF\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B1 \u03C0\u03BB\u03B5\u03C5\u03C1\u03AC", +rules_rhs:"\u03B4\u03B5\u03BE\u03B9\u03AC \u03BF\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B1 \u03C0\u03BB\u03B5\u03C5\u03C1\u03AC", +rules_vsides:"\u03BA\u03AC\u03B8\u03B5\u03C4\u03B5\u03C2 \u03C0\u03BB\u03B5\u03C5\u03C1\u03AD\u03C2", +rules_box:"\u03BA\u03BF\u03C5\u03C4\u03AF", +rules_border:"\u03C0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/en.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/en.js deleted file mode 100644 index 2211685a..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/en.js +++ /dev/null @@ -1,30 +0,0 @@ -// UK lang variables - -tinyMCELang['lang_table_desc'] = 'Inserts a new table'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Insert row before'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Insert row after'; -tinyMCELang['lang_table_delete_row_desc'] = 'Delete row'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Insert column before'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Insert column after'; -tinyMCELang['lang_table_delete_col_desc'] = 'Remove col'; -tinyMCELang['lang_insert_table_title'] = 'Insert/Modify table'; -tinyMCELang['lang_insert_table_width'] = 'Width'; -tinyMCELang['lang_insert_table_height'] = 'Height'; -tinyMCELang['lang_insert_table_cols'] = 'Columns'; -tinyMCELang['lang_insert_table_rows'] = 'Rows'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Cellspacing'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Cellpadding'; -tinyMCELang['lang_insert_table_border'] = 'Border'; -tinyMCELang['lang_insert_table_align'] = 'Alignment'; -tinyMCELang['lang_insert_table_align_default'] = 'Default'; -tinyMCELang['lang_insert_table_align_left'] = 'Left'; -tinyMCELang['lang_insert_table_align_right'] = 'Right'; -tinyMCELang['lang_insert_table_align_middle'] = 'Middle'; -tinyMCELang['lang_insert_table_class'] = 'Class'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/en_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/en_dlg.js new file mode 100644 index 00000000..000332a3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/en_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('en.table_dlg',{ +general_tab:"General", +advanced_tab:"Advanced", +general_props:"General properties", +advanced_props:"Advanced properties", +rowtype:"Row in table part", +title:"Insert/Modify table", +width:"Width", +height:"Height", +cols:"Cols", +rows:"Rows", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Border", +align:"Alignment", +align_default:"Default", +align_left:"Left", +align_right:"Right", +align_middle:"Center", +row_title:"Table row properties", +cell_title:"Table cell properties", +cell_type:"Cell type", +valign:"Vertical alignment", +align_top:"Top", +align_bottom:"Bottom", +bordercolor:"Border color", +bgcolor:"Background color", +merge_cells_title:"Merge table cells", +id:"Id", +style:"Style", +langdir:"Language direction", +langcode:"Language code", +mime:"Target MIME type", +ltr:"Left to right", +rtl:"Right to left", +bgimage:"Background image", +summary:"Summary", +td:"Data", +th:"Header", +cell_cell:"Update current cell", +cell_row:"Update all cells in row", +cell_all:"Update all cells in table", +row_row:"Update current row", +row_odd:"Update odd rows in table", +row_even:"Update even rows in table", +row_all:"Update all rows in table", +thead:"Table Head", +tbody:"Table Body", +tfoot:"Table Foot", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/es.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/es.js deleted file mode 100644 index 652e1cef..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/es.js +++ /dev/null @@ -1,30 +0,0 @@ -// ES lang variables by Alvaro Velasco - -tinyMCELang['lang_table_desc'] = 'Insertar una tabla nueva'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Insertar una fila antes'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Insertar una fila despues'; -tinyMCELang['lang_table_delete_row_desc'] = 'Eliminar una fila'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Insertar una columna before'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Insertar columna after'; -tinyMCELang['lang_table_delete_col_desc'] = 'Eliminar una columna'; -tinyMCELang['lang_insert_table_title'] = 'Insertar/Modificar tabla'; -tinyMCELang['lang_insert_table_width'] = 'Anchura'; -tinyMCELang['lang_insert_table_height'] = 'Altura'; -tinyMCELang['lang_insert_table_cols'] = 'Columnas'; -tinyMCELang['lang_insert_table_rows'] = 'Filas'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Espacio entre celdas'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Desplazamiento entre celdas'; -tinyMCELang['lang_insert_table_border'] = 'Borde'; -tinyMCELang['lang_insert_table_align'] = 'Alineamiento'; -tinyMCELang['lang_insert_table_align_default'] = 'Por defecto'; -tinyMCELang['lang_insert_table_align_left'] = 'Izquierda'; -tinyMCELang['lang_insert_table_align_right'] = 'Derecha'; -tinyMCELang['lang_insert_table_align_middle'] = 'Centro'; -tinyMCELang['lang_insert_table_class'] = 'Class'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/es_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/es_dlg.js new file mode 100644 index 00000000..53786c48 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/es_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('es.table_dlg',{ +general_tab:"General", +advanced_tab:"Avanzado", +general_props:"Propiedades generales", +advanced_props:"Propiedades avanzadas", +rowtype:"Tipo de fila", +title:"Insertar/Modificar tabla", +width:"Ancho", +height:"Alto", +cols:"Cols", +rows:"Filas", +cellspacing:"Espaciado de celda", +cellpadding:"Relleno de celda", +border:"Borde", +align:"Alineaci\u00F3n", +align_default:"Predet.", +align_left:"Izquierda", +align_right:"Derecha", +align_middle:"Centrado", +row_title:"Propiedades de la fila", +cell_title:"Propiedades de la celda", +cell_type:"Tipo de celda", +valign:"Alineaci\u00F3n vertical", +align_top:"Arriba", +align_bottom:"Debajo", +bordercolor:"Color del borde", +bgcolor:"Color de fondo", +merge_cells_title:"Vincular celdas", +id:"Id", +style:"Estilo", +langdir:"Direcci\u00F3n del lenguaje", +langcode:"C\u00F3digo del lenguaje", +mime:"Tipo MIME", +ltr:"Izquierda a derecha", +rtl:"Derecha a izquierda", +bgimage:"Imagen de fondo", +summary:"Resumen", +td:"Datos", +th:"Encabezado", +cell_cell:"Actualizar celda actual", +cell_row:"Actualizar todas las celdas en la fila", +cell_all:"Actualizar todas las celdas en la tabla", +row_row:"Actualizar fila actual", +row_odd:"Actualizar filas impares", +row_even:"Actualizar filas pares", +row_all:"Actualizar todas las filas", +thead:"Encabezado de la tabla", +tbody:"Cuerpo de la tabla", +tfoot:"Pie de la tabla", +scope:"Alcance", +rowgroup:"Grupo de filas", +colgroup:"Grupo de columnas", +col_limit:"Ha superado el n\u00FAmero m\u00E1ximo de columnas: {$cols}.", +row_limit:"Ha superado el n\u00FAmero m\u00E1ximo de filas: {$rows}.", +cell_limit:"Ha superado el n\u00FAmero m\u00E1ximo de celdas: {$cells}.", +missing_scope:" \u00BFEst\u00E1 seguro que desea continuar sin especificar el alcance del encabezado de celda? Sin \u00E9l podr\u00EDa ser dificultoso para algunos usuarios entender el contenido o los datos mostrados en la tabla.", +caption:"Subt\u00EDtulo de la tabla", +frame:"Recuadro", +frame_none:"ninguno", +frame_groups:"grupos", +frame_rows:"filas", +frame_cols:"cols", +frame_all:"todos", +rules:"Reglas", +rules_void:"vac\u00EDo", +rules_above:"encima", +rules_below:"debajo", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/et_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/et_dlg.js new file mode 100644 index 00000000..3d28433e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/et_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('et.table_dlg',{ +general_tab:"General", +advanced_tab:"Advanced", +general_props:"General properties", +advanced_props:"Advanced properties", +rowtype:"Row in table part", +title:"Insert/Modify table", +width:"Width", +height:"Height", +cols:"Cols", +rows:"Rows", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Border", +align:"Alignment", +align_default:"Default", +align_left:"Left", +align_right:"Right", +align_middle:"Center", +row_title:"Table row properties", +cell_title:"Table cell properties", +cell_type:"Cell type", +valign:"Vertical alignment", +align_top:"Top", +align_bottom:"Bottom", +bordercolor:"Border color", +bgcolor:"Background color", +merge_cells_title:"Merge table cells", +id:"Id", +style:"Style", +langdir:"Language direction", +langcode:"Language code", +mime:"Target MIME type", +ltr:"Left to right", +rtl:"Right to left", +bgimage:"Background image", +summary:"Summary", +td:"Data", +th:"Header", +cell_cell:"Update current cell", +cell_row:"Update all cells in row", +cell_all:"Update all cells in table", +row_row:"Update current row", +row_odd:"Update odd rows in table", +row_even:"Update even rows in table", +row_all:"Update all rows in table", +thead:"Table Head", +tbody:"Table Body", +tfoot:"Table Foot", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fa.js deleted file mode 100644 index 46effd9e..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fa.js +++ /dev/null @@ -1,34 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_table_desc'] = 'درج جدول جديد'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'درج سطر جديد پيش از سطر Ùعلي'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'درج سطر جديد پس از سطر Ùعلي'; -tinyMCELang['lang_table_delete_row_desc'] = 'حذ٠سطر'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'درج ستون جديد پيش از ستوي Ùعلي'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'درج ستون جديد پس از ستوي Ùعلي'; -tinyMCELang['lang_table_delete_col_desc'] = 'حذ٠ستون'; -tinyMCELang['lang_insert_table_title'] = 'درج Ùˆ ويرايش جدول'; -tinyMCELang['lang_insert_table_width'] = 'عرض'; -tinyMCELang['lang_insert_table_height'] = 'ارتقاع'; -tinyMCELang['lang_insert_table_cols'] = 'تعداد ستونها'; -tinyMCELang['lang_insert_table_rows'] = 'تعداد سطرها'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Ùاصله با سلول بعدی'; -tinyMCELang['lang_insert_table_cellpadding'] = 'حاشیه متن تا دیواره سلول'; -tinyMCELang['lang_insert_table_border'] = 'حاشيه'; -tinyMCELang['lang_insert_table_align'] = 'محل قرار گيري'; -tinyMCELang['lang_insert_table_align_default'] = 'پيش Ùرض'; -tinyMCELang['lang_insert_table_align_left'] = 'Ú†Ù¾'; -tinyMCELang['lang_insert_table_align_right'] = 'راست'; -tinyMCELang['lang_insert_table_align_middle'] = 'وسط'; -tinyMCELang['lang_insert_table_class'] = 'کلاس'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fa_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fa_dlg.js new file mode 100644 index 00000000..f3e0e880 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fa_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('fa.table_dlg',{ +general_tab:"\u0639\u0645\u0648\u0645\u06CC", +advanced_tab:"\u067E\u06CC\u0634\u0631\u0641\u062A\u0647", +general_props:"\u0645\u0634\u062E\u0635\u0627\u062A \u0639\u0645\u0648\u0645\u06CC", +advanced_props:"\u0645\u0634\u062E\u0635\u0627\u062A \u067E\u06CC\u0634\u0631\u0641\u062A\u0647", +rowtype:"\u0633\u0637\u0631 \u062F\u0631 \u0628\u062E\u0634 \u062C\u062F\u0648\u0644", +title:"\u062F\u0631\u062C/\u0627\u0635\u0644\u0627\u062D \u062C\u062F\u0648\u0644", +width:"\u067E\u0647\u0646\u0627", +height:"\u0627\u0631\u062A\u0641\u0627\u0639", +cols:"\u0633\u062A\u0648\u0646 \u0647\u0627", +rows:"\u0633\u0637\u0631\u0647\u0627", +cellspacing:"\u0641\u0627\u0635\u0644\u0647 \u0633\u0644\u0648\u0644 \u0647\u0627", +cellpadding:"\u0644\u0627\u06CC\u0647 \u06AF\u0630\u0627\u0631\u06CC \u0633\u0644\u0648\u0644 \u0647\u0627", +border:"\u062D\u0627\u0634\u06CC\u0647", +align:"\u062A\u0631\u0627\u0632", +align_default:"\u067E\u06CC\u0634\u0641\u0631\u0636", +align_left:"\u0686\u067E", +align_right:"\u0631\u0627\u0633\u062A", +align_middle:"\u0648\u0633\u0637", +row_title:"\u0645\u0634\u062E\u0635\u0627\u062A \u0633\u0637\u0631 \u062C\u062F\u0648\u0644", +cell_title:"\u0645\u0634\u062E\u0635\u0627\u062A \u0633\u0644\u0648\u0644 \u062C\u062F\u0648\u0644", +cell_type:"\u0646\u0648\u0639 \u0633\u0644\u0648\u0644", +valign:"\u062A\u0631\u0627\u0632 \u0639\u0645\u0648\u062F\u06CC", +align_top:"\u0628\u0627\u0644\u0627", +align_bottom:"\u067E\u0627\u06CC\u06CC\u0646", +bordercolor:"\u0631\u0646\u06AF \u062D\u0627\u0634\u06CC\u0647", +bgcolor:"\u0631\u0646\u06AF \u0632\u0645\u06CC\u0646\u0647", +merge_cells_title:"\u0627\u062F\u063A\u0627\u0645 \u0633\u0644\u0648\u0644 \u0647\u0627\u06CC \u062C\u062F\u0648\u0644", +id:"\u0634\u0646\u0627\u0633\u0647", +style:"\u0627\u0633\u062A\u06CC\u0644", +langdir:"\u062C\u0647\u062A \u0632\u0628\u0627\u0646", +langcode:"\u0643\u062F \u0632\u0628\u0627\u0646", +mime:"\u0646\u0648\u0639 MIME \u0645\u0642\u0635\u062F (Target)", +ltr:"\u0686\u067E \u0628\u0647 \u0631\u0627\u0633\u062A", +rtl:"\u0631\u0627\u0633\u062A \u0628\u0647 \u0686\u067E", +bgimage:"\u062A\u0635\u0648\u06CC\u0631 \u0632\u0645\u06CC\u0646\u0647", +summary:"\u062E\u0644\u0627\u0635\u0647", +td:"\u062F\u0627\u062F\u0647", +th:"\u0633\u0631 \u062C\u062F\u0648\u0644", +cell_cell:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u0633\u0644\u0648\u0644 \u0641\u0639\u0644\u06CC", +cell_row:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u062A\u0645\u0627\u0645\u06CC \u0633\u0644\u0648\u0644 \u0647\u0627\u06CC \u0633\u0637\u0631", +cell_all:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u062A\u0645\u0627\u0645\u06CC \u0633\u0644\u0648\u0644 \u0647\u0627\u06CC \u062C\u062F\u0648\u0644", +row_row:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u0633\u0637\u0631 \u0641\u0639\u0644\u06CC", +row_odd:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u0633\u0637\u0631\u0647\u0627\u06CC \u0641\u0631\u062F \u062F\u0631 \u062C\u062F\u0648\u0644", +row_even:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u0633\u0637\u0631\u0647\u0627\u06CC \u0632\u0648\u062C \u062F\u0631 \u062C\u062F\u0648\u0644", +row_all:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u062A\u0645\u0627\u0645\u06CC \u0633\u0637\u0631\u0647\u0627 \u062F\u0631 \u062C\u062F\u0648\u0644", +thead:"\u0628\u0627\u0644\u0627\u06CC \u062C\u062F\u0648\u0644", +tbody:"\u0628\u062F\u0646\u0647 \u062C\u062F\u0648\u0644", +tfoot:"\u067E\u0627\u06CC\u06CC\u0646 \u062C\u062F\u0648\u0644", +scope:"\u0645\u062D\u062F\u0648\u062F\u0647", +rowgroup:"\u06AF\u0631\u0648\u0647 \u0633\u0637\u0631", +colgroup:"\u06AF\u0631\u0648\u0647 \u0633\u062A\u0648\u0646", +col_limit:"\u0634\u0645\u0627 \u0627\u0632 \u062A\u0639\u062F\u0627\u062F \u062D\u062F\u0627\u0643\u062B\u0631 {$cols} \u0633\u062A\u0648\u0646 \u062A\u062C\u0627\u0648\u0632 \u0643\u0631\u062F\u06CC\u062F.", +row_limit:"\u0634\u0645\u0627 \u0627\u0632 \u062A\u0639\u062F\u0627\u062F \u062D\u062F\u0627\u0643\u062B\u0631 {$rows} \u0633\u0637\u0631 \u062A\u062C\u0627\u0648\u0632 \u0643\u0631\u062F\u06CC\u062F.", +cell_limit:"\u0634\u0645\u0627 \u0627\u0632 \u062A\u0639\u062F\u0627\u062F \u062D\u062F\u0627\u0643\u062B\u0631 {$cells} \u0633\u0644\u0648\u0644 \u062A\u062C\u0627\u0648\u0632 \u0643\u0631\u062F\u06CC\u062F.", +missing_scope:"\u0622\u06CC\u0627 \u0634\u0645\u0627 \u0627\u0632 \u0627\u062F\u0627\u0645\u0647 \u062F\u0627\u062F\u0646 \u0628\u062F\u0648\u0646 \u062A\u0639\u06CC\u06CC\u0646 \u0645\u062D\u062F\u0648\u062F\u0647 \u0628\u0631\u0627\u06CC \u0627\u06CC\u0646 \u0633\u0644\u0648\u0644 \u0628\u0627\u0644\u0627\u06CC \u062C\u062F\u0648\u0644 \u0627\u0637\u0645\u06CC\u0646\u0627\u0646 \u062F\u0627\u0631\u06CC\u062F\u061F. \u0628\u062F\u0648\u0646 \u0622\u0646 \u060C \u0645\u0645\u0643\u0646 \u0627\u0633\u062A \u0628\u0631\u0627\u06CC \u0628\u0631\u062E\u06CC \u0643\u0627\u0631\u0628\u0631\u0627\u0646 \u0639\u0627\u062C\u0632 \u0627\u0632 \u0641\u0647\u0645 \u0645\u062D\u062A\u0648\u0627 \u06CC\u0627 \u062F\u0631 \u062F\u0627\u062F\u0647 \u0647\u0627\u06CC \u0646\u0645\u0627\u06CC\u0634 \u062F\u0627\u062F\u0647 \u0634\u062F\u0647 \u062C\u062F\u0648\u0644 \u0645\u0634\u0643\u0644\u06CC \u067E\u06CC\u0634 \u0622\u06CC\u062F.", +caption:"\u0639\u0646\u0648\u0627\u0646 \u062C\u062F\u0648\u0644", +frame:"\u0642\u0627\u0628 (Frame)", +frame_none:"\u0647\u06CC\u0686 \u0643\u062F\u0627\u0645", +frame_groups:"\u06AF\u0631\u0648\u0647 \u0647\u0627", +frame_rows:"\u0633\u0637\u0631\u0647\u0627", +frame_cols:"\u0633\u062A\u0648\u0646 \u0647\u0627", +frame_all:"\u0647\u0645\u0647", +rules:"\u062E\u0637 \u0647\u0627", +rules_void:"\u062E\u0627\u0644\u06CC", +rules_above:"\u0628\u0627\u0644\u0627", +rules_below:"\u067E\u0627\u06CC\u06CC\u0646", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"\u062C\u0639\u0628\u0647", +rules_border:"\u062D\u0627\u0634\u06CC\u0647" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fi.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fi.js deleted file mode 100644 index 9eb8fa1a..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fi.js +++ /dev/null @@ -1,30 +0,0 @@ -// FI lang variables by Urho Konttori from Absolutions - -tinyMCELang['lang_table_desc'] = 'Lisää uusi taulu'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Lisää rivi edelle'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Lisää rivi jälkeen'; -tinyMCELang['lang_table_delete_row_desc'] = 'Posita rivi'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Lisää sarake edelle'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Lisää sarake jälkeen'; -tinyMCELang['lang_table_delete_col_desc'] = 'Poista sarake'; -tinyMCELang['lang_insert_table_title'] = 'Lisää/muokkaa taulua'; -tinyMCELang['lang_insert_table_width'] = 'Leveys'; -tinyMCELang['lang_insert_table_height'] = 'Korkeus'; -tinyMCELang['lang_insert_table_cols'] = 'Sarakkeet'; -tinyMCELang['lang_insert_table_rows'] = 'Rivit'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Solujen väli'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Solun reunan ja sisällön väli'; -tinyMCELang['lang_insert_table_border'] = 'Reuna'; -tinyMCELang['lang_insert_table_align'] = 'Asettelu'; -tinyMCELang['lang_insert_table_align_default'] = 'Oletus'; -tinyMCELang['lang_insert_table_align_left'] = 'Vasen'; -tinyMCELang['lang_insert_table_align_right'] = 'Oikea'; -tinyMCELang['lang_insert_table_align_middle'] = 'Keskelle'; -tinyMCELang['lang_insert_table_delta_height'] = 20; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fi_dlg.js new file mode 100644 index 00000000..9f14328f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fi_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('fi.table_dlg',{ +general_tab:"Yleiset", +advanced_tab:"Edistynyt", +general_props:"Yleiset asetukset", +advanced_props:"Edistyneet asetukset", +rowtype:"Rivi taulukon osassa", +title:"Lis\u00E4\u00E4/muokkaa taulukkoa", +width:"Leveys", +height:"Korkeus", +cols:"Sarakkeet", +rows:"Rivit", +cellspacing:"Solun v\u00E4li", +cellpadding:"Solun tyhj\u00E4 tila", +border:"Kehys", +align:"Tasaus", +align_default:"Oletus", +align_left:"Vasen", +align_right:"Oikea", +align_middle:"Keskitetty", +row_title:"Taulukon rivin asetukset", +cell_title:"Taulukon solun asetukset", +cell_type:"Solun tyyppi", +valign:"Pystysuunnan tasaus", +align_top:"Yl\u00F6s", +align_bottom:"Alas", +bordercolor:"Kehyksen v\u00E4ri", +bgcolor:"Taustan v\u00E4ri", +merge_cells_title:"Yhdist\u00E4 taulukon solut", +id:"Id", +style:"Tyyli", +langdir:"Kielen suunta", +langcode:"Kielen koodi", +mime:"Kohteen MIME-tyyppi", +ltr:"Vasemmalta oikealle", +rtl:"Oikealta vasemmalle", +bgimage:"Taustakuva", +summary:"Yhteenveto", +td:"Tietue", +th:"Otsake", +cell_cell:"P\u00E4ivit\u00E4 solu", +cell_row:"P\u00E4ivit\u00E4 kaikki rivin solut", +cell_all:"P\u00E4ivit\u00E4 kaikki taulukon solut", +row_row:"P\u00E4ivit\u00E4 rivi", +row_odd:"P\u00E4ivit\u00E4 taulukon parittomat rivit", +row_even:"P\u00E4ivit\u00E4 taulukon parilliset rivit", +row_all:"P\u00E4ivit\u00E4 kaikki taulukon rivit", +thead:"Taulukon otsake", +tbody:"Taulukon runko", +tfoot:"Taulukon alaosa", +scope:"Tila", +rowgroup:"Rivi ryhm\u00E4", +colgroup:"Sarake ryhm\u00E4", +col_limit:"Olet ylitt\u00E4nyt suurimman sallitun m\u00E4\u00E4r\u00E4n sarakkeita {$cols}.", +row_limit:"Olet ylitt\u00E4nyt suurimman sallitun m\u00E4\u00E4r\u00E4n rivej\u00E4 {$rows}.", +cell_limit:"Olet ylitt\u00E4nyt suurimman sallitun m\u00E4\u00E4r\u00E4n soluja {$cells}.", +missing_scope:"Haluatko varmasti jatkaa m\u00E4\u00E4ritt\u00E4m\u00E4tt\u00E4 tilaa t\u00E4lle taulukon otsakesolulle? Ilman sit\u00E4 voi olla joillekin k\u00E4ytt\u00E4jille vaikea ymm\u00E4rt\u00E4\u00E4 taulukon sis\u00E4lt\u00E4m\u00E4\u00E4 informaatiota.", +caption:"Taulukon seloste", +frame:"kehys", +frame_none:"ei mit\u00E4\u00E4n", +frame_groups:"ryhm\u00E4t", +frame_rows:"rivit", +frame_cols:"sarakkeet", +frame_all:"kaikki", +rules:"S\u00E4\u00E4nn\u00F6t", +rules_void:"tyhj\u00E4", +rules_above:"yl\u00E4puoli", +rules_below:"alapuoli", +rules_hsides:"vaakasuorat reunat", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"pystysuorat reunat", +rules_box:"laatikko", +rules_border:"kehys" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr.js deleted file mode 100644 index 7239577f..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr.js +++ /dev/null @@ -1,30 +0,0 @@ -// French lang variables by Laurent Dran - -tinyMCELang['lang_table_desc'] = 'Insérer un nouveau tableau'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Insérer une ligne avant'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Insérer une ligne aprés'; -tinyMCELang['lang_table_delete_row_desc'] = 'Supprimer la ligne'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Insérer une colonne avant'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Insérer une colonne aprés'; -tinyMCELang['lang_table_delete_col_desc'] = 'Supprimer la colonne'; -tinyMCELang['lang_insert_table_title'] = 'Insérer/Modifier le tableau'; -tinyMCELang['lang_insert_table_width'] = 'Largeur'; -tinyMCELang['lang_insert_table_height'] = 'Hauteur'; -tinyMCELang['lang_insert_table_cols'] = 'Colonnes'; -tinyMCELang['lang_insert_table_rows'] = 'Lignes'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Cellspacing'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Cellpadding'; -tinyMCELang['lang_insert_table_border'] = 'Bordure'; -tinyMCELang['lang_insert_table_align'] = 'Alignement'; -tinyMCELang['lang_insert_table_align_default'] = 'Défaut'; -tinyMCELang['lang_insert_table_align_left'] = 'Gauche'; -tinyMCELang['lang_insert_table_align_right'] = 'Droit'; -tinyMCELang['lang_insert_table_align_middle'] = 'Milieu'; -tinyMCELang['lang_insert_table_class'] = 'Classe CSS'; -tinyMCELang['lang_table_row_title'] = 'Propriétés de la rangée'; -tinyMCELang['lang_table_cell_title'] = 'Propriétés de la cellule'; -tinyMCELang['lang_table_row_desc'] = 'Propriétés de la rangée'; -tinyMCELang['lang_table_cell_desc'] = 'Propriétés de la cellule'; -tinyMCELang['lang_insert_table_valign'] = 'Alignement Vertical'; -tinyMCELang['lang_insert_table_align_top'] = 'Haut'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bas'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr_ca.js deleted file mode 100644 index cdd46995..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr_ca.js +++ /dev/null @@ -1,30 +0,0 @@ -// Canadian French lang variables by Virtuelcom - -tinyMCELang['lang_table_desc'] = 'Insérer un nouveau tableau'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Insérer une ligne avant'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Insérer une ligne aprés'; -tinyMCELang['lang_table_delete_row_desc'] = 'Supprimer la ligne'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Insérer une colonne avant'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Insérer une colonne aprés'; -tinyMCELang['lang_table_delete_col_desc'] = 'Supprimer la colonne'; -tinyMCELang['lang_insert_table_title'] = 'Insérer/Modifier le tableau'; -tinyMCELang['lang_insert_table_width'] = 'Largeur'; -tinyMCELang['lang_insert_table_height'] = 'Hauteur'; -tinyMCELang['lang_insert_table_cols'] = 'Colonnes'; -tinyMCELang['lang_insert_table_rows'] = 'Lignes'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Cellspacing'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Cellpadding'; -tinyMCELang['lang_insert_table_border'] = 'Bordure'; -tinyMCELang['lang_insert_table_align'] = 'Alignement'; -tinyMCELang['lang_insert_table_align_default'] = 'Défaut'; -tinyMCELang['lang_insert_table_align_left'] = 'Gauche'; -tinyMCELang['lang_insert_table_align_right'] = 'Droit'; -tinyMCELang['lang_insert_table_align_middle'] = 'Milieu'; -tinyMCELang['lang_insert_table_class'] = 'Classe CSS'; -tinyMCELang['lang_table_row_title'] = 'Propriétés de ligne'; -tinyMCELang['lang_table_cell_title'] = 'Propriétés de cellule'; -tinyMCELang['lang_table_row_desc'] = 'Propriétés de ligne'; -tinyMCELang['lang_table_cell_desc'] = 'Propriétés de cellule'; -tinyMCELang['lang_insert_table_valign'] = 'Alignement vertical'; -tinyMCELang['lang_insert_table_align_top'] = 'Haut'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bas'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr_dlg.js new file mode 100644 index 00000000..d49267ed --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/fr_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('fr.table_dlg',{ +general_tab:"G\u00E9n\u00E9ral", +advanced_tab:"Avanc\u00E9", +general_props:"Propri\u00E9t\u00E9s g\u00E9n\u00E9rales", +advanced_props:"Propri\u00E9t\u00E9s avanc\u00E9es", +rowtype:"Type de ligne", +title:"Ins\u00E9rer/Modifier tableau", +width:"Largeur", +height:"Hauteur", +cols:"Colonnes", +rows:"Lignes", +cellspacing:"Espacement des cellules", +cellpadding:"Espacement dans les cellules", +border:"Bordure", +align:"Alignement", +align_default:"Par defaut", +align_left:"Gauche", +align_right:"Droit", +align_middle:"Centr\u00E9", +row_title:"Propri\u00E9t\u00E9s de la ligne", +cell_title:"Propri\u00E9t\u00E9s de la cellule", +cell_type:"Type de cellule", +valign:"Alignement vertical", +align_top:"Haut", +align_bottom:"Bas", +bordercolor:"Couleur de la bordure", +bgcolor:"Couleur du fond", +merge_cells_title:"Fusioner les cellules", +id:"Id", +style:"Style", +langdir:"Sens de lecture", +langcode:"Code de la langue", +mime:"Type MIME de la cible", +ltr:"De gauche \u00E0 droite", +rtl:"de droite \u00E0 gauche", +bgimage:"Image de fond", +summary:"R\u00E9sum\u00E9", +td:"Donn\u00E9es", +th:"Titre", +cell_cell:"Mettre \u00E0 jour la cellule courante", +cell_row:"Mettre \u00E0 jour toutes les cellules de la ligne", +cell_all:"Mettre \u00E0 jour toutes les celluls du tableau", +row_row:"Mettre \u00E0 jour la ligne courante", +row_odd:"Mettre \u00E0 jour les lignes impaires", +row_even:"Mettre \u00E0 jour les lignes paires", +row_all:"Mettre \u00E0 jout toutes les lignes du tableau", +thead:"T\u00EAte de tableau", +tbody:"Corps de tableau", +tfoot:"Pied de tableau", +scope:"Port\u00E9e", +rowgroup:"Groupe de lignes", +colgroup:"Groupe de colonnes", +col_limit:"Vous avez d\u00E9pass\u00E9 le nombre maximum de colonnes ({$cols}).", +row_limit:"Vous avez d\u00E9pass\u00E9 le nombre maximum de lignes ({$rows}).", +cell_limit:"Vous avez d\u00E9pass\u00E9 le nombre maximum de cellules ({$cells}).", +missing_scope:"\u00CAtes-vous s\u00FBr de vouloir continuer sans sp\u00E9ficier de port\u00E9e pour cette cellule de titre\u00A0? Sans port\u00E9e, cela peut \u00EAtre difficile pour certains usagers \u00E0 probl\u00E8mes de comprendre le contenu ou les donn\u00E9es affich\u00E9es dans le tableau.", +caption:"Afficher la l\u00E9gende du tableau", +frame:"Cadre", +frame_none:"aucun", +frame_groups:"groupe", +frame_rows:"lignes", +frame_cols:"colonnes", +frame_all:"tous", +rules:"R\u00E8gles", +rules_void:"nul", +rules_above:"au dessus", +rules_below:"au dessous", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/gl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/gl_dlg.js new file mode 100644 index 00000000..806803fe --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/gl_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('gl.table_dlg',{ +general_tab:"Xeral", +advanced_tab:"Avanzado", +general_props:"Propiedades xerales", +advanced_props:"Propiedades avanzadas", +rowtype:"Tipo de fila", +title:"Insertar/Modificar t\u00E1boa", +width:"Ancho", +height:"Alto", +cols:"Cols", +rows:"Filas", +cellspacing:"Espaciado de celda", +cellpadding:"Relleno de celda", +border:"Borde", +align:"Ali\u00F1aci\u00F3n", +align_default:"Predet.", +align_left:"Esquerda", +align_right:"Dereita", +align_middle:"Centrado", +row_title:"Propiedades da fila", +cell_title:"Propiedades da celda", +cell_type:"Tipo de celda", +valign:"Ali\u00F1aci\u00F3n vertical", +align_top:"Arriba", +align_bottom:"Abaixo", +bordercolor:"Cor do borde", +bgcolor:"Cor de fondo", +merge_cells_title:"Unir celdas", +id:"Id", +style:"Estilo", +langdir:"Direcci\u00F3n da lenguaxe", +langcode:"C\u00F3digo da lenguaxe", +mime:"Tipo MIME", +ltr:"Esquerda a dereita", +rtl:"Dereita a esquerda", +bgimage:"Imaxe de fondo", +summary:"Resumen", +td:"Datos", +th:"Encabezamento", +cell_cell:"Actualizar celda actual", +cell_row:"Actualizar todalas celdas na fila", +cell_all:"Actualizar todalas celdas na t\u00E1boa", +row_row:"Actualizar fila actual", +row_odd:"Actualizar filas impares", +row_even:"Actualizar filas pares", +row_all:"Actualizar todalas filas", +thead:"Encabezamento da t\u00E1boa", +tbody:"Corpo da t\u00E1boa", +tfoot:"Pe da t\u00E1boa", +scope:"\u00C1mbito", +rowgroup:"Grupo de filas", +colgroup:"Grupo de columnas", +col_limit:"Super\u00F3u o n\u00FAmero m\u00E1ximo de columnas: {$cols}.", +row_limit:"Super\u00F3u o n\u00FAmero m\u00E1ximo de filas: {$rows}.", +cell_limit:"Super\u00F3u o n\u00FAmero m\u00E1ximo de celdas: {$cells}.", +missing_scope:"\u00BFEst\u00E1 seguro que desexa continuar sen especifica-lo \u00E1mbito do encabezado de celda? Sen \u00E9l podr\u00EDa ser dificultoso pra algunos usuarios entende-lo contido ou os datos mostrados na t\u00E1boa.", +caption:"Subt\u00EDtulo da t\u00E1boa", +frame:"Recadro", +frame_none:"ning\u00FAn", +frame_groups:"grupos", +frame_rows:"filas", +frame_cols:"columnas", +frame_all:"todos", +rules:"Regras", +rules_void:"vac\u00EDo", +rules_above:"encima", +rules_below:"debaixo", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"borde" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/he_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/he_dlg.js new file mode 100644 index 00000000..b9385ae5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/he_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('he.table_dlg',{ +general_tab:"\u05DB\u05DC\u05DC\u05D9", +advanced_tab:"\u05DE\u05EA\u05E7\u05D3\u05DD", +general_props:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05DB\u05DC\u05DC\u05D9\u05D5\u05EA", +advanced_props:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05DE\u05EA\u05E7\u05D3\u05DE\u05D5\u05EA", +rowtype:"Row in table part", +title:"Insert/Modify table", +width:"\u05E8\u05D5\u05D7\u05D1", +height:"\u05D2\u05D5\u05D1\u05D4", +cols:"\u05E2\u05DE\u05D5\u05D3\u05D5\u05EA", +rows:"\u05E9\u05D5\u05E8\u05D5\u05EA", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"\u05D2\u05D1\u05D5\u05DC", +align:"\u05D9\u05E9\u05D5\u05E8", +align_default:"Default", +align_left:"\u05DC\u05E9\u05DE\u05D0\u05DC", +align_right:"\u05DC\u05D9\u05DE\u05D9\u05DF", +align_middle:"\u05D0\u05DE\u05E6\u05E2", +row_title:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05E9\u05D5\u05E8\u05D4 \u05D1\u05D8\u05D1\u05DC\u05D4", +cell_title:"\u05EA\u05DB\u05D5\u05E0\u05D5\u05EA \u05EA\u05D0 \u05D1\u05D8\u05D1\u05DC\u05D4", +cell_type:"\u05E1\u05D2\u05E0\u05D5\u05DF \u05D4\u05EA\u05D0", +valign:"Vertical alignment", +align_top:"\u05E2\u05DC\u05D9\u05D5\u05DF", +align_bottom:"\u05EA\u05D7\u05EA\u05D9\u05EA", +bordercolor:"\u05E6\u05D1\u05E2 \u05D4\u05D2\u05D1\u05D5\u05DC", +bgcolor:"\u05E6\u05D1\u05E2 \u05D4\u05E8\u05E7\u05E2", +merge_cells_title:"\u05D0\u05D7\u05D3 \u05EA\u05D0\u05D9\u05DD \u05D1\u05D8\u05D1\u05DC\u05D4", +id:"Id", +style:"Style", +langdir:"\u05DB\u05D9\u05D5\u05D5\u05DF \u05D4\u05E9\u05E4\u05D4", +langcode:"\u05E7\u05D5\u05D3 \u05D4\u05E9\u05E4\u05D4", +mime:"Target MIME type", +ltr:"\u05DE\u05E9\u05DE\u05D0\u05DC \u05DC\u05D9\u05DE\u05D9\u05DF", +rtl:"\u05DE\u05D9\u05DE\u05D9\u05DF \u05DC\u05E9\u05DE\u05D0\u05DC", +bgimage:"\u05EA\u05DE\u05D5\u05E0\u05EA \u05E8\u05E7\u05E2", +summary:"\u05EA\u05DE\u05E6\u05D9\u05EA", +td:"Data", +th:"Header", +cell_cell:"\u05E2\u05D3\u05DB\u05D5\u05DF \u05EA\u05D0 \u05E0\u05D5\u05DB\u05D7\u05D9", +cell_row:"\u05E2\u05D3\u05DB\u05D5\u05DF \u05DB\u05DC \u05EA\u05D0\u05D9 \u05D4\u05E9\u05D5\u05E8\u05D4", +cell_all:"\u05E2\u05D3\u05DB\u05D5\u05DF \u05DB\u05DC \u05EA\u05D0\u05D9 \u05D4\u05D8\u05D1\u05DC\u05D4", +row_row:"\u05E2\u05D3\u05DB\u05D5\u05DF \u05E9\u05D5\u05E8\u05D4 \u05E0\u05D5\u05DB\u05D7\u05D9\u05EA", +row_odd:"\u05E2\u05D3\u05DB\u05D5\u05DF \u05E9\u05D5\u05E8\u05D5\u05EA \u05D0\u05D9-\u05D6\u05D5\u05D2\u05D9\u05D5\u05EA \u05D1\u05D8\u05D1\u05DC\u05D4", +row_even:"\u05E2\u05D3\u05DB\u05D5\u05DF \u05E9\u05D5\u05E8\u05D5\u05EA \u05D6\u05D5\u05D2\u05D9\u05D5\u05EA \u05D1\u05D8\u05D1\u05DC\u05D4", +row_all:"\u05E2\u05D3\u05DB\u05D5\u05DF\u05DB\u05DC \u05D4\u05E9\u05D5\u05E8\u05D5\u05EA \u05D1\u05D8\u05D1\u05DC\u05D4", +thead:"Table Head", +tbody:"Table Body", +tfoot:"Table Foot", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"\u05D7\u05E8\u05D9\u05D2\u05D4 \u05DE\u05DE\u05E1\u05E4\u05E8 \u05D4\u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05D4\u05DE\u05E7\u05E1\u05D9\u05DE\u05D0\u05DC\u05D9 \u05E9\u05DC {$cols}.", +row_limit:"\u05D7\u05E8\u05D9\u05D2\u05D4 \u05DE\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E7\u05E1\u05D9\u05DE\u05D0\u05DC\u05D9 \u05E9\u05DC \u05D4\u05E9\u05D5\u05E8\u05D5\u05EA \u05E9\u05DC {$rows}.", +cell_limit:"\u05D7\u05E8\u05D9\u05D2\u05D4 \u05DE\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E7\u05E1\u05D9\u05DE\u05D0\u05DC\u05D9 \u05E9\u05DC \u05D4\u05EA\u05D0\u05D9\u05DD \u05D1\u05D8\u05D1\u05DC\u05D4 \u05E9\u05DC {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"\u05DB\u05D5\u05EA\u05E8\u05EA \u05D4\u05D8\u05D1\u05DC\u05D4", +frame:"Frame", +frame_none:"none", +frame_groups:"\u05E7\u05D1\u05D5\u05E6\u05D5\u05EA", +frame_rows:"\u05E9\u05D5\u05E8\u05D5\u05EA", +frame_cols:"\u05E2\u05DE\u05D5\u05D3\u05D5\u05EA", +frame_all:"\u05D4\u05DB\u05D5\u05DC", +rules:"\u05D7\u05D5\u05E7\u05D9\u05DD", +rules_void:"void", +rules_above:"\u05DE\u05E2\u05DC", +rules_below:"\u05DE\u05EA\u05D7\u05EA", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"\u05D2\u05D1\u05D5\u05DC" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hr_dlg.js new file mode 100644 index 00000000..2af24be0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hr_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('hr.table_dlg',{ +general_tab:"Osnovno", +advanced_tab:"Napredno", +general_props:"Osnovna svojstva", +advanced_props:"Napredna svojstva", +rowtype:"Row in table part", +title:"Umetni/uredi tablicu", +width:"\u0160irina", +height:"Visina", +cols:"Stupaca", +rows:"Redaka", +cellspacing:"Razmak \u0107elija", +cellpadding:"Dopuna \u0107elije", +border:"Obrub", +align:"Poravnavanje", +align_default:"Zadano", +align_left:"Lijevo", +align_right:"Desno", +align_middle:"Sredina", +row_title:"Svojstva retka", +cell_title:"Svojstva \u0107elije", +cell_type:"Tip \u0107elije", +valign:"Okomito poravnavanje", +align_top:"Vrh", +align_bottom:"Dno", +bordercolor:"Boja obruba", +bgcolor:"Background color", +merge_cells_title:"Spoji \u0107elije", +id:"Id", +style:"Stil", +langdir:"Smjer jezika", +langcode:"Kod jezika", +mime:"MIME tip", +ltr:"S lijeva na desno", +rtl:"S desna na lijevo", +bgimage:"Slika pozadine", +summary:"Sa\u017Eetak", +td:"Podatkovna", +th:"Zaglavlje", +cell_cell:"Primjeni na odabranu \u0107eliju", +cell_row:"Primjeni na sve \u0107elije u retku", +cell_all:"Primjeni na sve \u0107elije u tablici", +row_row:"Primjeni na odabrani redak", +row_odd:"Primjeni na neparne retke u tablici", +row_even:"Primjeni na parne retke u tablici", +row_all:"Primjeni na sve retke u tablici", +thead:"Zaglavlje tablice", +tbody:"Tijelo tablice", +tfoot:"Podno\u017Eje tablice", +scope:"Domet", +rowgroup:"Grupa redaka", +colgroup:"Grupa stupaca", +col_limit:"Prema\u0161ili ste maksimalni broj stupaca ({$cols}).", +row_limit:"Prema\u0161ili ste maksimalni broj redaka ({$rows}).", +cell_limit:"Prema\u0161ili ste maksimalni broj \u0107elija ({$cells}).", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Opis tablice", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hu.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hu.js deleted file mode 100644 index 8e6f21d8..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hu.js +++ /dev/null @@ -1,30 +0,0 @@ -// HU lang variables, Edited by 2XP (2xp@dino.hu) - -tinyMCELang['lang_table_desc'] = 'Új táblázat beillesztése'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Sor beillesztése elé'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Sor beillesztése utána'; -tinyMCELang['lang_table_delete_row_desc'] = 'Sor törlése'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Oszlop beillsztése elé'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Oszlop beillesztése utána'; -tinyMCELang['lang_table_delete_col_desc'] = 'Oszlop eltávolítása'; -tinyMCELang['lang_insert_table_title'] = 'Tábla beillesztése/módosítása'; -tinyMCELang['lang_insert_table_width'] = 'Szélesség'; -tinyMCELang['lang_insert_table_height'] = 'Magasság'; -tinyMCELang['lang_insert_table_cols'] = 'Oszlopok'; -tinyMCELang['lang_insert_table_rows'] = 'Sorok'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Cellspacing'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Cellpadding'; -tinyMCELang['lang_insert_table_border'] = 'Keret'; -tinyMCELang['lang_insert_table_align'] = 'Igazítás'; -tinyMCELang['lang_insert_table_align_default'] = 'Alapértelmezett'; -tinyMCELang['lang_insert_table_align_left'] = 'Balra'; -tinyMCELang['lang_insert_table_align_right'] = 'Jobbra'; -tinyMCELang['lang_insert_table_align_middle'] = 'Középre'; -tinyMCELang['lang_insert_table_class'] = 'Class'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hu_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hu_dlg.js new file mode 100644 index 00000000..6e4dd4ab --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/hu_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('hu.table_dlg',{ +general_tab:"\u00C1ltal\u00E1nos", +advanced_tab:"Halad\u00F3", +general_props:"\u00C1ltal\u00E1nos tulajdons\u00E1gok", +advanced_props:"Halad\u00F3 tulajdons\u00E1gok", +rowtype:"Sor a t\u00E1bl\u00E1ban", +title:"T\u00E1bl\u00E1zat besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +width:"Sz\u00E9less\u00E9g", +height:"Magass\u00E1g", +cols:"Oszlopok", +rows:"Sorok", +cellspacing:"Cellak\u00F6z", +cellpadding:"Cella bels\u0151k\u00F6z", +border:"Keret", +align:"Igaz\u00EDt\u00E1s", +align_default:"Alap\u00E9rtelmezett", +align_left:"Balra", +align_right:"Jobbra", +align_middle:"K\u00F6z\u00E9pre", +row_title:"Sor tulajdons\u00E1gai", +cell_title:"Cella tulajdons\u00E1gai", +cell_type:"Cellat\u00EDpus", +valign:"F\u00FCgg\u0151leges igaz\u00EDt\u00E1s", +align_top:"Fel", +align_bottom:"Le", +bordercolor:"Keretsz\u00EDn", +bgcolor:"H\u00E1tt\u00E9rsz\u00EDn", +merge_cells_title:"Cell\u00E1k \u00F6sszevon\u00E1sa", +id:"Id", +style:"St\u00EDlus", +langdir:"\u00CDr\u00E1s ir\u00E1ny", +langcode:"Nyelvk\u00F3d", +mime:"C\u00E9l MIME t\u00EDpus", +ltr:"Balr\u00F3l jobbra", +rtl:"Jobbr\u00F3l balra", +bgimage:"H\u00E1tt\u00E9rk\u00E9p", +summary:"\u00D6sszegz\u00E9s", +td:"Adat", +th:"Fejl\u00E9c", +cell_cell:"Cella friss\u00EDt\u00E9se", +cell_row:"Sor \u00F6sszes cell\u00E1j\u00E1nak friss\u00EDt\u00E9se", +cell_all:"T\u00E1bl\u00E1zat \u00F6sszes cell\u00E1j\u00E1nak friss\u00EDt\u00E9se", +row_row:"Sor friss\u00EDt\u00E9se", +row_odd:"P\u00E1ratlan sorok friss\u00EDt\u00E9se", +row_even:"P\u00E1ros sorok friss\u00EDt\u00E9se", +row_all:"Minden sor friss\u00EDt\u00E9se", +thead:"T\u00E1bl\u00E1zat fej", +tbody:"T\u00E1bl\u00E1zat test", +tfoot:"T\u00E1bl\u00E1zat l\u00E1b", +scope:"Hat\u00F3k\u00F6r", +rowgroup:"Sor csoport", +colgroup:"Oszlop csoport", +col_limit:"T\u00FAll\u00E9pte a maxim\u00E1lis oszlopsz\u00E1mot, ami {$cols}.", +row_limit:"T\u00FAll\u00E9pte a maxim\u00E1lis sorsz\u00E1mot, ami {$rows}.", +cell_limit:"T\u00FAll\u00E9pte a maxim\u00E1lis cellasz\u00E1mot, ami {$cells}.", +missing_scope:"Biztosan folytatni akarja an\u00E9lk\u00FCl, hogy hat\u00F3k\u00F6rt adna ennek a fejl\u00E9ccell\u00E1nak? Korl\u00E1toz\u00E1sokkal \u00E9l\u0151k sz\u00E1m\u00E1ra neh\u00E9z lesz meg\u00E9rteni a t\u00E1bl\u00E1zat tartalm\u00E1t.", +caption:"C\u00EDmsor", +frame:"Keret", +frame_none:"nincs", +frame_groups:"csoportok", +frame_rows:"sorok", +frame_cols:"oszlopok", +frame_all:"mind", +rules:"Vonalak", +rules_void:"sehol", +rules_above:"f\u00F6l\u00F6tte", +rules_below:"alatta", +rules_hsides:"v. oldalak", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"f. oldalak", +rules_box:"doboz", +rules_border:"keret" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ia_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ia_dlg.js new file mode 100644 index 00000000..236632e0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ia_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ia.table_dlg',{ +general_tab:"\u57FA\u672C", +advanced_tab:"\u9AD8\u7EA7", +general_props:"\u57FA\u672C \u5C5E\u6027", +advanced_props:"\u9AD8\u7EA7\u5C5E\u6027", +rowtype:"\u884C\u6240\u5728\u7684\u8868\u683C\u4F4D\u7F6E", +title:"\u63D2\u5165/\u7F16\u8F91 \u8868\u683C", +width:"\u5BBD\u5EA6", +height:"\u9AD8\u5EA6", +cols:"\u5217\u6570", +rows:"\u884C\u6570", +cellspacing:"\u50A8\u5B58\u683C\u95F4\u8DDD", +cellpadding:"\u50A8\u5B58\u683C\u5185\u8DDD", +border:"\u8FB9\u6846", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_default:"\u9ED8\u8BA4", +align_left:"\u5C45\u5DE6", +align_right:"\u5C45\u53F3", +align_middle:"\u5C45\u4E2D", +row_title:"\u884C \u5C5E\u6027", +cell_title:"\u50A8\u5B58\u683C \u5C5E\u6027", +cell_type:"\u50A8\u5B58\u683C \u7C7B\u522B", +valign:"\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F", +align_top:"\u9876\u90E8", +align_bottom:"\u5E95\u90E8", +bordercolor:"\u8FB9\u6846\u989C\u8272", +bgcolor:"\u80CC\u666F\u989C\u8272", +merge_cells_title:"\u5408\u5E76\u50A8\u5B58\u683C", +id:"Id", +style:"\u6837\u5F0F", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +mime:"\u76EE\u6807 MIME \u7C7B\u578B", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +bgimage:"\u80CC\u666F\u56FE\u7247", +summary:"\u6458\u8981", +td:"\u8868\u683C", +th:"\u8868\u5934", +cell_cell:"\u66F4\u65B0\u76EE\u524D\u7684\u50A8\u5B58\u683C", +cell_row:"\u66F4\u65B0\u5F53\u524D\u884C\u7684\u50A8\u5B58\u683C", +cell_all:"\u66F4\u65B0\u5168\u90E8\u50A8\u5B58\u683C", +row_row:"\u66F4\u65B0\u6240\u5728\u884C", +row_odd:"\u66F4\u65B0\u8868\u683C\u7684\u5947\u6570\u884C", +row_even:"\u66F4\u65B0\u8868\u683C\u7684\u5076\u6570\u884C", +row_all:"\u66F4\u65B0\u8868\u683C\u7684\u5168\u90E8\u884C", +thead:"\u8868\u5934", +tbody:"\u8868\u4F53", +tfoot:"\u8868\u811A", +scope:"\u8303\u56F4", +rowgroup:"\u884C\u7EC4", +colgroup:"\u5217\u7EC4", +col_limit:"\u5DF2\u8D85\u8FC7\u9650\u5236\uFF0C\u6700\u591A\u4E3A {$cols} \u5217\u3002", +row_limit:"\u5DF2\u8D85\u8FC7\u9650\u5236\uFF0C\u6700\u591A\u4E3A {$rows} \u884C\u3002", +cell_limit:"\u5DF2\u8D85\u8FC7\u9650\u5236\uFF0C\u6700\u591A\u4E3A{$cells} \u50A8\u5B58\u683C\u3002", +missing_scope:"\u60A8\u786E\u5B9A\u4E0D\u6307\u5B9A\u8868\u5934\u50A8\u5B58\u683C\u7684\u8303\u56F4\u5417\uFF1F\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u90E8\u5206\u4F7F\u7528\u8005\u5C06\u5F88\u96BE\u67E5\u770B\u8868\u683C\u5185\u5BB9", +caption:"\u8868\u683C\u6807\u9898", +frame:"\u8FB9\u6846", +frame_none:"\u65E0", +frame_groups:"\u7EC4", +frame_rows:"\u884C", +frame_cols:"\u5217", +frame_all:"\u5168\u90E8", +rules:"\u6807\u5C3A", +rules_void:"\u7A7A", +rules_above:"\u4E4B\u4E0A", +rules_below:"\u4E4B\u4E0B", +rules_hsides:"\u6C34\u5E73\u5927\u5C0F", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"\u5782\u76F4\u5927\u5C0F", +rules_box:"\u76D2", +rules_border:"\u8FB9\u6846" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ii_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ii_dlg.js new file mode 100644 index 00000000..2324d89c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ii_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ii.table_dlg',{ +general_tab:"\u57FA\u672C", +advanced_tab:"\u9AD8\u7EA7", +general_props:"\u4E00\u822C\u5C5E\u6027", +advanced_props:"\u9AD8\u7EA7\u5C5E\u6027", +rowtype:"\u5217\u6240\u5728\u7684\u8868\u683C\u4F4D\u7F6E", +title:"\u63D2\u5165/\u7F16\u8F91 \u8868\u683C", +width:"\u5BBD", +height:"\u9AD8", +cols:"\u680F\u6570", +rows:"\u5217\u6570", +cellspacing:"\u5355\u5143\u683C\u95F4\u8DDD", +cellpadding:"\u5355\u5143\u683C\u5185\u8DDD", +border:"\u8FB9\u6846", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_default:"\u9884\u8BBE", +align_left:"\u7F6E\u5DE6", +align_right:"\u7F6E\u53F3", +align_middle:"\u7F6E\u4E2D", +row_title:"\u4F8B\u6807\u9898", +cell_title:"\u5355\u5143\u683C\u6807\u9898", +cell_type:"\u5355\u5143\u683C\u7C7B\u578B", +valign:"\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F", +align_top:"\u9876\u90E8", +align_bottom:"\u5E95\u90E8", +bordercolor:"\u8FB9\u6846\u989C\u8272", +bgcolor:"\u80CC\u666F\u989C\u8272", +merge_cells_title:"\u5408\u5E76\u5355\u5143\u683C", +id:"ID", +style:"\u6837\u5F0F", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +mime:"\u76EE\u6807 MIME \u7C7B\u578B", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +bgimage:"\u80CC\u666F\u56FE\u6863", +summary:"\u6458\u8981", +td:"\u8D44\u6599", +th:"\u8868\u5934", +cell_cell:"\u66F4\u65B0\u5F53\u524D\u5355\u5143\u683C", +cell_row:"\u66F4\u65B0\u76EE\u524D\u5217\u7684\u5355\u5143\u683C", +cell_all:"\u66F4\u65B0\u6240\u6709\u5355\u5143\u683C", +row_row:"\u66F4\u65B0\u76EE\u524D\u5217", +row_odd:"\u66F4\u65B0\u8868\u683C\u7684\u5947\u6570\u5217", +row_even:"\u66F4\u65B0\u8868\u683C\u7684\u5076\u6570\u5217", +row_all:"\u66F4\u65B0\u8868\u683C\u7684\u6240\u6709\u5217", +thead:"\u8868\u683C\u8868\u5934", +tbody:"\u8868\u683C\u4E3B\u4F53", +tfoot:"\u8868\u683C\u811A\u6CE8", +scope:"\u8303\u56F4", +rowgroup:"\u5217\u7FA4\u7EC4", +colgroup:"\u680F\u7FA4\u7EC4", +col_limit:"\u5DF2\u8D85\u8FC7\u6700\u5927\u680F\u6570\u9650\u5236 {$cols} \u680F\u3002", +row_limit:"\u5DF2\u8D85\u8FC7\u6700\u5927\u5217\u6570\u9650\u5236 {$rows} \u5217\u3002", +cell_limit:"\u5DF2\u8D85\u8FC7\u6700\u5927\u5355\u5143\u683C\u9650\u5236 {$cells} \u5355\u5143\u683C\u3002", +missing_scope:"\u60A8\u786E\u5B9A\u4E0D\u6307\u5B9A\u8868\u5934\u5355\u5143\u683C\u7684\u8303\u56F4\u5417\uFF1F\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u90E8\u5206\u7528\u6237\u5C06\u5F88\u96BE\u67E5\u770B\u8868\u683C\u5185\u5BB9\u3002", +caption:"\u8868\u683C\u6807\u9898", +frame:"\u7A97\u6846", +frame_none:"\u65E0", +frame_groups:"\u7FA4\u7EC4", +frame_rows:"\u5217", +frame_cols:"\u680F", +frame_all:"\u5168\u90E8", +rules:"\u6807\u5C3A", +rules_void:"\u7A7A", +rules_above:"\u4E4B\u4E0A", +rules_below:"\u4E4B\u4E0B", +rules_hsides:"\u6C34\u5E73\u5927\u5C0F", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"\u5782\u76F4\u5927\u5C0F", +rules_box:"\u76D2", +rules_border:"\u6846\u7EBF" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/is_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/is_dlg.js new file mode 100644 index 00000000..26459032 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/is_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('is.table_dlg',{ +general_tab:"General", +advanced_tab:"Advanced", +general_props:"General properties", +advanced_props:"Advanced properties", +rowtype:"Row in table part", +title:"Insert/Modify table", +width:"Width", +height:"Height", +cols:"Cols", +rows:"Rows", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Border", +align:"Alignment", +align_default:"Default", +align_left:"Left", +align_right:"Right", +align_middle:"Center", +row_title:"Table row properties", +cell_title:"Table cell properties", +cell_type:"Cell type", +valign:"Vertical alignment", +align_top:"Top", +align_bottom:"Bottom", +bordercolor:"Border color", +bgcolor:"Background color", +merge_cells_title:"Merge table cells", +id:"Id", +style:"Style", +langdir:"Language direction", +langcode:"Language code", +mime:"Target MIME type", +ltr:"Left to right", +rtl:"Right to left", +bgimage:"Background image", +summary:"Summary", +td:"Data", +th:"Header", +cell_cell:"Update current cell", +cell_row:"Update all cells in row", +cell_all:"Update all cells in table", +row_row:"Update current row", +row_odd:"Update odd rows in table", +row_even:"Update even rows in table", +row_all:"Update all rows in table", +thead:"Table Head", +tbody:"Table Body", +tfoot:"Table Foot", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/it.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/it.js deleted file mode 100644 index 4e34587c..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/it.js +++ /dev/null @@ -1,30 +0,0 @@ -// Variabili di lingua IT - fabrix.xm@lombardiacom.it - -tinyMCELang['lang_table_desc'] = 'Inserisci una nuova tabella'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Inserisci una riga prima'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Inserisci una riga dopo'; -tinyMCELang['lang_table_delete_row_desc'] = 'Cancella riga'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Inserisci colonna prima'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Inserisci colonna dopo'; -tinyMCELang['lang_table_delete_col_desc'] = 'Rimuovi colonna'; -tinyMCELang['lang_insert_table_title'] = 'Inserisci/modifica tabella'; -tinyMCELang['lang_insert_table_width'] = 'Larghezza'; -tinyMCELang['lang_insert_table_height'] = 'Altezza'; -tinyMCELang['lang_insert_table_cols'] = 'Colonne'; -tinyMCELang['lang_insert_table_rows'] = 'Righe'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Cellspacing'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Cellpadding'; -tinyMCELang['lang_insert_table_border'] = 'Bordo'; -tinyMCELang['lang_insert_table_align'] = 'Allineamento'; -tinyMCELang['lang_insert_table_align_default'] = 'Default'; -tinyMCELang['lang_insert_table_align_left'] = 'Sinistra'; -tinyMCELang['lang_insert_table_align_right'] = 'Destra'; -tinyMCELang['lang_insert_table_align_middle'] = 'Centro'; -tinyMCELang['lang_insert_table_class'] = 'Classe'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/it_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/it_dlg.js new file mode 100644 index 00000000..4f673407 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/it_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('it.table_dlg',{ +general_tab:"Generale", +advanced_tab:"Avanzate", +general_props:"Propriet\u00E0 generali", +advanced_props:"Propriet\u00E0 avanzate", +rowtype:"Riga in una parte di tabella", +title:"Inserisci/Modifica tabella", +width:"Larghezza", +height:"Altezza", +cols:"Colonne", +rows:"Righe", +cellspacing:"Spaziatura celle", +cellpadding:"Padding celle", +border:"Bordo", +align:"Allineamento", +align_default:"Predefinito", +align_left:"A sinistra", +align_right:"A destra", +align_middle:"Centra", +row_title:"Propriet\u00E0 riga", +cell_title:"Propriet\u00E0 cella", +cell_type:"Tipo cella", +valign:"Allineamento verticale", +align_top:"In alto", +align_bottom:"In basso", +bordercolor:"Colore bordo", +bgcolor:"Colore sfondo", +merge_cells_title:"Unisci celle", +id:"Id", +style:"Stile", +langdir:"Direzione testo", +langcode:"Lingua", +mime:"Tipo MIME del target", +ltr:"Sinistra verso destra", +rtl:"Destra verso sinistra", +bgimage:"Immagine sfondo", +summary:"Sommario", +td:"Data", +th:"Intestazione", +cell_cell:"Aggiorna cella corrente", +cell_row:"Aggiorna tutte le celle della riga", +cell_all:"Aggiorna tutte le celle della tabella", +row_row:"Aggiorna riga corrente", +row_odd:"Aggiorna righe dispari della tabella", +row_even:"Aggiorna righe pari della tabella", +row_all:"Update tutte le righe della tabella", +thead:"Intestazione tabella", +tbody:"Corpo tabella", +tfoot:"Pedice tabella", +scope:"Scope", +rowgroup:"Gruppo riga", +colgroup:"Gruppo colonna", +col_limit:"Superato il numero massimo di colonne di {$cols}.", +row_limit:"Superato il numero massimo di righe di {$rows}.", +cell_limit:"Superato il numero massimo di celle di {$cells}.", +missing_scope:"Sicuro di proseguire senza aver specificato uno scope per l'intestazione di questa tabella? Senza di esso, potrebbe essere difficoltoso per alcuni utenti con disabilit\u00E0 capire il contenuto o i dati mostrati nella tabella.", +caption:"Table caption", +frame:"Cornice", +frame_none:"nessuna", +frame_groups:"gruppi", +frame_rows:"righe", +frame_cols:"colonne", +frame_all:"tutte", +rules:"Regole", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ja.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ja.js deleted file mode 100644 index 2de8c7f8..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ja.js +++ /dev/null @@ -1,30 +0,0 @@ -// JP lang variables - -tinyMCELang['lang_table_desc'] = '$B%F!<%V%k(B'; -tinyMCELang['lang_table_insert_row_before_desc'] = '$B9TA^F~(B($BA0(B)'; -tinyMCELang['lang_table_insert_row_after_desc'] = '$B9TA^F~(B($B8e(B)'; -tinyMCELang['lang_table_delete_row_desc'] = '$B9T:o=|(B'; -tinyMCELang['lang_table_insert_col_before_desc'] = '$BNsA^F~(B($BA0(B)'; -tinyMCELang['lang_table_insert_col_after_desc'] = '$BNsA^F~(B($B8e(B)'; -tinyMCELang['lang_table_delete_col_desc'] = '$BNs:o=|(B'; -tinyMCELang['lang_insert_table_title'] = '$B%F!<%V%k$NA^F~(B/$BJT=8(B'; -tinyMCELang['lang_insert_table_cols'] = '$BNs?t(B'; -tinyMCELang['lang_insert_table_rows'] = '$B9T?t(B'; -tinyMCELang['lang_insert_table_cellspacing'] = '$B%;%kM>Gr(B'; -tinyMCELang['lang_insert_table_cellpadding'] = '$B%;%k5M$a(B'; -tinyMCELang['lang_insert_table_align'] = '$B0LCVD4@0(B'; -tinyMCELang['lang_insert_table_align_default'] = '$B0EL[(B'; -tinyMCELang['lang_insert_table_align_left'] = '$B:85M$a(B'; -tinyMCELang['lang_insert_table_align_right'] = '$B1&5M$a(B'; -tinyMCELang['lang_insert_table_align_middle'] = '$BCf1{4s$;(B'; -tinyMCELang['lang_insert_table_width'] = '$BI}(B'; -tinyMCELang['lang_insert_table_height'] = '$B9b$5(B'; -tinyMCELang['lang_insert_table_border'] = '$B6-3&@~(B'; -tinyMCELang['lang_insert_table_class'] = '$B%/%i%9(B'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ja_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ja_dlg.js new file mode 100644 index 00000000..ad85614e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ja_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ja.table_dlg',{ +general_tab:"\u4E00\u822C", +advanced_tab:"\u4E0A\u7D1A\u8005\u5411\u3051", +general_props:"\u4E00\u822C", +advanced_props:"\u4E0A\u7D1A\u8005\u5411\u3051", +rowtype:"\u884C", +title:"\u8868\u306E\u633F\u5165/\u7DE8\u96C6", +width:"\u5E45", +height:"\u9AD8\u3055", +cols:"\u5217", +rows:"\u884C", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"\u67A0\u7DDA", +align:"\u914D\u7F6E", +align_default:"\u30C7\u30D5\u30A9\u30EB\u30C8", +align_left:"\u5DE6\u63C3\u3048", +align_right:"\u53F3\u63C3\u3048", +align_middle:"\u4E2D\u592E\u63C3\u3048", +row_title:"\u884C\u306E\u30D7\u30ED\u30D1\u30C6\u30A3", +cell_title:"\u30BB\u30EB\u306E\u30D7\u30ED\u30D1\u30C6\u30A3", +cell_type:"\u30BB\u30EB\u7A2E\u5225", +valign:"\u5782\u76F4\u65B9\u5411\u306E\u914D\u7F6E", +align_top:"\u4E0A\u63C3\u3048", +align_bottom:"\u4E0B\u63C3\u3048", +bordercolor:"\u67A0\u7DDA\u306E\u8272", +bgcolor:"\u80CC\u666F\u8272", +merge_cells_title:"\u30BB\u30EB\u306E\u7D50\u5408", +id:"ID", +style:"\u30B9\u30BF\u30A4\u30EB", +langdir:"\u6587\u7AE0\u306E\u65B9\u5411", +langcode:"\u8A00\u8A9E\u30B3\u30FC\u30C9", +mime:"\u30BF\u30FC\u30B2\u30C3\u30C8\u306EMIME\u30BF\u30A4\u30D7", +ltr:"\u5DE6\u304B\u3089\u53F3", +rtl:"\u53F3\u304B\u3089\u5DE6", +bgimage:"\u80CC\u666F\u753B\u50CF", +summary:"\u30B5\u30DE\u30EA\u30FC", +td:"\u65E5\u4ED8", +th:"\u30D8\u30C3\u30C0", +cell_cell:"\u9078\u629E\u30BB\u30EB\u306E\u66F4\u65B0", +cell_row:"\u884C\u5185\u306E\u30BB\u30EB\u306E\u66F4\u65B0", +cell_all:"\u5168\u3066\u306E\u30BB\u30EB\u306E\u66F4\u65B0", +row_row:"\u9078\u629E\u884C\u306E\u66F4\u65B0", +row_odd:"\u5947\u6570\u884C\u306E\u66F4\u65B0", +row_even:"\u5076\u6570\u884C\u306E\u66F4\u65B0", +row_all:"\u5168\u3066\u306E\u884C\u306E\u66F4\u65B0", +thead:"\u8868\u30D8\u30C3\u30C0", +tbody:"\u8868\u30DC\u30C7\u30A3", +tfoot:"\u8868\u30D5\u30C3\u30BF", +scope:"\u30B9\u30B3\u30FC\u30D7", +rowgroup:"\u884C\u30B0\u30EB\u30FC\u30D7", +colgroup:"\u5217\u30B0\u30EB\u30FC\u30D7", +col_limit:"\u5217\u306E\u6700\u5927\u6570\u3092\u8D85\u3048\u307E\u3057\u305F\u3002", +row_limit:"\u884C\u306E\u6700\u5927\u6570\u3092\u8D85\u3048\u307E\u3057\u305F\u3002", +cell_limit:"\u30BB\u30EB\u306E\u6700\u5927\u6570\u3092\u8D85\u3048\u307E\u3057\u305F\u3002", +missing_scope:"\u8868\u306E\u30B9\u30B3\u30FC\u30D7\u5C5E\u6027\u3092\u8A2D\u5B9A\u3057\u3066\u3044\u307E\u305B\u3093\u304C\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F", +caption:"\u8868\u306B\u898B\u51FA\u3057\u3092\u4ED8\u3051\u308B", +frame:"\u30BB\u30EB\u67A0\u7DDA", +frame_none:"\u306A\u3057", +frame_groups:"\u30B0\u30EB\u30FC\u30D7\u6BCE", +frame_rows:"\u884C", +frame_cols:"\u5217", +frame_all:"\u5168\u3066", +rules:"\u8868\u306E\u5916\u67A0", +rules_void:"\u306A\u3057", +rules_above:"\u4E0A", +rules_below:"\u4E0B", +rules_hsides:"\u4E0A\u4E0B", +rules_lhs:"\u5DE6", +rules_rhs:"\u53F3", +rules_vsides:"\u5DE6\u53F3", +rules_box:"\u4E0A\u4E0B\u5DE6\u53F3(box)", +rules_border:"\u4E0A\u4E0B\u5DE6\u53F3(border)" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ko.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ko.js deleted file mode 100644 index 2c1747a7..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ko.js +++ /dev/null @@ -1,30 +0,0 @@ -// KO lang variables - -tinyMCELang['lang_table_desc'] = 'Ç¥ ³Ö±â'; -tinyMCELang['lang_table_insert_row_before_desc'] = '¾Õ¿¡ Çà ³Ö±â'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'µÚ¿¡ Çà ³Ö±â'; -tinyMCELang['lang_table_delete_row_desc'] = 'Çà Áö¿ì±â'; -tinyMCELang['lang_table_insert_col_before_desc'] = '¾Õ¿¡ ¿­ ³Ö±â'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'µÚ¿¡ ¿­ ³Ö±â'; -tinyMCELang['lang_table_delete_col_desc'] = '¿­ Áö¿ì±â'; -tinyMCELang['lang_insert_table_title'] = 'Ç¥ ³Ö±â/°íÄ¡±â'; -tinyMCELang['lang_insert_table_width'] = '³Êºñ'; -tinyMCELang['lang_insert_table_height'] = '³ôÀÌ'; -tinyMCELang['lang_insert_table_cols'] = 'Çà'; -tinyMCELang['lang_insert_table_rows'] = '¿­'; -tinyMCELang['lang_insert_table_cellspacing'] = '¼¿ °£°Ý'; -tinyMCELang['lang_insert_table_cellpadding'] = '¼¿ ¿©¹é'; -tinyMCELang['lang_insert_table_border'] = 'Å׵θ®'; -tinyMCELang['lang_insert_table_align'] = 'Á¤·Ä'; -tinyMCELang['lang_insert_table_align_default'] = '±âº»°ª'; -tinyMCELang['lang_insert_table_align_left'] = '¿ÞÂÊ'; -tinyMCELang['lang_insert_table_align_right'] = '¿À¸¥ÂÊ'; -tinyMCELang['lang_insert_table_align_middle'] = '°¡¿îµ¥'; -tinyMCELang['lang_insert_table_class'] = 'Ŭ·¡½º'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ko_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ko_dlg.js new file mode 100644 index 00000000..27456706 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ko_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ko.table_dlg',{ +general_tab:"\uC77C\uBC18", +advanced_tab:"\uACE0\uAE09", +general_props:"\uC77C\uBC18 \uC124\uC815", +advanced_props:"\uACE0\uAE09 \uC124\uC815", +rowtype:"\uD589", +title:"\uD14C\uC774\uBE14\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +width:"\uD3ED", +height:"\uB192\uC774", +cols:"\uB82C", +rows:"\uD589", +cellspacing:"\uC140 \uAC04\uACA9", +cellpadding:"\uC140\uB0B4 \uC5EC\uBC31", +border:"\uD14C\uB450\uB9AC\uC120", +align:"\uC815\uB82C", +align_default:"\uAE30\uBCF8\uAC12", +align_left:"\uC67C\uCABD \uB9DE\uCDA4", +align_right:"\uC624\uB978\uCABD \uB9DE\uCDA4", +align_middle:"\uAC00\uC6B4\uB370 \uB9DE\uCDA4", +row_title:"\uD589 \uC124\uC815", +cell_title:"\uC140 \uC124\uC815", +cell_type:"\uC140 \uC885\uB958", +valign:"\uC218\uC9C1 \uC704\uCE58", +align_top:"\uC0C1", +align_bottom:"\uD558", +bordercolor:"\uD14C\uB450\uB9AC\uC120\uC0C9", +bgcolor:"\uBC30\uACBD\uC0C9", +merge_cells_title:"\uC140 \uACB0\uD569", +id:"Id", +style:"\uC2A4\uD0C0\uC77C", +langdir:"\uBB38\uC790 \uBC29\uD5A5", +langcode:"\uC5B8\uC5B4 \uCF54\uB4DC", +mime:"Target MIME \uD0C0\uC785", +ltr:"\uC67C\uCABD\uC5D0\uC11C \uC624\uB978\uCABD", +rtl:"\uC624\uB978\uCABD\uC5D0\uC11C \uC67C\uCABD", +bgimage:"\uBC30\uACBD \uC774\uBBF8\uC9C0", +summary:"\uC694\uC57D", +td:"Data", +th:"Header", +cell_cell:"\uD604\uC7AC\uC758 \uC140\uC744 \uAC31\uC2E0", +cell_row:"\uD589\uC758 \uC804\uC140\uC744 \uAC31\uC2E0", +cell_all:"\uD14C\uC774\uBE14\uC758 \uBAA8\uB4E0 \uC140\uC744 \uAC31\uC2E0", +row_row:"\uD604\uC7AC\uC758 \uD589\uC744 \uAC31\uC2E0", +row_odd:"\uD640\uC218\uD589\uC744 \uAC31\uC2E0", +row_even:"\uC9DD\uC218\uD589\uC744 \uAC31\uC2E0", +row_all:"\uC804\uD589\uC744 \uAC31\uC2E0", +thead:"Table Head", +tbody:"Table Body", +tfoot:"\uD14C\uC774\uBE14 \uD48B\uD130", +scope:"Scope", +rowgroup:"\uD589\uADF8\uB8F9", +colgroup:"\uC5F4\uADF8\uB8F9", +col_limit:"\uB82C\uC218\uC758 \uC0C1\uD55C{$cols}\uB97C \uB118\uC5C8\uC2B5\uB2C8\uB2E4.", +row_limit:"\uD589\uC218\uC758 \uC0C1\uD55C{$rows}\uB97C \uB118\uC5C8\uC2B5\uB2C8\uB2E4.", +cell_limit:"\uC140\uC218\uC758 \uC0C1\uD55C{$cells}\uB97C \uB118\uC5C8\uC2B5\uB2C8\uB2E4.", +missing_scope:"\uC774 \uD45C \uD5E4\uB354\uC140\uC5D0 scope\uC18D\uC131\uC744 \uC9C0\uC815\uD558\uC9C0\uC54A\uC544\uB3C4 \uAD1C\uCC2E\uC2B5\uB2C8\uAE4C? \uC9C0\uC815\uD558\uC9C0 \uC54A\uB294 \uACBD\uC6B0, \uC2DC\uAC04\uC801\uC73C\uB85C \uD14C\uC774\uBE14\uC758 \uAD6C\uC870\uB97C \uD30C\uC545\uD558\uB294 \uAC83\uC774 \uC5B4\uB824\uC6B4 \uBD84\uC758 \uC811\uADFC\uC131\uC774 \uC800\uD558\uD569\uB2C8\uB2E4.", +caption:"\uD45C\uC81C", +frame:"Frame", +frame_none:"\uC5C6\uC74C", +frame_groups:"\uADF8\uB8F9", +frame_rows:"\uD589", +frame_cols:"\uC5F4", +frame_all:"\uBAA8\uB450", +rules:"Rules", +rules_void:"Void", +rules_above:"\uC704", +rules_below:"\uC544\uB798", +rules_hsides:"\uC0C1\uD558\uBC94\uC704\uB9CC", +rules_lhs:"\uC88C\uCE21 \uBC94\uC704\uB9CC", +rules_rhs:"\uC6B0\uCE21 \uBC94\uC704\uB9CC", +rules_vsides:"\uC88C\uC6B0\uBC94\uC704\uB9CC", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/lt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/lt_dlg.js new file mode 100644 index 00000000..addcc300 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/lt_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('lt.table_dlg',{ +general_tab:"Bendra", +advanced_tab:"I\u0161pl\u0117sta", +general_props:"Bendri nustatymai", +advanced_props:"I\u0161pl\u0117stiniai nustatymai", +rowtype:"Eilut\u0117 lentel\u0117s dalyje", +title:"\u012Eterpti/modifikuoti lentel\u0119", +width:"Ilgis", +height:"Auk\u0161tis", +cols:"Stulpeliai", +rows:"Eilut\u0117s", +cellspacing:"Tarpas tarp l\u0105steli\u0173", +cellpadding:"Tarpas l\u0105stel\u0117s viduje", +border:"R\u0117melis", +align:"Lygiavimas", +align_default:"Standartinis", +align_left:"Lygiuoti kair\u0117je", +align_right:"Lygiuoti de\u0161in\u0117je", +align_middle:"Centruoti", +row_title:"Lentel\u0117s eilut\u0117s nustatymai", +cell_title:"Lentel\u0117s l\u0105stel\u0117s nustatymai", +cell_type:"L\u0105stel\u0117s tipas", +valign:"Vertikalus lygiavimas", +align_top:"Vir\u0161uje", +align_bottom:"Apa\u010Dioje", +bordercolor:"R\u0117melio spalva", +bgcolor:"Fono spalva", +merge_cells_title:"Sulieti lentel\u0117s l\u0105steles", +id:"Id", +style:"Stilius", +langdir:"Kalbos kryptis", +langcode:"Kalbos kodas", +mime:"Taikinio MIME tipas", +ltr:"I\u0161 kair\u0117s \u012F de\u0161in\u0119", +rtl:"I\u0161 de\u0161in\u0117s \u012F kair\u0119", +bgimage:"Fono paveiksl\u0117lis", +summary:"Apibendrinimas", +td:"Duomenys", +th:"Antra\u0161t\u0117", +cell_cell:"Atnaujinti esam\u0105 l\u0105stel\u0119", +cell_row:"Atnaujinti visas eilut\u0117s l\u0105steles", +cell_all:"Atnaujinti visas lentel\u0117s l\u0105steles", +row_row:"Atnaujinti esam\u0105 eilut\u0119", +row_odd:"Atnaujinti nelygines lentel\u0117s eilutes", +row_even:"Atnaujinti lygines lentel\u0117s eilutes", +row_all:"Atnaujinti visas lentel\u0117s eilutes", +thead:"Lentel\u0117s Vir\u0161us", +tbody:"Lentel\u0117s Vidus", +tfoot:"Lentel\u0117s Apa\u010Dia", +scope:"Galiojimo sritis", +rowgroup:"Eilu\u010Di\u0173 grup\u0117", +colgroup:"Stulpeli\u0173 grup\u0117", +col_limit:"Vir\u0161ijote did\u017Eiausia stulpeli\u0173 kiek\u012F i\u0161 {$cols}.", +row_limit:"Vir\u0161ijote did\u017Eiausia eilu\u010Di\u0173 kiek\u012F i\u0161 {$rows}.", +cell_limit:"Vir\u0161ijote did\u017Eiausia l\u0105steli\u0173 kiek\u012F i\u0161 {$cells}.", +missing_scope:"Ar norite t\u0119sti nenurod\u0119 galiojimo srities \u0161iai lentel\u0117s vir\u0161utinei l\u0105stelei. Be nurodymo, gali b\u016Bti sunku kai kuriems vartotojams su negalia lentel\u0117je atvaizduojam\u0173 duomen\u0173 turin\u012F.", +caption:"Lentel\u0117s antra\u0161t\u0117", +frame:"Freimas", +frame_none:"joks", +frame_groups:"grup\u0117s", +frame_rows:"eilut\u0117s", +frame_cols:"stulpeliai", +frame_all:"visi", +rules:"Taisykl\u0117s", +rules_void:"negaliojantis", +rules_above:"vir\u0161utinis", +rules_below:"apatinis", +rules_hsides:"hor. pus\u0117s", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vert. pus\u0117s", +rules_box:"d\u0117\u017Eut\u0117", +rules_border:"r\u0117melis" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/lv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/lv_dlg.js new file mode 100644 index 00000000..90a653c4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/lv_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('lv.table_dlg',{ +general_tab:"General", +advanced_tab:"Advanced", +general_props:"General properties", +advanced_props:"Advanced properties", +rowtype:"Row in table part", +title:"Insert/Modify table", +width:"Width", +height:"Height", +cols:"Cols", +rows:"Rows", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Border", +align:"Alignment", +align_default:"Default", +align_left:"Left", +align_right:"Right", +align_middle:"Center", +row_title:"Table row properties", +cell_title:"Table cell properties", +cell_type:"Cell type", +valign:"Vertical alignment", +align_top:"Top", +align_bottom:"Bottom", +bordercolor:"Border color", +bgcolor:"Background color", +merge_cells_title:"Merge table cells", +id:"Id", +style:"Style", +langdir:"Language direction", +langcode:"Language code", +mime:"Target MIME type", +ltr:"Left to right", +rtl:"Right to left", +bgimage:"Background image", +summary:"Summary", +td:"Data", +th:"Header", +cell_cell:"Update current cell", +cell_row:"Update all cells in row", +cell_all:"Update all cells in table", +row_row:"Update current row", +row_odd:"Update odd rows in table", +row_even:"Update even rows in table", +row_all:"Update all rows in table", +thead:"Table Head", +tbody:"Table Body", +tfoot:"Table Foot", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/mk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/mk_dlg.js new file mode 100644 index 00000000..e4b6738e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/mk_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('mk.table_dlg',{ +general_tab:"Osnovno", +advanced_tab:"Napredno", +general_props:"Osnovna svojstva", +advanced_props:"Napredna svojstva", +rowtype:"Row in table part", +title:"\u0412\u043C\u0435\u0442\u043D\u0438/uredi tablicu", +width:"\u0160irina", +height:"Visina", +cols:"Stupaca", +rows:"Redaka", +cellspacing:"Razmak \u0107elija", +cellpadding:"Dopuna \u0107elije", +border:"Obrub", +align:"Poravnavanje", +align_default:"Zadano", +align_left:"Levo", +align_right:"Desno", +align_middle:"Sredina", +row_title:"Svojstva retka", +cell_title:"Svojstva \u0107elije", +cell_type:"Tip \u0107elije", +valign:"Okomito poravnavanje", +align_top:"Vrh", +align_bottom:"Dno", +bordercolor:"Boja obruba", +bgcolor:"Background color", +merge_cells_title:"Spoji \u0107elije", +id:"Id", +style:"Stil", +langdir:"Smjer jezika", +langcode:"Kod jezika", +mime:"MIME tip", +ltr:"S leva na desno", +rtl:"S desna na levo", +bgimage:"Slika pozadine", +summary:"Sa\u017Eetak", +td:"Podatkovna", +th:"Zaglavlje", +cell_cell:"Primjeni na odabranu \u0107eliju", +cell_row:"Primjeni na sve \u0107elije u retku", +cell_all:"Primjeni na sve \u0107elije u tablici", +row_row:"Primjeni na odabrani redak", +row_odd:"Primjeni na neparne retke u tablici", +row_even:"Primjeni na parne retke u tablici", +row_all:"Primjeni na sve retke u tablici", +thead:"Zaglavlje tablice", +tbody:"Telo tablice", +tfoot:"Podno\u017Eje tablice", +scope:"Domet", +rowgroup:"Grupa redaka", +colgroup:"Grupa stupaca", +col_limit:"Prema\u0161ili ste maksimalni broj stupaca ({$cols}).", +row_limit:"Prema\u0161ili ste maksimalni broj redaka ({$rows}).", +cell_limit:"Prema\u0161ili ste maksimalni broj \u0107elija ({$cells}).", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Opis tablice", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/mn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/mn_dlg.js new file mode 100644 index 00000000..86ba4c77 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/mn_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('mn.table_dlg',{ +general_tab:"\u0415\u0440\u04E9\u043D\u0445\u0438\u0439", +advanced_tab:"\u04E8\u0440\u0433\u04E9\u0442\u0433\u04E9\u0441\u04E9\u043D", +general_props:"\u0415\u0440\u04E9\u043D\u0445\u0438\u0439 \u0442\u043E\u0445\u0438\u0440\u0433\u043E\u043E", +advanced_props:"\u04E8\u0440\u0433\u04E9\u0442\u0433\u04E9\u0441\u04E9\u043D \u0442\u043E\u0445\u0438\u0440\u0433\u043E\u043E", +rowtype:"\u041C\u04E9\u0440\u0438\u0439\u043D \u0442\u04E9\u0440\u04E9\u043B", +title:"\u0425\u04AF\u0441\u043D\u044D\u0433\u0442 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u0437\u0430\u0441\u0430\u0445", +width:"\u04E8\u0440\u0433\u04E9\u043D", +height:"\u04E8\u043D\u0434\u04E9\u0440", +cols:"\u0411\u0430\u0433\u0430\u043D\u0430", +rows:"\u041C\u04E9\u0440", +cellspacing:"\u041D\u04AF\u0434\u043D\u0438\u0439 \u0430\u043B\u0441\u043B\u0430\u043B\u0442", +cellpadding:"\u041D\u04AF\u0434\u043D\u0438\u0439 \u0434\u043E\u0442\u043E\u043E\u0434 \u0430\u043B\u0441\u043B\u0430\u043B\u0442", +border:"\u0425\u04AF\u0440\u044D\u044D", +align:"\u0416\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u044D\u043B\u0442", +align_default:"\u04E8\u0433\u04E9\u0433\u0434\u043C\u04E9\u043B", +align_left:"\u0417\u04AF\u04AF\u043D", +align_right:"\u0411\u0430\u0440\u0443\u0443\u043D", +align_middle:"\u0413\u043E\u043B\u0434", +row_title:"\u041C\u04E9\u0440\u0438\u0439\u043D \u0448\u0438\u043D\u0436", +cell_title:"\u041D\u04AF\u0434\u043D\u0438\u0439 \u0448\u0438\u043D\u0436", +cell_type:"\u041D\u04AF\u0434\u043D\u0438\u0439 \u0442\u04E9\u0440\u04E9\u043B", +valign:"\u0411\u043E\u0441\u043E\u043E \u0436\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u044D\u043B\u0442", +align_top:"\u0414\u044D\u044D\u0440", +align_bottom:"\u0414\u043E\u043E\u0440", +bordercolor:"\u0425\u04AF\u0440\u044D\u044D\u043D\u0438\u0439 \u04E9\u043D\u0433\u04E9", +bgcolor:"\u0414\u044D\u0432\u0441\u0433\u044D\u0440 \u04E9\u043D\u0433\u04E9", +merge_cells_title:"\u041D\u04AF\u0434 \u043D\u044D\u0433\u0442\u0433\u044D\u0445", +id:"\u0422\u0422", +style:"\u0425\u044D\u043B\u0431\u044D\u0440\u0436\u04AF\u04AF\u043B\u044D\u043B\u0442", +langdir:"\u0411\u0438\u0447\u0433\u0438\u0439\u043D \u0447\u0438\u0433\u043B\u044D\u043B", +langcode:"\u0425\u044D\u043B\u043D\u0438\u0439 \u043A\u043E\u0434", +mime:"\u0410\u0433\u0443\u0443\u043B\u0433\u044B\u043D MIME-\u0442\u04E9\u0440\u04E9\u043B", +ltr:"\u0417\u04AF\u04AF\u043D\u044D\u044D\u0441 \u0431\u0430\u0440\u0443\u0443\u043D", +rtl:"\u0411\u0430\u0440\u0443\u0443\u043D\u0430\u0430\u0441 \u0437\u04AF\u04AF\u043D", +bgimage:"\u0414\u044D\u0432\u0441\u0433\u044D\u0440 \u0437\u0443\u0440\u0430\u0433", +summary:"\u0414\u04AF\u0433\u043D\u044D\u043B\u0442", +td:"\u0411\u0438\u0447\u0432\u044D\u0440 \u043D\u04AF\u0434", +th:"\u0413\u0430\u0440\u0447\u0438\u0433", +cell_cell:"\u042D\u043D\u044D \u043D\u04AF\u0434\u0438\u0439\u0433 \u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +cell_row:"\u042D\u043D\u044D \u043C\u04E9\u0440\u04E9\u043D \u0434\u04E9\u0445 \u0431\u04AF\u0445 \u043D\u04AF\u0434\u0438\u0439\u0433 \u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +cell_all:"\u0425\u04AF\u0441\u043D\u044D\u0433\u0442\u0438\u0439\u043D \u0431\u04AF\u0445 \u043D\u04AF\u0434\u0438\u0439\u0433 \u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +row_row:"\u042D\u043D\u044D \u043C\u04E9\u0440\u0438\u0439\u0433 \u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +row_odd:"\u0421\u043E\u043D\u0434\u0433\u043E\u0439 \u043C\u04E9\u0440\u04AF\u04AF\u0434\u0438\u0439\u0433 \u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +row_even:"\u0422\u044D\u0433\u0448 \u043C\u04E9\u0440\u04AF\u04AF\u0434\u0438\u0439\u0433 \u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +row_all:"\u0411\u04AF\u0445 \u043C\u04E9\u0440\u0438\u0439\u043D \u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +thead:"\u0425\u04AF\u0441\u043D\u044D\u0433\u0442\u0438\u0439\u043D \u0442\u043E\u043B\u0433\u043E\u0439", +tbody:"\u0425\u04AF\u0441\u043D\u044D\u0433\u0442\u0438\u0439\u043D \u0430\u0433\u0443\u0443\u043B\u0433\u0430", +tfoot:"\u0425\u04AF\u0441\u043D\u044D\u0433\u0442\u0438\u0439\u043D \u0445\u04E9\u043B", +scope:"\u0423\u044F\u043B\u0434\u0430\u0430", +rowgroup:"\u0411\u043E\u0441\u043E\u043E \u0431\u04AF\u043B\u044D\u0433\u043B\u044D\u0445", +colgroup:"\u0425\u044D\u0432\u0442\u044D\u044D \u0431\u04AF\u043B\u044D\u0433\u043B\u044D\u0445", +col_limit:"\u0411\u0430\u0433\u0430\u043D\u044B\u043D \u0442\u043E\u043E\u043D\u044B \u0445\u044F\u0437\u0433\u0430\u0430\u0440 {$cols}-\u0441 \u0445\u044D\u0442\u044D\u0440\u043B\u044D\u044D.", +row_limit:"\u041C\u04E9\u0440\u0438\u0439\u043D \u0442\u043E\u043E\u043D\u044B \u0445\u044F\u0437\u0433\u0430\u0430\u0440 {$rows}-\u0441 \u0445\u044D\u0442\u044D\u0440\u043B\u044D\u044D.", +cell_limit:"\u041D\u04AF\u0434\u043D\u0438\u0439 \u0442\u043E\u043E\u043D\u044B \u0445\u044F\u0437\u0433\u0430\u0430\u0440 {$cells}-\u0441 \u0445\u044D\u0442\u044D\u0440\u043B\u044D\u044D.", +missing_scope:"\u0422\u0430 \u044D\u043D\u044D \u0433\u0430\u0440\u0447\u0433\u0438\u0439\u043D \u0445\u0443\u0432\u044C\u0434 \u04AF\u043D\u044D\u0445\u044D\u044D\u0440 \u0442\u0430\u0439\u043B\u0431\u0430\u0440 \u0445\u0438\u0439\u0445\u0433\u04AF\u0439 \u0431\u0430\u0439\u0445\u044B\u0433 \u0445\u04AF\u0441\u044D\u0436 \u0431\u0430\u0439\u043D\u0430 \u0443\u0443? \u0417\u0430\u0440\u0438\u043C \u0445\u04E9\u0433\u0436\u043B\u0438\u0439\u043D \u0431\u044D\u0440\u0445\u0448\u044D\u044D\u043B\u0442\u044D\u0439 \u0445\u04AF\u043C\u04AF\u04AF\u0441 \u0445\u04AF\u0441\u043D\u044D\u0433\u0442\u0438\u0439\u043D \u0430\u0433\u0443\u0443\u043B\u0433\u044B\u0433 \u043E\u0439\u043B\u0433\u043E\u0445\u043E\u0434 \u0445\u04AF\u043D\u0434\u0440\u044D\u043B\u0442\u044D\u0439 \u0431\u0430\u0439\u0445 \u0431\u043E\u043B\u043D\u043E.", +caption:"\u0425\u04AF\u0441\u043D\u044D\u0433\u0442\u0438\u0439\u043D \u0442\u0430\u0439\u043B\u0431\u0430\u0440", +frame:"\u0424\u0440\u044D\u0439\u043C", +frame_none:"\u0431\u0430\u0439\u0445\u0433\u04AF\u0439", +frame_groups:"\u0411\u04AF\u043B\u044D\u0433", +frame_rows:"\u041C\u04E9\u0440", +frame_cols:"\u0411\u0430\u0433\u0430\u043D\u0430", +frame_all:"\u0431\u04AF\u0445", +rules:"\u0428\u0443\u0433\u0430\u043C", +rules_void:"void", +rules_above:"\u0434\u044D\u044D\u0440", +rules_below:"\u0434\u043E\u043E\u0440", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ms_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ms_dlg.js new file mode 100644 index 00000000..33114eba --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ms_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ms.table_dlg',{ +general_tab:"Am", +advanced_tab:"Lanjutan", +general_props:"Alatan am", +advanced_props:"Alatan lanjutan", +rowtype:"Row dalam jadual", +title:"Masuk/Ubah jadual", +width:"Lebar", +height:"Tinggi", +cols:"Kol", +rows:"Row", +cellspacing:"Ruang sel", +cellpadding:"Lapisan sel", +border:"Sempadan", +align:"Penyelarian", +align_default:"Asal", +align_left:"Kiri", +align_right:"Kanan", +align_middle:"Tengah", +row_title:"Alatan row jadual", +cell_title:"Alatan sel jadual", +cell_type:"Jenis sel", +valign:"Penjajaran tegak", +align_top:"Atas", +align_bottom:"Bawah", +bordercolor:"Warna sempadan", +bgcolor:"Warna latar", +merge_cells_title:"Gabung sel jadual", +id:"Id", +style:"Gaya", +langdir:"Arah bahasa", +langcode:"Kod bahasa", +mime:"Sasaran jenis MIME", +ltr:"Kiri ke kanan", +rtl:"Kanan ke kiri", +bgimage:"Imej latar", +summary:"Kesimpulan", +td:"Data", +th:"Kepala", +cell_cell:"Baharui sel ini", +cell_row:"Baharui semua sel dalam row", +cell_all:"Baharui semua sel dalam jadual", +row_row:"Baharui row semasa", +row_odd:"Baharui row ganjil dalam jadual", +row_even:"Baharui row genap dalam jadual", +row_all:"Baharui semua row dalam jadual", +thead:"Pembuka jadual", +tbody:"Isi jadual", +tfoot:"Penutup jadual Foot", +scope:"Skop", +rowgroup:"Kumpulan row", +colgroup:"Kumpulan kol", +col_limit:"Anda telah melebihi maxima kolum dibenarkan iaitu {$cols}.", +row_limit:"Anda telah melebihi maxima row dibenarkan iaitu {$rows}.", +cell_limit:"Anda telah melebihi maxima sel dibenarkan iaitu {$cells}.", +missing_scope:"Adakah anda pasti terhadap skop sel jadual ini. Ia mungkin memberi kesan kepada OKU memahami isi jadual.", +caption:"Tajuk jadual", +frame:"Bingkai", +frame_none:"tiada", +frame_groups:"kumpulan", +frame_rows:"row", +frame_cols:"kol", +frame_all:"semua", +rules:"Peraturan", +rules_void:"batal", +rules_above:"atas", +rules_below:"bawah", +rules_hsides:"tepian datar", +rules_lhs:"hs-kiri", +rules_rhs:"hs-kanan", +rules_vsides:"tepian tegak", +rules_box:"kotak", +rules_border:"sempadan" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nb_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nb_dlg.js new file mode 100644 index 00000000..0add4d8a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nb_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('nb.table_dlg',{ +general_tab:"Generelt", +advanced_tab:"Avansert", +general_props:"Generelt", +advanced_props:"Generelle egenskaper", +rowtype:"Rad i tabell", +title:"Sett inn / rediger tabell", +width:"Bredde", +height:"H\u00F8yde", +cols:"Kolonner", +rows:"Rader", +cellspacing:"Celleavstand", +cellpadding:"Cellefylling", +border:"Ramme", +align:"Justering", +align_default:"Standard", +align_left:"Venstre", +align_right:"H\u00F8yre", +align_middle:"Midtstilt", +row_title:"Radegenskaper", +cell_title:"Celleegenskaper", +cell_type:"Celletype", +valign:"Vertikal justering", +align_top:"Topp", +align_bottom:"Bunn", +bordercolor:"Rammefarge", +bgcolor:"Bakgrunn", +merge_cells_title:"Sl\u00E5 sammen celler", +id:"Id", +style:"Stil", +langdir:"Skriftretning", +langcode:"Spr\u00E5kkode", +mime:"M\u00E5lets MIME-type", +ltr:"Venstre mot h\u00F8yre", +rtl:"H\u00F8yre mot venstre", +bgimage:"Bakgrunnsbilde", +summary:"Sammendrag", +td:"Data", +th:"Overskrift", +cell_cell:"Oppdater aktuell celle", +cell_row:"Oppdater alle celler i raden", +cell_all:"Oppdater alle celler i tabellen", +row_row:"Oppdater aktuell rad", +row_odd:"Oppdater oddetallsrader", +row_even:"Oppdater partallsrader", +row_all:"Oppdater alle rader", +thead:"Tabellhode", +tbody:"Tabellkropp", +tfoot:"Tabellfot", +scope:"Omr\u00E5de", +rowgroup:"Radgruppe", +colgroup:"Kolonnegruppe", +col_limit:"Du har overskredet maksimalt antall kolonner p\u00E5 {$cols}.", +row_limit:"Du har overskredet maksimalt antall rader p\u00E5 {$rows}.", +cell_limit:"Du har overskredet maksimalt antall celler p\u00E5 {$cells}.", +missing_scope:"Er du sikker p\u00E5 at du vil fortsette uten \u00E5 angi et omr\u00E5de for denne overskrifscellen? Uten dette kan det bli vanskelig for enkelte funksjonshemmede brukere \u00E5 forst\u00E5 innholdet eller dataene som blir presentert i tabellen.", +caption:"Tabelloverskrift", +frame:"Ramme", +frame_none:"ingen", +frame_groups:"grupper", +frame_rows:"rader", +frame_cols:"kolonner", +frame_all:"alle", +rules:"Streker", +rules_void:"ingen", +rules_above:"over", +rules_below:"under", +rules_hsides:"hsider", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"boks", +rules_border:"ramme" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nl.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nl.js deleted file mode 100644 index c999120a..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nl.js +++ /dev/null @@ -1,30 +0,0 @@ -// NL lang variables - -tinyMCELang['lang_table_desc'] = 'Voeg een nieuwe tabel in'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Voeg rij in voor ...'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Voeg rij in na ...'; -tinyMCELang['lang_table_delete_row_desc'] = 'Verwijder rij'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Voeg kolom in voor ...'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Voeg kolom in na ...'; -tinyMCELang['lang_table_delete_col_desc'] = 'Verwijder kolom'; -tinyMCELang['lang_insert_table_title'] = 'Invoegen/Bewerken tabel'; -tinyMCELang['lang_insert_table_width'] = 'Breedte'; -tinyMCELang['lang_insert_table_height'] = 'Hoogte'; -tinyMCELang['lang_insert_table_cols'] = 'Kolommen'; -tinyMCELang['lang_insert_table_rows'] = 'Rijen'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Celafstand'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Celvulling'; -tinyMCELang['lang_insert_table_border'] = 'Omranding'; -tinyMCELang['lang_insert_table_align'] = 'Positionering'; -tinyMCELang['lang_insert_table_align_default'] = 'Standaard'; -tinyMCELang['lang_insert_table_align_left'] = 'Links'; -tinyMCELang['lang_insert_table_align_right'] = 'Rechts'; -tinyMCELang['lang_insert_table_align_middle'] = 'Midden'; -tinyMCELang['lang_insert_table_class'] = 'CSS-Stijl'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nl_dlg.js new file mode 100644 index 00000000..9aa03fda --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nl_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('nl.table_dlg',{ +general_tab:"Algemeen", +advanced_tab:"Geavanceerd", +general_props:"Algemene eigenschappen", +advanced_props:"Geavanceerde eigenschappen", +rowtype:"Rijtype", +title:"Tabel invoegen/bewerken", +width:"Breedte", +height:"Hoogte", +cols:"Kolommen", +rows:"Rijen", +cellspacing:"Ruimte om cel", +cellpadding:"Ruimte in cel", +border:"Rand", +align:"Uitlijning", +align_default:"Standaard", +align_left:"Links", +align_right:"Rechts", +align_middle:"Centreren", +row_title:"Rij-eigenschappen", +cell_title:"Celeigenschappen", +cell_type:"Celtype", +valign:"Verticale uitlijning", +align_top:"Boven", +align_bottom:"Onder", +bordercolor:"Randkleur", +bgcolor:"Achtergrondkleur", +merge_cells_title:"Cellen samenvoegen", +id:"Id", +style:"Stijl", +langdir:"Taalrichting", +langcode:"Taalcode", +mime:"Doel MIME type", +ltr:"Van links naar rechts", +rtl:"Van rechts naar links", +bgimage:"Achtergrondafbeelding", +summary:"Samenvatting", +td:"Gegevens", +th:"Kop", +cell_cell:"Huidige cel bijwerken", +cell_row:"Alle cellen in rij bijwerken", +cell_all:"Alle cellen in tabel bijwerken", +row_row:"Huidige rij bijwerken", +row_odd:"Oneven rijen bijwerken", +row_even:"Even rijen bijwerken", +row_all:"Alle rijen bijweken", +thead:"Tabelkop", +tbody:"Tabellichaam", +tfoot:"Tabelvoet", +scope:"Bereik", +rowgroup:"Rijgroep", +colgroup:"Kolomgroep", +col_limit:"U heeft het maximale aantal kolommen van {$cols} overschreden.", +row_limit:"U heeft hebt het maximale aantal rijen van {$rows} overschreden.", +cell_limit:"U heeft het maximale aantal cellen van {$cells} overschreden.", +missing_scope:"Weet u zeker dat u door wilt gaan met het toewijzen van een kop zonder een bereik op te geven? Mensen met een visuele handicap kunnen hierdoor waarschijnlijk slecht bij de gegevens.", +caption:"Tabelbeschrijving", +frame:"Frame", +frame_none:"Geen", +frame_groups:"Groepen", +frame_rows:"Rijen", +frame_cols:"Kolommen", +frame_all:"Alles", +rules:"Hulplijnen", +rules_void:"Geen", +rules_above:"Boven", +rules_below:"Onder", +rules_hsides:"Horizontale zijdes", +rules_lhs:"Linkerzijkant", +rules_rhs:"Rechterzijkant", +rules_vsides:"Verticale zijdes", +rules_box:"Box", +rules_border:"Rand" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nn_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nn_dlg.js new file mode 100644 index 00000000..f708b2b1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/nn_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('nn.table_dlg',{ +general_tab:"Generelt", +advanced_tab:"Avansert", +general_props:"Generelt", +advanced_props:"Generelle eigenskapar", +rowtype:"Rad i tabell", +title:"Set inn / rediger tabell", +width:"Breidd", +height:"H\u00F8gd", +cols:"Kolonner", +rows:"Rader", +cellspacing:"Celleavstand", +cellpadding:"Cellefylling", +border:"Ramme", +align:"Justering", +align_default:"Standard", +align_left:"Venstre", +align_right:"H\u00F8gre", +align_middle:"Midtstilt", +row_title:"Radeigenskapar", +cell_title:"Celleeigenskapar", +cell_type:"Celletype", +valign:"Vertikal justering", +align_top:"Topp", +align_bottom:"Botn", +bordercolor:"Rammefarge", +bgcolor:"Bakgrunn", +merge_cells_title:"Sl\u00E5 saman celler", +id:"Id", +style:"Stil", +langdir:"Skriftretning", +langcode:"Spr\u00E5kkode", +mime:"M\u00E5let sin MIME-type", +ltr:"Venstre mot h\u00F8gre", +rtl:"H\u00F8gre mot venstre", +bgimage:"Bakgrunnsbilete", +summary:"Samandrag", +td:"Data", +th:"Overskrift", +cell_cell:"Oppdater aktuell celle", +cell_row:"Oppdater alle celler i rada", +cell_all:"Oppdater alle celler i tabellen", +row_row:"Oppdater aktuell rad", +row_odd:"Oppdater oddetallrader", +row_even:"Oppdater partallrader", +row_all:"Oppdater alle rader", +thead:"Tabellhovud", +tbody:"Tabellkropp", +tfoot:"Tabellfot", +scope:"Omr\u00E5de", +rowgroup:"Radgruppe", +colgroup:"Kolonnegruppe", +col_limit:"Du har fleire enn maksimalt tal kolonner p\u00E5 {$cols}.", +row_limit:"Du har fleire enn maksimalt tal rader p\u00E5 {$rows}.", +cell_limit:"Du har fleire enn maksimalt tal celler p\u00E5 {$cells}.", +missing_scope:"Er du sikker p\u00E5 at du vil fortsetje utan \u00E5 angi eit omr\u00E5de for denne overskrifscella? Utan dette kan det bli vanskeleg for enkelte funksjonshemma brukarar \u00E5 forst\u00E5 innhaldet eller dataane som blir presenterte i tabellen.", +caption:"Tabelloverskrift", +frame:"Ramme", +frame_none:"ingen", +frame_groups:"grupper", +frame_rows:"rader", +frame_cols:"kolonnar", +frame_all:"alle", +rules:"Strekar", +rules_void:"ingen", +rules_above:"over", +rules_below:"under", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"boks", +rules_border:"ramme" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/no.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/no.js deleted file mode 100644 index 27ad727e..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/no.js +++ /dev/null @@ -1,30 +0,0 @@ -// NO lang variables - -tinyMCELang['lang_table_desc'] = 'Opprett/endre tabell'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Opprett rad før'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Opprett rad etter'; -tinyMCELang['lang_table_delete_row_desc'] = 'Fjern rad'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Opprett kolonne før'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Opprett kolonne etter'; -tinyMCELang['lang_table_delete_col_desc'] = 'Fjern kolonne'; -tinyMCELang['lang_insert_table_title'] = 'Opprett/endre tabell'; -tinyMCELang['lang_insert_table_width'] = 'Bredde'; -tinyMCELang['lang_insert_table_height'] = 'Høyde'; -tinyMCELang['lang_insert_table_cols'] = 'Kolonner'; -tinyMCELang['lang_insert_table_rows'] = 'Rader'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Celle-mellomrom'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Celle-padding'; -tinyMCELang['lang_insert_table_border'] = 'Rammebredde'; -tinyMCELang['lang_insert_table_align'] = 'Justering'; -tinyMCELang['lang_insert_table_align_default'] = 'Ingen'; -tinyMCELang['lang_insert_table_align_left'] = 'Venstre'; -tinyMCELang['lang_insert_table_align_right'] = 'Høyre'; -tinyMCELang['lang_insert_table_align_middle'] = 'Midten'; -tinyMCELang['lang_insert_table_class'] = 'Stil'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pl.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pl.js deleted file mode 100644 index d3c43f06..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pl.js +++ /dev/null @@ -1,30 +0,0 @@ -// PL lang variables - -tinyMCELang['lang_table_desc'] = 'Wstaw now± tabelê'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Wstaw wiersz przed'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Wstaw wiersz za'; -tinyMCELang['lang_table_delete_row_desc'] = 'Usuñ wiersz'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Wstaw kolumnê przed'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Wstaw kolumnê za'; -tinyMCELang['lang_table_delete_col_desc'] = 'Usuñ kolumnê'; -tinyMCELang['lang_insert_table_title'] = 'Wstaw/Modyfikuj tabelê'; -tinyMCELang['lang_insert_table_width'] = 'Szeroko¶æ'; -tinyMCELang['lang_insert_table_height'] = 'Wysoko¶æ'; -tinyMCELang['lang_insert_table_cols'] = 'Kolumny'; -tinyMCELang['lang_insert_table_rows'] = 'Wiersze'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Cellspacing'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Cellpadding'; -tinyMCELang['lang_insert_table_border'] = 'Krawêdzie'; -tinyMCELang['lang_insert_table_align'] = 'Wyrównanie'; -tinyMCELang['lang_insert_table_align_default'] = 'Domy¶lne'; -tinyMCELang['lang_insert_table_align_left'] = 'Do lewej'; -tinyMCELang['lang_insert_table_align_right'] = 'Do prawej'; -tinyMCELang['lang_insert_table_align_middle'] = 'Do ¶rodka'; -tinyMCELang['lang_insert_table_class'] = 'Klasa'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pl_dlg.js new file mode 100644 index 00000000..5527cb53 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pl_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('pl.table_dlg',{ +general_tab:"G\u0142\u00F3wna", +advanced_tab:"Zaawansowana", +general_props:"G\u0142\u00F3wne w\u0142a\u015Bciwo\u015Bci", +advanced_props:"Zaawansowane w\u0142a\u015Bciwo\u015Bci", +rowtype:"Row in table part", +title:"Wklej/Zmie\u0144 tabel\u0119", +width:"Szeroko\u015B\u0107", +height:"Wysoko\u015B\u0107", +cols:"Kolumny", +rows:"Wiersze", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Ramka", +align:"Wyr\u00F3wnanie", +align_default:"Domy\u015Blnie", +align_left:"Lewy", +align_right:"Prawy", +align_middle:"\u015Arodek", +row_title:"W\u0142a\u015Bciwo\u015Bci wiersza", +cell_title:"W\u0142a\u015Bciwo\u015Bci kom\u00F3rki", +cell_type:"Cell type", +valign:"Pionowe wyr\u00F3wnanie", +align_top:"G\u00F3ra", +align_bottom:"D\u00F3\u0142", +bordercolor:"Kolor ramki", +bgcolor:"Kolor t\u0142a", +merge_cells_title:"Po\u0142\u0105cz kom\u00F3rki", +id:"Id", +style:"Styl", +langdir:"Kierunek czytania tekstu", +langcode:"Oznaczenie kodowe j\u0119zyka", +mime:"Docelowy typ MIME", +ltr:"Kierunek z lewej do prawej", +rtl:"Kierunek z prawej do lewej", +bgimage:"Obrazek t\u0142a", +summary:"Podsumowanie", +td:"Data", +th:"Nag\u0142owek", +cell_cell:"Zmie\u0144 aktualn\u0105 kom\u00F3rk\u0119", +cell_row:"Zmie\u0144 wszytkie kom\u00F3rki w wierszu", +cell_all:"Zmie\u0144 wszytkie kom\u00F3rki w tabeli", +row_row:"Zmie\u0144 aktualny wiersz", +row_odd:"Zmie\u0144 nieparzyste wiersze", +row_even:"Zmie\u0144 parzyste wiersze", +row_all:"Zmie\u0144 wszystkie wiersze", +thead:"Nag\u0142\u00F3wek tabeli", +tbody:"Cia\u0142o tabeli", +tfoot:"Stopka tabeli", +scope:"Zakres", +rowgroup:"Grupa wierszy", +colgroup:"Grupa kolumn", +col_limit:"Przekroczy\u0142e\u015B maksymaln\u0105 liczb\u0119 kolumn kt\u00F3ra wynosi {$cols}.", +row_limit:"Przekroczy\u0142e\u015B maksymaln\u0105 liczb\u0119 wierszy kt\u00F3ra wynosi {$rows}.", +cell_limit:"Przekroczy\u0142e\u015B maksymaln\u0105 liczb\u0119 kom\u00F3rek kt\u00F3ra wynosi {$cells}.", +missing_scope:"Jeste\u015B pewny \u017Ce chcesz kontynuowa\u0107 bez definiowania zasi\u0119gu dla kom\u00F3rki tabeli. Bez niej, mo\u017Ce by\u0107 trudne dla niekt\u00F3rych u\u017Cytkownik\u00F3w zrozuminie zawarto\u015Bci albo danych wy\u015Bwietlanych poza tabel\u0105.", +caption:"Nag\u0142\u00F3wek tabeli", +frame:"Ramka", +frame_none:"brak", +frame_groups:"grupy", +frame_rows:"wiersze", +frame_cols:"kolumny", +frame_all:"wszystkie", +rules:"Prowadnice", +rules_void:"void", +rules_above:"nad", +rules_below:"pod", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pt.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pt.js deleted file mode 100644 index c283ddf4..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pt.js +++ /dev/null @@ -1,30 +0,0 @@ -// PT lang variables - -tinyMCELang['lang_table_desc'] = 'Insere uma nova tabela'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Inserir linha antes'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Inserir linha depois'; -tinyMCELang['lang_table_delete_row_desc'] = 'Eliminar linha'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Inserir coluna antes'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Inserir coluna depois'; -tinyMCELang['lang_table_delete_col_desc'] = 'Remover coluna'; -tinyMCELang['lang_insert_table_title'] = 'Inserir/Modificar tabela'; -tinyMCELang['lang_insert_table_width'] = 'Largura'; -tinyMCELang['lang_insert_table_height'] = 'Altura'; -tinyMCELang['lang_insert_table_cols'] = 'Colunas'; -tinyMCELang['lang_insert_table_rows'] = 'Linhas'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Espaça
mento'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Margem interior'; -tinyMCELang['lang_insert_table_border'] = 'Borda'; -tinyMCELang['lang_insert_table_align'] = 'Alinhamento'; -tinyMCELang['lang_insert_table_align_default'] = 'Por omissão'; -tinyMCELang['lang_insert_table_align_left'] = 'Esquerda'; -tinyMCELang['lang_insert_table_align_right'] = 'Direita'; -tinyMCELang['lang_insert_table_align_middle'] = 'Centrado'; -tinyMCELang['lang_insert_table_class'] = 'Classe de CSS'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pt_dlg.js new file mode 100644 index 00000000..c31d6d66 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/pt_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('pt.table_dlg',{ +general_tab:"Geral", +advanced_tab:"Avan\u00E7ado", +general_props:"Propriedades gerais", +advanced_props:"Propriedades avan\u00E7adas", +rowtype:"Linha na parte da tabela", +title:"Inserir/modificar tabela", +width:"Largura", +height:"Altura", +cols:"Colunas", +rows:"Linhas", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Limites", +align:"Alinhamento", +align_default:"Padr\u00E3o", +align_left:"Esquerda", +align_right:"Direita", +align_middle:"Centro", +row_title:"Propriedades de linhas", +cell_title:"Propriedades de c\u00E9lulas", +cell_type:"Tipo de c\u00E9lula", +valign:"Alinhamento vertical", +align_top:"Topo", +align_bottom:"Abaixo", +bordercolor:"Cor dos limites", +bgcolor:"Cor de fundo", +merge_cells_title:"Unir c\u00E9lulas", +id:"Id", +style:"Estilo", +langdir:"Direc\u00E7\u00E3o do texto", +langcode:"C\u00F3digo da linguagem", +mime:"MIME alvo", +ltr:"Da esquerda para a direita", +rtl:"Da direita para a esquerda", +bgimage:"Imagem de fundo", +summary:"Sum\u00E1rio", +td:"Dados", +th:"Campo", +cell_cell:"Actualizar esta c\u00E9lula", +cell_row:"Actualizar todas as c\u00E9lulas na linha", +cell_all:"Actualizar todas as c\u00E9lulas na tabela", +row_row:"Atcualizar esta linha", +row_odd:"Actualizar linhas \u00EDmpares", +row_even:"Actualizar linhas pares", +row_all:"Actualizar todas as linhas", +thead:"Topo da tabela", +tbody:"Corpo da tabela", +tfoot:"Rodap\u00E9 da tabela", +scope:"Alcance", +rowgroup:"Grupo linhas", +colgroup:"Grupo colunas", +col_limit:"Excedeu o n\u00FAmero m\u00E1ximo de colunas de {$cols}.", +row_limit:"Excedeu o n\u00FAmero m\u00E1ximo de linhas de {$rows}.", +cell_limit:"Excedeu o n\u00FAmero m\u00E1ximo de c\u00E9lulas de {$cells}.", +missing_scope:"Tem certeza de que quer continuar sem especificar um escopo para esta c\u00E9lula? (Isso poder\u00E1 causar dificuldades a usu\u00E1rios deficientes)", +caption:"T\u00EDtulo da tabela", +frame:"Frame", +frame_none:"Nenhum", +frame_groups:"Grupos", +frame_rows:"Linhas", +frame_cols:"colunas", +frame_all:"Todos", +rules:"Regras", +rules_void:"void", +rules_above:"acima", +rules_below:"abaixo", +rules_hsides:"Hsides", +rules_lhs:"Lhs", +rules_rhs:"Rhs", +rules_vsides:"Vsides", +rules_box:"Box", +rules_border:"Limites" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/readme.txt deleted file mode 100644 index e32bcf07..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -Theme specific language packs. - -The language pack codes are based on ISO-639-2 -http://www.loc.gov/standards/iso639-2/englangn.html diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ro_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ro_dlg.js new file mode 100644 index 00000000..e2aee5e9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ro_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ro.table_dlg',{ +general_tab:"General", +advanced_tab:"Avansat", +general_props:"Propriet\u0103\u0163i generale", +advanced_props:"Propriet\u0103\u0163i avansate", +rowtype:"R\u0103nd \u00EEn tabel", +title:"Inserare/modificare tabel", +width:"L\u0103\u0163ime", +height:"\u00CEn\u0103l\u0163ime", +cols:"Coloane", +rows:"R\u00E2nduri", +cellspacing:"Spa\u0163iu \u00EEntre celule", +cellpadding:"Spa\u0163iu \u00EEn celule", +border:"Bordur\u0103", +align:"Aliniere", +align_default:"Implicit\u0103", +align_left:"St\u00E2nga", +align_right:"Dreapta", +align_middle:"Centru", +row_title:"Propriet\u0103\u0163i r\u00E2nd", +cell_title:"Propriet\u0103\u0163i celul\u0103", +cell_type:"Tip celul\u0103", +valign:"Aliniere vertical\u0103", +align_top:"Sus", +align_bottom:"Jos", +bordercolor:"Culoare bordur\u0103", +bgcolor:"Culoare fundal", +merge_cells_title:"Uni\u0163i celulele", +id:"Id", +style:"Stil", +langdir:"Direc\u0163ie limb\u0103", +langcode:"Cod limb\u0103", +mime:"MIME type \u0163int\u0103", +ltr:"De la st\u00E2nga la dreapta", +rtl:"De la dreapta la st\u00E2nga", +bgimage:"Imagine de fundal", +summary:"Sumar", +td:"Date", +th:"Antet", +cell_cell:"Actualizeaz\u0103 celula curent\u0103", +cell_row:"Actualizeaz\u0103 toate celulele din r\u00E2nd", +cell_all:"Actualizeaz\u0103 toate celulele din tabel", +row_row:"Actualizeaz\u0103 r\u00E2nd curent", +row_odd:"Actualizeaz\u0103 r\u00E2ndurile impare", +row_even:"Actualizeaz\u0103 r\u00E2ndurile pare", +row_all:"Actualizeaz\u0103 toate r\u00E2ndurile", +thead:"Antet tabel", +tbody:"Corp tabel", +tfoot:"Subsol tabel", +scope:"Scop", +rowgroup:"Grupeaz\u0103 r\u00E2nduri", +colgroup:"Grupeaz\u0103 celule", +col_limit:"A\u0163i dep\u0103\u015Fit num\u0103rul maxim de coloane: {$cols}.", +row_limit:"A\u0163i dep\u0103\u015Fit num\u0103rul maxim de r\u00E2nduri {$rows}.", +cell_limit:"A\u0163i dep\u0103\u015Fit num\u0103rul maxim de celule {$cells}.", +missing_scope:"Sigur dori\u0163i s\u0103 l\u0103sa\u0163i scopul necompletat? ", +caption:"Titlu tabel", +frame:"Frame", +frame_none:"niciuna", +frame_groups:"grupuri", +frame_rows:"r\u00E2nduri", +frame_cols:"coloane", +frame_all:"toate", +rules:"Reguli", +rules_void:"gol", +rules_above:"deasupra", +rules_below:"dedesubt", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ru_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ru_dlg.js new file mode 100644 index 00000000..f0648833 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/ru_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ru.table_dlg',{ +general_tab:"\u041E\u0431\u0449\u0438\u0435", +advanced_tab:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435", +general_props:"\u041E\u0431\u0449\u0438\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430", +advanced_props:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430", +rowtype:"\u0421\u0442\u0440\u043E\u043A\u0430 \u0432 \u0447\u0430\u0441\u0442\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u044B", +title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443", +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +height:"\u0412\u044B\u0441\u043E\u0442\u0430", +cols:"\u0421\u0442\u043E\u043B\u0431\u0446\u044B", +rows:"\u0421\u0442\u0440\u043E\u043A\u0438", +cellspacing:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043C\u0435\u0436\u0434\u0443 \u044F\u0447\u0435\u0439\u043A\u0430\u043C\u0438", +cellpadding:"\u041D\u0430\u0431\u0438\u0432\u043A\u0430 \u0432 \u044F\u0447\u0435\u0439\u043A\u0430\u0445", +border:"\u0413\u0440\u0430\u043D\u0438\u0446\u0430", +align:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +align_default:"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E", +align_left:"\u0412\u043B\u0435\u0432\u043E", +align_right:"\u0412\u043F\u0440\u0430\u0432\u043E", +align_middle:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +row_title:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043E\u043A\u0438", +cell_title:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u044F\u0447\u0435\u0439\u043A\u0438", +cell_type:"\u0422\u0438\u043F \u044F\u0447\u0435\u0439\u043A\u0438", +valign:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +align_top:"\u041F\u043E \u0432\u0435\u0440\u0445\u0443", +align_bottom:"\u041F\u043E \u043D\u0438\u0437\u0443", +bordercolor:"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B", +bgcolor:"\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430", +merge_cells_title:"\u0421\u043B\u0438\u0442\u044C \u044F\u0447\u0435\u0439\u043A\u0438", +id:"\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440", +style:"\u0421\u0442\u0438\u043B\u044C", +langdir:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u044F\u0437\u044B\u043A\u0430", +langcode:"\u041A\u043E\u0434 \u044F\u0437\u044B\u043A\u0430", +mime:"\u0426\u0435\u043B\u0435\u0432\u043E\u0439 MIME-\u0442\u0438\u043F", +ltr:"\u0421\u043B\u0435\u0432\u0430 \u043D\u0430\u043F\u0440\u0430\u0432\u043E", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043D\u0430\u043B\u0435\u0432\u043E", +bgimage:"\u0424\u043E\u043D\u043E\u0432\u043E\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +summary:"\u0421\u0432\u043E\u0434\u043A\u0430", +td:"\u0414\u0430\u043D\u043D\u044B\u0435", +th:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +cell_cell:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u044F\u0447\u0435\u0439\u043A\u0443", +cell_row:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u044F\u0447\u0435\u0439\u043A\u0438 \u0432 \u0441\u0442\u0440\u043E\u043A\u0435", +cell_all:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u044F\u0447\u0435\u0439\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435", +row_row:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443", +row_odd:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0435\u0447\u0451\u0442\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435", +row_even:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0447\u0451\u0442\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435", +row_all:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435", +thead:"\u0412\u0435\u0440\u0445\u043D\u044F\u044F \u0447\u0430\u0441\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u044B", +tbody:"\u041E\u0441\u043D\u043E\u0432\u043D\u0430\u044F \u0447\u0430\u0441\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u044B", +tfoot:"\u041D\u0438\u0436\u043D\u044F\u044F \u0447\u0430\u0441\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u044B", +scope:"\u041F\u0440\u0435\u0434\u0435\u043B\u044B", +rowgroup:"\u0413\u0440\u0443\u043F\u043F\u0430 \u0441\u0442\u0440\u043E\u043A", +colgroup:"\u0413\u0440\u0443\u043F\u043F\u0430 \u0441\u0442\u043E\u043B\u0431\u0446\u043E\u0432", +col_limit:"\u0412\u044B \u043F\u0440\u0435\u0432\u044B\u0441\u0438\u043B\u0438 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0432 {$cols} \u0441\u0442\u043E\u043B\u0431\u0446\u043E\u0432.", +row_limit:"\u0412\u044B \u043F\u0440\u0435\u0432\u044B\u0441\u0438\u043B\u0438 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0432 {$rows} \u0441\u0442\u0440\u043E\u043A.", +cell_limit:"\u0412\u044B \u043F\u0440\u0435\u0432\u044B\u0441\u0438\u043B\u0438 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0432 {$cells} \u044F\u0447\u0435\u0435\u043A.", +missing_scope:"\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0431\u0435\u0437 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u0435\u043B\u043E\u0432 \u044D\u0442\u043E\u0439 \u044F\u0447\u0435\u0439\u043A\u0438 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430? \u0411\u0435\u0437 \u044D\u0442\u043E\u0433\u043E \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C \u0441 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0439 \u0442\u0440\u0443\u0434\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u044C\u044E \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0442\u0440\u0443\u0434\u043D\u043E \u043F\u043E\u043D\u044F\u0442\u044C \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0435 \u0438\u043B\u0438 \u0434\u0430\u043D\u043D\u044B\u0435 \u0442\u0430\u0431\u043B\u0438\u0446\u044B.", +caption:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0442\u0430\u0431\u043B\u0438\u0446\u044B", +frame:"\u0420\u0430\u043C\u043A\u0430", +frame_none:"\u043D\u0438\u0447\u0435\u0433\u043E", +frame_groups:"\u0433\u0440\u0443\u043F\u043F\u044B", +frame_rows:"\u0441\u0442\u0440\u043E\u043A\u0438", +frame_cols:"\u0441\u0442\u043E\u043B\u0431\u0446\u044B", +frame_all:"\u0432\u0441\u0451", +rules:"\u041B\u0438\u043D\u0435\u0439\u043A\u0438", +rules_void:"\u043D\u0438\u0447\u0442\u043E", +rules_above:"\u0441\u0432\u0435\u0440\u0445\u0443", +rules_below:"\u0441\u043D\u0438\u0437\u0443", +rules_hsides:"\u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u044B\u0435 \u0441\u0442\u043E\u0440\u043E\u043D\u044B", +rules_lhs:"\u043B\u0435\u0432\u044B\u0435 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u044B\u0435 \u0441\u0442\u043E\u0440\u043E\u043D\u044B", +rules_rhs:"\u043F\u0440\u0430\u0432\u044B\u0435 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u044B\u0435 \u0441\u0442\u043E\u0440\u043E\u043D\u044B", +rules_vsides:"\u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u0441\u0442\u043E\u0440\u043E\u043D\u044B", +rules_box:"\u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440", +rules_border:"\u0433\u0440\u0430\u043D\u0438\u0446\u0430" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sc_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sc_dlg.js new file mode 100644 index 00000000..03f8de5c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sc_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('sc.table_dlg',{ +general_tab:"\u57FA\u672C", +advanced_tab:"\u9AD8\u7EA7", +general_props:"\u57FA\u672C \u5C5E\u6027", +advanced_props:"\u9AD8\u7EA7\u5C5E\u6027", +rowtype:"\u884C\u6240\u5728\u7684\u8868\u683C\u4F4D\u7F6E", +title:"\u63D2\u5165/\u7F16\u8F91 \u8868\u683C", +width:"\u5BBD\u5EA6", +height:"\u9AD8\u5EA6", +cols:"\u5217\u6570", +rows:"\u884C\u6570", +cellspacing:"\u5355\u5143\u683C\u95F4\u8DDD", +cellpadding:"\u5355\u5143\u683C\u5185\u8DDD", +border:"\u8FB9\u6846", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_default:"\u9ED8\u8BA4", +align_left:"\u5C45\u5DE6", +align_right:"\u5C45\u53F3", +align_middle:"\u5C45\u4E2D", +row_title:"\u884C \u5C5E\u6027", +cell_title:"\u5355\u5143\u683C \u5C5E\u6027", +cell_type:"\u5355\u5143\u683C \u7C7B\u522B", +valign:"\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F", +align_top:"\u9876\u90E8", +align_bottom:"\u5E95\u90E8", +bordercolor:"\u8FB9\u6846\u989C\u8272", +bgcolor:"\u80CC\u666F\u989C\u8272", +merge_cells_title:"\u5408\u5E76\u5355\u5143\u683C", +id:"Id", +style:"\u6837\u5F0F", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +mime:"\u76EE\u6807 MIME \u7C7B\u578B", +ltr:"\u4ECE\u5DE6\u5230\u53F3", +rtl:"\u4ECE\u53F3\u5230\u5DE6", +bgimage:"\u80CC\u666F\u56FE\u7247", +summary:"\u6458\u8981", +td:"\u8868\u683C", +th:"\u8868\u5934", +cell_cell:"\u66F4\u65B0\u76EE\u524D\u7684\u5355\u5143\u683C", +cell_row:"\u66F4\u65B0\u5F53\u524D\u884C\u7684\u5355\u5143\u683C", +cell_all:"\u66F4\u65B0\u5168\u90E8\u5355\u5143\u683C", +row_row:"\u66F4\u65B0\u6240\u5728\u884C", +row_odd:"\u66F4\u65B0\u8868\u683C\u7684\u5947\u6570\u884C", +row_even:"\u66F4\u65B0\u8868\u683C\u7684\u5076\u6570\u884C", +row_all:"\u66F4\u65B0\u8868\u683C\u7684\u5168\u90E8\u884C", +thead:"\u8868\u5934", +tbody:"\u8868\u4F53", +tfoot:"\u8868\u811A", +scope:"\u8303\u56F4", +rowgroup:"\u884C\u7EC4", +colgroup:"\u5217\u7EC4", +col_limit:"\u5DF2\u8D85\u8FC7\u9650\u5236\uFF0C\u6700\u591A\u4E3A {$cols} \u5217\u3002", +row_limit:"\u5DF2\u8D85\u8FC7\u9650\u5236\uFF0C\u6700\u591A\u4E3A {$rows} \u884C\u3002", +cell_limit:"\u5DF2\u8D85\u8FC7\u9650\u5236\uFF0C\u6700\u591A\u4E3A{$cells} \u5355\u5143\u683C\u3002", +missing_scope:"\u60A8\u786E\u5B9A\u4E0D\u6307\u5B9A\u8868\u5934\u5355\u5143\u683C\u7684\u8303\u56F4\u5417\uFF1F\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u90E8\u5206\u4F7F\u7528\u8005\u5C06\u5F88\u96BE\u67E5\u770B\u8868\u683C\u5185\u5BB9", +caption:"\u8868\u683C\u6807\u9898", +frame:"\u8868\u683C\u8FB9\u6846", +frame_none:"\u65E0", +frame_groups:"\u6309\u7EC4", +frame_rows:"\u6309\u884C", +frame_cols:"\u6309\u5217", +frame_all:"\u5168\u90E8", +rules:"\u5355\u5143\u683C\u8FB9\u6846", +rules_void:"\u65E0", +rules_above:"\u4E0A", +rules_below:"\u4E0B", +rules_hsides:"\u5DE6\u53F3", +rules_lhs:"\u5DE6", +rules_rhs:"\u53F3", +rules_vsides:"\u4E0A\u4E0B", +rules_box:"\u56DB\u8FB9", +rules_border:"\u56DB\u8FB9" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/se_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/se_dlg.js new file mode 100644 index 00000000..4589a532 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/se_dlg.js @@ -0,0 +1,73 @@ +tinyMCE.addI18n('se.table_dlg',{ +general_tab:"Generellt", +advanced_tab:"Avancerat", +general_props:"Generella inst\u00E4llningar", +advanced_props:"Avancerade inst\u00E4llningar", +rowtype:"Radtyp", +title:"Infoga/redigera ny tabell", +width:"Bredd", +height:"H\u00F6jd", +cols:"Kolumner", +rows:"Rader", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Ram", +align:"Justering", +align_default:"Ingen", +align_left:"V\u00E4nster", +align_right:"H\u00F6ger", +align_middle:"Mitten", +row_title:"Tabellradsinst\u00E4llningar", +cell_title:"Tabellcellsinst\u00E4llningar", +cell_type:"Celltyp", +valign:"Vertikal justering", +align_top:"Toppen", +align_bottom:"Botten", +bordercolor:"Ramf\u00E4rg", +bgcolor:"Bakgrundsf\u00E4rg", +merge_cells_title:"Sammanfoga celler", +id:"Id", +style:"Stil", +langdir:"Skriftriktning", +langcode:"Spr\u00E5kkod", +ltr:"V\u00E4nster till h\u00F6ger", +rtl:"H\u00F6ger till v\u00E4nster", +bgimage:"Bakgrundsbild", +summary:"Sammanfattning", +td:"Data", +th:"Huvud", +cell_cell:"Uppdatera nuvarande cell", +cell_row:"Uppdatera alla celler i raden", +cell_all:"Uppdatera alla celler i tabellen", +row_row:"Uppdatera nuvarande rad", +row_odd:"Uppdatera udda rader i tabellen", +row_even:"Uppdatera j\u00E4mna rader i tabellen", +row_all:"Uppdatera alla rader i tabellen", +thead:"tabellhuvud", +tbody:"tabellkropp", +tfoot:"tabellfot", +scope:"Omfattning", +rowgroup:"Radgrupp", +colgroup:"Kolumngrupp", +col_limit:"Du kan inte ange fler \u00E4n {$cols} kolumner.", +row_limit:"Du kan inte ange fler \u00E4n {$rows} rader.", +cell_limit:"Du kan inte skapa en tabell med fler \u00E4n {$cells} celler.", +missing_scope:"\u00C4r du s\u00E4ker p\u00E5 att du vill forts\u00E4tta utan att ange en omfattning, denna underl\u00E4ttar f\u00F6r icke-grafiska webbl\u00E4sare.", +caption:"\u00D6verskrift", +frame:"Ram", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Regler", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/si_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/si_dlg.js new file mode 100644 index 00000000..c7c2d354 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/si_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('si.table_dlg',{ +general_tab:"General", +advanced_tab:"Advanced", +general_props:"General properties", +advanced_props:"Advanced properties", +rowtype:"Row in table part", +title:"Insert/Modify table", +width:"Width", +height:"Height", +cols:"Cols", +rows:"Rows", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Border", +align:"Alignment", +align_default:"Default", +align_left:"Left", +align_right:"Right", +align_middle:"Center", +row_title:"Table row properties", +cell_title:"Table cell properties", +cell_type:"Cell type", +valign:"Vertical alignment", +align_top:"Top", +align_bottom:"Bottom", +bordercolor:"Border color", +bgcolor:"Background color", +merge_cells_title:"Merge table cells", +id:"Id", +style:"Style", +langdir:"Language direction", +langcode:"Language code", +mime:"Target MIME type", +ltr:"Left to right", +rtl:"Right to left", +bgimage:"Background image", +summary:"Summary", +td:"Data", +th:"Header", +cell_cell:"Update current cell", +cell_row:"Update all cells in row", +cell_all:"Update all cells in table", +row_row:"Update current row", +row_odd:"Update odd rows in table", +row_even:"Update even rows in table", +row_all:"Update all rows in table", +thead:"Table Head", +tbody:"Table Body", +tfoot:"Table Foot", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sk_dlg.js new file mode 100644 index 00000000..7028370c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sk_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('sk.table_dlg',{ +general_tab:"Hlavn\u00E9", +advanced_tab:"Roz\u0161\u00EDren\u00E9", +general_props:"Hlavn\u00E9 vlastnosti", +advanced_props:"Roz\u0161\u00EDren\u00E9 vlastnosti", +rowtype:"Row in table part", +title:"Vlo\u017Ei\u0165/Upravi\u0165 tabu\u013Eku", +width:"\u0160\u00EDrka", +height:"V\u00FD\u0161ka", +cols:"St\u013Apce", +rows:"Riadky", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"R\u00E1m\u010Dek", +align:"Poloha", +align_default:"Predvolene", +align_left:"V\u013Eavo", +align_right:"Vpravo", +align_middle:"Na stred", +row_title:"Vlastnosti riadkov tabu\u013Eky", +cell_title:"Vlastnosti buniek tabu\u013Eky", +cell_type:"Tyb bunky", +valign:"Vertik\u00E1lna poloha", +align_top:"Hore", +align_bottom:"Dolu", +bordercolor:"Farba or\u00E1movania", +bgcolor:"Farba pozadia", +merge_cells_title:"Zl\u00FA\u010Di\u0165 bunky tabu\u013Eky", +id:"ID", +style:"CSS \u0160t\u00FDl", +langdir:"Smer textu", +langcode:"K\u00F3d jazyka", +mime:"Cie\u013Eov\u00FD typ MIME", +ltr:"Z \u013Eava do prava", +rtl:"Z prava do \u013Eava", +bgimage:"Obr\u00E1zok pozadia", +summary:"Popis tabu\u013Eky", +td:"D\u00E1ta", +th:"Hlav\u010Dka", +cell_cell:"Aktualizova\u0165 aktu\u00E1lnu bunku", +cell_row:"Aktualizova\u0165 v\u0161etky bunky v riadku", +cell_all:"Aktualizova\u0165 v\u0161etky bunky v tebu\u013Eke", +row_row:"Aktualizova\u0165 aktu\u00E1lny riadok", +row_odd:"Aktualizova\u0165 odd rows in table", +row_even:"Aktualizova\u0165 nep\u00E1rne riadky v tabu\u013Eke", +row_all:"Aktualizova\u0165 v\u0161etky riadky v tabu\u013Eke", +thead:"Hlavi\u010Dka tabu\u013Eky", +tbody:"Telo tabu\u013Eky", +tfoot:"P\u00E4ta tabu\u013Eky", +scope:"Scope", +rowgroup:"Skupina riadkov", +colgroup:"Skupina st\u013Apcov", +col_limit:"Bol presiahnut\u00FD maxim\u00E1lny po\u010Det st\u013Apcov {$cols}.", +row_limit:"Bol presiahnut\u00FD maxim\u00E1lny po\u010Det riadkov {$rows}.", +cell_limit:"Bol presiahnut\u00FD maxim\u00E1lny po\u010Det buniek {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"R\u00E1m\u010Dek", +frame_none:"\u017Eiadne", +frame_groups:"groups", +frame_rows:"riadky", +frame_cols:"st\u013Apce", +frame_all:"v\u0161etky", +rules:"Pravidl\u00E1", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"okraj" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sl_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sl_dlg.js new file mode 100644 index 00000000..b375e345 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sl_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('sl.table_dlg',{ +general_tab:"Splo\u0161no", +advanced_tab:"Napredno", +general_props:"Splo\u0161ne lastnosti", +advanced_props:"Napredne lastnosti", +rowtype:"Vrstica v tabeli", +title:"Vstavi/posodobi tabelo", +width:"\u0160irina", +height:"Vi\u0161ina", +cols:"Stolpcev", +rows:"Vrstic", +cellspacing:"Razmik celic", +cellpadding:"Podlaganje celic", +border:"Obroba", +align:"Poravnava", +align_default:"Privzeto", +align_left:"Levo", +align_right:"Desno", +align_middle:"Sredina", +row_title:"Lastnosti vrstice", +cell_title:"Lastnosti celice", +cell_type:"Tip celice", +valign:"Navpi\u010Dna poravnava", +align_top:"Vrh", +align_bottom:"Dno", +bordercolor:"Barva obrobe", +bgcolor:"Barva ozadja", +merge_cells_title:"Spoji celice", +id:"Oznaka", +style:"Slog", +langdir:"Smer pisave", +langcode:"Koda jezika", +mime:"Ciljni tip MIME", +ltr:"Od leve proti desni", +rtl:"Od desne proti levi", +bgimage:"Slika ozadja", +summary:"Povzetek", +td:"Podatek", +th:"Glava", +cell_cell:"Posodobi trenutno celico", +cell_row:"Posodobi vse celice vrstice", +cell_all:"Posodobi vse celice tabele", +row_row:"Posodobi trenutno vrstico", +row_odd:"Posodobi lihe vrstice", +row_even:"Posodobi sode vrstice", +row_all:"Posodobi vse vrstice", +thead:"Glava tabele", +tbody:"Telo tabele", +tfoot:"Noga tabele", +scope:"Doseg", +rowgroup:"Skup. vrst.", +colgroup:"Skup. stolp.", +col_limit:"Presegli ste dovoljeno \u0161tevilo stolpcev: {$cols}.", +row_limit:"Presegli ste dovoljeno \u0161tevilo vrstic: {$rows}.", +cell_limit:"Presegli ste dovoljeno \u0161tevilo celic: {$cells}.", +missing_scope:"Ste prepri\u010Dani, da \u017Eelite nadaljevati brez dolo\u010Denega dosega? Brez dosega je razumevanje tabele lahko ote\u017Eeno ljudem s slab\u0161o zaznavo!", +caption:"Opis tabele", +frame:"Okvir", +frame_none:"brez", +frame_groups:"skupine", +frame_rows:"vrstice", +frame_cols:"stolpci", +frame_all:"vse", +rules:"Pravila", +rules_void:"prazno", +rules_above:"nad", +rules_below:"pod", +rules_hsides:"v-strani", +rules_lhs:"l-strani", +rules_rhs:"d-strani", +rules_vsides:"n-strani", +rules_box:"\u0161katla", +rules_border:"obroba" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sq_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sq_dlg.js new file mode 100644 index 00000000..9d422645 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sq_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('sq.table_dlg',{ +general_tab:"T\u00EB p\u00EBrgjithshme", +advanced_tab:"T\u00EB avancuara", +general_props:"Tipare t\u00EB p\u00EBrgjithshme", +advanced_props:"Tipare t\u00EB avancuara", +rowtype:"Rresht n\u00EB", +title:"Fut/Edito tabel\u00EB", +width:"Gjer\u00EBsia", +height:"Gjat\u00EBsia", +cols:"Kolona", +rows:"Rreshta", +cellspacing:"Hap\u00EBsira midis qelizave", +cellpadding:"Hap\u00EBsira e br\u00EBndshme", +border:"Korniza", +align:"Drejtimi", +align_default:"Paracaktuar", +align_left:"Majtas", +align_right:"Djathtas", +align_middle:"Qend\u00EBr", +row_title:"Tiparet e rreshtit", +cell_title:"Tiparet e qeliz\u00EBs", +cell_type:"Tipi i qeliz\u00EBs", +valign:"Drejtimi vertikal", +align_top:"Krye", +align_bottom:"Fund", +bordercolor:"Ngjyra e korniz\u00EBs", +bgcolor:"Ngjyra e fush\u00EBs", +merge_cells_title:"Bashko qelizat", +id:"Id", +style:"Stili", +langdir:"Drejtimi i gjuh\u00EBs", +langcode:"Kodi i gjuh\u00EBs", +mime:"Tipi MIME i sh\u00EBnjestr\u00EBs", +ltr:"Majtas-Djathtas", +rtl:"Djathtas-Majtas", +bgimage:"Foto e fush\u00EBs", +summary:"P\u00EBrmbledhja", +td:"T\u00EB dh\u00EBna", +th:"Kok\u00EB", +cell_cell:"Rifresko qeliz\u00EBn aktuale", +cell_row:"Rifresko t\u00EB gjitha qelizat n\u00EB rresht", +cell_all:"Rifresko t\u00EB gjitha qelizat", +row_row:"Rifresko rreshtin aktual", +row_odd:"Rifresko rreshtat tek", +row_even:"Rifresko rreshtat \u00E7ift", +row_all:"Rifresko t\u00EB gjitha rreshtat n\u00EB tabel\u00EB", +thead:"Kok\u00EBn e Tabel\u00EBs", +tbody:"Trupin e Tabel\u00EBs", +tfoot:"K\u00EBmb\u00EBt e Tabel\u00EBs", +scope:"Objektivi", +rowgroup:"Grup Rreshtash", +colgroup:"Grup Kolonash", +col_limit:"Keni kaluar numrin maksimal t\u00EB kolonave: {$cols}.", +row_limit:"Keni kaluar numrin maksimal t\u00EB rreshtave: {$rows}.", +cell_limit:"Keni kaluar numrin maksimal t\u00EB qelizave {$cells}.", +missing_scope:"Jeni t\u00EB sigurt q\u00EB nuk doni t\u00EB vendosni objektiv p\u00EBr k\u00EBt\u00EB qeliz\u00EB t\u00EB kok\u00EBs. Pa t\u00EB mund t\u00EB jet\u00EB e v\u00EBshtir\u00EB p\u00EBr disa p\u00EBrdorues me aft\u00EBsi t\u00EB kufizuara t\u00EB lexojn\u00EB p\u00EBrmbajtjen e tabel\u00EBs.", +caption:"Krijo hap\u00EBsir\u00EB p\u00EBr titull", +frame:"Korniza", +frame_none:"asnj\u00EB", +frame_groups:"grupe", +frame_rows:"rreshta", +frame_cols:"kolona", +frame_all:"t\u00EB gjitha", +rules:"Rregullat", +rules_void:"zbrazur", +rules_above:"sip\u00EBr", +rules_below:"posht\u00EB", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"kuti", +rules_border:"korniz\u00EB" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sr_dlg.js new file mode 100644 index 00000000..f29bd912 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sr_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('sr.table_dlg',{ +general_tab:"Osnovno", +advanced_tab:"Napredno", +general_props:"Osnovna svojstva", +advanced_props:"Napredna svojstva", +rowtype:"Row in table part", +title:"Umetni/uredi tablicu", +width:"\u0160irina", +height:"Visina", +cols:"Stupaca", +rows:"Redaka", +cellspacing:"Razmak \u0107elija", +cellpadding:"Dopuna \u0107elije", +border:"Obrub", +align:"Poravnavanje", +align_default:"Zadano", +align_left:"Levo", +align_right:"Desno", +align_middle:"Sredina", +row_title:"Svojstva retka", +cell_title:"Svojstva \u0107elije", +cell_type:"Tip \u0107elije", +valign:"Okomito poravnavanje", +align_top:"Vrh", +align_bottom:"Dno", +bordercolor:"Boja obruba", +bgcolor:"Background color", +merge_cells_title:"Spoji \u0107elije", +id:"Id", +style:"Stil", +langdir:"Smjer jezika", +langcode:"Kod jezika", +mime:"MIME tip", +ltr:"S leva na desno", +rtl:"S desna na levo", +bgimage:"Slika pozadine", +summary:"Sa\u017Eetak", +td:"Podatkovna", +th:"Zaglavlje", +cell_cell:"Primjeni na odabranu \u0107eliju", +cell_row:"Primjeni na sve \u0107elije u retku", +cell_all:"Primjeni na sve \u0107elije u tablici", +row_row:"Primjeni na odabrani redak", +row_odd:"Primjeni na neparne retke u tablici", +row_even:"Primjeni na parne retke u tablici", +row_all:"Primjeni na sve retke u tablici", +thead:"Zaglavlje tablice", +tbody:"Telo tablice", +tfoot:"Podno\u017Eje tablice", +scope:"Domet", +rowgroup:"Grupa redaka", +colgroup:"Grupa stupaca", +col_limit:"Prema\u0161ili ste maksimalni broj stupaca ({$cols}).", +row_limit:"Prema\u0161ili ste maksimalni broj redaka ({$rows}).", +cell_limit:"Prema\u0161ili ste maksimalni broj \u0107elija ({$cells}).", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Opis tablice", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sv.js deleted file mode 100644 index 65fb6d72..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sv.js +++ /dev/null @@ -1,30 +0,0 @@ -// SE lang variables - -tinyMCELang['lang_table_desc'] = 'Skapa ny tabell'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'Skapa rad före'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'Skapa rad efter'; -tinyMCELang['lang_table_delete_row_desc'] = 'Ta bort rad'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'Skapa kolumn före'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'Skapa kolumn efter'; -tinyMCELang['lang_table_delete_col_desc'] = 'Ta bort kolumn'; -tinyMCELang['lang_insert_table_title'] = 'Skapa/Redigera tabell'; -tinyMCELang['lang_insert_table_width'] = 'Bredd'; -tinyMCELang['lang_insert_table_height'] = 'Höjd'; -tinyMCELang['lang_insert_table_cols'] = 'Kolumner'; -tinyMCELang['lang_insert_table_rows'] = 'Rader'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Cellspacing'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Cellpadding'; -tinyMCELang['lang_insert_table_border'] = 'Rambredd'; -tinyMCELang['lang_insert_table_align'] = 'Justering'; -tinyMCELang['lang_insert_table_align_default'] = 'Ingen'; -tinyMCELang['lang_insert_table_align_left'] = 'Vänster'; -tinyMCELang['lang_insert_table_align_right'] = 'Höger'; -tinyMCELang['lang_insert_table_align_middle'] = 'Mitten'; -tinyMCELang['lang_insert_table_class'] = 'Stil'; -tinyMCELang['lang_table_row_title'] = 'Tabellradsinställningar'; -tinyMCELang['lang_table_cell_title'] = 'Tabellcellsinställningar'; -tinyMCELang['lang_table_row_desc'] = 'Tabellradsinställningar'; -tinyMCELang['lang_table_cell_desc'] = 'Tabellcellsinställningar'; -tinyMCELang['lang_insert_table_valign'] = 'Vertikal justering'; -tinyMCELang['lang_insert_table_align_top'] = 'Toppen'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Botten'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sv_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sv_dlg.js new file mode 100644 index 00000000..a7de7422 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/sv_dlg.js @@ -0,0 +1,73 @@ +tinyMCE.addI18n('sv.table_dlg',{ +general_tab:"Generellt", +advanced_tab:"Avancerat", +general_props:"Generella inst\u00E4llningar", +advanced_props:"Avancerade inst\u00E4llningar", +rowtype:"Radtyp", +title:"Infoga/redigera ny tabell", +width:"Bredd", +height:"H\u00F6jd", +cols:"Kolumner", +rows:"Rader", +cellspacing:"Cellspacing", +cellpadding:"Cellpadding", +border:"Ram", +align:"Justering", +align_default:"Ingen", +align_left:"V\u00E4nster", +align_right:"H\u00F6ger", +align_middle:"Mitten", +row_title:"Tabellradsinst\u00E4llningar", +cell_title:"Tabellcellsinst\u00E4llningar", +cell_type:"Celltyp", +valign:"Vertikal justering", +align_top:"Toppen", +align_bottom:"Botten", +bordercolor:"Ramf\u00E4rg", +bgcolor:"Bakgrundsf\u00E4rg", +merge_cells_title:"Sammanfoga celler", +id:"Id", +style:"Stil", +langdir:"Skriftriktning", +langcode:"Spr\u00E5kkod", +ltr:"V\u00E4nster till h\u00F6ger", +rtl:"H\u00F6ger till v\u00E4nster", +bgimage:"Bakgrundsbild", +summary:"Sammanfattning", +td:"Data", +th:"Huvud", +cell_cell:"Uppdatera nuvarande cell", +cell_row:"Uppdatera alla celler i raden", +cell_all:"Uppdatera alla celler i tabellen", +row_row:"Uppdatera nuvarande rad", +row_odd:"Uppdatera udda rader i tabellen", +row_even:"Uppdatera j\u00E4mna rader i tabellen", +row_all:"Uppdatera alla rader i tabellen", +thead:"tabellhuvud", +tbody:"tabellkropp", +tfoot:"tabellfot", +scope:"Omfattning", +rowgroup:"Radgrupp", +colgroup:"Kolumngrupp", +col_limit:"Du kan inte ange fler \u00E4n {$cols} kolumner.", +row_limit:"Du kan inte ange fler \u00E4n {$rows} rader.", +cell_limit:"Du kan inte skapa en tabell med fler \u00E4n {$cells} celler.", +missing_scope:"\u00C4r du s\u00E4ker p\u00E5 att du vill forts\u00E4tta utan att ange en omfattning, denna underl\u00E4ttar f\u00F6r icke-grafiska webbl\u00E4sare.", +caption:"\u00D6verskrift", +frame:"Ram", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Regler", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tr_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tr_dlg.js new file mode 100644 index 00000000..2318314f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tr_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('tr.table_dlg',{ +general_tab:"Genel", +advanced_tab:"Geli\u015Fmi\u015F", +general_props:"Genel \u00F6zellikler", +advanced_props:"Geli\u015Fmi\u015F \u00F6zellikler", +rowtype:"Tablo par\u00E7as\u0131ndaki sat\u0131r", +title:"Tablo ekle/d\u00FCzenle", +width:"Geni\u015Flik", +height:"Y\u00FCkseklik", +cols:"Kolonlar", +rows:"Sat\u0131rlar", +cellspacing:"H\u00FCcre aralama", +cellpadding:"H\u00FCcre dolgusu", +border:"Kenarl\u0131k", +align:"Hizalama", +align_default:"Varsay\u0131lan", +align_left:"Sola", +align_right:"Sa\u011Fa", +align_middle:"Ortala", +row_title:"Tablo sat\u0131r \u00F6zellikleri", +cell_title:"Tablo h\u00FCcre \u00F6zellikleri", +cell_type:"H\u00FCcre tipi", +valign:"Dikey hizalama", +align_top:"\u00DCst", +align_bottom:"Alt", +bordercolor:"Kenarl\u0131k rengi", +bgcolor:"Arkaplan rengi", +merge_cells_title:"Tablo h\u00FCcrelerini birle\u015Ftir", +id:"Id", +style:"Stil", +langdir:"Dil y\u00F6nelimi", +langcode:"Dil kodu", +mime:"Hedef MIME tipi", +ltr:"Soldan sa\u011Fa", +rtl:"Sa\u011Fdan sola", +bgimage:"Arkaplan resmi", +summary:"\u00D6zet", +td:"Veri", +th:"Ba\u015Fl\u0131k", +cell_cell:"Se\u00E7ili h\u00FCcreyi g\u00FCncelle", +cell_row:"Sat\u0131rdaki t\u00FCm h\u00FCcreleri g\u00FCncelle", +cell_all:"Tablodaki t\u00FCm h\u00FCcreleri g\u00FCncelle", +row_row:"Se\u00E7ili sat\u0131r\u0131 g\u00FCncelle", +row_odd:"Tablodaki tek nolu sat\u0131rlar\u0131 g\u00FCncelle", +row_even:"Tablodaki \u00E7ift nolu sat\u0131rlar\u0131 g\u00FCncele", +row_all:"Tablodaki t\u00FCm sat\u0131rlar\u0131 g\u00FCncelle", +thead:"Tablo Ba\u015Fl\u0131\u011F\u0131", +tbody:"Table G\u00F6vdesi", +tfoot:"Table Altl\u0131\u011F\u0131", +scope:"Kapsam", +rowgroup:"Sat\u0131r Grubu", +colgroup:"Kolon Grubu", +col_limit:"Maksimum kolon say\u0131s\u0131 olan {$cols} de\u011Ferini a\u015Ft\u0131n\u0131z.", +row_limit:"Maksimum sat\u0131r say\u0131s\u0131 olan {$rows} de\u011Ferini a\u015Ft\u0131n\u0131z.", +cell_limit:"Maksimum h\u00FCcre say\u0131s\u0131 olan {$cells} de\u011Ferini a\u015Ft\u0131n\u0131z.", +missing_scope:"Bu tablo ba\u015Fl\u0131k h\u00FCcresi i\u00E7in bir kapsam belirlemeden devam etmek istedi\u011Finizden emin misiniz? Bu de\u011Fer olmadan, engelli kullan\u0131c\u0131lar\u0131n tabloda g\u00F6r\u00FCnt\u00FClenen i\u00E7eri\u011Fi anlamas\u0131 m\u00FCmk\u00FCn olmayabilir.", +caption:"Tablo ba\u015Fl\u0131\u011F\u0131", +frame:"\u00C7er\u00E7eve", +frame_none:"hi\u00E7biri", +frame_groups:"gruplar", +frame_rows:"sat\u0131rlar", +frame_cols:"kolonlar", +frame_all:"t\u00FCm\u00FC", +rules:"\u00C7izgiler", +rules_void:"yok", +rules_above:"\u00FCst\u00FCnde", +rules_below:"alt\u0131nda", +rules_hsides:"solsa\u011F", +rules_lhs:"soltaraf", +rules_rhs:"sa\u011Ftaraf", +rules_vsides:"\u00FCstalt", +rules_box:"kutu", +rules_border:"kenarl\u0131k" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tt_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tt_dlg.js new file mode 100644 index 00000000..d370c4fb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tt_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('tt.table_dlg',{ +general_tab:"\u57FA\u672C", +advanced_tab:"\u9032\u968E", +general_props:"\u57FA\u672C \u5C6C\u6027", +advanced_props:"\u9032\u968E\u5C6C\u6027", +rowtype:"\u884C\u6240\u5728\u7684\u8868\u683C\u4F4D\u7F6E", +title:"\u63D2\u5165/\u7DE8\u8F2F \u8868\u683C", +width:"\u5BEC\u5EA6", +height:"\u9AD8\u5EA6", +cols:"\u5217\u6578", +rows:"\u884C\u6578", +cellspacing:"\u5132\u5B58\u683C\u9593\u8DDD", +cellpadding:"\u5132\u5B58\u683C\u5167\u8DDD", +border:"\u908A\u6846", +align:"\u5C0D\u9F4A\u65B9\u5F0F", +align_default:"\u9810\u8A2D", +align_left:"\u5C45\u5DE6", +align_right:"\u5C45\u53F3", +align_middle:"\u7F6E\u4E2D", +row_title:"\u884C \u5C6C\u6027", +cell_title:"\u5132\u5B58\u683C \u5C6C\u6027", +cell_type:"\u5132\u5B58\u683C \u985E\u5225", +valign:"\u5782\u76F4\u5C0D\u9F4A\u65B9\u5F0F", +align_top:"\u9802\u90E8", +align_bottom:"\u5E95\u90E8", +bordercolor:"\u908A\u6846\u9854\u8272", +bgcolor:"\u80CC\u666F\u9854\u8272", +merge_cells_title:"\u5408\u4F75\u5132\u5B58\u683C", +id:"Id", +style:"\u6A23\u5F0F", +langdir:"\u8A9E\u8A00\u66F8\u5BEB\u65B9\u5411", +langcode:"\u8A9E\u8A00\u7DE8\u78BC", +mime:"\u76EE\u6A19 MIME \u985E\u578B", +ltr:"\u5F9E\u5DE6\u5230\u53F3", +rtl:"\u5F9E\u53F3\u5230\u5DE6", +bgimage:"\u80CC\u666F\u5716\u7247", +summary:"\u6458\u8981", +td:"\u8868\u683C", +th:"\u8868\u982D", +cell_cell:"\u66F4\u65B0\u76EE\u524D\u7684\u5132\u5B58\u683C", +cell_row:"\u66F4\u65B0\u7576\u524D\u884C\u7684\u5132\u5B58\u683C", +cell_all:"\u66F4\u65B0\u5168\u90E8\u5132\u5B58\u683C", +row_row:"\u66F4\u65B0\u6240\u5728\u884C", +row_odd:"\u66F4\u65B0\u8868\u683C\u7684\u5947\u6578\u884C", +row_even:"\u66F4\u65B0\u8868\u683C\u7684\u5076\u6578\u884C", +row_all:"\u66F4\u65B0\u8868\u683C\u7684\u5168\u90E8\u884C", +thead:"\u8868\u982D", +tbody:"\u8868\u9AD4", +tfoot:"\u8868\u8173", +scope:"\u7BC4\u570D", +rowgroup:"\u884C\u7D44", +colgroup:"\u5217\u7D44", +col_limit:"\u5DF2\u8D85\u904E\u9650\u5236\uFF0C\u6700\u591A\u7232 {$cols} \u5217\u3002", +row_limit:"\u5DF2\u8D85\u904E\u9650\u5236\uFF0C\u6700\u591A\u7232 {$rows} \u884C\u3002", +cell_limit:"\u5DF2\u8D85\u904E\u9650\u5236\uFF0C\u6700\u591A\u7232{$cells} \u5132\u5B58\u683C\u3002", +missing_scope:"\u60A8\u78BA\u5B9A\u4E0D\u6307\u5B9A\u8868\u982D\u5132\u5B58\u683C\u7684\u7BC4\u570D\u55CE\uFF1F\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u90E8\u5206\u4F7F\u7528\u8005\u5C07\u5F88\u96E3\u67E5\u770B\u8868\u683C\u5167\u5BB9", +caption:"\u8868\u683C\u6A19\u984C", +frame:"\u908A\u6846", +frame_none:"\u7121", +frame_groups:"\u7D44", +frame_rows:"\u884C", +frame_cols:"\u5217", +frame_all:"\u5168\u90E8", +rules:"\u5C3A\u898F", +rules_void:"\u7A7A", +rules_above:"\u4E4B\u4E0A", +rules_below:"\u4E4B\u4E0B", +rules_hsides:"\u6C34\u5E73\u5927\u5C0F", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"\u5782\u76F4\u5927\u5C0F", +rules_box:"\u76D2", +rules_border:"\u908A\u6846" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tw.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tw.js deleted file mode 100644 index 260c9302..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tw.js +++ /dev/null @@ -1,30 +0,0 @@ -// TW lang variables contributed by Jim Kou - -tinyMCELang['lang_insert_table_align'] = '¹ï»ô'; -tinyMCELang['lang_insert_table_align_default'] = '¼Ð·Ç'; -tinyMCELang['lang_insert_table_align_left'] = '»ô¥ª'; -tinyMCELang['lang_insert_table_align_middle'] = '¸m¤¤'; -tinyMCELang['lang_insert_table_align_right'] = '»ô¥k'; -tinyMCELang['lang_insert_table_border'] = '®Ø½u'; -tinyMCELang['lang_insert_table_cellpadding'] = '¦rÅé»PÀx¦s®æ¶¡»Ø'; -tinyMCELang['lang_insert_table_cellspacing'] = 'Àx¦s®æ¶¡»Ø'; -tinyMCELang['lang_insert_table_class'] = '¼Ë¦¡'; -tinyMCELang['lang_insert_table_cols'] = '¦æ'; -tinyMCELang['lang_insert_table_height'] = '°ª«×'; -tinyMCELang['lang_insert_table_rows'] = '¦C'; -tinyMCELang['lang_insert_table_title'] = 'ªí®æ¼ÐÃD'; -tinyMCELang['lang_insert_table_width'] = '¼e«×'; -tinyMCELang['lang_table_delete_col_desc'] = '§R°£¤@¦æÀx¦s®æ'; -tinyMCELang['lang_table_delete_row_desc'] = '§R°£¤@¦CÀx¦s®æ'; -tinyMCELang['lang_table_desc'] = 'ªí®æ'; -tinyMCELang['lang_table_insert_col_after_desc'] = '·s¼W¤@¦æÀx¦s®æ(«á)'; -tinyMCELang['lang_table_insert_col_before_desc'] = '·s¼W¤@¦æÀx¦s®æ(«e)'; -tinyMCELang['lang_table_insert_row_after_desc'] = '·s¼W¤@¦CÀx¦s®æ(«á)'; -tinyMCELang['lang_table_insert_row_before_desc'] = '·s¼W¤@¦CÀx¦s®æ(«e)'; -tinyMCELang['lang_table_row_title'] = 'Table row properties'; -tinyMCELang['lang_table_cell_title'] = 'Table cell properties'; -tinyMCELang['lang_table_row_desc'] = 'Table row properties'; -tinyMCELang['lang_table_cell_desc'] = 'Table cell properties'; -tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment'; -tinyMCELang['lang_insert_table_align_top'] = 'Top'; -tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tw_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tw_dlg.js new file mode 100644 index 00000000..d921aecc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/tw_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('tw.table_dlg',{ +general_tab:"\u4E00\u822C", +advanced_tab:"\u9AD8\u7D1A", +general_props:"\u4E00\u822C\u5C6C\u6027", +advanced_props:"\u9AD8\u7D1A\u5C6C\u6027", +rowtype:"\u884C\u6240\u5728\u7684\u8868\u683C\u4F4D\u7F6E", +title:"\u63D2\u5165/\u7DE8\u8F2F\u8868\u683C", +width:"\u5BEC\u5EA6", +height:"\u9AD8\u5EA6", +cols:"\u5217\u6578", +rows:"\u884C\u6578", +cellspacing:"\u55AE\u683C\u9593\u8DDD", +cellpadding:"\u55AE\u683C\u7559\u767D", +border:"\u908A\u6846", +align:"\u5C0D\u9F4A\u65B9\u5F0F", +align_default:"\u9810\u8A2D", +align_left:"\u9760\u5DE6", +align_right:"\u9760\u53F3", +align_middle:"\u5C45\u4E2D", +row_title:"\u884C\u5C6C\u6027", +cell_title:"\u55AE\u683C\u5C6C\u6027", +cell_type:"\u55AE\u683C\u5225", +valign:"\u6C34\u6E96\u5C0D\u9F4A\u65B9\u5F0F", +align_top:"\u4E0A\u65B9", +align_bottom:"\u4E0B\u65B9", +bordercolor:"\u908A\u6846\u984F\u8272", +bgcolor:"\u80CC\u666F\u984F\u8272", +merge_cells_title:"\u5408\u4F75\u55AE\u683C", +id:"Id", +style:"\u6A23\u5F0F", +langdir:"\u8A9E\u8A00\u66F8\u5BEB\u65B9\u5411", +langcode:"\u8A9E\u8A00\u7DE8\u78BC", +mime:"\u76EE\u6A19MIME\u985E\u578B", +ltr:"\u7531\u5DE6\u5230\u53F3", +rtl:"\u7531\u53F3\u5230\u5DE6", +bgimage:"\u80CC\u666F\u5716\u7247", +summary:"\u6982\u8981", +td:"\u6578\u64DA", +th:"\u8868\u982D", +cell_cell:"\u66F4\u65B0\u6240\u7684\u55AE\u683C", +cell_row:"\u66F4\u65B0\u6240\u5728\u884C\u7684\u5168\u90E8\u55AE\u683C", +cell_all:"\u66F4\u65B0\u8868\u683C\u5167\u7684\u5168\u90E8\u55AE\u683C", +row_row:"\u66F4\u65B0\u6240\u5728\u884C", +row_odd:"\u66F4\u65B0\u8868\u683C\u5167\u7684\u5947\u6578\u884C", +row_even:"\u66F4\u65B0\u8868\u683C\u5167\u7684\u5076\u6578\u884C", +row_all:"\u66F4\u65B0\u8868\u683C\u5167\u5168\u90E8\u884C", +thead:"\u8868\u982D", +tbody:"\u8868\u8EAB", +tfoot:"\u8868\u5C3E", +scope:"\u7BC4\u570D", +rowgroup:"\u884C\u7FA4\u7D44", +colgroup:"\u5217\u7FA4\u7D44", +col_limit:"\u5DF2\u8D85\u904E\u53EF\u7528\u6578\uFF0C\u6700\u9AD8\u7684\u5217\u6578\u70BA{$cols}\u5217\u3002", +row_limit:"\u5DF2\u8D85\u904E\u53EF\u7528\u6578\uFF0C\u6700\u9AD8\u7684\u884C\u6578\u70BA{$rows}\u884C\u3002", +cell_limit:"\u5DF2\u8D85\u904E\u53EF\u7528\u6578\uFF0C\u6700\u9AD8\u7684\u55AE\u683C\u6578\u70BA{$cells}\u683C\u3002", +missing_scope:"\u6A19\u984C\u884C\u7F3A\u5931\uFF01", +caption:"\u8868\u683C\u6A19\u984C", +frame:"\u908A\u6846", +frame_none:"\u7121", +frame_groups:"\u7FA4\u7D44", +frame_rows:"\u884C", +frame_cols:"\u5217", +frame_all:"\u5168\u90E8", +rules:"\u7DDA\u689D", +rules_void:"\u7A7A", +rules_above:"\u4E0A", +rules_below:"\u4E0B", +rules_hsides:"\u6C34\u6E96\u908A", +rules_lhs:"\u5DE6\u908A", +rules_rhs:"\u53F3\u908A", +rules_vsides:"\u5782\u76F4\u908A", +rules_box:"\u76D2\u578B", +rules_border:"\u5916\u6846" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/uk_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/uk_dlg.js new file mode 100644 index 00000000..b8e3ad45 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/uk_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('uk.table_dlg',{ +general_tab:"\u0417\u0430\u0433\u0430\u043B\u044C\u043D\u0435", +advanced_tab:"\u0414\u043E\u0434\u0430\u0442\u043A\u043E\u0432\u043E", +general_props:"\u0417\u0430\u0433\u0430\u043B\u044C\u043D\u0456 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456", +advanced_props:"\u0420\u043E\u0437\u0448\u0438\u0440\u0435\u043D\u0456 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456", +rowtype:"Row in table part", +title:"\u0414\u043E\u0434\u0430\u0432\u0430\u043D\u043D\u044F/\u0417\u043C\u0456\u043D\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u0456", +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +height:"\u0412\u0438\u0441\u043E\u0442\u0430", +cols:"\u0421\u0442\u043E\u043B\u0431\u0446\u044B", +rows:"\u0421\u0442\u0440\u043E\u043A\u0438", +cellspacing:"\u0412\u0456\u0434\u0441\u0442\u0430\u043D\u044C \u043C\u0456\u0436 \u043A\u043E\u043C\u0456\u0440\u043A\u0430\u043C\u0438", +cellpadding:"\u0412\u0456\u0434\u0441\u0442\u0443\u043F\u0438 \u0443 \u043A\u043E\u043C\u0456\u0440\u043A\u0430\u0445", +border:"\u0413\u0440\u0430\u043D\u0438\u0446\u044F", +align:"\u0412\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F", +align_default:"\u0417\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0430\u043D\u043D\u044F\u043C", +align_left:"\u041F\u043E \u043B\u0456\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +align_right:"\u041F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +align_middle:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +row_title:"\u0412\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456 \u0440\u044F\u0434\u043A\u0443 \u0442\u0430\u0431\u043B\u0438\u0446\u0456", +cell_title:"\u0412\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456 \u043A\u043E\u043C\u0456\u0440\u043A\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u0456", +cell_type:"\u0422\u0438\u043F \u043A\u043E\u043C\u0456\u0440\u043A\u0438", +valign:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +align_top:"\u041F\u043E \u0432\u0435\u0440\u0445\u043D\u0435\u043C\u0443 \u043A\u0440\u0430\u044E", +align_bottom:"\u041F\u043E \u043D\u0438\u0436\u043D\u044C\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +bordercolor:"\u043A\u043E\u043B\u0456\u0440 \u0433\u0440\u0430\u043D\u0438\u0446\u044B", +bgcolor:"\u043A\u043E\u043B\u0456\u0440 \u0444\u043E\u043D\u0443", +merge_cells_title:"\u041E\u0431'\u0454\u0434\u043D\u0430\u0442\u0438 \u043A\u043E\u043C\u0456\u0440\u043A\u0438", +id:"Id", +style:"\u0421\u0442\u0438\u043B\u044C", +langdir:"\u041D\u0430\u043F\u0440\u044F\u043C \u043C\u043E\u0432\u0438", +langcode:"\u041A\u043E\u0434 \u043C\u043E\u0432\u0438", +mime:"Target MIME-\u0442\u0438\u043F", +ltr:"\u0417\u043B\u0456\u0432\u0430 \u043F\u0440\u0430\u0432\u043E\u0440\u0443\u0447", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043B\u0456\u0432\u043E\u0440\u0443\u0447", +bgimage:"\u0424\u043E\u043D\u043E\u0432\u0435 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +summary:"\u0417\u0430\u0433\u0430\u043B\u044C\u043D\u0435", +td:"\u0414\u0430\u043D\u043D\u0456", +th:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +cell_cell:"\u041E\u043D\u043E\u0432\u0438\u0442\u0438 \u043F\u043E\u0442\u043E\u0447\u043D\u0443 \u043A\u043E\u043C\u0456\u0440\u043A\u0443", +cell_row:"\u041E\u043D\u043E\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u043A\u043E\u043C\u0456\u0440\u043A\u0438 \u0432 \u0440\u044F\u0434\u043A\u0443", +cell_all:"\u041E\u043D\u043E\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u043A\u043E\u043C\u0456\u0440\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0456", +row_row:"\u041E\u043D\u043E\u0432\u0438\u0442\u0438 \u043F\u043E\u0442\u043E\u0447\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A", +row_odd:"\u041E\u043D\u043E\u0432\u0438\u0442\u0438 \u043D\u0435\u043F\u0430\u0440\u043D\u0456 \u0440\u044F\u0434\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446", +row_even:"\u041E\u043D\u043E\u0432\u0438\u0442\u0438 \u043F\u0430\u0440\u043D\u0456 \u0440\u044F\u0434\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0456", +row_all:"\u043D\u043E\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u0440\u044F\u0434\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0456", +thead:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0442\u0430\u0431\u043B\u0438\u0446\u0456", +tbody:"\u0422\u0456\u043B\u043E \u0442\u0430\u0431\u043B\u0438\u0446\u0456", +tfoot:"\u041D\u0438\u0436\u043D\u044F \u0447\u0430\u0441\u0442\u0441\u0438\u043D\u0430", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Table caption", +frame:"\u0424\u0440\u0435\u0439\u043C", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/vi_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/vi_dlg.js new file mode 100644 index 00000000..3c198e27 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/vi_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('vi.table_dlg',{ +general_tab:"C\u01A1 b\u1EA3n", +advanced_tab:"N\u00E2ng cao", +general_props:"T\u00F9y ch\u1ECDn c\u01A1 b\u1EA3n", +advanced_props:"T\u00F9y ch\u1ECDn n\u00E2ng cao", +rowtype:"Row in table part", +title:"Ch\u00E8n/thay \u0111\u1ED5i b\u1EA3ng", +width:"Chi\u1EC1u r\u1ED9ng", +height:"Chi\u1EC1u cao", +cols:"S\u1ED1 c\u1ED9t", +rows:"S\u1ED1 d\u00F2ng", +cellspacing:"Kho\u1EA3ng c\u00E1ch ngang", +cellpadding:"Kho\u1EA3ng c\u00E1ch d\u1ECDc", +border:"\u0110\u01B0\u1EDDng vi\u1EC1n", +align:"Canh l\u1EC1", +align_default:"M\u1EB7c \u0111\u1ECBnh", +align_left:"Tr\u00E1i", +align_right:"Ph\u1EA3i", +align_middle:"Gi\u1EEFa", +row_title:"Thay \u0111\u1ED5i thu\u1ED9c t\u00EDnh d\u00F2ng", +cell_title:"Thay \u0111\u1ED5i thu\u1ED9c t\u00EDnh \u00F4", +cell_type:"Cell type", +valign:"Canh l\u1EC1 d\u1ECDc", +align_top:"Tr\u00EAn", +align_bottom:"D\u01B0\u1EDBi", +bordercolor:"M\u00E0u \u0111\u01B0\u1EDDng vi\u1EC1n", +bgcolor:"M\u00E0u n\u1EC1n", +merge_cells_title:"G\u1ED9p \u00F4", +id:"Id", +style:"Style", +langdir:"Language direction", +langcode:"Language code", +mime:"Target MIME type", +ltr:"Left to right", +rtl:"Right to left", +bgimage:"Background image", +summary:"Summary", +td:"Data", +th:"Header", +cell_cell:"C\u1EADp nh\u1EADt \u00F4 hi\u1EC7n t\u1EA1i", +cell_row:"C\u1EADp nh\u1EADt t\u1EA5t c\u1EA3 \u00F4 c\u00F3 tr\u00EAn d\u00F2ng", +cell_all:"C\u1EADp nh\u1EADt t\u1EA5t c\u1EA3 \u00F4 c\u00F3 trong b\u1EA3ng", +row_row:"C\u1EADp nh\u1EADt d\u00F2ng hi\u1EC7n t\u1EA1i", +row_odd:"C\u1EADp nh\u1EADt d\u00F2ng l\u1EBB c\u00F3 trong b\u1EA3ng", +row_even:"C\u1EADp nh\u1EADt d\u00F2ng ch\u1EB5n c\u00F3 trong b\u1EA3ng", +row_all:"C\u1EADp nh\u1EADt t\u1EA5t c\u1EA3 d\u00F2ng c\u00F3 trong b\u1EA3ng", +thead:"Ph\u1EA7n \u0111\u1EA7u b\u1EA3ng", +tbody:"Ph\u1EA7n th\u00E2n b\u1EA3ng", +tfoot:"Ph\u1EA7n cu\u1ED1i b\u1EA3ng", +scope:"Scope", +rowgroup:"Row Group", +colgroup:"Col Group", +col_limit:"You've exceeded the maximum number of columns of {$cols}.", +row_limit:"You've exceeded the maximum number of rows of {$rows}.", +cell_limit:"You've exceeded the maximum number of cells of {$cells}.", +missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", +caption:"Th\u00EAm ti\u00EAu \u0111\u1EC1 cho b\u1EA3ng", +frame:"Frame", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"Rules", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/zh_cn.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/zh_cn.js deleted file mode 100644 index 8cdd2672..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/zh_cn.js +++ /dev/null @@ -1,30 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com) - -tinyMCELang['lang_table_desc'] = '²åÈëбí¸ñ'; -tinyMCELang['lang_table_insert_row_before_desc'] = 'ÔÚÇ°Ãæ²åÈëÐÐ'; -tinyMCELang['lang_table_insert_row_after_desc'] = 'ÔÚºóÃæ²åÈëÐÐ'; -tinyMCELang['lang_table_delete_row_desc'] = 'ɾ³ýÐÐ'; -tinyMCELang['lang_table_insert_col_before_desc'] = 'ÔÚÇ°Ãæ²åÈëÁÐ'; -tinyMCELang['lang_table_insert_col_after_desc'] = 'ÔÚºóÃæ²åÈëÁÐ'; -tinyMCELang['lang_table_delete_col_desc'] = 'ɾ³ýÁÐ'; -tinyMCELang['lang_insert_table_title'] = '²åÈë/ÐÞ¸Ä ±í¸ñ'; -tinyMCELang['lang_insert_table_width'] = '¿í¶È'; -tinyMCELang['lang_insert_table_height'] = '¸ß¶È'; -tinyMCELang['lang_insert_table_cols'] = 'ÁÐÊý'; -tinyMCELang['lang_insert_table_rows'] = 'ÐÐÊý'; -tinyMCELang['lang_insert_table_cellspacing'] = '¼ä¾à'; -tinyMCELang['lang_insert_table_cellpadding'] = 'Ìî³ä'; -tinyMCELang['lang_insert_table_border'] = '±ß¿ò'; -tinyMCELang['lang_insert_table_align'] = '¶ÔÆ뷽ʽ'; -tinyMCELang['lang_insert_table_align_default'] = 'ĬÈÏ'; -tinyMCELang['lang_insert_table_align_left'] = '×ó¶ÔÆë'; -tinyMCELang['lang_insert_table_align_right'] = 'ÓÒ¶ÔÆë'; -tinyMCELang['lang_insert_table_align_middle'] = '¾ÓÖжÔÆë'; -tinyMCELang['lang_insert_table_class'] = 'Àà'; -tinyMCELang['lang_table_row_title'] = '±í¸ñÐÐÊôÐÔ'; -tinyMCELang['lang_table_cell_title'] = 'µ¥Ôª¸ñÊôÐÔ'; -tinyMCELang['lang_table_row_desc'] = '±í¸ñÐÐÊôÐÔ'; -tinyMCELang['lang_table_cell_desc'] = 'µ¥Ôª¸ñÊôÐÔ'; -tinyMCELang['lang_insert_table_valign'] = '´¹Ö±¶ÔÆë'; -tinyMCELang['lang_insert_table_align_top'] = '¶¥¶Ë'; -tinyMCELang['lang_insert_table_align_bottom'] = 'µ×²¿'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/zh_dlg.js b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/zh_dlg.js new file mode 100644 index 00000000..feaee946 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/langs/zh_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('zh.table_dlg',{ +general_tab:"\u4E00\u822C", +advanced_tab:"\u9AD8\u7EA7", +general_props:"\u4E00\u822C\u5C5E\u6027", +advanced_props:"\u9AD8\u7EA7\u5C5E\u6027", +rowtype:"\u884C\u6240\u5728\u7684\u8868\u683C\u4F4D\u7F6E", +title:"\u63D2\u5165/\u7F16\u8F91\u8868\u683C", +width:"\u5BBD\u5EA6", +height:"\u9AD8\u5EA6", +cols:"\u5217\u6570", +rows:"\u884C\u6570", +cellspacing:"\u5355\u5143\u683C\u95F4\u8DDD", +cellpadding:"\u5355\u5143\u683C\u7559\u767D", +border:"\u8FB9\u6846", +align:"\u5BF9\u9F50\u65B9\u5F0F", +align_default:"\u9884\u8BBE", +align_left:"\u9760\u5DE6", +align_right:"\u9760\u53F3", +align_middle:"\u5C45\u4E2D", +row_title:"\u884C\u5C5E\u6027", +cell_title:"\u5355\u5143\u683C\u5C5E\u6027", +cell_type:"\u5355\u5143\u683C\u522B", +valign:"\u6C34\u5E73\u5BF9\u9F50\u65B9\u5F0F", +align_top:"\u4E0A\u65B9", +align_bottom:"\u4E0B\u65B9", +bordercolor:"\u8FB9\u6846\u989C\u8272", +bgcolor:"\u80CC\u666F\u989C\u8272", +merge_cells_title:"\u5408\u5E76\u5355\u5143\u683C", +id:"Id", +style:"\u6837\u5F0F", +langdir:"\u8BED\u8A00\u4E66\u5199\u65B9\u5411", +langcode:"\u8BED\u8A00\u7F16\u7801", +mime:"\u76EE\u6807MIME\u7C7B\u578B", +ltr:"\u7531\u5DE6\u5230\u53F3", +rtl:"\u7531\u53F3\u5230\u5DE6", +bgimage:"\u80CC\u666F\u56FE\u7247", +summary:"\u6982\u8981", +td:"\u6570\u636E", +th:"\u8868\u5934", +cell_cell:"\u66F4\u65B0\u6240\u7684\u5355\u5143\u683C", +cell_row:"\u66F4\u65B0\u6240\u5728\u884C\u7684\u5168\u90E8\u5355\u5143\u683C", +cell_all:"\u66F4\u65B0\u8868\u683C\u5185\u7684\u5168\u90E8\u5355\u5143\u683C", +row_row:"\u66F4\u65B0\u6240\u5728\u884C", +row_odd:"\u66F4\u65B0\u8868\u683C\u5185\u7684\u5947\u6570\u884C", +row_even:"\u66F4\u65B0\u8868\u683C\u5185\u7684\u5076\u6570\u884C", +row_all:"\u66F4\u65B0\u8868\u683C\u5185\u5168\u90E8\u884C", +thead:"\u8868\u5934", +tbody:"\u8868\u8EAB", +tfoot:"\u8868\u5C3E", +scope:"\u8303\u56F4", +rowgroup:"\u884C\u7FA4\u7EC4", +colgroup:"\u5217\u7FA4\u7EC4", +col_limit:"\u5DF2\u8D85\u8FC7\u53EF\u7528\u6570\uFF0C\u6700\u9AD8\u7684\u5217\u6570\u4E3A{$cols}\u5217\u3002", +row_limit:"\u5DF2\u8D85\u8FC7\u53EF\u7528\u6570\uFF0C\u6700\u9AD8\u7684\u884C\u6570\u4E3A{$rows}\u884C\u3002", +cell_limit:"\u5DF2\u8D85\u8FC7\u53EF\u7528\u6570\uFF0C\u6700\u9AD8\u7684\u5355\u5143\u683C\u6570\u4E3A{$cells}\u683C\u3002", +missing_scope:"\u6807\u9898\u884C\u7F3A\u5931\uFF01", +caption:"\u8868\u683C\u6807\u9898", +frame:"\u8FB9\u6846", +frame_none:"\u65E0", +frame_groups:"\u7FA4\u7EC4", +frame_rows:"\u884C", +frame_cols:"\u5217", +frame_all:"\u5168\u90E8", +rules:"\u7EBF\u6761", +rules_void:"\u7A7A", +rules_above:"\u4E0A", +rules_below:"\u4E0B", +rules_hsides:"\u6C34\u5E73\u8FB9", +rules_lhs:"\u5DE6\u8FB9", +rules_rhs:"\u53F3\u8FB9", +rules_vsides:"\u5782\u76F4\u8FB9", +rules_box:"\u76D2\u578B", +rules_border:"\u5916\u6846" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/merge_cells.htm b/includes/tinymce/jscripts/tiny_mce/plugins/table/merge_cells.htm new file mode 100644 index 00000000..9d34a886 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/merge_cells.htm @@ -0,0 +1,38 @@ + + + + {#table_dlg.merge_cells_title} + + + + + + + +
+
+ {#table_dlg.merge_cells_title} + + + + + + + + + +
{#table_dlg.cols}:
{#table_dlg.rows}:
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/table/readme.txt deleted file mode 100644 index b9ab6792..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/readme.txt +++ /dev/null @@ -1,43 +0,0 @@ - Table plugin for TinyMCE ------------------------------- - -Installation instructions: - * Copy the table directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "table". - * Add the table button name to button list, example: theme_advanced_buttons3_add_before : "tablecontrols". - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "table", - theme_advanced_buttons3_add_before : "tablecontrols" - }); - html += tinyMCE.getControlHTML("row_props"); - html += tinyMCE.getControlHTML("cell_props"); - -Table controls: - tablecontrols All table control below and some separators between them. - table Insert table control. - row_props Edit row properties (tr). - cell_props Edit cell properties (td). - delete_col Delete column control. - delete_row Delete row control. - col_after Column after control. - col_before Column before control. - row_after Row after control. - row_before Row before control. - row_after Row after control. - row_before Row before control. - -Table plugin commands: - mceInsertTable Inserts a new table at cursor location the default size is 2x2. - If the value parameter is specified it should contain a name/value array, - this array has the following options cols, rows, border, cellspacing, cellpadding. - The default border is set to: 0. - mceTableInsertRowBefore Inserts a row before/above the current cursor location. - mceTableInsertRowAfter Inserts a row after/under the current cursor location. - mceTableDeleteRow Deletes the row at the current cursor location. - mceTableInsertColBefore Inserts a column before the current cursor location. - mceTableInsertColAfter Inserts a column after the current cursor location. - mceTableDeleteCol Deletes the column at the current cursor location. diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/row.htm b/includes/tinymce/jscripts/tiny_mce/plugins/table/row.htm index 0baed97b..fe75bf60 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/row.htm +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/row.htm @@ -1,118 +1,161 @@ - - - - -{$lang_table_row_title} - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang_table_row_title}
{$lang_insert_table_align}:{$lang_insert_table_class}:
{$lang_insert_table_valign}:{$lang_insert_table_height}:
    
  
-
- - + + + + {#table_dlg.row_title} + + + + + + + + + +
+ + +
+
+
+ {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + + +
 
+
+ + + + + +
 
+
+
+
+
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/table/table.htm b/includes/tinymce/jscripts/tiny_mce/plugins/table/table.htm index c78fca8e..75136e60 100644 --- a/includes/tinymce/jscripts/tiny_mce/plugins/table/table.htm +++ b/includes/tinymce/jscripts/tiny_mce/plugins/table/table.htm @@ -1,137 +1,193 @@ - - - - -{$lang_insert_table_title} - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang_insert_table_title}
{$lang_insert_table_cols}:{$lang_insert_table_rows}:
{$lang_insert_table_cellpadding}:{$lang_insert_table_cellspacing}:
{$lang_insert_table_align}:{$lang_insert_table_border}:
{$lang_insert_table_width}:{$lang_insert_table_height}:
{$lang_insert_table_class}: -   
  
-
- - + + + + {#table_dlg.title} + + + + + + + + + + +
+ + +
+
+
+ {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+ {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
 
+
+ +
+ +
+ +
+ + + + + +
 
+
+ + + + + +
 
+
+
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/template/blank.htm b/includes/tinymce/jscripts/tiny_mce/plugins/template/blank.htm new file mode 100644 index 00000000..ecde53fa --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/template/blank.htm @@ -0,0 +1,12 @@ + + + blank_page + + + + + + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/template/css/template.css b/includes/tinymce/jscripts/tiny_mce/plugins/template/css/template.css new file mode 100644 index 00000000..2d23a493 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/template/css/template.css @@ -0,0 +1,23 @@ +#frmbody { + padding: 10px; + background-color: #FFF; + border: 1px solid #CCC; +} + +.frmRow { + margin-bottom: 10px; +} + +#templatesrc { + border: none; + width: 320px; + height: 240px; +} + +.title { + padding-bottom: 5px; +} + +.mceActionPanel { + padding-top: 5px; +} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js new file mode 100644 index 00000000..0f7fb015 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js @@ -0,0 +1 @@ +(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TemplatePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceTemplate',function(ui){ed.windowManager.open({file:url+'/template.htm',width:ed.getParam('template_popup_width',750),height:ed.getParam('template_popup_height',600),inline:1},{plugin_url:url});});ed.addCommand('mceInsertTemplate',t._insertTemplate,t);ed.addButton('template',{title:'template.desc',cmd:'mceTemplate'});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('div',o.node),function(e){if(dom.hasClass(e,'mceTmpl')){each(dom.select('*',e),function(e){if(dom.hasClass(e,ed.getParam('template_mdate_classes','mdate').replace(/\s+/g,'|')))e.innerHTML=t._getDateTime(new Date(),ed.getParam("template_mdate_format",ed.getLang("template.mdate_format")));});t._replaceVals(e);}});});},getInfo:function(){return{longname:'Template plugin',author:'Moxiecode Systems AB',authorurl:'http://www.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_insertTemplate:function(ui,v){var t=this,ed=t.editor,h,el,dom=ed.dom,sel=ed.selection.getContent();h=v.content;each(t.editor.getParam('template_replace_values'),function(v,k){if(typeof(v)!='function')h=h.replace(new RegExp('\\{\\$'+k+'\\}','g'),v);});el=dom.create('div',null,h);n=dom.select('.mceTmpl',el);if(n&&n.length>0){el=dom.create('div',null);el.appendChild(n[0].cloneNode(true));}function hasClass(n,c){return new RegExp('\\b'+c+'\\b','g').test(n.className);};each(dom.select('*',el),function(n){if(hasClass(n,ed.getParam('template_cdate_classes','cdate').replace(/\s+/g,'|')))n.innerHTML=t._getDateTime(new Date(),ed.getParam("template_cdate_format",ed.getLang("template.cdate_format")));if(hasClass(n,ed.getParam('template_mdate_classes','mdate').replace(/\s+/g,'|')))n.innerHTML=t._getDateTime(new Date(),ed.getParam("template_mdate_format",ed.getLang("template.mdate_format")));if(hasClass(n,ed.getParam('template_selected_content_classes','selcontent').replace(/\s+/g,'|')))n.innerHTML=sel;});t._replaceVals(el);ed.execCommand('mceInsertContent',false,el.innerHTML);ed.addVisual();},_replaceVals:function(e){var dom=this.editor.dom,vl=this.editor.getParam('template_replace_values');each(dom.select('*',e),function(e){each(vl,function(v,k){if(dom.hasClass(e,k)){if(typeof(vl[k])=='function')vl[k](e);}});});},_getDateTime:function(d,fmt){if(!fmt)return"";function addZeros(value,len){var i;value=""+value;if(value.length 0) { + el = dom.create('div', null); + el.appendChild(n[0].cloneNode(true)); + } + + function hasClass(n, c) { + return new RegExp('\\b' + c + '\\b', 'g').test(n.className); + }; + + each(dom.select('*', el), function(n) { + // Replace cdate + if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|'))) + n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format"))); + + // Replace mdate + if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|'))) + n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format"))); + + // Replace selection + if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|'))) + n.innerHTML = sel; + }); + + t._replaceVals(el); + + ed.execCommand('mceInsertContent', false, el.innerHTML); + ed.addVisual(); + }, + + _replaceVals : function(e) { + var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values'); + + each(dom.select('*', e), function(e) { + each(vl, function(v, k) { + if (dom.hasClass(e, k)) { + if (typeof(vl[k]) == 'function') + vl[k](e); + } + }); + }); + }, + + _getDateTime : function(d, fmt) { + if (!fmt) + return ""; + + function addZeros(value, len) { + var i; + + value = "" + value; + + if (value.length < len) { + for (i=0; i<(len-value.length); i++) + value = "0" + value; + } + + return value; + } + + fmt = fmt.replace("%D", "%m/%d/%y"); + fmt = fmt.replace("%r", "%I:%M:%S %p"); + fmt = fmt.replace("%Y", "" + d.getFullYear()); + fmt = fmt.replace("%y", "" + d.getYear()); + fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); + fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); + fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); + fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); + fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); + fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); + fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); + fmt = fmt.replace("%B", "" + tinyMCE.getLang("template_months_long").split(',')[d.getMonth()]); + fmt = fmt.replace("%b", "" + tinyMCE.getLang("template_months_short").split(',')[d.getMonth()]); + fmt = fmt.replace("%A", "" + tinyMCE.getLang("template_day_long").split(',')[d.getDay()]); + fmt = fmt.replace("%a", "" + tinyMCE.getLang("template_day_short").split(',')[d.getDay()]); + fmt = fmt.replace("%%", "%"); + + return fmt; + } + }); + + // Register plugin + tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/template/js/template.js b/includes/tinymce/jscripts/tiny_mce/plugins/template/js/template.js new file mode 100644 index 00000000..24045d73 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/template/js/template.js @@ -0,0 +1,106 @@ +tinyMCEPopup.requireLangPack(); + +var TemplateDialog = { + preInit : function() { + var url = tinyMCEPopup.getParam("template_external_list_url"); + + if (url != null) + document.write(''); + }, + + init : function() { + var ed = tinyMCEPopup.editor, tsrc, sel, x, u; + + tsrc = ed.getParam("template_templates", false); + sel = document.getElementById('tpath'); + + // Setup external template list + if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { + for (x=0, tsrc = []; x'); + }); + }, + + selectTemplate : function(u, ti) { + var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; + + if (!u) + return; + + d.body.innerHTML = this.templateHTML = this.getFileContents(u); + + for (x=0; x + + {#template_dlg.title} + + + + + + +
+
+
{#template_dlg.desc}
+
+ +
+
+
+
+ {#template_dlg.preview} + +
+
+ +
+
+ +
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js new file mode 100644 index 00000000..e1e4238a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.VisualChars',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceVisualChars',t._toggleVisualChars,t);ed.addButton('visualchars',{title:'visualchars.desc',cmd:'mceVisualChars'});ed.onBeforeGetContent.add(function(ed,o){if(t.state){t.state=true;t._toggleVisualChars();}});},getInfo:function(){return{longname:'Visual characters',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_toggleVisualChars:function(){var t=this,ed=t.editor,nl,i,h,d=ed.getDoc(),b=ed.getBody(),nv,s=ed.selection,bo;t.state=!t.state;ed.controlManager.setActive('visualchars',t.state);if(t.state){nl=[];tinymce.walk(b,function(n){if(n.nodeType==3&&n.nodeValue&&n.nodeValue.indexOf('\u00a0')!=-1)nl.push(n);},'childNodes');for(i=0;i$1');nv=nv.replace(/\u00a0/g,'\u00b7');ed.dom.setOuterHTML(nl[i],nv,d);}}else{nl=tinymce.grep(ed.dom.select('span',b),function(n){return ed.dom.hasClass(n,'mceVisualNbsp');});for(i=0;i$1'); + nv = nv.replace(/\u00a0/g, '\u00b7'); + ed.dom.setOuterHTML(nl[i], nv, d); + } + } else { + nl = tinymce.grep(ed.dom.select('span', b), function(n) { + return ed.dom.hasClass(n, 'mceVisualNbsp'); + }); + + for (i=0; i + + + {#xhtmlxtras_dlg.title_abbr_element} + + + + + + + + + + +
+ + +
+
+
+ {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
: + +
:
: + +
: + +
+
+
+
+
+ {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
:
:
:
:
:
:
:
:
:
:
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm new file mode 100644 index 00000000..54e4c9d9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm @@ -0,0 +1,149 @@ + + + + {#xhtmlxtras_dlg.title_acronym_element} + + + + + + + + + + +
+ + +
+
+
+ {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
: + +
:
: + +
: + +
+
+
+
+
+ {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
:
:
:
:
:
:
:
:
:
:
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm new file mode 100644 index 00000000..cfbb409a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm @@ -0,0 +1,154 @@ + + + + {#xhtmlxtras_dlg.attribs_title} + + + + + + + + + +
+ + +
+
+
+ {#xhtmlxtras_dlg.attribute_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
+ +
:
: + +
: + +
+
+
+
+
+ {#xhtmlxtras_dlg.attribute_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
:
:
:
:
:
:
:
:
:
:
+
+
+
+
+
+ +
+
+ +
+
+ +
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm new file mode 100644 index 00000000..7d9eaba4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm @@ -0,0 +1,149 @@ + + + + {#xhtmlxtras_dlg.title_cite_element} + + + + + + + + + + +
+ + +
+
+
+ {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
: + +
:
: + +
: + +
+
+
+
+
+ {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
:
:
:
:
:
:
:
:
:
:
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css new file mode 100644 index 00000000..9a6a235c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css @@ -0,0 +1,11 @@ +.panel_wrapper div.current { + height: 290px; +} + +#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { + width: 200px; +} + +#events_panel input { + width: 200px; +} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/popup.css b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/popup.css new file mode 100644 index 00000000..e67114db --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/popup.css @@ -0,0 +1,9 @@ +input.field, select.field {width:200px;} +input.picker {width:179px; margin-left: 5px;} +input.disabled {border-color:#F2F2F2;} +img.picker {vertical-align:text-bottom; cursor:pointer;} +h1 {padding: 0 0 5px 0;} +.panel_wrapper div.current {height:160px;} +#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} +a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} +#datetime {width:180px;} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm new file mode 100644 index 00000000..d03c4568 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm @@ -0,0 +1,170 @@ + + + + {#xhtmlxtras_dlg.title_del_element} + + + + + + + + + + +
+ + +
+
+
+ {#xhtmlxtras_dlg.fieldset_general_tab} + + + + + + + + + +
: + + + + + +
+
:
+
+
+ {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
: + +
:
: + +
: + +
+
+
+
+
+ {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
:
:
:
:
:
:
:
:
:
:
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js new file mode 100644 index 00000000..00c178e5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create('tinymce.plugins.XHTMLXtrasPlugin',{init:function(ed,url){ed.addCommand('mceCite',function(){ed.windowManager.open({file:url+'/cite.htm',width:350+parseInt(ed.getLang('xhtmlxtras.cite_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.cite_delta_height',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAcronym',function(){ed.windowManager.open({file:url+'/acronym.htm',width:350+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAbbr',function(){ed.windowManager.open({file:url+'/abbr.htm',width:350+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceDel',function(){ed.windowManager.open({file:url+'/del.htm',width:340+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceIns',function(){ed.windowManager.open({file:url+'/ins.htm',width:340+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAttributes',function(){ed.windowManager.open({file:url+'/attributes.htm',width:380,height:370,inline:1},{plugin_url:url});});ed.addButton('cite',{title:'xhtmlxtras.cite_desc',cmd:'mceCite'});ed.addButton('acronym',{title:'xhtmlxtras.acronym_desc',cmd:'mceAcronym'});ed.addButton('abbr',{title:'xhtmlxtras.abbr_desc',cmd:'mceAbbr'});ed.addButton('del',{title:'xhtmlxtras.del_desc',cmd:'mceDel'});ed.addButton('ins',{title:'xhtmlxtras.ins_desc',cmd:'mceIns'});ed.addButton('attribs',{title:'xhtmlxtras.attribs_desc',cmd:'mceAttributes'});if(tinymce.isIE){function fix(ed,o){if(o.set){o.content=o.content.replace(/]+)>/gi,'');o.content=o.content.replace(/<\/abbr>/gi,'');}};ed.onBeforeSetContent.add(fix);ed.onPostProcess.add(fix);}ed.onNodeChange.add(function(ed,cm,n,co){n=ed.dom.getParent(n,'CITE,ACRONYM,ABBR,DEL,INS');cm.setDisabled('cite',co);cm.setDisabled('acronym',co);cm.setDisabled('abbr',co);cm.setDisabled('del',co);cm.setDisabled('ins',co);cm.setDisabled('attribs',n&&n.nodeName=='BODY');cm.setActive('cite',0);cm.setActive('acronym',0);cm.setActive('abbr',0);cm.setActive('del',0);cm.setActive('ins',0);if(n){do{cm.setDisabled(n.nodeName.toLowerCase(),0);cm.setActive(n.nodeName.toLowerCase(),1);}while(n=n.parentNode);}});},getInfo:function(){return{longname:'XHTML Xtras Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('xhtmlxtras',tinymce.plugins.XHTMLXtrasPlugin);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js new file mode 100644 index 00000000..bef06f2d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js @@ -0,0 +1,136 @@ +/** + * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + tinymce.create('tinymce.plugins.XHTMLXtrasPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceCite', function() { + ed.windowManager.open({ + file : url + '/cite.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.cite_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.cite_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAcronym', function() { + ed.windowManager.open({ + file : url + '/acronym.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAbbr', function() { + ed.windowManager.open({ + file : url + '/abbr.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceDel', function() { + ed.windowManager.open({ + file : url + '/del.htm', + width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceIns', function() { + ed.windowManager.open({ + file : url + '/ins.htm', + width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAttributes', function() { + ed.windowManager.open({ + file : url + '/attributes.htm', + width : 380, + height : 370, + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('cite', {title : 'xhtmlxtras.cite_desc', cmd : 'mceCite'}); + ed.addButton('acronym', {title : 'xhtmlxtras.acronym_desc', cmd : 'mceAcronym'}); + ed.addButton('abbr', {title : 'xhtmlxtras.abbr_desc', cmd : 'mceAbbr'}); + ed.addButton('del', {title : 'xhtmlxtras.del_desc', cmd : 'mceDel'}); + ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); + ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); + + if (tinymce.isIE) { + function fix(ed, o) { + if (o.set) { + o.content = o.content.replace(/]+)>/gi, ''); + o.content = o.content.replace(/<\/abbr>/gi, ''); + } + }; + + ed.onBeforeSetContent.add(fix); + ed.onPostProcess.add(fix); + } + + ed.onNodeChange.add(function(ed, cm, n, co) { + n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); + + cm.setDisabled('cite', co); + cm.setDisabled('acronym', co); + cm.setDisabled('abbr', co); + cm.setDisabled('del', co); + cm.setDisabled('ins', co); + cm.setDisabled('attribs', n && n.nodeName == 'BODY'); + cm.setActive('cite', 0); + cm.setActive('acronym', 0); + cm.setActive('abbr', 0); + cm.setActive('del', 0); + cm.setActive('ins', 0); + + // Activate all + if (n) { + do { + cm.setDisabled(n.nodeName.toLowerCase(), 0); + cm.setActive(n.nodeName.toLowerCase(), 1); + } while (n = n.parentNode); + } + }); + }, + + getInfo : function() { + return { + longname : 'XHTML Xtras Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('xhtmlxtras', tinymce.plugins.XHTMLXtrasPlugin); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm new file mode 100644 index 00000000..c0f056ff --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm @@ -0,0 +1,170 @@ + + + + {#xhtmlxtras_dlg.title_ins_element} + + + + + + + + + + +
+ + +
+
+
+ {#xhtmlxtras_dlg.fieldset_general_tab} + + + + + + + + + +
: + + + + + +
+
:
+
+
+ {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
: + +
:
: + +
: + +
+
+
+
+
+ {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
:
:
:
:
:
:
:
:
:
:
:
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + + diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js new file mode 100644 index 00000000..e84b6a83 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js @@ -0,0 +1,25 @@ + /** + * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ + * + * @author Moxiecode - based on work by Andrew Tetlaw + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +function init() { + SXE.initElementDialog('abbr'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAbbr() { + SXE.insertElement(tinymce.isIE ? 'html:abbr' : 'abbr'); + tinyMCEPopup.close(); +} + +function removeAbbr() { + SXE.removeElement('abbr'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js new file mode 100644 index 00000000..933d122c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js @@ -0,0 +1,25 @@ + /** + * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ + * + * @author Moxiecode - based on work by Andrew Tetlaw + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +function init() { + SXE.initElementDialog('acronym'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAcronym() { + SXE.insertElement('acronym'); + tinyMCEPopup.close(); +} + +function removeAcronym() { + SXE.removeElement('acronym'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js new file mode 100644 index 00000000..23c7fa4c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js @@ -0,0 +1,123 @@ + /** + * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ + * + * @author Moxiecode - based on work by Andrew Tetlaw + * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + */ + +function init() { + tinyMCEPopup.resizeToInnerSize(); + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var elm = inst.selection.getNode(); + var f = document.forms[0]; + var onclick = dom.getAttrib(elm, 'onclick'); + + setFormValue('title', dom.getAttrib(elm, 'title')); + setFormValue('id', dom.getAttrib(elm, 'id')); + setFormValue('style', dom.getAttrib(elm, "style")); + setFormValue('dir', dom.getAttrib(elm, 'dir')); + setFormValue('lang', dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); + className = dom.getAttrib(elm, 'class'); + + addClassesToList('classlist', 'advlink_styles'); + selectByValue(f, 'classlist', className, true); + + TinyMCE_EditableSelects.init(); +} + +function setFormValue(name, value) { + if(value && document.forms[0].elements[name]){ + document.forms[0].elements[name].value = value; + } +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + setAllAttribs(elm); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); +} + +function setAttrib(elm, attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib.toLowerCase()]; + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + if (value != "") { + dom.setAttrib(elm, attrib.toLowerCase(), value); + + if (attrib == "style") + attrib = "style.cssText"; + + if (attrib.substring(0, 2) == 'on') + value = 'return true;' + value; + + if (attrib == "class") + attrib = "className"; + + elm[attrib]=value; + } else + elm.removeAttribute(attrib); +} + +function setAllAttribs(elm) { + var f = document.forms[0]; + + setAttrib(elm, 'title'); + setAttrib(elm, 'id'); + setAttrib(elm, 'style'); + setAttrib(elm, 'class', getSelectValue(f, 'classlist')); + setAttrib(elm, 'dir'); + setAttrib(elm, 'lang'); + setAttrib(elm, 'tabindex'); + setAttrib(elm, 'accesskey'); + setAttrib(elm, 'onfocus'); + setAttrib(elm, 'onblur'); + setAttrib(elm, 'onclick'); + setAttrib(elm, 'ondblclick'); + setAttrib(elm, 'onmousedown'); + setAttrib(elm, 'onmouseup'); + setAttrib(elm, 'onmouseover'); + setAttrib(elm, 'onmousemove'); + setAttrib(elm, 'onmouseout'); + setAttrib(elm, 'onkeypress'); + setAttrib(elm, 'onkeydown'); + setAttrib(elm, 'onkeyup'); + + // Refresh in old MSIE +// if (tinyMCE.isMSIE5) +// elm.outerHTML = elm.outerHTML; +} + +function insertAttribute() { + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); +tinyMCEPopup.requireLangPack(); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/cite.js b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/cite.js new file mode 100644 index 00000000..c36f7fd8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/cite.js @@ -0,0 +1,25 @@ + /** + * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ + * + * @author Moxiecode - based on work by Andrew Tetlaw + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +function init() { + SXE.initElementDialog('cite'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertCite() { + SXE.insertElement('cite'); + tinyMCEPopup.close(); +} + +function removeCite() { + SXE.removeElement('cite'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js new file mode 100644 index 00000000..7049f2be --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js @@ -0,0 +1,60 @@ + /** + * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ + * + * @author Moxiecode - based on work by Andrew Tetlaw + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +function init() { + SXE.initElementDialog('del'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); +} + +function insertDel() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); + + tinyMCEPopup.execCommand('mceBeginUndoLevel'); + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('del'); + var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';}); + for (var i=0; i 0) { + tagName = element_name; + + if (tinymce.isIE && element_name.indexOf('html:') == 0) + element_name = element_name.substring(5).toLowerCase(); + + insertInlineElement(element_name); + var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); + for (var i=0; i -1) ? true : false; +} + +SXE.removeClass = function(elm,cl) { + if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) { + return true; + } + var classNames = elm.className.split(" "); + var newClassNames = ""; + for (var x = 0, cnl = classNames.length; x < cnl; x++) { + if (classNames[x] != cl) { + newClassNames += (classNames[x] + " "); + } + } + elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end +} + +SXE.addClass = function(elm,cl) { + if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl; + return true; +} + +function insertInlineElement(en) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + ed.getDoc().execCommand('FontName', false, 'mceinline'); + tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) { + if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') + dom.replace(dom.create(en, {_mce_new : 1}), n, 1); + }); +} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js new file mode 100644 index 00000000..4fcc9982 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js @@ -0,0 +1,59 @@ + /** + * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ + * + * @author Moxiecode - based on work by Andrew Tetlaw + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +function init() { + SXE.initElementDialog('ins'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); +} + +function insertIns() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); + tinyMCEPopup.execCommand('mceBeginUndoLevel'); + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('INS'); + var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';}); + for (var i=0; i\ - \ - \ - \ - \ - ';}return "";}function TinyMCE_zoom_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceZoom":tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom=value;tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom=value;return true;}return false;} \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/zoom/editor_plugin_src.js b/includes/tinymce/jscripts/tiny_mce/plugins/zoom/editor_plugin_src.js deleted file mode 100644 index 8131b602..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/zoom/editor_plugin_src.js +++ /dev/null @@ -1,38 +0,0 @@ -/* Import plugin specific language pack */ -//tinyMCE.importPluginLanguagePack('zoom', 'en,sv,pt,fr_ca,fr,de'); - -/** - * Returns the HTML contents of the zoom control. - */ -function TinyMCE_zoom_getControlHTML(control_name) { - if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0) - return ""; - - switch (control_name) { - case "zoom": - return ''; - } - - return ""; -} - -/** - * Executes the mceZoom command. - */ -function TinyMCE_zoom_execCommand(editor_id, element, command, user_interface, value) { - // Handle commands - switch (command) { - case "mceZoom": - tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value; - tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value; - return true; - } - - // Pass to next handler in chain - return false; -} diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/zoom/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/plugins/zoom/langs/fa.js deleted file mode 100644 index b22b8781..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/zoom/langs/fa.js +++ /dev/null @@ -1,8 +0,0 @@ -// IR lang variables -// Persian (Farsi) language pack (for IRAN) -// By: Morteza Zafari -// Lost@LostLord.com -// http://www.LostLord.com - -tinyMCELang['lang_dir'] = 'rtl'; -tinyMCELang['lang_zoom_prefix'] = 'بزرگنمایی'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/zoom/langs/fr_ca.js b/includes/tinymce/jscripts/tiny_mce/plugins/zoom/langs/fr_ca.js deleted file mode 100644 index a1dc964f..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/zoom/langs/fr_ca.js +++ /dev/null @@ -1,3 +0,0 @@ -// CA_FR lang variables - -tinyMCELang['lang_zoom_prefix'] = 'Zoom'; diff --git a/includes/tinymce/jscripts/tiny_mce/plugins/zoom/readme.txt b/includes/tinymce/jscripts/tiny_mce/plugins/zoom/readme.txt deleted file mode 100644 index 469a292e..00000000 --- a/includes/tinymce/jscripts/tiny_mce/plugins/zoom/readme.txt +++ /dev/null @@ -1,22 +0,0 @@ - Zoom plugin for TinyMCE --------------------------- - -About: - Adds a zoom drop list in MSIE5.5+, this plugin was mostly created to - show how to add custom droplists as plugins. - -Installation instructions: - * Copy the zoom directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins). - * Add plugin to TinyMCE plugin option list example: plugins : "zoom". - * Add the preview button name to button list, example: theme_advanced_buttons3_add : "zoom". - -Initialization example: - tinyMCE.init({ - theme : "advanced", - mode : "textareas", - plugins : "preview", - theme_advanced_buttons3_add : "zoom" - }); - -Requirement: - This plugin requires MSIE on Mozilla the button will not be visible. diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/about.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/about.htm new file mode 100644 index 00000000..4ef2a29c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/about.htm @@ -0,0 +1,56 @@ + + + + {#advanced_dlg.about_title} + + + + + + + +
+
+

{#advanced_dlg.about_title}

+

Version: ()

+

TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL + by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

+

Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

+

For more information about this software visit the TinyMCE website.

+ +
+ Got Moxie? + Hosted By Sourceforge + Also on freshmeat +
+
+ +
+
+

{#advanced_dlg.about_loaded}

+ +
+
+ +

 

+
+
+ +
+
+
+
+ +
+
+ +
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/anchor.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/anchor.htm index 60c73706..9e4c0b91 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/anchor.htm +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/anchor.htm @@ -1,46 +1,32 @@ - - -{$lang_insert_anchor_title} - - - - -
- - - - -
- - - - - - - - - - - -
{$lang_insert_anchor_title}
{$lang_insert_anchor_name}:
-
-
- - + + + + {#advanced_dlg.anchor_title} + + + + + +
+ + + + + + + + +
{#advanced_dlg.anchor_title}
{#advanced_dlg.anchor_name}:
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm index 8cd213c6..e4c73448 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm @@ -1,382 +1,54 @@ - - - - -{$lang_theme_charmap_title} - - - - - - - - - - - - - - - - -
{$lang_theme_charmap_title}
- - - - - - - - - -
 
 
-
- - - - - - - - - - - - - - - - -
HTML-Code
 
 
NUM-Code
 
-
- - - + + + + {#advanced_dlg.charmap_title} + + + + + + + + + + + + + + + + + +
{#advanced_dlg.charmap_title}
+ + + + + + + + + +
 
 
+
+ + + + + + + + + + + + + + + + +
HTML-Code
 
 
NUM-Code
 
+
+ + + diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm index 55a8acdb..a8f297c6 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm @@ -1,272 +1,76 @@ - - -{$lang_theme_colorpicker_title} - - - - -
- -
- - + + + + {#advanced_dlg.colorpicker_title} + + + + + + +
+ + +
+
+
+ {#advanced_dlg.colorpicker_picker_title} +
+ + +
+ +
+ +
+
+
+
+ +
+
+ {#advanced_dlg.colorpicker_palette_title} +
+ +
+ +
+
+
+ +
+
+ {#advanced_dlg.colorpicker_named_title} +
+ +
+ +
+ +
+ {#advanced_dlg.colorpicker_name} +
+
+
+
+ +
+
+ +
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/about.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/about.htm deleted file mode 100644 index 7348dd52..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/about.htm +++ /dev/null @@ -1,32 +0,0 @@ - - - -About TinyMCE - - - - - - - - - - - -
-
-TinyMCE is a small WYSIWYG editor control for web browsers such as MSIE or Mozilla -that enables you to edit HTML contents in a more user friendly way. It has common -features that are found in most word processors and should not be difficult to -use.
-
-
- - - - - - -
- - diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/common_buttons.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/common_buttons.htm deleted file mode 100644 index ea8c6c27..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/common_buttons.htm +++ /dev/null @@ -1,163 +0,0 @@ - - - -Common buttons - - - - - - - - - - - -
-
-Below is a short description about each button. -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Bold text style.
Italic text style.
Underline text style.
Strikethrough text style.
Align left.
Align center.
Align right.
Align full.
Unordered list/bullet list.
Ordered list/numbered list
Outdent/decrease indentation.
Indent/incread indentation.
Undo the last operation.
Redo the last operation.
Insert a new link, read more about this function in the Insert - link section.
Unlinks the current selection/removes all selected links.
Insert a new anchor, read more about this function in the Insert anchor section.
Insert a new image, read more about this function in the Insert - image section.
Cleanup code/Removes unwanted formating. This function is useful when - you copy contents from for example a office product.
Shows this help window.
Opens HTML source code editor.
Inserts a new 2x2 table at the current location.
Adds a row above the current one.
Adds a row under the current one.
Removes the row.
Adds a column before the current one.
Adds a column after the current one.
Removes the current column.
Inserts a new horizontal ruler
Removes formatting from the selection.
Makes the selection to be subscript.
Makes the selection to be superscripted.
-
-
- - - - - - - - diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif deleted file mode 100644 index 5b5f528d..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif deleted file mode 100644 index cdc617ea..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif deleted file mode 100644 index 7bad7583..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif deleted file mode 100644 index 6a032c5a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/index.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/index.htm deleted file mode 100644 index b7e06f28..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/index.htm +++ /dev/null @@ -1,27 +0,0 @@ - - - -Help Index - - - - - - - - - -
-
-Click the links below to go to the different help sections. - -
- - diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm deleted file mode 100644 index 1a58b641..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm +++ /dev/null @@ -1,33 +0,0 @@ - - - -Insert anchor button - - - - - - - - - - - -
-
-This button opens a new window with the insert/edit anchor function.
-
-
-
-There are one field in this window, this is where you enter the name of you anchor point. Remember the anchor name needs to be unique.
-
-
- - - - - - -
- - diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_image_button.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_image_button.htm deleted file mode 100644 index d3f24fba..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_image_button.htm +++ /dev/null @@ -1,66 +0,0 @@ - - - -Insert image button - - - - - - - - - - - -
-
-The insert image button opens the window shown below.
-
-
-
-You simply enter a URL to the image you want to link to and enter a image description, -this is then displayed as an alternative text descripton of the image on the page.
-
-Field descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Image URL URL/path to the image.
Image description Alternative description of image contents.
DimentionsImage width/height.
AlignmentImage alignment, useful when wrapping text around images.
BorderBorder thickness.
VSpaceVertical space, useful when wrapping text around images.
HSpaceHorizontal space, useful when wrapping text around images.
-
-
- - - - - - -
- - diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_link_button.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_link_button.htm deleted file mode 100644 index 2cf40c07..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_link_button.htm +++ /dev/null @@ -1,34 +0,0 @@ - - - -Insert link button - - - - - - - - - - - -
-
-This button opens a new window with the insert/edit link function.
-
-
-
-There are two fields in this window the first one "Link URL" is the -URL of the link. The target enables you to select how the link is to be opened.
-
-
- - - - - - -
- - diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_table_button.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_table_button.htm deleted file mode 100644 index f490789c..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/insert_table_button.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - -Insert table button - - - - - - - - - - - -
-
-The insert table button opens the window shown below. This action enables you to create tables.
-
-
-
-Field descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ColumnsNumber of columns in the table.
RowsNumber of rows in the new table.
CellpaddingCellpadding of the table .
CellspacingCellspacing of the table .
AlignmentTable alignment .
BorderBorder thinkness of table.
WidthWidth in pixels of table .
HeightHeight in pixels of table.
ClassStyle or CSS class of table.
-
-
-
- - - - - - -
- - diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/style.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/style.css deleted file mode 100644 index 975bc5a3..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/en/style.css +++ /dev/null @@ -1,28 +0,0 @@ -body { background-color: #FFFFFF; } -body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 12px; } -.title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; } -.subtitle { font-size: 12px; font-weight: bold; } - -.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; } -.step_ol, .step_li { margin-left: 11 px; line-height: 16px; } -img { border: #000000 solid 1px; } - -a:visited { color: #666666; text-decoration: underline; } -a:active { color: #666666; text-decoration: underline; } -a:hover { color: #666666; text-decoration: underline; } -a { color: #666666; text-decoration: underline; } - -.pageheader { border: #E0E0E0 solid 1px; } -.pagefooter { border: #E0E0E0 solid 1px; } -.sample { background-color: #FFFFFF; border: #000000 solid 1px; } -.samplecontent { font-size: 10px; } - -.code { background-color: #FFFFFF; border: #000000 solid 1px; } -.codecontent { font-size: 10px; } -.codecontent a:visited { color: #666666; text-decoration: none; font-weight: bold } -.codecontent a:active { color: #666666; text-decoration: none; font-weight: bold } -.codecontent a:hover { color: #666666; text-decoration: none; font-weight: bold } -.codecontent a { color: #666666; text-decoration: none; font-weight: bold } - -hr { height: 1px; } - diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table.gif deleted file mode 100644 index f8a00544..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_delete_col.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_delete_col.gif deleted file mode 100644 index 0b2f0fb6..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_delete_col.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_delete_row.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_delete_row.gif deleted file mode 100644 index 1997065f..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_delete_row.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_col_after.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_col_after.gif deleted file mode 100644 index c30dafab..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_col_after.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_col_before.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_col_before.gif deleted file mode 100644 index 5d1ff37a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_col_before.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_row_after.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_row_after.gif deleted file mode 100644 index c3aa15f9..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_row_after.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_row_before.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_row_before.gif deleted file mode 100644 index c3271e54..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/docs/images/table_insert_row_before.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_popup.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_popup.css deleted file mode 100644 index be47f7fc..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_popup.css +++ /dev/null @@ -1,117 +0,0 @@ -body { - background-color: #F0F0EE; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - scrollbar-3dlight-color: #F0F0EE; - scrollbar-arrow-color: #676662; - scrollbar-base-color: #F0F0EE; - scrollbar-darkshadow-color: #DDDDDD; - scrollbar-face-color: #E0E0DD; - scrollbar-highlight-color: #F0F0EE; - scrollbar-shadow-color: #F0F0EE; - scrollbar-track-color: #F5F5F5; -} - -td { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; -} - -input { - background: #FFFFFF; - border: 1px solid #cccccc; -} - -td, input, select, textarea { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; -} - -input, select, textarea { - border: 1px solid #808080; -} - -.input_noborder { - border: 0px solid #808080; -} - -#insert { - font-weight: bold; -} - -#cancel { - font-weight: bold; -} - -.title { - font-size: 12px; - font-weight: bold; -} - -table.charmap { - border-style: solid; - border-width: 1px; - border-color: #AAAAAA; -} - -td.charmap, td.charmapOver { - color: #000000; - border-color: #AAAAAA; - border-style: solid; - border-width: 1px; - text-align: center; - font-size: 12px; -} - -td.charmapOver { - background-color: #CCCCCC; - cursor: arrow; -} - -a.charmap { - color: #000000; - text-decoration: none -} - -.wordWrapCode { - vertical-align: middle; - border: 1px none #000000; - background-color: transparent; -} - -input.radio { - border: 1px none #000000; - background-color: transparent; - vertical-align: middle; -} - -input.checkbox { - border: 1px none #000000; - background-color: transparent; - vertical-align: middle; -} - -.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected { - margin-left: 1px; -} - -.mceButtonNormal { - border-top: 1px solid; - border-left: 1px solid; - border-bottom: 1px solid; - border-right: 1px solid; - border-color: #F0F0EE; - cursor: arrow; -} - -.mceButtonOver { - border: 1px solid #0A246A; - cursor: arrow; - background-color: #B6BDD2; -} - -.mceButtonDown { - cursor: arrow; - border: 1px solid #0A246A; - background-color: #8592B5; -} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js index 8026ff0a..d72d5425 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js @@ -1,23 +1 @@ -/* Import theme specific language pack */ - tinyMCE.importThemeLanguagePack();var TinyMCE_advanced_autoImportCSSClasses=true;var TinyMCE_advanced_foreColor="#000000";var TinyMCE_advanced_anchorName="";var TinyMCE_advanced_buttons=[['bold','{$lang_bold_img}','{$lang_bold_desc}','Bold'],['italic','{$lang_italic_img}','{$lang_italic_desc}','Italic'],['underline','{$lang_underline_img}','{$lang_underline_desc}','Underline'],['strikethrough','strikethrough.gif','{$lang_striketrough_desc}','Strikethrough'],['justifyleft','left.gif','{$lang_justifyleft_desc}','JustifyLeft'],['justifycenter','center.gif','{$lang_justifycenter_desc}','JustifyCenter'],['justifyright','right.gif','{$lang_justifyright_desc}','JustifyRight'],['justifyfull','full.gif','{$lang_justifyfull_desc}','JustifyFull'],['bullist','bullist.gif','{$lang_bullist_desc}','InsertUnorderedList'],['numlist','numlist.gif','{$lang_numlist_desc}','InsertOrderedList'],['outdent','outdent.gif','{$lang_outdent_desc}','Outdent'],['indent','indent.gif','{$lang_indent_desc}','Indent'],['cut','cut.gif','{$lang_cut_desc}','Cut'],['copy','copy.gif','{$lang_copy_desc}','Copy'],['paste','paste.gif','{$lang_paste_desc}','Paste'],['undo','undo.gif','{$lang_undo_desc}','Undo'],['redo','redo.gif','{$lang_redo_desc}','Redo'],['link','link.gif','{$lang_link_desc}','mceLink',true],['unlink','unlink.gif','{$lang_unlink_desc}','unlink'],['image','image.gif','{$lang_image_desc}','mceImage',true],['cleanup','cleanup.gif','{$lang_cleanup_desc}','mceCleanup'],['help','help.gif','{$lang_help_desc}','mceHelp'],['code','code.gif','{$lang_theme_code_desc}','mceCodeEditor'],['hr','hr.gif','{$lang_theme_hr_desc}','inserthorizontalrule'],['removeformat','removeformat.gif','{$lang_theme_removeformat_desc}','removeformat'],['sub','sub.gif','{$lang_theme_sub_desc}','subscript'],['sup','sup.gif','{$lang_theme_sup_desc}','superscript'],['forecolor','forecolor.gif','{$lang_theme_forecolor_desc}','mceForeColor',true],['backcolor','backcolor.gif','{$lang_theme_backcolor_desc}','mceBackColor',true],['charmap','charmap.gif','{$lang_theme_charmap_desc}','mceCharMap'],['visualaid','visualaid.gif','{$lang_theme_visualaid_desc}','mceToggleVisualAid'],['anchor','anchor.gif','{$lang_theme_anchor_desc}','mceInsertAnchor']];function TinyMCE_advanced_getControlHTML(button_name){var buttonTileMap=new Array('anchor.gif','backcolor.gif','bullist.gif','center.gif','charmap.gif','cleanup.gif','code.gif','copy.gif','custom_1.gif','cut.gif','forecolor.gif','full.gif','help.gif','hr.gif','image.gif','indent.gif','left.gif','link.gif','numlist.gif','outdent.gif','paste.gif','redo.gif','removeformat.gif','right.gif','strikethrough.gif','sub.gif','sup.gif','undo.gif','unlink.gif','visualaid.gif');for(var i=0;i';}return '';}}switch(button_name){case "formatselect":var html='';return html;case "styleselect":return '';case "fontselect":return '';case "fontsizeselect":return '';case "|":case "separator":return '';case "spacer":return '';case "rowseparator":return '
';}return "";}function TinyMCE_advanced_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceForeColor":var template=new Array();var inputColor=TinyMCE_advanced_foreColor;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=210;template['height']=200;tinyMCE.openWindow(template,{editor_id:editor_id,command:"forecolor",input_color:inputColor});return true;case "mceBackColor":var template=new Array();var inputColor=TinyMCE_advanced_foreColor;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=210;template['height']=200;tinyMCE.openWindow(template,{editor_id:editor_id,command:"HiliteColor",input_color:inputColor});return true;case "mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=tinyMCE.getParam("theme_advanced_source_editor_width",500);template['height']=tinyMCE.getParam("theme_advanced_source_editor_height",400);tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no"});return true;case "mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550;template['height']=280;tinyMCE.openWindow(template,{editor_id:editor_id});return true;case "mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=130;tinyMCE.openWindow(template,{editor_id:editor_id,name:TinyMCE_advanced_anchorName,action:(TinyMCE_advanced_anchorName==""?"insert":"update")});return true;}return false;}function TinyMCE_advanced_getEditorTemplate(settings){function removeFromArray(in_array,remove_array){var outArray=new Array();for(var i=0;i0){toolbarHTML+="
";deltaHeight-=23;}var buttonNamesRow2=tinyMCE.getParam("theme_advanced_buttons2","bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",true,',');buttonNamesRow2=removeFromArray(buttonNamesRow2,tinyMCE.getParam("theme_advanced_disable","",true,','));buttonNamesRow2=addToArray(buttonNamesRow2,tinyMCE.getParam("theme_advanced_buttons2_add","",true,','));buttonNamesRow2=addToArray(tinyMCE.getParam("theme_advanced_buttons2_add_before","",true,','),buttonNamesRow2);for(var i=0;i0){toolbarHTML+="
";deltaHeight-=23;}var buttonNamesRow3=tinyMCE.getParam("theme_advanced_buttons3","hr,removeformat,visualaid,separator,sub,sup,separator,charmap",true,',');buttonNamesRow3=removeFromArray(buttonNamesRow3,tinyMCE.getParam("theme_advanced_disable","",true,','));buttonNamesRow3=addToArray(buttonNamesRow3,tinyMCE.getParam("theme_advanced_buttons3_add","",true,','));buttonNamesRow3=addToArray(tinyMCE.getParam("theme_advanced_buttons3_add_before","",true,','),buttonNamesRow3);for(var i=0;i0)deltaHeight-=20;template['html']='';if(toolbarLocation=="top")template['html']+='';if(pathLocation=="top"){template['html']+='';deltaHeight-=23;}template['html']+='';if(toolbarLocation=="bottom")template['html']+='';if(pathLocation=="bottom"){template['html']+='';deltaHeight-=23;}template['html']+='
'+toolbarHTML+'
'+pathHTML+'
\ - \ -
'+toolbarHTML+'
'+pathHTML+'
';break;case "RowLayout":template['html']='';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i';}else if(containers[i]=="mceElementpath"){var pathClass="mcePath";if(i==containers.length-1)pathClass="mcePathBottom";else if(i==0)pathClass="mcePathTop";else deltaHeight-=2;template['html']+='';deltaHeight-=22;}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);for(var j=0;j0){curContainerHTML+="
";deltaHeight-=23;}template['html']+='
';}}template['html']+='
\ - \ -
'+pathHTML+'
'+curContainerHTML+'
';break;case "BorderLayout":break;case "CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined")template=eval(customLayout+"(template);");break;default:alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!');break;}var styleSelectHTML='';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i'+key+'';}TinyMCE_advanced_autoImportCSSClasses=false;}template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template;}function TinyMCE_advanced_getInsertLinkTemplate(){var template=new Array();template['file']='link.htm';template['width']=320;template['height']=170;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);return template;}function TinyMCE_advanced_getInsertImageTemplate(){var template=new Array();template['file']='image.htm?src={$src}';template['width']=340;template['height']=280;template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);return template;}function TinyMCE_advanced_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function selectByValue(select_elm,value){if(select_elm){for(var i=0;i=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName=="b")nodeName="strong";if(nodeName=="i")nodeName="em";if(getAttrib(path[i],'id')!="")nodeData+="id: "+path[i].getAttribute('id')+" ";if(getAttrib(path[i],'class')!="")nodeData+="class: "+path[i].getAttribute('class')+" ";if(getAttrib(path[i],'className')!="")nodeData+="class: "+path[i].getAttribute('className')+" ";if(getAttrib(path[i],'src')!="")nodeData+="src: "+path[i].getAttribute('src')+" ";if(getAttrib(path[i],'href')!="")nodeData+="href: "+path[i].getAttribute('href')+" ";if(nodeName=="img"&&getAttrib(path[i],'name')=="mce_plugin_flash"){nodeName="flash";nodeData="";}if(tinyMCE.isMSIE)html+=''+nodeName+'';else html+=''+nodeName+'';if(i>0)html+=" » ";}pathElm.innerHTML=html+" ";}var colorElm=tinyMCE.getParentElement(node,"font","color");if(colorElm)TinyMCE_advanced_foreColor=""+colorElm.color.toUpperCase();tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_link','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_unlink','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_image','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonNormal');var anchorName=tinyMCE.getParentElement(node,"a","name");TinyMCE_advanced_anchorName="";if(anchorName){TinyMCE_advanced_anchorName=anchorName.getAttribute("name");tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonSelected');}var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClassSticky(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal',false);}tinyMCE.switchClassSticky(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal',false);if(undo_levels!=-1){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonDisabled',true);}if(tinyMCE.getParentElement(node,"li,blockquote"))tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonNormal',false);if(undo_index!=-1&&(undo_index0))tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonNormal',false);if(undo_index!=-1&&(undo_index>0&&undo_levels>0))tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonNormal',false);var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_advanced_setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i");}else selectByValue(selectElm,"

");}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"font","face");if(elm)selectByValue(selectElm,elm.getAttribute("face"));else selectByValue(selectElm,"");}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"font","size");if(elm&&getAttrib(elm,"size")!="")selectByValue(selectElm,elm.getAttribute("size"));else selectByValue(selectElm,"0");}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align'))continue;switch(alignNode.getAttribute('align').toLowerCase()){case "left":tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case "right":tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case "middle":case "center":tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case "justify":tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break;}}while(!breakOut&&(alignNode=alignNode.parentNode));do{switch(node.nodeName.toLowerCase()){case "b":case "strong":tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonSelected');break;case "i":case "em":tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonSelected');break;case "u":tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonSelected');break;case "strike":tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonSelected');break;case "ul":tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonSelected');break;case "ol":tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonSelected');break;case "sub":tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonSelected');break;case "sup":tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonSelected');break;case "hr":tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonSelected');break;case "img":if(getAttrib(node,'name').indexOf('mce_')!=0)tinyMCE.switchClassSticky(editor_id+'_image','mceButtonSelected');break;}}while((node=node.parentNode));}function TinyMCE_advanced_setupCSSClasses(editor_id){if(!TinyMCE_advanced_autoImportCSSClasses)return;var selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(var i=0;i0)selectElm.setAttribute('cssImported','true');}} \ No newline at end of file +(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,each=tinymce.each,Cookie=tinymce.util.Cookie,lastExtID,explode=tinymce.explode;tinymce.ThemeManager.requireLangPack('advanced');tinymce.create('tinymce.themes.AdvancedTheme',{sizes:[8,10,12,14,18,24,36],controls:{bold:['bold_desc','Bold'],italic:['italic_desc','Italic'],underline:['underline_desc','Underline'],strikethrough:['striketrough_desc','Strikethrough'],justifyleft:['justifyleft_desc','JustifyLeft'],justifycenter:['justifycenter_desc','JustifyCenter'],justifyright:['justifyright_desc','JustifyRight'],justifyfull:['justifyfull_desc','JustifyFull'],bullist:['bullist_desc','InsertUnorderedList'],numlist:['numlist_desc','InsertOrderedList'],outdent:['outdent_desc','Outdent'],indent:['indent_desc','Indent'],cut:['cut_desc','Cut'],copy:['copy_desc','Copy'],paste:['paste_desc','Paste'],undo:['undo_desc','Undo'],redo:['redo_desc','Redo'],link:['link_desc','mceLink'],unlink:['unlink_desc','unlink'],image:['image_desc','mceImage'],cleanup:['cleanup_desc','mceCleanup'],help:['help_desc','mceHelp'],code:['code_desc','mceCodeEditor'],hr:['hr_desc','InsertHorizontalRule'],removeformat:['removeformat_desc','RemoveFormat'],sub:['sub_desc','subscript'],sup:['sup_desc','superscript'],forecolor:['forecolor_desc','ForeColor'],forecolorpicker:['forecolor_desc','mceForeColor'],backcolor:['backcolor_desc','HiliteColor'],backcolorpicker:['backcolor_desc','mceBackColor'],charmap:['charmap_desc','mceCharMap'],visualaid:['visualaid_desc','mceToggleVisualAid'],anchor:['anchor_desc','mceInsertAnchor'],newdocument:['newdocument_desc','mceNewDocument'],blockquote:['blockquote_desc','mceBlockQuote']},stateControls:['bold','italic','underline','strikethrough','bullist','numlist','justifyleft','justifycenter','justifyright','justifyfull','sub','sup','blockquote'],init:function(ed,url){var t=this,s,v,o;t.editor=ed;t.url=url;t.onResolveName=new tinymce.util.Dispatcher(this);t.settings=s=extend({theme_advanced_path:true,theme_advanced_toolbar_location:'bottom',theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:ed.settings.readonly},ed.settings);if(!s.font_size_style_values)s.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt";if(tinymce.is(s.theme_advanced_font_sizes,'string')){s.font_size_style_values=tinymce.explode(s.font_size_style_values);s.font_size_classes=tinymce.explode(s.font_size_classes||'');o={};ed.settings.theme_advanced_font_sizes=s.theme_advanced_font_sizes;each(ed.getParam('theme_advanced_font_sizes','','hash'),function(v,k){var cl;if(k==v&&v>=1&&v<=7){k=v+' ('+t.sizes[v-1]+'pt)';if(ed.settings.convert_fonts_to_spans){cl=s.font_size_classes[v-1];v=s.font_size_style_values[v-1]||(t.sizes[v-1]+'pt');}}if(/\s*\./.test(v))cl=v.replace(/\./g,'');o[k]=cl?{'class':cl}:{fontSize:v};});s.theme_advanced_font_sizes=o;}if((v=s.theme_advanced_path_location)&&v!='none')s.theme_advanced_statusbar_location=s.theme_advanced_path_location;if(s.theme_advanced_statusbar_location=='none')s.theme_advanced_statusbar_location=0;ed.onInit.add(function(){ed.onNodeChange.add(t._nodeChanged,t);if(ed.settings.content_css!==false)ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/"+ed.settings.skin+"/content.css"));});ed.onSetProgressState.add(function(ed,b,ti){var co,id=ed.id,tb;if(b){t.progressTimer=setTimeout(function(){co=ed.getContainer();co=co.insertBefore(DOM.create('DIV',{style:'position:relative'}),co.firstChild);tb=DOM.get(ed.id+'_tbl');DOM.add(co,'div',{id:id+'_blocker','class':'mceBlocker',style:{width:tb.clientWidth+2,height:tb.clientHeight+2}});DOM.add(co,'div',{id:id+'_progress','class':'mceProgress',style:{left:tb.clientWidth/ 2, top : tb.clientHeight /2}});},ti||0);}else{DOM.remove(id+'_blocker');DOM.remove(id+'_progress');clearTimeout(t.progressTimer);}});DOM.loadCSS(s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):url+"/skins/"+ed.settings.skin+"/ui.css");if(s.skin_variant)DOM.loadCSS(url+"/skins/"+ed.settings.skin+"/ui_"+s.skin_variant+".css");},createControl:function(n,cf){var cd,c;if(c=cf.createControl(n))return c;switch(n){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu();}if((cd=this.controls[n]))return cf.createButton(n,{title:"advanced."+cd[0],cmd:cd[1],ui:cd[2],value:cd[3]});},execCommand:function(cmd,ui,val){var f=this['_'+cmd];if(f){f.call(this,ui,val);return true;}return false;},_importClasses:function(e){var ed=this.editor,c=ed.controlManager.get('styleselect');if(c.getLength()==0){each(ed.dom.getClasses(),function(o){c.add(o['class'],o['class']);});}},_createStyleSelect:function(n){var t=this,ed=t.editor,cf=ed.controlManager,c=cf.createListBox('styleselect',{title:'advanced.style_select',onselect:function(v){if(c.selectedValue===v){ed.execCommand('mceSetStyleInfo',0,{command:'removeformat'});c.select();return false;}else ed.execCommand('mceSetCSSClass',0,v);}});if(c){each(ed.getParam('theme_advanced_styles','','hash'),function(v,k){if(v)c.add(t.editor.translate(k),v);});c.onPostRender.add(function(ed,n){if(!c.NativeListBox){Event.add(n.id+'_text','focus',t._importClasses,t);Event.add(n.id+'_text','mousedown',t._importClasses,t);Event.add(n.id+'_open','focus',t._importClasses,t);Event.add(n.id+'_open','mousedown',t._importClasses,t);}else Event.add(n.id,'focus',t._importClasses,t);});}return c;},_createFontSelect:function(){var c,t=this,ed=t.editor;c=ed.controlManager.createListBox('fontselect',{title:'advanced.fontdefault',cmd:'FontName'});if(c){each(ed.getParam('theme_advanced_fonts',t.settings.theme_advanced_fonts,'hash'),function(v,k){c.add(ed.translate(k),v,{style:v.indexOf('dings')==-1?'font-family:'+v:''});});}return c;},_createFontSizeSelect:function(){var t=this,ed=t.editor,c,i=0,cl=[];c=ed.controlManager.createListBox('fontsizeselect',{title:'advanced.font_size',onselect:function(v){if(v.fontSize)ed.execCommand('FontSize',false,v.fontSize);else{each(t.settings.theme_advanced_font_sizes,function(v,k){if(v['class'])cl.push(v['class']);});ed.editorCommands._applyInlineStyle('span',{'class':v['class']},{check_classes:cl});}}});if(c){each(t.settings.theme_advanced_font_sizes,function(v,k){var fz=v.fontSize;if(fz>=1&&fz<=7)fz=t.sizes[parseInt(fz)-1]+'pt';c.add(k,v,{'style':'font-size:'+fz,'class':'mceFontSize'+(i++)+(' '+(v['class']||''))});});}return c;},_createBlockFormats:function(){var c,fmts={p:'advanced.paragraph',address:'advanced.address',pre:'advanced.pre',h1:'advanced.h1',h2:'advanced.h2',h3:'advanced.h3',h4:'advanced.h4',h5:'advanced.h5',h6:'advanced.h6',div:'advanced.div',blockquote:'advanced.blockquote',code:'advanced.code',dt:'advanced.dt',dd:'advanced.dd',samp:'advanced.samp'},t=this;c=t.editor.controlManager.createListBox('formatselect',{title:'advanced.block',cmd:'FormatBlock'});if(c){each(t.editor.getParam('theme_advanced_blockformats',t.settings.theme_advanced_blockformats,'hash'),function(v,k){c.add(t.editor.translate(k!=v?k:fmts[v]),v,{'class':'mce_formatPreview mce_'+v});});}return c;},_createForeColorMenu:function(){var c,t=this,s=t.settings,o={},v;if(s.theme_advanced_more_colors){o.more_colors_func=function(){t._mceColorPicker(0,{color:c.value,func:function(co){c.setColor(co);}});};}if(v=s.theme_advanced_text_colors)o.colors=v;if(s.theme_advanced_default_foreground_color)o.default_color=s.theme_advanced_default_foreground_color;o.title='advanced.forecolor_desc';o.cmd='ForeColor';o.scope=this;c=t.editor.controlManager.createColorSplitButton('forecolor',o);return c;},_createBackColorMenu:function(){var c,t=this,s=t.settings,o={},v;if(s.theme_advanced_more_colors){o.more_colors_func=function(){t._mceColorPicker(0,{color:c.value,func:function(co){c.setColor(co);}});};}if(v=s.theme_advanced_background_colors)o.colors=v;if(s.theme_advanced_default_background_color)o.default_color=s.theme_advanced_default_background_color;o.title='advanced.backcolor_desc';o.cmd='HiliteColor';o.scope=this;c=t.editor.controlManager.createColorSplitButton('backcolor',o);return c;},renderUI:function(o){var n,ic,tb,t=this,ed=t.editor,s=t.settings,sc,p,nl;n=p=DOM.create('span',{id:ed.id+'_parent','class':'mceEditor '+ed.settings.skin+'Skin'+(s.skin_variant?' '+ed.settings.skin+'Skin'+t._ufirst(s.skin_variant):'')});if(!DOM.boxModel)n=DOM.add(n,'div',{'class':'mceOldBoxModel'});n=sc=DOM.add(n,'table',{id:ed.id+'_tbl','class':'mceLayout',cellSpacing:0,cellPadding:0});n=tb=DOM.add(n,'tbody');switch((s.theme_advanced_layout_manager||'').toLowerCase()){case"rowlayout":ic=t._rowLayout(s,tb,o);break;case"customlayout":ic=ed.execCallback("theme_advanced_custom_layout",s,tb,o,p);break;default:ic=t._simpleLayout(s,tb,o,p);}n=o.targetNode;nl=DOM.stdMode?sc.getElementsByTagName('tr'):sc.rows;DOM.addClass(nl[0],'mceFirst');DOM.addClass(nl[nl.length-1],'mceLast');each(DOM.select('tr',tb),function(n){DOM.addClass(n.firstChild,'mceFirst');DOM.addClass(n.childNodes[n.childNodes.length-1],'mceLast');});if(DOM.get(s.theme_advanced_toolbar_container))DOM.get(s.theme_advanced_toolbar_container).appendChild(p);else DOM.insertAfter(p,n);Event.add(ed.id+'_path_row','click',function(e){e=e.target;if(e.nodeName=='A'){t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/,'$1'));return Event.cancel(e);}});if(!ed.getParam('accessibility_focus')||ed.getParam('tab_focus'))Event.add(DOM.add(p,'a',{href:'#'},''),'focus',function(){tinyMCE.get(ed.id).focus();});if(s.theme_advanced_toolbar_location=='external')o.deltaHeight=0;t.deltaHeight=o.deltaHeight;o.targetNode=null;return{iframeContainer:ic,editorContainer:ed.id+'_parent',sizeContainer:sc,deltaHeight:o.deltaHeight};},getInfo:function(){return{longname:'Advanced theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}},resizeBy:function(dw,dh){var e=DOM.get(this.editor.id+'_tbl');this.resizeTo(e.clientWidth+dw,e.clientHeight+dh);},resizeTo:function(w,h){var ed=this.editor,s=ed.settings,e=DOM.get(ed.id+'_tbl'),ifr=DOM.get(ed.id+'_ifr'),dh;w=Math.max(s.theme_advanced_resizing_min_width||100,w);h=Math.max(s.theme_advanced_resizing_min_height||100,h);w=Math.min(s.theme_advanced_resizing_max_width||0xFFFF,w);h=Math.min(s.theme_advanced_resizing_max_height||0xFFFF,h);dh=e.clientHeight-ifr.clientHeight;DOM.setStyle(ifr,'height',h-dh);DOM.setStyles(e,{width:w,height:h});},destroy:function(){var id=this.editor.id;Event.clear(id+'_resize');Event.clear(id+'_path_row');Event.clear(id+'_external_close');},_simpleLayout:function(s,tb,o,p){var t=this,ed=t.editor,lo=s.theme_advanced_toolbar_location,sl=s.theme_advanced_statusbar_location,n,ic,etb,c;if(s.readonly){n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});return ic;}if(lo=='top')t._addToolbars(tb,o);if(lo=='external'){n=c=DOM.create('div',{style:'position:relative'});n=DOM.add(n,'div',{id:ed.id+'_external','class':'mceExternalToolbar'});DOM.add(n,'a',{id:ed.id+'_external_close',href:'javascript:;','class':'mceExternalClose'});n=DOM.add(n,'table',{id:ed.id+'_tblext',cellSpacing:0,cellPadding:0});etb=DOM.add(n,'tbody');if(p.firstChild.className=='mceOldBoxModel')p.firstChild.appendChild(c);else p.insertBefore(c,p.firstChild);t._addToolbars(etb,o);ed.onMouseUp.add(function(){var e=DOM.get(ed.id+'_external');DOM.show(e);DOM.hide(lastExtID);var f=Event.add(ed.id+'_external_close','click',function(){DOM.hide(ed.id+'_external');Event.remove(ed.id+'_external_close','click',f);});DOM.show(e);DOM.setStyle(e,'top',0-DOM.getRect(ed.id+'_tblext').h-1);DOM.hide(e);DOM.show(e);e.style.filter='';lastExtID=ed.id+'_external';e=null;});}if(sl=='top')t._addStatusBar(tb,o);if(!s.theme_advanced_toolbar_container){n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});}if(lo=='bottom')t._addToolbars(tb,o);if(sl=='bottom')t._addStatusBar(tb,o);return ic;},_rowLayout:function(s,tb,o){var t=this,ed=t.editor,dc,da,cf=ed.controlManager,n,ic,to,a;dc=s.theme_advanced_containers_default_class||'';da=s.theme_advanced_containers_default_align||'center';each(explode(s.theme_advanced_containers||''),function(c,i){var v=s['theme_advanced_container_'+c]||'';switch(v.toLowerCase()){case'mceeditor':n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});break;case'mceelementpath':t._addStatusBar(tb,o);break;default:a=(s['theme_advanced_container_'+c+'_align']||da).toLowerCase();a='mce'+t._ufirst(a);n=DOM.add(DOM.add(tb,'tr'),'td',{'class':'mceToolbar '+(s['theme_advanced_container_'+c+'_class']||dc)+' '+a||da});to=cf.createToolbar("toolbar"+i);t._addControls(v,to);DOM.setHTML(n,to.renderHTML());o.deltaHeight-=s.theme_advanced_row_height;}});return ic;},_addControls:function(v,tb){var t=this,s=t.settings,di,cf=t.editor.controlManager;if(s.theme_advanced_disable&&!t._disabled){di={};each(explode(s.theme_advanced_disable),function(v){di[v]=1;});t._disabled=di;}else di=t._disabled;each(explode(v),function(n){var c;if(di&&di[n])return;if(n=='tablecontrols'){each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(n){n=t.createControl(n,cf);if(n)tb.add(n);});return;}c=t.createControl(n,cf);if(c)tb.add(c);});},_addToolbars:function(c,o){var t=this,i,tb,ed=t.editor,s=t.settings,v,cf=ed.controlManager,di,n,h=[],a;a=s.theme_advanced_toolbar_align.toLowerCase();a='mce'+t._ufirst(a);n=DOM.add(DOM.add(c,'tr'),'td',{'class':'mceToolbar '+a});if(!ed.getParam('accessibility_focus')||ed.getParam('tab_focus'))h.push(DOM.createHTML('a',{href:'#',onfocus:'tinyMCE.get(\''+ed.id+'\').focus();'},''));h.push(DOM.createHTML('a',{href:'#',accesskey:'q',title:ed.getLang("advanced.toolbar_focus")},''));for(i=1;(v=s['theme_advanced_buttons'+i]);i++){tb=cf.createToolbar("toolbar"+i,{'class':'mceToolbarRow'+i});if(s['theme_advanced_buttons'+i+'_add'])v+=','+s['theme_advanced_buttons'+i+'_add'];if(s['theme_advanced_buttons'+i+'_add_before'])v=s['theme_advanced_buttons'+i+'_add_before']+','+v;t._addControls(v,tb);h.push(tb.renderHTML());o.deltaHeight-=s.theme_advanced_row_height;}h.push(DOM.createHTML('a',{href:'#',accesskey:'z',title:ed.getLang("advanced.toolbar_focus"),onfocus:'tinyMCE.getInstanceById(\''+ed.id+'\').focus();'},''));DOM.setHTML(n,h.join(''));},_addStatusBar:function(tb,o){var n,t=this,ed=t.editor,s=t.settings,r,mf,me,td;n=DOM.add(tb,'tr');n=td=DOM.add(n,'td',{'class':'mceStatusbar'});n=DOM.add(n,'div',{id:ed.id+'_path_row'},s.theme_advanced_path?ed.translate('advanced.path')+': ':' ');DOM.add(n,'a',{href:'#',accesskey:'x'});if(s.theme_advanced_resizing&&!tinymce.isOldWebKit){DOM.add(td,'a',{id:ed.id+'_resize',href:'javascript:;',onclick:"return false;",'class':'mceResize'});if(s.theme_advanced_resizing_use_cookie){ed.onPostRender.add(function(){var o=Cookie.getHash("TinyMCE_"+ed.id+"_size"),c=DOM.get(ed.id+'_tbl');if(!o)return;if(s.theme_advanced_resize_horizontal)c.style.width=Math.max(10,o.cw)+'px';c.style.height=Math.max(10,o.ch)+'px';DOM.get(ed.id+'_ifr').style.height=Math.max(10,parseInt(o.ch)+t.deltaHeight)+'px';});}ed.onPostRender.add(function(){Event.add(ed.id+'_resize','mousedown',function(e){var c,p,w,h,n,pa;c=DOM.get(ed.id+'_tbl');w=c.clientWidth;h=c.clientHeight;miw=s.theme_advanced_resizing_min_width||100;mih=s.theme_advanced_resizing_min_height||100;maw=s.theme_advanced_resizing_max_width||0xFFFF;mah=s.theme_advanced_resizing_max_height||0xFFFF;p=DOM.add(DOM.get(ed.id+'_parent'),'div',{'class':'mcePlaceHolder'});DOM.setStyles(p,{width:w,height:h});DOM.hide(c);DOM.show(p);r={x:e.screenX,y:e.screenY,w:w,h:h,dx:null,dy:null};mf=Event.add(DOM.doc,'mousemove',function(e){var w,h;r.dx=e.screenX-r.x;r.dy=e.screenY-r.y;w=Math.max(miw,r.w+r.dx);h=Math.max(mih,r.h+r.dy);w=Math.min(maw,w);h=Math.min(mah,h);if(s.theme_advanced_resize_horizontal)p.style.width=w+'px';p.style.height=h+'px';return Event.cancel(e);});me=Event.add(DOM.doc,'mouseup',function(e){var ifr;Event.remove(DOM.doc,'mousemove',mf);Event.remove(DOM.doc,'mouseup',me);c.style.display='';DOM.remove(p);if(r.dx===null)return;ifr=DOM.get(ed.id+'_ifr');if(s.theme_advanced_resize_horizontal)c.style.width=Math.max(10,r.w+r.dx)+'px';c.style.height=Math.max(10,r.h+r.dy)+'px';ifr.style.height=Math.max(10,ifr.clientHeight+r.dy)+'px';if(s.theme_advanced_resizing_use_cookie){Cookie.setHash("TinyMCE_"+ed.id+"_size",{cw:r.w+r.dx,ch:r.h+r.dy});}});return Event.cancel(e);});});}o.deltaHeight-=21;n=tb=null;},_nodeChanged:function(ed,cm,n,co){var t=this,p,de=0,v,c,s=t.settings,cl,fz,fn;if(s.readonly)return;tinymce.each(t.stateControls,function(c){cm.setActive(c,ed.queryCommandState(t.controls[c][1]));});cm.setActive('visualaid',ed.hasVisual);cm.setDisabled('undo',!ed.undoManager.hasUndo()&&!ed.typing);cm.setDisabled('redo',!ed.undoManager.hasRedo());cm.setDisabled('outdent',!ed.queryCommandState('Outdent'));p=DOM.getParent(n,'A');if(c=cm.get('link')){if(!p||!p.name){c.setDisabled(!p&&co);c.setActive(!!p);}}if(c=cm.get('unlink')){c.setDisabled(!p&&co);c.setActive(!!p&&!p.name);}if(c=cm.get('anchor')){c.setActive(!!p&&p.name);if(tinymce.isWebKit){p=DOM.getParent(n,'IMG');c.setActive(!!p&&DOM.getAttrib(p,'mce_name')=='a');}}p=DOM.getParent(n,'IMG');if(c=cm.get('image'))c.setActive(!!p&&n.className.indexOf('mceItem')==-1);if(c=cm.get('styleselect')){if(n.className){t._importClasses();c.select(n.className);}else c.select();}if(c=cm.get('formatselect')){p=DOM.getParent(n,DOM.isBlock);if(p)c.select(p.nodeName.toLowerCase());}if(ed.settings.convert_fonts_to_spans){ed.dom.getParent(n,function(n){if(n.nodeName==='SPAN'){if(!cl&&n.className)cl=n.className;if(!fz&&n.style.fontSize)fz=n.style.fontSize;if(!fn&&n.style.fontFamily)fn=n.style.fontFamily.replace(/[\"\']+/g,'').replace(/^([^,]+).*/,'$1').toLowerCase();}return false;});if(c=cm.get('fontselect')){c.select(function(v){return v.replace(/^([^,]+).*/,'$1').toLowerCase()==fn;});}if(c=cm.get('fontsizeselect')){c.select(function(v){if(v.fontSize&&v.fontSize===fz)return true;if(v['class']&&v['class']===cl)return true;});}}else{if(c=cm.get('fontselect'))c.select(ed.queryCommandValue('FontName'));if(c=cm.get('fontsizeselect')){v=ed.queryCommandValue('FontSize');c.select(function(iv){return iv.fontSize==v;});}}if(s.theme_advanced_path&&s.theme_advanced_statusbar_location){p=DOM.get(ed.id+'_path')||DOM.add(ed.id+'_path_row','span',{id:ed.id+'_path'});DOM.setHTML(p,'');ed.dom.getParent(n,function(n){var na=n.nodeName.toLowerCase(),u,pi,ti='';if(n.nodeType!=1||n.nodeName==='BR'||(DOM.hasClass(n,'mceItemHidden')||DOM.hasClass(n,'mceItemRemoved')))return;if(v=DOM.getAttrib(n,'mce_name'))na=v;if(tinymce.isIE&&n.scopeName!=='HTML')na=n.scopeName+':'+na;na=na.replace(/mce\:/g,'');switch(na){case'b':na='strong';break;case'i':na='em';break;case'img':if(v=DOM.getAttrib(n,'src'))ti+='src: '+v+' ';break;case'a':if(v=DOM.getAttrib(n,'name')){ti+='name: '+v+' ';na+='#'+v;}if(v=DOM.getAttrib(n,'href'))ti+='href: '+v+' ';break;case'font':if(s.convert_fonts_to_spans)na='span';if(v=DOM.getAttrib(n,'face'))ti+='font: '+v+' ';if(v=DOM.getAttrib(n,'size'))ti+='size: '+v+' ';if(v=DOM.getAttrib(n,'color'))ti+='color: '+v+' ';break;case'span':if(v=DOM.getAttrib(n,'style'))ti+='style: '+v+' ';break;}if(v=DOM.getAttrib(n,'id'))ti+='id: '+v+' ';if(v=n.className){v=v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g,'');if(v&&v.indexOf('mceItem')==-1){ti+='class: '+v+' ';if(DOM.isBlock(n)||na=='img'||na=='span')na+='.'+v;}}na=na.replace(/(html:)/g,'');na={name:na,node:n,title:ti};t.onResolveName.dispatch(t,na);ti=na.title;na=na.name;pi=DOM.create('a',{'href':"javascript:;",onmousedown:"return false;",title:ti,'class':'mcePath_'+(de++)},na);if(p.hasChildNodes()){p.insertBefore(DOM.doc.createTextNode(' \u00bb '),p.firstChild);p.insertBefore(pi,p.firstChild);}else p.appendChild(pi);},ed.getBody());}},_sel:function(v){this.editor.execCommand('mceSelectNodeDepth',false,v);},_mceInsertAnchor:function(ui,v){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/anchor.htm',width:320+parseInt(ed.getLang('advanced.anchor_delta_width',0)),height:90+parseInt(ed.getLang('advanced.anchor_delta_height',0)),inline:true},{theme_url:this.url});},_mceCharMap:function(){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/charmap.htm',width:550+parseInt(ed.getLang('advanced.charmap_delta_width',0)),height:250+parseInt(ed.getLang('advanced.charmap_delta_height',0)),inline:true},{theme_url:this.url});},_mceHelp:function(){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/about.htm',width:480,height:380,inline:true},{theme_url:this.url});},_mceColorPicker:function(u,v){var ed=this.editor;v=v||{};ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/color_picker.htm',width:375+parseInt(ed.getLang('advanced.colorpicker_delta_width',0)),height:250+parseInt(ed.getLang('advanced.colorpicker_delta_height',0)),close_previous:false,inline:true},{input_color:v.color,func:v.func,theme_url:this.url});},_mceCodeEditor:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/source_editor.htm',width:parseInt(ed.getParam("theme_advanced_source_editor_width",720)),height:parseInt(ed.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url});},_mceImage:function(ui,val){var ed=this.editor;if(ed.dom.getAttrib(ed.selection.getNode(),'class').indexOf('mceItem')!=-1)return;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/image.htm',width:355+parseInt(ed.getLang('advanced.image_delta_width',0)),height:275+parseInt(ed.getLang('advanced.image_delta_height',0)),inline:true},{theme_url:this.url});},_mceLink:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/link.htm',width:310+parseInt(ed.getLang('advanced.link_delta_width',0)),height:200+parseInt(ed.getLang('advanced.link_delta_height',0)),inline:true},{theme_url:this.url});},_mceNewDocument:function(){var ed=this.editor;ed.windowManager.confirm('advanced.newdocument',function(s){if(s)ed.execCommand('mceSetContent',false,'');});},_mceForeColor:function(){var t=this;this._mceColorPicker(0,{color:t.fgColor,func:function(co){t.fgColor=co;t.editor.execCommand('ForeColor',false,co);}});},_mceBackColor:function(){var t=this;this._mceColorPicker(0,{color:t.bgColor,func:function(co){t.bgColor=co;t.editor.execCommand('HiliteColor',false,co);}});},_ufirst:function(s){return s.substring(0,1).toUpperCase()+s.substring(1);}});tinymce.ThemeManager.add('advanced',tinymce.themes.AdvancedTheme);}()); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js index c9a66b2e..b3cef019 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js @@ -1,738 +1,1153 @@ -/* Import theme specific language pack */ -tinyMCE.importThemeLanguagePack(); - -// Variable declarations -var TinyMCE_advanced_autoImportCSSClasses = true; -var TinyMCE_advanced_foreColor = "#000000"; -var TinyMCE_advanced_anchorName = ""; -var TinyMCE_advanced_buttons = [ - // Control id, button img, button title, command, user_interface, value - ['bold', '{$lang_bold_img}', '{$lang_bold_desc}', 'Bold'], - ['italic', '{$lang_italic_img}', '{$lang_italic_desc}', 'Italic'], - ['underline', '{$lang_underline_img}', '{$lang_underline_desc}', 'Underline'], - ['strikethrough', 'strikethrough.gif', '{$lang_striketrough_desc}', 'Strikethrough'], - ['justifyleft', 'left.gif', '{$lang_justifyleft_desc}', 'JustifyLeft'], - ['justifycenter', 'center.gif', '{$lang_justifycenter_desc}', 'JustifyCenter'], - ['justifyright', 'right.gif', '{$lang_justifyright_desc}', 'JustifyRight'], - ['justifyfull', 'full.gif', '{$lang_justifyfull_desc}', 'JustifyFull'], - ['bullist', 'bullist.gif', '{$lang_bullist_desc}', 'InsertUnorderedList'], - ['numlist', 'numlist.gif', '{$lang_numlist_desc}', 'InsertOrderedList'], - ['outdent', 'outdent.gif', '{$lang_outdent_desc}', 'Outdent'], - ['indent', 'indent.gif', '{$lang_indent_desc}', 'Indent'], - ['cut', 'cut.gif', '{$lang_cut_desc}', 'Cut'], - ['copy', 'copy.gif', '{$lang_copy_desc}', 'Copy'], - ['paste', 'paste.gif', '{$lang_paste_desc}', 'Paste'], - ['undo', 'undo.gif', '{$lang_undo_desc}', 'Undo'], - ['redo', 'redo.gif', '{$lang_redo_desc}', 'Redo'], - ['link', 'link.gif', '{$lang_link_desc}', 'mceLink', true], - ['unlink', 'unlink.gif', '{$lang_unlink_desc}', 'unlink'], - ['image', 'image.gif', '{$lang_image_desc}', 'mceImage', true], - ['cleanup', 'cleanup.gif', '{$lang_cleanup_desc}', 'mceCleanup'], - ['help', 'help.gif', '{$lang_help_desc}', 'mceHelp'], - ['code', 'code.gif', '{$lang_theme_code_desc}', 'mceCodeEditor'], - ['hr', 'hr.gif', '{$lang_theme_hr_desc}', 'inserthorizontalrule'], - ['removeformat', 'removeformat.gif', '{$lang_theme_removeformat_desc}', 'removeformat'], - ['sub', 'sub.gif', '{$lang_theme_sub_desc}', 'subscript'], - ['sup', 'sup.gif', '{$lang_theme_sup_desc}', 'superscript'], - ['forecolor', 'forecolor.gif', '{$lang_theme_forecolor_desc}', 'mceForeColor', true], - ['backcolor', 'backcolor.gif', '{$lang_theme_backcolor_desc}', 'mceBackColor', true], - ['charmap', 'charmap.gif', '{$lang_theme_charmap_desc}', 'mceCharMap'], - ['visualaid', 'visualaid.gif', '{$lang_theme_visualaid_desc}', 'mceToggleVisualAid'], - ['anchor', 'anchor.gif', '{$lang_theme_anchor_desc}', 'mceInsertAnchor'] - ]; - - -/** - * Returns HTML code for the specificed control. - */ -function TinyMCE_advanced_getControlHTML(button_name) { - var buttonTileMap = new Array('anchor.gif','backcolor.gif','bullist.gif','center.gif','charmap.gif','cleanup.gif','code.gif','copy.gif','custom_1.gif','cut.gif','forecolor.gif','full.gif','help.gif','hr.gif','image.gif','indent.gif','left.gif','link.gif','numlist.gif','outdent.gif','paste.gif','redo.gif','removeformat.gif','right.gif','strikethrough.gif','sub.gif','sup.gif','undo.gif','unlink.gif','visualaid.gif'); - - // Lookup button in button list - for (var i=0; i'; - } - - // Old style - return ''; - } - } - - // Custom controlls other than buttons - switch (button_name) { - case "formatselect": - var html = ''; - - return html; - - - case "styleselect": - return ''; - - case "fontselect": - return ''; - - case "fontsizeselect": - return ''; - - case "|": - case "separator": - return ''; - - case "spacer": - return ''; - - case "rowseparator": - return '
'; - } - - return ""; -} - -/** - * Theme specific exec command handeling. - */ -function TinyMCE_advanced_execCommand(editor_id, element, command, user_interface, value) { - switch (command) { - case "mceForeColor": - var template = new Array(); - var inputColor = TinyMCE_advanced_foreColor; - - if (!inputColor) - inputColor = "#000000"; - - template['file'] = 'color_picker.htm'; - template['width'] = 210; - template['height'] = 200; - - tinyMCE.openWindow(template, {editor_id : editor_id, command : "forecolor", input_color : inputColor}); - return true; - - case "mceBackColor": - var template = new Array(); - var inputColor = TinyMCE_advanced_foreColor; - - if (!inputColor) - inputColor = "#000000"; - - template['file'] = 'color_picker.htm'; - template['width'] = 210; - template['height'] = 200; - - tinyMCE.openWindow(template, {editor_id : editor_id, command : "HiliteColor", input_color : inputColor}); - return true; - - case "mceCodeEditor": - var template = new Array(); - - template['file'] = 'source_editor.htm'; - template['width'] = tinyMCE.getParam("theme_advanced_source_editor_width", 500); - template['height'] = tinyMCE.getParam("theme_advanced_source_editor_height", 400); - - tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no"}); - return true; - - case "mceCharMap": - var template = new Array(); - - template['file'] = 'charmap.htm'; - template['width'] = 550; - template['height'] = 280; - - tinyMCE.openWindow(template, {editor_id : editor_id}); - return true; - - case "mceInsertAnchor": - var template = new Array(); - - template['file'] = 'anchor.htm'; - template['width'] = 320; - template['height'] = 130; - - tinyMCE.openWindow(template, {editor_id : editor_id, name : TinyMCE_advanced_anchorName, action : (TinyMCE_advanced_anchorName == "" ? "insert" : "update")}); - return true; - } - - // Default behavior - return false; -} - -/** - * Editor instance template function. - */ -function TinyMCE_advanced_getEditorTemplate(settings) { - function removeFromArray(in_array, remove_array) { - var outArray = new Array(); - for (var i=0; i - //########################################################################################################### - - var pathHTML = '{$lang_theme_path}:  '; - var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout"); - - switch(layoutManager) { - case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)... - var toolbarHTML = ""; - var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom"); - var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center"); - var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); - - // Render row 1 - var buttonNamesRow1 = tinyMCE.getParam("theme_advanced_buttons1", "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect", true, ','); - buttonNamesRow1 = removeFromArray(buttonNamesRow1, tinyMCE.getParam("theme_advanced_disable", "", true, ',')); - buttonNamesRow1 = addToArray(buttonNamesRow1, tinyMCE.getParam("theme_advanced_buttons1_add", "", true, ',')); - buttonNamesRow1 = addToArray(tinyMCE.getParam("theme_advanced_buttons1_add_before", "", true, ','), buttonNamesRow1); - for (var i=0; i 0) { - toolbarHTML += "
"; - deltaHeight -= 23; - } - - // Render row 2 - var buttonNamesRow2 = tinyMCE.getParam("theme_advanced_buttons2", "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code", true, ','); - buttonNamesRow2 = removeFromArray(buttonNamesRow2, tinyMCE.getParam("theme_advanced_disable", "", true, ',')); - buttonNamesRow2 = addToArray(buttonNamesRow2, tinyMCE.getParam("theme_advanced_buttons2_add", "", true, ',')); - buttonNamesRow2 = addToArray(tinyMCE.getParam("theme_advanced_buttons2_add_before", "", true, ','), buttonNamesRow2); - for (var i=0; i 0) { - toolbarHTML += "
"; - deltaHeight -= 23; - } - - // Render row 3 - var buttonNamesRow3 = tinyMCE.getParam("theme_advanced_buttons3", "hr,removeformat,visualaid,separator,sub,sup,separator,charmap", true, ','); - buttonNamesRow3 = removeFromArray(buttonNamesRow3, tinyMCE.getParam("theme_advanced_disable", "", true, ',')); - buttonNamesRow3 = addToArray(buttonNamesRow3, tinyMCE.getParam("theme_advanced_buttons3_add", "", true, ',')); - buttonNamesRow3 = addToArray(tinyMCE.getParam("theme_advanced_buttons3_add_before", "", true, ','), buttonNamesRow3); - for (var i=0; i 0) - deltaHeight -= 20; - - // Setup template html - template['html'] = ''; - - if (toolbarLocation == "top") - template['html'] += ''; - - if (pathLocation == "top") { - template['html'] += ''; - deltaHeight -= 23; - } - - /* template['html'] += '';*/ - template['html'] += ''; - - if (toolbarLocation == "bottom") - template['html'] += ''; - - if (pathLocation == "bottom") { - template['html'] += ''; - deltaHeight -= 23; - } - - template['html'] += '
' + toolbarHTML + '
' + pathHTML + '
\ - \ -
\ - \ -
' + toolbarHTML + '
' + pathHTML + '
'; - break; - - case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom. - template['html'] = ''; - - var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ","); - var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container"); - var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center"); - - //Render Containers: - for(var i = 0; i < containers.length; i++) - { - if(containers[i] == "mceEditor") //Exceptions for mceEditor and ... - { - template['html'] += ''; - } - else if(containers[i] == "mceElementpath") // ... mceElementpath: - { - var pathClass = "mcePath"; - - if (i == containers.length-1) - pathClass = "mcePathBottom"; - else if (i == 0) - pathClass = "mcePathTop"; - else - deltaHeight-=2; - - template['html'] += ''; - deltaHeight -= 22; - } - else //Render normal Container: - { - var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ','); - var curContainerHTML = ""; - var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign); - var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS); - - for (var j=0; j 0) { - curContainerHTML += "
"; - deltaHeight -= 23; - } - - template['html'] += '
'; - } - } - - template['html'] += '
\ - \ -
' + pathHTML + '
' + curContainerHTML + '
'; - break; - case "BorderLayout" : //will be like java.awt.BorderLayout of SUN Java... - // Not implemented yet... - break; - case "CustomLayout" : //User defined layout callback... - var customLayout = tinyMCE.getParam("theme_advanced_custom_layout",""); - if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined") - template = eval(customLayout + "(template);"); - break; - default: - alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!'); - break; - } - - //########################################################################################################### - // - //########################################################################################################### - - // Setup style select options - var styleSelectHTML = ''; - if (settings['theme_advanced_styles']) { - var stylesAr = settings['theme_advanced_styles'].split(';'); - for (var i=0; i' + key + ''; - } - - TinyMCE_advanced_autoImportCSSClasses = false; - } - - template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML); - template['delta_width'] = 0; - template['delta_height'] = deltaHeight; - - return template; -} - -/** - * Insert link template function. - */ -function TinyMCE_advanced_getInsertLinkTemplate() { - var template = new Array(); - - template['file'] = 'link.htm'; - template['width'] = 320; - template['height'] = 170; - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0); - - return template; -} - -/** - * Insert image template function. - */ -function TinyMCE_advanced_getInsertImageTemplate() { - var template = new Array(); - - template['file'] = 'image.htm?src={$src}'; - template['width'] = 340; - template['height'] = 280; - - // Language specific width and height addons - template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); - template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0); - - return template; -} - -/** - * Node change handler. - */ -function TinyMCE_advanced_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { - function selectByValue(select_elm, value) { - if (select_elm) { - for (var i=0; i=0; i--) { - var nodeName = path[i].nodeName.toLowerCase(); - var nodeData = ""; - - if (nodeName == "b") - nodeName = "strong"; - - if (nodeName == "i") - nodeName = "em"; - - if (getAttrib(path[i], 'id') != "") - nodeData += "id: " + path[i].getAttribute('id') + " "; - - if (getAttrib(path[i], 'class') != "") - nodeData += "class: " + path[i].getAttribute('class') + " "; - - if (getAttrib(path[i], 'className') != "") - nodeData += "class: " + path[i].getAttribute('className') + " "; - - if (getAttrib(path[i], 'src') != "") - nodeData += "src: " + path[i].getAttribute('src') + " "; - - if (getAttrib(path[i], 'href') != "") - nodeData += "href: " + path[i].getAttribute('href') + " "; - - if (nodeName == "img" && getAttrib(path[i], 'name') == "mce_plugin_flash") { - nodeName = "flash"; - nodeData = ""; - } - - if (tinyMCE.isMSIE) - html += '' + nodeName + ''; - else - html += '' + nodeName + ''; - - if (i > 0) - html += " » "; - } - - pathElm.innerHTML = html + " "; - } - - // Get element color - var colorElm = tinyMCE.getParentElement(node, "font", "color"); - if (colorElm) - TinyMCE_advanced_foreColor = "" + colorElm.color.toUpperCase(); - - // Reset old states - tinyMCE.switchClassSticky(editor_id + '_justifyleft', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_justifyright', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_justifycenter', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_justifyfull', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_sub', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_sup', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_anchor', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_link', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_unlink', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_outdent', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_image', 'mceButtonNormal'); - tinyMCE.switchClassSticky(editor_id + '_hr', 'mceButtonNormal'); - - // Get anchor name - var anchorName = tinyMCE.getParentElement(node, "a", "name"); - TinyMCE_advanced_anchorName = ""; - if (anchorName) { - TinyMCE_advanced_anchorName = anchorName.getAttribute("name"); - tinyMCE.switchClassSticky(editor_id + '_anchor', 'mceButtonSelected'); - } - - // Get link - var anchorLink = tinyMCE.getParentElement(node, "a", "href"); - if (anchorLink || any_selection) { - tinyMCE.switchClassSticky(editor_id + '_link', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal', false); - tinyMCE.switchClassSticky(editor_id + '_unlink', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal', false); - } - - // Handle visual aid - tinyMCE.switchClassSticky(editor_id + '_visualaid', visual_aid ? 'mceButtonSelected' : 'mceButtonNormal', false); - - if (undo_levels != -1) { - tinyMCE.switchClassSticky(editor_id + '_undo', 'mceButtonDisabled', true); - tinyMCE.switchClassSticky(editor_id + '_redo', 'mceButtonDisabled', true); - } - - // Within li, blockquote - if (tinyMCE.getParentElement(node, "li,blockquote")) - tinyMCE.switchClassSticky(editor_id + '_outdent', 'mceButtonNormal', false); - - // Has redo levels - if (undo_index != -1 && (undo_index < undo_levels-1 && undo_levels > 0)) - tinyMCE.switchClassSticky(editor_id + '_redo', 'mceButtonNormal', false); - - // Has undo levels - if (undo_index != -1 && (undo_index > 0 && undo_levels > 0)) - tinyMCE.switchClassSticky(editor_id + '_undo', 'mceButtonNormal', false); - - // Select class in select box - var selectElm = document.getElementById(editor_id + "_styleSelect"); - if (selectElm) { - TinyMCE_advanced_setupCSSClasses(editor_id); - - classNode = node; - breakOut = false; - var index = 0; - - do { - if (classNode && classNode.className) { - for (var i=0; i"); - } else - selectByValue(selectElm, "

"); - } - - // Select fontselect - var selectElm = document.getElementById(editor_id + "_fontNameSelect"); - if (selectElm) { - var elm = tinyMCE.getParentElement(node, "font", "face"); - if (elm) - selectByValue(selectElm, elm.getAttribute("face")); - else - selectByValue(selectElm, ""); - } - - // Select fontsize - var selectElm = document.getElementById(editor_id + "_fontSizeSelect"); - if (selectElm) { - var elm = tinyMCE.getParentElement(node, "font", "size"); - if (elm && getAttrib(elm, "size") != "") - selectByValue(selectElm, elm.getAttribute("size")); - else - selectByValue(selectElm, "0"); - } - - // Handle align attributes - alignNode = node; - breakOut = false; - do { - if (!alignNode.getAttribute || !alignNode.getAttribute('align')) - continue; - - switch (alignNode.getAttribute('align').toLowerCase()) { - case "left": - tinyMCE.switchClassSticky(editor_id + '_justifyleft', 'mceButtonSelected'); - breakOut = true; - break; - - case "right": - tinyMCE.switchClassSticky(editor_id + '_justifyright', 'mceButtonSelected'); - breakOut = true; - break; - - case "middle": - case "center": - tinyMCE.switchClassSticky(editor_id + '_justifycenter', 'mceButtonSelected'); - breakOut = true; - break; - - case "justify": - tinyMCE.switchClassSticky(editor_id + '_justifyfull', 'mceButtonSelected'); - breakOut = true; - break; - } - } while (!breakOut && (alignNode = alignNode.parentNode)); - - // Handle elements - do { - switch (node.nodeName.toLowerCase()) { - case "b": - case "strong": - tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonSelected'); - break; - - case "i": - case "em": - tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonSelected'); - break; - - case "u": - tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected'); - break; - - case "strike": - tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonSelected'); - break; - - case "ul": - tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonSelected'); - break; - - case "ol": - tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonSelected'); - break; - - case "sub": - tinyMCE.switchClassSticky(editor_id + '_sub', 'mceButtonSelected'); - break; - - case "sup": - tinyMCE.switchClassSticky(editor_id + '_sup', 'mceButtonSelected'); - break; - - case "hr": - tinyMCE.switchClassSticky(editor_id + '_hr', 'mceButtonSelected'); - break; - - case "img": - if (getAttrib(node, 'name').indexOf('mce_') != 0) - tinyMCE.switchClassSticky(editor_id + '_image', 'mceButtonSelected'); - break; - } - } while ((node = node.parentNode)); -} - -// This function auto imports CSS classes into the class selection droplist -function TinyMCE_advanced_setupCSSClasses(editor_id) { - if (!TinyMCE_advanced_autoImportCSSClasses) - return; - - var selectElm = document.getElementById(editor_id + '_styleSelect'); - - if (selectElm && selectElm.getAttribute('cssImported') != 'true') { - var csses = tinyMCE.getCSSClasses(editor_id); - if (csses && selectElm) { - for (var i=0; i 0) - selectElm.setAttribute('cssImported', 'true'); - } -} \ No newline at end of file +/** + * $Id: editor_template_src.js 960 2008-11-12 18:30:32Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; + + // Tell it to load theme specific language pack(s) + tinymce.ThemeManager.requireLangPack('advanced'); + + tinymce.create('tinymce.themes.AdvancedTheme', { + sizes : [8, 10, 12, 14, 18, 24, 36], + + // Control name lookup, format: title, command + controls : { + bold : ['bold_desc', 'Bold'], + italic : ['italic_desc', 'Italic'], + underline : ['underline_desc', 'Underline'], + strikethrough : ['striketrough_desc', 'Strikethrough'], + justifyleft : ['justifyleft_desc', 'JustifyLeft'], + justifycenter : ['justifycenter_desc', 'JustifyCenter'], + justifyright : ['justifyright_desc', 'JustifyRight'], + justifyfull : ['justifyfull_desc', 'JustifyFull'], + bullist : ['bullist_desc', 'InsertUnorderedList'], + numlist : ['numlist_desc', 'InsertOrderedList'], + outdent : ['outdent_desc', 'Outdent'], + indent : ['indent_desc', 'Indent'], + cut : ['cut_desc', 'Cut'], + copy : ['copy_desc', 'Copy'], + paste : ['paste_desc', 'Paste'], + undo : ['undo_desc', 'Undo'], + redo : ['redo_desc', 'Redo'], + link : ['link_desc', 'mceLink'], + unlink : ['unlink_desc', 'unlink'], + image : ['image_desc', 'mceImage'], + cleanup : ['cleanup_desc', 'mceCleanup'], + help : ['help_desc', 'mceHelp'], + code : ['code_desc', 'mceCodeEditor'], + hr : ['hr_desc', 'InsertHorizontalRule'], + removeformat : ['removeformat_desc', 'RemoveFormat'], + sub : ['sub_desc', 'subscript'], + sup : ['sup_desc', 'superscript'], + forecolor : ['forecolor_desc', 'ForeColor'], + forecolorpicker : ['forecolor_desc', 'mceForeColor'], + backcolor : ['backcolor_desc', 'HiliteColor'], + backcolorpicker : ['backcolor_desc', 'mceBackColor'], + charmap : ['charmap_desc', 'mceCharMap'], + visualaid : ['visualaid_desc', 'mceToggleVisualAid'], + anchor : ['anchor_desc', 'mceInsertAnchor'], + newdocument : ['newdocument_desc', 'mceNewDocument'], + blockquote : ['blockquote_desc', 'mceBlockQuote'] + }, + + stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'], + + init : function(ed, url) { + var t = this, s, v, o; + + t.editor = ed; + t.url = url; + t.onResolveName = new tinymce.util.Dispatcher(this); + + // Default settings + t.settings = s = extend({ + theme_advanced_path : true, + theme_advanced_toolbar_location : 'bottom', + theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", + theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", + theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap", + theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6", + theme_advanced_toolbar_align : "center", + theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", + theme_advanced_more_colors : 1, + theme_advanced_row_height : 23, + theme_advanced_resize_horizontal : 1, + theme_advanced_resizing_use_cookie : 1, + theme_advanced_font_sizes : "1,2,3,4,5,6,7", + readonly : ed.settings.readonly + }, ed.settings); + + // Setup default font_size_style_values + if (!s.font_size_style_values) + s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt"; + + if (tinymce.is(s.theme_advanced_font_sizes, 'string')) { + s.font_size_style_values = tinymce.explode(s.font_size_style_values); + s.font_size_classes = tinymce.explode(s.font_size_classes || ''); + + // Parse string value + o = {}; + ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes; + each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) { + var cl; + + if (k == v && v >= 1 && v <= 7) { + k = v + ' (' + t.sizes[v - 1] + 'pt)'; + + if (ed.settings.convert_fonts_to_spans) { + cl = s.font_size_classes[v - 1]; + v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); + } + } + + if (/\s*\./.test(v)) + cl = v.replace(/\./g, ''); + + o[k] = cl ? {'class' : cl} : {fontSize : v}; + }); + + s.theme_advanced_font_sizes = o; + } + + if ((v = s.theme_advanced_path_location) && v != 'none') + s.theme_advanced_statusbar_location = s.theme_advanced_path_location; + + if (s.theme_advanced_statusbar_location == 'none') + s.theme_advanced_statusbar_location = 0; + + // Init editor + ed.onInit.add(function() { + ed.onNodeChange.add(t._nodeChanged, t); + + if (ed.settings.content_css !== false) + ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css")); + }); + + ed.onSetProgressState.add(function(ed, b, ti) { + var co, id = ed.id, tb; + + if (b) { + t.progressTimer = setTimeout(function() { + co = ed.getContainer(); + co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild); + tb = DOM.get(ed.id + '_tbl'); + + DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}}); + DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}}); + }, ti || 0); + } else { + DOM.remove(id + '_blocker'); + DOM.remove(id + '_progress'); + clearTimeout(t.progressTimer); + } + }); + + DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css"); + + if (s.skin_variant) + DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); + }, + + createControl : function(n, cf) { + var cd, c; + + if (c = cf.createControl(n)) + return c; + + switch (n) { + case "styleselect": + return this._createStyleSelect(); + + case "formatselect": + return this._createBlockFormats(); + + case "fontselect": + return this._createFontSelect(); + + case "fontsizeselect": + return this._createFontSizeSelect(); + + case "forecolor": + return this._createForeColorMenu(); + + case "backcolor": + return this._createBackColorMenu(); + } + + if ((cd = this.controls[n])) + return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]}); + }, + + execCommand : function(cmd, ui, val) { + var f = this['_' + cmd]; + + if (f) { + f.call(this, ui, val); + return true; + } + + return false; + }, + + _importClasses : function(e) { + var ed = this.editor, c = ed.controlManager.get('styleselect'); + + if (c.getLength() == 0) { + each(ed.dom.getClasses(), function(o) { + c.add(o['class'], o['class']); + }); + } + }, + + _createStyleSelect : function(n) { + var t = this, ed = t.editor, cf = ed.controlManager, c = cf.createListBox('styleselect', { + title : 'advanced.style_select', + onselect : function(v) { + if (c.selectedValue === v) { + ed.execCommand('mceSetStyleInfo', 0, {command : 'removeformat'}); + c.select(); + return false; + } else + ed.execCommand('mceSetCSSClass', 0, v); + } + }); + + if (c) { + each(ed.getParam('theme_advanced_styles', '', 'hash'), function(v, k) { + if (v) + c.add(t.editor.translate(k), v); + }); + + c.onPostRender.add(function(ed, n) { + if (!c.NativeListBox) { + Event.add(n.id + '_text', 'focus', t._importClasses, t); + Event.add(n.id + '_text', 'mousedown', t._importClasses, t); + Event.add(n.id + '_open', 'focus', t._importClasses, t); + Event.add(n.id + '_open', 'mousedown', t._importClasses, t); + } else + Event.add(n.id, 'focus', t._importClasses, t); + }); + } + + return c; + }, + + _createFontSelect : function() { + var c, t = this, ed = t.editor; + + c = ed.controlManager.createListBox('fontselect', {title : 'advanced.fontdefault', cmd : 'FontName'}); + if (c) { + each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) { + c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); + }); + } + + return c; + }, + + _createFontSizeSelect : function() { + var t = this, ed = t.editor, c, i = 0, cl = []; + + c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { + if (v.fontSize) + ed.execCommand('FontSize', false, v.fontSize); + else { + each(t.settings.theme_advanced_font_sizes, function(v, k) { + if (v['class']) + cl.push(v['class']); + }); + + ed.editorCommands._applyInlineStyle('span', {'class' : v['class']}, {check_classes : cl}); + } + }}); + + if (c) { + each(t.settings.theme_advanced_font_sizes, function(v, k) { + var fz = v.fontSize; + + if (fz >= 1 && fz <= 7) + fz = t.sizes[parseInt(fz) - 1] + 'pt'; + + c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))}); + }); + } + + return c; + }, + + _createBlockFormats : function() { + var c, fmts = { + p : 'advanced.paragraph', + address : 'advanced.address', + pre : 'advanced.pre', + h1 : 'advanced.h1', + h2 : 'advanced.h2', + h3 : 'advanced.h3', + h4 : 'advanced.h4', + h5 : 'advanced.h5', + h6 : 'advanced.h6', + div : 'advanced.div', + blockquote : 'advanced.blockquote', + code : 'advanced.code', + dt : 'advanced.dt', + dd : 'advanced.dd', + samp : 'advanced.samp' + }, t = this; + + c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'}); + if (c) { + each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { + c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v}); + }); + } + + return c; + }, + + _createForeColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_text_colors) + o.colors = v; + + if (s.theme_advanced_default_foreground_color) + o.default_color = s.theme_advanced_default_foreground_color; + + o.title = 'advanced.forecolor_desc'; + o.cmd = 'ForeColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('forecolor', o); + + return c; + }, + + _createBackColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_background_colors) + o.colors = v; + + if (s.theme_advanced_default_background_color) + o.default_color = s.theme_advanced_default_background_color; + + o.title = 'advanced.backcolor_desc'; + o.cmd = 'HiliteColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('backcolor', o); + + return c; + }, + + renderUI : function(o) { + var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; + + n = p = DOM.create('span', {id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + + if (!DOM.boxModel) + n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); + + n = sc = DOM.add(n, 'table', {id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); + n = tb = DOM.add(n, 'tbody'); + + switch ((s.theme_advanced_layout_manager || '').toLowerCase()) { + case "rowlayout": + ic = t._rowLayout(s, tb, o); + break; + + case "customlayout": + ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p); + break; + + default: + ic = t._simpleLayout(s, tb, o, p); + } + + n = o.targetNode; + + // Add classes to first and last TRs + nl = DOM.stdMode ? sc.getElementsByTagName('tr') : sc.rows; // Quick fix for IE 8 + DOM.addClass(nl[0], 'mceFirst'); + DOM.addClass(nl[nl.length - 1], 'mceLast'); + + // Add classes to first and last TDs + each(DOM.select('tr', tb), function(n) { + DOM.addClass(n.firstChild, 'mceFirst'); + DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast'); + }); + + if (DOM.get(s.theme_advanced_toolbar_container)) + DOM.get(s.theme_advanced_toolbar_container).appendChild(p); + else + DOM.insertAfter(p, n); + + Event.add(ed.id + '_path_row', 'click', function(e) { + e = e.target; + + if (e.nodeName == 'A') { + t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); + + return Event.cancel(e); + } + }); +/* + if (DOM.get(ed.id + '_path_row')) { + Event.add(ed.id + '_tbl', 'mouseover', function(e) { + var re; + + e = e.target; + + if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) { + re = DOM.get(ed.id + '_path_row'); + t.lastPath = re.innerHTML; + DOM.setHTML(re, e.parentNode.title); + } + }); + + Event.add(ed.id + '_tbl', 'mouseout', function(e) { + if (t.lastPath) { + DOM.setHTML(ed.id + '_path_row', t.lastPath); + t.lastPath = 0; + } + }); + } +*/ + + if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus')) + Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); + + if (s.theme_advanced_toolbar_location == 'external') + o.deltaHeight = 0; + + t.deltaHeight = o.deltaHeight; + o.targetNode = null; + + return { + iframeContainer : ic, + editorContainer : ed.id + '_parent', + sizeContainer : sc, + deltaHeight : o.deltaHeight + }; + }, + + getInfo : function() { + return { + longname : 'Advanced theme', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + version : tinymce.majorVersion + "." + tinymce.minorVersion + } + }, + + resizeBy : function(dw, dh) { + var e = DOM.get(this.editor.id + '_tbl'); + + this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); + }, + + resizeTo : function(w, h) { + var ed = this.editor, s = ed.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'), dh; + + // Boundery fix box + w = Math.max(s.theme_advanced_resizing_min_width || 100, w); + h = Math.max(s.theme_advanced_resizing_min_height || 100, h); + w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w); + h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h); + + // Calc difference between iframe and container + dh = e.clientHeight - ifr.clientHeight; + + // Resize iframe and container + DOM.setStyle(ifr, 'height', h - dh); + DOM.setStyles(e, {width : w, height : h}); + }, + + destroy : function() { + var id = this.editor.id; + + Event.clear(id + '_resize'); + Event.clear(id + '_path_row'); + Event.clear(id + '_external_close'); + }, + + // Internal functions + + _simpleLayout : function(s, tb, o, p) { + var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c; + + if (s.readonly) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + return ic; + } + + // Create toolbar container at top + if (lo == 'top') + t._addToolbars(tb, o); + + // Create external toolbar + if (lo == 'external') { + n = c = DOM.create('div', {style : 'position:relative'}); + n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'}); + DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'}); + n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0}); + etb = DOM.add(n, 'tbody'); + + if (p.firstChild.className == 'mceOldBoxModel') + p.firstChild.appendChild(c); + else + p.insertBefore(c, p.firstChild); + + t._addToolbars(etb, o); + + ed.onMouseUp.add(function() { + var e = DOM.get(ed.id + '_external'); + DOM.show(e); + + DOM.hide(lastExtID); + + var f = Event.add(ed.id + '_external_close', 'click', function() { + DOM.hide(ed.id + '_external'); + Event.remove(ed.id + '_external_close', 'click', f); + }); + + DOM.show(e); + DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1); + + // Fixes IE rendering bug + DOM.hide(e); + DOM.show(e); + e.style.filter = ''; + + lastExtID = ed.id + '_external'; + + e = null; + }); + } + + if (sl == 'top') + t._addStatusBar(tb, o); + + // Create iframe container + if (!s.theme_advanced_toolbar_container) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + } + + // Create toolbar container at bottom + if (lo == 'bottom') + t._addToolbars(tb, o); + + if (sl == 'bottom') + t._addStatusBar(tb, o); + + return ic; + }, + + _rowLayout : function(s, tb, o) { + var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a; + + dc = s.theme_advanced_containers_default_class || ''; + da = s.theme_advanced_containers_default_align || 'center'; + + each(explode(s.theme_advanced_containers || ''), function(c, i) { + var v = s['theme_advanced_container_' + c] || ''; + + switch (v.toLowerCase()) { + case 'mceeditor': + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + break; + + case 'mceelementpath': + t._addStatusBar(tb, o); + break; + + default: + a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(tb, 'tr'), 'td', { + 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da + }); + + to = cf.createToolbar("toolbar" + i); + t._addControls(v, to); + DOM.setHTML(n, to.renderHTML()); + o.deltaHeight -= s.theme_advanced_row_height; + } + }); + + return ic; + }, + + _addControls : function(v, tb) { + var t = this, s = t.settings, di, cf = t.editor.controlManager; + + if (s.theme_advanced_disable && !t._disabled) { + di = {}; + + each(explode(s.theme_advanced_disable), function(v) { + di[v] = 1; + }); + + t._disabled = di; + } else + di = t._disabled; + + each(explode(v), function(n) { + var c; + + if (di && di[n]) + return; + + // Compatiblity with 2.x + if (n == 'tablecontrols') { + each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) { + n = t.createControl(n, cf); + + if (n) + tb.add(n); + }); + + return; + } + + c = t.createControl(n, cf); + + if (c) + tb.add(c); + }); + }, + + _addToolbars : function(c, o) { + var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a; + + a = s.theme_advanced_toolbar_align.toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a}); + + if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus')) + h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '')); + + h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '')); + + // Create toolbar and add the controls + for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { + tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i}); + + if (s['theme_advanced_buttons' + i + '_add']) + v += ',' + s['theme_advanced_buttons' + i + '_add']; + + if (s['theme_advanced_buttons' + i + '_add_before']) + v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v; + + t._addControls(v, tb); + + //n.appendChild(n = tb.render()); + h.push(tb.renderHTML()); + + o.deltaHeight -= s.theme_advanced_row_height; + } + + h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); + DOM.setHTML(n, h.join('')); + }, + + _addStatusBar : function(tb, o) { + var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; + + n = DOM.add(tb, 'tr'); + n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); + n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : ' '); + DOM.add(n, 'a', {href : '#', accesskey : 'x'}); + + if (s.theme_advanced_resizing && !tinymce.isOldWebKit) { + DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'}); + + if (s.theme_advanced_resizing_use_cookie) { + ed.onPostRender.add(function() { + var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl'); + + if (!o) + return; + + if (s.theme_advanced_resize_horizontal) + c.style.width = Math.max(10, o.cw) + 'px'; + + c.style.height = Math.max(10, o.ch) + 'px'; + DOM.get(ed.id + '_ifr').style.height = Math.max(10, parseInt(o.ch) + t.deltaHeight) + 'px'; + }); + } + + ed.onPostRender.add(function() { + Event.add(ed.id + '_resize', 'mousedown', function(e) { + var c, p, w, h, n, pa; + + // Measure container + c = DOM.get(ed.id + '_tbl'); + w = c.clientWidth; + h = c.clientHeight; + + miw = s.theme_advanced_resizing_min_width || 100; + mih = s.theme_advanced_resizing_min_height || 100; + maw = s.theme_advanced_resizing_max_width || 0xFFFF; + mah = s.theme_advanced_resizing_max_height || 0xFFFF; + + // Setup placeholder + p = DOM.add(DOM.get(ed.id + '_parent'), 'div', {'class' : 'mcePlaceHolder'}); + DOM.setStyles(p, {width : w, height : h}); + + // Replace with placeholder + DOM.hide(c); + DOM.show(p); + + // Create internal resize obj + r = { + x : e.screenX, + y : e.screenY, + w : w, + h : h, + dx : null, + dy : null + }; + + // Start listening + mf = Event.add(DOM.doc, 'mousemove', function(e) { + var w, h; + + // Calc delta values + r.dx = e.screenX - r.x; + r.dy = e.screenY - r.y; + + // Boundery fix box + w = Math.max(miw, r.w + r.dx); + h = Math.max(mih, r.h + r.dy); + w = Math.min(maw, w); + h = Math.min(mah, h); + + // Resize placeholder + if (s.theme_advanced_resize_horizontal) + p.style.width = w + 'px'; + + p.style.height = h + 'px'; + + return Event.cancel(e); + }); + + me = Event.add(DOM.doc, 'mouseup', function(e) { + var ifr; + + // Stop listening + Event.remove(DOM.doc, 'mousemove', mf); + Event.remove(DOM.doc, 'mouseup', me); + + c.style.display = ''; + DOM.remove(p); + + if (r.dx === null) + return; + + ifr = DOM.get(ed.id + '_ifr'); + + if (s.theme_advanced_resize_horizontal) + c.style.width = Math.max(10, r.w + r.dx) + 'px'; + + c.style.height = Math.max(10, r.h + r.dy) + 'px'; + ifr.style.height = Math.max(10, ifr.clientHeight + r.dy) + 'px'; + + if (s.theme_advanced_resizing_use_cookie) { + Cookie.setHash("TinyMCE_" + ed.id + "_size", { + cw : r.w + r.dx, + ch : r.h + r.dy + }); + } + }); + + return Event.cancel(e); + }); + }); + } + + o.deltaHeight -= 21; + n = tb = null; + }, + + _nodeChanged : function(ed, cm, n, co) { + var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn; + + if (s.readonly) + return; + + tinymce.each(t.stateControls, function(c) { + cm.setActive(c, ed.queryCommandState(t.controls[c][1])); + }); + + cm.setActive('visualaid', ed.hasVisual); + cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing); + cm.setDisabled('redo', !ed.undoManager.hasRedo()); + cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); + + p = DOM.getParent(n, 'A'); + if (c = cm.get('link')) { + if (!p || !p.name) { + c.setDisabled(!p && co); + c.setActive(!!p); + } + } + + if (c = cm.get('unlink')) { + c.setDisabled(!p && co); + c.setActive(!!p && !p.name); + } + + if (c = cm.get('anchor')) { + c.setActive(!!p && p.name); + + if (tinymce.isWebKit) { + p = DOM.getParent(n, 'IMG'); + c.setActive(!!p && DOM.getAttrib(p, 'mce_name') == 'a'); + } + } + + p = DOM.getParent(n, 'IMG'); + if (c = cm.get('image')) + c.setActive(!!p && n.className.indexOf('mceItem') == -1); + + if (c = cm.get('styleselect')) { + if (n.className) { + t._importClasses(); + c.select(n.className); + } else + c.select(); + } + + if (c = cm.get('formatselect')) { + p = DOM.getParent(n, DOM.isBlock); + + if (p) + c.select(p.nodeName.toLowerCase()); + } + + if (ed.settings.convert_fonts_to_spans) { + ed.dom.getParent(n, function(n) { + if (n.nodeName === 'SPAN') { + if (!cl && n.className) + cl = n.className; + + if (!fz && n.style.fontSize) + fz = n.style.fontSize; + + if (!fn && n.style.fontFamily) + fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); + } + + return false; + }); + + if (c = cm.get('fontselect')) { + c.select(function(v) { + return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; + }); + } + + if (c = cm.get('fontsizeselect')) { + c.select(function(v) { + if (v.fontSize && v.fontSize === fz) + return true; + + if (v['class'] && v['class'] === cl) + return true; + }); + } + } else { + if (c = cm.get('fontselect')) + c.select(ed.queryCommandValue('FontName')); + + if (c = cm.get('fontsizeselect')) { + v = ed.queryCommandValue('FontSize'); + c.select(function(iv) { + return iv.fontSize == v; + }); + } + } + + if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { + p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); + DOM.setHTML(p, ''); + + ed.dom.getParent(n, function(n) { + var na = n.nodeName.toLowerCase(), u, pi, ti = ''; + + // Ignore non element and hidden elements + if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))) + return; + + // Fake name + if (v = DOM.getAttrib(n, 'mce_name')) + na = v; + + // Handle prefix + if (tinymce.isIE && n.scopeName !== 'HTML') + na = n.scopeName + ':' + na; + + // Remove internal prefix + na = na.replace(/mce\:/g, ''); + + // Handle node name + switch (na) { + case 'b': + na = 'strong'; + break; + + case 'i': + na = 'em'; + break; + + case 'img': + if (v = DOM.getAttrib(n, 'src')) + ti += 'src: ' + v + ' '; + + break; + + case 'a': + if (v = DOM.getAttrib(n, 'name')) { + ti += 'name: ' + v + ' '; + na += '#' + v; + } + + if (v = DOM.getAttrib(n, 'href')) + ti += 'href: ' + v + ' '; + + break; + + case 'font': + if (s.convert_fonts_to_spans) + na = 'span'; + + if (v = DOM.getAttrib(n, 'face')) + ti += 'font: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'size')) + ti += 'size: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'color')) + ti += 'color: ' + v + ' '; + + break; + + case 'span': + if (v = DOM.getAttrib(n, 'style')) + ti += 'style: ' + v + ' '; + + break; + } + + if (v = DOM.getAttrib(n, 'id')) + ti += 'id: ' + v + ' '; + + if (v = n.className) { + v = v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g, ''); + + if (v && v.indexOf('mceItem') == -1) { + ti += 'class: ' + v + ' '; + + if (DOM.isBlock(n) || na == 'img' || na == 'span') + na += '.' + v; + } + } + + na = na.replace(/(html:)/g, ''); + na = {name : na, node : n, title : ti}; + t.onResolveName.dispatch(t, na); + ti = na.title; + na = na.name; + + //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; + pi = DOM.create('a', {'href' : "javascript:;", onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); + + if (p.hasChildNodes()) { + p.insertBefore(DOM.doc.createTextNode(' \u00bb '), p.firstChild); + p.insertBefore(pi, p.firstChild); + } else + p.appendChild(pi); + }, ed.getBody()); + } + }, + + // Commands gets called by execCommand + + _sel : function(v) { + this.editor.execCommand('mceSelectNodeDepth', false, v); + }, + + _mceInsertAnchor : function(ui, v) { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/anchor.htm', + width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), + height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceCharMap : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/charmap.htm', + width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), + height : 250 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceHelp : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/about.htm', + width : 480, + height : 380, + inline : true + }, { + theme_url : this.url + }); + }, + + _mceColorPicker : function(u, v) { + var ed = this.editor; + + v = v || {}; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/color_picker.htm', + width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), + height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), + close_previous : false, + inline : true + }, { + input_color : v.color, + func : v.func, + theme_url : this.url + }); + }, + + _mceCodeEditor : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/source_editor.htm', + width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), + height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), + inline : true, + resizable : true, + maximizable : true + }, { + theme_url : this.url + }); + }, + + _mceImage : function(ui, val) { + var ed = this.editor; + + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/image.htm', + width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), + height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceLink : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : tinymce.baseURL + '/themes/advanced/link.htm', + width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), + height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceNewDocument : function() { + var ed = this.editor; + + ed.windowManager.confirm('advanced.newdocument', function(s) { + if (s) + ed.execCommand('mceSetContent', false, ''); + }); + }, + + _mceForeColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.fgColor, + func : function(co) { + t.fgColor = co; + t.editor.execCommand('ForeColor', false, co); + } + }); + }, + + _mceBackColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.bgColor, + func : function(co) { + t.bgColor = co; + t.editor.execCommand('HiliteColor', false, co); + } + }); + }, + + _ufirst : function(s) { + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + }); + + tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); +}()); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_ui.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_ui.css deleted file mode 100644 index 18fbc4ad..00000000 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_ui.css +++ /dev/null @@ -1,147 +0,0 @@ -.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected { - margin-top: 1px; - margin-left: 1px; -} - -.mceButtonNormal { - border-top: 1px solid; - border-left: 1px solid; - border-bottom: 1px solid; - border-right: 1px solid; - border-color: #F0F0EE; - cursor: arrow; -} - -.mceButtonOver { -/* border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow;*/ - border: 1px solid #0A246A; - cursor: arrow; - background-color: #B6BDD2; -} - -.mceButtonDown { -/* border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow;*/ - cursor: arrow; - border: 1px solid #0A246A; - background-color: #8592B5; -} - -.mceButtonSelected { - border: 1px solid; - border-color: #C0C0BB; - cursor: arrow; -} - -.mceButtonDisabled { - filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); - -moz-opacity:0.3; - opacity: 0.3; - border-top: 1px solid; - border-left: 1px solid; - border-bottom: 1px solid; - border-right: 1px solid; - border-color: #F0F0EE; - cursor: arrow; -} - -.mceSeparator { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; - margin-right: 2px; - margin-left: 2px; -} - -.mceSeparatorLine { - margin:2px; - margin-left: 4px; - background-color: #F0F0EE; - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - width: 0px; - height: 15px; -} - -.mceSelectList { - font-family: "MS Sans Serif"; - font-size: 7pt; - font-weight: normal; - margin-top: 3px; - padding: 0px; - display: inline; - vertical-align: top; - background-color: #F0F0EE -} - -.mceLabel, .mceLabelDisabled { - font-family: "MS Sans Serif"; - font-size: 9pt; -} - -.mceLabel { - color: #000000; -} - -.mceLabelDisabled { - cursor: text; - color: #999999; -} - -.mceEditor { - background: #F0F0EE; - border: 1px solid #cccccc; -} - -.mceEditorArea { - font-family: "MS Sans Serif"; - background: #FFFFFF; -} - -.mceToolbarTop, .mceToolbarBottom { - background: #F0F0EE; -} - -.mceToolbarTop { - border-bottom: 1px solid #cccccc; -} - -.mceToolbarBottom { - border-top: 1px solid #cccccc; -} - -.mcePathTop, .mcePathBottom, .mcePath { - font-family: "MS Sans Serif"; - font-size: 9pt; - padding: 2px; -} - -.mcePathTop { - border-bottom: 1px solid #cccccc; -} - -.mcePathBottom { - border-top: 1px solid #cccccc; -} - -.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover { - text-decoration: none; - font-family: "MS Sans Serif"; - font-size: 9pt; -} - -.mcePathItem:hover { - text-decoration: underline; -} - -.mcePath { - border-bottom: 1px solid #cccccc; -} \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/image.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/image.htm index b0064fc0..6c366469 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/image.htm +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/image.htm @@ -1,175 +1,86 @@ - - -{$lang_insert_image_title} - - - - - -

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang_insert_image_title}
{$lang_insert_image_src}: - - - - -
{$lang_insert_image_alt}:
{$lang_insert_image_align}:
{$lang_insert_image_dimensions}: - x -
{$lang_insert_image_border}:
{$lang_insert_image_vspace}:
{$lang_insert_image_hspace}:
-
-
- - + + + + {#advanced_dlg.image_title} + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
 
+ x +
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/anchor.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/anchor.gif deleted file mode 100644 index ae7b2f39..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/anchor.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/backcolor.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/backcolor.gif deleted file mode 100644 index d44277dd..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/backcolor.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold.gif deleted file mode 100644 index 31f004b2..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_de_se.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_de_se.gif deleted file mode 100644 index 2d86b003..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_de_se.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_fr.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_fr.gif deleted file mode 100644 index 77822828..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_fr.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_ru.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_ru.gif deleted file mode 100644 index c9e89b27..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bold_ru.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/browse.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/browse.gif deleted file mode 100644 index 590f2de4..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/browse.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bullist.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bullist.gif deleted file mode 100644 index 12d0ec22..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/bullist.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/buttons.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/buttons.gif deleted file mode 100644 index b5e454c1..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/buttons.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/center.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/center.gif deleted file mode 100644 index a9e13e00..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/center.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/charmap.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/charmap.gif deleted file mode 100644 index b826f888..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/charmap.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/cleanup.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/cleanup.gif deleted file mode 100644 index 87b8f87a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/cleanup.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/code.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/code.gif deleted file mode 100644 index e16da11e..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/code.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/copy.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/copy.gif deleted file mode 100644 index f0b51871..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/copy.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/custom_1.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/custom_1.gif deleted file mode 100644 index 5e385c05..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/custom_1.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/cut.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/cut.gif deleted file mode 100644 index 6a969e55..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/cut.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/forecolor.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/forecolor.gif deleted file mode 100644 index 560b40e2..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/forecolor.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/full.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/full.gif deleted file mode 100644 index 5a78c630..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/full.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/help.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/help.gif deleted file mode 100644 index a5d67714..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/help.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/hr.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/hr.gif deleted file mode 100644 index 8e6b34dc..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/hr.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/image.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/image.gif deleted file mode 100644 index 36109de7..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/image.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/indent.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/indent.gif deleted file mode 100644 index 7a17288c..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/indent.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic.gif deleted file mode 100644 index ec03278f..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic_de_se.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic_de_se.gif deleted file mode 100644 index 6ce0d8d4..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic_de_se.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic_ru.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic_ru.gif deleted file mode 100644 index 5c2f7fec..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/italic_ru.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/left.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/left.gif deleted file mode 100644 index 4225e007..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/left.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/link.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/link.gif deleted file mode 100644 index 0de42749..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/link.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/numlist.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/numlist.gif deleted file mode 100644 index 7ff907be..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/numlist.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/outdent.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/outdent.gif deleted file mode 100644 index 53e89a77..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/outdent.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/paste.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/paste.gif deleted file mode 100644 index a676604c..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/paste.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/redo.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/redo.gif deleted file mode 100644 index 26a146bd..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/redo.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/removeformat.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/removeformat.gif deleted file mode 100644 index bfea62d2..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/removeformat.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/right.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/right.gif deleted file mode 100644 index 88bfaf25..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/right.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/spacer.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/spacer.gif deleted file mode 100644 index fc256098..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/spacer.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/strikethrough.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/strikethrough.gif deleted file mode 100644 index ce7b6530..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/strikethrough.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/sub.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/sub.gif deleted file mode 100644 index 48184070..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/sub.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/sup.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/sup.gif deleted file mode 100644 index 03f8efc6..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/sup.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table.gif deleted file mode 100644 index f8a00544..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_delete_col.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_delete_col.gif deleted file mode 100644 index 0b2f0fb6..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_delete_col.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_delete_row.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_delete_row.gif deleted file mode 100644 index 1997065f..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_delete_row.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_col_after.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_col_after.gif deleted file mode 100644 index c30dafab..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_col_after.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_col_before.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_col_before.gif deleted file mode 100644 index 5d1ff37a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_col_before.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_row_after.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_row_after.gif deleted file mode 100644 index c3aa15f9..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_row_after.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_row_before.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_row_before.gif deleted file mode 100644 index c3271e54..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/table_insert_row_before.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline.gif deleted file mode 100644 index d6b8afda..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline_fr.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline_fr.gif deleted file mode 100644 index a8e3018a..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline_fr.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline_ru.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline_ru.gif deleted file mode 100644 index 2a517e8b..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/underline_ru.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/undo.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/undo.gif deleted file mode 100644 index b0722d06..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/undo.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/unlink.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/unlink.gif deleted file mode 100644 index dd073a2b..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/unlink.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/visualaid.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/visualaid.gif deleted file mode 100644 index 188b3487..00000000 Binary files a/includes/tinymce/jscripts/tiny_mce/themes/advanced/images/visualaid.gif and /dev/null differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/img/colorpicker.jpg b/includes/tinymce/jscripts/tiny_mce/themes/advanced/img/colorpicker.jpg new file mode 100644 index 00000000..b4c542d1 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/img/colorpicker.jpg differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif new file mode 100644 index 00000000..ccac36f5 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/about.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/about.js new file mode 100644 index 00000000..5cee9ed8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/about.js @@ -0,0 +1,72 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + var ed, tcont; + + tinyMCEPopup.resizeToInnerSize(); + ed = tinyMCEPopup.editor; + + // Give FF some time + window.setTimeout(insertHelpIFrame, 10); + + tcont = document.getElementById('plugintablecontainer'); + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + tinymce.each(ed.plugins, function(p, n) { + var info; + + if (!p.getInfo) + return; + + html += ''; + + info = p.getInfo(); + + if (info.infourl != null && info.infourl != '') + html += ''; + else + html += ''; + + if (info.authorurl != null && info.authorurl != '') + html += ''; + else + html += ''; + + html += ''; + html += ''; + + document.getElementById('plugins_tab').style.display = ''; + + }); + + html += ''; + html += '
' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
'; + + tcont.innerHTML = html; + + tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; + tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; +} + +function insertHelpIFrame() { + var html; + + if (tinyMCEPopup.getParam('docs_url')) { + html = ''; + document.getElementById('iframecontainer').innerHTML = html; + document.getElementById('help_tab').style.display = 'block'; + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js new file mode 100644 index 00000000..b5efd1ec --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js @@ -0,0 +1,37 @@ +tinyMCEPopup.requireLangPack(); + +var AnchorDialog = { + init : function(ed) { + var action, elm, f = document.forms[0]; + + this.editor = ed; + elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG'); + v = ed.dom.getAttrib(elm, 'name'); + + if (v) { + this.action = 'update'; + f.anchorName.value = v; + } + + f.insert.value = ed.getLang(elm ? 'update' : 'insert'); + }, + + update : function() { + var ed = this.editor; + + tinyMCEPopup.restoreSelection(); + + if (this.action != 'update') + ed.selection.collapse(1); + + // Webkit acts weird if empty inline element is inserted so we need to use a image instead + if (tinymce.isWebKit) + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('img', {mce_name : 'a', name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'})); + else + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, '')); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js new file mode 100644 index 00000000..8467ef60 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js @@ -0,0 +1,325 @@ +tinyMCEPopup.requireLangPack(); + +var charmap = [ + [' ', ' ', true, 'no-break space'], + ['&', '&', true, 'ampersand'], + ['"', '"', true, 'quotation mark'], +// finance + ['¢', '¢', true, 'cent sign'], + ['€', '€', true, 'euro sign'], + ['£', '£', true, 'pound sign'], + ['¥', '¥', true, 'yen sign'], +// signs + ['©', '©', true, 'copyright sign'], + ['®', '®', true, 'registered sign'], + ['™', '™', true, 'trade mark sign'], + ['‰', '‰', true, 'per mille sign'], + ['µ', 'µ', true, 'micro sign'], + ['·', '·', true, 'middle dot'], + ['•', '•', true, 'bullet'], + ['…', '…', true, 'three dot leader'], + ['′', '′', true, 'minutes / feet'], + ['″', '″', true, 'seconds / inches'], + ['§', '§', true, 'section sign'], + ['¶', '¶', true, 'paragraph sign'], + ['ß', 'ß', true, 'sharp s / ess-zed'], +// quotations + ['‹', '‹', true, 'single left-pointing angle quotation mark'], + ['›', '›', true, 'single right-pointing angle quotation mark'], + ['«', '«', true, 'left pointing guillemet'], + ['»', '»', true, 'right pointing guillemet'], + ['‘', '‘', true, 'left single quotation mark'], + ['’', '’', true, 'right single quotation mark'], + ['“', '“', true, 'left double quotation mark'], + ['”', '”', true, 'right double quotation mark'], + ['‚', '‚', true, 'single low-9 quotation mark'], + ['„', '„', true, 'double low-9 quotation mark'], + ['<', '<', true, 'less-than sign'], + ['>', '>', true, 'greater-than sign'], + ['≤', '≤', true, 'less-than or equal to'], + ['≥', '≥', true, 'greater-than or equal to'], + ['–', '–', true, 'en dash'], + ['—', '—', true, 'em dash'], + ['¯', '¯', true, 'macron'], + ['‾', '‾', true, 'overline'], + ['¤', '¤', true, 'currency sign'], + ['¦', '¦', true, 'broken bar'], + ['¨', '¨', true, 'diaeresis'], + ['¡', '¡', true, 'inverted exclamation mark'], + ['¿', '¿', true, 'turned question mark'], + ['ˆ', 'ˆ', true, 'circumflex accent'], + ['˜', '˜', true, 'small tilde'], + ['°', '°', true, 'degree sign'], + ['−', '−', true, 'minus sign'], + ['±', '±', true, 'plus-minus sign'], + ['÷', '÷', true, 'division sign'], + ['⁄', '⁄', true, 'fraction slash'], + ['×', '×', true, 'multiplication sign'], + ['¹', '¹', true, 'superscript one'], + ['²', '²', true, 'superscript two'], + ['³', '³', true, 'superscript three'], + ['¼', '¼', true, 'fraction one quarter'], + ['½', '½', true, 'fraction one half'], + ['¾', '¾', true, 'fraction three quarters'], +// math / logical + ['ƒ', 'ƒ', true, 'function / florin'], + ['∫', '∫', true, 'integral'], + ['∑', '∑', true, 'n-ary sumation'], + ['∞', '∞', true, 'infinity'], + ['√', '√', true, 'square root'], + ['∼', '∼', false,'similar to'], + ['≅', '≅', false,'approximately equal to'], + ['≈', '≈', true, 'almost equal to'], + ['≠', '≠', true, 'not equal to'], + ['≡', '≡', true, 'identical to'], + ['∈', '∈', false,'element of'], + ['∉', '∉', false,'not an element of'], + ['∋', '∋', false,'contains as member'], + ['∏', '∏', true, 'n-ary product'], + ['∧', '∧', false,'logical and'], + ['∨', '∨', false,'logical or'], + ['¬', '¬', true, 'not sign'], + ['∩', '∩', true, 'intersection'], + ['∪', '∪', false,'union'], + ['∂', '∂', true, 'partial differential'], + ['∀', '∀', false,'for all'], + ['∃', '∃', false,'there exists'], + ['∅', '∅', false,'diameter'], + ['∇', '∇', false,'backward difference'], + ['∗', '∗', false,'asterisk operator'], + ['∝', '∝', false,'proportional to'], + ['∠', '∠', false,'angle'], +// undefined + ['´', '´', true, 'acute accent'], + ['¸', '¸', true, 'cedilla'], + ['ª', 'ª', true, 'feminine ordinal indicator'], + ['º', 'º', true, 'masculine ordinal indicator'], + ['†', '†', true, 'dagger'], + ['‡', '‡', true, 'double dagger'], +// alphabetical special chars + ['À', 'À', true, 'A - grave'], + ['Á', 'Á', true, 'A - acute'], + ['Â', 'Â', true, 'A - circumflex'], + ['Ã', 'Ã', true, 'A - tilde'], + ['Ä', 'Ä', true, 'A - diaeresis'], + ['Å', 'Å', true, 'A - ring above'], + ['Æ', 'Æ', true, 'ligature AE'], + ['Ç', 'Ç', true, 'C - cedilla'], + ['È', 'È', true, 'E - grave'], + ['É', 'É', true, 'E - acute'], + ['Ê', 'Ê', true, 'E - circumflex'], + ['Ë', 'Ë', true, 'E - diaeresis'], + ['Ì', 'Ì', true, 'I - grave'], + ['Í', 'Í', true, 'I - acute'], + ['Î', 'Î', true, 'I - circumflex'], + ['Ï', 'Ï', true, 'I - diaeresis'], + ['Ð', 'Ð', true, 'ETH'], + ['Ñ', 'Ñ', true, 'N - tilde'], + ['Ò', 'Ò', true, 'O - grave'], + ['Ó', 'Ó', true, 'O - acute'], + ['Ô', 'Ô', true, 'O - circumflex'], + ['Õ', 'Õ', true, 'O - tilde'], + ['Ö', 'Ö', true, 'O - diaeresis'], + ['Ø', 'Ø', true, 'O - slash'], + ['Œ', 'Œ', true, 'ligature OE'], + ['Š', 'Š', true, 'S - caron'], + ['Ù', 'Ù', true, 'U - grave'], + ['Ú', 'Ú', true, 'U - acute'], + ['Û', 'Û', true, 'U - circumflex'], + ['Ü', 'Ü', true, 'U - diaeresis'], + ['Ý', 'Ý', true, 'Y - acute'], + ['Ÿ', 'Ÿ', true, 'Y - diaeresis'], + ['Þ', 'Þ', true, 'THORN'], + ['à', 'à', true, 'a - grave'], + ['á', 'á', true, 'a - acute'], + ['â', 'â', true, 'a - circumflex'], + ['ã', 'ã', true, 'a - tilde'], + ['ä', 'ä', true, 'a - diaeresis'], + ['å', 'å', true, 'a - ring above'], + ['æ', 'æ', true, 'ligature ae'], + ['ç', 'ç', true, 'c - cedilla'], + ['è', 'è', true, 'e - grave'], + ['é', 'é', true, 'e - acute'], + ['ê', 'ê', true, 'e - circumflex'], + ['ë', 'ë', true, 'e - diaeresis'], + ['ì', 'ì', true, 'i - grave'], + ['í', 'í', true, 'i - acute'], + ['î', 'î', true, 'i - circumflex'], + ['ï', 'ï', true, 'i - diaeresis'], + ['ð', 'ð', true, 'eth'], + ['ñ', 'ñ', true, 'n - tilde'], + ['ò', 'ò', true, 'o - grave'], + ['ó', 'ó', true, 'o - acute'], + ['ô', 'ô', true, 'o - circumflex'], + ['õ', 'õ', true, 'o - tilde'], + ['ö', 'ö', true, 'o - diaeresis'], + ['ø', 'ø', true, 'o slash'], + ['œ', 'œ', true, 'ligature oe'], + ['š', 'š', true, 's - caron'], + ['ù', 'ù', true, 'u - grave'], + ['ú', 'ú', true, 'u - acute'], + ['û', 'û', true, 'u - circumflex'], + ['ü', 'ü', true, 'u - diaeresis'], + ['ý', 'ý', true, 'y - acute'], + ['þ', 'þ', true, 'thorn'], + ['ÿ', 'ÿ', true, 'y - diaeresis'], + ['Α', 'Α', true, 'Alpha'], + ['Β', 'Β', true, 'Beta'], + ['Γ', 'Γ', true, 'Gamma'], + ['Δ', 'Δ', true, 'Delta'], + ['Ε', 'Ε', true, 'Epsilon'], + ['Ζ', 'Ζ', true, 'Zeta'], + ['Η', 'Η', true, 'Eta'], + ['Θ', 'Θ', true, 'Theta'], + ['Ι', 'Ι', true, 'Iota'], + ['Κ', 'Κ', true, 'Kappa'], + ['Λ', 'Λ', true, 'Lambda'], + ['Μ', 'Μ', true, 'Mu'], + ['Ν', 'Ν', true, 'Nu'], + ['Ξ', 'Ξ', true, 'Xi'], + ['Ο', 'Ο', true, 'Omicron'], + ['Π', 'Π', true, 'Pi'], + ['Ρ', 'Ρ', true, 'Rho'], + ['Σ', 'Σ', true, 'Sigma'], + ['Τ', 'Τ', true, 'Tau'], + ['Υ', 'Υ', true, 'Upsilon'], + ['Φ', 'Φ', true, 'Phi'], + ['Χ', 'Χ', true, 'Chi'], + ['Ψ', 'Ψ', true, 'Psi'], + ['Ω', 'Ω', true, 'Omega'], + ['α', 'α', true, 'alpha'], + ['β', 'β', true, 'beta'], + ['γ', 'γ', true, 'gamma'], + ['δ', 'δ', true, 'delta'], + ['ε', 'ε', true, 'epsilon'], + ['ζ', 'ζ', true, 'zeta'], + ['η', 'η', true, 'eta'], + ['θ', 'θ', true, 'theta'], + ['ι', 'ι', true, 'iota'], + ['κ', 'κ', true, 'kappa'], + ['λ', 'λ', true, 'lambda'], + ['μ', 'μ', true, 'mu'], + ['ν', 'ν', true, 'nu'], + ['ξ', 'ξ', true, 'xi'], + ['ο', 'ο', true, 'omicron'], + ['π', 'π', true, 'pi'], + ['ρ', 'ρ', true, 'rho'], + ['ς', 'ς', true, 'final sigma'], + ['σ', 'σ', true, 'sigma'], + ['τ', 'τ', true, 'tau'], + ['υ', 'υ', true, 'upsilon'], + ['φ', 'φ', true, 'phi'], + ['χ', 'χ', true, 'chi'], + ['ψ', 'ψ', true, 'psi'], + ['ω', 'ω', true, 'omega'], +// symbols + ['ℵ', 'ℵ', false,'alef symbol'], + ['ϖ', 'ϖ', false,'pi symbol'], + ['ℜ', 'ℜ', false,'real part symbol'], + ['ϑ','ϑ', false,'theta symbol'], + ['ϒ', 'ϒ', false,'upsilon - hook symbol'], + ['℘', '℘', false,'Weierstrass p'], + ['ℑ', 'ℑ', false,'imaginary part'], +// arrows + ['←', '←', true, 'leftwards arrow'], + ['↑', '↑', true, 'upwards arrow'], + ['→', '→', true, 'rightwards arrow'], + ['↓', '↓', true, 'downwards arrow'], + ['↔', '↔', true, 'left right arrow'], + ['↵', '↵', false,'carriage return'], + ['⇐', '⇐', false,'leftwards double arrow'], + ['⇑', '⇑', false,'upwards double arrow'], + ['⇒', '⇒', false,'rightwards double arrow'], + ['⇓', '⇓', false,'downwards double arrow'], + ['⇔', '⇔', false,'left right double arrow'], + ['∴', '∴', false,'therefore'], + ['⊂', '⊂', false,'subset of'], + ['⊃', '⊃', false,'superset of'], + ['⊄', '⊄', false,'not a subset of'], + ['⊆', '⊆', false,'subset of or equal to'], + ['⊇', '⊇', false,'superset of or equal to'], + ['⊕', '⊕', false,'circled plus'], + ['⊗', '⊗', false,'circled times'], + ['⊥', '⊥', false,'perpendicular'], + ['⋅', '⋅', false,'dot operator'], + ['⌈', '⌈', false,'left ceiling'], + ['⌉', '⌉', false,'right ceiling'], + ['⌊', '⌊', false,'left floor'], + ['⌋', '⌋', false,'right floor'], + ['⟨', '〈', false,'left-pointing angle bracket'], + ['⟩', '〉', false,'right-pointing angle bracket'], + ['◊', '◊', true,'lozenge'], + ['♠', '♠', false,'black spade suit'], + ['♣', '♣', true, 'black club suit'], + ['♥', '♥', true, 'black heart suit'], + ['♦', '♦', true, 'black diamond suit'], + [' ', ' ', false,'en space'], + [' ', ' ', false,'em space'], + [' ', ' ', false,'thin space'], + ['‌', '‌', false,'zero width non-joiner'], + ['‍', '‍', false,'zero width joiner'], + ['‎', '‎', false,'left-to-right mark'], + ['‏', '‏', false,'right-to-left mark'], + ['­', '­', false,'soft hyphen'] +]; + +tinyMCEPopup.onInit.add(function() { + tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); +}); + +function renderCharMapHTML() { + var charsPerRow = 20, tdWidth=20, tdHeight=20, i; + var html = ''; + var cols=-1; + + for (i=0; i' + + '' + + charmap[i][1] + + ''; + if ((cols+1) % charsPerRow == 0) + html += ''; + } + } + + if (cols % charsPerRow > 0) { + var padd = charsPerRow - (cols % charsPerRow); + for (var i=0; i '; + } + + html += '
'; + + return html; +} + +function insertChar(chr) { + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); + + // Refocus in window + if (tinyMCEPopup.isWindow) + window.focus(); + + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); +} + +function previewChar(codeA, codeB, codeN) { + var elmA = document.getElementById('codeA'); + var elmB = document.getElementById('codeB'); + var elmV = document.getElementById('codeV'); + var elmN = document.getElementById('codeN'); + + if (codeA=='#160;') { + elmV.innerHTML = '__'; + } else { + elmV.innerHTML = '&' + codeA; + } + + elmB.innerHTML = '&' + codeA; + elmA.innerHTML = '&' + codeB; + elmN.innerHTML = codeN; +} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js new file mode 100644 index 00000000..fd9700f2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js @@ -0,0 +1,253 @@ +tinyMCEPopup.requireLangPack(); + +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; + +var colors = [ + "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", + "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", + "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", + "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", + "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", + "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", + "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", + "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", + "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", + "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", + "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", + "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", + "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", + "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", + "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", + "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", + "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", + "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", + "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", + "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", + "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", + "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", + "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", + "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", + "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", + "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", + "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" +]; + +var named = { + '#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', + '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown', + '#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue', + '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod', + '#A9A9A9':'DarkGray','#A9A9A9':'DarkGrey','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen', + '#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue', + '#2F4F4F':'DarkSlateGray','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue', + '#696969':'DimGray','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen', + '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey', + '#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory', + '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue', + '#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen', + '#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey', + '#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', + '#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue', + '#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin', + '#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid', + '#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff', + '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue', + '#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver', + '#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen', + '#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', + '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen' +}; + +function init() { + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')); + + tinyMCEPopup.resizeToInnerSize(); + + generatePicker(); + + if (inputColor) { + changeFinalColor(inputColor); + + col = convertHexToRGB(inputColor); + + if (col) + updateLight(col.r, col.g, col.b); + } +} + +function insertAction() { + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + tinyMCEPopup.restoreSelection(); + + if (f) + f(color); + + tinyMCEPopup.close(); +} + +function showColor(color, name) { + if (name) + document.getElementById("colorname").innerHTML = name; + + document.getElementById("preview").style.backgroundColor = color; + document.getElementById("color").value = color.toLowerCase(); +} + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + if (!col) + return col; + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return {r : r, g : g, b : b}; + } + + return null; +} + +function generatePicker() { + var el = document.getElementById('light'), h = '', i; + + for (i = 0; i < detail; i++){ + h += '
'; + } + + el.innerHTML = h; +} + +function generateWebColors() { + var el = document.getElementById('webcolors'), h = '', i; + + if (el.className == 'generated') + return; + + h += '' + + ''; + + for (i=0; i' + + '' + + ''; + if ((i+1) % 18 == 0) + h += ''; + } + + h += '
'; + + el.innerHTML = h; + el.className = 'generated'; +} + +function generateNamedColors() { + var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; + + if (el.className == 'generated') + return; + + for (n in named) { + v = named[n]; + h += '' + } + + el.innerHTML = h; + el.className = 'generated'; +} + +function dechex(n) { + return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); +} + +function computeColor(e) { + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB; + + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0); + + partWidth = document.getElementById('colors').width / 6; + partDetail = detail / 2; + imHeight = document.getElementById('colors').height; + + r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; + g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); + b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); + + coef = (imHeight - y) / imHeight; + r = 128 + (r - 128) * coef; + g = 128 + (g - 128) * coef; + b = 128 + (b - 128) * coef; + + changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); + updateLight(r, g, b); +} + +function updateLight(r, g, b) { + var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; + + for (i=0; i=0) && (i'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '180px'; + + e = ed.selection.getNode(); + + this.fillFileList('image_list', 'tinyMCEImageList'); + + if (e.nodeName == 'IMG') { + f.src.value = ed.dom.getAttrib(e, 'src'); + f.alt.value = ed.dom.getAttrib(e, 'alt'); + f.border.value = this.getAttrib(e, 'border'); + f.vspace.value = this.getAttrib(e, 'vspace'); + f.hspace.value = this.getAttrib(e, 'hspace'); + f.width.value = ed.dom.getAttrib(e, 'width'); + f.height.value = ed.dom.getAttrib(e, 'height'); + f.insert.value = ed.getLang('update'); + this.styleVal = ed.dom.getAttrib(e, 'style'); + selectByValue(f, 'image_list', f.src.value); + selectByValue(f, 'align', this.getAttrib(e, 'align')); + this.updateStyle(); + } + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + update : function() { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (!ed.settings.inline_styles) { + args = tinymce.extend(args, { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }); + } else + args.style = this.styleVal; + + tinymce.extend(args, { + src : f.src.value, + alt : f.alt.value, + width : f.width.value, + height : f.height.value + }); + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); + ed.dom.setAttribs('__mce_tmp', args); + ed.dom.setAttrib('__mce_tmp', 'id', ''); + ed.undoManager.add(); + } + + tinyMCEPopup.close(); + }, + + updateStyle : function() { + var dom = tinyMCEPopup.dom, st, v, f = document.forms[0]; + + if (tinyMCEPopup.editor.settings.inline_styles) { + st = tinyMCEPopup.dom.parseStyle(this.styleVal); + + // Handle align + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') { + st['float'] = v; + delete st['vertical-align']; + } else { + st['vertical-align'] = v; + delete st['float']; + } + } else { + delete st['float']; + delete st['vertical-align']; + } + + // Handle border + v = f.border.value; + if (v || v == '0') { + if (v == '0') + st['border'] = '0'; + else + st['border'] = v + 'px solid black'; + } else + delete st['border']; + + // Handle hspace + v = f.hspace.value; + if (v) { + delete st['margin']; + st['margin-left'] = v + 'px'; + st['margin-right'] = v + 'px'; + } else { + delete st['margin-left']; + delete st['margin-right']; + } + + // Handle vspace + v = f.vspace.value; + if (v) { + delete st['margin']; + st['margin-top'] = v + 'px'; + st['margin-bottom'] = v + 'px'; + } else { + delete st['margin-top']; + delete st['margin-bottom']; + } + + // Merge + st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st)); + this.styleVal = dom.serializeStyle(st); + } + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.width.value = f.height.value = ""; + }, + + updateImageData : function() { + var f = document.forms[0], t = ImageDialog; + + if (f.width.value == "") + f.width.value = t.preloadImg.width; + + if (f.height.value == "") + f.height.value = t.preloadImg.height; + }, + + getImageData : function() { + var f = document.forms[0]; + + this.preloadImg = new Image(); + this.preloadImg.onload = this.updateImageData; + this.preloadImg.onerror = this.resetImageData; + this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js new file mode 100644 index 00000000..2974878e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js @@ -0,0 +1,155 @@ +tinyMCEPopup.requireLangPack(); + +var LinkDialog = { + preInit : function() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + this.fillClassList('class_list'); + this.fillFileList('link_list', 'tinyMCELinkList'); + this.fillTargetList('target_list'); + + if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { + f.href.value = ed.dom.getAttrib(e, 'href'); + f.linktitle.value = ed.dom.getAttrib(e, 'title'); + f.insert.value = ed.getLang('update'); + selectByValue(f, 'link_list', f.href.value); + selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); + selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); + } + }, + + update : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b; + + tinyMCEPopup.restoreSelection(); + e = ed.dom.getParent(ed.selection.getNode(), 'A'); + + // Remove element if there is no href + if (!f.href.value) { + if (e) { + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + b = ed.selection.getBookmark(); + ed.dom.remove(e, 1); + ed.selection.moveToBookmark(b); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + } + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + + // Create new anchor elements + if (e == null) { + tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + + tinymce.each(ed.dom.select("a"), function(n) { + if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + e = n; + + ed.dom.setAttribs(e, { + href : f.href.value, + title : f.linktitle.value, + target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null, + 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null + }); + } + }); + } else { + ed.dom.setAttribs(e, { + href : f.href.value, + title : f.linktitle.value, + target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null, + 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null + }); + } + + // Don't move caret if selection was image + if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { + ed.focus(); + ed.selection.select(e); + ed.selection.collapse(0); + tinyMCEPopup.storeSelection(); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + }, + + checkPrefix : function(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) + n.value = 'http://' + n.value; + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillTargetList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v; + + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); + + if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { + tinymce.each(v.split(','), function(v) { + v = v.split('='); + lst.options[lst.options.length] = new Option(v[0], v[1]); + }); + } + } +}; + +LinkDialog.preInit(); +tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js new file mode 100644 index 00000000..af2231ca --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js @@ -0,0 +1,62 @@ +tinyMCEPopup.requireLangPack(); +tinyMCEPopup.onInit.add(onLoadInit); + +function saveContent() { + tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value); + tinyMCEPopup.close(); +} + +function onLoadInit() { + tinyMCEPopup.resizeToInnerSize(); + + // Remove Gecko spellchecking + if (tinymce.isGecko) + document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); + + document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent(); + + if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { + setWrap('soft'); + document.getElementById('wraped').checked = true; + } + + resizeInputs(); +} + +function setWrap(val) { + var v, n, s = document.getElementById('htmlSource'); + + s.wrap = val; + + if (!tinymce.isIE) { + v = s.value; + n = s.cloneNode(false); + n.setAttribute("wrap", val); + s.parentNode.replaceChild(n, s); + n.value = v; + } +} + +function toggleWordWrap(elm) { + if (elm.checked) + setWrap('soft'); + else + setWrap('off'); +} + +var wHeight=0, wWidth=0, owHeight=0, owWidth=0; + +function resizeInputs() { + var el = document.getElementById('htmlSource'); + + if (!tinymce.isIE) { + wHeight = self.innerHeight - 65; + wWidth = self.innerWidth - 16; + } else { + wHeight = document.body.clientHeight - 70; + wWidth = document.body.clientWidth - 16; + } + + el.style.height = Math.abs(wHeight) + 'px'; + el.style.width = Math.abs(wWidth) + 'px'; +} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ar.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ar.js new file mode 100644 index 00000000..d88787e2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ar.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ar.advanced',{ +style_select:"\u0627\u062E\u062A\u064A\u0627\u0631 \u0623\u0633\u0644\u0648\u0628 \u0627\u0644\u0639\u0631\u0636", +font_size:"\u062D\u062C\u0645 \u0627\u0644\u062E\u0637", +fontdefault:"\u0646\u0648\u0639 \u0627\u0644\u062E\u0637", +block:"\u062A\u0646\u0633\u064A\u0642", +paragraph:"\u0641\u0642\u0631\u0629", +div:"Div", +address:"\u0639\u0646\u0648\u0627\u0646", +pre:"\u0645\u0646\u0633\u0642", +h1:"\u0639\u0646\u0648\u0627\u0646 1", +h2:"\u0639\u0646\u0648\u0627\u0646 2", +h3:"\u0639\u0646\u0648\u0627\u0646 3", +h4:"\u0639\u0646\u0648\u0627\u0646 4", +h5:"\u0639\u0646\u0648\u0627\u0646 5", +h6:"\u0639\u0646\u0648\u0627\u0646 6", +blockquote:"\u0627\u0642\u062A\u0628\u0627\u0633", +code:"\u0643\u0648\u062F", +samp:"\u0643\u0648\u062F \u0628\u0633\u064A\u0637", +dt:"\u0643\u0644\u0645\u0629 \u062A\u0639\u0631\u064A\u0641", +dd:"\u0634\u0631\u062D \u0627\u0644\u062A\u0639\u0631\u064A\u0641", +bold_desc:"\u0639\u0631\u064A\u0636 (Ctrl+B)", +italic_desc:"\u0645\u0627\u0626\u0644 (Ctrl+I)", +underline_desc:"\u062A\u0633\u0637\u064A\u0631 (Ctrl+U)", +striketrough_desc:"\u0634\u0637\u0628", +justifyleft_desc:"\u0645\u062D\u0627\u0630\u0627\u0629 \u0644\u0644\u064A\u0633\u0627\u0631", +justifycenter_desc:"\u0645\u062D\u0627\u0630\u0627\u0629 \u0644\u0644\u0648\u0633\u0637", +justifyright_desc:"\u0645\u062D\u0627\u0630\u0627\u0629 \u064A\u0645\u064A\u0646", +justifyfull_desc:"\u0636\u0628\u0637", +bullist_desc:"\u0642\u0627\u0626\u0645\u0629 \u0645\u0646\u0642\u0637\u0629", +numlist_desc:"\u0642\u0627\u0626\u0645\u0629 \u0645\u0631\u0642\u0645\u0629", +outdent_desc:"\u0625\u0646\u0642\u0627\u0635 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062F\u0626\u0629", +indent_desc:"\u0632\u064A\u0627\u062F\u0629 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062F\u0626\u0629", +undo_desc:"\u062A\u0631\u0627\u062C\u0639 (Ctrl+Z)", +redo_desc:"\u0625\u0639\u0627\u062F\u0629 (Ctrl+Y)", +link_desc:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u0631\u0627\u0628\u0637", +unlink_desc:"\u062D\u0630\u0641 \u0627\u0644\u0631\u0627\u0628\u0637", +image_desc:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u0635\u0648\u0631\u0629", +cleanup_desc:"\u0627\u0632\u0627\u0644\u0629 \u0627\u0644\u0623\u0643\u0648\u0627\u062F \u0627\u0644\u062E\u0627\u0637\u0626\u0629", +code_desc:"\u062A\u062D\u0631\u064A\u0631 \u0643\u0648\u062F HTML", +sub_desc:"\u062F\u0644\u064A\u0644", +sup_desc:"\u0623\u0633", +hr_desc:"\u0625\u062F\u0631\u0627\u062C \u062E\u0637 \u0627\u0641\u0642\u064A", +removeformat_desc:"\u0645\u0633\u062D \u0627\u0644\u062A\u0646\u0633\u064A\u0642\u0627\u062A", +custom1_desc:"\u0634\u0631\u062D\u0643 \u0627\u0644\u062E\u0627\u0635 \u0647\u0646\u0627", +forecolor_desc:"\u0644\u0648\u0646 \u0627\u0644\u0646\u0635", +backcolor_desc:"\u0644\u0648\u0646 \u0627\u0644\u062E\u0644\u0641\u064A\u0629", +charmap_desc:"\u0625\u062F\u0627\u0631\u062C \u062D\u0631\u0641 \u0645\u062E\u0635\u0635", +visualaid_desc:"\u062A\u0628\u062F\u064A\u0644 \u0627\u0644\u0645\u0628\u0627\u062F\u0626 \u0627\u0644\u062A\u0648\u062C\u064A\u0647\u064A\u0629 / \u0639\u0646\u0627\u0635\u0631 \u063A\u064A\u0631 \u0645\u0631\u0626\u064A\u0629", +anchor_desc:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u0639\u0644\u0627\u0645\u0629", +cut_desc:"\u0642\u0635", +copy_desc:"\u0646\u0633\u062E", +paste_desc:"\u0644\u0635\u0642", +image_props_desc:"\u062E\u0635\u0627\u0626\u0635 \u0627\u0644\u0635\u0648\u0631\u0629", +newdocument_desc:"\u0645\u0633\u062A\u0646\u062F \u062C\u062F\u064A\u062F", +help_desc:"\u0645\u0633\u0627\u0639\u062F\u0629", +blockquote_desc:"\u0627\u0642\u062A\u0628\u0627\u0633", +clipboard_msg:"\u0646\u0633\u062E/\u0642\u0635/\u0644\u0635\u0642 \u063A\u064A\u0631 \u0645\u062A\u0648\u0641\u0631\u0629 \u0644\u0645\u062A\u0635\u0641\u062D Mozilla \u0648 Firefox.\n\u0647\u0644 \u062A\u0631\u064A\u062F \u0645\u0639\u0631\u0641\u0629 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062A \u062D\u0648\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0648\u0636\u0648\u0639?", +path:"\u0627\u0644\u0645\u0633\u0627\u0631", +newdocument:"\u0647\u0644 \u062A\u0631\u064A\u062F \u062D\u0642\u0627 \u0645\u0633\u062D \u062C\u0645\u064A\u0639 \u0627\u0644\u0645\u062D\u062A\u0648\u064A\u0627\u062A?", +toolbar_focus:"\u0625\u0646\u062A\u0642\u0627\u0644 \u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u0623\u062F\u0648\u0627\u062A - Alt+Q, \u0625\u0646\u062A\u0642\u0627\u0644 \u0644\u0644\u0645\u062D\u0631\u0631 - Alt-Z, \u0625\u0646\u062A\u0642\u0627\u0644 \u0644\u0644\u0645\u0633\u0627\u0631 - Alt-X", +more_colors:"\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0623\u0644\u0648\u0627\u0646" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ar_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ar_dlg.js new file mode 100644 index 00000000..f36299f5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ar_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ar.advanced_dlg',{ +about_title:"\u062D\u0648\u0644 TinyMCE", +about_general:"\u062D\u0648\u0644", +about_help:"\u0645\u0633\u0627\u0639\u062F\u0629", +about_license:"\u0627\u0644\u0631\u062E\u0635\u0629", +about_plugins:"\u0627\u0644\u0625\u0636\u0627\u0641\u0627\u062A", +about_plugin:"\u0627\u0644\u0625\u0636\u0627\u0641\u0629", +about_author:"\u0627\u0644\u0645\u0628\u0631\u0645\u062C", +about_version:"\u0627\u0644\u0625\u0635\u062F\u0627\u0631", +about_loaded:"\u0627\u0644\u0625\u0636\u0627\u0641\u0627\u062A \u0627\u0644\u0645\u062D\u0645\u0644\u0629", +anchor_title:"\u0625\u062F\u0631\u0627\u062C/\u062A\u062D\u0631\u064A\u0631 \u0639\u0644\u0627\u0645\u0629", +anchor_name:"\u0627\u0633\u0645 \u0627\u0644\u0639\u0644\u0627\u0645\u0629", +code_title:"\u0645\u062D\u0631\u0631 \u0643\u0648\u062F HTML", +code_wordwrap:"\u0627\u0644\u062A\u0641\u0627\u0641 \u0627\u0644\u0646\u0635", +colorpicker_title:"\u062D\u062F\u062F \u0644\u0648\u0646", +colorpicker_picker_tab:"\u0627\u0644\u0645\u0627\u0632\u062C", +colorpicker_picker_title:"\u0645\u0627\u0632\u062C \u0627\u0644\u0623\u0644\u0648\u0627\u0646", +colorpicker_palette_tab:"\u0627\u0644\u0644\u0648\u062D\u0629", +colorpicker_palette_title:"\u0644\u0648\u062D\u0629 \u0627\u0644\u0623\u0644\u0648\u0627\u0646", +colorpicker_named_tab:"\u0627\u0644\u0623\u0633\u0645\u0627\u0621", +colorpicker_named_title:"\u0623\u0633\u0645\u0627\u0621 \u0627\u0644\u0623\u0644\u0648\u0627\u0646", +colorpicker_color:"\u0627\u0644\u0644\u0648\u0646:", +colorpicker_name:"\u0627\u0644\u0623\u0633\u0645:", +charmap_title:"\u062D\u062F\u062F \u062D\u0631\u0641 \u0645\u062E\u0635\u0635", +image_title:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u0635\u0648\u0631\u0629", +image_src:"\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0629", +image_alt:"\u0648\u0635\u0641 \u0627\u0644\u0635\u0648\u0631\u0629", +image_list:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0635\u0648\u0631", +image_border:"\u0627\u0644\u062D\u062F\u0648\u062F", +image_dimensions:"\u0627\u0644\u0642\u064A\u0627\u0633\u0627\u062A", +image_vspace:"\u0645\u0633\u0627\u0641\u0629 \u0639\u0645\u0648\u062F\u064A\u0629", +image_hspace:"\u0645\u0633\u0627\u0641\u0629 \u0627\u0641\u0642\u064A\u0629", +image_align:"\u0645\u062D\u0627\u0630\u0627\u0629", +image_align_baseline:"\u062E\u0637 \u0627\u0644\u0642\u0627\u0639\u062F\u0629", +image_align_top:"\u0623\u0639\u0644\u0649", +image_align_middle:"\u062A\u0648\u0633\u064A\u0637 \u0639\u0645\u0648\u062F\u064A", +image_align_bottom:"\u0627\u0633\u0641\u0644", +image_align_texttop:"\u0623\u0639\u0644\u0649 \u0627\u0644\u0646\u0635", +image_align_textbottom:"\u0623\u0633\u0641\u0644 \u0627\u0644\u0646\u0635", +image_align_left:"\u064A\u0633\u0627\u0631", +image_align_right:"\u064A\u0645\u064A\u0646", +link_title:"\u0625\u062F\u0631\u0627\u062C/\u062A\u0639\u062F\u064A\u0644 \u0631\u0627\u0628\u0637", +link_url:"\u0627\u0644\u0631\u0627\u0628\u0637", +link_target:"\u0627\u0644\u0645\u0633\u0627\u0631", +link_target_same:"\u0641\u062A\u062D \u0627\u0644\u0631\u0627\u0628\u0637 \u0641\u064A \u0646\u0641\u0633 \u0627\u0644\u0635\u0641\u062D\u0629", +link_target_blank:"\u0641\u062A\u062D \u0627\u0644\u0631\u0627\u0628\u0637 \u0641\u064A \u0635\u0641\u062D\u0629 \u062C\u062F\u064A\u062F\u0629", +link_titlefield:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646", +link_is_email:"\u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0630\u064A \u0623\u062F\u062E\u0644\u062A\u0647 \u064A\u0628\u062F\u0648 \u0623\u0646\u0647 \u0639\u0646\u0648\u0627\u0646 \u0628\u0631\u064A\u062F \u0627\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u060C \u0646\u0647\u0644 \u062A\u0631\u064A\u062F \u0627\u0636\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062F\u0626\u0629 mailto: \u061F", +link_is_external:"\u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0630\u064A \u0623\u0636\u0641\u062A\u0647 \u064A\u0628\u062F\u0648 \u0623\u0646\u0647 \u0631\u0627\u0628\u0637 \u0644\u0635\u0641\u062D\u0629 \u062E\u0627\u0631\u062C\u064A\u0629\u060C \u0647\u0644 \u062A\u0631\u064A\u062F \u0627\u0636\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062F\u0626\u0629 http:// \u061F", +link_list:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0631\u0648\u0627\u0628\u0637" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bg.js new file mode 100644 index 00000000..6fb882e5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bg.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('bg.advanced',{ +style_select:"\u0421\u0442\u0438\u043B\u043E\u0432\u0435", +font_size:"\u0420\u0430\u0437\u043C\u0435\u0440 \u043D\u0430 \u0448\u0440\u0438\u0444\u0442\u0430", +fontdefault:"\u0428\u0440\u0438\u0444\u0442", +block:"\u0424\u043E\u0440\u043C\u0430\u0442", +paragraph:"\u041F\u0430\u0440\u0430\u0433\u0440\u0430\u0444", +div:"Div", +address:"\u0410\u0434\u0440\u0435\u0441", +pre:"\u041F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u043D\u043E \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u0430\u043D", +h1:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435 1", +h2:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435 2", +h3:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435 3", +h4:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435 4", +h5:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435 5", +h6:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435 6", +blockquote:"\u0426\u0438\u0442\u0430\u0442", +code:"\u041A\u043E\u0434", +samp:"\u041F\u0440\u043E\u043C\u0435\u0440\u0435\u043D \u043A\u043E\u0434", +dt:"\u0414\u0435\u0444\u0438\u043D\u0438\u0446\u0438\u044F ", +dd:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043D\u0430 \u0434\u0435\u0444\u0438\u043D\u0438\u0446\u0438\u044F", +bold_desc:"\u041F\u043E\u043B\u0443\u0447\u0435\u0440 (Ctrl+B)", +italic_desc:"\u041A\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)", +underline_desc:"\u041F\u043E\u0434\u0447\u0435\u0440\u0442\u0430\u043D (Ctrl+U)", +striketrough_desc:"\u0417\u0430\u0447\u0435\u0440\u0442\u0430\u043D", +justifyleft_desc:"\u041F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435 \u043E\u0442\u043B\u044F\u0432\u043E", +justifycenter_desc:"\u0426\u0435\u043D\u0442\u0440\u0438\u0440\u0430\u043D\u043E", +justifyright_desc:"\u041F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435 \u043E\u0442\u0434\u044F\u0441\u043D\u043E", +justifyfull_desc:"\u0414\u0432\u0443\u0441\u0442\u0440\u0430\u043D\u043D\u043E", +bullist_desc:"\u0412\u043E\u0434\u0430\u0447\u0438", +numlist_desc:"\u041D\u043E\u043C\u0435\u0440\u0430", +outdent_desc:"\u041D\u0430\u043C\u0430\u043B\u044F\u0432\u0430\u043D\u0435 \u043D\u0430 \u043E\u0442\u0441\u0442\u044A\u043F\u0430", +indent_desc:"\u0423\u0432\u0435\u043B\u0438\u0447\u0430\u0432\u0430\u043D\u0435 \u043D\u0430 \u043E\u0442\u0441\u0442\u044A\u043F\u0430", +undo_desc:"\u041E\u0442\u043C\u044F\u043D\u0430 (Ctrl+Z)", +redo_desc:"\u0412\u044A\u0437\u0441\u0442\u0430\u043D\u043E\u0432\u044F\u0432\u0430\u043D\u0435 (Ctrl+Y)", +link_desc:"\u0412\u043C\u044A\u043A\u0432\u0430\u043D\u0435/\u0440\u0435\u0434\u0430\u043A\u0446\u0438\u044F \u043D\u0430 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430", +unlink_desc:"\u041F\u0440\u0435\u043C\u0430\u0445\u043D\u0438 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430", +image_desc:"\u0412\u043C\u044A\u043A\u0432\u0430\u043D\u0435/\u0440\u0435\u0434\u0430\u043A\u0446\u0438\u044F \u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +cleanup_desc:"\u0418\u0437\u0447\u0438\u0441\u0442\u0438 \u043A\u043E\u0434\u0430", +code_desc:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 HTML", +sub_desc:"\u0414\u043E\u043B\u0435\u043D \u0438\u043D\u0434\u0435\u043A\u0441", +sup_desc:"\u0413\u043E\u0440\u0435\u043D \u0438\u043D\u0434\u0435\u043A\u0441", +hr_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u0445\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u043D\u0430 \u043B\u0438\u043D\u0438\u044F", +removeformat_desc:"\u041F\u0440\u0435\u043C\u0430\u0445\u043D\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u0430\u043D\u0435\u0442\u043E", +custom1_desc:"\u0412\u0430\u0448\u0435\u0442\u043E \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0442\u0443\u043A", +forecolor_desc:"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044F\u0442 \u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0430", +backcolor_desc:"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044F\u0442 \u043D\u0430 \u0444\u043E\u043D\u0430", +charmap_desc:"\u0412\u043C\u044A\u043A\u043D\u0438 \u0441\u0438\u043C\u0432\u043E\u043B", +visualaid_desc:"\u0412\u043A\u043B./\u0438\u0437\u043A\u043B. \u043D\u0435\u0432\u0438\u0434\u0438\u043C\u0438\u0442\u0435 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438", +anchor_desc:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u043A\u043E\u0442\u0432\u0430", +cut_desc:"\u0418\u0437\u0440\u044F\u0437\u0432\u0430\u043D\u0435", +copy_desc:"\u041A\u043E\u043F\u0438\u0440\u0430\u043D\u0435", +paste_desc:"\u041F\u043E\u0441\u0442\u0430\u0432\u044F\u043D\u0435", +image_props_desc:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430\u0442\u0430", +newdocument_desc:"\u041D\u043E\u0432 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442", +help_desc:"\u041F\u043E\u043C\u043E\u0449", +blockquote_desc:"\u0426\u0438\u0442\u0430\u0442", +clipboard_msg:"\u041A\u043E\u043F\u0438\u0440\u0430\u043D\u0435/\u041E\u0442\u0440\u044F\u0437\u0432\u0430\u043D\u0435/\u041F\u043E\u0441\u0442\u0430\u0432\u044F\u043D\u0435 \u043D\u0435 \u0435 \u0434\u043E\u0441\u0442\u044A\u043F\u043D\u043E \u043F\u043E\u0434 Mozilla \u0438 Firefox.\r\n\u0416\u0435\u043B\u0430\u0435\u0442\u0435 \u043B\u0438 \u043F\u043E\u0432\u0435\u0447\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0437\u0430 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430?", +path:"\u041F\u044A\u0442", +newdocument:"\u0421\u0438\u0433\u0443\u0440\u0435\u043D \u043B\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043A\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0446\u044F\u043B\u043E\u0442\u043E \u0441\u044A\u0434\u044A\u0440\u0436\u0430\u043D\u0438\u0435?", +toolbar_focus:"\u041E\u0442\u0438\u0434\u0438 \u043F\u0440\u0438 \u0431\u0443\u0442\u043E\u043D\u0438\u0442\u0435 - Alt+Q, \u041E\u0442\u0438\u0434\u0438 \u043F\u0440\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 - Alt-Z, \u041E\u0442\u0438\u0434\u0438 \u043F\u0440\u0438 \u043F\u044A\u0442\u0435\u043A\u0430\u0442\u0430 \u043D\u0430 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438\u0442\u0435 - Alt-X", +more_colors:"\u041E\u0449\u0435 \u0446\u0432\u0435\u0442\u043E\u0432\u0435" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bg_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bg_dlg.js new file mode 100644 index 00000000..55d5b51a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bg_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('bg.advanced_dlg',{ +about_title:"\u041E\u0442\u043D\u043E\u0441\u043D\u043E TinyMCE", +about_general:"\u041E\u0442\u043D\u043E\u0441\u043D\u043E", +about_help:"\u041F\u043E\u043C\u043E\u0449", +about_license:"\u041B\u0438\u0446\u0435\u043D\u0437", +about_plugins:"\u0414\u043E\u0431\u0430\u0432\u043A\u0438", +about_plugin:"\u0414\u043E\u0431\u0430\u0432\u043A\u0430", +about_author:"\u0410\u0432\u0442\u043E\u0440", +about_version:"\u0412\u0435\u0440\u0441\u0438\u044F", +about_loaded:"\u0417\u0430\u0440\u0435\u0434\u0435\u043D\u0438 \u0434\u043E\u0431\u0430\u0432\u043A\u0438", +anchor_title:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u043A\u043E\u0442\u0432\u0430", +anchor_name:"\u0418\u043C\u0435 \u043D\u0430 \u043A\u043E\u0442\u0432\u0430\u0442\u0430", +code_title:"\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0430 HTML", +code_wordwrap:"\u041F\u0440\u0435\u043D\u043E\u0441 \u043D\u0430 \u0434\u0443\u043C\u0438", +colorpicker_title:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0446\u0432\u044F\u0442", +colorpicker_picker_tab:"\u0418\u0437\u0431\u043E\u0440", +colorpicker_picker_title:"\u0418\u0437\u0431\u043E\u0440 \u043D\u0430 \u0446\u0432\u044F\u0442", +colorpicker_palette_tab:"\u041F\u0430\u043B\u0438\u0442\u0440\u0430", +colorpicker_palette_title:"\u0426\u0432\u0435\u0442\u043E\u0432\u0430 \u043F\u0430\u043B\u0438\u0442\u0440\u0430", +colorpicker_named_tab:"\u0418\u043C\u0435\u043D\u0443\u0432\u0430\u043D\u0438", +colorpicker_named_title:"\u0418\u043C\u0435\u043D\u0443\u0432\u0430\u043D\u0438 \u0446\u0432\u0435\u0442\u043E\u0432\u0435", +colorpicker_color:"\u0426\u0432\u044F\u0442:", +colorpicker_name:"\u0418\u043C\u0435:", +charmap_title:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0438\u043C\u0432\u043E\u043B", +image_title:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +image_src:"URL \u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +image_alt:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430", +image_list:"\u0421\u043F\u0438\u0441\u044A\u043A \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438", +image_border:"\u0420\u0430\u043C\u043A\u0430", +image_dimensions:"\u0420\u0430\u0437\u043C\u0435\u0440\u0438", +image_vspace:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u043D\u043E \u0440\u0430\u0437\u0441\u0442\u043E\u044F\u043D\u0438\u0435", +image_hspace:"\u0425\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u043D\u043E \u0440\u0430\u0437\u0441\u0442\u043E\u044F\u043D\u0438\u0435", +image_align:"\u041F\u043E\u0434\u0440\u0430\u0432\u043D\u044F\u0432\u0430\u043D\u0435", +image_align_baseline:"\u0411\u0430\u0437\u043E\u0432\u0430 \u043B\u0438\u043D\u0438\u044F", +image_align_top:"\u0413\u043E\u0440\u0435", +image_align_middle:"\u0426\u0435\u043D\u0442\u0440\u0438\u0440\u0430\u043D\u0435", +image_align_bottom:"\u0414\u043E\u043B\u0443", +image_align_texttop:"\u0422\u0435\u043A\u0441\u0442 \u0433\u043E\u0440\u0435", +image_align_textbottom:"\u0422\u0435\u043A\u0441\u0442 \u0434\u043E\u043B\u0443", +image_align_left:"\u041B\u044F\u0432\u043E", +image_align_right:"\u0414\u044F\u0441\u043D\u043E", +link_title:"\u0412\u043C\u044A\u043A\u043D\u0438/\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430", +link_url:"URL \u043D\u0430 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430", +link_target:"\u0426\u0435\u043B", +link_target_same:"\u041E\u0442\u0432\u043E\u0440\u0438 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430\u0442\u0430 \u0432 \u0441\u044A\u0449\u0438\u044F\u0442 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446", +link_target_blank:"\u041E\u0442\u0432\u043E\u0440\u0438 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430\u0442\u0430 \u0432 \u043D\u043E\u0432 \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446", +link_titlefield:"\u0417\u0430\u0433\u043B\u0430\u0432\u0438\u0435", +link_is_email:"URL-\u0442\u043E \u043A\u043E\u0435\u0442\u043E \u0432\u044A\u0432\u0435\u0434\u043E\u0445\u0442\u0435 \u0435 email \u0430\u0434\u0440\u0435\u0441, \u0436\u0435\u043B\u0430\u0435\u0442\u0435 \u043B\u0438 \u0434\u0430 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u0435 \u043D\u0443\u0436\u043D\u0438\u044F\u0442 mailto: \u043F\u0440\u0435\u0444\u0438\u043A\u0441?", +link_is_external:"URL-\u0442\u043E \u043A\u043E\u0435\u0442\u043E \u0432\u044A\u0432\u0435\u0434\u043E\u0445\u0442\u0435 \u0435 \u0432\u044A\u043D\u0448\u043D\u0430 \u0445\u0438\u043F\u0435\u0440\u0432\u0440\u044A\u0437\u043A\u0430, \u0436\u0435\u043B\u0430\u0435\u0442\u0435 \u043B\u0438 \u0434\u0430 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u0435 \u043D\u0443\u0436\u043D\u0438\u044F\u0442 http:// \u043F\u0440\u0435\u0444\u0438\u043A\u0441?", +link_list:"\u0421\u043F\u0438\u0441\u044A\u043A \u043B\u0438\u043D\u043A\u043E\u0432\u0435" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/br.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/br.js new file mode 100644 index 00000000..40234347 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/br.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('br.advanced',{ +style_select:"Estilos", +font_size:"Tamanho", +fontdefault:"Fam\u00C3\u0083\u00C2\u00ADlia(Fonte)", +block:"Formata\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +paragraph:"Par\u00C3\u0083\u00C2\u00A1grafo", +div:"Div", +address:"Endere\u00C3\u0083\u00C2\u00A7o", +pre:"Pr\u00C3\u0083\u00C2\u00A9-formatado", +h1:"Cabe\u00C3\u0083\u00C2\u00A7alho 1", +h2:"Cabe\u00C3\u0083\u00C2\u00A7alho 2", +h3:"Cabe\u00C3\u0083\u00C2\u00A7alho 3", +h4:"Cabe\u00C3\u0083\u00C2\u00A7alho 4", +h5:"Cabe\u00C3\u0083\u00C2\u00A7alho 5", +h6:"Cabe\u00C3\u0083\u00C2\u00A7alho 6", +blockquote:"Cita\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o em bloco", +code:"C\u00C3\u0083\u00C2\u00B3digo", +samp:"Amostra de c\u00C3\u0083\u00C2\u00B3digo", +dt:"Termo de defini\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +dd:"Descri\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o de defini\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +bold_desc:"Negrito (Ctrl+B)", +italic_desc:"It\u00C3\u0083\u00C2\u00A1lico (Ctrl+I)", +underline_desc:"Sublinhado (Ctrl+U)", +striketrough_desc:"Rasurado", +justifyleft_desc:"Alinhar \u00C3\u0083\u00C2\u00A0\u00C3\u0082\u00C2\u00A0 esquerda", +justifycenter_desc:"Centrar", +justifyright_desc:"Alinhar \u00C3\u0083\u00C2\u00A0\u00C3\u0082\u00C2\u00A0 direita", +justifyfull_desc:"Justificar", +bullist_desc:"Marcadores", +numlist_desc:"Numera\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +outdent_desc:"Diminuir recuo", +indent_desc:"Aumentar recuo", +undo_desc:"Desfazer (Ctrl+Z)", +redo_desc:"Refazer (Ctrl+Y)", +link_desc:"Inserir/editar hyperlink", +unlink_desc:"Remover hyperlink", +image_desc:"Inserir/editar imagem", +cleanup_desc:"Limpar c\u00C3\u0083\u00C2\u00B3digo incorrecto", +code_desc:"Editar c\u00C3\u0083\u00C2\u00B3digo fonte", +sub_desc:"Subscrito", +sup_desc:"Superscrito", +hr_desc:"Inserir separador horizontal", +removeformat_desc:"Remover formata\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o", +custom1_desc:"Insira aqui a sua descri\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o personalizada", +forecolor_desc:"Seleccionar cor do texto", +backcolor_desc:"Seleccionar cor de fundo", +charmap_desc:"Inserir caracteres especiais", +visualaid_desc:"Alternar guias/elementos invis\u00C3\u0083\u00C2\u00ADveis", +anchor_desc:"Inserir/editar \u00C3\u0083\u00C2\u00A2ncora", +cut_desc:"Cortar", +copy_desc:"Copiar", +paste_desc:"Colar", +image_props_desc:"Propriedades de imagem", +newdocument_desc:"Novo documento", +help_desc:"Ajuda", +blockquote_desc:"Cita\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o em bloco", +clipboard_msg:"Copiar/cortar/colar n\u00C3\u0083\u00C2\u00A3o est\u00C3\u0083\u00C2\u00A1 dispon\u00C3\u0083\u00C2\u00ADvel em Mozilla e Firefox. Deseja mais informa\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00B5es sobre isso?", +path:"Endere\u00C3\u0083\u00C2\u00A7o", +newdocument:"Tem a certeza de que deseja apagar tudo?", +toolbar_focus:"Ir para ferramentas - Alt+Q, Ir para o editor - Alt-Z, Ir para endere\u00C3\u0083\u00C2\u00A7o do elemento - Alt-X", +more_colors:"Mais cores" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/br_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/br_dlg.js new file mode 100644 index 00000000..e1cee90e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/br_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('br.advanced_dlg',{ +about_title:"Sobre o TinyMCE", +about_general:"Sobre", +about_help:"Ajuda", +about_license:"Licen\u00C3\u0083\u00C2\u00A7a", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Autor", +about_version:"Vers\u00C3\u0083\u00C2\u00A3o", +about_loaded:"Plugins Instalados", +anchor_title:"Inserir/editar \u00C3\u0083\u00C2\u00A2ncora", +anchor_name:"Nome da \u00C3\u0083\u00C2\u00A2ncora", +code_title:"Editor HTML", +code_wordwrap:"Quebra autom\u00C3\u0083\u00C2\u00A1tica de linha", +colorpicker_title:"Seleccione uma cor", +colorpicker_picker_tab:"Editor", +colorpicker_picker_title:"Editor de Cores", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta de Cores", +colorpicker_named_tab:"Personalizadas", +colorpicker_named_title:"Cores Personalizadas", +colorpicker_color:"Cor:", +colorpicker_name:"Nome:", +charmap_title:"Seleccionar caracteres personalizados", +image_title:"Inserir/editar imagem", +image_src:"Endere\u00C3\u0083\u00C2\u00A7o da imagem", +image_alt:"Descri\u00C3\u0083\u00C2\u00A7\u00C3\u0083\u00C2\u00A3o da imagem", +image_list:"Lista de imagens", +image_border:"Limites", +image_dimensions:"Dimens\u00C3\u0083\u00C2\u00B5es", +image_vspace:"Espa\u00C3\u0083\u00C2\u00A7o Vertical", +image_hspace:"Espa\u00C3\u0083\u00C2\u00A7o Horizontal", +image_align:"Alinhamento", +image_align_baseline:"Sobre a linha de texto", +image_align_top:"Topo", +image_align_middle:"Meio", +image_align_bottom:"Abaixo", +image_align_texttop:"Topo do texto", +image_align_textbottom:"Base do texto", +image_align_left:"Esquerda", +image_align_right:"Direita", +link_title:"Inserir/editar hyperlink", +link_url:"URL do hyperink", +link_target:"Alvo", +link_target_same:"Abrir hyperlink na mesma janela", +link_target_blank:"Abrir hyperlink em nova janela", +link_titlefield:"T\u00C3\u0083\u00C2\u00ADtulo", +link_is_email:"A URL digitada parece ser um endere\u00C3\u0083\u00C2\u00A7o de e-mail. Deseja acrescentar o (necess\u00C3\u0083\u00C2\u00A1rio) prefixo mailto:?", +link_is_external:"A URL digitada parece conduzir a um link externo. Deseja acrescentar o (necess\u00C3\u0083\u00C2\u00A1rio) prefixo http://?", +link_list:"Lista de Links" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bs.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bs.js new file mode 100644 index 00000000..16b69dea --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bs.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('bs.advanced',{ +style_select:"Stilovi", +font_size:"Veli\u010Dina pisma", +fontdefault:"Vrsta pisma", +block:"Format", +paragraph:"Paragraf", +div:"Div", +address:"Adresa", +pre:"Oblikovano", +h1:"Naslov 1", +h2:"Naslov 2", +h3:"Naslov 3", +h4:"Naslov 4", +h5:"Naslov 5", +h6:"Naslov 6", +blockquote:"Citat", +code:"Kod", +samp:"Primjer koda", +dt:"Definicija pojma", +dd:"Opis definicije", +bold_desc:"Podebljaj (Ctrl+B)", +italic_desc:"Kurziv (Ctrl+I)", +underline_desc:"Podcrtaj (Ctrl+U)", +striketrough_desc:"Precrtaj", +justifyleft_desc:"Poravnaj lijevo", +justifycenter_desc:"Centriraj", +justifyright_desc:"Poravnaj desno", +justifyfull_desc:"Poravnaj potpuno", +bullist_desc:"Neure\u0111ena lista", +numlist_desc:"Ure\u0111ena lista", +outdent_desc:"Uvuci", +indent_desc:"Izvuci", +undo_desc:"Poni\u0161ti (Ctrl+Z)", +redo_desc:"Ponovi (Ctrl+Y)", +link_desc:"Umetni/uredi poveznicu", +unlink_desc:"Poni\u0161ti poveznicu", +image_desc:"Umetni/uredi sliku", +cleanup_desc:"Po\u010Disti kod", +code_desc:"Uredi HTML izvor", +sub_desc:"Indeks", +sup_desc:"Eksponent", +hr_desc:"Umetni vodoravnu crtu", +removeformat_desc:"Poni\u0161ti oblikovanje", +custom1_desc:"Vlastiti opis ovdje", +forecolor_desc:"Odaberite boju teksta", +backcolor_desc:"Odaberite boju pozadine", +charmap_desc:"Umetni vlastiti znak", +visualaid_desc:"Vodilice/nevidljivi elementi", +anchor_desc:"Umetni/uredi sidro", +cut_desc:"Izre\u017Ei", +copy_desc:"Kopiraj", +paste_desc:"Zalijepi", +image_props_desc:"Svojstva slike", +newdocument_desc:"Novi dokument", +help_desc:"Pomo\u0107", +blockquote_desc:"Citiraj", +clipboard_msg:"Kopiraj/Izre\u017Ei/Zalijepi nije dostupno u Mozilla i Firefox preglednicima. Vi\u0161e informacija?", +path:"Staza", +newdocument:"Jeste li sigurni da \u017Eelite izbrisati cijeli sadr\u017Eaj?", +toolbar_focus:"Prije\u0111i na alatnu traku - Alt+Q, prije\u0111i na ure\u0111iva\u010D - Alt-Z, prije\u0111i na element path - Alt-X", +more_colors:"Vi\u0161e boja" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bs_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bs_dlg.js new file mode 100644 index 00000000..6acdc380 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/bs_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('bs.advanced_dlg',{ +about_title:"TinyMCE", +about_general:"O programu", +about_help:"Pomo\u0107", +about_license:"Licenca", +about_plugins:"Dodaci", +about_plugin:"Dodatak", +about_author:"Autor", +about_version:"Verzija", +about_loaded:"Postoje\u0107i dodaci", +anchor_title:"Umetni/uredi sidro", +anchor_name:"Ime sidra", +code_title:"HTML ure\u0111iva\u010D", +code_wordwrap:"Omatanje teksta", +colorpicker_title:"Izbor boje", +colorpicker_picker_tab:"Odabir", +colorpicker_picker_title:"Odabir boje", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta boja", +colorpicker_named_tab:"Imenovano", +colorpicker_named_title:"Imenovane boje", +colorpicker_color:"Boja:", +colorpicker_name:"Naziv:", +charmap_title:"Odaberite znak", +image_title:"Umetni/uredi sliku", +image_src:"URL slike", +image_alt:"Opis slike", +image_list:"Lista slika", +image_border:"Obrub", +image_dimensions:"Dimenzije", +image_vspace:"Okomiti razmak", +image_hspace:"Vodoravni razmak", +image_align:"Poravnavanje", +image_align_baseline:"Osnovna linija", +image_align_top:"Vrh", +image_align_middle:"Sredina", +image_align_bottom:"Dno", +image_align_texttop:"Vrh teksta", +image_align_textbottom:"Dno teksta", +image_align_left:"Lijevo", +image_align_right:"Desno", +link_title:"Umetni/uredi poveznicu", +link_url:"URL poveznice", +link_target:"Meta", +link_target_same:"Otvori poveznicu u istom prozoru", +link_target_blank:"Otvori poveznicu u novom prozoru", +link_titlefield:"Naslov", +link_is_email:"URL koji ste unijeli izgleda kao e-mail adresa, \u017Eelite li dodati potrebni mailto: prefiks?", +link_is_external:"URL koji ste unijeli izgleda kao vanjska poveznica, \u017Eelite li dodati potrebni http:// prefiks?", +link_list:"Lista poveznica" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ca.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ca.js new file mode 100644 index 00000000..7fa1bf95 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ca.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ca.advanced',{ +style_select:"Estils", +font_size:"Mida de lletra", +fontdefault:"Tipografia", +block:"Format", +paragraph:"Par\u00E0graf", +div:"Div", +address:"Adre\u00E7a", +pre:"Preformatat", +h1:"Cap\u00E7alera 1", +h2:"Cap\u00E7alera 2", +h3:"Cap\u00E7alera 3", +h4:"Cap\u00E7alera 4", +h5:"Cap\u00E7alera 5", +h6:"Cap\u00E7alera 6", +blockquote:"Cita", +code:"Codi", +samp:"Mostra de codi", +dt:"Terme de la definici\u00F3", +dd:"Descripci\u00F3 de la definici\u00F3", +bold_desc:"Negreta (Ctrl+B)", +italic_desc:"Cursiva (Ctrl+I)", +underline_desc:"Subratllat (Ctrl+U)", +striketrough_desc:"Tatxat", +justifyleft_desc:"Alinea a l'esquerra", +justifycenter_desc:"Centra", +justifyright_desc:"Alinea a la dreta", +justifyfull_desc:"Justifica", +bullist_desc:"Llista no ordenada", +numlist_desc:"Llista ordenada", +outdent_desc:"Redueix el sagnat", +indent_desc:"Augmenta el sagnat", +undo_desc:"Desf\u00E9s (Ctrl+Z)", +redo_desc:"Ref\u00E9s (Ctrl+Y)", +link_desc:"Insereix/edita enlla\u00E7", +unlink_desc:"Desenlla\u00E7a", +image_desc:"Insereix/edita imatge", +cleanup_desc:"Neteja el codi no correcte", +code_desc:"Edita la font HTML", +sub_desc:"Sub\u00EDndex", +sup_desc:"Super\u00EDndex", +hr_desc:"Insereix regle horitzontal", +removeformat_desc:"Elimina el format", +custom1_desc:"Aqu\u00ED la teva descripci\u00F3 personalitzada", +forecolor_desc:"Selecciona el color del text", +backcolor_desc:"Selecciona el color de fons", +charmap_desc:"Insereix car\u00E0cter personalitzat", +visualaid_desc:"Canvia els elements guies/invisibles", +anchor_desc:"Insereix/edita \u00E0ncora", +cut_desc:"Retalla", +copy_desc:"Copia", +paste_desc:"Enganxa", +image_props_desc:"Propietats de la imatge", +newdocument_desc:"Nou document", +help_desc:"Ajuda", +blockquote_desc:"Descripci\u00F3 de la cita", +clipboard_msg:"Copia/Retalla/Enganxa no est\u00E0 disponible en Mozilla/Firefox.\r\nVols m\u00E9s informaci\u00F3 sobre aquest tema?", +path:"Cam\u00ED", +newdocument:"Segur que vols esborrar tot el contingut?", +toolbar_focus:"Salta als botons d'eines - Alt+Q, Salta a l'editor - Alt-Z, Salta al cam\u00ED de l'element - Alt-X", +more_colors:"M\u00E9s colors" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ca_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ca_dlg.js new file mode 100644 index 00000000..e0cc6eea --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ca_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ca.advanced_dlg',{ +about_title:"Quant a TinyMCE", +about_general:"Quant a", +about_help:"Ajuda", +about_license:"Llic\u00E8ncia", +about_plugins:"Extensions", +about_plugin:"Extensi\u00F3", +about_author:"Autor", +about_version:"Versi\u00F3", +about_loaded:"Extensions carregades", +anchor_title:"Insereix/edita \u00E0ncora", +anchor_name:"Nom de l'\u00E0ncora", +code_title:"Editor de Font HTML", +code_wordwrap:"Salt de paraula", +colorpicker_title:"Selecciona un color", +colorpicker_picker_tab:"Triador", +colorpicker_picker_title:"Triador de color", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Colors de la paleta", +colorpicker_named_tab:"Amb nom", +colorpicker_named_title:"Colors amb nom", +colorpicker_color:"Color:", +colorpicker_name:"Nom:", +charmap_title:"Selecciona el car\u00E0cter personalitzat", +image_title:"Insereix/edita imatge", +image_src:"URL de la imatge", +image_alt:"Descripci\u00F3 de la imatge", +image_list:"Llista d'imatges", +image_border:"Vora", +image_dimensions:"Dimensions", +image_vspace:"Espaiat vertical", +image_hspace:"Espaiat horitzontal", +image_align:"Alineaci\u00F3", +image_align_baseline:"L\u00EDnia base", +image_align_top:"Dalt", +image_align_middle:"Mig", +image_align_bottom:"Baix", +image_align_texttop:"A dalt del text", +image_align_textbottom:"A baix del text", +image_align_left:"Esquerra", +image_align_right:"Dreta", +link_title:"Insereix/edita enlla\u00E7", +link_url:"URL de l'enlla\u00E7", +link_target:"Objectiu", +link_target_same:"Obre l'enlla\u00E7 a la mateixa finestra", +link_target_blank:"Obre l'enlla\u00E7 en una finestra nova", +link_titlefield:"T\u00EDtol", +link_is_email:"L'URL que has introdu\u00EFt sembla una adre\u00E7a de correu, vols afegir-hi el prefix mailto://?", +link_is_external:"L'URL que has introdu\u00EFt sembla un enlla\u00E7 extern, vols afegir-hi el prefix http://?", +link_list:"Llista d'enlla\u00E7os" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ch.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ch.js new file mode 100644 index 00000000..ab0bbc01 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ch.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ch.advanced',{ +style_select:"\u6837\u5F0F", +font_size:"\u5B57\u4F53\u5927\u5C0F", +fontdefault:"\u5B57\u578B", +block:"\u683C\u5F0F", +paragraph:"\u6BB5\u843D", +div:"Div", +address:"\u5730\u5740", +pre:"\u539F\u59CB\u683C\u5F0F", +h1:"\u6807\u98981", +h2:"\u6807\u98982", +h3:"\u6807\u98983", +h4:"\u6807\u98984", +h5:"\u6807\u98985", +h6:"\u6807\u98986", +blockquote:"\u5F15\u7528", +code:"\u539F\u59CB\u7801", +samp:"\u7A0B\u5E8F\u8303\u4F8B", +dt:"\u540D\u8BCD\u5B9A\u4E49", +dd:"\u540D\u8BCD\u89E3\u91CA", +bold_desc:"\u7C97\u4F53(Ctrl+B)", +italic_desc:"\u659C\u4F53(Ctrl+I)", +underline_desc:"\u5E95\u7EBF(Ctrl+U)", +striketrough_desc:"\u5220\u9664\u7EBF", +justifyleft_desc:"\u9760\u5DE6\u5BF9\u9F50", +justifycenter_desc:"\u7F6E\u4E2D", +justifyright_desc:"\u9760\u53F3\u5BF9\u9F50", +justifyfull_desc:"\u5DE6\u53F3\u5BF9\u9F50", +bullist_desc:"\u9879\u76EE\u65B9\u5F0F\u5217\u8868", +numlist_desc:"\u7F16\u53F7\u65B9\u5F0F\u5217\u8868", +outdent_desc:"\u51CF\u5C11\u7F29\u8FDB", +indent_desc:"\u589E\u52A0\u7F29\u8FDB", +undo_desc:"\u8FD8\u539F(Ctrl+Z)", +redo_desc:"\u91CD\u505A(Ctrl+Y)", +link_desc:"\u63D2\u5165/\u7F16\u8F91\u94FE\u63A5", +unlink_desc:"\u53D6\u6D88\u94FE\u63A5", +image_desc:"\u63D2\u5165/\u7F16\u8F91\u56FE\u7247", +cleanup_desc:"\u6E05\u9664\u65E0\u6548\u539F\u59CB\u7801", +code_desc:"\u7F16\u8F91HTML\u539F\u59CB\u7801", +sub_desc:"\u4E0B\u6807", +sup_desc:"\u4E0A\u6807", +hr_desc:"\u63D2\u5165\u6C34\u5E73\u5206\u5272\u7EBF", +removeformat_desc:"\u6E05\u9664\u6837\u5F0F", +custom1_desc:"\u5728\u6B64\u8F93\u5165\u81EA\u5B9A\u4E49\u63CF\u8FF0", +forecolor_desc:"\u9009\u62E9\u6587\u5B57\u989C\u8272", +backcolor_desc:"\u9009\u62E9\u80CC\u666F\u989C\u8272", +charmap_desc:"\u63D2\u5165\u81EA\u5B9A\u4E49\u7B26\u53F7", +visualaid_desc:"\u5207\u6362\u53EF\u89C1/\u9690\u85CF\u5143\u7D20", +anchor_desc:"\u63D2\u5165/\u7F16\u8F91\u951A\u70B9", +cut_desc:"\u526A\u4E0B(Ctrl+X)", +copy_desc:"\u590D\u5236(Ctrl+C)", +paste_desc:"\u8D34\u4E0A(Ctrl+V)", +image_props_desc:"\u56FE\u7247\u5C5E\u6027", +newdocument_desc:"\u5F00\u65B0\u6863\u6848", +help_desc:"\u8BF4\u660E", +blockquote_desc:"\u5F15\u7528", +clipboard_msg:"\u590D\u5236/\u526A\u4E0B/\u8D34\u4E0A\u529F\u80FD\u5728Mozilla\u548CFirefox\u4E2D\u65E0\u6CD5\u4F7F\u7528\u3002 \n\u60F3\u66F4\u6DF1\u5165\u4E86\u89E3\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F ", +path:"\u8DEF\u5F84", +newdocument:"\u4F60\u786E\u5B9A\u8981\u6E05\u9664\u6240\u6709\u5185\u5BB9\u5417\uFF1F ", +toolbar_focus:"\u79FB\u81F3\u5DE5\u5177\u680F- Alt+Q,\u79FB\u81F3\u7F16\u8F91\u5668- Alt-Z,\u79FB\u81F3\u5143\u7D20\u8DEF\u5F84- Alt-X", +more_colors:"\u66F4\u591A\u989C\u8272" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ch_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ch_dlg.js new file mode 100644 index 00000000..81f7f509 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ch_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ch.advanced_dlg',{ +about_title:"\u5173\u4E8ETinyMCE", +about_general:"\u5173\u4E8E", +about_help:"\u8BF4\u660E", +about_license:"\u6388\u6743", +about_plugins:"\u5916\u6302\u7EC4\u4EF6", +about_plugin:"\u5916\u6302\u7EC4\u4EF6", +about_author:"\u4F5C\u8005", +about_version:"\u7248\u672C", +about_loaded:"\u5DF2\u52A0\u8F7D\u7684\u5916\u6302\u7EC4\u4EF6", +anchor_title:"\u63D2\u5165/\u7F16\u8F91\u951A\u70B9", +anchor_name:"\u951A\u70B9\u540D\u79F0", +code_title:"HTML\u539F\u59CB\u7801\u7F16\u8F91\u5668", +code_wordwrap:"\u81EA\u52A8\u6362\u884C", +colorpicker_title:"\u9009\u62E9\u989C\u8272", +colorpicker_picker_tab:"\u9009\u8272\u5668", +colorpicker_picker_title:"\u9009\u8272\u5668", +colorpicker_palette_tab:"\u8272\u76D8", +colorpicker_palette_title:"\u8272\u76D8\u989C\u8272", +colorpicker_named_tab:"\u8272\u540D", +colorpicker_named_title:"\u989C\u8272\u540D\u79F0", +colorpicker_color:"\u989C\u8272\uFF1A", +colorpicker_name:"\u540D\u79F0\uFF1A", +charmap_title:"\u9009\u62E9\u81EA\u5B9A\u4E49\u5B57\u7B26\u7B26\u53F7", +image_title:"\u63D2\u5165/\u7F16\u8F91\u56FE\u7247", +image_src:"\u56FE\u7247URL", +image_alt:"\u56FE\u7247\u8BF4\u660E", +image_list:"\u56FE\u7247\u6863\u6E05\u5355", +image_border:"\u8FB9\u6846", +image_dimensions:"\u5C3A\u5BF8", +image_vspace:"\u5782\u76F4\u95F4\u8DDD", +image_hspace:"\u6C34\u5E73\u95F4\u8DDD", +image_align:"\u5BF9\u9F50\u65B9\u5F0F", +image_align_baseline:"\u57FA\u7EBF", +image_align_top:"\u7F6E\u9876\u5BF9\u9F50", +image_align_middle:"\u7F6E\u4E2D", +image_align_bottom:"\u7F6E\u5E95\u5BF9\u9F50", +image_align_texttop:"\u6587\u5B57\u4E0A\u65B9", +image_align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +image_align_left:"\u9760\u5DE6\u5BF9\u9F50", +image_align_right:"\u9760\u53F3\u5BF9\u9F50", +link_title:"\u63D2\u5165/\u7F16\u8F91\u94FE\u63A5", +link_url:"\u94FE\u63A5URL", +link_target:"\u76EE\u6807", +link_target_same:"\u76EE\u524D\u89C6\u7A97\u5F00\u542F\u94FE\u63A5", +link_target_blank:"\u65B0\u89C6\u7A97\u5F00\u542F\u94FE\u63A5", +link_titlefield:"\u6807\u9898", +link_is_email:"\u4F60\u8F93\u5165\u7684URL\u4F3C\u4E4E\u662F\u4E00\u4E2AEmail\u5730\u5740\uFF0C\u662F\u5426\u8981\u52A0\u4E0A\u524D\u7F6E\u8BCD\"mailto:\" \uFF1F ", +link_is_external:"\u4F60\u8F93\u5165\u7684URL\u4F3C\u4E4E\u662F\u4E00\u4E2A\u5916\u90E8\u94FE\u63A5\uFF0C\u662F\u5426\u8981\u52A0\u4E0A\u524D\u7F6E\u8BCD\"http://\" \uFF1F ", +link_list:"\u94FE\u63A5\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/cs.js new file mode 100644 index 00000000..afef934b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/cs.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('cs.advanced',{ +style_select:"--- Styly ---", +font_size:"- Velikost p\u00EDsma -", +fontdefault:"--- P\u00EDsma ---", +block:"-- Form\u00E1t --", +paragraph:"Odstavec", +div:"Div", +address:"Adresa", +pre:"P\u0159edform\u00E1tov\u00E1no", +h1:"Nadpis 1", +h2:"Nadpis 2", +h3:"Nadpis 3", +h4:"Nadpis 4", +h5:"Nadpis 5", +h6:"Nadpis 6", +blockquote:"Odsazen\u00FD blok textu", +code:"K\u00F3d", +samp:"Vzorek", +dt:"Term\u00EDn", +dd:"Definice", +bold_desc:"Tu\u010Dn\u00E9 (Ctrl+B)", +italic_desc:"Kurz\u00EDva (Ctrl+I)", +underline_desc:"Podtr\u017Een\u00E9 (Ctrl+U)", +striketrough_desc:"P\u0159e\u0161krtnut\u00E9", +justifyleft_desc:"Zarovnat doleva", +justifycenter_desc:"Zarovnat na st\u0159ed", +justifyright_desc:"Zarovnat doprava", +justifyfull_desc:"Zarovnat do bloku", +bullist_desc:"Seznam s odr\u00E1\u017Ekami", +numlist_desc:"\u010C\u00EDslovan\u00FD seznam", +outdent_desc:"Zmen\u0161it odsazen\u00ED", +indent_desc:"Zv\u011Bt\u0161it odsazen\u00ED", +undo_desc:"Zp\u011Bt (Ctrl+Z)", +redo_desc:"Znovu (Ctrl+Y)", +link_desc:"Vlo\u017Eit/upravit odkaz", +unlink_desc:"Zru\u0161it odkaz", +image_desc:"Vlo\u017Eit/upravit obr\u00E1zek", +cleanup_desc:"Vy\u010Distit k\u00F3d", +code_desc:"Editovat HTML k\u00F3d", +sub_desc:"Doln\u00ED index", +sup_desc:"Horn\u00ED index", +hr_desc:"Vlo\u017Eit vodorovn\u00FD odd\u011Blova\u010D", +removeformat_desc:"Zru\u0161it form\u00E1tov\u00E1n\u00ED", +custom1_desc:"Libovoln\u00FD popisek", +forecolor_desc:"Barva textu", +backcolor_desc:"Barva pozad\u00ED", +charmap_desc:"Vlo\u017Eit speci\u00E1ln\u00ED znak", +visualaid_desc:"Zviditelnit zna\u010Dky", +anchor_desc:"Vlo\u017Eit/upravit kotvu", +cut_desc:"Vyjmout", +copy_desc:"Kop\u00EDrovat", +paste_desc:"Vlo\u017Eit", +image_props_desc:"Vlastnosti obr\u00E1zku", +newdocument_desc:"Nov\u00FD dokument", +help_desc:"N\u00E1pov\u011Bda", +blockquote_desc:"Blok citace", +clipboard_msg:"Funkce kop\u00EDrovat/vyjmout/vlo\u017Eit nejsou pou\u017Eiteln\u00E9 v Mozille a Firefoxu.\nChcete v\u00EDce informac\u00ED?", +path:"Cesta", +newdocument:"Jste si opravdu jisti, \u017Ee chcete vymazat ve\u0161ker\u00FD obsah?", +toolbar_focus:"Skok na li\u0161tu n\u00E1stroj\u016F - Alt+Q, skok do editoru - Alt-Z, skok na cestu prvk\u016F - Alt-X", +more_colors:"Dal\u0161\u00ED barvy" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/cs_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/cs_dlg.js new file mode 100644 index 00000000..b8c39433 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/cs_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('cs.advanced_dlg',{ +about_title:"O TinyMCE", +about_general:"O n\u00E1s", +about_help:"N\u00E1pov\u011Bda", +about_license:"Licence", +about_plugins:"Pluginy", +about_plugin:"Plugin", +about_author:"Autor", +about_version:"Verze", +about_loaded:"Na\u010Dten\u00E9 pluginy", +anchor_title:"Vlo\u017Eit/upravit kotvu", +anchor_name:"N\u00E1zev kotvy", +code_title:"HTML", +code_wordwrap:"Zalomen\u00ED \u0159\u00E1dk\u016F", +colorpicker_title:"V\u00FDb\u011Br barvy", +colorpicker_picker_tab:"Kap\u00E1tko", +colorpicker_picker_title:"Kap\u00E1tko", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta barev", +colorpicker_named_tab:"N\u00E1zvy", +colorpicker_named_title:"Pojmenovan\u00E9 barvy", +colorpicker_color:"Vybran\u00E1 barva:", +colorpicker_name:"N\u00E1zev:", +charmap_title:"Vlo\u017Eit speci\u00E1ln\u00ED znak", +image_title:"Vlo\u017Eit/upravit obr\u00E1zek", +image_src:"URL obr\u00E1zku", +image_alt:"Popis obr\u00E1zku", +image_list:"Seznam obr\u00E1zk\u016F", +image_border:"R\u00E1me\u010Dek", +image_dimensions:"Rozm\u011Bry", +image_vspace:"Vertik\u00E1ln\u00ED mezera", +image_hspace:"Horizont\u00E1ln\u00ED mezera", +image_align:"Zarovn\u00E1n\u00ED", +image_align_baseline:"Na z\u00E1kladnu", +image_align_top:"Nahoru", +image_align_middle:"Na st\u0159ed \u0159\u00E1dku", +image_align_bottom:"Dol\u016F", +image_align_texttop:"S vrchem \u0159\u00E1dku", +image_align_textbottom:"Se spodkem \u0159\u00E1dku", +image_align_left:"Vlevo", +image_align_right:"Vpravo", +link_title:"Vlo\u017Eit/upravit odkaz", +link_url:"URL odkazu", +link_target:"C\u00EDl", +link_target_same:"Otev\u0159\u00EDt odkaz ve stejn\u00E9m okn\u011B", +link_target_blank:"Otev\u0159\u00EDt odkaz v nov\u00E9m okn\u011B", +link_titlefield:"Titulek", +link_is_email:"Zadan\u00E9 URL vypad\u00E1 jako e-mailov\u00E1 adresa, chcete doplnit prefix mailto:?", +link_is_external:"Zadan\u00E9 URL vypad\u00E1 jako extern\u00ED odkaz, chcete doplnit prefix http://?", +link_list:"Seznam odkaz\u016F" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/da.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/da.js new file mode 100644 index 00000000..e5037239 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/da.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('da.advanced',{ +style_select:"Typografier", +font_size:"Skriftst\u00F8rrelse", +fontdefault:"Skrifttype", +block:"Format", +paragraph:"Afsnit", +div:"Div", +address:"Adresse", +pre:"Pr\u00E6formatteret", +h1:"Overskrift 1", +h2:"Overskrift 2", +h3:"Overskrift 3", +h4:"Overskrift 4", +h5:"Overskrift 5", +h6:"Overskrift 6", +blockquote:"Blokcitat", +code:"Kode", +samp:"Kodeeksempel", +dt:"Definitionsterm ", +dd:"Definitionsbeskrivelse", +bold_desc:"Fed (Ctrl+B)", +italic_desc:"Kursiv (Ctrl+I)", +underline_desc:"Understreget (Ctrl+U)", +striketrough_desc:"Gennemstreget", +justifyleft_desc:"Venstrejusteret", +justifycenter_desc:"Centreret", +justifyright_desc:"H\u00F8jrejusteret", +justifyfull_desc:"Lige marginer", +bullist_desc:"Unummereret punktopstilling", +numlist_desc:"Nummereret punktopstilling", +outdent_desc:"Formindsk indrykning", +indent_desc:"\u00D8g indrykning", +undo_desc:"Fortryd (Ctrl+Z)", +redo_desc:"Gendan (Ctrl+Y)", +link_desc:"Inds\u00E6t/rediger link", +unlink_desc:"Fjern link", +image_desc:"Inds\u00E6t/rediger billede", +cleanup_desc:"Ryd op i uordentlig kode", +code_desc:"Rediger HTML-kilde", +sub_desc:"S\u00E6nket skrift", +sup_desc:"H\u00E6vet skrift", +hr_desc:"Inds\u00E6t horisontal linie", +removeformat_desc:"Fjern formatering", +custom1_desc:"Din egen beskrivelse her", +forecolor_desc:"V\u00E6lg tekstfarve", +backcolor_desc:"V\u00E6lg baggrundsfarve", +charmap_desc:"Inds\u00E6t specialtegn", +visualaid_desc:"Sl\u00E5 hj\u00E6lp/synlige elementer til/fra", +anchor_desc:"Inds\u00E6t/rediger anker", +cut_desc:"Klip", +copy_desc:"Kopier", +paste_desc:"Inds\u00E6t", +image_props_desc:"Billedegenskaber", +newdocument_desc:"Nyt dokument", +help_desc:"Hj\u00E6lp", +blockquote_desc:"Blokcitat", +clipboard_msg:"Kopier/Klip/inds\u00E6t er ikke muligt i Mozilla og Firefox.\nVil du have mere information om dette emne?", +path:"Sti", +newdocument:"Er du sikker p\u00E5 du vil slette alt indhold?", +toolbar_focus:"Hop til v\u00E6rkt\u00F8jsknapper - Alt+Q, Skift til redigering - Alt-Z, Skift til element sti - Alt-X", +more_colors:"Flere farver" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/da_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/da_dlg.js new file mode 100644 index 00000000..d499858f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/da_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('da.advanced_dlg',{ +about_title:"Om TinyMCE", +about_general:"Om", +about_help:"Hj\u00E6lp", +about_license:"Licens", +about_plugins:"Udvidelser", +about_plugin:"Udvidelse", +about_author:"Forfatter", +about_version:"Version", +about_loaded:"Indl\u00E6ste udvidelser", +anchor_title:"Inds\u00E6t/rediger anker", +anchor_name:"Navn p\u00E5 anker", +code_title:"HTML kildekode-redigering", +code_wordwrap:"Tekstombrydning", +colorpicker_title:"V\u00E6lg en farve", +colorpicker_picker_tab:"V\u00E6lger", +colorpicker_picker_title:"Farvev\u00E6lger", +colorpicker_palette_tab:"Palette", +colorpicker_palette_title:"Palette-farver", +colorpicker_named_tab:"Navngivet", +colorpicker_named_title:"Navngivet farve", +colorpicker_color:"Farve:", +colorpicker_name:"Navn:", +charmap_title:"V\u00E6lg specialtegn", +image_title:"Inds\u00E6t/rediger billede", +image_src:"Billede URL", +image_alt:"Billedbeskrivelse", +image_list:"Liste over billeder", +image_border:"Kant", +image_dimensions:"Dimensioner", +image_vspace:"Vertikal afstand", +image_hspace:"Horisontal afstand", +image_align:"Justering", +image_align_baseline:"Grundlinie", +image_align_top:"Toppen", +image_align_middle:"Centreret", +image_align_bottom:"Bunden", +image_align_texttop:"Tekst toppen", +image_align_textbottom:"Tekst bunden", +image_align_left:"Venstre", +image_align_right:"H\u00F8jre", +link_title:"Inds\u00E6t/rediger link", +link_url:"Link URL", +link_target:"Target", +link_target_same:"\u00C5ben link i samme vindue", +link_target_blank:"\u00C5ben link i nyt vindue", +link_titlefield:"Titel", +link_is_email:"Den URL, der er indtastet, ser ud til at v\u00E6re en emailadresse. Vil du have tilf\u00F8jet det p\u00E5kr\u00E6vede mailto: foran?", +link_is_external:"Den URL, der er indtastet, ser ud til at v\u00E6re et eksternt link. Vil du have tilf\u00F8jet det p\u00E5kr\u00E6vede http:// foran?", +link_list:"Liste over links" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/de.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/de.js new file mode 100644 index 00000000..0411b4fa --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/de.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('de.advanced',{ +style_select:"Format", +font_size:"Schriftgr\u00F6\u00DFe", +fontdefault:"Schriftart", +block:"Vorlage", +paragraph:"Absatz", +div:"Zusammenh\u00E4ngender Bereich", +address:"Addresse", +pre:"Rohdaten", +h1:"\u00DCberschrift 1", +h2:"\u00DCberschrift 2", +h3:"\u00DCberschrift 3", +h4:"\u00DCberschrift 4", +h5:"\u00DCberschrift 5", +h6:"\u00DCberschrift 6", +blockquote:"Zitatblock", +code:"Code", +samp:"Beispiel", +dt:"Definitionsbegriff", +dd:"Definitionsbeschreibung", +bold_desc:"Fett (Strg+B)", +italic_desc:"Kursiv (Strg+I)", +underline_desc:"Unterstrichen (Strg+U)", +striketrough_desc:"Durchgestrichen", +justifyleft_desc:"Links ausgerichtet", +justifycenter_desc:"Mittig ausgerichtet", +justifyright_desc:"Rechts ausgerichtet", +justifyfull_desc:"Blocksatz", +bullist_desc:"Unsortierte Liste", +numlist_desc:"Sortierte Liste", +outdent_desc:"Ausr\u00FCcken", +indent_desc:"Einr\u00FCcken", +undo_desc:"R\u00FCckg\u00E4ngig (Strg+Z)", +redo_desc:"Wiederholen (Strg+Y)", +link_desc:"Link einf\u00FCgen/ver\u00E4ndern", +unlink_desc:"Link entfernen", +image_desc:"Bild einf\u00FCgen/ver\u00E4ndern", +cleanup_desc:"Quellcode aufr\u00E4umen", +code_desc:"HTML-Quellcode bearbeiten", +sub_desc:"Tiefgestellt", +sup_desc:"Hochgestellt", +hr_desc:"Trennlinie einf\u00FCgen", +removeformat_desc:"Formatierungen zur\u00FCcksetzen", +custom1_desc:"Benutzerdefinierte Beschreibung", +forecolor_desc:"Textfarbe", +backcolor_desc:"Hintergrundfarbe", +charmap_desc:"Sonderzeichen einf\u00FCgen", +visualaid_desc:"Hilfslinien und unsichtbare Elemente ein-/ausblenden", +anchor_desc:"Anker einf\u00FCgen/ver\u00E4ndern", +cut_desc:"Ausschneiden", +copy_desc:"Kopieren", +paste_desc:"Einf\u00FCgen", +image_props_desc:"Bildeigenschaften", +newdocument_desc:"Neues Dokument", +help_desc:"Hilfe", +blockquote_desc:"Zitatblock", +clipboard_msg:"Kopieren, Ausschneiden und Einf\u00FCgen sind im Mozilla Firefox nicht m\u00F6glich.\r\nWollen Sie mehr \u00FCber dieses Problem erfahren?", +path:"Pfad", +newdocument:"Wollen Sie wirklich den ganzen Inhalt l\u00F6schen?", +toolbar_focus:"Zur Werkzeugleiste springen: Alt+Q; Zum Editor springen: Alt-Z; Zum Elementpfad springen: Alt-X", +more_colors:"Weitere Farben", +anchor_delta_width:"13" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/de_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/de_dlg.js new file mode 100644 index 00000000..f0d75f88 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/de_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('de.advanced_dlg',{ +about_title:"\u00DCber TinyMCE", +about_general:"\u00DCber\u2026", +about_help:"Hilfe", +about_license:"Lizenzbedingungen", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Urheber", +about_version:"Version", +about_loaded:"Geladene Plugins", +anchor_title:"Anker einf\u00FCgen/ver\u00E4ndern", +anchor_name:"Name des Ankers", +code_title:"HTML-Quellcode bearbeiten", +code_wordwrap:"Automatischer Zeilenumbruch", +colorpicker_title:"Farbe", +colorpicker_picker_tab:"Farbwahl", +colorpicker_picker_title:"Farbwahl", +colorpicker_palette_tab:"Palette", +colorpicker_palette_title:"Farbpalette", +colorpicker_named_tab:"Benannte Farben", +colorpicker_named_title:"Benannte Farben", +colorpicker_color:"Farbe:", +colorpicker_name:"Name:", +charmap_title:"Sonderzeichen", +image_title:"Bild einf\u00FCgen/bearbeiten", +image_src:"Adresse", +image_alt:"Alternativtext", +image_list:"Bilderliste", +image_border:"Rahmen", +image_dimensions:"Ausma\u00DFe", +image_vspace:"Vertikaler Abstand", +image_hspace:"Horizontaler Abstand", +image_align:"Ausrichtung", +image_align_baseline:"Zeile", +image_align_top:"Oben", +image_align_middle:"Mittig", +image_align_bottom:"Unten", +image_align_texttop:"Oben im Text", +image_align_textbottom:"Unten im Text", +image_align_left:"Links", +image_align_right:"Rechts", +link_title:"Link einf\u00FCgen/bearbeiten", +link_url:"Adresse", +link_target:"Fenster", +link_target_same:"Im selben Fenster \u00F6ffnen", +link_target_blank:"Neues Fenster \u00F6ffnen", +link_titlefield:"Titel", +link_is_email:"Bei der Adresse scheint es sich um eine E-Mail-Adresse zu handeln. Wollen Sie das dazu ben\u00F6tigte mailto: voranstellen?", +link_is_external:"Bei der Adresse scheint es sich um einen externen Link zu handeln. M\u00F6chten Sie, dass zur korrekten Verlinkung ein http:// vorangestellt wird?", +link_list:"Linkliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/dv.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/dv.js new file mode 100644 index 00000000..b8249bad --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/dv.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('dv.advanced',{ +style_select:"Styles", +font_size:"Font size", +fontdefault:"Font family", +block:"Format", +paragraph:"Paragraph", +div:"Div", +address:"Address", +pre:"Preformatted", +h1:"Heading 1", +h2:"Heading 2", +h3:"Heading 3", +h4:"Heading 4", +h5:"Heading 5", +h6:"Heading 6", +blockquote:"Blockquote", +code:"Code", +samp:"Code sample", +dt:"Definition term ", +dd:"Definition description", +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +justifyleft_desc:"Align left", +justifycenter_desc:"Align center", +justifyright_desc:"Align right", +justifyfull_desc:"Align full", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +outdent_desc:"Outdent", +indent_desc:"Indent", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +link_desc:"Insert/edit link", +unlink_desc:"Unlink", +image_desc:"Insert/edit image", +cleanup_desc:"Cleanup messy code", +code_desc:"Edit HTML Source", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Insert horizontal ruler", +removeformat_desc:"Remove formatting", +custom1_desc:"Your custom description here", +forecolor_desc:"Select text color", +backcolor_desc:"Select background color", +charmap_desc:"Insert custom character", +visualaid_desc:"Toggle guidelines/invisible elements", +anchor_desc:"Insert/edit anchor", +cut_desc:"Cut", +copy_desc:"Copy", +paste_desc:"Paste", +image_props_desc:"Image properties", +newdocument_desc:"New document", +help_desc:"Help", +blockquote_desc:"Blockquote", +clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?", +path:"Path", +newdocument:"Are you sure you want clear all contents?", +toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", +more_colors:"More colors" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/dv_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/dv_dlg.js new file mode 100644 index 00000000..79f1ac59 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/dv_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('dv.advanced_dlg',{ +about_title:"About TinyMCE", +about_general:"About", +about_help:"Help", +about_license:"License", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Author", +about_version:"Version", +about_loaded:"Loaded plugins", +anchor_title:"Insert/edit anchor", +anchor_name:"Anchor name", +code_title:"HTML Source Editor", +code_wordwrap:"Word wrap", +colorpicker_title:"Select a color", +colorpicker_picker_tab:"Picker", +colorpicker_picker_title:"Color picker", +colorpicker_palette_tab:"Palette", +colorpicker_palette_title:"Palette colors", +colorpicker_named_tab:"Named", +colorpicker_named_title:"Named colors", +colorpicker_color:"Color:", +colorpicker_name:"Name:", +charmap_title:"Select custom character", +image_title:"Insert/edit image", +image_src:"Image URL", +image_alt:"Image description", +image_list:"Image list", +image_border:"Border", +image_dimensions:"Dimensions", +image_vspace:"Vertical space", +image_hspace:"Horizontal space", +image_align:"Alignment", +image_align_baseline:"Baseline", +image_align_top:"Top", +image_align_middle:"Middle", +image_align_bottom:"Bottom", +image_align_texttop:"Text top", +image_align_textbottom:"Text bottom", +image_align_left:"Left", +image_align_right:"Right", +link_title:"Insert/edit link", +link_url:"Link URL", +link_target:"Target", +link_target_same:"Open link in the same window", +link_target_blank:"Open link in a new window", +link_titlefield:"Title", +link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/el.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/el.js new file mode 100644 index 00000000..66d65ece --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/el.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('el.advanced',{ +style_select:"\u03A3\u03C4\u03C5\u03BB", +font_size:"\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u0393\u03C1\u03B1\u03BC\u03BC\u03AC\u03C4\u03C9\u03BD", +fontdefault:"\u0393\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC", +block:"\u039C\u03BF\u03C1\u03C6\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7", +paragraph:"\u03A0\u03B1\u03C1\u03AC\u03B3\u03C1\u03B1\u03C6\u03BF\u03C2", +div:"Div", +address:"\u0394\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7", +pre:"Pre", +h1:"\u0395\u03C0\u03B9\u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1 1", +h2:"\u0395\u03C0\u03B9\u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1 2", +h3:"\u0395\u03C0\u03B9\u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1 3", +h4:"\u0395\u03C0\u03B9\u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1 4", +h5:"\u0395\u03C0\u03B9\u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1 5", +h6:"\u0395\u03C0\u03B9\u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1 6", +blockquote:"Blockquote", +code:"\u039A\u03CE\u03B4\u03B9\u03BA\u03B1\u03C2", +samp:"\u0394\u03B5\u03AF\u03B3\u03BC\u03B1 \u039A\u03CE\u03B4\u03B9\u03BA\u03B1", +dt:"\u039F\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2", +dd:"\u03A0\u03B5\u03C1\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u039F\u03C1\u03B9\u03C3\u03BC\u03BF\u03CD", +bold_desc:"\u039C\u03B1\u03CD\u03C1\u03B1 (Ctrl+B)", +italic_desc:"\u03A0\u03BB\u03AC\u03B3\u03B9\u03B1 (Ctrl+I)", +underline_desc:"\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03BC\u03BC\u03B9\u03C3\u03BC\u03AD\u03BD\u03B1 (Ctrl+U)", +striketrough_desc:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03BC\u03BC\u03B9\u03C3\u03BC\u03AD\u03BD\u03B1", +justifyleft_desc:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7 \u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +justifycenter_desc:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7 \u03BA\u03AD\u03BD\u03C4\u03C1\u03BF", +justifyright_desc:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7 \u03B4\u03B5\u03BE\u03B9\u03AC", +justifyfull_desc:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7 \u03C0\u03BB\u03AE\u03C1\u03B7\u03C2", +bullist_desc:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03C7\u03C9\u03C1\u03AF\u03C2 \u03C3\u03B5\u03B9\u03C1\u03AC", +numlist_desc:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03BC\u03B5 \u03C3\u03B5\u03B9\u03C1\u03AC", +outdent_desc:"\u03A0\u03C1\u03BF\u03B5\u03BE\u03BF\u03C7\u03AE", +indent_desc:"\u0395\u03C3\u03BF\u03C7\u03AE", +undo_desc:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 (Ctrl+Z)", +redo_desc:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7 (Ctrl+Y)", +link_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03BF\u03C5", +unlink_desc:"\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03BF\u03C5", +image_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +cleanup_desc:"\u039A\u03B1\u03B8\u03B1\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 \u03BC\u03C0\u03B5\u03C1\u03B4\u03B5\u03BC\u03AD\u03BD\u03BF\u03C5 \u03BA\u03CE\u03B4\u03B9\u03BA\u03B1", +code_desc:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 HTML \u039A\u03CE\u03B4\u03B9\u03BA\u03B1", +sub_desc:"\u0394\u03B5\u03AF\u03BA\u03C4\u03B7\u03C2", +sup_desc:"\u0395\u03BA\u03B8\u03AD\u03C4\u03B7\u03C2", +hr_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03BF\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B1\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AE\u03C2", +removeformat_desc:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03BC\u03BF\u03C1\u03C6\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7\u03C2", +custom1_desc:"\u0397 \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03B1\u03C2 \u03B5\u03B4\u03CE", +forecolor_desc:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5", +backcolor_desc:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2 \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5", +charmap_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B1", +visualaid_desc:"\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7/\u0391\u03C0\u03CC\u03BA\u03C1\u03C5\u03C8\u03B7 \u03B2\u03BF\u03B7\u03B8\u03B7\u03C4\u03B9\u03BA\u03CE\u03BD \u03B3\u03C1\u03B1\u03BC\u03BC\u03CE\u03BD \u03BA\u03B1\u03B9 \u03B1\u03CC\u03C1\u03B1\u03C4\u03C9\u03BD \u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03C9\u03BD", +anchor_desc:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 anchor", +cut_desc:"\u0391\u03C0\u03BF\u03BA\u03BF\u03C0\u03AE", +copy_desc:"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE", +paste_desc:"\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7", +image_props_desc:"\u0399\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +newdocument_desc:"\u039D\u03AD\u03BF \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF", +help_desc:"\u0392\u03BF\u03AE\u03B8\u03B5\u03B9\u03B1", +blockquote_desc:"Blockquote", +clipboard_msg:"\u039F\u03B9 \u03BB\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B5\u03C2 \u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE/\u0391\u03C0\u03BF\u03BA\u03BF\u03C0\u03AE/\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7 \u03B4\u03B5\u03BD \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03B5\u03C2 \u03C3\u03B5 Mozilla \u03BA\u03B1\u03B9 Firefox.\n\u0398\u03AD\u03BB\u03B5\u03C4\u03B5 \u03C0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B5\u03C2 \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03AF\u03B5\u03C2 ;", +path:"\u0394\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE", +newdocument:"\u03A3\u03B9\u03AF\u03B3\u03BF\u03C5\u03C1\u03B1 \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03BA\u03B1\u03B8\u03B1\u03C1\u03AF\u03C3\u03B5\u03C4\u03B5 \u03CC\u03BB\u03BF \u03C4\u03BF \u03C0\u03B5\u03C1\u03B9\u03B5\u03C7\u03CC\u03BC\u03B5\u03BD\u03BF ;", +toolbar_focus:"\u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B1 \u03BA\u03BF\u03C5\u03BC\u03C0\u03B9\u03AC \u03B5\u03C1\u03B3\u03B1\u03BB\u03B5\u03AF\u03C9\u03BD - Alt+Q, \u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03BF\u03BD \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03C4\u03AE \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 - Alt-Z, \u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B7\u03BD \u03B4\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE \u03C4\u03BF\u03C5 \u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03BF\u03C5 - Alt-X", +more_colors:"\u03A0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B1 \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/el_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/el_dlg.js new file mode 100644 index 00000000..fe7cc8e3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/el_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('el.advanced_dlg',{ +about_title:"\u03A3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AC \u03BC\u03B5 \u03C4\u03BF TinyMCE", +about_general:"\u03A3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AC", +about_help:"\u0392\u03BF\u03AE\u03B8\u03B5\u03B9\u03B1", +about_license:"\u0386\u03B4\u03B5\u03B9\u03B1", +about_plugins:"\u03A3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AC \u03BC\u03B5 \u03C4\u03B1 \u03C0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C4\u03B1", +about_plugin:"\u03A3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AC \u03BC\u03B5 \u03C4\u03BF \u03C0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C4\u03BF", +about_author:"\u03A3\u03C5\u03B3\u03B3\u03C1\u03B1\u03C6\u03AD\u03B1\u03C2", +about_version:"\u0388\u03BA\u03B4\u03BF\u03C3\u03B7", +about_loaded:"\u03A6\u03BF\u03C1\u03C4\u03C9\u03BC\u03AD\u03BD\u03B1 \u03C0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C4\u03B1", +anchor_title:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 anchor", +anchor_name:"\u038C\u03BD\u03BF\u03BC\u03B1 anchor", +code_title:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03C4\u03AE\u03C2 \u03BA\u03CE\u03B4\u03B9\u03BA\u03B1 HTML", +code_wordwrap:"\u0391\u03BD\u03B1\u03B4\u03AF\u03C0\u03BB\u03C9\u03C3\u03B7 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5", +colorpicker_title:"\u0394\u03B9\u03B1\u03BB\u03AD\u03BE\u03C4\u03B5 \u03C7\u03C1\u03CE\u03BC\u03B1", +colorpicker_picker_tab:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE", +colorpicker_picker_title:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2", +colorpicker_palette_tab:"\u03A0\u03B1\u03BB\u03AD\u03C4\u03B1", +colorpicker_palette_title:"\u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1 \u03C0\u03B1\u03BB\u03AD\u03C4\u03B1\u03C2", +colorpicker_named_tab:"\u039F\u03BD\u03BF\u03BC\u03B1\u03C3\u03C4\u03B9\u03BA\u03AC", +colorpicker_named_title:"\u039F\u03BD\u03BF\u03BC\u03B1\u03C3\u03C4\u03B9\u03BA\u03AC \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1", +colorpicker_color:"\u03A7\u03C1\u03CE\u03BC\u03B1:", +colorpicker_name:"\u038C\u03BD\u03BF\u03BC\u03B1:", +charmap_title:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B1", +image_title:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +image_src:"\u0394\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +image_alt:"\u03A0\u03B5\u03C1\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2", +image_list:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD", +image_border:"\u03A0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF", +image_dimensions:"\u0394\u03B9\u03B1\u03C3\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2", +image_vspace:"\u0391\u03C0\u03CC\u03C3\u03C4\u03B1\u03C3\u03B7 \u03BA\u03AC\u03B8\u03B5\u03C4\u03B7", +image_hspace:"\u0391\u03C0\u03CC\u03C3\u03C4\u03B1\u03C3\u03B7 \u03BF\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B1", +image_align:"\u03A3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7", +image_align_baseline:"\u0393\u03C1\u03B1\u03BC\u03BC\u03AE \u03C3\u03C4\u03BF\u03AF\u03C7\u03B9\u03C3\u03B7\u03C2 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AC\u03C4\u03C9\u03BD", +image_align_top:"\u0395\u03C0\u03AC\u03BD\u03C9", +image_align_middle:"\u039C\u03AD\u03C3\u03B7", +image_align_bottom:"\u039A\u03AC\u03C4\u03C9", +image_align_texttop:"\u039A\u03AD\u03B9\u03BC\u03B5\u03BD\u03BF \u03C0\u03AC\u03BD\u03C9", +image_align_textbottom:"\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03BA\u03AC\u03C4\u03C9", +image_align_left:"\u0391\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03AC", +image_align_right:"\u0394\u03B5\u03BE\u03B9\u03AC", +link_title:"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE/\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03BF\u03C5", +link_url:"\u0394\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03BF\u03C5", +link_target:"\u03A3\u03C4\u03CC\u03C7\u03BF\u03C2", +link_target_same:"\u0386\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C3\u03C4\u03BF \u03AF\u03B4\u03B9\u03BF \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF", +link_target_blank:"\u0386\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C3\u03B5 \u03BD\u03AD\u03BF \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF", +link_titlefield:"\u03A4\u03AF\u03C4\u03BB\u03BF\u03C2", +link_is_email:"\u0397 \u03B4\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u03C0\u03BF\u03C5 \u03B5\u03B9\u03C3\u03AC\u03B3\u03B1\u03C4\u03B5 \u03C6\u03B1\u03AF\u03BD\u03B5\u03C4\u03B1\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 email, \u03BD\u03B1 \u03C0\u03C1\u03BF\u03C3\u03C4\u03B5\u03B8\u03B5\u03AF \u03C4\u03BF \u03B1\u03C0\u03B1\u03C1\u03B1\u03AF\u03C4\u03B7\u03C4\u03BF mailto: ;", +link_is_external:"\u0397 \u03B4\u03B9\u03B1\u03B4\u03C1\u03BF\u03BC\u03AE URL \u03C0\u03BF\u03C5 \u03B5\u03B9\u03C3\u03AC\u03B3\u03B1\u03C4\u03B5 \u03C6\u03B1\u03AF\u03BD\u03B5\u03C4\u03B1\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B5\u03BE\u03C9\u03C4\u03B5\u03C1\u03B9\u03BA\u03CC\u03C2 \u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03BC\u03BF\u03C2, \u03BD\u03B1 \u03C0\u03C1\u03BF\u03C3\u03C4\u03B5\u03B8\u03B5\u03AF \u03C4\u03BF \u03B1\u03C0\u03B1\u03C1\u03B1\u03AF\u03C4\u03B7\u03C4\u03BF http:// ;", +link_list:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03C9\u03BD" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js index 32cf5ca8..69694b1f 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js @@ -1,57 +1,62 @@ -// UK lang variables - -tinyMCELang['lang_theme_style_select'] = 'Styles'; -tinyMCELang['lang_theme_code_desc'] = 'Edit HTML Source'; -tinyMCELang['lang_theme_code_title'] = 'HTML Source Editor'; -tinyMCELang['lang_theme_code_wordwrap'] = 'Word wrap'; -tinyMCELang['lang_theme_sub_desc'] = 'Subscript'; -tinyMCELang['lang_theme_sup_desc'] = 'Superscript'; -tinyMCELang['lang_theme_hr_desc'] = 'Insert horizontal ruler'; -tinyMCELang['lang_theme_removeformat_desc'] = 'Remove formatting'; -tinyMCELang['lang_theme_custom1_desc'] = 'Your custom description here'; -tinyMCELang['lang_insert_image_border'] = 'Border'; -tinyMCELang['lang_insert_image_dimensions'] = 'Dimensions'; -tinyMCELang['lang_insert_image_vspace'] = 'VSpace'; -tinyMCELang['lang_insert_image_hspace'] = 'HSpace'; -tinyMCELang['lang_insert_image_align'] = 'Alignment'; -tinyMCELang['lang_insert_image_align_default'] = 'Default'; -tinyMCELang['lang_insert_image_align_baseline'] = 'Baseline'; -tinyMCELang['lang_insert_image_align_top'] = 'Top'; -tinyMCELang['lang_insert_image_align_middle'] = 'Middle'; -tinyMCELang['lang_insert_image_align_bottom'] = 'Bottom'; -tinyMCELang['lang_insert_image_align_texttop'] = 'TextTop'; -tinyMCELang['lang_insert_image_align_absmiddle'] = 'Absolute Middle'; -tinyMCELang['lang_insert_image_align_absbottom'] = 'Absolute Bottom'; -tinyMCELang['lang_insert_image_align_left'] = 'Left'; -tinyMCELang['lang_insert_image_align_right'] = 'Right'; -tinyMCELang['lang_theme_font_size'] = 'Font size'; -tinyMCELang['lang_theme_fontdefault'] = 'Default'; -tinyMCELang['lang_theme_paragraph'] = 'Paragraph'; -tinyMCELang['lang_theme_div'] = 'Div'; -tinyMCELang['lang_theme_address'] = 'Address'; -tinyMCELang['lang_theme_pre'] = 'Preformatted'; -tinyMCELang['lang_theme_h1'] = 'Heading 1'; -tinyMCELang['lang_theme_h2'] = 'Heading 2'; -tinyMCELang['lang_theme_h3'] = 'Heading 3'; -tinyMCELang['lang_theme_h4'] = 'Heading 4'; -tinyMCELang['lang_theme_h5'] = 'Heading 5'; -tinyMCELang['lang_theme_h6'] = 'Heading 6'; -tinyMCELang['lang_theme_colorpicker_title'] = 'Select a color'; -tinyMCELang['lang_theme_colorpicker_apply'] = 'Apply'; -tinyMCELang['lang_theme_forecolor_desc'] = 'Select text color'; -tinyMCELang['lang_theme_backcolor_desc'] = 'Select background color'; -tinyMCELang['lang_theme_charmap_title'] = 'Select custom character'; -tinyMCELang['lang_theme_charmap_desc'] = 'Insert custom character'; -tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements'; -tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor'; -tinyMCELang['lang_insert_anchor_name'] = 'Anchor name'; -tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor'; -tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title'; -tinyMCELang['lang_theme_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; -tinyMCELang['lang_theme_path'] = 'Path'; -tinyMCELang['lang_cut_desc'] = 'Cut'; -tinyMCELang['lang_copy_desc'] = 'Copy'; -tinyMCELang['lang_paste_desc'] = 'Paste'; -tinyMCELang['lang_link_list'] = 'Link list'; -tinyMCELang['lang_image_list'] = 'Image list'; -tinyMCELang['lang_browse'] = 'Browse'; +tinyMCE.addI18n('en.advanced',{ +style_select:"Styles", +font_size:"Font size", +fontdefault:"Font family", +block:"Format", +paragraph:"Paragraph", +div:"Div", +address:"Address", +pre:"Preformatted", +h1:"Heading 1", +h2:"Heading 2", +h3:"Heading 3", +h4:"Heading 4", +h5:"Heading 5", +h6:"Heading 6", +blockquote:"Blockquote", +code:"Code", +samp:"Code sample", +dt:"Definition term ", +dd:"Definition description", +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +justifyleft_desc:"Align left", +justifycenter_desc:"Align center", +justifyright_desc:"Align right", +justifyfull_desc:"Align full", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +outdent_desc:"Outdent", +indent_desc:"Indent", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +link_desc:"Insert/edit link", +unlink_desc:"Unlink", +image_desc:"Insert/edit image", +cleanup_desc:"Cleanup messy code", +code_desc:"Edit HTML Source", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Insert horizontal ruler", +removeformat_desc:"Remove formatting", +custom1_desc:"Your custom description here", +forecolor_desc:"Select text color", +backcolor_desc:"Select background color", +charmap_desc:"Insert custom character", +visualaid_desc:"Toggle guidelines/invisible elements", +anchor_desc:"Insert/edit anchor", +cut_desc:"Cut", +copy_desc:"Copy", +paste_desc:"Paste", +image_props_desc:"Image properties", +newdocument_desc:"New document", +help_desc:"Help", +blockquote_desc:"Blockquote", +clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?", +path:"Path", +newdocument:"Are you sure you want clear all contents?", +toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", +more_colors:"More colors" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js new file mode 100644 index 00000000..9d124d7d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('en.advanced_dlg',{ +about_title:"About TinyMCE", +about_general:"About", +about_help:"Help", +about_license:"License", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Author", +about_version:"Version", +about_loaded:"Loaded plugins", +anchor_title:"Insert/edit anchor", +anchor_name:"Anchor name", +code_title:"HTML Source Editor", +code_wordwrap:"Word wrap", +colorpicker_title:"Select a color", +colorpicker_picker_tab:"Picker", +colorpicker_picker_title:"Color picker", +colorpicker_palette_tab:"Palette", +colorpicker_palette_title:"Palette colors", +colorpicker_named_tab:"Named", +colorpicker_named_title:"Named colors", +colorpicker_color:"Color:", +colorpicker_name:"Name:", +charmap_title:"Select custom character", +image_title:"Insert/edit image", +image_src:"Image URL", +image_alt:"Image description", +image_list:"Image list", +image_border:"Border", +image_dimensions:"Dimensions", +image_vspace:"Vertical space", +image_hspace:"Horizontal space", +image_align:"Alignment", +image_align_baseline:"Baseline", +image_align_top:"Top", +image_align_middle:"Middle", +image_align_bottom:"Bottom", +image_align_texttop:"Text top", +image_align_textbottom:"Text bottom", +image_align_left:"Left", +image_align_right:"Right", +link_title:"Insert/edit link", +link_url:"Link URL", +link_target:"Target", +link_target_same:"Open link in the same window", +link_target_blank:"Open link in a new window", +link_titlefield:"Title", +link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/es.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/es.js new file mode 100644 index 00000000..39726971 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/es.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('es.advanced',{ +style_select:"Estilos", +font_size:"Tama\u00F1o", +fontdefault:"Fuente", +block:"Formato", +paragraph:"P\u00E1rrafo", +div:"Div", +address:"Direcci\u00F3n", +pre:"Preformateado", +h1:"Encabezado 1", +h2:"Encabezado 2", +h3:"Encabezado 3", +h4:"Encabezado 4", +h5:"Encabezado 5", +h6:"Encabezado 6", +blockquote:"Cita", +code:"C\u00F3digo", +samp:"Ejemplo de c\u00F3digo", +dt:"T\u00E9rmino de definici\u00F3n", +dd:"Descripci\u00F3n de definici\u00F3n", +bold_desc:"Negrita (Ctrl+B)", +italic_desc:"Cursiva (Ctrl+I)", +underline_desc:"Subrayado (Ctrl+U)", +striketrough_desc:"Tachado", +justifyleft_desc:"Alinear a la izquierda", +justifycenter_desc:"Alinear al centro", +justifyright_desc:"Alinear a la derecha", +justifyfull_desc:"Justificar", +bullist_desc:"Lista desordenada", +numlist_desc:"Lista ordenada", +outdent_desc:"Reducir sangr\u00EDa", +indent_desc:"Aumentar sangr\u00EDa", +undo_desc:"Deshacer (Ctrl+Z)", +redo_desc:"Rehacer (Ctrl+Y)", +link_desc:"Insertar/editar hiperv\u00EDnculo", +unlink_desc:"Quitar hiperv\u00EDnculo", +image_desc:"Insertar/editar imagen", +cleanup_desc:"Limpiar c\u00F3digo basura", +code_desc:"Editar c\u00F3digo HTML", +sub_desc:"Sub\u00EDndice", +sup_desc:"Super\u00EDndice", +hr_desc:"Insertar regla horizontal", +removeformat_desc:"Limpiar formato", +custom1_desc:"Su descripci\u00F3n personal aqu\u00ED", +forecolor_desc:"Seleccionar color del texto", +backcolor_desc:"Seleccionar color de fondo", +charmap_desc:"Insertar caracteres personalizados", +visualaid_desc:"Mostrar/ocultar l\u00EDnea de gu\u00EDa/elementos invisibles", +anchor_desc:"Insertar/editar ancla", +cut_desc:"Cortar", +copy_desc:"Copiar", +paste_desc:"Pegar", +image_props_desc:"Propiedades de imagen", +newdocument_desc:"Nuevo documento", +help_desc:"Ayuda", +blockquote_desc:"Cita", +clipboard_msg:"Copiar/Cortar/Pegar no se encuentra disponible en Mozilla y Firefox.\r\n \u00BFDesea obtener m\u00E1s informaci\u00F3n acerca de este tema?", +path:"Ruta", +newdocument:" \u00BFEst\u00E1 seguro que desea limpiar todo el contenido?", +toolbar_focus:"Ir a los botones de herramientas - Alt+Q, Ir al editor - Alt-Z, Ir a la ruta del elemento - Alt-X", +more_colors:"M\u00E1s colores" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/es_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/es_dlg.js new file mode 100644 index 00000000..927478f5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/es_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('es.advanced_dlg',{ +about_title:"Acerca de TinyMCE", +about_general:"Acerca de ", +about_help:"Ayuda", +about_license:"Licencia", +about_plugins:"Complementos", +about_plugin:"Complemento", +about_author:"Autor", +about_version:"Versi\u00F3n", +about_loaded:"Complementos cargados", +anchor_title:"Insertar/editar ancla", +anchor_name:"Nombre del ancla", +code_title:"Editor del c\u00F3digo fuente HTML", +code_wordwrap:"Ajustar al margen", +colorpicker_title:"Seleccionar color", +colorpicker_picker_tab:"Selector", +colorpicker_picker_title:"Paleta de color", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta de colores", +colorpicker_named_tab:"Nombrados", +colorpicker_named_title:"Colores nombrados", +colorpicker_color:"Color:", +colorpicker_name:"Nombre:", +charmap_title:"Seleccionar caracter personalizado", +image_title:"Insertar/editar imagen", +image_src:"URL de la Imagen", +image_alt:"Descripci\u00F3n de la Imagen", +image_list:"Lista de la Imagen", +image_border:"Borde", +image_dimensions:"Dimensi\u00F3n", +image_vspace:"Espacio vertical", +image_hspace:"Espacio horizontal", +image_align:"Alineaci\u00F3n", +image_align_baseline:"L\u00EDnea base", +image_align_top:"Arriba", +image_align_middle:"Medio", +image_align_bottom:"Debajo", +image_align_texttop:"Texto arriba", +image_align_textbottom:"Texto debajo", +image_align_left:"Izquierda", +image_align_right:"Derecha", +link_title:"Insertar/editar hiperv\u00EDnculo", +link_url:"URL del hiperv\u00EDnculo", +link_target:"Destino", +link_target_same:"Abrir v\u00EDnculo en la misma ventana", +link_target_blank:"Abrir v\u00EDnculo en una ventana nueva", +link_titlefield:"T\u00EDtulo", +link_is_email:"La URL que introdujo parece ser una direcci\u00F3n de email, \u00BFdesea agregar el prefijo mailto: necesario?", +link_is_external:"La URL que introdujo parece ser un v\u00EDnculo externo, \u00BFdesea agregar el prefijo http:// necesario?", +link_list:"Lista de hiperv\u00EDnculos" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/et.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/et.js new file mode 100644 index 00000000..6942cb0c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/et.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('et.advanced',{ +style_select:"Styles", +font_size:"Font size", +fontdefault:"Font family", +block:"Format", +paragraph:"Paragraph", +div:"Div", +address:"Address", +pre:"Preformatted", +h1:"Heading 1", +h2:"Heading 2", +h3:"Heading 3", +h4:"Heading 4", +h5:"Heading 5", +h6:"Heading 6", +blockquote:"Blockquote", +code:"Code", +samp:"Code sample", +dt:"Definition term ", +dd:"Definition description", +bold_desc:"Rasvane (Ctrl+B)", +italic_desc:"Kursiiv (Ctrl+I)", +underline_desc:"Allajoonitud (Ctrl+U)", +striketrough_desc:"L\u00E4bijoonitud", +justifyleft_desc:"Vasak joondus", +justifycenter_desc:"Keskjoondus", +justifyright_desc:"Parem joondus", +justifyfull_desc:"T\u00E4isjoondus", +bullist_desc:"Ebakorrap\u00E4rane loetelu", +numlist_desc:"Korrap\u00E4rane loetelu", +outdent_desc:"Taanda v\u00E4lja", +indent_desc:"Taanda sisse", +undo_desc:"V\u00F5ta tagasi (Ctrl+Z)", +redo_desc:"Tee uuesti (Ctrl+Y)", +link_desc:"Sisesta/redigeeri link", +unlink_desc:"Eemalda link", +image_desc:"Sisesta/redigeeri pilt", +cleanup_desc:"Puhasta segane kood", +code_desc:"Redigeeri HTML l\u00E4htekoodi", +sub_desc:"Alaindeks", +sup_desc:"\u00DClaindeks", +hr_desc:"Sisesta horisontaalne joonlaud", +removeformat_desc:"Eemalda vormindus", +custom1_desc:"Teie kohandatud kirjeldus siia", +forecolor_desc:"Vali teksti v\u00E4rv", +backcolor_desc:"Vali tausta v\u00E4rv", +charmap_desc:"Sisesta kohandatud kirjam\u00E4rk", +visualaid_desc:"L\u00FClita \u00FCmber juhtjooned/n\u00E4htamatud elemendid", +anchor_desc:"Sisesta/redigeeri ankur", +cut_desc:"L\u00F5ika", +copy_desc:"Kopeeri", +paste_desc:"Kleebi", +image_props_desc:"Pildi kirjeldus", +newdocument_desc:"Uus dokument", +help_desc:"Abi", +blockquote_desc:"Plokkviide", +clipboard_msg:"Kopeeri/L\u00F5ika/Kleebi ei ole Mozillas ja Firefoxis saadaval.\r\nKas soovid rohkem infot selle probleemi kohta?", +path:"Tee", +newdocument:"Oled sa kindel, et tahad kustutada k\u00F5ik sisud?", +toolbar_focus:"H\u00FCppa t\u00F6\u00F6riista nuppudele - Alt+Q, H\u00FCppa redigeerijale - Alt-Z, H\u00FCppa elemendi teele - Alt-X", +more_colors:"Rohkem v\u00E4rve" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/et_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/et_dlg.js new file mode 100644 index 00000000..4f37832a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/et_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('et.advanced_dlg',{ +about_title:"About TinyMCE", +about_general:"About", +about_help:"Help", +about_license:"License", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Author", +about_version:"Version", +about_loaded:"Loaded plugins", +anchor_title:"Sisesta/redigeeri ankur", +anchor_name:"Ankru nimi", +code_title:"HTML Source Editor", +code_wordwrap:"Word wrap", +colorpicker_title:"Vali v\u00E4rv", +colorpicker_picker_tab:"Korjaja", +colorpicker_picker_title:"V\u00E4rvi korjaja", +colorpicker_palette_tab:"Palett", +colorpicker_palette_title:"Palett v\u00E4rvid", +colorpicker_named_tab:"Nimetatud", +colorpicker_named_title:"Nimetatud v\u00E4rvid", +colorpicker_color:"V\u00E4rv:", +colorpicker_name:"Nimi:", +charmap_title:"Vali kohandatud t\u00E4hem\u00E4rk", +image_title:"Sisestal/redigeeri pilt", +image_src:"Pildi URL", +image_alt:"Pildi kirjeldus", +image_list:"Pildi loend", +image_border:"Raam", +image_dimensions:"Dimensioonid", +image_vspace:"Vertikaalne vahe", +image_hspace:"Horisontaalne vahe", +image_align:"Reastus", +image_align_baseline:"Kirjajoondus", +image_align_top:"\u00DClemine", +image_align_middle:"Keskmine", +image_align_bottom:"Alumine", +image_align_texttop:"Teksti tipp", +image_align_textbottom:"Teksti p\u00F5hi", +image_align_left:"Vasak", +image_align_right:"Parem", +link_title:"Sisesta/redigeeri link", +link_url:"Link URL", +link_target:"Sihtala", +link_target_same:"Ava link samas aknas", +link_target_blank:"Ava link uues aknas", +link_titlefield:"Tiitel", +link_is_email:"URL, mille te sisestasite, tundub olevat emaili aadress, kas soovite, et lisataks mailto: eesliite?", +link_is_external:"URL, mille sisestasite, tundub olevat v\u00E4line link, kas soovite, et lisataks http:// eesliite?", +link_list:"Lingi loetelu" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fa.js new file mode 100644 index 00000000..127055b5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fa.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('fa.advanced',{ +style_select:"\u0627\u0633\u062A\u06CC\u0644 \u0647\u0627", +font_size:"\u0627\u0646\u062F\u0627\u0632\u0647 \u0642\u0644\u0645", +fontdefault:"\u062E\u0627\u0646\u0648\u0627\u062F\u0647 \u0642\u0644\u0645", +block:"\u0642\u0627\u0644\u0628", +paragraph:"\u067E\u0627\u0631\u0627\u06AF\u0631\u0627\u0641", +div:"Div", +address:"\u0622\u062F\u0631\u0633", +pre:"\u0642\u0627\u0644\u0628 \u0628\u0646\u062F\u06CC \u0634\u062F\u0647 \u0627\u0632 \u0642\u0628\u0644", +h1:"\u0639\u0646\u0648\u0627\u0646 \u06AF\u0630\u0627\u0631\u06CC \u06F1", +h2:"\u0639\u0646\u0648\u0627\u0646 \u06AF\u0630\u0627\u0631\u06CC 2", +h3:"\u0639\u0646\u0648\u0627\u0646 \u06AF\u0630\u0627\u0631\u06CC 3", +h4:"\u0639\u0646\u0648\u0627\u0646 \u06AF\u0630\u0627\u0631\u06CC 4", +h5:"\u0639\u0646\u0648\u0627\u0646 \u06AF\u0630\u0627\u0631\u06CC 5", +h6:"\u0639\u0646\u0648\u0627\u0646 \u06AF\u0630\u0627\u0631\u06CC 6", +blockquote:"\u0628\u0644\u0648\u0643 \u0646\u0642\u0644 \u0642\u0648\u0644", +code:"\u0643\u062F", +samp:"\u0646\u0645\u0648\u0646\u0647 \u0643\u062F", +dt:"\u062A\u0639\u0631\u06CC\u0641 \u0648\u0627\u0698\u0647 ", +dd:"\u062A\u0639\u0631\u06CC\u0641 \u062A\u0648\u0636\u06CC\u062D", +bold_desc:"\u0636\u062E\u06CC\u0645 (Ctrl+B)", +italic_desc:"\u0643\u062C (Ctrl+I)", +underline_desc:"\u0632\u06CC\u0631 \u062E\u0637 (Ctrl+U)", +striketrough_desc:"\u062E\u0637 \u0648\u0633\u0637", +justifyleft_desc:"\u062A\u0631\u0627\u0632 \u0686\u067E", +justifycenter_desc:"\u062A\u0631\u0627\u0632 \u0648\u0633\u0637", +justifyright_desc:"\u062A\u0631\u0627\u0632 \u0631\u0627\u0633\u062A", +justifyfull_desc:"\u062A\u0631\u0627\u0632 \u0643\u0627\u0645\u0644", +bullist_desc:"\u0644\u06CC\u0633\u062A \u0646\u0627\u0645\u0631\u062A\u0628", +numlist_desc:"\u0644\u06CC\u0633\u062A \u0645\u0631\u062A\u0628", +outdent_desc:"\u0628\u06CC\u0631\u0648\u0646 \u0622\u0645\u062F\u06AF\u06CC", +indent_desc:"\u062A\u0648\u0631\u0641\u062A\u06AF\u06CC", +undo_desc:"\u0627\u0646\u062C\u0627\u0645 \u0639\u0645\u0644 \u0642\u0628\u0644 (Ctrl+Z)", +redo_desc:"\u0627\u0646\u062C\u0627\u0645 \u0639\u0645\u0644 \u0628\u0639\u062F (Ctrl+Y)", +link_desc:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0644\u06CC\u0646\u0643", +unlink_desc:"\u063A\u06CC\u0631 \u0644\u06CC\u0646\u0643 \u0643\u0631\u062F\u0646", +image_desc:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u062A\u0635\u0648\u06CC\u0631", +cleanup_desc:"\u067E\u0627\u0643 \u0633\u0627\u0632\u06CC \u0643\u062F \u0647\u0627\u06CC \u0628\u0647\u0645 \u062E\u0648\u0631\u062F\u0647", +code_desc:"\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0633\u0648\u0631\u0633 HTML", +sub_desc:"\u067E\u0627\u06CC\u06CC\u0646 \u0646\u0648\u06CC\u0633", +sup_desc:"\u0628\u0627\u0644\u0627 \u0646\u0648\u06CC\u0633", +hr_desc:"\u062F\u0631\u062C \u062E\u0637 \u0627\u0641\u0642\u06CC", +removeformat_desc:"\u062D\u0630\u0641 \u0642\u0627\u0644\u0628 \u0628\u0646\u062F\u06CC", +custom1_desc:"\u062A\u0648\u0636\u06CC\u062D \u0633\u0641\u0627\u0631\u0634\u06CC \u0634\u0645\u0627 \u062F\u0631 \u0627\u06CC\u0646\u062C\u0627", +forecolor_desc:"\u0627\u0646\u062A\u062E\u0627\u0628 \u0631\u0646\u06AF \u0645\u062A\u0646", +backcolor_desc:"\u0627\u0646\u062A\u062E\u0627\u0628 \u0631\u0646\u06AF \u0632\u0645\u06CC\u0646\u0647", +charmap_desc:"\u062F\u0631\u062C \u0643\u0627\u0631\u0627\u0643\u062A\u0631 \u0633\u0641\u0627\u0631\u0634\u06CC", +visualaid_desc:"\u062A\u0639\u0648\u06CC\u0636 \u0639\u0646\u0627\u0635\u0631 \u062E\u0637\u0648\u0637 \u0631\u0627\u0647\u0646\u0645\u0627/\u063A\u06CC\u0631 \u0642\u0627\u0628\u0644 \u0646\u0645\u0627\u06CC\u0627\u0646", +anchor_desc:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0644\u0646\u06AF\u0631", +cut_desc:"\u0628\u0631\u0634 (Cut)", +copy_desc:"\u0643\u067E\u06CC", +paste_desc:"\u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste)", +image_props_desc:"\u0645\u0634\u062E\u0635\u0627\u062A \u062A\u0635\u0648\u06CC\u0631", +newdocument_desc:"\u0633\u0646\u062F \u062C\u062F\u06CC\u062F", +help_desc:"\u0631\u0627\u0647\u0646\u0645\u0627\u06CC\u06CC", +blockquote_desc:"\u0628\u0644\u0648\u0643 \u0646\u0642\u0644 \u0642\u0648\u0644", +clipboard_msg:"\u0643\u067E\u06CC/\u0628\u0631\u0634 (Cut)/\u0686\u0633\u0628\u0627\u0646\u062F\u0646 (Paste) \u062F\u0631 Mozilla \u0648 Firefox \u0642\u0627\u0628\u0644 \u062F\u0633\u062A\u0631\u0633 \u0646\u0645\u06CC \u0628\u0627\u0634\u062F.\r\n\u0622\u06CC\u0627 \u0634\u0645\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062A \u0628\u06CC\u0634\u062A\u0631\u06CC \u062F\u0631\u0628\u0627\u0631\u0647 \u0627\u06CC\u0646 \u0645\u0648\u0636\u0648\u0639 \u0645\u06CC \u062E\u0648\u0627\u0647\u06CC\u062F\u061F", +path:"\u0645\u0633\u06CC\u0631", +newdocument:"\u0622\u06CC\u0627 \u0634\u0645\u0627 \u0645\u06CC \u062E\u0648\u0627\u0647\u06CC\u062F \u062A\u0627 \u062A\u0645\u0627\u0645\u06CC \u0645\u062D\u062A\u0648\u0627 \u0631\u0627 \u067E\u0627\u0643 \u0643\u0646\u06CC\u062F\u061F", +toolbar_focus:"\u067E\u0631\u0634 \u0628\u0647 \u062F\u0643\u0645\u0647 \u0647\u0627\u06CC \u0627\u0628\u0632\u0627\u0631 - Alt+Q \u060C \u067E\u0631\u0634 \u0628\u0647 \u0648\u06CC\u0631\u0627\u06CC\u0634\u06AF\u0631 - Alt-Z \u060C \u067E\u0631\u0634 \u0628\u0647 \u0645\u0633\u06CC\u0631 \u0639\u0646\u0635\u0631 - Alt-X", +more_colors:"\u0631\u0646\u06AF\u0647\u0627\u06CC \u0628\u06CC\u0634\u062A\u0631" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fa_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fa_dlg.js new file mode 100644 index 00000000..39373215 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fa_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('fa.advanced_dlg',{ +about_title:"\u062F\u0631\u0628\u0627\u0631\u0647 TinyMCE", +about_general:"\u062F\u0631\u0628\u0627\u0631\u0647", +about_help:"\u0631\u0627\u0647\u0646\u0645\u0627\u06CC\u06CC", +about_license:"\u0644\u06CC\u0633\u0627\u0646\u0633", +about_plugins:"\u0627\u0644\u062D\u0627\u0642\u0627\u062A", +about_plugin:"\u0627\u0644\u062D\u0627\u0642\u0647", +about_author:"\u0645\u0648\u0654\u0644\u0641", +about_version:"\u0646\u0633\u062E\u0647", +about_loaded:"\u0627\u0644\u062D\u0627\u0642\u0627\u062A \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0634\u062F\u0647", +anchor_title:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0644\u0646\u06AF\u0631 (Anchor)", +anchor_name:"\u0646\u0627\u0645 \u0644\u0646\u06AF\u0631 (Anchor)", +code_title:"\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0633\u0648\u0631\u0633 HTML", +code_wordwrap:"\u0634\u0643\u0633\u062A\u0646 \u062E\u0637\u0648\u0637", +colorpicker_title:"\u0627\u0646\u062A\u062E\u0627\u0628 \u06CC\u0643 \u0631\u0646\u06AF", +colorpicker_picker_tab:"\u0627\u0646\u062A\u062E\u0627\u0628 \u0643\u0646\u0646\u062F\u0647", +colorpicker_picker_title:"\u0627\u0646\u062A\u062E\u0627\u0628 \u0643\u0646\u0646\u062F\u0647 \u0631\u0646\u06AF", +colorpicker_palette_tab:"\u0627\u0644\u06AF\u0648", +colorpicker_palette_title:"\u0631\u0646\u06AF \u0647\u0627\u06CC \u0627\u0644\u06AF\u0648", +colorpicker_named_tab:"\u0646\u0627\u0645 \u062F\u0627\u0631", +colorpicker_named_title:"\u0631\u0646\u06AF \u0647\u0627\u06CC \u0646\u0627\u0645 \u062F\u0627\u0631", +colorpicker_color:"\u0631\u0646\u06AF:", +colorpicker_name:"\u0646\u0627\u0645:", +charmap_title:"\u0627\u0646\u062A\u062E\u0627\u0628 \u0643\u0627\u0631\u0627\u0643\u062A\u0631 \u0633\u0641\u0627\u0631\u0634\u06CC", +image_title:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u062A\u0635\u0648\u06CC\u0631", +image_src:"URL \u062A\u0635\u0648\u06CC\u0631", +image_alt:"\u062A\u0648\u0636\u06CC\u062D \u062A\u0635\u0648\u06CC\u0631", +image_list:"\u0644\u06CC\u0633\u062A \u062A\u0635\u0648\u06CC\u0631", +image_border:"\u062D\u0627\u0634\u06CC\u0647", +image_dimensions:"\u0627\u0628\u0639\u0627\u062F", +image_vspace:"\u0641\u0627\u0635\u0644\u0647 \u0639\u0645\u0648\u062F\u06CC", +image_hspace:"\u0641\u0627\u0635\u0644\u0647 \u0627\u0641\u0642\u06CC", +image_align:"\u062A\u0631\u0627\u0632", +image_align_baseline:"\u062E\u0637 \u067E\u0627\u06CC\u0647", +image_align_top:"\u0628\u0627\u0644\u0627", +image_align_middle:"\u0648\u0633\u0637", +image_align_bottom:"\u067E\u0627\u06CC\u06CC\u0646", +image_align_texttop:"\u0628\u0627\u0644\u0627 \u0645\u062A\u0646", +image_align_textbottom:"\u067E\u0627\u06CC\u06CC\u0646 \u0645\u062A\u0646", +image_align_left:"\u0686\u067E", +image_align_right:"\u0631\u0627\u0633\u062A", +link_title:"\u062F\u0631\u062C/\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0644\u06CC\u0646\u0643", +link_url:"URL \u0644\u06CC\u0646\u0643", +link_target:"\u0645\u0642\u0635\u062F (Target)", +link_target_same:"\u0628\u0627\u0632\u0634\u062F\u0646 \u0644\u06CC\u0646\u0643 \u062F\u0631 \u0647\u0645\u0627\u0646 \u067E\u0646\u062C\u0631\u0647", +link_target_blank:"\u0628\u0627\u0632 \u0634\u062F\u0646 \u0644\u06CC\u0646\u0643 \u062F\u0631 \u06CC\u0643 \u067E\u0646\u062C\u0631\u0647 \u062C\u062F\u06CC\u062F", +link_titlefield:"\u0639\u0646\u0648\u0627\u0646", +link_is_email:"URL \u06CC \u0643\u0647 \u0634\u0645\u0627 \u0648\u0627\u0631\u062F \u0646\u0645\u0648\u062F\u0647 \u0627\u06CC\u062F \u0628\u0647 \u0646\u0638\u0631 \u0645\u06CC \u0622\u06CC\u062F \u0643\u0647 \u06CC\u0643 \u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644 \u0645\u06CC \u0628\u0627\u0634\u062F \u060C \u0622\u06CC\u0627 \u0645\u0627\u06CC\u0644\u06CC\u062F \u062A\u0627 \u067E\u06CC\u0634\u0648\u0646\u062F \u0627\u062C\u0628\u0627\u0631\u06CC \u0644\u0627\u0632\u0645\u0647 :mailto \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F\u061F", +link_is_external:"URL \u06CC \u0643\u0647 \u0634\u0645\u0627 \u0648\u0627\u0631\u062F \u0646\u0645\u0648\u062F\u0647 \u0627\u06CC\u062F \u0628\u0647 \u0646\u0638\u0631 \u0645\u06CC \u0622\u06CC\u062F \u0643\u0647 \u0644\u06CC\u0646\u0643 \u062E\u0627\u0631\u062C\u06CC \u0645\u06CC \u0628\u0627\u0634\u062F \u060C \u0622\u06CC\u0627 \u0645\u0627\u06CC\u0644\u06CC\u062F \u062A\u0627 \u067E\u06CC\u0634\u0648\u0646\u062F \u0644\u0627\u0632\u0645\u0647 //:http \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06CC\u062F\u061F", +link_list:"\u0644\u06CC\u0633\u062A \u0644\u06CC\u0646\u0643" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fi.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fi.js new file mode 100644 index 00000000..076352d9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fi.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('fi.advanced',{ +style_select:"Tyylit", +font_size:"Fonttikoko", +fontdefault:"Fontti", +block:"Muotoilu", +paragraph:"Kappale", +div:"Div", +address:"Osoite", +pre:"Esimuotoiltu (pre)", +h1:"Otsikko 1", +h2:"Otsikko 2", +h3:"Otsikko 3", +h4:"Otsikko 4", +h5:"Otsikko 5", +h6:"Otsikko 6", +blockquote:"Pitk\u00E4 lainaus", +code:"Koodi", +samp:"Koodi esimerkki", +dt:"M\u00E4\u00E4rittelyn ehto ", +dd:"M\u00E4\u00E4rittelyn kuvaus", +bold_desc:"Lihavoitu (Ctrl+B)", +italic_desc:"Kursivoitu (Ctrl+I)", +underline_desc:"Alleviivattu (Ctrl+U)", +striketrough_desc:"Yliviivattu", +justifyleft_desc:"Tasaus vasemmalle", +justifycenter_desc:"Keskitetty", +justifyright_desc:"Tasaus oikealle", +justifyfull_desc:"Tasattu", +bullist_desc:"J\u00E4rjest\u00E4m\u00E4t\u00F6n lista", +numlist_desc:"J\u00E4rjestetty lista", +outdent_desc:"V\u00E4henn\u00E4 sisennyst\u00E4", +indent_desc:"Sisenn\u00E4", +undo_desc:"Peru (Ctrl+Z)", +redo_desc:"Tee uudelleen (Ctrl+Y)", +link_desc:"Lis\u00E4\u00E4/muuta linkki", +unlink_desc:"Poista linkki", +image_desc:"Lis\u00E4\u00E4/muuta kuva", +cleanup_desc:"Siisti sekainen koodi", +code_desc:"Editoi HTML-koodia", +sub_desc:"Alaindeksi", +sup_desc:"Yl\u00E4indeksi", +hr_desc:"Lis\u00E4\u00E4 vaakasuora viivain", +removeformat_desc:"Poista muotoilu", +custom1_desc:"Oma kuvauksesi t\u00E4h\u00E4n", +forecolor_desc:"Valitse tekstin v\u00E4ri", +backcolor_desc:"Valitse taustan v\u00E4ri", +charmap_desc:"Lis\u00E4\u00E4 erikoismerkki", +visualaid_desc:"Suuntaviivat/N\u00E4kym\u00E4tt\u00F6m\u00E4t elementit", +anchor_desc:"Lis\u00E4\u00E4/Muokkaa ankkuri", +cut_desc:"Leikkaa", +copy_desc:"Kopioi", +paste_desc:"Liit\u00E4", +image_props_desc:"Kuvan ominaisuudet", +newdocument_desc:"Uusi tiedosto", +help_desc:"Ohje", +blockquote_desc:"Pitk\u00E4 lainaus", +clipboard_msg:"Kopioi/Leikkaa/Liit\u00E4 -painikkeet eiv\u00E4t toimi Mozilla ja Firefox-selaimilla. Voit kuitenkin k\u00E4ytt\u00E4\u00E4 n\u00E4pp\u00E4inyhdistelmi\u00E4 kopioimiseen (ctrl+c), leikkaamiseen (ctrl+x) ja liitt\u00E4miseen (ctrl+v).\r\nHalutatko lis\u00E4\u00E4 tietoa?", +path:"Polku", +newdocument:"Haluatko varmasti tyhjent\u00E4\u00E4 kaiken sis\u00E4ll\u00F6n?", +toolbar_focus:"Siirry ty\u00F6kaluihin - Alt+Q, Siirry tekstieditoriin - Alt-Z, Siirry elementin polkuun - Alt-X", +more_colors:"Enemm\u00E4n v\u00E4rej\u00E4" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fi_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fi_dlg.js new file mode 100644 index 00000000..1309e6f1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fi_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('fi.advanced_dlg',{ +about_title:"Tietoja TinyMCE:st\u00E4", +about_general:"Tietoja", +about_help:"Ohje", +about_license:"Lisenssi", +about_plugins:"Lis\u00E4osat", +about_plugin:"Lis\u00E4osa", +about_author:"Kirjoittaja", +about_version:"Versio", +about_loaded:"Ladatut lis\u00E4osat", +anchor_title:"Liit\u00E4/muokkaa ankkuria", +anchor_name:"Ankkurin nimi", +code_title:"HTML-koodin muokkaus", +code_wordwrap:"Automaattinen rivinvaihto", +colorpicker_title:"Valitse v\u00E4ri", +colorpicker_picker_tab:"Valitsin", +colorpicker_picker_title:"V\u00E4rin valitsin", +colorpicker_palette_tab:"Paletti", +colorpicker_palette_title:"V\u00E4ripalette", +colorpicker_named_tab:"Nimetty", +colorpicker_named_title:"Nimetyt v\u00E4rit", +colorpicker_color:"V\u00E4ri:", +colorpicker_name:"Nimi:", +charmap_title:"Valitse erikoismerkki", +image_title:"Lis\u00E4\u00E4/muokkaa kuvaa", +image_src:"Kuvan osoite", +image_alt:"Kuvan kuvaus", +image_list:"Kuvalista", +image_border:"Reunus", +image_dimensions:"Mitat", +image_vspace:"Pystysuuntainen tila", +image_hspace:"Vaakasuuntainen tila", +image_align:"Tasaus", +image_align_baseline:"Tekstin tasossa", +image_align_top:"Yl\u00F6s", +image_align_middle:"Keskelle", +image_align_bottom:"Alas", +image_align_texttop:"Tekstin yl\u00E4osaan", +image_align_textbottom:"Tekstin alaosaan", +image_align_left:"Vasemmalle", +image_align_right:"Oikealle", +link_title:"Lis\u00E4\u00E4/muuta linkki", +link_url:"Linkin osoite", +link_target:"Kohde", +link_target_same:"Avaa linkki samassa ikkunassa", +link_target_blank:"Avaa linkki uuteen ikkunaan", +link_titlefield:"Otsikko", +link_is_email:"Antamasi osoite n\u00E4ytt\u00E4\u00E4 olevan s\u00E4\u00E4hk\u00F6postiosoite. Haluatko lis\u00E4t\u00E4 siihen mailto:-etuliitteen?", +link_is_external:"Antamasi osoite n\u00E4ytt\u00E4\u00E4 johtavan ulkopuoliselle sivustolle. Haluatko lis\u00E4t\u00E4 linkin eteen http://-etuliitteen? (suositus)", +link_list:"Linkkilista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fr.js new file mode 100644 index 00000000..a0fde92f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fr.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('fr.advanced',{ +style_select:"Styles", +font_size:"Taille de la police", +fontdefault:"Famille de police", +block:"Format", +paragraph:"Paragraphe", +div:"Div", +address:"Adresse", +pre:"Preformatt\u00E9", +h1:"Titre 1", +h2:"Titre 2", +h3:"Titre 3", +h4:"Titre 4", +h5:"Titre 5", +h6:"Titre 6", +blockquote:"Citation", +code:"Code", +samp:"Exemple de code", +dt:"Terme \u00E0 d\u00E9finir", +dd:"D\u00E9finition du terme", +bold_desc:"Gras (Ctrl+B)", +italic_desc:"Italique (Ctrl+I)", +underline_desc:"Soulign\u00E9 (Ctrl+U)", +striketrough_desc:"Barr\u00E9", +justifyleft_desc:"Align\u00E9 \u00E0 gauche", +justifycenter_desc:"Centr\u00E9", +justifyright_desc:"Align\u00E9 \u00E0 droite", +justifyfull_desc:"Justifi\u00E9", +bullist_desc:"Liste non-num\u00E9rot\u00E9e", +numlist_desc:"Liste num\u00E9rot\u00E9e", +outdent_desc:"Retirer l'indentation", +indent_desc:"Indenter", +undo_desc:"D\u00E9faire (Ctrl+Z)", +redo_desc:"Refaire (Ctrl+Y)", +link_desc:"Ins\u00E9rer/\u00C9diter le lien", +unlink_desc:"D\u00E9lier", +image_desc:"Ins\u00E9rer/\u00C9diter l'image", +cleanup_desc:"Nettoyer le code non propre", +code_desc:"\u00C9diter source HTML", +sub_desc:"Indice", +sup_desc:"Exposant", +hr_desc:"Ins\u00E9rer trait horizontal", +removeformat_desc:"Enlever formattage", +custom1_desc:"Votre description personnalis\u00E9e ici", +forecolor_desc:"Choisir la couleur du texte", +backcolor_desc:"Choisir la couleur de surlignage", +charmap_desc:"Ins\u00E9rer caract\u00E8res sp\u00E9ciaux", +visualaid_desc:"Activer/d\u00E9sactiver les guides et les \u00E9l\u00E9ments invisibles", +anchor_desc:"Ins\u00E9rer/\u00C9diter ancre", +cut_desc:"Couper", +copy_desc:"Copier", +paste_desc:"Coller", +image_props_desc:"Propri\u00E9t\u00E9s de l'image", +newdocument_desc:"Nouveau document", +help_desc:"Aide", +blockquote_desc:"Citation", +clipboard_msg:"Copier/Couper/Coller n'est pas disponible sous Mozilla et sous Firefox.\n\r\n Voulez-vous plus d'information sur ce probl\u00E8me\u00A0?", +path:"Chemin", +newdocument:"\u00CAtes-vous s\u00FBr de vouloir effacer l'enti\u00E8ret\u00E9 du document\u00A0?", +toolbar_focus:"Aller aux boutons de l'\u00E9diteur - Alt+Q, Aller \u00E0 l'\u00E9diteur - Alt-Z, Aller au chemin de l'\u00E9l\u00E9ment - Alt-X", +more_colors:"Plus de couleurs" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fr_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fr_dlg.js new file mode 100644 index 00000000..3aee7b27 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/fr_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('fr.advanced_dlg',{ +about_title:"\u00C0 propos de TinyMCE", +about_general:"\u00C0 propos", +about_help:"Aide", +about_license:"Licence", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Auteur", +about_version:"Version", +about_loaded:"Plugins charg\u00E9s", +anchor_title:"Ins\u00E9rer/\u00C9diter ancre", +anchor_name:"Nom de l'ancre", +code_title:"\u00C9diteur de la source HTML", +code_wordwrap:"Rupture de ligne", +colorpicker_title:"Choisir une couleur", +colorpicker_picker_tab:"Nuancier", +colorpicker_picker_title:"Nuancier", +colorpicker_palette_tab:"Palette", +colorpicker_palette_title:"Couleurs de la palette", +colorpicker_named_tab:"Noms", +colorpicker_named_title:"Couleurs nomm\u00E9es", +colorpicker_color:"Couleur :", +colorpicker_name:"Nom :", +charmap_title:"Choisir le caract\u00E8re \u00E0 ins\u00E9rer", +image_title:"Ins\u00E9rer/\u00C9diter image", +image_src:"URL de l'image", +image_alt:"Description de l'image", +image_list:"Liste d'images", +image_border:"Bordure", +image_dimensions:"Dimensions", +image_vspace:"Espacement vertical", +image_hspace:"Espacement horizontal", +image_align:"Alignement", +image_align_baseline:"Base", +image_align_top:"Sommet", +image_align_middle:"Milieu", +image_align_bottom:"Bas", +image_align_texttop:"Haut du texte", +image_align_textbottom:"Bas du texte", +image_align_left:"Gauche", +image_align_right:"Droite", +link_title:"Ins\u00E9rer/\u00C9diter lien", +link_url:"URL du lien", +link_target:"Cible", +link_target_same:"Ouvrir dans la m\u00EAme fen\u00EAtre", +link_target_blank:"Ouvrir dans une nouvelle fen\u00EAtre", +link_titlefield:"Titre", +link_is_email:"L'url que vous avez entr\u00E9 semble \u00EAtre une adresse e-mail, voulez-vous ajouter le pr\u00E9fixe mailto:\u00A0?", +link_is_external:"L'url que vous avez entr\u00E9 semble \u00EAtre une adresse web externe, voulez-vous ajouter le pr\u00E9fixe http://\u00A0?", +link_list:"Liste de liens" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/gl.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/gl.js new file mode 100644 index 00000000..caea6eea --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/gl.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('gl.advanced',{ +style_select:"Estilos", +font_size:"Tama\u00F1o", +fontdefault:"Fonte", +block:"Formato", +paragraph:"P\u00E1rrafo", +div:"Div", +address:"Enderezo", +pre:"Pre-formateado", +h1:"Encabezamento 1", +h2:"Encabezamento 2", +h3:"Encabezamento 3", +h4:"Encabezamento 4", +h5:"Encabezamento 5", +h6:"Encabezamento 6", +blockquote:"Bloque de cita", +code:"C\u00F3digo", +samp:"Mostra de c\u00F3digo", +dt:"Termo de definici\u00F3n", +dd:"Descripci\u00F3n de definici\u00F3n", +bold_desc:"Negrita (Ctrl+B)", +italic_desc:"Cursiva (Ctrl+I)", +underline_desc:"Subli\u00F1ado (Ctrl+U)", +striketrough_desc:"Tachado", +justifyleft_desc:"Ali\u00F1ar \u00E1 esquerda", +justifycenter_desc:"Ali\u00F1ar \u00F3 centro", +justifyright_desc:"Ali\u00F1ar \u00E1 dereita", +justifyfull_desc:"Xustificar", +bullist_desc:"Lista desordenada", +numlist_desc:"Lista ordenada", +outdent_desc:"Reducir sangr\u00EDa", +indent_desc:"Aumentar sangr\u00EDa", +undo_desc:"Desfacer (Ctrl+Z)", +redo_desc:"Re-facer (Ctrl+Y)", +link_desc:"Insertar/editar hiperv\u00EDnculo", +unlink_desc:"Quitar hiperv\u00EDnculo", +image_desc:"Insertar/editar imaxe", +cleanup_desc:"Limpiar lixo no c\u00F3digo", +code_desc:"Editar c\u00F3digo HTML", +sub_desc:"Sub\u00EDndice", +sup_desc:"Super\u00EDndice", +hr_desc:"Insertar regra horizontal", +removeformat_desc:"quitar formato", +custom1_desc:"A s\u00FAa descripci\u00F3n persoal aqu\u00ED", +forecolor_desc:"Seleccionar cor do texto", +backcolor_desc:"Seleccionar cor do fondo", +charmap_desc:"Insertar caracteres persoalizados", +visualaid_desc:"Mostrar/ocultar li\u00F1a de gu\u00EDa/elementos invisibres", +anchor_desc:"Insertar/editar \u00E1ncora", +cut_desc:"Cortar", +copy_desc:"Copiar", +paste_desc:"Pegar", +image_props_desc:"Propiedades de imaxe", +newdocument_desc:"Novo documento", +help_desc:"Axuda", +blockquote_desc:"Cita", +clipboard_msg:"Copiar/Cortar/Pegar non est\u00E1 disponible en Mozilla e Firefox.\r\n\u00BFDesexa obter mais informaci\u00F3n sobre de este asunto?", +path:"Ruta", +newdocument:"\u00BFSeguro que desexa limpar todo o contido?", +toolbar_focus:"Ir \u00F3s bot\u00F3ns de ferramentas - Alt+Q, Ir \u00F3 editor - Alt-Z, Ir \u00E1 ruta do elemento - Alt-X", +more_colors:"M\u00E1is cores" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/gl_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/gl_dlg.js new file mode 100644 index 00000000..98e000c6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/gl_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('gl.advanced_dlg',{ +about_title:"Sobre TinyMCE", +about_general:"Sobre", +about_help:"Axuda", +about_license:"Licencia", +about_plugins:"Comprementos", +about_plugin:"Compremento", +about_author:"Autor", +about_version:"Versi\u00F3n", +about_loaded:"Comprementos cargados", +anchor_title:"Insertar/editar \u00E1ncora", +anchor_name:"Nome da \u00E1ncora", +code_title:"Editor HTML", +code_wordwrap:"Cortar li\u00F1as autom\u00E1ticamente", +colorpicker_title:"Seleccionar cor", +colorpicker_picker_tab:"Selector", +colorpicker_picker_title:"Selector de cores", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta de cores", +colorpicker_named_tab:"Nomeados", +colorpicker_named_title:"Cores nomeados", +colorpicker_color:"Cor:", +colorpicker_name:"Nome:", +charmap_title:"Seleccionar caracter personalizado", +image_title:"Insertar/editar imaxe", +image_src:"URL da imaxe", +image_alt:"Descripci\u00F3n da imaxe", +image_list:"Lista de Imaxes", +image_border:"Borde", +image_dimensions:"Dimensi\u00F3n", +image_vspace:"Espacio vertical", +image_hspace:"Espacio horizontal", +image_align:"Ali\u00F1aci\u00F3n", +image_align_baseline:"Li\u00F1a base", +image_align_top:"Arriba", +image_align_middle:"Medio", +image_align_bottom:"Abaixo", +image_align_texttop:"Texto arriba", +image_align_textbottom:"Texto abaixo", +image_align_left:"Esquerda", +image_align_right:"Dereita", +link_title:"Insertar/editar enlace", +link_url:"URL do enlace", +link_target:"Obxetivo", +link_target_same:"Abrir v\u00EDnculo na mesma vent\u00E1", +link_target_blank:"Abrir v\u00EDnculo nunha vent\u00E1 nova", +link_titlefield:"T\u00EDtulo", +link_is_email:"A URL introducida semella ser un enderezo de e-mail, \u00BFDesexa engadi-lo prefixo necesario mailto:?", +link_is_external:"A URL introducida semella ser un v\u00EDnculo externo, \u00BFDesexa engadi-lo prefixo necesario http://?", +link_list:"Lista de hiperv\u00EDnculos" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/he.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/he.js new file mode 100644 index 00000000..372127ca --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/he.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('he.advanced',{ +style_select:"\u05E1\u05D2\u05E0\u05D5\u05E0\u05D5\u05EA", +font_size:"\u05D2\u05D5\u05D3\u05DC \u05D2\u05D5\u05E4\u05DF", +fontdefault:"\u05D2\u05D5\u05E4\u05DF", +block:"\u05E2\u05D9\u05E6\u05D5\u05D1", +paragraph:"\u05E4\u05E1\u05E7\u05D4", +div:"Div", +address:"\u05DB\u05EA\u05D5\u05D1\u05EA", +pre:"Preformatted", +h1:"\u05DB\u05D5\u05EA\u05E8\u05EA 1", +h2:"\u05DB\u05D5\u05EA\u05E8\u05EA 2", +h3:"\u05DB\u05D5\u05EA\u05E8\u05EA 3", +h4:"\u05DB\u05D5\u05EA\u05E8\u05EA 4", +h5:"\u05DB\u05D5\u05EA\u05E8\u05EA 5", +h6:"\u05DB\u05D5\u05EA\u05E8\u05EA 6", +blockquote:"\u05E6\u05D9\u05D8\u05D5\u05D8 \u05D1\u05DC\u05D5\u05E7", +code:"\u05E7\u05D5\u05D3", +samp:"\u05D3\u05D5\u05D2\u05DE\u05EA \u05E7\u05D5\u05D3", +dt:"\u05DE\u05D5\u05E9\u05D2", +dd:"\u05D4\u05D2\u05D3\u05E8\u05EA \u05D4\u05DE\u05D5\u05E9\u05D2", +bold_desc:"\u05DE\u05D5\u05D3\u05D2\u05E9 (Ctrl+B)", +italic_desc:"\u05E0\u05D8\u05D5\u05D9 (Ctrl+I)", +underline_desc:"\u05E7\u05D5 \u05EA\u05D7\u05EA\u05D5\u05DF(Ctrl+U)", +striketrough_desc:"\u05E7\u05D5 \u05D7\u05D5\u05E6\u05D4", +justifyleft_desc:"\u05D9\u05D9\u05E9\u05D5\u05E8 \u05D8\u05E7\u05E1\u05D8 \u05DC\u05E9\u05DE\u05D0\u05DC", +justifycenter_desc:"\u05DE\u05E8\u05DB\u05D6", +justifyright_desc:"\u05D9\u05D9\u05E9\u05D5\u05E8 \u05D8\u05E7\u05E1\u05D8 \u05DC\u05D9\u05DE\u05D9\u05DF", +justifyfull_desc:"\u05D9\u05D9\u05E9\u05D5\u05E8 \u05DC\u05E9\u05E0\u05D9 \u05D4\u05E6\u05D3\u05D3\u05D9\u05DD", +bullist_desc:"\u05EA\u05D1\u05DC\u05D9\u05D8\u05D9\u05DD", +numlist_desc:"\u05DE\u05E1\u05E4\u05D5\u05E8", +outdent_desc:"\u05D4\u05D2\u05D3\u05DC\u05EA \u05DB\u05E0\u05D9\u05E1\u05D4", +indent_desc:"\u05D4\u05E7\u05D8\u05E0\u05EA \u05DB\u05E0\u05D9\u05E1\u05D4", +undo_desc:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4 (Ctrl+Z)", +redo_desc:"\u05D7\u05D6\u05E8\u05D4 \u05E2\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4 (Ctrl+Y)", +link_desc:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05D4\u05D9\u05E4\u05E8-\u05E7\u05D9\u05E9\u05D5\u05E8", +unlink_desc:"\u05D4\u05E1\u05E8\u05EA \u05D4\u05D9\u05E4\u05E8-\u05E7\u05D9\u05E9\u05D5\u05E8", +image_desc:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05D3\u05E3 \u05EA\u05DE\u05D5\u05E0\u05D4", +cleanup_desc:"\u05E0\u05D9\u05E7\u05D5\u05D9 \u05E7\u05D5\u05D3", +code_desc:"\u05E2\u05E8\u05D9\u05DB\u05EA \u05E7\u05D5\u05D3 HTML", +sub_desc:"\u05DB\u05EA\u05D1 \u05E2\u05D9\u05DC\u05D9", +sup_desc:"\u05DB\u05EA\u05D1 \u05EA\u05D7\u05EA\u05D9", +hr_desc:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05E7\u05D5 \u05DE\u05EA\u05D7", +removeformat_desc:"\u05D4\u05E1\u05E8\u05EA \u05E2\u05D9\u05E6\u05D5\u05D1", +custom1_desc:"\u05D4\u05EA\u05D0\u05D5\u05E8 \u05E9\u05DC\u05DA \u05DB\u05D0\u05D5", +forecolor_desc:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05E6\u05D1\u05E2 \u05D2\u05D5\u05E4\u05DF", +backcolor_desc:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05E6\u05D1\u05E2 \u05E8\u05E7\u05E2", +charmap_desc:"\u05D4\u05D5\u05E1\u05E4\u05EA \u05E1\u05D9\u05DE\u05DF", +visualaid_desc:"\u05D4\u05E6\u05D2\u05D4 \u05D0\u05D5 \u05D4\u05E1\u05EA\u05E8\u05D4 \u05E9\u05DC \u05E1\u05D9\u05DE\u05D5\u05E0\u05D9 \u05E2\u05D9\u05E6\u05D5\u05D1", +anchor_desc:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05E1\u05D9\u05DE\u05E0\u05D9\u05D4", +cut_desc:"\u05D2\u05D6\u05D9\u05E8\u05D4", +copy_desc:"\u05D4\u05E2\u05EA\u05E7\u05D4", +paste_desc:"\u05D4\u05D3\u05D1\u05E7\u05D4", +image_props_desc:"\u05DE\u05D0\u05E4\u05D9\u05D9\u05E0\u05D9 \u05D4\u05EA\u05DE\u05D5\u05E0\u05D4", +newdocument_desc:"\u05DE\u05E1\u05DE\u05DA \u05D7\u05D3\u05E9", +help_desc:"\u05E2\u05D6\u05E8\u05D4", +blockquote_desc:"\u05E6\u05D9\u05D8\u05D5\u05D8", +clipboard_msg:"\u05D4\u05E2\u05EA\u05E7/\u05D2\u05D6\u05D5\u05E8/\u05D4\u05D3\u05D1\u05E7 \u05DC\u05D0 \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD \u05D1 Mozilla \u05D5\u05D1-Firefox.\r\n \u05D4\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05E7\u05D1\u05DC \u05DE\u05D9\u05D3\u05E2 \u05E0\u05D5\u05E1\u05E3 \u05E2\u05DC \u05D4\u05E0\u05D5\u05E9\u05D0?", +path:"path", +newdocument:"\u05D4\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05DE\u05D7\u05D5\u05E7 \u05D0\u05EA \u05DB\u05DC \u05D4\u05EA\u05D5\u05DB\u05DF?", +toolbar_focus:"\u05D4\u05E2\u05D1\u05E8\u05D4 \u05DC\u05E1\u05E8\u05D2\u05DC \u05D4\u05DB\u05DC\u05D9\u05DD - Alt+Q, \u05D4\u05E2\u05D1\u05E8\u05D4 \u05DC\u05DE\u05E2\u05D1\u05D3 \u05EA\u05DE\u05DC\u05D9\u05DC\u05D9\u05DD - Alt-Z, \u05D4\u05E2\u05D1\u05E8\u05D4 \u05DC\u05E0\u05EA\u05D9\u05D1 \u05D4\u05D0\u05DC\u05DE\u05D8\u05D9\u05DD - Alt-X", +more_colors:"\u05E2\u05D5\u05D3 \u05E6\u05D1\u05E2\u05D9\u05DD" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/he_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/he_dlg.js new file mode 100644 index 00000000..35162ea5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/he_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('he.advanced_dlg',{ +about_title:"\u05D0\u05D5\u05D3\u05D5\u05EA TinyMCE", +about_general:"\u05D0\u05D5\u05D3\u05D5\u05EA", +about_help:"\u05E2\u05D6\u05E8\u05D4", +about_license:"\u05E8\u05E9\u05D9\u05D5\u05DF", +about_plugins:"\u05EA\u05D5\u05E1\u05E4\u05D5\u05EA", +about_plugin:"\u05EA\u05D5\u05E1\u05E4\u05EA", +about_author:"\u05D9\u05D5\u05E6\u05E8", +about_version:"\u05D2\u05D9\u05E8\u05E1\u05D4", +about_loaded:"\u05EA\u05D5\u05E1\u05E4\u05D5\u05EA \u05E4\u05E2\u05D9\u05DC\u05D5\u05EA", +anchor_title:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05E1\u05D9\u05DE\u05E0\u05D9\u05D4", +anchor_name:"\u05E9\u05DD \u05D4\u05E1\u05D9\u05DE\u05E0\u05D9\u05D4", +code_title:"\u05E2\u05D5\u05E8\u05DA \u05D4-HTML", +code_wordwrap:"\u05D4\u05E2\u05D1\u05E8\u05EA \u05DE\u05D9\u05DC\u05D9\u05DD", +colorpicker_title:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05E6\u05D1\u05E2", +colorpicker_picker_tab:"\u05D1\u05D5\u05E8\u05E8", +colorpicker_picker_title:"\u05D1\u05D5\u05E8\u05E8 \u05D4\u05E6\u05D1\u05E2\u05D9\u05DD", +colorpicker_palette_tab:"\u05DC\u05D5\u05D7 \u05E6\u05D1\u05E2\u05D9\u05DD", +colorpicker_palette_title:"\u05DC\u05D5\u05D7 \u05E6\u05D1\u05E2\u05D9\u05DD", +colorpicker_named_tab:"\u05DB\u05E0\u05D5\u05D9", +colorpicker_named_title:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DB\u05E0\u05D5\u05D9\u05DD", +colorpicker_color:"\u05E6\u05D1\u05E2:", +colorpicker_name:"\u05E9\u05DD:", +charmap_title:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05E1\u05D9\u05DE\u05DF", +image_title:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4", +image_src:"\u05DB\u05EA\u05D5\u05D1\u05EA:", +image_alt:"\u05EA\u05D9\u05D0\u05D5\u05E8", +image_list:"\u05E8\u05E9\u05D9\u05DE\u05D4", +image_border:"\u05D2\u05D1\u05D5\u05DC", +image_dimensions:"\u05D2\u05D5\u05D3\u05DC", +image_vspace:"\u05E8\u05D5\u05D5\u05D7 \u05D0\u05E0\u05DB\u05D9", +image_hspace:"\u05E8\u05D5\u05D5\u05D7 \u05D0\u05D5\u05E4\u05E7\u05D9", +image_align:"\u05D9\u05D9\u05E9\u05D5\u05E8", +image_align_baseline:"\u05E7\u05D5 \u05D4\u05D4\u05EA\u05D7\u05DC\u05D4", +image_align_top:"\u05E7\u05E6\u05D4 \u05D4\u05E2\u05DC\u05D9\u05D5\u05DF", +image_align_middle:"\u05D0\u05DE\u05E6\u05E2", +image_align_bottom:"\u05E7\u05E6\u05D4 \u05D4\u05EA\u05D7\u05EA\u05D5\u05DF", +image_align_texttop:"\u05E7\u05E6\u05D4 \u05D4\u05E2\u05DC\u05D9\u05D5\u05DF \u05E9\u05DC \u05D4\u05D8\u05E7\u05E1\u05D8", +image_align_textbottom:"\u05E7\u05E6\u05D4 \u05D4\u05EA\u05D7\u05EA\u05D5\u05DF \u05E9\u05DC \u05D4\u05D8\u05E7\u05E1\u05D8", +image_align_left:"\u05E9\u05DE\u05D0\u05DC", +image_align_right:"\u05D9\u05DE\u05D9\u05DF", +link_title:"\u05D4\u05D5\u05E1\u05E4\u05D4/\u05E2\u05E8\u05D9\u05DB\u05EA \u05E7\u05D9\u05E9\u05D5\u05E8", +link_url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D4\u05D4\u05D9\u05E4\u05E8-\u05E7\u05D9\u05E9\u05D5\u05E8", +link_target:"\u05D9\u05E2\u05D3", +link_target_same:"\u05E4\u05EA\u05D7 \u05E7\u05D9\u05E9\u05D5\u05E8 \u05D1\u05D0\u05D5\u05EA\u05D5 \u05D7\u05DC\u05D5\u05DF", +link_target_blank:"\u05E4\u05EA\u05D7 \u05E7\u05D9\u05E9\u05D5\u05E8 \u05D1\u05D7\u05DC\u05D5\u05DF \u05D7\u05D3\u05E9", +link_titlefield:"\u05DB\u05D5\u05EA\u05E8\u05EA", +link_is_email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D4-URL \u05E9\u05D4\u05D5\u05DB\u05E0\u05E1\u05D4 \u05D4\u05D9\u05D0 \u05DB\u05DB\u05DC \u05D4\u05E0\u05E8\u05D0\u05D4 \u05DB\u05EA\u05D5\u05D1\u05EA \u05DE\u05D9\u05D9\u05DC \u05D4\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05D0\u05EA \u05D4\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA MAILTO \u05D4\u05E0\u05D3\u05E8\u05E9\u05EA?", +link_is_external:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D4-URL \u05E9\u05D4\u05D5\u05DB\u05E0\u05E1\u05D4 \u05D4\u05D9\u05D0 \u05DB\u05DB\u05DC \u05D4\u05E0\u05E8\u05D0\u05D4 \u05E7\u05D9\u05E9\u05D5\u05E8 \u05D7\u05D9\u05E6\u05D5\u05E0\u05D9 \u05D4\u05D0\u05DD \u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05D0\u05EA \u05D4\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA http:// \u05D4\u05E0\u05D3\u05E8\u05E9\u05EA?", +link_list:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05E7\u05D9\u05E9\u05D5\u05E8\u05D9\u05DD" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hr.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hr.js new file mode 100644 index 00000000..9104b311 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hr.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('hr.advanced',{ +style_select:"Stilovi", +font_size:"Veli\u010Dina pisma", +fontdefault:"Vrsta pisma", +block:"Format", +paragraph:"Paragraf", +div:"Div", +address:"Adresa", +pre:"Oblikovano", +h1:"Naslov 1", +h2:"Naslov 2", +h3:"Naslov 3", +h4:"Naslov 4", +h5:"Naslov 5", +h6:"Naslov 6", +blockquote:"Citat", +code:"Kod", +samp:"Primjer koda", +dt:"Definicija pojma", +dd:"Opis definicije", +bold_desc:"Podebljaj (Ctrl+B)", +italic_desc:"Kurziv (Ctrl+I)", +underline_desc:"Podcrtaj (Ctrl+U)", +striketrough_desc:"Precrtaj", +justifyleft_desc:"Poravnaj lijevo", +justifycenter_desc:"Centriraj", +justifyright_desc:"Poravnaj desno", +justifyfull_desc:"Poravnaj potpuno", +bullist_desc:"Neure\u0111ena lista", +numlist_desc:"Ure\u0111ena lista", +outdent_desc:"Uvuci", +indent_desc:"Izvuci", +undo_desc:"Poni\u0161ti (Ctrl+Z)", +redo_desc:"Ponovi (Ctrl+Y)", +link_desc:"Umetni/uredi poveznicu", +unlink_desc:"Poni\u0161ti poveznicu", +image_desc:"Umetni/uredi sliku", +cleanup_desc:"Po\u010Disti kod", +code_desc:"Uredi HTML izvor", +sub_desc:"Indeks", +sup_desc:"Eksponent", +hr_desc:"Umetni vodoravnu crtu", +removeformat_desc:"Poni\u0161ti oblikovanje", +custom1_desc:"Vlastiti opis ovdje", +forecolor_desc:"Odaberite boju teksta", +backcolor_desc:"Odaberite boju pozadine", +charmap_desc:"Umetni vlastiti znak", +visualaid_desc:"Vodilice/nevidljivi elementi", +anchor_desc:"Umetni/uredi sidro", +cut_desc:"Izre\u017Ei", +copy_desc:"Kopiraj", +paste_desc:"Zalijepi", +image_props_desc:"Svojstva slike", +newdocument_desc:"Novi dokument", +help_desc:"Pomo\u0107", +blockquote_desc:"Citiraj", +clipboard_msg:"Kopiraj/Izre\u017Ei/Zalijepi nije dostupno u Mozilla i Firefox preglednicima. Vi\u0161e informacija?", +path:"Staza", +newdocument:"Jeste li sigurni da \u017Eelite izbrisati cijeli sadr\u017Eaj?", +toolbar_focus:"Prije\u0111i na alatnu traku - Alt+Q, prije\u0111i na ure\u0111iva\u010D - Alt-Z, prije\u0111i na element path - Alt-X", +more_colors:"Vi\u0161e boja" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hr_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hr_dlg.js new file mode 100644 index 00000000..f008b5ca --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hr_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('hr.advanced_dlg',{ +about_title:"TinyMCE", +about_general:"O programu", +about_help:"Pomo\u0107", +about_license:"Licenca", +about_plugins:"Dodaci", +about_plugin:"Dodatak", +about_author:"Autor", +about_version:"Verzija", +about_loaded:"Postoje\u0107i dodaci", +anchor_title:"Umetni/uredi sidro", +anchor_name:"Ime sidra", +code_title:"HTML ure\u0111iva\u010D", +code_wordwrap:"Omatanje teksta", +colorpicker_title:"Izbor boje", +colorpicker_picker_tab:"Odabir", +colorpicker_picker_title:"Odabir boje", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta boja", +colorpicker_named_tab:"Imenovano", +colorpicker_named_title:"Imenovane boje", +colorpicker_color:"Boja:", +colorpicker_name:"Naziv:", +charmap_title:"Odaberite znak", +image_title:"Umetni/uredi sliku", +image_src:"URL slike", +image_alt:"Opis slike", +image_list:"Lista slika", +image_border:"Obrub", +image_dimensions:"Dimenzije", +image_vspace:"Okomiti razmak", +image_hspace:"Vodoravni razmak", +image_align:"Poravnavanje", +image_align_baseline:"Osnovna linija", +image_align_top:"Vrh", +image_align_middle:"Sredina", +image_align_bottom:"Dno", +image_align_texttop:"Vrh teksta", +image_align_textbottom:"Dno teksta", +image_align_left:"Lijevo", +image_align_right:"Desno", +link_title:"Umetni/uredi poveznicu", +link_url:"URL poveznice", +link_target:"Meta", +link_target_same:"Otvori poveznicu u istom prozoru", +link_target_blank:"Otvori poveznicu u novom prozoru", +link_titlefield:"Naslov", +link_is_email:"URL koji ste unijeli izgleda kao e-mail adresa, \u017Eelite li dodati potrebni mailto: prefiks?", +link_is_external:"URL koji ste unijeli izgleda kao vanjska poveznica, \u017Eelite li dodati potrebni http:// prefiks?", +link_list:"Lista poveznica" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hu.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hu.js new file mode 100644 index 00000000..3c674385 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hu.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('hu.advanced',{ +style_select:"St\u00EDlusok", +font_size:"Bet\u0171m\u00E9ret", +fontdefault:"Bet\u0171t\u00EDpus", +block:"Form\u00E1tum", +paragraph:"Bekezd\u00E9s", +div:"Div", +address:"C\u00EDm", +pre:"El\u0151form\u00E1zott", +h1:"C\u00EDmsor 1", +h2:"C\u00EDmsor 2", +h3:"C\u00EDmsor 3", +h4:"C\u00EDmsor 4", +h5:"C\u00EDmsor 5", +h6:"C\u00EDmsor 6", +blockquote:"Id\u00E9zet", +code:"K\u00F3d", +samp:"K\u00F3d minta", +dt:"Defini\u00E1lt kifejez\u00E9s a defin\u00EDci\u00F3s list\u00E1ban", +dd:"Defin\u00EDci\u00F3 a defin\u00EDci\u00F3s list\u00E1ban", +bold_desc:"F\u00E9lk\u00F6v\u00E9r (Ctrl+B)", +italic_desc:"D\u0151lt (Ctrl+I)", +underline_desc:"Al\u00E1h\u00FAzott (Ctrl+U)", +striketrough_desc:"\u00C1th\u00FAzott", +justifyleft_desc:"Balra z\u00E1rt", +justifycenter_desc:"K\u00F6z\u00E9pre z\u00E1rt", +justifyright_desc:"Jobbra z\u00E1rt", +justifyfull_desc:"Sorkiz\u00E1rt", +bullist_desc:"Rendezetlen lista", +numlist_desc:"Rendezett lista", +outdent_desc:"Beh\u00FAz\u00E1s cs\u00F6kkent\u00E9se", +indent_desc:"Beh\u00FAz\u00E1s n\u00F6vel\u00E9se", +undo_desc:"Visszavon (Ctrl+Z)", +redo_desc:"M\u00E9gis v\u00E9grehajt (Ctrl+Y)", +link_desc:"Link besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +unlink_desc:"Link megsz\u00FCntet\u00E9se", +image_desc:"K\u00E9p besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +cleanup_desc:"Rendetlen k\u00F3d takar\u00EDt\u00E1sa", +code_desc:"HTML forr\u00E1s szerkeszt\u00E9se", +sub_desc:"Als\u00F3 index", +sup_desc:"Fels\u0151 index", +hr_desc:"V\u00EDzszintes elv\u00E1laszt\u00F3 besz\u00FAr\u00E1sa", +removeformat_desc:"Form\u00E1z\u00E1s elt\u00E1vol\u00EDt\u00E1sa", +custom1_desc:"Az \u00F6n egyedi le\u00EDr\u00E1sa", +forecolor_desc:"Sz\u00F6vegsz\u00EDn v\u00E1laszt\u00E1sa", +backcolor_desc:"H\u00E1tt\u00E9rsz\u00EDn v\u00E1laszt\u00E1sa", +charmap_desc:"Speci\u00E1lis karakter besz\u00FAr\u00E1sa", +visualaid_desc:"Vezet\u0151vonalak/nem l\u00E1that\u00F3 elemek ki-/bekapcsol\u00E1sa", +anchor_desc:"Horgony besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +cut_desc:"Kiv\u00E1g\u00E1s", +copy_desc:"M\u00E1sol\u00E1s", +paste_desc:"Besz\u00FAr\u00E1s", +image_props_desc:"K\u00E9p tulajdons\u00E1gai", +newdocument_desc:"\u00DAj dokumentum", +help_desc:"Seg\u00EDts\u00E9g", +blockquote_desc:"Id\u00E9zet", +clipboard_msg:"A M\u00E1sol\u00E1s/Kiv\u00E1g\u00E1s/Besz\u00FAr\u00E1s funkci\u00F3k nem el\u00E9rhet\u0151k Mozilla \u00E9s Firefox alatt. K\u00EDv\u00E1n t\u00F6bbet tudni err\u0151l a t\u00E9m\u00E1r\u00F3l?", +path:"\u00DAtvonal", +newdocument:"Biztosan t\u00F6rli az eddigi tartalmat?", +toolbar_focus:"Eszk\u00F6zgombokra ugr\u00E1s - Alt+Q, Szerkeszt\u0151h\u00F6z ugr\u00E1s - Alt-Z, Elem\u00FAtvonalhoz ugr\u00E1s - Alt-X", +more_colors:"T\u00F6bb sz\u00EDn" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hu_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hu_dlg.js new file mode 100644 index 00000000..3a3eb8ba --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/hu_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('hu.advanced_dlg',{ +about_title:"A TinyMCE-r\u0151l", +about_general:"R\u00F3lunk", +about_help:"Seg\u00EDts\u00E9g", +about_license:"Licensz", +about_plugins:"Pluginok", +about_plugin:"Plugin", +about_author:"Szerz\u0151", +about_version:"Verzi\u00F3", +about_loaded:"Bet\u00F6lt\u00F6tt pluginok", +anchor_title:"Horgony besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +anchor_name:"Horgonyn\u00E9v", +code_title:"HTML forr\u00E1s szerkeszt\u00E9se", +code_wordwrap:"Sz\u00F6veg t\u00F6rdel\u00E9se", +colorpicker_title:"Sz\u00EDnv\u00E1laszt\u00E1s", +colorpicker_picker_tab:"V\u00E1laszt\u00F3", +colorpicker_picker_title:"Sz\u00EDnv\u00E1laszt\u00F3", +colorpicker_palette_tab:"Paletta", +colorpicker_palette_title:"Paletta sz\u00EDnek", +colorpicker_named_tab:"Elnevezettek", +colorpicker_named_title:"Elnevezett sz\u00EDnek", +colorpicker_color:"Sz\u00EDn:", +colorpicker_name:"N\u00E9v:", +charmap_title:"Egyedi karakter v\u00E1laszt\u00E1sa", +image_title:"K\u00E9p besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +image_src:"K\u00E9p URL", +image_alt:"K\u00E9p le\u00EDr\u00E1s", +image_list:"K\u00E9p lista", +image_border:"Keret", +image_dimensions:"Dimenzi\u00F3k", +image_vspace:"F\u00FCgg\u0151leges t\u00E1v", +image_hspace:"V\u00EDzszintes t\u00E1v", +image_align:"Igaz\u00EDt\u00E1s", +image_align_baseline:"Alapvonalhoz", +image_align_top:"Fentre", +image_align_middle:"K\u00F6z\u00E9pre", +image_align_bottom:"Lentre", +image_align_texttop:"Sz\u00F6veg tetej\u00E9hez", +image_align_textbottom:"Sz\u00F6veg alj\u00E1hoz", +image_align_left:"Balra", +image_align_right:"Jobbra", +link_title:"Link besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +link_url:"Link URL", +link_target:"Target", +link_target_same:"Link azonos ablakba nyit\u00E1sa", +link_target_blank:"Link \u00FAj ablakba nyit\u00E1sa", +link_titlefield:"C\u00EDm", +link_is_email:"A be\u00EDrt URL e-mail c\u00EDmnek t\u0171nik, k\u00EDv\u00E1nja a sz\u00FCks\u00E9ges mailto:-t el\u00E9 tenni?", +link_is_external:"A be\u00EDrt URL k\u00FCls\u0151 hivatkoz\u00E1snak t\u0171nik, k\u00EDv\u00E1nja a sz\u00FCks\u00E9ges http://-t el\u00E9 tenni?", +link_list:"Link lista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ia.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ia.js new file mode 100644 index 00000000..835045e6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ia.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ia.advanced',{ +style_select:"\u6837\u5F0F", +font_size:"\u5B57\u4F53\u5927\u5C0F", +fontdefault:"\u5B57\u4F53", +block:"\u683C\u5F0F", +paragraph:"\u6BB5\u843D", +div:"Div", +address:"\u5730\u5740", +pre:"\u9ED8\u8BA4\u683C\u5F0F", +h1:"\u6807\u9898 1", +h2:"\u6807\u9898 2", +h3:"\u6807\u9898 3", +h4:"\u6807\u9898 4", +h5:"\u6807\u9898 5", +h6:"\u6807\u9898 6", +blockquote:"\u5F15\u7528", +code:"\u4EE3\u7801", +samp:"\u7A0B\u5E8F\u8303\u4F8B", +dt:"\u540D\u8BCD\u5B9A\u4E49", +dd:"\u540D\u8BCD\u89E3\u91CA", +bold_desc:"\u7C97\u4F53 (Ctrl+B)", +italic_desc:"\u659C\u4F53 (Ctrl+I)", +underline_desc:"\u5E95\u7EBF (Ctrl+U)", +striketrough_desc:"\u4E2D\u5212\u7EBF", +justifyleft_desc:"\u5DE6\u5BF9\u9F50", +justifycenter_desc:"\u5C45\u4E2D", +justifyright_desc:"\u53F3\u5BF9\u9F50", +justifyfull_desc:"\u4E24\u7AEF\u5BF9\u9F50", +bullist_desc:"\u6E05\u5355\u7B26\u53F7", +numlist_desc:"\u7F16\u53F7", +outdent_desc:"\u51CF\u5C11\u7F29\u8FDB", +indent_desc:"\u589E\u52A0\u7F29\u8FDB", +undo_desc:"\u64A4\u9500 (Ctrl+Z)", +redo_desc:"\u6062\u590D (Ctrl+Y)", +link_desc:"\u63D2\u5165/\u7F16\u8F91 \u8FDE\u7ED3", +unlink_desc:"\u53D6\u6D88\u8FDE\u7ED3", +image_desc:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u7247", +cleanup_desc:"\u5220\u9664\u5197\u4F59\u7801", +code_desc:"\u7F16\u8F91 HTML \u539F\u59CB\u7A0B\u5E8F\u4EE3\u7801", +sub_desc:"\u4E0B\u6807", +sup_desc:"\u4E0A\u6807", +hr_desc:"\u63D2\u5165\u6C34\u5E73\u7EBF", +removeformat_desc:"\u6E05\u9664\u6837\u5F0F", +custom1_desc:"\u5728\u6B64\u8F93\u5165\u60A8\u7684\u81EA\u8BA2\u63CF\u8FF0", +forecolor_desc:"\u9009\u62E9\u6587\u5B57\u989C\u8272", +backcolor_desc:"\u9009\u62E9\u80CC\u666F\u989C\u8272", +charmap_desc:"\u63D2\u5165\u7279\u6B8A\u7B26\u53F7", +visualaid_desc:"\u7F51\u683C/\u9690\u85CF\u7EC4\u4EF6\uFF1F", +anchor_desc:"\u63D2\u5165/\u7F16\u8F91 \u951A\u70B9", +cut_desc:"\u526A\u5207 (Ctrl+X)", +copy_desc:"\u590D\u5236 (Ctrl+C)", +paste_desc:"\u7C98\u8D34 (Ctrl+V)", +image_props_desc:"\u56FE\u7247\u5C5E\u6027", +newdocument_desc:"\u65B0\u5EFA\u6587\u4EF6", +help_desc:"\u5E2E\u52A9", +blockquote_desc:"\u5F15\u7528", +clipboard_msg:"\u590D\u5236\u3001\u526A\u5207\u548C\u7C98\u8D34\u529F\u80FD\u5728Mozilla \u548C Firefox\u4E2D\u65E0\u6CD5\u4F7F\u7528", +path:"\u8DEF\u5F84", +newdocument:"\u60A8\u786E\u8BA4\u8981\u5220\u9664\u5168\u90E8\u5185\u5BB9\u5417\uFF1F", +toolbar_focus:"\u5DE5\u5177\u5217 - Alt+Q, \u7F16\u8F91\u5668 - Alt-Z, \u7EC4\u4EF6\u8DEF\u5F84 - Alt-X", +more_colors:"\u66F4\u591A\u989C\u8272" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ia_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ia_dlg.js new file mode 100644 index 00000000..546959ee --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ia_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ia.advanced_dlg',{ +about_title:"\u5173\u4E8E TinyMCE", +about_general:"\u5173\u4E8E", +about_help:"\u5E2E\u52A9", +about_license:"\u6388\u6743", +about_plugins:"\u5168\u90E8\u5916\u6302\u7A0B\u5E8F", +about_plugin:"\u5916\u6302\u7A0B\u5E8F", +about_author:"\u4F5C\u8005", +about_version:"\u7248\u672C", +about_loaded:"\u5DF2\u52A0\u8F7D\u7684\u5916\u6302\u7A0B\u5E8F", +anchor_title:"\u63D2\u5165/\u7F16\u8F91 \u951A\u70B9", +anchor_name:"\u951A\u70B9\u540D\u79F0", +code_title:"HTML \u539F\u59CB\u7A0B\u5E8F\u4EE3\u7801\u7F16\u8F91\u5668", +code_wordwrap:"\u81EA\u52A8\u6362\u884C", +colorpicker_title:"\u9009\u62E9\u989C\u8272", +colorpicker_picker_tab:"\u9009\u62E9\u5668", +colorpicker_picker_title:"\u53D6\u8272\u5668", +colorpicker_palette_tab:"\u8272\u8C31", +colorpicker_palette_title:"\u8272\u8C31\u989C\u8272", +colorpicker_named_tab:"\u9ED8\u8BA4\u503C", +colorpicker_named_title:"\u9ED8\u8BA4\u7684\u989C\u8272", +colorpicker_color:"\u989C\u8272:", +colorpicker_name:"\u8272\u540D:", +charmap_title:"\u63D2\u5165\u7279\u6B8A\u7B26\u53F7", +image_title:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u7247", +image_src:"\u56FE\u7247\u7F51\u5740", +image_alt:"\u56FE\u7247\u8BF4\u660E", +image_list:"\u56FE\u7247\u6E05\u5355", +image_border:"\u8FB9\u6846", +image_dimensions:"\u5C3A\u5BF8", +image_vspace:"\u5782\u76F4\u95F4\u8DDD", +image_hspace:"\u6C34\u5E73\u95F4\u8DDD", +image_align:"\u5BF9\u9F50\u65B9\u5F0F", +image_align_baseline:"\u57FA\u7EBF", +image_align_top:"\u9876\u90E8\u5BF9\u9F50", +image_align_middle:"\u4E2D\u90E8\u5BF9\u9F50", +image_align_bottom:"\u5E95\u90E8\u5BF9\u9F50", +image_align_texttop:"\u6587\u5B57\u4E0A\u65B9", +image_align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +image_align_left:"\u5DE6\u5BF9\u9F50", +image_align_right:"\u53F3\u5BF9\u9F50", +link_title:"\u63D2\u5165/\u7F16\u8F91 \u8FDE\u7ED3", +link_url:"\u8FDE\u7ED3\u7F51\u5740", +link_target:"\u76EE\u6807", +link_target_same:"\u5F53\u524D\u7A97\u53E3\u6253\u5F00", +link_target_blank:"\u65B0\u7A97\u53E3\u6253\u5F00", +link_titlefield:"\u6807\u9898", +link_is_email:"\u60A8\u8F93\u5165\u7684\u5E94\u8BE5\u662F\u4E00\u4E2A\u7535\u5B50\u90AE\u5BC4\u5730\u5740\uFF0C\u662F\u5426\u9700\u8981\u5728\u7F51\u5740\u524D\u52A0\u4E0A mailto: ? ", +link_is_external:"\u60A8\u8F93\u5165\u7684\u7F51\u5740\u5E94\u8BE5\u662F\u4E00\u4E2A\u5916\u90E8\u8FDE\u7ED3\uFF0C\u662F\u5426\u9700\u8981\u5728\u7F51\u5740\u524D\u52A0\u4E0A http:// ?", +link_list:"\u8FDE\u7ED3\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ii.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ii.js new file mode 100644 index 00000000..f5b0d64a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ii.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ii.advanced',{ +style_select:"\u6837\u5F0F", +font_size:"\u5B57\u4F53\u5927\u5C0F", +fontdefault:"\u5B57\u578B", +block:"\u683C\u5F0F", +paragraph:"\u6BB5\u843D", +div:"Div", +address:"\u5730\u5740", +pre:"\u539F\u59CB\u683C\u5F0F", +h1:"\u6807\u9898 1", +h2:"\u6807\u9898 2", +h3:"\u6807\u9898 3", +h4:"\u6807\u9898 4", +h5:"\u6807\u9898 5", +h6:"\u6807\u9898 6", +blockquote:"\u5F15\u7528", +code:"\u4EE3\u7801", +samp:"\u7A0B\u5E8F\u8303\u4F8B", +dt:"\u540D\u8BCD\u5B9A\u4E49", +dd:"\u540D\u8BCD\u89E3\u91CA", +bold_desc:"\u7C97\u4F53 (Ctrl+B)", +italic_desc:"\u659C\u4F53 (Ctrl+I)", +underline_desc:"\u5E95\u7EBF (Ctrl+U)", +striketrough_desc:"\u5220\u9664\u7EBF", +justifyleft_desc:"\u9760\u5DE6\u5BF9\u9F50", +justifycenter_desc:"\u5C45\u4E2D", +justifyright_desc:"\u9760\u53F3\u5BF9\u9F50", +justifyfull_desc:"\u5DE6\u53F3\u5BF9\u9F50", +bullist_desc:"\u9879\u76EE\u65B9\u5F0F\u5217\u8868", +numlist_desc:"\u7F16\u53F7\u65B9\u5F0F\u5217\u8868", +outdent_desc:"\u51CF\u5C11\u7F29\u8FDB", +indent_desc:"\u589E\u52A0\u7F29\u8FDB", +undo_desc:"\u8FD8\u539F (Ctrl+Z)", +redo_desc:"\u91CD\u505A (Ctrl+Y)", +link_desc:"\u63D2\u5165/\u7F16\u8F91 \u94FE\u63A5", +unlink_desc:"\u53D6\u6D88\u94FE\u63A5", +image_desc:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u7247", +cleanup_desc:"\u6E05\u9664\u5197\u4F59\u4EE3\u7801", +code_desc:"\u7F16\u8F91 HTML \u539F\u59CB\u6587\u4EF6", +sub_desc:"\u4E0B\u6807", +sup_desc:"\u4E0A\u6807", +hr_desc:"\u63D2\u5165\u6C34\u5E73\u5206\u5272\u7EBF", +removeformat_desc:"\u6E05\u9664\u6837\u5F0F", +custom1_desc:"\u5728\u6B64\u8F93\u5165\u81EA\u8BA2\u63CF\u8FF0", +forecolor_desc:"\u9009\u62E9\u6587\u5B57\u989C\u8272", +backcolor_desc:"\u9009\u62E9\u80CC\u666F\u989C\u8272", +charmap_desc:"\u63D2\u5165\u81EA\u5B9A\u4E49\u7B26\u53F7", +visualaid_desc:"\u5207\u6362\u53EF\u89C1/\u9690\u85CF\u5143\u7D20", +anchor_desc:"\u63D2\u5165/\u7F16\u8F91 \u951A\u70B9", +cut_desc:"\u526A\u5207 (Ctrl+X)", +copy_desc:"\u590D\u5236 (Ctrl+C)", +paste_desc:"\u7C98\u8D34 (Ctrl+V)", +image_props_desc:"\u56FE\u7247\u5C5E\u6027", +newdocument_desc:"\u65B0\u6587\u4EF6", +help_desc:"\u8BF4\u660E", +blockquote_desc:"\u5F15\u7528", +clipboard_msg:"\u590D\u5236/\u526A\u5207/\u7C98\u8D34\u529F\u80FD\u5728 Mozilla \u548C Firefox \u4E2D\u65E0\u6CD5\u4F7F\u7528", +path:"\u8DEF\u5F84", +newdocument:"\u4F60\u786E\u5B9A\u8981\u6E05\u9664\u6240\u6709\u5185\u5BB9\u5417\uFF1F", +toolbar_focus:"\u79FB\u81F3\u5DE5\u5177\u680F - Alt+Q, \u79FB\u81F3\u7F16\u8F91\u5668 - Alt-Z, \u79FB\u81F3\u5143\u7D20\u8DEF\u5F84 - Alt-X", +more_colors:"\u66F4\u591A\u989C\u8272" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ii_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ii_dlg.js new file mode 100644 index 00000000..52d386e0 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ii_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ii.advanced_dlg',{ +about_title:"\u5173\u4E8ETinyMCE", +about_general:"\u5173\u4E8E", +about_help:"\u8BF4\u660E", +about_license:"\u6388\u6743", +about_plugins:"\u5916\u6302\u7EC4\u4EF6", +about_plugin:"\u5916\u6302\u7EC4\u4EF6", +about_author:"\u4F5C\u8005", +about_version:"\u7248\u672C", +about_loaded:"\u5DF2\u52A0\u8F7D\u7684\u5916\u6302\u7EC4\u4EF6", +anchor_title:"\u63D2\u5165/\u7F16\u8F91 \u951A\u70B9", +anchor_name:"\u951A\u70B9\u540D\u79F0", +code_title:"HTML \u539F\u59CB\u7801\u7F16\u8F91\u5668", +code_wordwrap:"\u81EA\u52A8\u6362\u884C", +colorpicker_title:"\u9009\u62E9\u989C\u8272", +colorpicker_picker_tab:"\u9009\u8272\u5668", +colorpicker_picker_title:"\u9009\u8272\u5668", +colorpicker_palette_tab:"\u8272\u76D8", +colorpicker_palette_title:"\u8272\u76D8\u989C\u8272", +colorpicker_named_tab:"\u8272\u540D", +colorpicker_named_title:"\u989C\u8272\u540D\u79F0", +colorpicker_color:"\u989C\u8272\uFF1A", +colorpicker_name:"\u540D\u79F0\uFF1A", +charmap_title:"\u9009\u62E9\u81EA\u5B9A\u4E49\u5B57\u7B26\u7B26\u53F7", +image_title:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u6863", +image_src:"\u56FE\u6863URL", +image_alt:"\u56FE\u6863\u8BF4\u660E", +image_list:"\u56FE\u6587\u4EF6\u6E05\u5355", +image_border:"\u8FB9\u6846", +image_dimensions:"\u5C3A\u5BF8", +image_vspace:"\u5782\u76F4\u95F4\u8DDD", +image_hspace:"\u6C34\u5E73\u95F4\u8DDD", +image_align:"\u5BF9\u9F50\u65B9\u5F0F", +image_align_baseline:"\u57FA\u7EBF", +image_align_top:"\u7F6E\u9876\u5BF9\u9F50", +image_align_middle:"\u7F6E\u4E2D", +image_align_bottom:"\u7F6E\u5E95\u5BF9\u9F50", +image_align_texttop:"\u6587\u5B57\u4E0A\u65B9", +image_align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +image_align_left:"\u9760\u5DE6\u5BF9\u9F50", +image_align_right:"\u9760\u53F3\u5BF9\u9F50", +link_title:"\u63D2\u5165/\u7F16\u8F91 \u94FE\u63A5", +link_url:"\u94FE\u63A5URL", +link_target:"\u76EE\u6807", +link_target_same:"\u76EE\u524D\u7A97\u53E3\u5F00\u542F\u94FE\u63A5", +link_target_blank:"\u65B0\u7A97\u53E3\u5F00\u542F\u94FE\u63A5", +link_titlefield:"\u6807\u9898", +link_is_email:"\u4F60\u8F93\u5165\u7684URL\u4F3C\u4E4E\u662F\u4E00\u4E2Aemail\u5730\u5740\uFF0C\u662F\u5426\u8981\u52A0\u4E0A\u524D\u81F4\u8BCD mailto: ?", +link_is_external:"\u4F60\u8F93\u5165\u7684URL\u4F3C\u4E4E\u662F\u4E00\u4E2A\u5916\u90E8\u94FE\u63A5\uFF0C\u662F\u5426\u8981\u52A0\u4E0A\u524D\u81F4\u8BCD http:// ?", +link_list:"\u94FE\u63A5\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/is.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/is.js new file mode 100644 index 00000000..0080568a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/is.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('is.advanced',{ +style_select:"St\u00EDlsni\u00F0", +font_size:"Leturst\u00E6r\u00F0", +fontdefault:"Leturger\u00F0", +block:"Format", +paragraph:"M\u00E1lsgrein", +div:"Div", +address:"Heimilisfang", +pre:"Forsni\u00F0i\u00F0", +h1:"Fyrirs\u00F6gn 1", +h2:"Fyrirs\u00F6gn 2", +h3:"Fyrirs\u00F6gn 3", +h4:"Fyrirs\u00F6gn 4", +h5:"Fyrirs\u00F6gn 5", +h6:"Fyrirs\u00F6gn 6", +blockquote:"Blockquote", +code:"K\u00F3\u00F0i", +samp:"K\u00F3\u00F0ad\u00E6mi", +dt:"Definition term ", +dd:"Definition description", +bold_desc:"Feitletra (Ctrl+B)", +italic_desc:"Sk\u00E1letra (Ctrl+I)", +underline_desc:"Undirstrika (Ctrl+U)", +striketrough_desc:"Yfirstrika", +justifyleft_desc:"Vinstrijafna", +justifycenter_desc:"Mi\u00F0jujafna", +justifyright_desc:"H\u00E6grijafna", +justifyfull_desc:"Jafna", +bullist_desc:"B\u00F3lulisti", +numlist_desc:"N\u00FAmera\u00F0ur listi", +outdent_desc:"Draga \u00FAt", +indent_desc:"Draga inn", +undo_desc:"Taka til baka (Ctrl+Z)", +redo_desc:"Endurtaka (Ctrl+Y)", +link_desc:"Setja inn/breyta hlekk", +unlink_desc:"Afhlekkja", +image_desc:"Setja inn/breyta mynd", +cleanup_desc:"Hreinsa sk\u00EDtugan k\u00F3\u00F0a", +code_desc:"Breyta HTML k\u00F3\u00F0a", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Setja inn l\u00E1r\u00E9tta l\u00EDnu", +removeformat_desc:"Hreinsa sni\u00F0", +custom1_desc:"L\u00FDsingin \u00FE\u00EDn h\u00E9r", +forecolor_desc:"Veldu lit texta", +backcolor_desc:"Veldu bakgrunnslit", +charmap_desc:"Setja inn t\u00E1kn", +visualaid_desc:"Toggle guidelines/invisible elements", +anchor_desc:"Setja inn/breyta akkeri", +cut_desc:"Klippa", +copy_desc:"Afrita", +paste_desc:"L\u00EDma", +image_props_desc:"Stillingar myndar", +newdocument_desc:"N\u00FDtt skjal", +help_desc:"Hj\u00E1lp", +blockquote_desc:"Blockquote", +clipboard_msg:"Afrita/Klippa/L\u00EDma er ekki a\u00F0gengilegt \u00ED Mozilla og Firefox eins og er.\nViltu f\u00E1 n\u00E1nari uppl\u00FDsingar?", +path:"Sl\u00F3\u00F0", +newdocument:"Ertu viss um a\u00F0 \u00FE\u00FA viljir hreinsa allt?", +toolbar_focus:"Hoppa \u00ED t\u00F3lastiku - Alt+Q, Hoppa \u00ED ritil - Alt-Z, Hoppa \u00ED sl\u00F3\u00F0 - Alt-X", +more_colors:"Fleiri litir" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/is_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/is_dlg.js new file mode 100644 index 00000000..cc2d9e67 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/is_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('is.advanced_dlg',{ +about_title:"Um TinyMCE", +about_general:"Um", +about_help:"Hj\u00E1lp", +about_license:"Leyfi", +about_plugins:"Vi\u00F0b\u00E6tur", +about_plugin:"Vi\u00F0b\u00E6tur", +about_author:"H\u00F6fundur", +about_version:"\u00DAtg\u00E1fa", +about_loaded:"Vi\u00F0b\u00E6tur \u00ED notkun", +anchor_title:"Setja inn/breyta akkeri", +anchor_name:"Nafn akkeris", +code_title:"HTML k\u00F3\u00F0a ritill", +code_wordwrap:"Word wrap", +colorpicker_title:"Veldu lit", +colorpicker_picker_tab:"Veljari", +colorpicker_picker_title:"Litaveljari", +colorpicker_palette_tab:"Litaspjald", +colorpicker_palette_title:"Litir litaspjalds", +colorpicker_named_tab:"Nefndir", +colorpicker_named_title:"Nefndir litir", +colorpicker_color:"Litur:", +colorpicker_name:"Nafn:", +charmap_title:"Veldu t\u00E1kn", +image_title:"Setja inn/breyta mynd", +image_src:"Sl\u00F3\u00F0 myndar", +image_alt:"L\u00FDsing myndar", +image_list:"Myndalisti", +image_border:"Rammi", +image_dimensions:"St\u00E6r\u00F0ir", +image_vspace:"L\u00F3\u00F0r\u00E9tt loftun", +image_hspace:"L\u00E1r\u00E9tt loftun", +image_align:"J\u00F6fnun", +image_align_baseline:"Baseline", +image_align_top:"Toppur", +image_align_middle:"Mi\u00F0ja", +image_align_bottom:"Botn", +image_align_texttop:"Toppur texta", +image_align_textbottom:"Botn texta", +image_align_left:"Vinstri", +image_align_right:"H\u00E6gri", +link_title:"Setja inn/breyta hlekk", +link_url:"Sl\u00F3\u00F0 hlekks", +link_target:"Target", +link_target_same:"Opna hlekk \u00ED sama glugga", +link_target_blank:"Opna hlekk \u00ED n\u00FDjum glugga", +link_titlefield:"Titill", +link_is_email:"Sl\u00F3\u00F0in sem \u00FE\u00FA sl\u00F3st inn vir\u00F0ist vera netfang, viltu b\u00E6ta vi\u00F0 mailto: forskeytinu?", +link_is_external:"Sl\u00F3\u00F0in sem \u00FE\u00FA sl\u00F3st inn vir\u00F0ist vera utana\u00F0komandi, viltu b\u00E6ta vi\u00F0 http:// forskeytinu?", +link_list:"Hlekkjalisti" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/it.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/it.js new file mode 100644 index 00000000..58ddba71 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/it.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('it.advanced',{ +style_select:"Stili", +font_size:"Grandezza carattere", +fontdefault:"Famiglia carattere", +block:"Formato", +paragraph:"Paragrafo", +div:"Div", +address:"Indirizzo", +pre:"Preformattato", +h1:"Intestazione 1", +h2:"Intestazione 2", +h3:"Intestazione 3", +h4:"Intestazione 4", +h5:"Intestazione 5", +h6:"Intestazione 6", +blockquote:"Testo quotato", +code:"Codice", +samp:"Esempio codice", +dt:"Termine definizione", +dd:"Descrizione definizione", +bold_desc:"Grassetto (Ctrl+B)", +italic_desc:"Corsivo (Ctrl+I)", +underline_desc:"Sottolineato (Ctrl+U)", +striketrough_desc:"Barrato", +justifyleft_desc:"Allinea a sinistra", +justifycenter_desc:"Centra", +justifyright_desc:"Allinea a destra", +justifyfull_desc:"Giustifica", +bullist_desc:"Lista non ordinata", +numlist_desc:"Lista ordinata", +outdent_desc:"Sposta verso esterno", +indent_desc:"Sposta verso interno", +undo_desc:"Annulla (Ctrl+Z)", +redo_desc:"Ripristina (Ctrl+Y)", +link_desc:"Inserisci/modifica collegamento", +unlink_desc:"Togli collegamento", +image_desc:"Inserisci/modifica immagine", +cleanup_desc:"Pulisci codice disordinato", +code_desc:"Modifica sorgente HTML", +sub_desc:"Pedice", +sup_desc:"Apice", +hr_desc:"Inserisci riga orizzontale", +removeformat_desc:"Rimuovi formattazione", +custom1_desc:"La tua descrizione personalizzata qui", +forecolor_desc:"Seleziona colore testo", +backcolor_desc:"Seleziona colore sfondo", +charmap_desc:"Inserisci carattere speciale", +visualaid_desc:"Mostra/nascondi linee guida/elementi invisibili", +anchor_desc:"Inserisci/modifica ancora", +cut_desc:"Taglia", +copy_desc:"Copia", +paste_desc:"Incolla", +image_props_desc:"Propriet\u00E0 immagine", +newdocument_desc:"Nuovo documento", +help_desc:"Aiuto", +blockquote_desc:"Testo quotato", +clipboard_msg:"Copia/Taglia/Incolla non \u00E8 disponibile in Mozilla e Firefox..\r\nSi desidera avere maggiori informazioni su questo problema?", +path:"Percorso", +newdocument:"Sei sicuro di voler cancellare tutti i contenuti?", +toolbar_focus:"Vai ai pulsanti strumento - Alt+Q, Vai all'editor - Alt-Z, Vai al percorso dell'elemento - Alt-X", +more_colors:"Colori aggiuntivi" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/it_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/it_dlg.js new file mode 100644 index 00000000..23050bce --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/it_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('it.advanced_dlg',{ +about_title:"Informazioni su TinyMCE", +about_general:"Informazioni", +about_help:"Aiuto", +about_license:"Licenza", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Autore", +about_version:"Versione", +about_loaded:"Plugin caricati", +anchor_title:"Inserisci/modifica ancora", +anchor_name:"Nome ancora", +code_title:"Editor sorgente HTML", +code_wordwrap:"A capo automatico", +colorpicker_title:"Seleziona un colore", +colorpicker_picker_tab:"Selettore", +colorpicker_picker_title:"Selettore colori", +colorpicker_palette_tab:"Tavolozza", +colorpicker_palette_title:"Tavolozza dei colori", +colorpicker_named_tab:"Per nome", +colorpicker_named_title:"Colori per nome", +colorpicker_color:"Colore:", +colorpicker_name:"Nome:", +charmap_title:"Seleziona carattere speciale", +image_title:"Inserisci/modifica immagine", +image_src:"URL immagine", +image_alt:"Descrizione immagine", +image_list:"Lista immagini", +image_border:"Bordo", +image_dimensions:"Dimensioni", +image_vspace:"Spaziatura verticale", +image_hspace:"Spaziatura orizzontale", +image_align:"Allineamentot", +image_align_baseline:"Alla base", +image_align_top:"In alto", +image_align_middle:"In mezzo", +image_align_bottom:"In basso", +image_align_texttop:"In alto al testo", +image_align_textbottom:"In basso al testo", +image_align_left:"A sinistra", +image_align_right:"A destra", +link_title:"Inserisci/modifica collegamento", +link_url:"URL collegamento", +link_target:"Target", +link_target_same:"Apri link nella stessa finestra", +link_target_blank:"Apri link in una nuova finestra", +link_titlefield:"Titolo", +link_is_email:"L'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?", +link_is_external:"L'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?", +link_list:"Lista collegamenti" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ja.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ja.js new file mode 100644 index 00000000..f6a39afc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ja.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ja.advanced',{ +style_select:"\u30B9\u30BF\u30A4\u30EB", +font_size:"\u30D5\u30A9\u30F3\u30C8\u30B5\u30A4\u30BA", +fontdefault:"\u30D5\u30A9\u30F3\u30C8", +block:"\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8", +paragraph:"\u6BB5\u843D", +div:"Div", +address:"\u4F4F\u6240", +pre:"\u6574\u5F62\u6E08\u307F", +h1:"\u898B\u51FA\u30571", +h2:"\u898B\u51FA\u30572", +h3:"\u898B\u51FA\u30573", +h4:"\u898B\u51FA\u30574", +h5:"\u898B\u51FA\u30575", +h6:"\u898B\u51FA\u30576", +blockquote:"\u5F15\u7528", +code:"\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9", +samp:"\u30B3\u30FC\u30C9\u30B5\u30F3\u30D7\u30EB", +dt:"\u8A9E\u53E5\u5B9A\u7FA9", +dd:"\u8A9E\u53E5\u8AAC\u660E", +bold_desc:"\u592A\u5B57 (Ctrl+B)", +italic_desc:"\u659C\u4F53 (Ctrl+I)", +underline_desc:"\u4E0B\u7DDA (Ctrl+U)", +striketrough_desc:"\u6253\u6D88\u3057\u7DDA", +justifyleft_desc:"\u5DE6\u63C3\u3048", +justifycenter_desc:"\u4E2D\u592E\u63C3\u3048", +justifyright_desc:"\u53F3\u63C3\u3048", +justifyfull_desc:"\u5747\u7B49\u5272\u4ED8", +bullist_desc:"\u756A\u53F7\u306A\u3057\u30EA\u30B9\u30C8", +numlist_desc:"\u756A\u53F7\u3064\u304D\u30EA\u30B9\u30C8", +outdent_desc:"\u30A4\u30F3\u30C7\u30F3\u30C8\u89E3\u9664", +indent_desc:"\u30A4\u30F3\u30C7\u30F3\u30C8", +undo_desc:"\u5143\u306B\u623B\u3059 (Ctrl+Z)", +redo_desc:"\u3084\u308A\u76F4\u3059 (Ctrl+Y)", +link_desc:"\u30EA\u30F3\u30AF\u306E\u633F\u5165/\u7DE8\u96C6", +unlink_desc:"\u30EA\u30F3\u30AF\u89E3\u9664", +image_desc:"\u753B\u50CF\u306E\u633F\u5165/\u7DE8\u96C6", +cleanup_desc:"\u30B3\u30FC\u30C9\u6574\u5F62", +code_desc:"HTML\u30BD\u30FC\u30B9\u7DE8\u96C6", +sub_desc:"\u4E0B\u4ED8\u304D", +sup_desc:"\u4E0A\u4ED8\u304D", +hr_desc:"\u6C34\u5E73\u7DDA", +removeformat_desc:"\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u89E3\u9664", +custom1_desc:"\u8AAC\u660E\u6587\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002", +forecolor_desc:"\u6587\u5B57\u8272", +backcolor_desc:"\u80CC\u666F\u8272", +charmap_desc:"\u7279\u6B8A\u6587\u5B57", +visualaid_desc:"\u30AC\u30A4\u30C9\u30E9\u30A4\u30F3\u3068\u975E\u8868\u793A\u9805\u76EE\u306E\u8868\u793A\u5207\u66FF", +anchor_desc:"\u30A2\u30F3\u30AB\u30FC\u306E\u633F\u5165/\u7DE8\u96C6", +cut_desc:"\u5207\u308A\u53D6\u308A", +copy_desc:"\u30B3\u30D4\u30FC", +paste_desc:"\u8CBC\u308A\u4ED8\u3051", +image_props_desc:"\u753B\u50CF\u306E\u30D7\u30ED\u30D1\u30C6\u30A3", +newdocument_desc:"\u65B0\u898F\u4F5C\u6210", +help_desc:"\u30D8\u30EB\u30D7", +blockquote_desc:"\u5F15\u7528", +clipboard_msg:"\u30B3\u30D4\u30FC/\u5207\u308A\u53D6\u308A/\u8CBC\u308A\u4ED8\u3051\u306FMozilla\u53CA\u3073Firefox\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n\u8A73\u7D30\u306F\u3053\u3061\u3089", +path:"\u30D1\u30B9", +newdocument:"\u7DE8\u96C6\u4E2D\u306E\u30C7\u30FC\u30BF\u3092\u7834\u68C4\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F", +toolbar_focus:"\u30C4\u30FC\u30EB\u30DC\u30BF\u30F3\u3078\u30B8\u30E3\u30F3\u30D7 - Alt+Q, \u30A8\u30C7\u30A3\u30BF\u306B\u30B8\u30E3\u30F3\u30D7 - Alt-Z, \u30A8\u30EC\u30E1\u30F3\u30C8\u30D1\u30B9\u3078\u30B8\u30E3\u30F3\u30D7 - Alt-X", +more_colors:"\u305D\u306E\u4ED6\u306E\u8272" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ja_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ja_dlg.js new file mode 100644 index 00000000..37728eb7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ja_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ja.advanced_dlg',{ +about_title:"TinyMCE\u306B\u3064\u3044\u3066", +about_general:"\u8A73\u7D30", +about_help:"\u30D8\u30EB\u30D7", +about_license:"\u30E9\u30A4\u30BB\u30F3\u30B9", +about_plugins:"\u30D7\u30E9\u30B0\u30A4\u30F3", +about_plugin:"\u30D7\u30E9\u30B0\u30A4\u30F3", +about_author:"\u4F5C\u8005", +about_version:"\u30D0\u30FC\u30B8\u30E7\u30F3", +about_loaded:"\u8AAD\u8FBC\u6E08\u307F\u30D7\u30E9\u30B0\u30A4\u30F3", +anchor_title:"\u30A2\u30F3\u30AB\u30FC\u306E\u633F\u5165/\u7DE8\u96C6", +anchor_name:"\u30A2\u30F3\u30AB\u30FC\u540D", +code_title:"HTML\u30BD\u30FC\u30B9\u30A8\u30C7\u30A3\u30BF", +code_wordwrap:"\u6298\u308A\u8FD4\u3057", +colorpicker_title:"\u8272\u306E\u9078\u629E", +colorpicker_picker_tab:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC", +colorpicker_picker_title:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC", +colorpicker_palette_tab:"\u30D1\u30EC\u30C3\u30C8", +colorpicker_palette_title:"\u30D1\u30EC\u30C3\u30C8", +colorpicker_named_tab:"\u65E2\u5B9A\u8272", +colorpicker_named_title:"\u65E2\u5B9A\u8272", +colorpicker_color:"\u30AB\u30E9\u30FC:", +colorpicker_name:"\u540D\u524D:", +charmap_title:"\u7279\u6B8A\u6587\u5B57", +image_title:"\u753B\u50CF\u306E\u633F\u5165/\u7DE8\u96C6", +image_src:"\u753B\u50CFURL", +image_alt:"\u753B\u50CF\u306E\u8AAC\u660E", +image_list:"\u4E00\u89A7\u304B\u3089\u9078\u3076", +image_border:"\u67A0\u7DDA", +image_dimensions:"\u30B5\u30A4\u30BA", +image_vspace:"\u4E0A\u4E0B\u4F59\u767D", +image_hspace:"\u5DE6\u53F3\u4F59\u767D", +image_align:"\u914D\u7F6E", +image_align_baseline:"Baseline", +image_align_top:"Top", +image_align_middle:"Middle", +image_align_bottom:"Bottom", +image_align_texttop:"Text top", +image_align_textbottom:"Text bottom", +image_align_left:"Left", +image_align_right:"Right", +link_title:"\u30EA\u30F3\u30AF\u306E\u633F\u5165/\u7DE8\u96C6", +link_url:"\u30EA\u30F3\u30AFURL", +link_target:"\u30BF\u30FC\u30B2\u30C3\u30C8", +link_target_same:"\u540C\u3058\u30A6\u30A4\u30F3\u30C9\u30A6\u3067\u958B\u304F", +link_target_blank:"\u65B0\u3057\u3044\u30A6\u30A4\u30F3\u30C9\u30A6\u3067\u958B\u304F", +link_titlefield:"\u30BF\u30A4\u30C8\u30EB", +link_is_email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F\u3002\u30EA\u30F3\u30AF\u306Bmailto:\u3092\u4ED8\u52A0\u3057\u307E\u3059\u304B\uFF1F", +link_is_external:"\u30EA\u30F3\u30AF\u306Bhttp://\u3092\u4ED8\u52A0\u3057\u307E\u3059\u304B\uFF1F", +link_list:"\u4E00\u89A7\u304B\u3089\u9078\u3076" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ko.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ko.js new file mode 100644 index 00000000..dea2b960 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ko.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ko.advanced',{ +style_select:"\uC2A4\uD0C0\uC77C", +font_size:"\uAE00\uAF34 \uD06C\uAE30", +fontdefault:"\uAE00\uAF34", +block:"\uD3EC\uB9F7", +paragraph:"\uB2E8\uB77D", +div:"Div", +address:"\uC8FC\uC18C", +pre:"pre", +h1:"\uD45C\uC81C1", +h2:"\uD45C\uC81C2", +h3:"\uD45C\uC81C3", +h4:"\uD45C\uC81C4", +h5:"\uD45C\uC81C5", +h6:"\uD45C\uC81C6", +blockquote:"\uC778\uC6A9\uBB38", +code:"\uCF54\uB4DC", +samp:"\uC0D8\uD50C\uCF54\uB4DC", +dt:"\uC5B4\uAD6C \uC815\uC758", +dd:"\uC815\uC758 \uC124\uBA85", +bold_desc:"\uAD75\uC740 \uAE00\uC528(Ctrl+B)", +italic_desc:"\uC774\uD0E4\uB9AD(Ctrl+I)", +underline_desc:"\uBC11\uC904(Ctrl+U)", +striketrough_desc:"\uCDE8\uC18C\uC120", +justifyleft_desc:"\uC67C\uCABD \uC815\uB82C", +justifycenter_desc:"\uAC00\uC6B4\uB370 \uC815\uB82C", +justifyright_desc:"\uC624\uB978\uCABD \uC815\uB82C", +justifyfull_desc:"\uBC30\uBD84 \uC815\uB82C", +bullist_desc:"\uBE44\uC21C\uCC28\uBAA9\uB85D", +numlist_desc:"\uC21C\uCC28\uBAA9\uB85D", +outdent_desc:"\uB0B4\uC5B4\uC4F0\uAE30", +indent_desc:"\uB4E4\uC5EC\uC4F0\uAE30", +undo_desc:"\uC2E4\uD589\uCDE8\uC18C(Ctrl+Z)", +redo_desc:"\uB2E4\uC2DC\uC2E4\uD589(Ctrl+Y)", +link_desc:"\uB9C1\uD06C\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +unlink_desc:"\uB9C1\uD06C \uC0AD\uC81C", +image_desc:"\uC774\uBBF8\uC9C0 \uC0BD\uC785/\uD3B8\uC9D1", +cleanup_desc:"\uC9C0\uC800\uBD84\uD55C \uCF54\uB4DC \uC0AD\uC81C", +code_desc:"HTML \uD3B8\uC9D1", +sub_desc:"\uC544\uB798\uCCA8\uC790", +sup_desc:"\uC704\uCCA8\uC790", +hr_desc:"\uAD6C\uBD84\uC120", +removeformat_desc:"\uC11C\uC2DD \uD574\uC81C", +custom1_desc:"\uCEE4\uC2A4\uD140 \uC124\uBA85", +forecolor_desc:"\uAE00\uC790\uC0C9", +backcolor_desc:"\uBC30\uACBD\uC0C9", +charmap_desc:"\uD2B9\uC218 \uBB38\uC790", +visualaid_desc:"\uAC00\uC774\uB4DC\uB77C\uC778 \uD45C\uC2DC/\uBE44\uD45C\uC2DC", +anchor_desc:"\uC5E5\uCEE4 \uC0BD\uC785/\uD3B8\uC9D1", +cut_desc:"\uC798\uB77C\uB0B4\uAE30", +copy_desc:"\uBCF5\uC0AC", +paste_desc:"\uBD99\uC774\uAE30", +image_props_desc:"\uC774\uBBF8\uC9C0\uC18D\uC131", +newdocument_desc:"\uC2E0\uADDC\uAE00 \uC791\uC131", +help_desc:"\uB3C4\uC6C0\uB9D0", +blockquote_desc:"\uC778\uC6A9\uBB38", +clipboard_msg:"\uBCF5\uC0AC/\uC798\uB77C\uB0B4\uAE30/\uBD99\uC774\uAE30\uB294 Mozilla \uBC0FFirefox \uC5D0\uC11C \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n\uC0C1\uC138\uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uAE4C?", +path:"Path", +newdocument:"\uD3B8\uC9D1\uC911\uC758 \uB370\uC774\uD130\uB97C \uBAA8\uB450 \uC783\uC5B4\uB3C4 \uAD1C\uCC2E\uC2B5\uB2C8\uAE4C?", +toolbar_focus:"\uBC84\uD2BC\uC73C\uB85C \uC810\uD504 - Alt+Q, \uC5D0\uB514\uD130\uB85C \uC810\uD504 - Alt-Z, Jump to element path - Alt-X", +more_colors:"\uADF8 \uC678\uC758 \uC0C9" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ko_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ko_dlg.js new file mode 100644 index 00000000..7370f559 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ko_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ko.advanced_dlg',{ +about_title:"TinyMCE\uC5D0 \uB300\uD558\uC5EC", +about_general:"About", +about_help:"\uB3C4\uC6C0\uB9D0", +about_license:"\uB77C\uC774\uC13C\uC2A4", +about_plugins:"\uD50C\uB7EC\uADF8\uC778", +about_plugin:"\uD50C\uB7EC\uADF8\uC778", +about_author:"\uC81C\uC791\uC790", +about_version:"\uBC84\uC83C", +about_loaded:"\uC2E4\uD589\uB41C \uD50C\uB7EC\uADF8\uC778", +anchor_title:"\uC5E5\uCEE4 \uC0BD\uC785/\uD3B8\uC9D1", +anchor_name:"\uC5E5\uCEE4\uBA85", +code_title:"\uC18C\uC2A4 \uD3B8\uC9D1", +code_wordwrap:"\uC6CC\uB4DC\uB7A9", +colorpicker_title:"\uC0C9\uC744 \uC120\uD0DD", +colorpicker_picker_tab:"\uD53D\uCEE4", +colorpicker_picker_title:"\uCEEC\uB7EC \uD53D\uCEE4", +colorpicker_palette_tab:"\uD314\uB808\uD2B8", +colorpicker_palette_title:"\uD314\uB808\uD2B8 \uC0C9", +colorpicker_named_tab:"\uC0C9 \uC774\uB984", +colorpicker_named_title:"\uC0C9", +colorpicker_color:"Color:", +colorpicker_name:"\uC0C9 \uC774\uB984:", +charmap_title:"\uD2B9\uC218 \uBB38\uC790", +image_title:"\uC774\uBBF8\uC9C0\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +image_src:"\uC774\uBBF8\uC9C0 URL", +image_alt:"\uC774\uBBF8\uC9C0 \uC124\uBA85", +image_list:"\uC774\uBBF8\uC9C0 \uBAA9\uB85D", +image_border:"\uD14C\uB450\uB9AC\uC120", +image_dimensions:"\uD06C\uAE30", +image_vspace:"\uC0C1\uD558 \uC5EC\uBC31", +image_hspace:"\uC88C\uC6B0 \uC5EC\uBC31", +image_align:"\uC815\uB82C", +image_align_baseline:"\uAE30\uC900\uC120", +image_align_top:"Top", +image_align_middle:"Middle", +image_align_bottom:"Bottom", +image_align_texttop:"Text top", +image_align_textbottom:"Text bottom", +image_align_left:"Left", +image_align_right:"Right", +link_title:"\uB9C1\uD06C\uC758 \uC0BD\uC785/\uD3B8\uC9D1", +link_url:"\uB9C1\uD06C URL", +link_target:"Target", +link_target_same:"\uAC19\uC740\uCC3D", +link_target_blank:"\uC0C8\uCC3D", +link_titlefield:"\uC81C\uBAA9", +link_is_email:"\uBA54\uC77C\uC8FC\uC18C\uAC00 \uC785\uB825\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n\uBA54\uC77C\uC8FC\uC18C\uC758 \uC55E\uC5D0 mailto:\uB97C \uBD99\uC785\uB2C8\uAE4C?", +link_is_external:"\uC678\uBD80URL\uC774 \uC785\uB825\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\nURL\uC758 \uC55E\uC5D0 http://\uB97C \uBD99\uC785\uB2C8\uAE4C?", +link_list:"\uB9C1\uD06C \uBAA9\uB85D" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lt.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lt.js new file mode 100644 index 00000000..bd1c661a --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lt.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('lt.advanced',{ +style_select:"Stiliai", +font_size:"\u0160rifto dydis", +fontdefault:"\u0160rifto \u0161eima", +block:"Formatas", +paragraph:"Paragrafas", +div:"Div \u017Eym\u0117", +address:"Adresas", +pre:"Preformatuotas tekstas", +h1:"Antra\u0161t\u0117 1", +h2:"Antra\u0161t\u0117 2", +h3:"Antra\u0161t\u0117 3", +h4:"Antra\u0161t\u0117 4", +h5:"Antra\u0161t\u0117 5", +h6:"Antra\u0161t\u0117 6", +blockquote:"Citatos blokas", +code:"Kodas", +samp:"Kodo pavyzdys", +dt:"Apibr\u0117\u017Eimo terminas", +dd:"Apibr\u0117\u017Eimo apra\u0161ymas", +bold_desc:"Storas (Ctrl+B)", +italic_desc:"Pasvir\u0119s (Ctrl+I)", +underline_desc:"Pabrauktas (Ctrl+U)", +striketrough_desc:"Perbrauktas", +justifyleft_desc:"Lygiuoti pagal kair\u0119", +justifycenter_desc:"Centruoti", +justifyright_desc:"Lygiuoti pagal de\u0161in\u0119", +justifyfull_desc:"Lygiuoti pagal abu kra\u0161tus", +bullist_desc:"Ner\u016B\u0161uotas s\u0105ra\u0161as", +numlist_desc:"R\u016B\u0161uotas skai\u010Diais s\u0105ra\u0161as", +outdent_desc:"Stumti prie kairiojo kra\u0161to", +indent_desc:"Stumti nuo kairiojo kra\u0161to", +undo_desc:"Atstatyti (Ctrl+Z)", +redo_desc:"Perdaryti (Ctrl+Y)", +link_desc:"\u012Eterpti/redaguoti nuorod\u0105", +unlink_desc:"Pa\u0161alinti nuorod\u0105", +image_desc:"\u012Eterpti/redaguoti paveiksl\u0117l\u012F", +cleanup_desc:"I\u0161valyti netvarking\u0105 kod\u0105", +code_desc:"Redaguoti HTML i\u0161eities kod\u0105", +sub_desc:"Apatinis indeksas", +sup_desc:"Vir\u0161utinis indeksas", +hr_desc:"\u012Eterpti horizontali\u0105 linij\u0105", +removeformat_desc:"Pa\u0161alinti formatavim\u0105", +custom1_desc:"J\u016Bs\u0173 apra\u0161ymas \u010Dia", +forecolor_desc:"Parinkti teksto spalv\u0105", +backcolor_desc:"Parinkti fono spalv\u0105", +charmap_desc:"\u012Eterpti nestandartin\u012F simbol\u012F", +visualaid_desc:"Kaitalioti gaires/nematom\u0173 element\u0173 rodym\u0105", +anchor_desc:"\u012Eterpti/redaguoti inkar\u0105", +cut_desc:"I\u0161kirpti", +copy_desc:"Kopijuoti", +paste_desc:"\u012Eklijuoti", +image_props_desc:"Paveiksl\u0117lio nustatymai", +newdocument_desc:"Naujas dokumentas", +help_desc:"Pagalba", +blockquote_desc:"Citatos blokas", +clipboard_msg:"Kopijavimas/I\u0161kirpimas/\u012Eklijavimas negalimas Mozilla ir Firefox nar\u0161ykl\u0117se.\r\nAr norite daugiau informacijos apie \u0161i\u0105 problem\u0105?", +path:"Kelias", +newdocument:"Ar tikrai norite i\u0161trinti vis\u0105 turin\u012F?", +toolbar_focus:"Per\u0161okimas prie \u012Franki\u0173 juostos mygtuk\u0173 - Alt+Q, Per\u0161okimas prie redaktoriaus - Alt-Z, Per\u0161okimas prie element\u0173 kelio - Alt-X", +more_colors:"Daugiau spalv\u0173", +link_delta_width:"70" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lt_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lt_dlg.js new file mode 100644 index 00000000..cdf07683 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lt_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('lt.advanced_dlg',{ +about_title:"Apie TinyMCE", +about_general:"Apie", +about_help:"Pagalba", +about_license:"Licenzija", +about_plugins:"\u012Eskiepiai", +about_plugin:"\u012Eskiepis", +about_author:"Autorius", +about_version:"Versija", +about_loaded:"U\u017Ekrauti \u012Fskiepiai", +anchor_title:"\u012Eterpti/redaguoti inkar\u0105", +anchor_name:"Inkaro vardas", +code_title:"HTML i\u0161eities kodo redaktorius", +code_wordwrap:"\u017Dod\u017Eio lau\u017Eymas", +colorpicker_title:"Pasirinkti spalv\u0105", +colorpicker_picker_tab:"Parink\u0117jas", +colorpicker_picker_title:"Spalvos parink\u0117jas", +colorpicker_palette_tab:"Palet\u0117", +colorpicker_palette_title:"Paletin\u0117s spalvos", +colorpicker_named_tab:"\u012Evardintosios", +colorpicker_named_title:"\u012Evardintosios spalvos", +colorpicker_color:"Spalva:", +colorpicker_name:"Pavadinimas:", +charmap_title:"Pasirinkti nestandartin\u012F simbol\u012F", +image_title:"\u012Eterpti/redaguoti paveiksl\u0117l\u012F", +image_src:"Paveiksl\u0117lio URL adresas", +image_alt:"Paveiksl\u0117lio apra\u0161ymas", +image_list:"Paveiksl\u0117li\u0173 s\u0105ra\u0161as", +image_border:"R\u0117melis", +image_dimensions:"I\u0161matavimai", +image_vspace:"Vertikalus tarpas", +image_hspace:"Horizontalus tarpas", +image_align:"Lygiavimas", +image_align_baseline:"Pradiniame ta\u0161ke", +image_align_top:"Vir\u0161uje", +image_align_middle:"Viduryje", +image_align_bottom:"Apa\u010Dioje", +image_align_texttop:"Teksto vir\u0161uje", +image_align_textbottom:"Teksto apa\u010Dioje", +image_align_left:"Kair\u0117je", +image_align_right:"De\u0161in\u0117je", +link_title:"\u012Eterpti/redaguoti nuorod\u0105", +link_url:"Nuorodos URL adresas", +link_target:"Taikinys", +link_target_same:"Atidaryti tame pa\u010Diame lange", +link_target_blank:"Atidaryti naujame lange", +link_titlefield:"Pavadinimas", +link_is_email:"URL adresas, kur\u012F \u012Fved\u0117te yra e-pa\u0161to adresas, ar norite prid\u0117ti reikaling\u0105 mailto: prefiks\u0105?", +link_is_external:"URL adresas, kur\u012F \u012Fved\u0117te yra i\u0161orin\u0117 nuoroda, ar norite prid\u0117ti reikaling\u0105 http:// prefiks\u0105?", +link_list:"Nuorod\u0173 s\u0105ra\u0161as" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lv.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lv.js new file mode 100644 index 00000000..a877c7ec --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lv.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('lv.advanced',{ +style_select:"Stili", +font_size:"Fonta lielums", +fontdefault:"Fonta veids", +block:"Form\u0101ts", +paragraph:"Rindkopa", +div:"Div\u012Bzija", +address:"Adrese", +pre:"Priek\u0161format\u0113ts", +h1:"Virsraksts 1", +h2:"Virsraksts 2", +h3:"Virsraksts 3", +h4:"Virsraksts 4", +h5:"Virsraksts 5", +h6:"Virsraksts 6", +blockquote:"Cit\u0101ts", +code:"Kods", +samp:"Koda piem\u0113rs", +dt:"Defin\u012Bcijas termins ", +dd:"Defin\u012Bcijas apraksts", +bold_desc:"Treknraksts (Ctrl+B)", +italic_desc:"Sl\u012Bpraksts (Ctrl+I)", +underline_desc:"Pasv\u012Btrojums (Ctrl+U)", +striketrough_desc:"P\u0101rsv\u012Btrojums", +justifyleft_desc:"Novietot pa kreisi", +justifycenter_desc:"Centr\u0113t", +justifyright_desc:"Novietot pa labi", +justifyfull_desc:"Nol\u012Bdzin\u0101t malas", +bullist_desc:"Nenumur\u0113ts saraksts", +numlist_desc:"Numur\u0113ts saraksts", +outdent_desc:"Uzk\u0101pe", +indent_desc:"Atk\u0101pe", +undo_desc:"Atsaukt (Ctrl+Z)", +redo_desc:"Atatsaukt (Ctrl+Y)", +link_desc:"Ievietot/Redi\u0123\u0113t saiti", +unlink_desc:"Atsait\u0113t", +image_desc:"Ievietot/Redi\u0123\u0113t att\u0113lu", +cleanup_desc:"Izt\u012Br\u012Bt nek\u0101rt\u012Bgu kodu", +code_desc:"Redi\u0123\u0113t HTML kodu", +sub_desc:"Apak\u0161raksts", +sup_desc:"Aug\u0161raksts", +hr_desc:"Ievietot horizont\u0101lu sv\u012Btru", +removeformat_desc:"Izdz\u0113st format\u0113to", +custom1_desc:"Tevis izdom\u0101ts apraksts \u0161eit", +forecolor_desc:"Uzst\u0101d\u012Bt teksta kr\u0101su", +backcolor_desc:"Uzst\u0101d\u012Bt fona kr\u0101su", +charmap_desc:"Ievietot simbolu", +visualaid_desc:"Uzlikt/Nov\u0101kt pal\u012Bgsv\u012Btras/neredzamos elementus", +anchor_desc:"Ievietot/Redi\u0123\u0113t enkursaiti", +cut_desc:"Izgriezt", +copy_desc:"Kop\u0113t", +paste_desc:"Iekop\u0113t", +image_props_desc:"Bildes iestat\u012Bjumi", +newdocument_desc:"Jauns dokuments", +help_desc:"Pal\u012Bdz\u012Bba", +blockquote_desc:"Cit\u0101ts", +clipboard_msg:"Iesp\u0113ja Kop\u0113t/Izgriezt/Iekop\u0113t nav pieejama p\u0101rl\u016Bkiem Mozilla and Firefox.\r\nVai J\u016Bs v\u0113laties uzzin\u0101t vair\u0101k par \u0161o probl\u0113mu?", +path:"Atra\u0161an\u0101s vieta", +newdocument:"Vai J\u016Bs esat p\u0101rliecin\u0101ti, ka v\u0113laties izdz\u0113st visu saturu?", +toolbar_focus:"Iet uz r\u012Bkpog\u0101m - Alt+Q, Iet uz redaktoru - Alt-Z, Iet uz elementa atra\u0161an\u0101s vietu - Alt-X", +more_colors:"Vair\u0101k kr\u0101su" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lv_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lv_dlg.js new file mode 100644 index 00000000..4dbdcc55 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/lv_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('lv.advanced_dlg',{ +about_title:"Par TinyMCE", +about_general:"Par", +about_help:"Pal\u012Bdz\u012Bba", +about_license:"Licence", +about_plugins:"Papildmodu\u013Ci", +about_plugin:"Papildmodulis", +about_author:"Autors", +about_version:"Versija", +about_loaded:"Iestat\u012Btie papildmodu\u013Ci", +anchor_title:"Ievietot/Redi\u0123\u0113t enkursaiti", +anchor_name:"Enkursaites nosaukums", +code_title:"HTML koda redaktors", +code_wordwrap:"V\u0101rdu p\u0101rne\u0161ana jaun\u0101 rind\u0101", +colorpicker_title:"Izv\u0113l\u0113ties kr\u0101su", +colorpicker_picker_tab:"Izv\u0113lnis", +colorpicker_picker_title:"Kr\u0101su izv\u0113lnis", +colorpicker_palette_tab:"Palete", +colorpicker_palette_title:"Kr\u0101su palete", +colorpicker_named_tab:"Nosaukts", +colorpicker_named_title:"Nosaukt\u0101s kr\u0101sas", +colorpicker_color:"Kr\u0101sa:", +colorpicker_name:"Nosaukums:", +charmap_title:"Izv\u0113lies simbolu", +image_title:"Ievietot/Redi\u0123\u0113t att\u0113lu", +image_src:"Att\u0113la URL", +image_alt:"Att\u0113la apraksts", +image_list:"Att\u0113lu saraksts", +image_border:"Apmale", +image_dimensions:"Izm\u0113ri", +image_vspace:"Vertik\u0101l\u0101 atstarpe", +image_hspace:"Horizont\u0101l\u0101 atstarpe", +image_align:"Novietojums", +image_align_baseline:"Pati apak\u0161a", +image_align_top:"Aug\u0161a", +image_align_middle:"Vidus", +image_align_bottom:"Apak\u0161a", +image_align_texttop:"Teksta aug\u0161a", +image_align_textbottom:"Teksta apak\u0161a", +image_align_left:"Pa kreisi", +image_align_right:"Pa labi", +link_title:"Ievietot/Redi\u0123\u0113t saiti", +link_url:"Saites URL", +link_target:"M\u0113r\u0137is", +link_target_same:"Atv\u0113rt saiti \u0161ai pa\u0161\u0101 log\u0101", +link_target_blank:"Atv\u0113rt saiti jaun\u0101 log\u0101", +link_titlefield:"Nosaukums", +link_is_email:"Ievad\u012Btais URL \u0161\u0137iet ir e-pasta adrese, vai tu v\u0113lies pirms t\u0101s pievienot mailto: pried\u0113kli? ", +link_is_external:"Ievad\u012Btais URL \u0161\u0137iet ir \u0101r\u0113j\u0101 saite, vai tu v\u0113lies pirms t\u0101s pievienot http:// pried\u0113kli?", +link_list:"Sai\u0161u saraksts" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mk.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mk.js new file mode 100644 index 00000000..5617fae9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mk.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('mk.advanced',{ +style_select:"Stilovi", +font_size:"Veli\u010Dina pisma", +fontdefault:"Vrsta pisma", +block:"Format", +paragraph:"Paragraf", +div:"Div", +address:"Adresa", +pre:"Oblikovano", +h1:"\u041D\u0430\u0441\u043B\u043E\u0432 1", +h2:"\u041D\u0430\u0441\u043B\u043E\u0432 2", +h3:"\u041D\u0430\u0441\u043B\u043E\u0432 3", +h4:"\u041D\u0430\u0441\u043B\u043E\u0432 4", +h5:"\u041D\u0430\u0441\u043B\u043E\u0432 5", +h6:"\u041D\u0430\u0441\u043B\u043E\u0432 6", +blockquote:"Citat", +code:"Kod", +samp:"Primjer koda", +dt:"Definicija pojma", +dd:"Opis definicije", +bold_desc:"Podebljaj (Ctrl+B)", +italic_desc:"Kurziv (Ctrl+I)", +underline_desc:"Podcrtaj (Ctrl+U)", +striketrough_desc:"Precrtaj", +justifyleft_desc:"Poravnaj levo", +justifycenter_desc:"Centriraj", +justifyright_desc:"Poravnaj desno", +justifyfull_desc:"Poravnaj potpuno", +bullist_desc:"Neure\u0111ena lista", +numlist_desc:"Ure\u0111ena lista", +outdent_desc:"Uvuci", +indent_desc:"Izvuci", +undo_desc:"Poni\u0161ti (Ctrl+Z)", +redo_desc:"Ponovi (Ctrl+Y)", +link_desc:"\u0412\u043C\u0435\u0442\u043D\u0438/uredi poveznicu", +unlink_desc:"Poni\u0161ti poveznicu", +image_desc:"\u0412\u043C\u0435\u0442\u043D\u0438/uredi sliku", +cleanup_desc:"Po\u010Disti kod", +code_desc:"Uredi HTML izvor", +sub_desc:"Indeks", +sup_desc:"Eksponent", +hr_desc:"\u0412\u043C\u0435\u0442\u043D\u0438 vodoravnu crtu", +removeformat_desc:"Poni\u0161ti oblikovanje", +custom1_desc:"Vlastiti opis ovdje", +forecolor_desc:"Odaberite boju teksta", +backcolor_desc:"Odaberite boju pozadine", +charmap_desc:"\u0412\u043C\u0435\u0442\u043D\u0438 vlastiti znak", +visualaid_desc:"Vodilice/nevidljivi elementi", +anchor_desc:"\u0412\u043C\u0435\u0442\u043D\u0438/uredi sidro", +cut_desc:"Izre\u017Ei", +copy_desc:"Kopiraj", +paste_desc:"Zalepi", +image_props_desc:"Svojstva slike", +newdocument_desc:"Novi dokument", +help_desc:"Pomo\u0107", +blockquote_desc:"Citiraj", +clipboard_msg:"Kopiraj/Izre\u017Ei/Zalepi nije dostupno u Mozilla i Firefox preglednicima. Vi\u0161e informacija?", +path:"Staza", +newdocument:"Jeste li sigurni da \u017Eelite izbrisati celi sadr\u017Eaj?", +toolbar_focus:"Pre\u0111i na alatnu traku - Alt+Q, pre\u0111i na ure\u0111iva\u010D - Alt-Z, pre\u0111i na element path - Alt-X", +more_colors:"Vi\u0161e boja" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mk_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mk_dlg.js new file mode 100644 index 00000000..ac953635 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mk_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('mk.advanced_dlg',{ +about_title:"TinyMCE", +about_general:"\u0417\u0430 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u0430\u0442\u0430", +about_help:"\u041F\u043E\u043C\u043E\u0448", +about_license:"\u041B\u0438\u0446\u0435\u043D\u0446\u0430", +about_plugins:"\u0414\u043E\u0434\u0430\u0442\u043E\u0446\u0438", +about_plugin:"\u0414\u043E\u0434\u0430\u0442\u043E\u043A", +about_author:"\u0410\u0432\u0442\u043E\u0440", +about_version:"\u0412\u0435\u0440\u0437\u0438\u0458\u0430", +about_loaded:"\u041F\u043E\u0441\u0442\u043E\u0435\u0447\u043A\u0438 \u0434\u043E\u0434\u0430\u0442\u043E\u0446\u0438", +anchor_title:"\u0412\u043C\u0435\u0442\u043D\u0438/\u0441\u0440\u0435\u0434\u0438 \u0441\u0438\u0434\u0440\u043E", +anchor_name:"\u0418\u043C\u0435 \u043D\u0430 \u0441\u0438\u0434\u0440\u043E\u0442\u043E", +code_title:"HTML \u0441\u0440\u0435\u0434\u0443\u0432\u0430\u0447", +code_wordwrap:"\u041F\u0440\u0435\u043A\u043B\u043E\u043F\u0443\u0432\u0430\u045A\u0435 \u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u043E\u0442", +colorpicker_title:"\u0418\u0437\u0431\u043E\u0440 \u043D\u0430 \u0431\u043E\u0438", +colorpicker_picker_tab:"\u041E\u0434\u0431\u0435\u0440\u0438", +colorpicker_picker_title:"\u041E\u0434\u0431\u0435\u0440\u0438 \u0431\u043E\u0438", +colorpicker_palette_tab:"\u041F\u0430\u043B\u0435\u0442\u0430", +colorpicker_palette_title:"\u041F\u0430\u043B\u0435\u0442\u0430 \u043D\u0430 \u0431\u043E\u0438", +colorpicker_named_tab:"\u0418\u043C\u0435\u043D\u0443\u0432\u0430\u043D\u043E", +colorpicker_named_title:"\u0418\u043C\u0435\u043D\u0443\u0432\u0430\u043D\u0438 \u0431\u043E\u0438", +colorpicker_color:"\u0411\u043E\u0458\u0430:", +colorpicker_name:"\u0418\u043C\u0435:", +charmap_title:"\u041E\u0434\u0431\u0435\u0440\u0435\u0442\u0435 \u0437\u043D\u0430\u043A", +image_title:"\u0412\u043C\u0435\u0442\u043D\u0438/\u0441\u0440\u0435\u0434\u0438 \u0441\u043B\u0438\u043A\u0438", +image_src:"\u041B\u0438\u043D\u043A \u043D\u0430 \u0441\u043B\u0438\u043A\u0430\u0442\u0430", +image_alt:"\u041E\u043F\u0438\u0441 \u043D\u0430 \u0441\u043B\u0438\u043A\u0430\u0442\u0430", +image_list:"\u041B\u0438\u0441\u0442\u0430 \u043D\u0430 \u0441\u043B\u0438\u043A\u0438\u0442\u0435", +image_border:"\u0420\u0430\u0431", +image_dimensions:"\u0414\u0438\u043C\u0435\u043D\u0437\u0438\u0438", +image_vspace:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u0435\u043D \u043F\u0440\u043E\u0441\u0442\u043E\u0440", +image_hspace:"\u0425\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u0435\u043D \u043F\u0440\u043E\u0441\u0442\u043E\u0440", +image_align:"\u041F\u043E\u0440\u0430\u043C\u043D\u0443\u0432\u0430\u045A\u0435", +image_align_baseline:"\u041E\u0441\u043D\u043E\u0432\u043D\u0430 \u043B\u0438\u043D\u0438\u0458\u0430", +image_align_top:"\u0412\u0440\u0432", +image_align_middle:"\u0421\u0440\u0435\u0434\u0438\u043D\u0430", +image_align_bottom:"\u0414\u043D\u043E", +image_align_texttop:"\u0412\u0440\u0432 \u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u043E\u0442", +image_align_textbottom:"\u0414\u043D\u043E \u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u043E\u0442", +image_align_left:"\u041B\u0435\u0432\u043E", +image_align_right:"\u0414\u0435\u0441\u043D\u043E", +link_title:"\u0412\u043C\u0435\u0442\u043D\u0438/\u0441\u0440\u0435\u0434\u0438 \u043B\u0438\u043D\u043A", +link_url:"URL poveznice", +link_target:"Meta", +link_target_same:"Otvori poveznicu u istom prozoru", +link_target_blank:"Otvori poveznicu u novom prozoru", +link_titlefield:"\u041D\u0430\u0441\u043B\u043E\u0432", +link_is_email:"URL koji ste uneli izgleda kao e-mail adresa, \u017Eelite li dodati potrebni mailto: prefiks?", +link_is_external:"URL koji ste uneli izgleda kao vanjska poveznica, \u017Eelite li dodati potrebni http:// prefiks?", +link_list:"Lista poveznica" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mn.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mn.js new file mode 100644 index 00000000..580d1ea8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mn.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('mn.advanced',{ +style_select:"\u0425\u044D\u043B\u0431\u044D\u0440\u0436\u04AF\u04AF\u043B\u044D\u043B\u0442", +font_size:"\u0424\u043E\u043D\u0442\u044B\u043D \u0445\u044D\u043C\u0436\u044D\u044D", +fontdefault:"\u0424\u043E\u043D\u0442", +block:"\u0425\u044D\u0432", +paragraph:"\u041F\u0430\u0440\u0430\u0433\u0440\u0430\u0444", +div:"\u0425\u0430\u043C\u0442\u0430\u0442\u0433\u0430\u0441\u0430\u043D \u043C\u0443\u0436", +address:"\u0425\u0430\u044F\u0433", +pre:"\u0422\u04AF\u04AF\u0445\u0438\u0439 \u04E9\u0433\u04E9\u0433\u0434\u04E9\u043B", +h1:"\u0413\u0430\u0440\u0447\u0438\u0433 1", +h2:"\u0413\u0430\u0440\u0447\u0438\u0433 2", +h3:"\u0413\u0430\u0440\u0447\u0438\u0433 3", +h4:"\u0413\u0430\u0440\u0447\u0438\u0433 4", +h5:"\u0413\u0430\u0440\u0447\u0438\u0433 5", +h6:"\u0413\u0430\u0440\u0447\u0438\u0433 6", +blockquote:"\u0418\u0448\u043B\u044D\u043B", +code:"\u041A\u043E\u0434", +samp:"\u0416\u0438\u0448\u044D\u044D", +dt:"\u0422\u043E\u0434\u043E\u0440\u0445\u043E\u0439\u043B\u043E\u043B\u0442", +dd:"\u0422\u0430\u0439\u043B\u0431\u0430\u0440", +bold_desc:"\u0422\u043E\u0434 (Ctrl+B)", +italic_desc:"\u041D\u0430\u043B\u0443\u0443 (Ctrl+I)", +underline_desc:"\u0414\u043E\u043E\u0433\u0443\u0443\u0440 \u0437\u0443\u0440\u0430\u0430\u0441 (Ctrl+U)", +striketrough_desc:"\u0414\u0430\u0440\u0441\u0430\u043D", +justifyleft_desc:"\u0417\u04AF\u04AF\u043D \u0436\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u0441\u044D\u043D", +justifycenter_desc:"\u0413\u043E\u043B\u0434 \u0436\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u0441\u044D\u043D", +justifyright_desc:"\u0411\u0430\u0440\u0443\u0443\u043D \u0436\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u0441\u044D\u043D", +justifyfull_desc:"\u0422\u044D\u0433\u0448\u0438\u043B\u0441\u044D\u043D", +bullist_desc:"\u0422\u043E\u043E\u0447\u0438\u043B\u0442", +numlist_desc:"\u0414\u0443\u0433\u0430\u0430\u0440\u043B\u0430\u043B\u0442", +outdent_desc:"\u0414\u043E\u0433\u043E\u043B \u043C\u04E9\u0440 \u0443\u0441\u0442\u0433\u0430\u0445", +indent_desc:"\u0414\u043E\u0433\u043E\u043B \u043C\u04E9\u0440 \u043E\u0440\u0443\u0443\u043B\u0430\u0445", +undo_desc:"\u0411\u0443\u0446\u0430\u0430\u0445 (Ctrl+Z)", +redo_desc:"\u0426\u0443\u0446\u043B\u0430\u0445 (Ctrl+Y)", +link_desc:"\u0425\u043E\u043B\u0431\u043E\u043E\u0441 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +unlink_desc:"\u0425\u043E\u043B\u0431\u043E\u043E\u0441 \u0443\u0441\u0442\u0433\u0430\u0445", +image_desc:"\u0417\u0443\u0440\u0430\u0433 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +cleanup_desc:"\u042D\u0445 \u043A\u043E\u0434 \u0446\u044D\u0432\u044D\u0440\u043B\u044D\u0445", +code_desc:"HTML-\u044D\u0445 \u043A\u043E\u0434 \u0437\u0430\u0441\u0430\u0445", +sub_desc:"\u0414\u043E\u043E\u0440 \u0431\u0430\u0439\u0440\u043B\u0430\u043B", +sup_desc:"\u0414\u044D\u044D\u0440 \u0431\u0430\u0439\u0440\u043B\u0430\u043B", +hr_desc:"\u0422\u0443\u0441\u0433\u0430\u0430\u0440\u043B\u0430\u0433\u0447 \u043E\u0440\u0443\u0443\u043B\u0430\u0445", +removeformat_desc:"\u0425\u044D\u043B\u0431\u044D\u0440\u0436\u04AF\u04AF\u043B\u044D\u043B\u0442 \u0443\u0441\u0442\u0433\u0430\u0445", +custom1_desc:"\u0425\u044D\u0440\u044D\u0433\u043B\u044D\u0433\u0447\u0438\u0439\u043D \u0442\u043E\u0434\u043E\u0440\u0445\u043E\u0439\u043B\u0441\u043E\u043D \u0442\u0430\u0439\u043B\u0431\u0430\u0440", +forecolor_desc:"\u0411\u0438\u0447\u0432\u044D\u0440\u0438\u0439\u043D \u04E9\u043D\u0433\u04E9", +backcolor_desc:"\u0414\u044D\u0432\u0441\u0433\u044D\u0440 \u04E9\u043D\u0433\u04E9", +charmap_desc:"\u0422\u0443\u0441\u0433\u0430\u0439 \u0442\u044D\u043C\u0434\u044D\u0433\u0442 \u043E\u0440\u0443\u0443\u043B\u0430\u0445", +visualaid_desc:"\u0422\u0443\u0441\u043B\u0430\u0445 \u0448\u0443\u0433\u0430\u043C \u0431\u0430 \u04AF\u043B \u04AF\u0437\u044D\u0433\u0434\u044D\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u04AF\u04AF\u0434\u0438\u0439\u0433 \u0445\u0430\u0440\u0443\u0443\u043B\u0430\u0445/\u0434\u0430\u043B\u0434\u043B\u0430\u0445", +anchor_desc:"\u0413\u0430\u0434\u0430\u0441 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +cut_desc:"\u0422\u0430\u0441\u043B\u0430\u043D \u0430\u0432\u0430\u0445", +copy_desc:"\u0425\u0443\u0443\u043B\u0430\u0445", +paste_desc:"\u041E\u0440\u0443\u0443\u043B\u0430\u0445", +image_props_desc:"\u0417\u0443\u0440\u0433\u0438\u0439\u043D \u0442\u043E\u0434\u0440\u0443\u0443\u043B\u0433\u0430", +newdocument_desc:"\u0428\u0438\u043D\u044D \u0431\u0430\u0440\u0438\u043C\u0442", +help_desc:"\u0422\u0443\u0441\u043B\u0430\u043C\u0436", +blockquote_desc:"\u0418\u0448\u043B\u044D\u043B", +clipboard_msg:"\u0425\u0443\u0443\u043B\u0430\u0445, \u0442\u0430\u0441\u043B\u0430\u043D \u0430\u0432\u0430\u0445 \u0431\u0443\u0443\u043B\u0433\u0430\u0445 \u043D\u044C \u041C\u043E\u0437\u0438\u043B\u043B\u0430 \u0424\u0430\u0439\u0440\u0444\u043E\u043A\u0441 \u0434\u044D\u044D\u0440 \u0431\u043E\u043B\u043E\u043C\u0436\u0433\u04AF\u0439. \r\n \u0422\u0430 \u044D\u043D\u044D \u0430\u0441\u0443\u0443\u0434\u043B\u044B\u043D \u0442\u0430\u043B\u0430\u0430\u0440 \u0434\u044D\u043B\u0433\u044D\u0440\u044D\u043D\u0433\u04AF\u0439 \u043C\u044D\u0434\u044D\u0445\u0438\u0439\u0433 \u0445\u04AF\u0441\u044D\u0436 \u0431\u0430\u0439\u043D\u0430 \u0443\u0443?", +path:"\u0417\u0430\u043C", +newdocument:"\u0422\u0430 \u0431\u04AF\u0445 \u0430\u0433\u0443\u0443\u043B\u0433\u044B\u0433 \u0443\u0441\u0442\u0433\u0430\u0445\u0434\u0430\u0430 \u0438\u0442\u0433\u044D\u043B\u0442\u044D\u0439 \u0431\u0430\u0439\u043D\u0430 \u0443\u0443?", +toolbar_focus:"\u0411\u0430\u0433\u0430\u0436 \u0441\u0430\u043C\u0431\u0430\u0440 \u043B\u0443\u0443 \u04AF\u0441\u0440\u044D\u0445\u044D\u0434: Alt+Q; \u0417\u0430\u0441\u0432\u0430\u0440\u043B\u0430\u0433\u0447 \u0440\u0443\u0443 \u04AF\u0441\u0440\u044D\u0445\u044D\u0434: Alt-Z; \u042D\u043B\u0435\u043C\u0435\u043D\u0442\u0438\u0439\u043D \u0437\u0430\u043C \u0440\u0443\u0443 \u04AF\u0441\u0440\u044D\u0445\u044D\u0434: Alt-X", +more_colors:"\u0411\u0443\u0441\u0430\u0434 \u04E9\u043D\u0433\u04E9" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mn_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mn_dlg.js new file mode 100644 index 00000000..c83937e4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/mn_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('mn.advanced_dlg',{ +about_title:"TinyMCE \u0442\u0443\u0445\u0430\u0439", +about_general:"\u0422\u0443\u0445\u0430\u0439\u2026", +about_help:"\u0422\u0443\u0441\u043B\u0430\u043C\u0436", +about_license:"\u041B\u0438\u0446\u0435\u043D\u0437\u0438\u0439\u043D \u043D\u04E9\u0445\u0446\u04E9\u043B", +about_plugins:"\u041F\u043B\u0430\u0433\u0438\u043D", +about_plugin:"\u041F\u043B\u0430\u0433\u0438\u043D", +about_author:"\u0417\u043E\u0445\u0438\u043E\u0433\u0447", +about_version:"\u0425\u0443\u0432\u0438\u043B\u0431\u0430\u0440", +about_loaded:"\u0410\u0447\u0430\u0430\u043B\u0430\u0433\u0434\u0441\u0430\u043D \u041F\u043B\u0430\u0433\u0438\u043D\u04AF\u04AF\u0434", +anchor_title:"\u0413\u0430\u0434\u0430\u0441 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +anchor_name:"\u0413\u0430\u0434\u0430\u0441\u043D\u044B \u043D\u044D\u0440", +code_title:"HTML-\u044D\u0445 \u043A\u043E\u0434 \u0437\u0430\u0441\u0432\u0430\u0440\u043B\u0430\u0445", +code_wordwrap:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442 \u043C\u04E9\u0440 \u043E\u0440\u043E\u043E\u043B\u0442", +colorpicker_title:"\u04E8\u043D\u0433\u04E9", +colorpicker_picker_tab:"\u04E8\u043D\u0433\u04E9 \u0441\u043E\u043D\u0433\u043E\u043B\u0442", +colorpicker_picker_title:"\u04E8\u043D\u0433\u04E9 \u0441\u043E\u043D\u0433\u043E\u043B\u0442", +colorpicker_palette_tab:"\u041D\u0438\u0439\u043B\u04AF\u04AF\u0440", +colorpicker_palette_title:"\u04E8\u043D\u0433\u04E9\u043D\u0438\u0439 \u043D\u0438\u0439\u043B\u04AF\u04AF\u0440", +colorpicker_named_tab:"\u041D\u044D\u0440\u043B\u044D\u0441\u044D\u043D \u04E9\u043D\u0433\u04E9", +colorpicker_named_title:"\u041D\u044D\u0440\u043B\u044D\u0441\u044D\u043D \u04E9\u043D\u0433\u04E9", +colorpicker_color:"\u04E8\u043D\u0433\u04E9:", +colorpicker_name:"\u041D\u044D\u0440:", +charmap_title:"\u0422\u0443\u0441\u0433\u0430\u0439 \u0442\u044D\u043C\u0434\u044D\u0433\u0442", +image_title:"\u0417\u0443\u0440\u0430\u0433 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +image_src:"\u0425\u0430\u044F\u0433", +image_alt:"\u0425\u043E\u0451\u0440\u0434\u043E\u0433\u0447 \u0431\u0438\u0447\u0432\u044D\u0440", +image_list:"\u0417\u0443\u0440\u0433\u0438\u0439\u043D \u0436\u0430\u0433\u0441\u0430\u0430\u043B\u0442", +image_border:"\u0425\u04AF\u0440\u044D\u044D", +image_dimensions:"\u0425\u044D\u043C\u0436\u044D\u044D\u0441", +image_vspace:"\u0411\u043E\u0441\u043E\u043E \u0430\u043B\u0441\u043B\u0430\u043B\u0442", +image_hspace:"\u0425\u044D\u0432\u0442\u044D\u044D \u0430\u043B\u0441\u043B\u0430\u043B\u0442", +image_align:"\u0416\u0438\u0433\u0434\u0440\u04AF\u04AF\u043B\u044D\u043B\u0442", +image_align_baseline:"\u041C\u04E9\u0440", +image_align_top:"\u0414\u044D\u044D\u0440", +image_align_middle:"\u0414\u0443\u043D\u0434", +image_align_bottom:"\u0414\u043E\u043E\u0440", +image_align_texttop:"\u0411\u0438\u0447\u0432\u044D\u0440\u0438\u0439\u043D \u0434\u044D\u044D\u0440", +image_align_textbottom:"\u0411\u0438\u0447\u0432\u044D\u0440\u0438\u0439\u043D \u0434\u043E\u043E\u0440", +image_align_left:"\u0417\u04AF\u04AF\u043D", +image_align_right:"\u0411\u0430\u0440\u0443\u0443\u043D", +link_title:"\u0425\u043E\u043B\u0431\u043E\u043E\u0441 \u043E\u0440\u0443\u0443\u043B\u0430\u0445/\u04E9\u04E9\u0440\u0447\u043B\u04E9\u0445", +link_url:"\u0425\u0430\u044F\u0433", +link_target:"\u0426\u043E\u043D\u0445", +link_target_same:"\u0422\u0443\u0445\u0430\u0439\u043D \u0446\u043E\u043D\u0445\u043E\u043D\u0434 \u043D\u044D\u044D\u0445", +link_target_blank:"\u0428\u0438\u043D\u044D \u0446\u043E\u043D\u0445\u043E\u043D\u0434 \u043D\u044D\u044D\u0445", +link_titlefield:"\u0413\u0430\u0440\u0447\u0438\u0433", +link_is_email:"\u0425\u0430\u044F\u0433 \u0434\u044D\u044D\u0440 \u0418\u043C\u044D\u0439\u043B \u0445\u0430\u044F\u0433 \u0431\u0430\u0439\u0445 \u0448\u0438\u0433 \u0445\u0430\u0440\u0430\u0433\u0434\u0430\u043D\u0430. \u0422\u0430 \u0442\u04AF\u04AF\u043D\u0434 \u0448\u0430\u0430\u0440\u0434\u043B\u0430\u0433\u0430\u0442\u0430\u0439 mailto: \u043D\u044D\u043C\u044D\u0445\u0438\u0439\u0433 \u0445\u04AF\u0441\u044D\u0436 \u0431\u0430\u0439\u043D\u0430 \u0443\u0443?", +link_is_external:"\u0425\u0430\u044F\u0433 \u0434\u044D\u044D\u0440 \u0433\u0430\u0434\u0430\u0430\u0434 \u0445\u043E\u043B\u0431\u043E\u043E\u0441 \u0431\u0430\u0439\u0433\u0430\u0430 \u0445\u0430\u0440\u0430\u0433\u0434\u0430\u043D\u0430. \u0422\u0430 \u0437\u04E9\u0432 \u0445\u043E\u043B\u0431\u043E\u043E\u0441 \u0431\u043E\u043B\u0433\u043E\u0445\u044B\u043D \u0442\u0443\u043B\u0434 http:// \u043D\u044D\u043C\u044D\u0445\u0438\u0439\u0433 \u0445\u04AF\u0441\u044D\u0436 \u0431\u0430\u0439\u043D\u0430 \u0443\u0443?", +link_list:"\u0425\u043E\u043B\u0431\u043E\u043E\u0441\u044B\u043D \u0436\u0430\u0433\u0441\u0430\u0430\u043B\u0442" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ms.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ms.js new file mode 100644 index 00000000..78edebcc --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ms.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ms.advanced',{ +style_select:"Gaya", +font_size:"Saiz Huruf", +fontdefault:"Jenis Huruf", +block:"Format", +paragraph:"Perenggan", +div:"Div", +address:"Alamat", +pre:"Telah diformatkan", +h1:"Tajuk 1", +h2:"Tajuk 2", +h3:"Tajuk 3", +h4:"Tajuk 4", +h5:"Tajuk 5", +h6:"Tajuk 6", +blockquote:"Petikan blok", +code:"Kod", +samp:"Contoh kod", +dt:"Maksud terma", +dd:"Maksud huraian", +bold_desc:"Tebal (Ctrl+B)", +italic_desc:"Condong (Ctrl+I)", +underline_desc:"Garis bawah (Ctrl+U)", +striketrough_desc:"Garis tengah", +justifyleft_desc:"Selari kekiri", +justifycenter_desc:"Selari ketengah", +justifyright_desc:"Selari kekanan", +justifyfull_desc:"Selari penuh", +bullist_desc:"Senarai tidak tertib", +numlist_desc:"Senarai tertib", +outdent_desc:"Lekuk kebelakang", +indent_desc:"Lekuk kedepan", +undo_desc:"Undur (Ctrl+Z)", +redo_desc:"Maju (Ctrl+Y)", +link_desc:"Sisip/sunting pautan", +unlink_desc:"Tiada pautan", +image_desc:"Sisip/sunting imej", +cleanup_desc:"Bersihkan kod", +code_desc:"Sunting kod HTML", +sub_desc:"Subskrip", +sup_desc:"Superskrip", +hr_desc:"Sisip pembaris mengufuk", +removeformat_desc:"Alih format", +custom1_desc:"Huraian anda di sini", +forecolor_desc:"Pilih warna teks", +backcolor_desc:"Pilih warna latar belakang", +charmap_desc:"Sisip aksara", +visualaid_desc:"Alih garis panduan/unsur tak nampak", +anchor_desc:"Sisip/sunting anchor", +cut_desc:"Potong", +copy_desc:"Salin", +paste_desc:"Tempel", +image_props_desc:"Alatan imej", +newdocument_desc:"Dokumen baru", +help_desc:"Bantuan", +blockquote_desc:"Petikan blok", +clipboard_msg:"Salin/Potong/Tempel tidak disokong dalam Mozilla dan Firefox.\r\nAdakah anda mahu informasi lanjut tentang isu ini?", +path:"Laluan", +newdocument:"Hapus semua kandungan?", +toolbar_focus:"Lompat ke butang alatan - Alt+Q, Lompat ke editor - Alt-Z, Lompat ke unsur laluan - Alt-X", +more_colors:"Warna lain" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ms_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ms_dlg.js new file mode 100644 index 00000000..cfbac4df --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ms_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ms.advanced_dlg',{ +about_title:"Perihal TinyMCE", +about_general:"Perihal", +about_help:"Bantuan", +about_license:"Lesen", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Pengarang", +about_version:"Versi", +about_loaded:"Muatan plugins", +anchor_title:"Sisip/sunting sauh", +anchor_name:"Nama sauh", +code_title:"Penyunting HTML", +code_wordwrap:"Sisip perkataan", +colorpicker_title:"Pilih warna", +colorpicker_picker_tab:"Pemungut", +colorpicker_picker_title:"Pemungut warna", +colorpicker_palette_tab:"Palet", +colorpicker_palette_title:"Palet warna", +colorpicker_named_tab:"Dinamakan", +colorpicker_named_title:"Warna telah dinamakan", +colorpicker_color:"Warna:", +colorpicker_name:"Nama:", +charmap_title:"Pilih aksara sendiri", +image_title:"Sisip/sunting imej", +image_src:"Imej URL", +image_alt:"Huraian imej", +image_list:"Senarai imej", +image_border:"Sempadan", +image_dimensions:"Dimensi", +image_vspace:"Ruangan tegak", +image_hspace:"Ruangan ufuk", +image_align:"Penyelarian", +image_align_baseline:"Garis pangkal", +image_align_top:"Atas", +image_align_middle:"Tengah", +image_align_bottom:"Bawah", +image_align_texttop:"Teks atas", +image_align_textbottom:"Teks bawah", +image_align_left:"Kiri", +image_align_right:"Kanan", +link_title:"Sisip/sunting pautan", +link_url:"Pautan URL", +link_target:"Sasaran", +link_target_same:"Buka pautan dalam tetingkap yang sama", +link_target_blank:"Buka pautan dalam tetingkap yang sama", +link_titlefield:"Tajuk", +link_is_email:"URL yang anda masukkan adalah alamat emel, tambah \"mailto\": di awalan?", +link_is_external:"URL yang anda masukkan adalah pautan luar, tambah \"http://\" di awalan?", +link_list:"Senarai pautan" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nb.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nb.js new file mode 100644 index 00000000..582462b5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nb.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('nb.advanced',{ +style_select:"Stiler", +font_size:"Skriftst\u00F8rrelse", +fontdefault:"Skriftfamilie", +block:"Format", +paragraph:"Avsnitt", +div:"Div", +address:"Adresse", +pre:"Pre-formatert", +h1:"Overskrift 1", +h2:"Overskrift 2", +h3:"Overskrift 3", +h4:"Overskrift 4", +h5:"Overskrift 5", +h6:"Overskrift 6", +blockquote:"Innrykkinnrykk", +code:"Kode", +samp:"Kodeeksempel", +dt:"Definisjonsuttrykk", +dd:"Definisjonsbeskrivelse", +bold_desc:"Fet", +italic_desc:"Kursiv", +underline_desc:"Understreking", +striketrough_desc:"Gjennomstreking", +justifyleft_desc:"Venstrejuster", +justifycenter_desc:"Midtstill", +justifyright_desc:"H\u00F8yrejuster", +justifyfull_desc:"Blokkjuster", +bullist_desc:"Punktliste", +numlist_desc:"Nummerliste", +outdent_desc:"Reduser innrykk", +indent_desc:"\u00D8k innrykk", +undo_desc:"Angre", +redo_desc:"Gj\u00F8r om", +link_desc:"Sett inn / endre lenke", +unlink_desc:"Fjern lenke", +image_desc:"Sett inn / endre bilde", +cleanup_desc:"Rens ukurant kode", +code_desc:"Redigere HTML-koden", +sub_desc:"Senket skrift", +sup_desc:"Hevet skrift", +hr_desc:"Sett inn horisontal linje", +removeformat_desc:"Fjern formatering", +custom1_desc:"Beskrivelse av spesialfunksjon", +forecolor_desc:"Velg skriftfarge", +backcolor_desc:"Velg bakgrunnsfarge", +charmap_desc:"Sett inn spesialtegn", +visualaid_desc:"Sl\u00E5 av/p\u00E5 usynlige elementer", +anchor_desc:"Sett inn / endre anker", +cut_desc:"Klipp ut", +copy_desc:"Kopier", +paste_desc:"Lim inn", +image_props_desc:"Bildeegenskaper", +newdocument_desc:"Nytt dokument", +help_desc:"Hjelp", +blockquote_desc:"Innrykk", +clipboard_msg:"Klipp ut / Kopier /Lim inn fungerer ikke i Mozilla og Firefox. \r\n Vil du vite mer om dette?", +path:"Sti", +newdocument:"Er du sikker p\u00E5 at du vil slette alt innhold?", +toolbar_focus:"Skift til verkt\u00F8yknapper - Alt+Q, Skift til editor - Alt-Z, Skift til elementsti - Alt-", +more_colors:"Flere farger" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nb_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nb_dlg.js new file mode 100644 index 00000000..59f3751b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nb_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('nb.advanced_dlg',{ +about_title:"Om TinyMCE", +about_general:"Om", +about_help:"Hjelp", +about_license:"Lisens", +about_plugins:"Programtillegg", +about_plugin:"Programtillegg", +about_author:"Utvikler", +about_version:"Versjon", +about_loaded:"Lastede programtillegg", +anchor_title:"Sett inn / endre anker", +anchor_name:"Ankernavn", +code_title:"HTML-editor", +code_wordwrap:"Tekstbryting", +colorpicker_title:"Velg en farge", +colorpicker_picker_tab:"Velg farge", +colorpicker_picker_title:"Fargevalg", +colorpicker_palette_tab:"Palett", +colorpicker_palette_title:"Palettfarger", +colorpicker_named_tab:"Navnevalg", +colorpicker_named_title:"Fargenavn", +colorpicker_color:"Farge:", +colorpicker_name:"Navn:", +charmap_title:"Velg spesialtegn", +image_title:"Sett inn / endre bilde", +image_src:"Bildets URL", +image_alt:"Bildebeskrivelse", +image_list:"Bildeliste", +image_border:"Ramme", +image_dimensions:"Dimensjoner", +image_vspace:"Vertikal avstand", +image_hspace:"Horisontal avstand", +image_align:"Justering", +image_align_baseline:"Bunnlinje", +image_align_top:"Topp", +image_align_middle:"Midtstilt", +image_align_bottom:"Bunn", +image_align_texttop:"Teksttopp", +image_align_textbottom:"Tekstbunn", +image_align_left:"Venstre", +image_align_right:"H\u00F8yre", +link_title:"Sett inn /endre lenke", +link_url:"Lenkens URL", +link_target:"M\u00E5lside", +link_target_same:"\u00C5pne i dette vinduet", +link_target_blank:"\u00C5pne i nytt vindu", +link_titlefield:"Tittel", +link_is_email:"Nettadressen du skrev inn ser ut til \u00E5 v\u00E6re en e-postadresse. \u00D8nsker du \u00E5 legge til det p\u00E5krevde mailto:-prefikset?", +link_is_external:"Nettadressen du skrev inn ser ut til \u00E5 v\u00E6re en ekstern nettadresse. \u00D8nsker du \u00E5 legge til det p\u00E5krevde http://-prefikset?", +link_list:"Lenkeliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nl.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nl.js new file mode 100644 index 00000000..1e67ec93 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nl.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('nl.advanced',{ +style_select:"Stijlen", +font_size:"Tekengrootte", +fontdefault:"Lettertype", +block:"Opmaak", +paragraph:"Alinea", +div:"Div", +address:"Adres", +pre:"Vaste opmaak", +h1:"Kop 1", +h2:"Kop 2", +h3:"Kop 3", +h4:"Kop 4", +h5:"Kop 5", +h6:"Kop 6", +blockquote:"Citaat", +code:"Code", +samp:"Codevoorbeeld", +dt:"Definitieterm", +dd:"Definitiebeschrijving", +bold_desc:"Vet (Ctrl+B)", +italic_desc:"Cursief (Ctrl+I)", +underline_desc:"Onderstrepen (Ctrl+U)", +striketrough_desc:"Doorhalen", +justifyleft_desc:"Links uitlijnen", +justifycenter_desc:"Centreren", +justifyright_desc:"Rechts uitlijnen", +justifyfull_desc:"Uitvullen", +bullist_desc:"Opsommingstekens", +numlist_desc:"Nummering", +outdent_desc:"Inspringing verkleinen", +indent_desc:"Inspringing vergroten", +undo_desc:"Ongedaan maken (Ctrl+Z)", +redo_desc:"Herhalen (Ctrl+Y)", +link_desc:"Link invoegen/bewerken", +unlink_desc:"Link verwijderen", +image_desc:"Afbeelding invoegen/bewerken", +cleanup_desc:"Code opruimen", +code_desc:"HTML bron bewerken", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Scheidingslijn invoegen", +removeformat_desc:"Opmaak verwijderen", +custom1_desc:"Uw eigen beschrijving hier", +forecolor_desc:"Tekstkleur", +backcolor_desc:"Tekstmarkeringskleur", +charmap_desc:"Symbool invoegen", +visualaid_desc:"Hulplijnen weergeven", +anchor_desc:"Anker invoegen/bewerken", +cut_desc:"Knippen", +copy_desc:"Kopi\u00EBren", +paste_desc:"Plakken", +image_props_desc:"Afbeeldingseigenschappen", +newdocument_desc:"Nieuw document", +help_desc:"Help", +blockquote_desc:"Citaat", +clipboard_msg:"Kopi\u00EBren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?", +path:"Pad", +newdocument:"Weet u zeker dat u alle inhoud wilt wissen?", +toolbar_focus:"Spring naar werkbalk - Alt+Q, Spring naar tekst - Alt-Z, Spring naar elementpad - Alt-X", +more_colors:"Meer kleuren" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nl_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nl_dlg.js new file mode 100644 index 00000000..46300abe --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nl_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('nl.advanced_dlg',{ +about_title:"Over TinyMCE", +about_general:"Info", +about_help:"Help", +about_license:"Licentie", +about_plugins:"Invoegtoepassingen", +about_plugin:"Invoegtoepassing", +about_author:"Auteur", +about_version:"Versie", +about_loaded:"Geladen Invoegtoepassingen", +anchor_title:"Anker invoegen/bewerken", +anchor_name:"Ankernaam", +code_title:"HTML Bron", +code_wordwrap:"Automatische terugloop", +colorpicker_title:"Kleuren", +colorpicker_picker_tab:"Alle kleuren", +colorpicker_picker_title:"Alle kleuren", +colorpicker_palette_tab:"Palet", +colorpicker_palette_title:"Paletkleuren", +colorpicker_named_tab:"Benoemd", +colorpicker_named_title:"Benoemde kleuren", +colorpicker_color:"Kleur:", +colorpicker_name:"Naam:", +charmap_title:"Symbolen", +image_title:"Afbeelding invoegen/bewerken", +image_src:"Bestand/URL", +image_alt:"Beschrijving", +image_list:"Lijst", +image_border:"Rand", +image_dimensions:"Afmetingen", +image_vspace:"Verticale ruimte", +image_hspace:"Horizontale ruimte", +image_align:"Uitlijning", +image_align_baseline:"Basislijn", +image_align_top:"Boven", +image_align_middle:"Midden", +image_align_bottom:"Onder", +image_align_texttop:"Bovenkant tekst", +image_align_textbottom:"Onderkant tekst", +image_align_left:"Links", +image_align_right:"Rechts", +link_title:"Link invoegen/bewerken", +link_url:"URL", +link_target:"Doel", +link_target_same:"Link in hetzelfde venster openen", +link_target_blank:"Link in een nieuw venster openen", +link_titlefield:"Titel", +link_is_email:"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?", +link_is_external:"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?", +link_list:"Link lijst" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nn.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nn.js new file mode 100644 index 00000000..ccd721a3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nn.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('nn.advanced',{ +style_select:"Stilar", +font_size:"Skriftstorleik", +fontdefault:"Skriftfamilie", +block:"Format", +paragraph:"Avsnitt", +div:"Div", +address:"Adresse", +pre:"Pre-formatert", +h1:"Overskrift 1", +h2:"Overskrift 2", +h3:"Overskrift 3", +h4:"Overskrift 4", +h5:"Overskrift 5", +h6:"Overskrift 6", +blockquote:"Innrykk", +code:"Kode", +samp:"Kodeeksempel", +dt:"Definisjonsuttrykk", +dd:"Definisjonsbeskrivelse", +bold_desc:"Feit", +italic_desc:"Kursiv", +underline_desc:"Understreking", +striketrough_desc:"Gjennomstreking", +justifyleft_desc:"Venstrejustert", +justifycenter_desc:"Midtstilt", +justifyright_desc:"H\u00F8grejustert", +justifyfull_desc:"Blokkjustert", +bullist_desc:"Punktliste", +numlist_desc:"Nummerliste", +outdent_desc:"Reduser innrykk", +indent_desc:"Auk innrykk", +undo_desc:"Angre", +redo_desc:"Gjer om", +link_desc:"Set inn / endre lenkje", +unlink_desc:"Fjern lenkje", +image_desc:"Set inn / endre bilete", +cleanup_desc:"Rens grisete kode", +code_desc:"Redigere HTML-koden", +sub_desc:"Senka skrift", +sup_desc:"Heva skrift", +hr_desc:"Set inn horisontal linje", +removeformat_desc:"Fjern formatering", +custom1_desc:"Din spesialfunksjondefinisjon her", +forecolor_desc:"Vel skriftfarge", +backcolor_desc:"Vel bakgrunnsfarge", +charmap_desc:"Set inn spesialteikn", +visualaid_desc:"Sl\u00E5 av/p\u00E5 usynlige element", +anchor_desc:"Set inn / endre anker", +cut_desc:"Klipp ut", +copy_desc:"Kopier", +paste_desc:"Lim inn", +image_props_desc:"Eigenskaper for bilete", +newdocument_desc:"Nytt dokument", +help_desc:"Hjelp", +blockquote_desc:"Innrykk", +clipboard_msg:"Klipp ut / Kopier /Lim inn fungerer ikkje i Mozilla og Firefox. \r\n Vil du vite meir om dette?", +path:"Sti", +newdocument:"Er du sikker p\u00E5 at du vil slette alt innhald?", +toolbar_focus:"Skift til verktyknappar - Alt+Q, Skift til editor - Alt-Z, Skift til elementsti - Alt-", +more_colors:"Fleire fargar" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nn_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nn_dlg.js new file mode 100644 index 00000000..d03b0872 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/nn_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('nn.advanced_dlg',{ +about_title:"Om TinyMCE", +about_general:"Om", +about_help:"Hjelp", +about_license:"Lisens", +about_plugins:"Programtillegg", +about_plugin:"Programtillegg", +about_author:"Utviklar", +about_version:"Versjon", +about_loaded:"Lasta programtillegg", +anchor_title:"Set inn / endre anker", +anchor_name:"Ankernamn", +code_title:"HTML-editor", +code_wordwrap:"Tekstbryting", +colorpicker_title:"Vel ein farge", +colorpicker_picker_tab:"Vel farge", +colorpicker_picker_title:"Fargeval", +colorpicker_palette_tab:"Palett", +colorpicker_palette_title:"Palettfargar", +colorpicker_named_tab:"Namneval", +colorpicker_named_title:"Fargenamn", +colorpicker_color:"Farge:", +colorpicker_name:"Namn:", +charmap_title:"Vel spesialteikn", +image_title:"Set inn / endre bilete", +image_src:"Bilete-URL", +image_alt:"Bileteomtale", +image_list:"Liste med bilete", +image_border:"Ramme", +image_dimensions:"Dimensjonar", +image_vspace:"Vertikal avstand", +image_hspace:"Horisontal avstand", +image_align:"Justering", +image_align_baseline:"Botnlinje", +image_align_top:"Topp", +image_align_middle:"Midtstilt", +image_align_bottom:"Botn", +image_align_texttop:"Teksttopp", +image_align_textbottom:"Tekstbotn", +image_align_left:"Venstre", +image_align_right:"H\u00F8gre", +link_title:"Set inn / endre lenkje", +link_url:"Lenkje-URL", +link_target:"Vindauge", +link_target_same:"Opne i dette vindauget", +link_target_blank:"Opne i nytt vindauget", +link_titlefield:"Tittel", +link_is_email:"Nettadressa du skreiv inn ser ut til \u00E5 vere ein e-postadresse. \u00D8nskjer du \u00E5 leggje til det obligatoriske mailto:-prefikset?", +link_is_external:"Nettadressa du skreiv inn ser ut til \u00E5 vere ein ekstern nettadresse. \u00D8nskjer du \u00E5 leggje til det obligatoriske http://-prefikset?", +link_list:"Lenkjeliste" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pl.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pl.js new file mode 100644 index 00000000..a4f79bfd --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pl.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('pl.advanced',{ +style_select:"Styl", +font_size:"Rozmiar czcionki", +fontdefault:"Rodzaj czcionki", +block:"Format", +paragraph:"Paragraf", +div:"Div", +address:"Adres", +pre:"Czcionka o sta\u0142ej szeroko\u015Bci", +h1:"Nag\u0142\u00F3wek 1", +h2:"Nag\u0142\u00F3wek 2", +h3:"Nag\u0142\u00F3wek 3", +h4:"Nag\u0142\u00F3wek 4", +h5:"Nag\u0142\u00F3wek 5", +h6:"Nag\u0142\u00F3wek 6", +blockquote:"Wydzielony blok", +code:"Kod", +samp:"Pr\u00F3bka kodu", +dt:"Definicja terminu ", +dd:"Opis terminu", +bold_desc:"Pogrubienie (Ctrl+B)", +italic_desc:"Kursywa (Ctrl+I)", +underline_desc:"Podkre\u015Blenie (Ctrl+U)", +striketrough_desc:"Przekre\u015Blenia", +justifyleft_desc:"Wyr\u00F3wnaj do lewej", +justifycenter_desc:"Wycentruj", +justifyright_desc:"Wyr\u00F3wnaj do prawej", +justifyfull_desc:"R\u00F3wnanie do prawej i lewej", +bullist_desc:"Lista nienumerowana", +numlist_desc:"Lista numerowana", +outdent_desc:"Cofnij wci\u0119cie", +indent_desc:"Wci\u0119cie", +undo_desc:"Cofnij (Ctrl+Z)", +redo_desc:"Pon\u00F3w (Ctrl+Y)", +link_desc:"Wstaw/edytuj link", +unlink_desc:"Usu\u0144 link", +image_desc:"Wstaw/edytuj obraz", +cleanup_desc:"Wyczy\u015B\u0107 nieuporz\u0105dkowany kod", +code_desc:"Edytuj \u017Ar\u00F3d\u0142o HTML", +sub_desc:"Indeks dolny", +sup_desc:"Indeks g\u00F3rny", +hr_desc:"Wstaw poziom\u0105 lini\u0119", +removeformat_desc:"Usu\u0144 formatowanie", +custom1_desc:"Tw\u00F3j niestandardowy opis tutaj", +forecolor_desc:"Wybierz kolor tekstu", +backcolor_desc:"Wybierz kolor t\u0142a", +charmap_desc:"Wstaw niestandardowy znak", +visualaid_desc:"Prze\u0142\u0105cz widoczno\u015B\u0107 wska\u017Anik\u00F3w i niewidocznych element\u00F3w", +anchor_desc:"Wstaw/edytuj kotwic\u0119", +cut_desc:"Wytnij", +copy_desc:"Kopiuj", +paste_desc:"Wklej", +image_props_desc:"W\u0142a\u015Bciwo\u015Bci obrazka", +newdocument_desc:"Nowy dokument", +help_desc:"Pomoc", +blockquote_desc:"Blok cytatu", +clipboard_msg:"Akcje Kopiuj/Wytnij/Wklej nie s\u0105 dost\u0119pne w Mozilli i Firefox.\nCzy chcesz wi\u0119cej informacji o tym problemie?", +path:"\u015Acie\u017Cka", +newdocument:"Czy jeste\u015B pewnien, ze chcesz wyczy\u015Bci\u0107 ca\u0142\u0105 zawarto\u015B\u0107?", +toolbar_focus:"Przeskocz do przycisk\u00F3w narz\u0119dzi - Alt+Q, Przeskocz do edytora - Alt-Z, Przeskocz do elementu \u015Bcie\u017Cki - Alt-X", +more_colors:"Wi\u0119cej kolor\u00F3w" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pl_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pl_dlg.js new file mode 100644 index 00000000..3eca9a6d --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pl_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('pl.advanced_dlg',{ +about_title:"O TinyMCE", +about_general:"O TinyMCE", +about_help:"Pomoc", +about_license:"Licencja", +about_plugins:"Wtyczki", +about_plugin:"Wtyczka", +about_author:"Autor", +about_version:"Wersja", +about_loaded:"Za\u0142adowane wtyczki", +anchor_title:"Wstaw/Edytuj zakotwiczenie", +anchor_name:"Nazwa zakotwiczenia", +code_title:"Edytor \u017Ar\u00F3d\u0142a HTML", +code_wordwrap:"Zawijanie s\u0142\u00F3w", +colorpicker_title:"Wybierz kolor", +colorpicker_picker_tab:"Wybieranie", +colorpicker_picker_title:"Wybieranie kolor\u00F3w", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta kolor\u00F3w", +colorpicker_named_tab:"Nazwane", +colorpicker_named_title:"Nazwane kolory", +colorpicker_color:"Kolor:", +colorpicker_name:"Nazwa:", +charmap_title:"Wybierz niestandardowy znak", +image_title:"Wstaw/Edytuj obraz", +image_src:"URL obrazka", +image_alt:"Opis obrazka", +image_list:"Lista obrazk\u00F3w", +image_border:"Ramka", +image_dimensions:"Rozmiary", +image_vspace:"Pionowy odst\u0119p", +image_hspace:"Poziomy odst\u0119p", +image_align:"Wyr\u00F3wnanie", +image_align_baseline:"Linia bazowa", +image_align_top:"G\u00F3ra", +image_align_middle:"\u015Arodek", +image_align_bottom:"Dolny", +image_align_texttop:"G\u00F3rny tekst", +image_align_textbottom:"Dolny tekst", +image_align_left:"Lewy", +image_align_right:"Prawy", +link_title:"Wstaw/edytuj link", +link_url:"Link URL", +link_target:"Cel", +link_target_same:"Otw\u00F3rz link w tym samym oknie", +link_target_blank:"Otw\u00F3rz link w nowym oknie", +link_titlefield:"Tytu\u0142", +link_is_email:"URL kt\u00F3ry otworzy\u0142e\u015B wydaje si\u0119 by\u0107 adresem mailowym, czy chcesz doda\u0107 odpowiedni prefix mailto: ?", +link_is_external:"URL kt\u00F3ry otworzy\u0142e\u015B wydaje si\u0119 by\u0107 zewn\u0119trznym linkiem, czy chcesz doda\u0107 wymagany prefix http:// ?", +link_list:"Lista link\u00F3w" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pt.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pt.js new file mode 100644 index 00000000..a405d0ba --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pt.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('pt.advanced',{ +style_select:"Estilos", +font_size:"Tamanho", +fontdefault:"Fam\u00EDlia(Fonte)", +block:"Formata\u00E7\u00E3o", +paragraph:"Par\u00E1grafo", +div:"Div", +address:"Endere\u00E7o", +pre:"Pr\u00E9-formatado", +h1:"Cabe\u00E7alho 1", +h2:"Cabe\u00E7alho 2", +h3:"Cabe\u00E7alho 3", +h4:"Cabe\u00E7alho 4", +h5:"Cabe\u00E7alho 5", +h6:"Cabe\u00E7alho 6", +blockquote:"Cita\u00E7\u00E3o em bloco", +code:"C\u00F3digo", +samp:"Amostra de c\u00F3digo", +dt:"Termo de defini\u00E7\u00E3o", +dd:"Descri\u00E7\u00E3o de defini\u00E7\u00E3o", +bold_desc:"Negrito (Ctrl+B)", +italic_desc:"It\u00E1lico (Ctrl+I)", +underline_desc:"Sublinhado (Ctrl+U)", +striketrough_desc:"Rasurado", +justifyleft_desc:"Alinhar \u00E0 esquerda", +justifycenter_desc:"Centrar", +justifyright_desc:"Alinhar \u00E0 direita", +justifyfull_desc:"Justificar", +bullist_desc:"Marcadores", +numlist_desc:"Numera\u00E7\u00E3o", +outdent_desc:"Diminuir recuo", +indent_desc:"Aumentar recuo", +undo_desc:"Desfazer (Ctrl+Z)", +redo_desc:"Refazer (Ctrl+Y)", +link_desc:"Inserir/editar hyperlink", +unlink_desc:"Remover hyperlink", +image_desc:"Inserir/editar imagem", +cleanup_desc:"Limpar c\u00F3digo incorrecto", +code_desc:"Editar c\u00F3digo fonte", +sub_desc:"Subscrito", +sup_desc:"Superscrito", +hr_desc:"Inserir separador horizontal", +removeformat_desc:"Remover formata\u00E7\u00E3o", +custom1_desc:"Insira aqui a sua descri\u00E7\u00E3o personalizada", +forecolor_desc:"Seleccionar cor do texto", +backcolor_desc:"Seleccionar cor de fundo", +charmap_desc:"Inserir caracteres especiais", +visualaid_desc:"Alternar guias/elementos invis\u00EDveis", +anchor_desc:"Inserir/editar \u00E2ncora", +cut_desc:"Cortar", +copy_desc:"Copiar", +paste_desc:"Colar", +image_props_desc:"Propriedades de imagem", +newdocument_desc:"Novo documento", +help_desc:"Ajuda", +blockquote_desc:"Cita\u00E7\u00E3o em bloco", +clipboard_msg:"Copiar/cortar/colar n\u00E3o est\u00E1 dispon\u00EDvel em Mozilla e Firefox.\r\nDeseja mais informa\u00E7\u00F5es sobre isso?", +path:"Endere\u00E7o", +newdocument:"Tem a certeza de que deseja apagar tudo?", +toolbar_focus:"Ir para ferramentas - Alt+Q, Ir para o editor - Alt-Z, Ir para endere\u00E7o do elemento - Alt-X", +more_colors:"Mais cores" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pt_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pt_dlg.js new file mode 100644 index 00000000..e8ac94a7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/pt_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('pt.advanced_dlg',{ +about_title:"Sobre o TinyMCE", +about_general:"Sobre", +about_help:"Ajuda", +about_license:"Licen\u00E7a", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Autor", +about_version:"Vers\u00E3o", +about_loaded:"Plugins Instalados", +anchor_title:"Inserir/editar \u00E2ncora", +anchor_name:"Nome da \u00E2ncora", +code_title:"Editor HTML", +code_wordwrap:"Quebra autom\u00E1tica de linha", +colorpicker_title:"Seleccione uma cor", +colorpicker_picker_tab:"Editor", +colorpicker_picker_title:"Editor de Cores", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta de Cores", +colorpicker_named_tab:"Personalizadas", +colorpicker_named_title:"Cores Personalizadas", +colorpicker_color:"Cor:", +colorpicker_name:"Nome:", +charmap_title:"Seleccionar caracteres personalizados", +image_title:"Inserir/editar imagem", +image_src:"Endere\u00E7o da imagem", +image_alt:"Descri\u00E7\u00E3o da imagem", +image_list:"Lista de imagens", +image_border:"Limites", +image_dimensions:"Dimens\u00F5es", +image_vspace:"Espa\u00E7o Vertical", +image_hspace:"Espa\u00E7o Horizontal", +image_align:"Alinhamento", +image_align_baseline:"Sobre a linha de texto", +image_align_top:"Topo", +image_align_middle:"Meio", +image_align_bottom:"Abaixo", +image_align_texttop:"Topo do texto", +image_align_textbottom:"Base do texto", +image_align_left:"Esquerda", +image_align_right:"Direita", +link_title:"Inserir/editar hyperlink", +link_url:"URL do hyperink", +link_target:"Alvo", +link_target_same:"Abrir hyperlink na mesma janela", +link_target_blank:"Abrir hyperlink em nova janela", +link_titlefield:"T\u00EDtulo", +link_is_email:"A URL digitada parece ser um endere\u00E7o de e-mail. Deseja acrescentar o (necess\u00E1rio) prefixo mailto:?", +link_is_external:"A URL digitada parece conduzir a um link externo. Deseja acrescentar o (necess\u00E1rio) prefixo http://?", +link_list:"Lista de Links" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ro.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ro.js new file mode 100644 index 00000000..b7e52d23 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ro.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('ro.advanced',{ +style_select:"Stiluri", +font_size:"M\u0103rime font", +fontdefault:"Font", +block:"Format", +paragraph:"Paragraf", +div:"Div", +address:"Adres\u0103", +pre:"Preformatat", +h1:"Titlu 1", +h2:"Titlu 2", +h3:"Titlu 3", +h4:"Titlu 4", +h5:"Titlu 5", +h6:"Titlu 6", +blockquote:"Citat", +code:"Cod", +samp:"Mostr\u0103 de cod", +dt:"Termen definit ", +dd:"Defini\u0163ie", +bold_desc:"\u00CEngro\u015Fat (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Subliniat (Ctrl+U)", +striketrough_desc:"T\u0103iat", +justifyleft_desc:"Aliniere la st\u00E2nga", +justifycenter_desc:"Centrare", +justifyright_desc:"Aliniere la dreapta", +justifyfull_desc:"Aliniere \"justify\"", +bullist_desc:"List\u0103 neordonat\u0103", +numlist_desc:"List\u0103 ordonat\u0103", +outdent_desc:"Outdenteaz\u0103", +indent_desc:"Indenteaz\u0103", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Ref\u0103 (Ctrl+Y)", +link_desc:"Inserare/editare leg\u0103tur\u0103", +unlink_desc:"\u015Eterge link", +image_desc:"Inserare/editare imagine", +cleanup_desc:"Cur\u0103\u0163are cod", +code_desc:"Editare surs\u0103 HTML", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Insereaz\u0103 linie orizontal\u0103", +removeformat_desc:"Anuleaz\u0103 formatarea", +custom1_desc:"Descriere ...", +forecolor_desc:"Culoare text", +backcolor_desc:"Culoare fundal", +charmap_desc:"Inserare caracter special", +visualaid_desc:"Toggle guidelines/invisible elements", +anchor_desc:"Inserare/editare ancor\u0103", +cut_desc:"Taie", +copy_desc:"Copiaz\u0103", +paste_desc:"Lipe\u015Fte", +image_props_desc:"Detalii imagine", +newdocument_desc:"Document nou", +help_desc:"Autor", +blockquote_desc:"Citat", +clipboard_msg:"Copiere/T\u0103iere/Lipire nu sunt disponibile \u00EEn Mozilla \u015Fi Firefox.\nDori\u0163i mai multe informa\u0163ii despre aceast\u0103 problem\u0103?", +path:"Cale", +newdocument:"Sigur dori\u0163i s\u0103 \u015Fterge\u0163i tot?", +toolbar_focus:"S\u0103ri\u0163i la instrumente - Alt+Q, S\u0103ri\u0163i la editor - Alt-Z, S\u0103ri\u0163i la cale - Alt-X", +more_colors:"Mai multe culori" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ro_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ro_dlg.js new file mode 100644 index 00000000..08adadc2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ro_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ro.advanced_dlg',{ +about_title:"Despre TinyMCE", +about_general:"Despre", +about_help:"Ajutor", +about_license:"Licen\u0163\u0103", +about_plugins:"Module", +about_plugin:"Modul", +about_author:"Autor", +about_version:"Versiune", +about_loaded:"Module \u00EEnc\u0103rcate", +anchor_title:"Inserare/editare ancor\u0103", +anchor_name:"Nume ancor\u0103", +code_title:"Editor surs\u0103 HTML", +code_wordwrap:"Word wrap", +colorpicker_title:"Alege\u0163i o culoare", +colorpicker_picker_tab:"Picker", +colorpicker_picker_title:"Color picker", +colorpicker_palette_tab:"Palet\u0103", +colorpicker_palette_title:"Palet\u0103 de culori", +colorpicker_named_tab:"Named", +colorpicker_named_title:"Culori denumite", +colorpicker_color:"Culoare:", +colorpicker_name:"Nume:", +charmap_title:"Alege\u0163i un caracter special", +image_title:"Insereaz\u0103/editeaz\u0103 imagine", +image_src:"URL imagine", +image_alt:"Descriere imagine", +image_list:"List\u0103 de imagini", +image_border:"Bordur\u0103", +image_dimensions:"Dimensiuni", +image_vspace:"Spa\u0163iu vertical", +image_hspace:"Spa\u0163iu orizontal", +image_align:"Aliniere", +image_align_baseline:"Baseline", +image_align_top:"Sus", +image_align_middle:"La mijloc", +image_align_bottom:"Jos", +image_align_texttop:"Textul sus", +image_align_textbottom:"Textul la mijloc", +image_align_left:"St\u00E2nga", +image_align_right:"Dreapta", +link_title:"Insereaz\u0103/editeaz\u0103 link", +link_url:"URL link", +link_target:"\u0162int\u0103", +link_target_same:"Deschide link \u00EEn aceea\u015Fi fereastr\u0103", +link_target_blank:"Deschide link \u00EEn fereastr\u0103 nou\u0103", +link_titlefield:"Titlu", +link_is_email:"URL-ul pe care l-a\u0163i introdus pare a fi o adres\u0103 de email, dori\u0163i s\u0103 adaug \u015Fi prefixul mailto: necesar?", +link_is_external:"URL-ul pe care l-a\u0163i introdus pare a fi un link extern, dori\u0163i s\u0103 adaug \u015Fi prefixul http:// necesar?", +link_list:"Lista de linkuri" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ru.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ru.js new file mode 100644 index 00000000..1b88d759 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ru.js @@ -0,0 +1,64 @@ +tinyMCE.addI18n('ru.advanced',{ +style_select:"\u0421\u0442\u0438\u043B\u0438", +font_size:"\u0420\u0430\u0437\u043C\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430", +fontdefault:"\u0428\u0440\u0438\u0444\u0442", +block:"\u0424\u043E\u0440\u043C\u0430\u0442", +paragraph:"\u0410\u0431\u0437\u0430\u0446", +div:"\u0420\u0430\u0437\u0434\u0435\u043B", +address:"\u0410\u0434\u0440\u0435\u0441", +pre:"\u041E\u0442\u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442", +h1:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 1", +h2:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 2", +h3:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 3", +h4:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 4", +h5:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 5", +h6:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 6", +blockquote:"\u0411\u043B\u043E\u043A \u0446\u0438\u0442\u0430\u0442\u044B", +code:"\u041A\u043E\u0434", +samp:"\u041F\u0440\u0438\u043C\u0435\u0440 \u043A\u043E\u0434\u0430", +dt:"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u043C\u044B\u0439 \u0442\u0435\u0440\u043C\u0438\u043D", +dd:"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0442\u0435\u0440\u043C\u0438\u043D\u0430", +bold_desc:"\u041F\u043E\u043B\u0443\u0436\u0438\u0440\u043D\u044B\u0439 (Ctrl+B)", +italic_desc:"\u041A\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)", +underline_desc:"\u041F\u043E\u0434\u0447\u0451\u0440\u043A\u043D\u0443\u0442\u044B\u0439 (Ctrl+U)", +striketrough_desc:"\u041F\u0435\u0440\u0435\u0447\u0451\u0440\u043A\u043D\u0443\u0442\u044B\u0439", +justifyleft_desc:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435 \u0432\u043B\u0435\u0432\u043E", +justifycenter_desc:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435 \u043F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +justifyright_desc:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435 \u0432\u043F\u0440\u0430\u0432\u043E", +justifyfull_desc:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435 \u043F\u043E \u0448\u0438\u0440\u0438\u043D\u0435", +bullist_desc:"\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A", +numlist_desc:"\u041D\u0443\u043C\u0435\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A", +outdent_desc:"\u0423\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F", +indent_desc:"\u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F", +undo_desc:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C (Ctrl+Z)", +redo_desc:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C (Ctrl+Y)", +link_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443", +unlink_desc:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443", +image_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +cleanup_desc:"\u041F\u043E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043A\u0440\u0438\u0432\u043E\u0439 \u043A\u043E\u0434", +code_desc:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C HTML-\u0438\u0441\u0445\u043E\u0434\u043D\u0438\u043A", +sub_desc:"\u041D\u0438\u0436\u043D\u0438\u0439 \u0438\u043D\u0434\u0435\u043A\u0441", +sup_desc:"\u0412\u0435\u0440\u0445\u043D\u0438\u0439 \u0438\u043D\u0434\u0435\u043A\u0441", +hr_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0443\u044E \u043B\u0438\u043D\u0438\u044E", +removeformat_desc:"\u0423\u0431\u0440\u0430\u0442\u044C \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435", +custom1_desc:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435", +forecolor_desc:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0446\u0432\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430", +backcolor_desc:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0446\u0432\u0435\u0442 \u0444\u043E\u043D\u0430", +charmap_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0441\u0438\u043C\u0432\u043E\u043B", +visualaid_desc:"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C/\u0432\u044B\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435/\u043D\u0435\u0432\u0438\u0434\u0438\u043C\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", +anchor_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u044F\u043A\u043E\u0440\u044C", +cut_desc:"\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C", +copy_desc:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C", +paste_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C", +image_props_desc:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F", +newdocument_desc:"\u041D\u043E\u0432\u044B\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442", +help_desc:"\u041F\u043E\u043C\u043E\u0449\u044C", +blockquote_desc:"\u0411\u043B\u043E\u043A \u0446\u0438\u0442\u0430\u0442\u044B", +clipboard_msg:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435/\u0412\u0441\u0442\u0430\u0432\u043A\u0430 \u043D\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u0432 Mozilla \u0438 Firefox.\r\n\u0425\u043E\u0442\u0438\u0442\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435 \u0443\u0437\u043D\u0430\u0442\u044C, \u0432 \u0447\u0451\u043C \u0434\u0435\u043B\u043E?", +path:"\u041F\u0443\u0442\u044C", +newdocument:"\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0451 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435?", +toolbar_focus:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043A\u043D\u043E\u043F\u043A\u0430\u043C \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 - Alt+Q, \u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0443 - Alt-Z, \u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043F\u0443\u0442\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 - Alt-X", +more_colors:"\u0415\u0449\u0451 \u0446\u0432\u0435\u0442\u0430", +image_delta_width:"65", +link_delta_width:"20" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ru_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ru_dlg.js new file mode 100644 index 00000000..dd019701 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/ru_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('ru.advanced_dlg',{ +about_title:"\u041E TinyMCE", +about_general:"\u041E \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0435", +about_help:"\u041F\u043E\u043C\u043E\u0449\u044C", +about_license:"\u041B\u0438\u0446\u0435\u043D\u0437\u0438\u044F", +about_plugins:"\u041F\u043B\u0430\u0433\u0438\u043D\u044B", +about_plugin:"\u041F\u043B\u0430\u0433\u0438\u043D", +about_author:"\u0410\u0432\u0442\u043E\u0440", +about_version:"\u0412\u0435\u0440\u0441\u0438\u044F", +about_loaded:"\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0435 \u043F\u043B\u0430\u0433\u0438\u043D\u044B", +anchor_title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u044F\u043A\u043E\u0440\u044C", +anchor_name:"\u0418\u043C\u044F \u044F\u043A\u043E\u0440\u044F", +code_title:"\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 HTML-\u0438\u0441\u0445\u043E\u0434\u043D\u0438\u043A\u0430", +code_wordwrap:"\u041F\u0435\u0440\u0435\u043D\u043E\u0441 \u0441\u043B\u043E\u0432", +colorpicker_title:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0446\u0432\u0435\u0442", +colorpicker_picker_tab:"\u0412\u044B\u0431\u043E\u0440", +colorpicker_picker_title:"\u0412\u044B\u0431\u043E\u0440 \u0446\u0432\u0435\u0442\u0430", +colorpicker_palette_tab:"\u041F\u0430\u043B\u0438\u0442\u0440\u0430", +colorpicker_palette_title:"\u0426\u0432\u0435\u0442\u0430 \u043F\u0430\u043B\u0438\u0442\u0440\u044B", +colorpicker_named_tab:"\u0418\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u043D\u044B\u0439", +colorpicker_named_title:"\u0418\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430", +colorpicker_color:"\u0426\u0432\u0435\u0442:", +colorpicker_name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435:", +charmap_title:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0441\u0438\u043C\u0432\u043E\u043B", +image_title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +image_src:"\u0410\u0434\u0440\u0435\u0441 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F", +image_alt:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F", +image_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439", +image_border:"\u0413\u0440\u0430\u043D\u0438\u0446\u0430", +image_dimensions:"\u0420\u0430\u0437\u043C\u0435\u0440\u044B", +image_vspace:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E", +image_hspace:"\u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E", +image_align:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +image_align_baseline:"\u041F\u043E \u0431\u0430\u0437\u0438\u0441\u043D\u043E\u0439 \u043B\u0438\u043D\u0438\u0438", +image_align_top:"\u041F\u043E \u0432\u0435\u0440\u0445\u0443", +image_align_middle:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +image_align_bottom:"\u041F\u043E \u043D\u0438\u0437\u0443", +image_align_texttop:"\u041F\u043E \u0432\u0435\u0440\u0445\u0443 \u0442\u0435\u043A\u0441\u0442\u0430", +image_align_textbottom:"\u041F\u043E \u043D\u0438\u0437\u0443 \u0442\u0435\u043A\u0441\u0442\u0430", +image_align_left:"\u0412\u043B\u0435\u0432\u043E", +image_align_right:"\u0412\u043F\u0440\u0430\u0432\u043E", +link_title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443", +link_url:"\u0410\u0434\u0440\u0435\u0441 \u0441\u0441\u044B\u043B\u043A\u0438", +link_target:"\u0426\u0435\u043B\u044C", +link_target_same:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443 \u0432 \u0442\u043E\u043C \u0436\u0435 \u043E\u043A\u043D\u0435", +link_target_blank:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443 \u0432 \u043D\u043E\u0432\u043E\u043C \u043E\u043A\u043D\u0435", +link_titlefield:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", +link_is_email:"\u0412\u0432\u0435\u0434\u0451\u043D\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 \u043F\u043E\u0445\u043E\u0436 \u043D\u0430 email, \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0444\u0438\u043A\u0441 mailto:?", +link_is_external:"\u0412\u0432\u0435\u0434\u0451\u043D\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 \u043F\u043E\u0445\u043E\u0436 \u043D\u0430 \u0432\u043D\u0435\u0448\u043D\u044E\u044E \u0441\u0441\u044B\u043B\u043A\u0443, \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0444\u0438\u043A\u0441 http://?", +link_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0441\u0441\u044B\u043B\u043E\u043A" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sc.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sc.js new file mode 100644 index 00000000..709981ea --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sc.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('sc.advanced',{ +style_select:"\u6837\u5F0F", +font_size:"\u5B57\u4F53\u5927\u5C0F", +fontdefault:"\u5B57\u4F53", +block:"\u683C\u5F0F", +paragraph:"\u6BB5\u843D", +div:"Div", +address:"\u5730\u5740", +pre:"\u4FDD\u7559\u539F\u683C\u5F0F", +h1:"\u4E00\u7EA7\u6807\u9898", +h2:"\u4E8C\u7EA7\u6807\u9898", +h3:"\u4E09\u7EA7\u6807\u9898", +h4:"\u56DB\u7EA7\u6807\u9898", +h5:"\u4E94\u7EA7\u6807\u9898", +h6:"\u516D\u7EA7\u6807\u9898", +blockquote:"\u5F15\u7528", +code:"\u7A0B\u5E8F\u4EE3\u7801", +samp:"\u8303\u4F8B", +dt:"\u540D\u8BCD\u5B9A\u4E49", +dd:"\u540D\u8BCD\u89E3\u91CA", +bold_desc:"\u7C97\u4F53 (Ctrl+B)", +italic_desc:"\u659C\u4F53 (Ctrl+I)", +underline_desc:"\u4E0B\u5212\u7EBF (Ctrl+U)", +striketrough_desc:"\u4E2D\u5212\u7EBF", +justifyleft_desc:"\u5DE6\u5BF9\u9F50", +justifycenter_desc:"\u5C45\u4E2D", +justifyright_desc:"\u53F3\u5BF9\u9F50", +justifyfull_desc:"\u4E24\u7AEF\u5BF9\u9F50", +bullist_desc:"\u65E0\u5E8F\u5217\u8868", +numlist_desc:"\u6709\u5E8F\u5217\u8868", +outdent_desc:"\u51CF\u5C11\u7F29\u8FDB", +indent_desc:"\u589E\u52A0\u7F29\u8FDB", +undo_desc:"\u64A4\u9500(Ctrl+Z)", +redo_desc:"\u6062\u590D(Ctrl+Y)", +link_desc:"\u63D2\u5165/\u7F16\u8F91 \u94FE\u63A5", +unlink_desc:"\u53D6\u6D88\u94FE\u63A5", +image_desc:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u7247", +cleanup_desc:"\u5220\u9664\u5197\u4F59\u7801", +code_desc:"\u7F16\u8F91HTM\u4EE3\u7801", +sub_desc:"\u4E0B\u6807", +sup_desc:"\u4E0A\u6807", +hr_desc:"\u63D2\u5165\u6C34\u5E73\u7EBF", +removeformat_desc:"\u5220\u9664\u683C\u5F0F", +custom1_desc:"\u5728\u6B64\u8F93\u5165\u63CF\u8FF0", +forecolor_desc:"\u9009\u62E9\u6587\u5B57\u989C\u8272", +backcolor_desc:"\u9009\u62E9\u80CC\u666F\u989C\u8272", +charmap_desc:"\u63D2\u5165\u7279\u6B8A\u7B26\u53F7", +visualaid_desc:"\u663E\u793A/\u9690\u85CF\u5143\u7D20\u8FB9\u754C", +anchor_desc:"\u63D2\u5165/\u7F16\u8F91 \u951A\u70B9", +cut_desc:"\u526A\u5207(Ctrl+X)", +copy_desc:"\u590D\u5236(Ctrl+C)", +paste_desc:"\u7C98\u8D34(Ctrl+V)", +image_props_desc:"\u56FE\u7247\u5C5E\u6027", +newdocument_desc:"\u65B0\u5EFA\u6587\u4EF6", +help_desc:"\u5E2E\u52A9", +blockquote_desc:"\u5F15\u7528", +clipboard_msg:"\u590D\u5236\u3001\u526A\u5207\u548C\u7C98\u8D34\u529F\u80FD\u5728Mozilla \u548C Firefox\u4E2D\u65E0\u6CD5\u4F7F\u7528", +path:"\u8DEF\u5F84", +newdocument:"\u60A8\u786E\u8BA4\u8981\u5220\u9664\u5168\u90E8\u5185\u5BB9\u5417\uFF1F", +toolbar_focus:"\u5DE5\u5177\u680F(Alt + Q), \u7F16\u8F91\u6846(Alt - Z), \u8DEF\u5F84\u680F(Alt - X)", +more_colors:"\u66F4\u591A\u989C\u8272" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sc_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sc_dlg.js new file mode 100644 index 00000000..237d5796 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sc_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('sc.advanced_dlg',{ +about_title:"\u5173\u4E8ETinyMCE", +about_general:"\u5173\u4E8E", +about_help:"\u5E2E\u52A9", +about_license:"\u8BB8\u53EF\u8BC1", +about_plugins:"\u63D2\u4EF6", +about_plugin:"\u63D2\u4EF6", +about_author:"\u4F5C\u8005", +about_version:"\u7248\u672C", +about_loaded:"\u5DF2\u52A0\u8F7D\u63D2\u4EF6", +anchor_title:"\u63D2\u5165/\u7F16\u8F91 \u951A\u70B9", +anchor_name:"\u951A\u70B9\u540D\u79F0", +code_title:"HTML\u4EE3\u7801\u7F16\u8F91\u5668", +code_wordwrap:"\u81EA\u52A8\u6362\u884C", +colorpicker_title:"\u9009\u62E9\u989C\u8272", +colorpicker_picker_tab:"\u53D6\u8272\u5668", +colorpicker_picker_title:"\u53D6\u8272\u5668", +colorpicker_palette_tab:"\u8C03\u8272\u677F", +colorpicker_palette_title:"\u989C\u8272\u5757", +colorpicker_named_tab:"\u6709\u540D\u989C\u8272", +colorpicker_named_title:"\u989C\u8272\u5757", +colorpicker_color:"\u989C\u8272:", +colorpicker_name:"\u989C\u8272\u540D:", +charmap_title:"\u63D2\u5165\u7279\u6B8A\u7B26\u53F7", +image_title:"\u63D2\u5165/\u7F16\u8F91 \u56FE\u7247", +image_src:"\u56FE\u7247\u7F51\u5740", +image_alt:"\u56FE\u7247\u8BF4\u660E", +image_list:"\u56FE\u7247\u5217\u8868", +image_border:"\u8FB9\u6846", +image_dimensions:"\u5C3A\u5BF8", +image_vspace:"\u5782\u76F4\u95F4\u8DDD", +image_hspace:"\u6C34\u5E73\u95F4\u8DDD", +image_align:"\u5BF9\u9F50\u65B9\u5F0F", +image_align_baseline:"\u57FA\u7EBF", +image_align_top:"\u9876\u90E8\u5BF9\u9F50", +image_align_middle:"\u4E2D\u90E8\u5BF9\u9F50", +image_align_bottom:"\u5E95\u90E8\u5BF9\u9F50", +image_align_texttop:"\u6587\u5B57\u4E0A\u65B9", +image_align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +image_align_left:"\u5DE6\u5BF9\u9F50", +image_align_right:"\u53F3\u5BF9\u9F50", +link_title:"\u63D2\u5165/\u7F16\u8F91 \u94FE\u63A5", +link_url:"\u94FE\u63A5\u7F51\u5740", +link_target:"\u76EE\u6807", +link_target_same:"\u5F53\u524D\u7A97\u53E3\u6253\u5F00", +link_target_blank:"\u65B0\u7A97\u53E3\u6253\u5F00", +link_titlefield:"\u6807\u9898", +link_is_email:"\u4F60\u8F93\u5165\u7684\u662F\u7535\u5B50\u90AE\u7BB1\u5730\u5740\uFF0C\u662F\u5426\u52A0\u5165\u524D\u7F00\uFF1Amailto: ?", +link_is_external:"\u4F60\u8F93\u5165\u7684\u662F\u5916\u90E8\u94FE\u63A5\u5730\u5740, \u662F\u5426\u52A0\u5165\u524D\u7F00\uFF1Ahttp:// ?", +link_list:"\u94FE\u63A5\u5217\u8868" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/se.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/se.js new file mode 100644 index 00000000..9168e710 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/se.js @@ -0,0 +1,60 @@ +tinyMCE.addI18n('se.advanced',{ +style_select:"Stilar", +font_size:"Fontstorlek", +fontdefault:"Fontfamilj", +block:"Format", +paragraph:"Paragraf", +div:"Div", +address:"Adress", +pre:"F\u00F6rformaterad", +h1:"Rubrik 1", +h2:"Rubrik 2", +h3:"Rubrik 3", +h4:"Rubrik 4", +h5:"Rubrik 5", +h6:"Rubrik 6", +blockquote:"Blockcitat", +code:"Kodblock", +samp:"Kodexempel", +dt:"Definitionsterm", +dd:"Definitionsbeskrivning", +bold_desc:"Fet (Ctrl+B)", +italic_desc:"Kursiv (Ctrl+I)", +underline_desc:"Understruken (Ctrl+U)", +striketrough_desc:"Genomstruken", +justifyleft_desc:"V\u00E4nsterst\u00E4lld", +justifycenter_desc:"Centrera", +justifyright_desc:"H\u00F6gerst\u00E4lld", +justifyfull_desc:"Justera", +bullist_desc:"Punktlista", +numlist_desc:"Nummerlista", +outdent_desc:"Drag tillbaka", +indent_desc:"Indrag", +undo_desc:"\u00C5ngra (Ctrl+Z)", +redo_desc:"G\u00F6r om (Ctrl+Y)", +link_desc:"Infoga/redigera l\u00E4nk", +unlink_desc:"Ta bort l\u00E4nk", +image_desc:"Infoga/redigera bild", +cleanup_desc:"St\u00E4da upp i k\u00E4llkoden", +code_desc:"Redigera HTML k\u00E4llkoden", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Infoga horisontell skiljelinje", +removeformat_desc:"Ta bort formatering", +forecolor_desc:"V\u00E4lj textf\u00E4rg", +backcolor_desc:"V\u00E4lj bakgrundsf\u00E4rg", +charmap_desc:"Infoga specialtecken", +visualaid_desc:"Visa/d\u00F6lj visuella hj\u00E4lpmedel", +anchor_desc:"Infoga/redigera bokm\u00E4rke", +cut_desc:"Klipp ut", +copy_desc:"Kopiera", +paste_desc:"Klistra in", +image_props_desc:"Bildinst\u00E4llningar", +newdocument_desc:"Nytt dokument", +help_desc:"Hj\u00E4lp", +blockquote_desc:"Blockcitat", +clipboard_msg:"Kopiera/klipp ut/klistra in \u00E4r inte tillg\u00E4ngligt i din webbl\u00E4sare.\nVill du veta mer om detta?", +path:"Element", +newdocument:"\u00C4r du s\u00E4ker p\u00E5 att du vill radera allt inneh\u00E5ll?", +toolbar_focus:"Hoppa till verktygsf\u00E4ltet - Alt+Q, Hoppa till redigeraren - Alt-Z, Hoppa till element listan - Alt-X" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/se_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/se_dlg.js new file mode 100644 index 00000000..824f6b36 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/se_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('se.advanced_dlg',{ +about_title:"Om TinyMCE", +about_general:"Om", +about_help:"Hj\u00E4lp", +about_license:"Licens", +about_plugins:"Om plug-in", +about_plugin:"Om plug-in", +about_author:"Utvecklare", +about_version:"Version", +about_loaded:"Laddade plug-ins", +anchor_title:"Infoga/redigera bokm\u00E4rke", +anchor_name:"Namn", +code_title:"HTML k\u00E4llkodsl\u00E4ge", +code_wordwrap:"Bryt ord", +colorpicker_title:"V\u00E4lj en f\u00E4rg", +colorpicker_picker_tab:"V\u00E4ljare", +colorpicker_picker_title:"F\u00E4rgv\u00E4ljare", +colorpicker_palette_tab:"Palett", +colorpicker_palette_title:"Palettf\u00E4rger", +colorpicker_named_tab:"Namngivna", +colorpicker_named_title:"Namngivna f\u00E4rger", +colorpicker_color:"F\u00E4rg:", +colorpicker_name:"Namn:", +charmap_title:"V\u00E4lj ett specialtecken", +image_title:"Infoga/redigera bild", +image_src:"Bildens URL", +image_alt:"Bildens beskrivning", +image_list:"Bildlista", +image_border:"Ram", +image_dimensions:"Dimensioner", +image_vspace:"Vertikalrymd", +image_hspace:"Horisontalrymd", +image_align:"Justering", +image_align_baseline:"Baslinje", +image_align_top:"Toppen", +image_align_middle:"Mitten", +image_align_bottom:"Botten", +image_align_texttop:"Toppen av texten", +image_align_textbottom:"Botten av texten", +image_align_left:"H\u00F6ger", +image_align_right:"V\u00E4nster", +link_title:"Infoga/redigera l\u00E4nk", +link_url:"L\u00E4nkens URL", +link_target:"M\u00E5l", +link_target_same:"\u00D6ppna l\u00E4nken i samma f\u00F6nster", +link_target_blank:"\u00D6ppna l\u00E4nken i ett nytt f\u00F6nster", +link_titlefield:"Titel", +link_is_email:"L\u00E4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00E5 l\u00E4nken?", +link_is_external:"L\u00E4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00E5 l\u00E4nken?", +link_list:"L\u00E4nklista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/si.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/si.js new file mode 100644 index 00000000..521323f9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/si.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('si.advanced',{ +style_select:"Styles", +font_size:"Font size", +fontdefault:"Font family", +block:"Format", +paragraph:"Paragraph", +div:"Div", +address:"Address", +pre:"Preformatted", +h1:"Heading 1", +h2:"Heading 2", +h3:"Heading 3", +h4:"Heading 4", +h5:"Heading 5", +h6:"Heading 6", +blockquote:"Blockquote", +code:"Code", +samp:"Code sample", +dt:"Definition term ", +dd:"Definition description", +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +justifyleft_desc:"Align left", +justifycenter_desc:"Align center", +justifyright_desc:"Align right", +justifyfull_desc:"Align full", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +outdent_desc:"Outdent", +indent_desc:"Indent", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +link_desc:"Insert/edit link", +unlink_desc:"Unlink", +image_desc:"Insert/edit image", +cleanup_desc:"Cleanup messy code", +code_desc:"Edit HTML Source", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Insert horizontal ruler", +removeformat_desc:"Remove formatting", +custom1_desc:"Your custom description here", +forecolor_desc:"Select text color", +backcolor_desc:"Select background color", +charmap_desc:"Insert custom character", +visualaid_desc:"Toggle guidelines/invisible elements", +anchor_desc:"Insert/edit anchor", +cut_desc:"Cut", +copy_desc:"Copy", +paste_desc:"Paste", +image_props_desc:"Image properties", +newdocument_desc:"New document", +help_desc:"Help", +blockquote_desc:"Blockquote", +clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?", +path:"Path", +newdocument:"Are you sure you want clear all contents?", +toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", +more_colors:"More colors" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/si_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/si_dlg.js new file mode 100644 index 00000000..73687557 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/si_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('si.advanced_dlg',{ +about_title:"About TinyMCE", +about_general:"About", +about_help:"Help", +about_license:"License", +about_plugins:"Plugins", +about_plugin:"Plugin", +about_author:"Author", +about_version:"Version", +about_loaded:"Loaded plugins", +anchor_title:"Insert/edit anchor", +anchor_name:"Anchor name", +code_title:"HTML Source Editor", +code_wordwrap:"Word wrap", +colorpicker_title:"Select a color", +colorpicker_picker_tab:"Picker", +colorpicker_picker_title:"Color picker", +colorpicker_palette_tab:"Palette", +colorpicker_palette_title:"Palette colors", +colorpicker_named_tab:"Named", +colorpicker_named_title:"Named colors", +colorpicker_color:"Color:", +colorpicker_name:"Name:", +charmap_title:"Select custom character", +image_title:"Insert/edit image", +image_src:"Image URL", +image_alt:"Image description", +image_list:"Image list", +image_border:"Border", +image_dimensions:"Dimensions", +image_vspace:"Vertical space", +image_hspace:"Horizontal space", +image_align:"Alignment", +image_align_baseline:"Baseline", +image_align_top:"Top", +image_align_middle:"Middle", +image_align_bottom:"Bottom", +image_align_texttop:"Text top", +image_align_textbottom:"Text bottom", +image_align_left:"Left", +image_align_right:"Right", +link_title:"Insert/edit link", +link_url:"Link URL", +link_target:"Target", +link_target_same:"Open link in the same window", +link_target_blank:"Open link in a new window", +link_titlefield:"Title", +link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", +link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", +link_list:"Link list" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sk.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sk.js new file mode 100644 index 00000000..7449da8e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sk.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('sk.advanced',{ +style_select:"- \u0160t\u00FDly -", +font_size:"- Ve\u013Ekos\u0165 p\u00EDsma -", +fontdefault:"- Typ p\u00EDsma -", +block:"- Form\u00E1t -", +paragraph:"Odstavec [p]", +div:"Div", +address:"Adresa [address]", +pre:"Predform\u00E1t [pre]", +h1:"Nadpis 1 [h1]", +h2:"Nadpis 2 [h2]", +h3:"Nadpis 3 [h3]", +h4:"Nadpis 4 [h4]", +h5:"Nadpis 5 [h5]", +h6:"Nadpis 6 [h6]", +blockquote:"Odsadenie", +code:"K\u00F3d", +samp:"Uk\u00E1\u017Eka k\u00F3du", +dt:"Defin\u00EDcia podmienky", +dd:"Defin\u00EDcia popisu", +bold_desc:"Tu\u010Dn\u00FD text (Ctrl+B)", +italic_desc:"\u0160ikm\u00FD text (kurziv\u00E1) (Ctrl+I)", +underline_desc:"Pod\u010Diarknut\u00FD text (Ctrl+U)", +striketrough_desc:"Pre\u0161krtnut\u00FD text", +justifyleft_desc:"Zarovna\u0165 v\u013Eavo", +justifycenter_desc:"Zarovna\u0165 na stred", +justifyright_desc:"Zarovna\u0165 vpravo", +justifyfull_desc:"Zarovna\u0165 do bloku", +bullist_desc:"Zoznam s odr\u00E1\u017Ekami", +numlist_desc:"\u010C\u00EDslovan\u00FD zoznam", +outdent_desc:"Zmen\u0161i\u0165 odsadenie", +indent_desc:"Zv\u00E4\u010D\u0161i\u0165 odsadenie", +undo_desc:"Sp\u00E4\u0165 (Ctrl+Z)", +redo_desc:"Znovu (Ctrl+Y)", +link_desc:"Vlo\u017Ei\u0165/upravi\u0165 odkaz", +unlink_desc:"Zru\u0161i\u0165 odkaz", +image_desc:"Vlo\u017Ei\u0165/upravi\u0165 obr\u00E1zok", +cleanup_desc:"Vy\u010Disti\u0165 neusporiadan\u00FD k\u00F3d", +code_desc:"Zobrazi\u0165 HTML zdroj", +sub_desc:"Doln\u00FD index", +sup_desc:"Horn\u00FD index", +hr_desc:"Vlo\u017Ei\u0165 vodorovn\u00FD odde\u013Eova\u010D", +removeformat_desc:"Odstr\u00E1ni\u0165 form\u00E1tovanie", +custom1_desc:"\u013Dubovoln\u00FD popisok", +forecolor_desc:"Vyber farbu textu", +backcolor_desc:"Vyber farbu pozadia", +charmap_desc:"Vlo\u017Ei\u0165 vlastn\u00FD znak", +visualaid_desc:"Zobrazi\u0165 pomocn\u00E9/skryt\u00E9 prvky", +anchor_desc:"Vlo\u017Ei\u0165/upravi\u0165 n\u00E1zov kotvy", +cut_desc:"Vystrihn\u00FA\u0165", +copy_desc:"Kop\u00EDrova\u0165", +paste_desc:"Vlo\u017Ei\u0165", +image_props_desc:"Vlastnosti obr\u00E1zka", +newdocument_desc:"Nov\u00FD dokument", +help_desc:"N\u00E1poveda", +blockquote_desc:"Citovan\u00FD text", +clipboard_msg:"Funkcie Kop\u00EDrova\u0165/vysrihn\u00FA\u0165/vlo\u017Ei\u0165 nie su podporovan\u00E9 prehliada\u010Dmi Mozilla a Firefox. Chce\u0161 viac inform\u00E1ci\u00ED o tomto probl\u00E9me?", +path:"Cesta", +newdocument:"Naozaj chce\u0161 vy\u010Disti\u0165 v\u0161etok obsah?", +toolbar_focus:"Prejdi na n\u00E1strojov\u00E9 tla\u010Didl\u00E1 - Alt+Q, Prejdi na editor - Alt-Z, Prejdi na cestu elementov - Alt-X", +more_colors:"Viac farieb" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sk_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sk_dlg.js new file mode 100644 index 00000000..f381c51f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sk_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('sk.advanced_dlg',{ +about_title:"O TinyMCE", +about_general:"O Programe", +about_help:"N\u00E1poveda", +about_license:"Licencia", +about_plugins:"Pluginy", +about_plugin:"Plugin", +about_author:"Autor", +about_version:"Verzia", +about_loaded:"Na\u010D\u00EDtan\u00E9 pluginy", +anchor_title:"Vlo\u017Ei\u0165/upravi\u0165 n\u00E1zov kotvy", +anchor_name:"N\u00E1zov kotvy", +code_title:"Editor HTML k\u00F3du", +code_wordwrap:"Zalamova\u0165 riadky", +colorpicker_title:"Vyber farbu", +colorpicker_picker_tab:"Mie\u0161a\u010D", +colorpicker_picker_title:"Mie\u0161a\u010D farieb", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta farieb", +colorpicker_named_tab:"N\u00E1zvoslovia", +colorpicker_named_title:"N\u00E1zvy farieb", +colorpicker_color:"Farba:", +colorpicker_name:"N\u00E1zov:", +charmap_title:"Vyber \u0161peci\u00E1lny znak", +image_title:"Vlo\u017Ei\u0165/editova\u0165 obr\u00E1zok", +image_src:"URL obr\u00E1zka", +image_alt:"Popis obr\u00E1zka", +image_list:"Zoznam obr\u00E1zkov", +image_border:"Okraj", +image_dimensions:"Rozmery", +image_vspace:"Vertik\u00E1lna medzera", +image_hspace:"Horizont\u00E1lna medzera", +image_align:"Usporiadanie", +image_align_baseline:"Z\u00E1klad\u0148a", +image_align_top:"Hore", +image_align_middle:"Uprostred", +image_align_bottom:"Dolu", +image_align_texttop:"Text hore", +image_align_textbottom:"Text dolu", +image_align_left:"V\u013Eavo", +image_align_right:"Vpravo", +link_title:"Vlo\u017Ei\u0165/editova\u0165 odkaz", +link_url:"URL odkazu", +link_target:"Cie\u013E odkazu", +link_target_same:"Otvori\u0165 odkaz v rovnakom okne", +link_target_blank:"Otvori\u0165 odkaz v novom okne", +link_titlefield:"N\u00E1zov", +link_is_email:"Zd\u00E1 sa, \u017Ee zadan\u00E1 URL je emailov\u00E1 adresa. Chce\u0161 vlo\u017Ei\u0165 povinn\u00FD prefix mailto: ?", +link_is_external:"Zd\u00E1 sa, \u017Ee zadan\u00E1 URL je extern\u00FD odkaz. Chce\u0161 vlo\u017Ei\u0165 povinn\u00FD prefix http:// ?", +link_list:"Zoznam odkazov" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sl.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sl.js new file mode 100644 index 00000000..5f70f055 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sl.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('sl.advanced',{ +style_select:"Izberite slog", +font_size:"Velikost pisave", +fontdefault:"Dru\u017Eina pisave", +block:"oblika", +paragraph:"odstavek", +div:"blok", +address:"naslov", +pre:"predoblikovano", +h1:"naslov 1", +h2:"naslov 2", +h3:"naslov 3", +h4:"naslov 4", +h5:"naslov 5", +h6:"naslov 6", +blockquote:"citat", +code:"koda", +samp:"kodni zgled", +dt:"definicija - izraz", +dd:"definicija - opis", +bold_desc:"Krepko (Ctrl+B)", +italic_desc:"Po\u0161evno (Ctrl+I)", +underline_desc:"Pod\u010Drtano (Ctrl+U)", +striketrough_desc:"Pre\u010Drtano", +justifyleft_desc:"Poravnava levo", +justifycenter_desc:"Poravnava na sredino", +justifyright_desc:"Poravnava desno", +justifyfull_desc:"Polna poravnava", +bullist_desc:"Alineje", +numlist_desc:"Na\u0161tevanje", +outdent_desc:"Zamakni", +indent_desc:"Odmakni ven", +undo_desc:"Razveljavi (Ctrl+Z)", +redo_desc:"Uveljavi (Ctrl+Y)", +link_desc:"Vstavi/uredi povezavo", +unlink_desc:"Odstrani povezavo", +image_desc:"Vstavi/uredi sliko", +cleanup_desc:"Pre\u010Disti kodo", +code_desc:"Uredi kodo HTML", +sub_desc:"Podpisano", +sup_desc:"Nadpisano", +hr_desc:"Vstavi \u010Drto", +removeformat_desc:"Odstrani oblikovanje", +custom1_desc:"Opis tule", +forecolor_desc:"Izberite barvo pisave", +backcolor_desc:"Izberite barvo ozadja", +charmap_desc:"Vstavi posebni znak", +visualaid_desc:"Preklop prikaza vodil", +anchor_desc:"Vstavi/uredi sidro", +cut_desc:"Izre\u017Ei", +copy_desc:"Kopiraj", +paste_desc:"Prilepi", +image_props_desc:"Lastnosti slike", +newdocument_desc:"Nov dokument", +help_desc:"Pomo\u010D", +blockquote_desc:"Citat", +clipboard_msg:"Delo z odlo\u017Ei\u0161\u010Dem ni mogo\u010De v tem brskalniku. Lahko uporabljate kombinacije tipk Ctrl+X, Ctrl+C, Ctrl+V.\n\u017Delite ve\u010D informacij o tem?", +path:"Pot", +newdocument:"Ste prepri\u010Dani, da \u017Eelite odstraniti vsebino?", +toolbar_focus:"Preskok na orodjarno - Alt+Q, Preskok v urejevalnik - Alt-Z, Preskok na pot elementa - Alt-X", +more_colors:"Ve\u010D barv" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sl_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sl_dlg.js new file mode 100644 index 00000000..873857eb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sl_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('sl.advanced_dlg',{ +about_title:"O TinyMCE", +about_general:"Vizitka", +about_help:"Pomo\u010D", +about_license:"Licenca", +about_plugins:"Vsadki", +about_plugin:"Vsadek", +about_author:"Avtor", +about_version:"Verzija", +about_loaded:"Nalo\u017Eeni vsadki", +anchor_title:"Vstavi/uredi sidro", +anchor_name:"Ime sidra", +code_title:"Urejevalnik kode HTML", +code_wordwrap:"Prelomi vrstice", +colorpicker_title:"Izberite barvo", +colorpicker_picker_tab:"Izbor", +colorpicker_picker_title:"Izbor barve", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Barve palete", +colorpicker_named_tab:"Poimenovane", +colorpicker_named_title:"Poimenovane barve", +colorpicker_color:"Barva:", +colorpicker_name:"Ime:", +charmap_title:"Izberite posebni znak", +image_title:"Vstavi/uredi sliko", +image_src:"Naslov URL slike", +image_alt:"Opis slike", +image_list:"Seznam slik", +image_border:"Obroba", +image_dimensions:"Dimenzije", +image_vspace:"Prostor zg/sp", +image_hspace:"Prostor le/de", +image_align:"Poravnava", +image_align_baseline:"osnovna \u010Drta", +image_align_top:"vrh", +image_align_middle:"sredina", +image_align_bottom:"dno", +image_align_texttop:"vrh besedila", +image_align_textbottom:"dno besedila", +image_align_left:"levo, plavajo\u010De", +image_align_right:"desno, plavajo\u010De", +link_title:"Vstavi/uredi povezavo", +link_url:"Naslov URL", +link_target:"Ime cilja", +link_target_same:"odpri povezavo v istem oknu", +link_target_blank:"odpri povezavo v novem oknu", +link_titlefield:"Naslov", +link_is_email:"Vneseni naslov verjetno prestavlja e-naslov, \u017Eelite da dodam zahtevano predpono \'mailto:\'?", +link_is_external:"Vneseni naslov verjetno predstavlja zunanjo povezavo, \u017Eelite da dodam zahtevano predpono \'http://\'?", +link_list:"Seznam povezav" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sq.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sq.js new file mode 100644 index 00000000..a0619726 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sq.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('sq.advanced',{ +style_select:"Stilet", +font_size:"Madh\u00EBsia e tekstit", +fontdefault:"Familja e tekstit", +block:"Formati", +paragraph:"Paragraf", +div:"Div", +address:"Adres\u00EB", +pre:"Para formatuar", +h1:"Kok\u00EB 1", +h2:"Kok\u00EB 2", +h3:"Kok\u00EB 3", +h4:"Kok\u00EB 4", +h5:"Kok\u00EB 5", +h6:"Kok\u00EB 6", +blockquote:"Bllok", +code:"Kod", +samp:"Shembull kodi", +dt:"Terma e p\u00EBrcaktimit ", +dd:"P\u00EBrshkrimi i p\u00EBrcaktimit", +bold_desc:"I Trash\u00EB (Ctrl+B)", +italic_desc:"I Pjerr\u00EBt (Ctrl+I)", +underline_desc:"I N\u00EBnvizuar (Ctrl+U)", +striketrough_desc:"Vij\u00EB n\u00EB mes", +justifyleft_desc:"Drejtimi majtas", +justifycenter_desc:"Drejtimi qend\u00EBr", +justifyright_desc:"Drejtimi djathtas", +justifyfull_desc:"Drejtim i plot\u00EB", +bullist_desc:"List\u00EB e parregullt", +numlist_desc:"List\u00EB e rregullt", +outdent_desc:"Hiq kryerradh\u00EB", +indent_desc:"Vendos kryerradh\u00EB", +undo_desc:"\u00C7b\u00EBj (Ctrl+Z)", +redo_desc:"Rib\u00EBj (Ctrl+Y)", +link_desc:"Fut/edito lidhje", +unlink_desc:"Hiq lidhje", +image_desc:"Fut/edito foto", +cleanup_desc:"Pastro kodin", +code_desc:"Edito kodin HTML", +sub_desc:"N\u00EBn shkrim", +sup_desc:"Mbi shkrim", +hr_desc:"Fut linj\u00EB horizontale", +removeformat_desc:"Fshi formatimin", +custom1_desc:"P\u00EBshkrimi i personalizuar k\u00EBtu", +forecolor_desc:"Zgjidh ngjyr\u00EBn e tekstit", +backcolor_desc:"Zgjidh ngjyr\u00EBn e fush\u00EBs", +charmap_desc:"Fut karakter t\u00EB personalizuar", +visualaid_desc:"Shfaq/Fshih vijat ndihm\u00EBse dhe element\u00EBt e paduksh\u00EBm", +anchor_desc:"Fut/edito lidhje", +cut_desc:"Prit", +copy_desc:"Kopjo", +paste_desc:"Ngjit", +image_props_desc:"Opsionet e fotos", +newdocument_desc:"Dokument i Ri", +help_desc:"Ndihm\u00EB", +blockquote_desc:"Bllok", +clipboard_msg:"Kopja/Prerja/Ngjitja nuk suportohen n\u00EB Mozilla dhe Firefox.\nD\u00EBshironi m\u00EB shum\u00EB informacione p\u00EBr k\u00EBt\u00EB \u00E7\u00EBshtje?", +path:"Rruga", +newdocument:"Jeni t\u00EB sigurt q\u00EB doni t'a fshini p\u00EBrmbajtjen?", +toolbar_focus:"Shko tek butonat - Alt+Q, Shko tek editori - Alt+Z, Shko tek rruga e elementit - Alt+X", +more_colors:"M\u00EB shum\u00EB ngjyra" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sq_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sq_dlg.js new file mode 100644 index 00000000..1a77a86b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sq_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('sq.advanced_dlg',{ +about_title:"Rreth TinyMCE", +about_general:"Rreth", +about_help:"Ndihm\u00EB", +about_license:"Li\u00E7enca", +about_plugins:"Shtesa", +about_plugin:"Shtes\u00EB", +about_author:"Autori", +about_version:"Versioni", +about_loaded:"Shtesa t\u00EB ngarkuara", +anchor_title:"Fut/edito lidhje", +anchor_name:"Emri i lidhjes", +code_title:"Edituesi i kodit HTML", +code_wordwrap:"Word wrap", +colorpicker_title:"Zgjidh nj\u00EB ngjyr\u00EB", +colorpicker_picker_tab:"Zgjedh\u00EBsi", +colorpicker_picker_title:"Zgjedh\u00EBsi i ngjyr\u00EBs", +colorpicker_palette_tab:"Librari", +colorpicker_palette_title:"Ngjyrat e Libraris\u00EB", +colorpicker_named_tab:"Em\u00EBruar", +colorpicker_named_title:"Ngjyrat e em\u00EBruara", +colorpicker_color:"Ngjyra:", +colorpicker_name:"Emri:", +charmap_title:"Zgjidh karakter t\u00EB personalizuar", +image_title:"Fut/edio foto", +image_src:"URL e fotos", +image_alt:"P\u00EBrshkrimi i fotos", +image_list:"Lista e fotove", +image_border:"Korniza", +image_dimensions:"P\u00EBrmasat", +image_vspace:"Hap\u00EBsira Vertikale", +image_hspace:"Hap\u00EBsira Horizontale", +image_align:"Drejtimi", +image_align_baseline:"Vij\u00EB fundore", +image_align_top:"Krye", +image_align_middle:"Mes", +image_align_bottom:"Fund", +image_align_texttop:"N\u00EB krye t\u00EB tekstit", +image_align_textbottom:"N\u00EB fund t\u00EB tekstit", +image_align_left:"Majtas", +image_align_right:"Djathtas", +link_title:"Fut/edito lidhje", +link_url:"URL e lidhjes", +link_target:"Sh\u00EBnjestra", +link_target_same:"Hape lidhjen n\u00EB t\u00EB nj\u00EBjt\u00EBn dritare", +link_target_blank:"Hape lidhjen n\u00EB dritare t\u00EB re", +link_titlefield:"Titulli", +link_is_email:"Lidhja q\u00EB keni futur duket si adres\u00EB emaili. Doni t\u00EB shtoni prefiksin mailto:?", +link_is_external:"Lidhja q\u00EB keni futur duket si lidhje e jasht\u00EBme. Doni t\u00EB shtoni prefiksin http://?", +link_list:"Lista e lidhjeve" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sr.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sr.js new file mode 100644 index 00000000..f5c6347e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sr.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('sr.advanced',{ +style_select:"Stilovi", +font_size:"Veli\u010Dina pisma", +fontdefault:"Vrsta pisma", +block:"Format", +paragraph:"Paragraf", +div:"Div", +address:"Adresa", +pre:"Oblikovano", +h1:"Naslov 1", +h2:"Naslov 2", +h3:"Naslov 3", +h4:"Naslov 4", +h5:"Naslov 5", +h6:"Naslov 6", +blockquote:"Citat", +code:"Kod", +samp:"Primjer koda", +dt:"Definicija pojma", +dd:"Opis definicije", +bold_desc:"Podebljaj (Ctrl+B)", +italic_desc:"Kurziv (Ctrl+I)", +underline_desc:"Podcrtaj (Ctrl+U)", +striketrough_desc:"Precrtaj", +justifyleft_desc:"Poravnaj levo", +justifycenter_desc:"Centriraj", +justifyright_desc:"Poravnaj desno", +justifyfull_desc:"Poravnaj potpuno", +bullist_desc:"Neure\u0111ena lista", +numlist_desc:"Ure\u0111ena lista", +outdent_desc:"Uvuci", +indent_desc:"Izvuci", +undo_desc:"Poni\u0161ti (Ctrl+Z)", +redo_desc:"Ponovi (Ctrl+Y)", +link_desc:"Umetni/uredi poveznicu", +unlink_desc:"Poni\u0161ti poveznicu", +image_desc:"Umetni/uredi sliku", +cleanup_desc:"Po\u010Disti kod", +code_desc:"Uredi HTML izvor", +sub_desc:"Indeks", +sup_desc:"Eksponent", +hr_desc:"Umetni vodoravnu crtu", +removeformat_desc:"Poni\u0161ti oblikovanje", +custom1_desc:"Vlastiti opis ovdje", +forecolor_desc:"Odaberite boju teksta", +backcolor_desc:"Odaberite boju pozadine", +charmap_desc:"Umetni vlastiti znak", +visualaid_desc:"Vodilice/nevidljivi elementi", +anchor_desc:"Umetni/uredi sidro", +cut_desc:"Izre\u017Ei", +copy_desc:"Kopiraj", +paste_desc:"Zalepi", +image_props_desc:"Svojstva slike", +newdocument_desc:"Novi dokument", +help_desc:"Pomo\u0107", +blockquote_desc:"Citiraj", +clipboard_msg:"Kopiraj/Izre\u017Ei/Zalepi nije dostupno u Mozilla i Firefox preglednicima. Vi\u0161e informacija?", +path:"Staza", +newdocument:"Jeste li sigurni da \u017Eelite izbrisati celi sadr\u017Eaj?", +toolbar_focus:"Pre\u0111i na alatnu traku - Alt+Q, pre\u0111i na ure\u0111iva\u010D - Alt-Z, pre\u0111i na element path - Alt-X", +more_colors:"Vi\u0161e boja" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sr_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sr_dlg.js new file mode 100644 index 00000000..55332e03 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sr_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('sr.advanced_dlg',{ +about_title:"TinyMCE", +about_general:"O programu", +about_help:"Pomo\u0107", +about_license:"Licenca", +about_plugins:"Dodaci", +about_plugin:"Dodatak", +about_author:"Autor", +about_version:"Verzija", +about_loaded:"Postoje\u0107i dodaci", +anchor_title:"Umetni/uredi sidro", +anchor_name:"Ime sidra", +code_title:"HTML ure\u0111iva\u010D", +code_wordwrap:"Omatanje teksta", +colorpicker_title:"Izbor boje", +colorpicker_picker_tab:"Odabir", +colorpicker_picker_title:"Odabir boje", +colorpicker_palette_tab:"Paleta", +colorpicker_palette_title:"Paleta boja", +colorpicker_named_tab:"Imenovano", +colorpicker_named_title:"Imenovane boje", +colorpicker_color:"Boja:", +colorpicker_name:"Naziv:", +charmap_title:"Odaberite znak", +image_title:"Umetni/uredi sliku", +image_src:"URL slike", +image_alt:"Opis slike", +image_list:"Lista slika", +image_border:"Obrub", +image_dimensions:"Dimenzije", +image_vspace:"Okomiti razmak", +image_hspace:"Vodoravni razmak", +image_align:"Poravnavanje", +image_align_baseline:"Osnovna linija", +image_align_top:"Vrh", +image_align_middle:"Sredina", +image_align_bottom:"Dno", +image_align_texttop:"Vrh teksta", +image_align_textbottom:"Dno teksta", +image_align_left:"Levo", +image_align_right:"Desno", +link_title:"Umetni/uredi poveznicu", +link_url:"URL poveznice", +link_target:"Meta", +link_target_same:"Otvori poveznicu u istom prozoru", +link_target_blank:"Otvori poveznicu u novom prozoru", +link_titlefield:"Naslov", +link_is_email:"URL koji ste uneli izgleda kao e-mail adresa, \u017Eelite li dodati potrebni mailto: prefiks?", +link_is_external:"URL koji ste uneli izgleda kao vanjska poveznica, \u017Eelite li dodati potrebni http:// prefiks?", +link_list:"Lista poveznica" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sv.js new file mode 100644 index 00000000..daaf9c0f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sv.js @@ -0,0 +1,60 @@ +tinyMCE.addI18n('sv.advanced',{ +style_select:"Stilar", +font_size:"Fontstorlek", +fontdefault:"Fontfamilj", +block:"Format", +paragraph:"Paragraf", +div:"Div", +address:"Adress", +pre:"F\u00F6rformaterad", +h1:"Rubrik 1", +h2:"Rubrik 2", +h3:"Rubrik 3", +h4:"Rubrik 4", +h5:"Rubrik 5", +h6:"Rubrik 6", +blockquote:"Blockcitat", +code:"Kodblock", +samp:"Kodexempel", +dt:"Definitionsterm", +dd:"Definitionsbeskrivning", +bold_desc:"Fet (Ctrl+B)", +italic_desc:"Kursiv (Ctrl+I)", +underline_desc:"Understruken (Ctrl+U)", +striketrough_desc:"Genomstruken", +justifyleft_desc:"V\u00E4nsterst\u00E4lld", +justifycenter_desc:"Centrera", +justifyright_desc:"H\u00F6gerst\u00E4lld", +justifyfull_desc:"Justera", +bullist_desc:"Punktlista", +numlist_desc:"Nummerlista", +outdent_desc:"Drag tillbaka", +indent_desc:"Indrag", +undo_desc:"\u00C5ngra (Ctrl+Z)", +redo_desc:"G\u00F6r om (Ctrl+Y)", +link_desc:"Infoga/redigera l\u00E4nk", +unlink_desc:"Ta bort l\u00E4nk", +image_desc:"Infoga/redigera bild", +cleanup_desc:"St\u00E4da upp i k\u00E4llkoden", +code_desc:"Redigera HTML k\u00E4llkoden", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Infoga horisontell skiljelinje", +removeformat_desc:"Ta bort formatering", +forecolor_desc:"V\u00E4lj textf\u00E4rg", +backcolor_desc:"V\u00E4lj bakgrundsf\u00E4rg", +charmap_desc:"Infoga specialtecken", +visualaid_desc:"Visa/d\u00F6lj visuella hj\u00E4lpmedel", +anchor_desc:"Infoga/redigera bokm\u00E4rke", +cut_desc:"Klipp ut", +copy_desc:"Kopiera", +paste_desc:"Klistra in", +image_props_desc:"Bildinst\u00E4llningar", +newdocument_desc:"Nytt dokument", +help_desc:"Hj\u00E4lp", +blockquote_desc:"Blockcitat", +clipboard_msg:"Kopiera/klipp ut/klistra in \u00E4r inte tillg\u00E4ngligt i din webbl\u00E4sare.\nVill du veta mer om detta?", +path:"Element", +newdocument:"\u00C4r du s\u00E4ker p\u00E5 att du vill radera allt inneh\u00E5ll?", +toolbar_focus:"Hoppa till verktygsf\u00E4ltet - Alt+Q, Hoppa till redigeraren - Alt-Z, Hoppa till element listan - Alt-X" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sv_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sv_dlg.js new file mode 100644 index 00000000..a9b93de4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/sv_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('sv.advanced_dlg',{ +about_title:"Om TinyMCE", +about_general:"Om", +about_help:"Hj\u00E4lp", +about_license:"Licens", +about_plugins:"Om plug-in", +about_plugin:"Om plug-in", +about_author:"Utvecklare", +about_version:"Version", +about_loaded:"Laddade plug-ins", +anchor_title:"Infoga/redigera bokm\u00E4rke", +anchor_name:"Namn", +code_title:"HTML k\u00E4llkodsl\u00E4ge", +code_wordwrap:"Bryt ord", +colorpicker_title:"V\u00E4lj en f\u00E4rg", +colorpicker_picker_tab:"V\u00E4ljare", +colorpicker_picker_title:"F\u00E4rgv\u00E4ljare", +colorpicker_palette_tab:"Palett", +colorpicker_palette_title:"Palettf\u00E4rger", +colorpicker_named_tab:"Namngivna", +colorpicker_named_title:"Namngivna f\u00E4rger", +colorpicker_color:"F\u00E4rg:", +colorpicker_name:"Namn:", +charmap_title:"V\u00E4lj ett specialtecken", +image_title:"Infoga/redigera bild", +image_src:"Bildens URL", +image_alt:"Bildens beskrivning", +image_list:"Bildlista", +image_border:"Ram", +image_dimensions:"Dimensioner", +image_vspace:"Vertikalrymd", +image_hspace:"Horisontalrymd", +image_align:"Justering", +image_align_baseline:"Baslinje", +image_align_top:"Toppen", +image_align_middle:"Mitten", +image_align_bottom:"Botten", +image_align_texttop:"Toppen av texten", +image_align_textbottom:"Botten av texten", +image_align_left:"V\u00E4nster", +image_align_right:"H\u00F6ger", +link_title:"Infoga/redigera l\u00E4nk", +link_url:"L\u00E4nkens URL", +link_target:"M\u00E5l", +link_target_same:"\u00D6ppna l\u00E4nken i samma f\u00F6nster", +link_target_blank:"\u00D6ppna l\u00E4nken i ett nytt f\u00F6nster", +link_titlefield:"Titel", +link_is_email:"L\u00E4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00E5 l\u00E4nken?", +link_is_external:"L\u00E4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00E5 l\u00E4nken?", +link_list:"L\u00E4nklista" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tr.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tr.js new file mode 100644 index 00000000..f89bc327 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tr.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('tr.advanced',{ +style_select:"Stiller", +font_size:"Yaz\u0131 boyutu", +fontdefault:"Yaz\u0131 tipi", +block:"Bi\u00E7im", +paragraph:"Paragraf", +div:"B\u00F6l\u00FCm", +address:"Adres", +pre:"\u00D6nformatl\u0131", +h1:"Ba\u015Fl\u0131k 1", +h2:"Ba\u015Fl\u0131k 2", +h3:"Ba\u015Fl\u0131k 3", +h4:"Ba\u015Fl\u0131k 4", +h5:"Ba\u015Fl\u0131k 5", +h6:"Ba\u015Fl\u0131k 6", +blockquote:"Al\u0131nt\u0131", +code:"Kod", +samp:"Kod \u00F6rne\u011Fi", +dt:"Tan\u0131m terimi ", +dd:"Tan\u0131m a\u00E7\u0131klamas\u0131", +bold_desc:"Kal\u0131n (Ctrl+B)", +italic_desc:"E\u011Fik (Ctrl+I)", +underline_desc:"Alt\u0131 \u00E7izgili (Ctrl+U)", +striketrough_desc:"Ortas\u0131 \u00E7izgili", +justifyleft_desc:"Sola yasla", +justifycenter_desc:"Ortala", +justifyright_desc:"Sa\u011Fa yasla", +justifyfull_desc:"\u0130ki yana yasla", +bullist_desc:"S\u0131ras\u0131z liste", +numlist_desc:"S\u0131ral\u0131 liste", +outdent_desc:"D\u0131\u015Fa kayd\u0131r", +indent_desc:"\u0130\u00E7e kayd\u0131r", +undo_desc:"Geri al (Ctrl+Z)", +redo_desc:"Tekrarla (Ctrl+Y)", +link_desc:"Ba\u011Flant\u0131 ekle/d\u00FCzenle", +unlink_desc:"Ba\u011Flant\u0131y\u0131 sil", +image_desc:"Resim ekle/d\u00FCzenle", +cleanup_desc:"Da\u011F\u0131n\u0131k kodu temizle", +code_desc:"HTML Kayna\u011F\u0131n\u0131 D\u00FCzenle", +sub_desc:"Altsimge", +sup_desc:"\u00DCstsimge", +hr_desc:"Yatay \u00E7izgi ekle", +removeformat_desc:"Bi\u00E7imi kald\u0131r", +custom1_desc:"\u00D6zel a\u00E7\u0131klaman\u0131z\u0131 buraya girin", +forecolor_desc:"Metin rengi se\u00E7", +backcolor_desc:"Arkaplan rengi se\u00E7", +charmap_desc:"\u00D6zel karakter ekle", +visualaid_desc:"Y\u00F6nergeleri ve g\u00F6r\u00FCnmez elemanlar\u0131 a\u00E7/kapa", +anchor_desc:"\u00C7engel noktas\u0131 ekle", +cut_desc:"Kes", +copy_desc:"Kopyala", +paste_desc:"Yap\u0131\u015Ft\u0131r", +image_props_desc:"Resim \u00F6zellikleri", +newdocument_desc:"Yeni belge", +help_desc:"Yard\u0131m", +blockquote_desc:"Al\u0131nt\u0131", +clipboard_msg:"Kopyala/Kes/Yap\u0131\u015Ft\u0131r Mozilla ve Firefox'ta kullan\u0131lamaz.\r\nBu konuda daha fazla bilgi edinmek ister misiniz?", +path:"Yol", +newdocument:"T\u00FCm i\u00E7eri\u011Fi bo\u015Faltmak istedinizden emin misiniz?", +toolbar_focus:"Ara\u00E7 d\u00FC\u011Fmelerine atla - Alt+Q, Edit\u00F6re atla - Alt-Z, Eleman yoluna atla - Alt-X", +more_colors:"Daha fazla renk" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tr_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tr_dlg.js new file mode 100644 index 00000000..6bec44a3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tr_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('tr.advanced_dlg',{ +about_title:"TinyMCE Hakk\u0131nda", +about_general:"Hakk\u0131nda", +about_help:"Yard\u0131m", +about_license:"Lisans", +about_plugins:"Eklentiler", +about_plugin:"Eklenti", +about_author:"Yazar", +about_version:"S\u00FCr\u00FCm", +about_loaded:"Y\u00FCkl\u00FC eklentiler", +anchor_title:"\u00C7engel noktas\u0131 ekle/d\u00FCzenle", +anchor_name:"\u00C7engel noktas\u0131 ad\u0131", +code_title:"HTML Kaynak Edit\u00F6r\u00FC", +code_wordwrap:"S\u00F6zc\u00FCk kayd\u0131r", +colorpicker_title:"Bir renk se\u00E7", +colorpicker_picker_tab:"Se\u00E7ici", +colorpicker_picker_title:"Renk se\u00E7ici", +colorpicker_palette_tab:"Palet", +colorpicker_palette_title:"Palet renkleri", +colorpicker_named_tab:"\u0130simli", +colorpicker_named_title:"\u0130simli renkler", +colorpicker_color:"Renk:", +colorpicker_name:"\u0130sim:", +charmap_title:"\u00D6zel karakter se\u00E7", +image_title:"Resim ekle/d\u00FCzenle", +image_src:"Resim URL", +image_alt:"Resim tan\u0131m\u0131", +image_list:"Resim listesi", +image_border:"Kenarl\u0131k", +image_dimensions:"Boyutlar", +image_vspace:"Dikey bo\u015Fluk", +image_hspace:"Yatay bo\u015Fluk", +image_align:"Hizalama", +image_align_baseline:"Taban \u00E7izgisi", +image_align_top:"\u00DCst", +image_align_middle:"Orta", +image_align_bottom:"Alt", +image_align_texttop:"Metin \u00FCstte", +image_align_textbottom:"Metin altta", +image_align_left:"Sola", +image_align_right:"Sa\u011Fa", +link_title:"Ba\u011Flant\u0131 ekle/d\u00FCzenle", +link_url:"Ba\u011Flant\u0131 URL", +link_target:"Hedef", +link_target_same:"Ba\u011Flant\u0131y\u0131 ayn\u0131 pencerede a\u00E7", +link_target_blank:"Ba\u011Flant\u0131y\u0131 yeni pencerede a\u00E7", +link_titlefield:"Ba\u015Fl\u0131k", +link_is_email:"Girdi\u011Finiz URL bir e-posta adresi gibi g\u00F6z\u00FCk\u00FCyor, gerekli olan mailto: \u00F6nekinin eklenmesini ister misiniz?", +link_is_external:"Girdi\u011Finiz URL d\u0131\u015F bir ba\u011Flant\u0131 gibi g\u00F6z\u00FCk\u00FCyor, gerekli olan http:// \u00F6nekinin eklenmesini ister misiniz?", +link_list:"Ba\u011Flant\u0131 listesi" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tt.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tt.js new file mode 100644 index 00000000..acafccdb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tt.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('tt.advanced',{ +style_select:"\u6A23\u5F0F", +font_size:"\u5B57\u9AD4\u5927\u5C0F", +fontdefault:"\u5B57\u9AD4", +block:"\u683C\u5F0F", +paragraph:"\u6BB5\u843D", +div:"Div", +address:"\u5730\u5740", +pre:"\u9810\u8A2D\u683C\u5F0F", +h1:"\u6A19\u984C 1", +h2:"\u6A19\u984C 2", +h3:"\u6A19\u984C 3", +h4:"\u6A19\u984C 4", +h5:"\u6A19\u984C 5", +h6:"\u6A19\u984C 6", +blockquote:"\u5F15\u7528", +code:"\u4EE3\u78BC", +samp:"\u7A0B\u5F0F\u7BC4\u4F8B", +dt:"\u540D\u8A5E\u5B9A\u7FA9", +dd:"\u540D\u8A5E\u89E3\u91CB", +bold_desc:"\u7C97\u9AD4 (Ctrl+B)", +italic_desc:"\u659C\u9AD4 (Ctrl+I)", +underline_desc:"\u5E95\u7DDA (Ctrl+U)", +striketrough_desc:"\u4E2D\u5283\u7DDA", +justifyleft_desc:"\u9760\u5DE6\u5C0D\u9F4A", +justifycenter_desc:"\u7F6E\u4E2D", +justifyright_desc:"\u9760\u53F3\u5C0D\u9F4A", +justifyfull_desc:"\u5169\u7AEF\u5C0D\u9F4A", +bullist_desc:"\u6E05\u55AE\u7B26\u865F", +numlist_desc:"\u7DE8\u865F", +outdent_desc:"\u6E1B\u5C11\u7E2E\u6392", +indent_desc:"\u589E\u52A0\u7E2E\u6392", +undo_desc:"\u53D6\u6D88\u8B8A\u66F4 (Ctrl+Z)", +redo_desc:"\u91CD\u4F5C\u8B8A\u66F4 (Ctrl+Y)", +link_desc:"\u63D2\u5165/\u7DE8\u8F2F \u9023\u7D50", +unlink_desc:"\u53D6\u6D88\u9023\u7D50", +image_desc:"\u63D2\u5165/\u7DE8\u8F2F \u5716\u7247", +cleanup_desc:"\u6E05\u9664\u5167\u5BB9", +code_desc:"\u7DE8\u8F2F HTML \u539F\u59CB\u7A0B\u5F0F\u78BC", +sub_desc:"\u4E0B\u6A19", +sup_desc:"\u4E0A\u6A19", +hr_desc:"\u63D2\u5165\u6C34\u5E73\u7DDA", +removeformat_desc:"\u6E05\u9664\u6A23\u5F0F", +custom1_desc:"\u5728\u6B64\u8F38\u5165\u60A8\u7684\u81EA\u8A02\u63CF\u8FF0", +forecolor_desc:"\u9078\u64C7\u6587\u5B57\u9854\u8272", +backcolor_desc:"\u9078\u64C7\u80CC\u666F\u9854\u8272", +charmap_desc:"\u63D2\u5165\u7279\u6B8A\u7B26\u865F", +visualaid_desc:"\u7DB2\u683C/\u96B1\u85CF\u5143\u4EF6\uFF1F", +anchor_desc:"\u63D2\u5165/\u7DE8\u8F2F \u9328\u9EDE", +cut_desc:"\u526A\u4E0B (Ctrl+X)", +copy_desc:"\u8907\u88FD (Ctrl+C)", +paste_desc:"\u8CBC\u4E0A (Ctrl+V)", +image_props_desc:"\u5716\u7247\u5C6C\u6027", +newdocument_desc:"\u65B0\u589E\u6587\u4EF6", +help_desc:"\u8AAA\u660E", +blockquote_desc:"\u5F15\u7528", +clipboard_msg:"\u8907\u88FD\u3001\u526A\u4E0B\u548C\u8CBC\u4E0A\u529F\u80FD\u5728Mozilla \u548C Firefox\u4E2D\u7121\u6CD5\u4F7F\u7528", +path:"\u8DEF\u5F91", +newdocument:"\u60A8\u78BA\u8A8D\u8981\u522A\u9664\u5168\u90E8\u5167\u5BB9\u55CE\uFF1F", +toolbar_focus:"\u5DE5\u5177\u5217 - Alt+Q, \u7DE8\u8F2F\u5668 - Alt-Z, \u5143\u4EF6\u8DEF\u5F91 - Alt-X", +more_colors:"\u66F4\u591A\u9854\u8272" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tt_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tt_dlg.js new file mode 100644 index 00000000..2345421b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tt_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('tt.advanced_dlg',{ +about_title:"\u95DC\u65BC TinyMCE", +about_general:"\u95DC\u65BC", +about_help:"\u8AAA\u660E", +about_license:"\u6388\u6B0A", +about_plugins:"\u5168\u90E8\u5916\u639B\u7A0B\u5F0F", +about_plugin:"\u5916\u639B\u7A0B\u5F0F", +about_author:"\u4F5C\u8005", +about_version:"\u7248\u672C", +about_loaded:"\u5DF2\u8F09\u5165\u7684\u5916\u639B\u7A0B\u5F0F", +anchor_title:"\u63D2\u5165/\u7DE8\u8F2F \u9328\u9EDE", +anchor_name:"\u9328\u9EDE\u540D\u7A31", +code_title:"HTML \u539F\u59CB\u7A0B\u5F0F\u78BC\u7DE8\u8F2F\u5668", +code_wordwrap:"\u81EA\u52D5\u63DB\u884C", +colorpicker_title:"\u9078\u64C7\u9854\u8272", +colorpicker_picker_tab:"\u9078\u64C7\u5668", +colorpicker_picker_title:"\u53D6\u8272\u5668", +colorpicker_palette_tab:"\u8272\u8B5C", +colorpicker_palette_title:"\u8272\u8B5C\u9854\u8272", +colorpicker_named_tab:"\u9810\u8A2D\u503C", +colorpicker_named_title:"\u9810\u8A2D\u7684\u9854\u8272", +colorpicker_color:"\u9854\u8272:", +colorpicker_name:"\u8272\u540D:", +charmap_title:"\u63D2\u5165\u7279\u6B8A\u7B26\u865F", +image_title:"\u63D2\u5165/\u7DE8\u8F2F \u5716\u7247", +image_src:"\u5716\u7247\u7DB2\u5740", +image_alt:"\u5716\u7247\u8AAA\u660E", +image_list:"\u5716\u7247\u6E05\u55AE", +image_border:"\u908A\u6846", +image_dimensions:"\u5C3A\u5BF8", +image_vspace:"\u5782\u76F4\u9593\u8DDD", +image_hspace:"\u6C34\u5E73\u9593\u8DDD", +image_align:"\u5C0D\u9F4A\u65B9\u5F0F", +image_align_baseline:"\u57FA\u7DDA", +image_align_top:"\u9802\u90E8\u5C0D\u9F4A", +image_align_middle:"\u4E2D\u90E8\u5C0D\u9F4A", +image_align_bottom:"\u5E95\u90E8\u5C0D\u9F4A", +image_align_texttop:"\u6587\u5B57\u4E0A\u65B9", +image_align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +image_align_left:"\u9760\u5DE6\u5C0D\u9F4A", +image_align_right:"\u9760\u53F3\u5C0D\u9F4A", +link_title:"\u63D2\u5165/\u7DE8\u8F2F \u9023\u7D50", +link_url:"\u9023\u7D50\u7DB2\u5740", +link_target:"\u76EE\u6A19", +link_target_same:"\u7576\u524D\u7A97\u53E3\u6253\u958B", +link_target_blank:"\u65B0\u7A97\u53E3\u6253\u958B", +link_titlefield:"\u6A19\u984C", +link_is_email:"\u60A8\u8F38\u5165\u7684\u61C9\u8A72\u662F\u4E00\u500B\u96FB\u5B50\u90F5\u4EF6\u5730\u5740\uFF0C\u662F\u5426\u9700\u8981\u5728\u7DB2\u5740\u524D\u52A0\u4E0A mailto: ? ", +link_is_external:"\u60A8\u8F38\u5165\u7684\u7DB2\u5740\u61C9\u8A72\u662F\u4E00\u500B\u5916\u90E8\u9023\u7D50\uFF0C\u662F\u5426\u9700\u8981\u5728\u7DB2\u5740\u524D\u52A0\u4E0A http:// ?", +link_list:"\u9023\u7D50\u6E05\u55AE" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tw.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tw.js new file mode 100644 index 00000000..aa670da9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tw.js @@ -0,0 +1,64 @@ +tinyMCE.addI18n('tw.advanced',{ +style_select:"\u6A23\u5F0F", +font_size:"\u5B57\u9AD4\u5927\u5C0F", +fontdefault:"\u5B57\u9AD4", +block:"\u683C\u5F0F", +paragraph:"\u6BB5\u843D", +div:"DIV\u5C64", +address:"\u5730\u5740", +pre:"\u7121\u5F0F\u6A23\u7DE8\u6392", +h1:"\u6A19\u984C1", +h2:"\u6A19\u984C2", +h3:"\u6A19\u984C3", +h4:"\u6A19\u984C4", +h5:"\u6A19\u984C5", +h6:"\u6A19\u984C6", +blockquote:"\u5F15\u7528", +code:"\u4EE3\u78BC", +samp:"\u4EE3\u78BC\u6A23\u4F8B", +dt:"\u540D\u8A5E\u5B9A\u7FA9", +dd:"\u540D\u8A5E\u89E3\u91CB", +bold_desc:"\u7C97\u9AD4(Ctrl+B)", +italic_desc:"\u659C\u9AD4(Ctrl+I)", +underline_desc:"\u5E95\u7DDA(Ctrl+U)", +striketrough_desc:"\u522A\u9664\u7DDA", +justifyleft_desc:"\u5DE6\u5C0D\u9F4A", +justifycenter_desc:"\u5C45\u4E2D", +justifyright_desc:"\u53F3\u5C0D\u9F4A", +justifyfull_desc:"\u5169\u7AEF\u5C0D\u9F4A", +bullist_desc:"\u9805\u76EE\u7B26\u865F", +numlist_desc:"\u7DE8\u865F", +outdent_desc:"\u6E1B\u5C11\u7E2E\u6392", +indent_desc:"\u589E\u52A0\u7E2E\u6392", +undo_desc:"\u56DE\u5FA9(Ctrl+Z)", +redo_desc:"\u91CD\u505A(Ctrl+Y)", +link_desc:"\u63D2\u5165/\u7DE8\u8F2F\u93C8\u7D50", +unlink_desc:"\u53D6\u6D88\u93C8\u7D50", +image_desc:"\u63D2\u5165/\u7DE8\u8F2F\u5716\u7247", +cleanup_desc:"\u6E05\u9664\u591A\u9918\u4EE3\u78BC", +code_desc:"\u7DE8\u8F2FHTML\u539F\u59CB\u78BC", +sub_desc:"\u4E0B\u6A19", +sup_desc:"\u4E0A\u6A19", +hr_desc:"\u63D2\u5165\u6C34\u5E73\u7DDA", +removeformat_desc:"\u6E05\u9664\u6A23\u5F0F", +custom1_desc:"\u5728\u6B64\u8F38\u5165\u60A8\u7684\u81EA\u5B9A\u7FA9\u63CF\u8FF0", +forecolor_desc:"\u9078\u64C7\u6587\u5B57\u984F\u8272", +backcolor_desc:"\u9078\u64C7\u80CC\u666F\u984F\u8272", +charmap_desc:"\u63D2\u5165\u7279\u6B8A\u7B26\u865F", +visualaid_desc:"\u958B\u95DC\u683C\u7DDA/\u96B1\u85CF\u5143\u4EF6", +anchor_desc:"\u63D2\u5165/\u7DE8\u8F2F\u9328\u9EDE", +cut_desc:"\u526A\u4E0B", +copy_desc:"\u8907\u88FD", +paste_desc:"\u8CBC\u4E0A", +image_props_desc:"\u5716\u7247\u5C6C\u6027", +newdocument_desc:"\u65B0\u6587\u4EF6", +help_desc:"\u8AAA\u660E", +blockquote_desc:"\u5F15\u7528", +clipboard_msg:"\u8907\u88FD\u3001\u526A\u4E0B\u53CA\u8CBC\u4E0A\u529F\u80FD\u5728Mozilla\u548CFirefox\u4E2D\u4E0D\u80FD\u4F7F\u7528\u3002 \n\u662F\u5426\u9700\u8981\u77AD\u89E3\u66F4\u591A\u6709\u95DC\u6B64\u554F\u984C\u7684\u8CC7\u8A0A\uFF1F", +path:"\u4F4D\u7F6E", +newdocument:"\u60A8\u78BA\u8A8D\u8981\u6E05\u9664\u5168\u90E8\u5167\u5BB9\u55CE\uFF1F", +toolbar_focus:"\u5DE5\u5177\u6309\u9215- Alt+Q,\u7DE8\u8F2F\u5668- Alt-Z,\u5143\u4EF6\u4F4D\u7F6E- Alt-X", +more_colors:"\u66F4\u591A\u984F\u8272", +link_delta_width:"40", +link_delta_height:"60" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tw_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tw_dlg.js new file mode 100644 index 00000000..30f46cea --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/tw_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('tw.advanced_dlg',{ +about_title:"\u95DC\u65BCTinyMCE", +about_general:"\u95DC\u65BC", +about_help:"\u8AAC\u660E", +about_license:"\u6388\u6B0A", +about_plugins:"\u5168\u90E8\u63D2\u4EF6", +about_plugin:"\u63D2\u4EF6", +about_author:"\u4F5C\u8005", +about_version:"\u7248\u672C", +about_loaded:"\u5DF2\u8F09\u5165\u7684\u63D2\u4EF6", +anchor_title:"\u63D2\u5165/\u7DE8\u8F2F\u9328\u9EDE", +anchor_name:"\u9328\u9EDE\u540D\u7A31", +code_title:"HTML\u539F\u59CB\u78BC\u7DE8\u8F2F\u5668", +code_wordwrap:"\u6574\u5B57\u63DB\u884C", +colorpicker_title:"\u6311\u9078\u984F\u8272", +colorpicker_picker_tab:"\u9078\u8272\u5668", +colorpicker_picker_title:"\u9078\u8272\u5668", +colorpicker_palette_tab:"\u8272\u76E4", +colorpicker_palette_title:"\u8272\u76E4\u984F\u8272", +colorpicker_named_tab:"\u9810\u8A2D\u7684", +colorpicker_named_title:"\u9810\u8A2D\u7684\u984F\u8272", +colorpicker_color:"\u984F\u8272:", +colorpicker_name:"\u540D\u7A31:", +charmap_title:"\u63D2\u5165\u7279\u6B8A\u7B26\u865F", +image_title:"\u63D2\u5165/\u7DE8\u8F2F\u5716\u7247", +image_src:"\u5716\u7247\u4F4D\u5740", +image_alt:"\u5716\u7247\u8AAA\u660E", +image_list:"\u5716\u7247\u5217\u8868", +image_border:"\u908A\u6846", +image_dimensions:"\u5C3A\u5BF8", +image_vspace:"\u5782\u76F4\u9593\u8DDD", +image_hspace:"\u6C34\u6E96\u9593\u8DDD", +image_align:"\u5C0D\u9F4A\u65B9\u5F0F", +image_align_baseline:"\u57FA\u6E96\u7DDA", +image_align_top:"\u4E0A\u65B9\u5C0D\u9F4A", +image_align_middle:"\u5C45\u4E2D\u5C0D\u9F4A", +image_align_bottom:"\u5E95\u90E8\u5C0D\u9F4A", +image_align_texttop:"\u6587\u5B57\u4E0A\u65B9", +image_align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +image_align_left:"\u9760\u5DE6\u5C0D\u9F4A", +image_align_right:"\u9760\u53F3\u5C0D\u9F4A", +link_title:"\u63D2\u5165/\u7DE8\u8F2F\u93C8\u7D50", +link_url:"\u93C8\u7D50\u4F4D\u5740", +link_target:"\u76EE\u6A19", +link_target_same:"\u5C07\u93C8\u7D50\u7DB2\u5740\u958B\u5728\u6B64\u8996\u7A97", +link_target_blank:"\u5C07\u93C8\u7D50\u7DB2\u5740\u958B\u5728\u65B0\u7A97\u53E3", +link_titlefield:"\u6A19\u984C", +link_is_email:"\u60A8\u8F38\u5165\u7684\u7DB2\u5740\u61C9\u8A72\u662F\u4E00\u500B\u96FB\u5B50\u90F5\u4EF6\u4F4D\u5740\uFF0C\u662F\u5426\u9700\u8981\u5728\u4F4D\u5740\u524D\u65B9\u52A0\u5165mailto:\uFF1F", +link_is_external:"\u60A8\u8F38\u5165\u7684\u7DB2\u5740\u61C9\u8A72\u662F\u4E00\u500B\u5916\u90E8\u93C8\u7D50\uFF0C\u662F\u5426\u9700\u8981\u5728\u7DB2\u5740\u524D\u65B9\u52A0\u5165http://\uFF1F", +link_list:"\u93C8\u7D50\u6E05\u55AE" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/uk.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/uk.js new file mode 100644 index 00000000..545049c7 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/uk.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('uk.advanced',{ +style_select:"\u0421\u0442\u0438\u043B\u0456", +font_size:"\u0420\u043E\u0437\u043C\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0443", +fontdefault:"\u0428\u0440\u0438\u0444\u0442", +block:"\u0424\u043E\u0440\u043C\u0430\u0442", +paragraph:"\u0410\u0431\u0437\u0430\u0446", +div:"Div", +address:"\u0421\u0442\u0438\u043B\u044C \u0430\u0434\u0440\u0435\u0441\u0438", +pre:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044C\u043E \u0444\u043E\u0440\u043C\u0430\u0442\u043E\u0432\u0430\u043D\u0438\u0439", +h1:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 1", +h2:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 2", +h3:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 3", +h4:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 4", +h5:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 5", +h6:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 6", +blockquote:"\u0426\u0438\u0442\u0430\u0442\u0430", +code:"\u041A\u043E\u0434", +samp:"\u041F\u0440\u0438\u043A\u043B\u0430\u0434 \u043A\u043E\u0434\u0443", +dt:"\u0414\u043E\u0432\u0456\u0434\u043D\u0438\u043A \u0442\u0435\u0440\u043C\u0456\u043D ", +dd:"\u0414\u043E\u0432\u0456\u0434\u043D\u0438\u043A \u043E\u043F\u0438\u0441 ", +bold_desc:"\u0416\u0438\u0440\u043D\u0438\u0439 (Ctrl+B)", +italic_desc:"\u041A\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)", +underline_desc:"\u041F\u0456\u0434\u043A\u0440\u0435\u0441\u043B\u0435\u043D\u0438\u0439 (Ctrl+U)", +striketrough_desc:"\u0417\u0430\u043A\u0440\u0435\u0441\u043B\u0435\u043D\u0438\u0439", +justifyleft_desc:"\u041F\u043E \u043B\u0456\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +justifycenter_desc:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +justifyright_desc:"\u041F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +justifyfull_desc:"\u041F\u043E \u0448\u0438\u0440\u0438\u043D\u0456", +bullist_desc:"\u0421\u043F\u0438\u0441\u043E\u043A", +numlist_desc:"\u041D\u0443\u043C\u0435\u0440\u043E\u0432\u0430\u043D\u0438\u0439 \u0441\u043F\u0438\u0441\u043E\u043A", +outdent_desc:"\u0417\u043C\u0435\u043D\u0448\u0442\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043F", +indent_desc:"\u0417\u0431\u0456\u043B\u044C\u0448\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043F", +undo_desc:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 (Ctrl+Z)", +redo_desc:"\u041F\u043E\u0432\u0435\u0440\u043D\u0443\u0442\u0438 (Ctrl+Y)", +link_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F", +unlink_desc:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F", +image_desc:"\u0414\u043E\u0434\u0430\u0442\u0438/\u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +cleanup_desc:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0437\u0430\u0439\u0432\u044B\u0439 \u043A\u043E\u0434", +code_desc:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 HTML \u043A\u043E\u0434", +sub_desc:"\u041D\u0438\u0436\u043D\u0456\u0439 \u0456\u043D\u0434\u0435\u043A\u0441", +sup_desc:"\u0412\u0435\u0440\u0445\u043D\u0456\u0439 \u0456\u043D\u0434\u0435\u043A\u0441", +hr_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u0434\u0456\u043B\u044C\u043D\u0438\u043A", +removeformat_desc:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0443\u0432\u0430\u043D\u043D\u044F", +custom1_desc:"\u0412\u0430\u0448 \u0434\u043E\u0432\u0456\u043B\u044C\u043D\u0438\u0439 \u043E\u043F\u0438\u0441 \u0442\u0443\u0442", +forecolor_desc:"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440 \u0442\u0435\u043A\u0441\u0442\u0443", +backcolor_desc:"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440 \u0444\u043E\u043D\u0443", +charmap_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B", +visualaid_desc:"Toggle guidelines/invisible elements", +anchor_desc:"\u0414\u043E\u0434\u0430\u0442\u0438/\u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u044F\u043A\u0456\u0440", +cut_desc:"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438", +copy_desc:"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438", +paste_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438", +image_props_desc:"\u0412\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +newdocument_desc:"\u041D\u043E\u0432\u0438\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442", +help_desc:"\u0414\u043E\u043F\u043E\u043C\u043E\u0433\u0430", +blockquote_desc:"\u0426\u0438\u0442\u0430\u0442\u0430", +clipboard_msg:"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438/\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438/\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0456 \u0432 Mozilla \u0438 Firefox.\n\u0412\u0430\u043C \u0446\u0456\u043A\u0430\u0432\u0430 \u0456\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u044F \u043F\u0440\u043E \u0446\u0435?", +path:"\u0428\u043B\u044F\u0445", +newdocument:"\u0412\u0438 \u043F\u0435\u0432\u043D\u0456, \u0449\u043E \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0441\u0435 \u0432\u0438\u0434\u0430\u043B\u0438\u0442\u0438?", +toolbar_focus:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u043F\u0430\u043D\u0435\u043B\u044C \u043A\u043D\u043E\u043F\u043E\u043A - Alt+Q, \u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0443 - Alt-Z, \u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0448\u043B\u044F\u0445\u0443 - Alt-X", +more_colors:"\u0411\u0456\u043B\u044C\u0448\u0435 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/uk_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/uk_dlg.js new file mode 100644 index 00000000..d69392b1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/uk_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('uk.advanced_dlg',{ +about_title:"\u041F\u0440\u043E \u043F\u0440\u043E\u0434\u0443\u043A\u0442 TinyMCE", +about_general:"\u041F\u0440\u043E \u043F\u0440\u043E\u0434\u0443\u043A\u0442...", +about_help:"\u0414\u043E\u043F\u043E\u043C\u043E\u0433\u0430", +about_license:"\u041B\u0456\u0446\u0435\u043D\u0437\u0456\u044F", +about_plugins:"\u041F\u043B\u0430\u0433\u0456\u043D\u0438", +about_plugin:"\u041F\u043B\u0430\u0433\u0456\u043D", +about_author:"\u0410\u0432\u0442\u043E\u0440", +about_version:"\u0412\u0435\u0440\u0441\u0456\u044F", +about_loaded:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u0456 \u043F\u043B\u0430\u0433\u0456\u043D\u0438", +anchor_title:"\u0414\u043E\u0434\u0430\u0442\u0438/\u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u044F\u043A\u0456\u0440", +anchor_name:"\u041D\u0430\u0437\u0432\u0430 \u044F\u043A\u043E\u0440\u044F", +code_title:"\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 HTML \u043A\u043E\u0434\u0443", +code_wordwrap:"\u041F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u0438 \u0441\u043B\u043E\u0432\u0430", +colorpicker_title:"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440", +colorpicker_picker_tab:"\u041F\u0456\u043F\u0435\u0442\u043A\u0430", +colorpicker_picker_title:"\u041F\u0456\u043F\u0435\u0442\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0443", +colorpicker_palette_tab:"\u041F\u0430\u043B\u0456\u0442\u0440\u0430", +colorpicker_palette_title:"\u041F\u0430\u043B\u0456\u0442\u0440\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432", +colorpicker_named_tab:"\u0417\u0430 \u043D\u0430\u0437\u0432\u043E\u044E", +colorpicker_named_title:"\u0417\u0430 \u043D\u0430\u0437\u0432\u043E\u044E", +colorpicker_color:"\u041A\u043E\u043B\u0456\u0440:", +colorpicker_name:"\u041D\u0430\u0439\u043C\u0435\u043D\u0443\u0432\u0430\u043D\u043D\u044F:", +charmap_title:"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0434\u043E\u0432\u0456\u043B\u044C\u043D\u0438\u0439 \u0441\u0438\u043C\u0432\u043E\u043B", +image_title:"\u0414\u043E\u0434\u0430\u0442\u0438/\u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F", +image_src:"\u0410\u0434\u0440\u0435\u0441\u0430", +image_alt:"\u041E\u043F\u0438\u0441", +image_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u044C", +image_border:"\u0413\u0440\u0430\u043D\u0438\u0446\u044F", +image_dimensions:"\u0420\u043E\u0437\u043C\u0456\u0440\u0438", +image_vspace:"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043F", +image_hspace:"\u0413\u043E\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043F", +image_align:"\u0412\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F", +image_align_baseline:"\u041F\u043E \u0431\u0430\u0437\u043E\u0432\u0456\u0439 \u043B\u0438\u043D\u0456\u0457", +image_align_top:"\u041F\u043E \u0432\u0435\u0440\u0445\u043D\u044C\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +image_align_middle:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +image_align_bottom:"\u041F\u043E \u043D\u0438\u0436\u043D\u044C\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +image_align_texttop:"\u041F\u043E \u0432\u0435\u0440\u0445\u043D\u044C\u043E\u043C\u0443 \u043A\u0440\u0430\u044E \u0442\u0435\u043A\u0441\u0442\u0443", +image_align_textbottom:"\u041F\u043E \u043D\u0438\u0436\u043D\u044C\u043E\u043C\u0443 \u043A\u0440\u0430\u044E \u0442\u0435\u043A\u0441\u0442\u0443", +image_align_left:"\u041F\u043E \u043B\u0456\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +image_align_right:"\u041F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +link_title:"\u0414\u043E\u0434\u0430\u0442\u0438/\u0437\u043C\u0456\u043D\u0438\u0442\u0438 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F", +link_url:"\u0410\u0434\u0440\u0435\u0441\u0430 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F", +link_target:"\u0412\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u0432...", +link_target_same:"\u0446\u044C\u043E\u043C\u0443 \u0436\u0435 \u0432\u0456\u043A\u043D\u0456", +link_target_blank:"\u043D\u043E\u0432\u043E\u043C\u0443 \u0432\u0456\u043A\u043D\u0456", +link_titlefield:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +link_is_email:"\u0412\u0432\u0435\u0434\u0435\u043D\u0438\u0439 URL \u0441\u0445\u043E\u0436\u0438\u0439 \u043D\u0430 email \u0430\u0434\u0440\u0435\u0441\u0443, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043E\u0434\u0430\u0442\u0438 \u043D\u0435\u043E\u0431\u0445\u0456\u0434\u043D\u0438\u0439 \u043F\u0440\u0435\u0444\u0456\u043A\u0441 mailto:?", +link_is_external:"\u0412\u0432\u0435\u0434\u0435\u043D\u0438\u0439 URL \u0441\u0445\u043E\u0436\u0438\u0439 \u043D\u0430 \u0437\u043E\u0432\u043D\u0456\u0448\u043D\u0454 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043E\u0434\u0430\u0442\u0438 \u043D\u0435\u043E\u0431\u0445\u0456\u0434\u043D\u0438\u0439 \u043F\u0440\u0435\u0444\u0456\u043A\u0441 http://?", +link_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u044C" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/vi.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/vi.js new file mode 100644 index 00000000..2407a7b1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/vi.js @@ -0,0 +1,62 @@ +tinyMCE.addI18n('vi.advanced',{ +style_select:"Ki\u1EC3u", +font_size:"C\u1EE1 ch\u1EEF", +fontdefault:"Ph\u00F4ng ch\u1EEF", +block:"\u0110\u1ECBnh d\u1EA1ng", +paragraph:"\u0110o\u1EA1n v\u0103n b\u1EA3n", +div:"Div", +address:"\u0110\u1ECBa ch\u1EC9", +pre:"Kh\u00F4ng \u0111\u1ECBnh d\u1EA1ng", +h1:"Ti\u00EAu \u0111\u1EC1 1", +h2:"Ti\u00EAu \u0111\u1EC1 2", +h3:"Ti\u00EAu \u0111\u1EC1 3", +h4:"Ti\u00EAu \u0111\u1EC1 4", +h5:"Ti\u00EAu \u0111\u1EC1 5", +h6:"Ti\u00EAu \u0111\u1EC1 6", +blockquote:"\u0110\u1ECBnh d\u1EA1ng kh\u1ED1i", +code:"M\u00E3", +samp:"M\u00E3 v\u00ED d\u1EE5", +dt:"T\u00EAn \u0111\u1ECBnh ngh\u0129a ", +dd:"M\u00F4 t\u1EA3 \u0111\u1ECBnh ngh\u0129a", +bold_desc:"\u0110\u1EADm (Ctrl+B)", +italic_desc:"Nghi\u00EAng (Ctrl+I)", +underline_desc:"G\u1EA1ch ch\u00E2n (Ctrl+U)", +striketrough_desc:"G\u1EA1ch x\u00F3a", +justifyleft_desc:"C\u0103n tr\u00E1i", +justifycenter_desc:"C\u0103n gi\u1EEFa", +justifyright_desc:"C\u0103n ph\u1EA3i", +justifyfull_desc:"C\u0103n \u0111\u1EC1u", +bullist_desc:"Danh s\u00E1ch", +numlist_desc:"Danh s\u00E1ch th\u1EE9 t\u1EF1", +outdent_desc:"Gi\u1EA3m l\u1EC1 tr\u00E1i", +indent_desc:"T\u0103ng l\u1EC1 tr\u00E1i", +undo_desc:"Kh\u00F4i ph\u1EE5c (Ctrl+Z)", +redo_desc:"L\u1EB7p l\u1EA1i (Ctrl+Y)", +link_desc:"Ch\u00E8n/thay \u0111\u1ED5i li\u00EAn k\u1EBFt", +unlink_desc:"X\u00F3a li\u00EAn k\u1EBFt", +image_desc:"Ch\u00E8n/s\u1EEDa h\u00ECnh \u1EA3nh", +cleanup_desc:"D\u1ECDn d\u1EB9p m\u00E3 l\u1ED9n x\u1ED9n", +code_desc:"S\u1EEDa m\u00E3 ngu\u1ED3n HTML", +sub_desc:"Subscript", +sup_desc:"Superscript", +hr_desc:"Ch\u00E8n thanh ngang", +removeformat_desc:"X\u00F3a \u0111\u1ECBnh d\u1EA1ng", +custom1_desc:"M\u00F4 t\u1EA3 c\u1EE7a b\u1EA1n \u1EDF \u0111\u00E2y", +forecolor_desc:"Ch\u1ECDn m\u00E0u ch\u1EEF", +backcolor_desc:"Ch\u1ECDn m\u00E0u n\u1EC1n", +charmap_desc:"Ch\u00E8n k\u00FD t\u1EF1 \u0111\u1EB7c bi\u1EC7t", +visualaid_desc:"B\u1EADt/t\u1EAFt c\u00E1c ph\u1EA7n t\u1EED \u1EA9n", +anchor_desc:"Ch\u00E8n/s\u1EEDa m\u1ED1c (anchor)", +cut_desc:"C\u1EAFt", +copy_desc:"Sao ch\u00E9p", +paste_desc:"D\u00E1n", +image_props_desc:"Thu\u1ED9c t\u00EDnh h\u00ECnh \u1EA3nh", +newdocument_desc:"V\u0103n b\u1EA3n m\u1EDBi", +help_desc:"Gi\u00FAp \u0111\u1EE1", +blockquote_desc:"\u0110\u1ECBnh d\u1EA1ng kh\u1ED1i", +clipboard_msg:"Sao ch\u00E9p/C\u1EAFt/D\u00E1n kh\u00F4ng ho\u1EA1t \u0111\u1ED9ng tr\u00EAn Mozilla v\u00E0 Firefox.\nB\u1EA1n mu\u1ED1n xem th\u00EAm th\u00F4ng tin v\u1EC1 v\u1EA5n \u0111\u1EC1 n\u00E0y?", +path:"\u0110\u01B0\u1EDDng d\u1EABn", +newdocument:"B\u1EA1n c\u00F3 ch\u1EAFc ch\u1EAFn mu\u1ED1n x\u00F3a t\u1EA5t c\u1EA3 n\u1ED9i dung \u0111\u00E3 so\u1EA1n?", +toolbar_focus:"Nh\u1EA3y \u0111\u1EBFn thanh c\u00F4ng c\u1EE5 - Alt+Q, Nh\u1EA3y \u0111\u1EBFn \u00F4 so\u1EA1n th\u1EA3o - Alt-Z, Nh\u1EA3y \u0111\u1EBFn \u0111\u01B0\u1EDDng d\u1EABn - Alt-X", +more_colors:"Nhi\u1EC1u m\u00E0u h\u01A1n" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/vi_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/vi_dlg.js new file mode 100644 index 00000000..159acccb --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/vi_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('vi.advanced_dlg',{ +about_title:"Gi\u1EDBi thi\u1EC7u TinyMCE", +about_general:"Gi\u1EDBi thi\u1EC7u", +about_help:"Gi\u00FAp \u0111\u1EE1", +about_license:"Gi\u1EA5y ph\u00E9p", +about_plugins:"C\u00E1c ph\u1EA7n m\u1EDF r\u1ED9ng", +about_plugin:"Ph\u1EA7n m\u1EDF r\u1ED9ng", +about_author:"T\u00E1c gi\u1EA3", +about_version:"Phi\u00EAn b\u1EA3n", +about_loaded:"C\u00E1c ph\u1EA7n m\u1EDF r\u1ED9ng \u0111\u00E3 n\u1EA1p", +anchor_title:"Ch\u00E8n/s\u1EEDa m\u1ED1c (anchor)", +anchor_name:"T\u00EAn m\u1ED1c (anchor)", +code_title:"So\u1EA1n M\u00E3 HTML", +code_wordwrap:"Xu\u1ED1ng d\u00F2ng", +colorpicker_title:"Ch\u1ECDn m\u1ED9t m\u00E0u", +colorpicker_picker_tab:"B\u1ED9 ch\u1ECDn", +colorpicker_picker_title:"B\u1ED9 ch\u1ECDn m\u00E0u", +colorpicker_palette_tab:"B\u1EA3ng", +colorpicker_palette_title:"B\u1EA3ng m\u00E0u", +colorpicker_named_tab:"\u0110\u00E3 c\u00F3 t\u00EAn", +colorpicker_named_title:"M\u00E0u \u0111\u00E3 c\u00F3 t\u00EAn", +colorpicker_color:"M\u00E0u:", +colorpicker_name:"T\u00EAn:", +charmap_title:"Ch\u1ECDn k\u00FD t\u1EF1 \u0111\u1EB7c bi\u1EC7t", +image_title:"Ch\u00E8n/s\u1EEDa h\u00ECnh \u1EA3nh", +image_src:"D\u01B0\u1EDDng d\u1EABn \u0111\u1EBFn h\u00ECnh \u1EA3nh", +image_alt:"M\u00F4 t\u1EA3 h\u00ECnh \u1EA3nh", +image_list:"Danh s\u00E1ch h\u00ECnh \u1EA3nh", +image_border:"Vi\u1EC1n", +image_dimensions:"K\u00EDch th\u01B0\u1EDBc", +image_vspace:"Kho\u1EA3ng c\u00E1ch d\u1ECDc", +image_hspace:"Kho\u1EA3ng c\u00E1ch ngang", +image_align:"C\u0103n l\u1EC1", +image_align_baseline:"\u0110\u01B0\u1EDDng c\u01A1 b\u1EA3n", +image_align_top:"Tr\u00EAn", +image_align_middle:"Gi\u1EEFa", +image_align_bottom:"\u0110\u00E1y", +image_align_texttop:"Tr\u00EAn c\u1EE7a ch\u1EEF", +image_align_textbottom:"\u0110\u00E1y c\u1EE7a ch\u1EEF", +image_align_left:"Tr\u00E1i", +image_align_right:"Ph\u1EA3i", +link_title:"Ch\u00E8n/s\u1EEDa li\u00EAn k\u1EBFt", +link_url:"Li\u00EAn k\u1EBFt", +link_target:"\u0110\u00EDch", +link_target_same:"M\u1EDF li\u00EAn k\u1EBFt trong c\u00F9ng c\u1EEDa s\u1ED5", +link_target_blank:"M\u1EDF li\u00EAn k\u1EBFt trong c\u1EEDa s\u1ED5 m\u1EDBi", +link_titlefield:"Ti\u00EAu \u0111\u1EC1", +link_is_email:"Li\u00EAn k\u1EBFt b\u1EA1n nh\u1EADp c\u00F3 v\u1EBB nh\u01B0 l\u00E0 m\u1ED9t \u0111\u1ECBa ch\u1EC9 email, b\u1EA1n c\u00F3 mu\u1ED1n th\u00EAm ph\u1EA7n mailto: v\u00E0o tr\u01B0\u1EDBc li\u00EAn k\u1EBFt?", +link_is_external:"Li\u00EAn k\u1EBFt b\u1EA1n nh\u1EADp c\u00F3 v\u1EBB nh\u01B0 l\u00E0 m\u1ED9t trang web ngo\u00E0i, b\u1EA1n c\u00F3 mu\u1ED1n th\u00EAm ph\u1EA7n http:// v\u00E0o tr\u01B0\u1EDBc li\u00EAn k\u1EBFt?", +link_list:"Danh s\u00E1ch li\u00EAn k\u1EBFt" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/zh.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/zh.js new file mode 100644 index 00000000..ec1aa531 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/zh.js @@ -0,0 +1,64 @@ +tinyMCE.addI18n('zh.advanced',{ +style_select:"\u6837\u5F0F", +font_size:"\u5B57\u4F53\u5927\u5C0F", +fontdefault:"\u5B57\u4F53", +block:"\u683C\u5F0F", +paragraph:"\u6BB5\u843D", +div:"DIV\u5C42", +address:"\u5730\u5740", +pre:"\u65E0\u5F0F\u6837\u7F16\u6392", +h1:"\u6807\u98981", +h2:"\u6807\u98982", +h3:"\u6807\u98983", +h4:"\u6807\u98984", +h5:"\u6807\u98985", +h6:"\u6807\u98986", +blockquote:"\u5F15\u7528", +code:"\u4EE3\u7801", +samp:"\u4EE3\u7801\u6837\u4F8B", +dt:"\u540D\u8BCD\u5B9A\u4E49", +dd:"\u540D\u8BCD\u89E3\u91CA", +bold_desc:"\u9ED1\u4F53(Ctrl+B)", +italic_desc:"\u659C\u4F53(Ctrl+I)", +underline_desc:"\u4E0B\u5212\u7EBF(Ctrl+U)", +striketrough_desc:"\u5220\u9664\u7EBF", +justifyleft_desc:"\u5DE6\u5BF9\u9F50", +justifycenter_desc:"\u5C45\u4E2D", +justifyright_desc:"\u53F3\u5BF9\u9F50", +justifyfull_desc:"\u4E24\u7AEF\u5BF9\u9F50", +bullist_desc:"\u9879\u76EE\u7B26\u53F7", +numlist_desc:"\u7F16\u53F7", +outdent_desc:"\u51CF\u5C11\u7F29\u6392", +indent_desc:"\u589E\u52A0\u7F29\u6392", +undo_desc:"\u64A4\u9500(Ctrl+Z)", +redo_desc:"\u91CD\u505A(Ctrl+Y)", +link_desc:"\u63D2\u5165/\u7F16\u8F91\u94FE\u63A5", +unlink_desc:"\u53D6\u6D88\u94FE\u63A5", +image_desc:"\u63D2\u5165/\u7F16\u8F91\u56FE\u7247", +cleanup_desc:"\u6E05\u9664\u591A\u4F59\u4EE3\u7801", +code_desc:"\u7F16\u8F91HTML\u6E90\u4EE3\u7801", +sub_desc:"\u4E0B\u6807", +sup_desc:"\u4E0A\u6807", +hr_desc:"\u63D2\u5165\u6C34\u5E73\u7EBF", +removeformat_desc:"\u6E05\u9664\u6837\u5F0F", +custom1_desc:"\u5728\u6B64\u8F93\u5165\u60A8\u7684\u81EA\u5B9A\u4E49\u63CF\u8FF0", +forecolor_desc:"\u9009\u62E9\u6587\u5B57\u989C\u8272", +backcolor_desc:"\u9009\u62E9\u80CC\u666F\u989C\u8272", +charmap_desc:"\u63D2\u5165\u7279\u6B8A\u7B26\u53F7", +visualaid_desc:"\u5F00\u5173\u7F51\u683C\u7EBF/\u9690\u85CF\u7EC4\u4EF6", +anchor_desc:"\u63D2\u5165/\u7F16\u8F91\u951A\u70B9", +cut_desc:"\u526A\u5207", +copy_desc:"\u590D\u5236", +paste_desc:"\u7C98\u5E16", +image_props_desc:"\u56FE\u7247\u5C5E\u6027", +newdocument_desc:"\u65B0\u6587\u4EF6", +help_desc:"\u8BF4\u660E", +blockquote_desc:"\u5F15\u7528", +clipboard_msg:"\u590D\u5236\u3001\u526A\u5207\u53CA\u7C98\u8D34\u529F\u80FD\u5728Mozilla\u548CFirefox\u4E2D\u4E0D\u80FD\u4F7F\u7528\u3002 \n\u662F\u5426\u9700\u8981\u4E86\u89E3\u66F4\u591A\u6709\u5173\u6B64\u95EE\u9898\u7684\u4FE1\u606F\uFF1F", +path:"\u4F4D\u7F6E", +newdocument:"\u60A8\u786E\u8BA4\u8981\u6E05\u9664\u5168\u90E8\u5185\u5BB9\u5417\uFF1F", +toolbar_focus:"\u5DE5\u5177\u6309\u94AE- Alt+Q,\u7F16\u8F91\u5668- Alt-Z,\u7EC4\u4EF6\u4F4D\u7F6E- Alt-X", +more_colors:"\u66F4\u591A\u989C\u8272", +link_delta_width:"40", +link_delta_height:"60" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/zh_dlg.js b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/zh_dlg.js new file mode 100644 index 00000000..066faac3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/langs/zh_dlg.js @@ -0,0 +1,51 @@ +tinyMCE.addI18n('zh.advanced_dlg',{ +about_title:"\u5173\u4E8ETinyMCE", +about_general:"\u5173\u4E8E", +about_help:"\u5E2E\u52A9", +about_license:"\u6388\u6743", +about_plugins:"\u5168\u90E8\u63D2\u4EF6", +about_plugin:"\u63D2\u4EF6", +about_author:"\u4F5C\u8005", +about_version:"\u7248\u672C", +about_loaded:"\u5DF2\u8F7D\u5165\u7684\u63D2\u4EF6", +anchor_title:"\u63D2\u5165/\u7F16\u8F91\u951A\u70B9", +anchor_name:"\u951A\u70B9\u540D\u79F0", +code_title:"HTML\u6E90\u4EE3\u7801\u7F16\u8F91\u5668", +code_wordwrap:"\u6574\u5B57\u6362\u884C", +colorpicker_title:"\u6311\u9009\u989C\u8272", +colorpicker_picker_tab:"\u9009\u8272\u5668", +colorpicker_picker_title:"\u9009\u8272\u5668", +colorpicker_palette_tab:"\u8272\u76D8", +colorpicker_palette_title:"\u8272\u76D8\u989C\u8272", +colorpicker_named_tab:"\u9884\u8BBE\u7684", +colorpicker_named_title:"\u9884\u8BBE\u7684\u989C\u8272", +colorpicker_color:"\u989C\u8272:", +colorpicker_name:"\u540D\u79F0:", +charmap_title:"\u63D2\u5165\u7279\u6B8A\u7B26\u53F7", +image_title:"\u63D2\u5165/\u7F16\u8F91\u56FE\u7247", +image_src:"\u56FE\u7247\u5730\u5740", +image_alt:"\u56FE\u7247\u8BF4\u660E", +image_list:"\u56FE\u7247\u5217\u8868", +image_border:"\u8FB9\u6846", +image_dimensions:"\u5C3A\u5BF8", +image_vspace:"\u5782\u76F4\u95F4\u8DDD", +image_hspace:"\u6C34\u5E73\u95F4\u8DDD", +image_align:"\u5BF9\u9F50\u65B9\u5F0F", +image_align_baseline:"\u57FA\u51C6\u7EBF", +image_align_top:"\u4E0A\u65B9\u5BF9\u9F50", +image_align_middle:"\u5C45\u4E2D\u5BF9\u9F50", +image_align_bottom:"\u5E95\u90E8\u5BF9\u9F50", +image_align_texttop:"\u6587\u5B57\u4E0A\u65B9", +image_align_textbottom:"\u6587\u5B57\u4E0B\u65B9", +image_align_left:"\u9760\u5DE6\u5BF9\u9F50", +image_align_right:"\u9760\u53F3\u5BF9\u9F50", +link_title:"\u63D2\u5165/\u7F16\u8F91\u94FE\u63A5", +link_url:"\u94FE\u63A5\u5730\u5740", +link_target:"\u76EE\u6807", +link_target_same:"\u5C06\u94FE\u63A5\u7F51\u5740\u5F00\u5728\u6B64\u7A97\u53E3", +link_target_blank:"\u5C06\u94FE\u63A5\u7F51\u5740\u5F00\u5728\u65B0\u7A97\u53E3", +link_titlefield:"\u6807\u9898", +link_is_email:"\u60A8\u8F93\u5165\u7684\u7F51\u5740\u5E94\u8BE5\u662F\u4E00\u4E2A\u7535\u5B50\u90AE\u4EF6\u5730\u5740\uFF0C\u662F\u5426\u9700\u8981\u5728\u5730\u5740\u524D\u65B9\u52A0\u5165mailto:\uFF1F", +link_is_external:"\u60A8\u8F93\u5165\u7684\u7F51\u5740\u5E94\u8BE5\u662F\u4E00\u4E2A\u5916\u90E8\u94FE\u63A5\uFF0C\u662F\u5426\u9700\u8981\u5728\u7F51\u5740\u524D\u65B9\u52A0\u5165http://\uFF1F", +link_list:"\u94FE\u63A5\u6E05\u5355" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/link.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/link.htm index e95bf17d..286cc924 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/link.htm +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/link.htm @@ -1,115 +1,64 @@ - - -{$lang_insert_link_title} - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - -
{$lang_insert_link_title}
{$lang_insert_link_url}: - - - - -
{$lang_insert_link_target}:
{$lang_theme_insert_link_titlefield}:
-
-
- - + + + + {#advanced_dlg.link_title} + + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
 
+
+
+ +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css new file mode 100644 index 00000000..19da1943 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css @@ -0,0 +1,32 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css new file mode 100644 index 00000000..2c341aae --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css @@ -0,0 +1,114 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +} + +#insert {background:url(img/buttons.png) 0 -52px;} +#cancel {background:url(img/buttons.png) 0 0;} + +/* Browse */ +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/buttons.png b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/buttons.png new file mode 100644 index 00000000..7dd58418 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/buttons.png differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/items.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/items.gif new file mode 100644 index 00000000..2eafd795 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/items.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif new file mode 100644 index 00000000..85e31dfb Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif new file mode 100644 index 00000000..adfdddcc Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/progress.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/progress.gif new file mode 100644 index 00000000..5bb90fd6 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/progress.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif new file mode 100644 index 00000000..ce4be635 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/ui.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/ui.css new file mode 100644 index 00000000..230a2ee2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/ui.css @@ -0,0 +1,214 @@ +/* Reset */ +.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.defaultSkin table td {vertical-align:middle} + +/* Containers */ +.defaultSkin table {background:#F0F0EE} +.defaultSkin iframe {display:block; background:#FFF} +.defaultSkin .mceToolbar {height:26px} +.defaultSkin .mceLeft {text-align:left} +.defaultSkin .mceRight {text-align:right} + +/* External */ +.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;} +.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} +.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} +.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top} +.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} +.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} +.defaultSkin .mceStatusbar div {float:left; margin:2px} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.defaultSkin .mceStatusbar a:hover {text-decoration:underline} +.defaultSkin table.mceToolbar {margin-left:3px} +.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.defaultSkin td.mceCenter {text-align:center;} +.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;} +.defaultSkin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px} +.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceButtonLabeled {width:auto} +.defaultSkin .mceButtonLabeled span.mceIcon {float:left} +.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} + +/* ListBox */ +.defaultSkin .mceListBox {direction:ltr} +.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} +.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} +.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} +.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} +.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} +.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} +.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} + +/* SplitButton */ +.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} +.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} +.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background:url(../../img/icons.gif) 20px 20px;} +.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} +.defaultSkin .mceSplitButton span.mceOpen {display:none} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;} +.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;} + +/* ColorSplitButton */ +.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.defaultSkin .mceColorSplitMenu td {padding:2px} +.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A} +.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a} +.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} + +/* Menu */ +.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} +.defaultSkin .mceNoIcons span.mceIcon {width:0;} +.defaultSkin .mceNoIcons a .mceText {padding-left:10px} +.defaultSkin .mceMenu table {background:#FFF} +.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} +.defaultSkin .mceMenu td {height:20px} +.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} +.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} +.defaultSkin .mceMenu pre.mceText {font-family:Monospace} +.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} +.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} +.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.defaultSkin .mceMenuItemDisabled .mceText {color:#888} +.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} +.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} +.defaultSkin .mceMenu span.mceMenuLine {display:none} +.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} +.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +.defaultSkin .mcePlaceHolder {border:1px dotted gray} + +/* Formats */ +.defaultSkin .mce_formatPreview a {font-size:10px} +.defaultSkin .mce_p span.mceText {} +.defaultSkin .mce_address span.mceText {font-style:italic} +.defaultSkin .mce_pre span.mceText {font-family:monospace} +.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.defaultSkin span.mce_bold {background-position:0 0} +.defaultSkin span.mce_italic {background-position:-60px 0} +.defaultSkin span.mce_underline {background-position:-140px 0} +.defaultSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSkin span.mce_undo {background-position:-160px 0} +.defaultSkin span.mce_redo {background-position:-100px 0} +.defaultSkin span.mce_cleanup {background-position:-40px 0} +.defaultSkin span.mce_bullist {background-position:-20px 0} +.defaultSkin span.mce_numlist {background-position:-80px 0} +.defaultSkin span.mce_justifyleft {background-position:-460px 0} +.defaultSkin span.mce_justifyright {background-position:-480px 0} +.defaultSkin span.mce_justifycenter {background-position:-420px 0} +.defaultSkin span.mce_justifyfull {background-position:-440px 0} +.defaultSkin span.mce_anchor {background-position:-200px 0} +.defaultSkin span.mce_indent {background-position:-400px 0} +.defaultSkin span.mce_outdent {background-position:-540px 0} +.defaultSkin span.mce_link {background-position:-500px 0} +.defaultSkin span.mce_unlink {background-position:-640px 0} +.defaultSkin span.mce_sub {background-position:-600px 0} +.defaultSkin span.mce_sup {background-position:-620px 0} +.defaultSkin span.mce_removeformat {background-position:-580px 0} +.defaultSkin span.mce_newdocument {background-position:-520px 0} +.defaultSkin span.mce_image {background-position:-380px 0} +.defaultSkin span.mce_help {background-position:-340px 0} +.defaultSkin span.mce_code {background-position:-260px 0} +.defaultSkin span.mce_hr {background-position:-360px 0} +.defaultSkin span.mce_visualaid {background-position:-660px 0} +.defaultSkin span.mce_charmap {background-position:-240px 0} +.defaultSkin span.mce_paste {background-position:-560px 0} +.defaultSkin span.mce_copy {background-position:-700px 0} +.defaultSkin span.mce_cut {background-position:-680px 0} +.defaultSkin span.mce_blockquote {background-position:-220px 0} +.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.defaultSkin span.mce_forecolorpicker {background-position:-720px 0} +.defaultSkin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.defaultSkin span.mce_advhr {background-position:-0px -20px} +.defaultSkin span.mce_ltr {background-position:-20px -20px} +.defaultSkin span.mce_rtl {background-position:-40px -20px} +.defaultSkin span.mce_emotions {background-position:-60px -20px} +.defaultSkin span.mce_fullpage {background-position:-80px -20px} +.defaultSkin span.mce_fullscreen {background-position:-100px -20px} +.defaultSkin span.mce_iespell {background-position:-120px -20px} +.defaultSkin span.mce_insertdate {background-position:-140px -20px} +.defaultSkin span.mce_inserttime {background-position:-160px -20px} +.defaultSkin span.mce_absolute {background-position:-180px -20px} +.defaultSkin span.mce_backward {background-position:-200px -20px} +.defaultSkin span.mce_forward {background-position:-220px -20px} +.defaultSkin span.mce_insert_layer {background-position:-240px -20px} +.defaultSkin span.mce_insertlayer {background-position:-260px -20px} +.defaultSkin span.mce_movebackward {background-position:-280px -20px} +.defaultSkin span.mce_moveforward {background-position:-300px -20px} +.defaultSkin span.mce_media {background-position:-320px -20px} +.defaultSkin span.mce_nonbreaking {background-position:-340px -20px} +.defaultSkin span.mce_pastetext {background-position:-360px -20px} +.defaultSkin span.mce_pasteword {background-position:-380px -20px} +.defaultSkin span.mce_selectall {background-position:-400px -20px} +.defaultSkin span.mce_preview {background-position:-420px -20px} +.defaultSkin span.mce_print {background-position:-440px -20px} +.defaultSkin span.mce_cancel {background-position:-460px -20px} +.defaultSkin span.mce_save {background-position:-480px -20px} +.defaultSkin span.mce_replace {background-position:-500px -20px} +.defaultSkin span.mce_search {background-position:-520px -20px} +.defaultSkin span.mce_styleprops {background-position:-560px -20px} +.defaultSkin span.mce_table {background-position:-580px -20px} +.defaultSkin span.mce_cell_props {background-position:-600px -20px} +.defaultSkin span.mce_delete_table {background-position:-620px -20px} +.defaultSkin span.mce_delete_col {background-position:-640px -20px} +.defaultSkin span.mce_delete_row {background-position:-660px -20px} +.defaultSkin span.mce_col_after {background-position:-680px -20px} +.defaultSkin span.mce_col_before {background-position:-700px -20px} +.defaultSkin span.mce_row_after {background-position:-720px -20px} +.defaultSkin span.mce_row_before {background-position:-740px -20px} +.defaultSkin span.mce_merge_cells {background-position:-760px -20px} +.defaultSkin span.mce_table_props {background-position:-980px -20px} +.defaultSkin span.mce_row_props {background-position:-780px -20px} +.defaultSkin span.mce_split_cells {background-position:-800px -20px} +.defaultSkin span.mce_template {background-position:-820px -20px} +.defaultSkin span.mce_visualchars {background-position:-840px -20px} +.defaultSkin span.mce_abbr {background-position:-860px -20px} +.defaultSkin span.mce_acronym {background-position:-880px -20px} +.defaultSkin span.mce_attribs {background-position:-900px -20px} +.defaultSkin span.mce_cite {background-position:-920px -20px} +.defaultSkin span.mce_del {background-position:-940px -20px} +.defaultSkin span.mce_ins {background-position:-960px -20px} +.defaultSkin span.mce_pagebreak {background-position:0 -40px} +.defaultSkin .mce_spellchecker span.mceAction {background-position:-540px -20px} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/content.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/content.css new file mode 100644 index 00000000..b8431d16 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/content.css @@ -0,0 +1,32 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css new file mode 100644 index 00000000..8d288e34 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css @@ -0,0 +1,113 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(../default/img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +} + +#insert {background:url(../default/img/buttons.png) 0 -52px;} +#cancel {background:url(../default/img/buttons.png) 0 0;} + +/* Browse */ +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png new file mode 100644 index 00000000..12cfb419 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png new file mode 100644 index 00000000..8996c749 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png new file mode 100644 index 00000000..bd5d2550 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css new file mode 100644 index 00000000..c10a3f01 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css @@ -0,0 +1,215 @@ +/* Reset */ +.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.o2k7Skin table td {vertical-align:middle} + +/* Containers */ +.o2k7Skin table {background:#E5EFFD} +.o2k7Skin iframe {display:block; background:#FFF} +.o2k7Skin .mceToolbar {height:26px} + +/* External */ +.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none} +.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD} +.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD} +.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD} +.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} +.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD} +.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} +.o2k7Skin .mceStatusbar div {float:left; padding:2px} +.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.o2k7Skin .mceStatusbar a:hover {text-decoration:underline} +.o2k7Skin table.mceToolbar {margin-left:3px} +.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;} +.o2k7Skin .mceToolbar td.mceFirst span {margin:0} +.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} +.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none} +.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px} +.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.o2k7Skin td.mceCenter {text-align:center;} +.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;} +.o2k7Skin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} +.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px} +.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px} +.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} +.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px} +.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.o2k7Skin .mceButtonLabeled {width:auto} +.o2k7Skin .mceButtonLabeled span.mceIcon {float:left} +.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} + +/* ListBox */ +.o2k7Skin .mceListBox {margin-left:3px} +.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block} +.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0} +.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF} +.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px} +.o2k7Skin .mceListBoxDisabled .mceText {color:gray} +.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px} +.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;} + +/* SplitButton */ +.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px} +.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)} +.o2k7Skin .mceSplitButton a.mceAction {width:22px} +.o2k7Skin .mceSplitButton span.mceAction {width:22px; background:url(../../img/icons.gif) 20px 20px} +.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0} +.o2k7Skin .mceSplitButton span.mceOpen {display:none} +.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px} +.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px} +.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.o2k7Skin .mceSplitButtonActive {background-position:0 -44px} + +/* ColorSplitButton */ +.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.o2k7Skin .mceColorSplitMenu td {padding:2px} +.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A} +.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden} +.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden} + +/* Menu */ +.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD} +.o2k7Skin .mceNoIcons span.mceIcon {width:0;} +.o2k7Skin .mceNoIcons a .mceText {padding-left:10px} +.o2k7Skin .mceMenu table {background:#FFF} +.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block} +.o2k7Skin .mceMenu td {height:20px} +.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0} +.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px} +.o2k7Skin .mceMenu pre.mceText {font-family:Monospace} +.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px} +.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD} +.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.o2k7Skin .mceMenuItemDisabled .mceText {color:#888} +.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)} +.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} +.o2k7Skin .mceMenu span.mceMenuLine {display:none} +.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} +.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} +.o2k7Skin .mcePlaceHolder {border:1px dotted gray} + +/* Formats */ +.o2k7Skin .mce_formatPreview a {font-size:10px} +.o2k7Skin .mce_p span.mceText {} +.o2k7Skin .mce_address span.mceText {font-style:italic} +.o2k7Skin .mce_pre span.mceText {font-family:monospace} +.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.o2k7Skin span.mce_bold {background-position:0 0} +.o2k7Skin span.mce_italic {background-position:-60px 0} +.o2k7Skin span.mce_underline {background-position:-140px 0} +.o2k7Skin span.mce_strikethrough {background-position:-120px 0} +.o2k7Skin span.mce_undo {background-position:-160px 0} +.o2k7Skin span.mce_redo {background-position:-100px 0} +.o2k7Skin span.mce_cleanup {background-position:-40px 0} +.o2k7Skin span.mce_bullist {background-position:-20px 0} +.o2k7Skin span.mce_numlist {background-position:-80px 0} +.o2k7Skin span.mce_justifyleft {background-position:-460px 0} +.o2k7Skin span.mce_justifyright {background-position:-480px 0} +.o2k7Skin span.mce_justifycenter {background-position:-420px 0} +.o2k7Skin span.mce_justifyfull {background-position:-440px 0} +.o2k7Skin span.mce_anchor {background-position:-200px 0} +.o2k7Skin span.mce_indent {background-position:-400px 0} +.o2k7Skin span.mce_outdent {background-position:-540px 0} +.o2k7Skin span.mce_link {background-position:-500px 0} +.o2k7Skin span.mce_unlink {background-position:-640px 0} +.o2k7Skin span.mce_sub {background-position:-600px 0} +.o2k7Skin span.mce_sup {background-position:-620px 0} +.o2k7Skin span.mce_removeformat {background-position:-580px 0} +.o2k7Skin span.mce_newdocument {background-position:-520px 0} +.o2k7Skin span.mce_image {background-position:-380px 0} +.o2k7Skin span.mce_help {background-position:-340px 0} +.o2k7Skin span.mce_code {background-position:-260px 0} +.o2k7Skin span.mce_hr {background-position:-360px 0} +.o2k7Skin span.mce_visualaid {background-position:-660px 0} +.o2k7Skin span.mce_charmap {background-position:-240px 0} +.o2k7Skin span.mce_paste {background-position:-560px 0} +.o2k7Skin span.mce_copy {background-position:-700px 0} +.o2k7Skin span.mce_cut {background-position:-680px 0} +.o2k7Skin span.mce_blockquote {background-position:-220px 0} +.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0} +.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0} +.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0} +.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.o2k7Skin span.mce_advhr {background-position:-0px -20px} +.o2k7Skin span.mce_ltr {background-position:-20px -20px} +.o2k7Skin span.mce_rtl {background-position:-40px -20px} +.o2k7Skin span.mce_emotions {background-position:-60px -20px} +.o2k7Skin span.mce_fullpage {background-position:-80px -20px} +.o2k7Skin span.mce_fullscreen {background-position:-100px -20px} +.o2k7Skin span.mce_iespell {background-position:-120px -20px} +.o2k7Skin span.mce_insertdate {background-position:-140px -20px} +.o2k7Skin span.mce_inserttime {background-position:-160px -20px} +.o2k7Skin span.mce_absolute {background-position:-180px -20px} +.o2k7Skin span.mce_backward {background-position:-200px -20px} +.o2k7Skin span.mce_forward {background-position:-220px -20px} +.o2k7Skin span.mce_insert_layer {background-position:-240px -20px} +.o2k7Skin span.mce_insertlayer {background-position:-260px -20px} +.o2k7Skin span.mce_movebackward {background-position:-280px -20px} +.o2k7Skin span.mce_moveforward {background-position:-300px -20px} +.o2k7Skin span.mce_media {background-position:-320px -20px} +.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px} +.o2k7Skin span.mce_pastetext {background-position:-360px -20px} +.o2k7Skin span.mce_pasteword {background-position:-380px -20px} +.o2k7Skin span.mce_selectall {background-position:-400px -20px} +.o2k7Skin span.mce_preview {background-position:-420px -20px} +.o2k7Skin span.mce_print {background-position:-440px -20px} +.o2k7Skin span.mce_cancel {background-position:-460px -20px} +.o2k7Skin span.mce_save {background-position:-480px -20px} +.o2k7Skin span.mce_replace {background-position:-500px -20px} +.o2k7Skin span.mce_search {background-position:-520px -20px} +.o2k7Skin span.mce_styleprops {background-position:-560px -20px} +.o2k7Skin span.mce_table {background-position:-580px -20px} +.o2k7Skin span.mce_cell_props {background-position:-600px -20px} +.o2k7Skin span.mce_delete_table {background-position:-620px -20px} +.o2k7Skin span.mce_delete_col {background-position:-640px -20px} +.o2k7Skin span.mce_delete_row {background-position:-660px -20px} +.o2k7Skin span.mce_col_after {background-position:-680px -20px} +.o2k7Skin span.mce_col_before {background-position:-700px -20px} +.o2k7Skin span.mce_row_after {background-position:-720px -20px} +.o2k7Skin span.mce_row_before {background-position:-740px -20px} +.o2k7Skin span.mce_merge_cells {background-position:-760px -20px} +.o2k7Skin span.mce_table_props {background-position:-980px -20px} +.o2k7Skin span.mce_row_props {background-position:-780px -20px} +.o2k7Skin span.mce_split_cells {background-position:-800px -20px} +.o2k7Skin span.mce_template {background-position:-820px -20px} +.o2k7Skin span.mce_visualchars {background-position:-840px -20px} +.o2k7Skin span.mce_abbr {background-position:-860px -20px} +.o2k7Skin span.mce_acronym {background-position:-880px -20px} +.o2k7Skin span.mce_attribs {background-position:-900px -20px} +.o2k7Skin span.mce_cite {background-position:-920px -20px} +.o2k7Skin span.mce_del {background-position:-940px -20px} +.o2k7Skin span.mce_ins {background-position:-960px -20px} +.o2k7Skin span.mce_pagebreak {background-position:0 -40px} +.o2k7Skin .mce_spellchecker span.mceAction {background-position:-540px -20px} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css new file mode 100644 index 00000000..153f0c38 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css @@ -0,0 +1,8 @@ +/* Black */ +.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)} +.o2k7SkinBlack table, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} +.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0} +.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0} +.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;} +.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)} +.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1} \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css new file mode 100644 index 00000000..7fe3b45e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css @@ -0,0 +1,5 @@ +/* Silver */ +.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)} +.o2k7SkinSilver table, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} +.o2k7SkinSilver .mceListBox .mceText {background:#FFF} +.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm b/includes/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm index 1dd2eb16..119a913c 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm +++ b/includes/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm @@ -1,90 +1,32 @@ - - - - -{$lang_theme_code_title} - - - - - -
- - - - - - - - - - - -
{$lang_theme_code_title}
- -
-
- - + + + + {#advanced_dlg.code_title} + + + + + +
+
{#advanced_dlg.code_title}
+ +
+ +
+ +
+ + + +
+
+ +
+ +
+ +
+
+
+ + diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js new file mode 100644 index 00000000..d19fb53f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js @@ -0,0 +1 @@ +(function(){var DOM=tinymce.DOM;tinymce.ThemeManager.requireLangPack('simple');tinymce.create('tinymce.themes.SimpleTheme',{init:function(ed,url){var t=this,states=['Bold','Italic','Underline','Strikethrough','InsertUnorderedList','InsertOrderedList'],s=ed.settings;t.editor=ed;ed.onInit.add(function(){ed.onNodeChange.add(function(ed,cm){tinymce.each(states,function(c){cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c));});});ed.dom.loadCSS(url+"/skins/"+s.skin+"/content.css");});DOM.loadCSS((s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):'')||url+"/skins/"+s.skin+"/ui.css");},renderUI:function(o){var t=this,n=o.targetNode,ic,tb,ed=t.editor,cf=ed.controlManager,sc;n=DOM.insertAfter(DOM.create('span',{id:ed.id+'_container','class':'mceEditor '+ed.settings.skin+'SimpleSkin'}),n);n=sc=DOM.add(n,'table',{cellPadding:0,cellSpacing:0,'class':'mceLayout'});n=tb=DOM.add(n,'tbody');n=DOM.add(tb,'tr');n=ic=DOM.add(DOM.add(n,'td'),'div',{'class':'mceIframeContainer'});n=DOM.add(DOM.add(tb,'tr',{'class':'last'}),'td',{'class':'mceToolbar mceLast',align:'center'});tb=t.toolbar=cf.createToolbar("tools1");tb.add(cf.createButton('bold',{title:'simple.bold_desc',cmd:'Bold'}));tb.add(cf.createButton('italic',{title:'simple.italic_desc',cmd:'Italic'}));tb.add(cf.createButton('underline',{title:'simple.underline_desc',cmd:'Underline'}));tb.add(cf.createButton('strikethrough',{title:'simple.striketrough_desc',cmd:'Strikethrough'}));tb.add(cf.createSeparator());tb.add(cf.createButton('undo',{title:'simple.undo_desc',cmd:'Undo'}));tb.add(cf.createButton('redo',{title:'simple.redo_desc',cmd:'Redo'}));tb.add(cf.createSeparator());tb.add(cf.createButton('cleanup',{title:'simple.cleanup_desc',cmd:'mceCleanup'}));tb.add(cf.createSeparator());tb.add(cf.createButton('insertunorderedlist',{title:'simple.bullist_desc',cmd:'InsertUnorderedList'}));tb.add(cf.createButton('insertorderedlist',{title:'simple.numlist_desc',cmd:'InsertOrderedList'}));tb.renderTo(n);return{iframeContainer:ic,editorContainer:ed.id+'_container',sizeContainer:sc,deltaHeight:-20};},getInfo:function(){return{longname:'Simple theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add('simple',tinymce.themes.SimpleTheme);})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js new file mode 100644 index 00000000..fb0bd789 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js @@ -0,0 +1,85 @@ +/** + * $Id: editor_template_src.js 920 2008-09-09 14:05:33Z spocke $ + * + * This file is meant to showcase how to create a simple theme. The advanced + * theme is more suitable for production use. + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +(function() { + var DOM = tinymce.DOM; + + // Tell it to load theme specific language pack(s) + tinymce.ThemeManager.requireLangPack('simple'); + + tinymce.create('tinymce.themes.SimpleTheme', { + init : function(ed, url) { + var t = this, states = ['Bold', 'Italic', 'Underline', 'Strikethrough', 'InsertUnorderedList', 'InsertOrderedList'], s = ed.settings; + + t.editor = ed; + + ed.onInit.add(function() { + ed.onNodeChange.add(function(ed, cm) { + tinymce.each(states, function(c) { + cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c)); + }); + }); + + ed.dom.loadCSS(url + "/skins/" + s.skin + "/content.css"); + }); + + DOM.loadCSS((s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : '') || url + "/skins/" + s.skin + "/ui.css"); + }, + + renderUI : function(o) { + var t = this, n = o.targetNode, ic, tb, ed = t.editor, cf = ed.controlManager, sc; + + n = DOM.insertAfter(DOM.create('span', {id : ed.id + '_container', 'class' : 'mceEditor ' + ed.settings.skin + 'SimpleSkin'}), n); + n = sc = DOM.add(n, 'table', {cellPadding : 0, cellSpacing : 0, 'class' : 'mceLayout'}); + n = tb = DOM.add(n, 'tbody'); + + // Create iframe container + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(DOM.add(n, 'td'), 'div', {'class' : 'mceIframeContainer'}); + + // Create toolbar container + n = DOM.add(DOM.add(tb, 'tr', {'class' : 'last'}), 'td', {'class' : 'mceToolbar mceLast', align : 'center'}); + + // Create toolbar + tb = t.toolbar = cf.createToolbar("tools1"); + tb.add(cf.createButton('bold', {title : 'simple.bold_desc', cmd : 'Bold'})); + tb.add(cf.createButton('italic', {title : 'simple.italic_desc', cmd : 'Italic'})); + tb.add(cf.createButton('underline', {title : 'simple.underline_desc', cmd : 'Underline'})); + tb.add(cf.createButton('strikethrough', {title : 'simple.striketrough_desc', cmd : 'Strikethrough'})); + tb.add(cf.createSeparator()); + tb.add(cf.createButton('undo', {title : 'simple.undo_desc', cmd : 'Undo'})); + tb.add(cf.createButton('redo', {title : 'simple.redo_desc', cmd : 'Redo'})); + tb.add(cf.createSeparator()); + tb.add(cf.createButton('cleanup', {title : 'simple.cleanup_desc', cmd : 'mceCleanup'})); + tb.add(cf.createSeparator()); + tb.add(cf.createButton('insertunorderedlist', {title : 'simple.bullist_desc', cmd : 'InsertUnorderedList'})); + tb.add(cf.createButton('insertorderedlist', {title : 'simple.numlist_desc', cmd : 'InsertOrderedList'})); + tb.renderTo(n); + + return { + iframeContainer : ic, + editorContainer : ed.id + '_container', + sizeContainer : sc, + deltaHeight : -20 + }; + }, + + getInfo : function() { + return { + longname : 'Simple theme', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + version : tinymce.majorVersion + "." + tinymce.minorVersion + } + } + }); + + tinymce.ThemeManager.add('simple', tinymce.themes.SimpleTheme); +})(); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/img/icons.gif b/includes/tinymce/jscripts/tiny_mce/themes/simple/img/icons.gif new file mode 100644 index 00000000..16af141f Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/simple/img/icons.gif differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ar.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ar.js new file mode 100644 index 00000000..c951766e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ar.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ar.simple',{ +bold_desc:"\u0639\u0631\u064A\u0636(Ctrl+B)", +italic_desc:"\u0645\u0627\u0626\u0644(Ctrl+I)", +underline_desc:"\u062A\u0633\u0637\u064A\u0631 (Ctrl+U)", +striketrough_desc:"\u0634\u0637\u0628", +bullist_desc:"\u0642\u0627\u0626\u0645\u0629 \u0645\u0646\u0642\u0637\u0629", +numlist_desc:"\u0642\u0627\u0626\u0645\u0629 \u0645\u0631\u0642\u0645\u0629", +undo_desc:"\u062A\u0631\u0627\u062C\u0639 (Ctrl+Z)", +redo_desc:"\u0627\u0639\u0627\u062F\u0629 (Ctrl+Y)", +cleanup_desc:"\u062A\u0646\u0635\u064A\u0641 \u0627\u0644\u0623\u0643\u0648\u0627\u062F \u0627\u0644\u062E\u0627\u0637\u0626\u0629" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/bg.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/bg.js new file mode 100644 index 00000000..e59e0a16 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/bg.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('bg.simple',{ +bold_desc:"\u041F\u043E\u043B\u0443\u0447\u0435\u0440 (Ctrl+B)", +italic_desc:"\u041A\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)", +underline_desc:"\u041F\u043E\u0434\u0447\u0435\u0440\u0442\u0430\u043D (Ctrl+U)", +striketrough_desc:"\u0417\u0430\u0447\u0435\u0440\u0442\u0430\u043D", +bullist_desc:"\u0412\u043E\u0434\u0430\u0447\u0438", +numlist_desc:"\u041D\u043E\u043C\u0435\u0440\u0430", +undo_desc:"\u041E\u0442\u043C\u044F\u043D\u0430 (Ctrl+Z)", +redo_desc:"\u0412\u044A\u0437\u0441\u0442\u0430\u043D\u043E\u0432\u044F\u0432\u0430\u043D\u0435 (Ctrl+Y)", +cleanup_desc:"\u0418\u0437\u0447\u0438\u0441\u0442\u0438 \u043A\u043E\u0434\u0430" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/br.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/br.js new file mode 100644 index 00000000..a356df74 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/br.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('br.simple',{ +bold_desc:"Negrito (Ctrl+B)", +italic_desc:"It\u00C3\u0083\u00C2\u00A1lico (Ctrl+I)", +underline_desc:"Sublinhado (Ctrl+U)", +striketrough_desc:"Rasurado", +bullist_desc:"Lista n\u00C3\u0083\u00C2\u00A3o-ordenada", +numlist_desc:"Lista ordenada", +undo_desc:"Desfazer (Ctrl+Z)", +redo_desc:"Refazer (Ctrl+Y)", +cleanup_desc:"Limpar c\u00C3\u0083\u00C2\u00B3digo incorrecto" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/bs.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/bs.js new file mode 100644 index 00000000..74e96042 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/bs.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('bs.simple',{ +bold_desc:"Podebljaj (Ctrl+B)", +italic_desc:"Kurziv (Ctrl+I)", +underline_desc:"Podcrtaj (Ctrl+U)", +striketrough_desc:"Precrtaj", +bullist_desc:"Neure\u0111ena lista", +numlist_desc:"Ure\u0111ena lista", +undo_desc:"Poni\u0161ti (Ctrl+Z)", +redo_desc:"Ponovi (Ctrl+Y)", +cleanup_desc:"Po\u010Disti kod" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ca.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ca.js new file mode 100644 index 00000000..b08d3fcf --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ca.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ca.simple',{ +bold_desc:"Negreta (Ctrl+B)", +italic_desc:"Cursiva (Ctrl+I)", +underline_desc:"Subratllat (Ctrl+U)", +striketrough_desc:"Tatxat", +bullist_desc:"Llista no ordenada", +numlist_desc:"Llista ordenada", +undo_desc:"Desf\u00E9s (Ctrl+Z)", +redo_desc:"Ref\u00E9s (Ctrl+Y)", +cleanup_desc:"Neteja el codi mal format" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ch.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ch.js new file mode 100644 index 00000000..525b17d3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ch.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ch.simple',{ +bold_desc:"\u7C97\u4F53(Ctrl+B)", +italic_desc:"\u659C\u4F53(Ctrl+I)", +underline_desc:"\u5E95\u7EBF(Ctrl+U)", +striketrough_desc:"\u5220\u9664\u7EBF", +bullist_desc:"\u9879\u76EE\u65B9\u5F0F\u5217\u8868", +numlist_desc:"\u7F16\u53F7\u65B9\u5F0F\u5217\u8868", +undo_desc:"\u8FD8\u539F(Ctrl+Z)", +redo_desc:"\u91CD\u590D(Ctrl+Y)", +cleanup_desc:"\u6E05\u9664\u65E0\u6548\u539F\u59CB\u7801" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/cs.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/cs.js new file mode 100644 index 00000000..486c79e8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/cs.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('cs.simple',{ +bold_desc:"Tu\u010Dn\u00E9 (Ctrl+B)", +italic_desc:"Kurz\u00EDva (Ctrl+I)", +underline_desc:"Podtr\u017Een\u00E9 (Ctrl+U)", +striketrough_desc:"P\u0159e\u0161krtnut\u00E9", +bullist_desc:"Seznam s odr\u00E1\u017Ekami", +numlist_desc:"\u010C\u00EDslovan\u00FD seznam", +undo_desc:"Zp\u011Bt (Ctrl+Z)", +redo_desc:"Znovu (Ctrl+Y)", +cleanup_desc:"Vy\u010Distit k\u00F3d" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/da.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/da.js new file mode 100644 index 00000000..c4c32848 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/da.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('da.simple',{ +bold_desc:"Fed (Ctrl+B)", +italic_desc:"Kursiv (Ctrl+I)", +underline_desc:"Understreget (Ctrl+U)", +striketrough_desc:"Gennemstreget", +bullist_desc:"Unummereret punktopstilling", +numlist_desc:"Nummereret punktopstilling", +undo_desc:"Fortryd (Ctrl+Z)", +redo_desc:"Gendan (Ctrl+Y)", +cleanup_desc:"Ryd op i uordentlig kode" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/de.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/de.js new file mode 100644 index 00000000..f0375e94 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/de.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('de.simple',{ +bold_desc:"Fett (Strg+B)", +italic_desc:"Kursiv (Strg+I)", +underline_desc:"Unterstrichen (Strg+U)", +striketrough_desc:"Durchgestrichen", +bullist_desc:"Unsortierte Liste", +numlist_desc:"Sortierte Liste", +undo_desc:"R\u00FCckg\u00E4ngig (Strg+Z)", +redo_desc:"Wiederholen (Strg+Y)", +cleanup_desc:"Quellcode s\u00E4ubern" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/dv.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/dv.js new file mode 100644 index 00000000..40a0d792 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/dv.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('dv.simple',{ +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +cleanup_desc:"Cleanup messy code" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/el.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/el.js new file mode 100644 index 00000000..537cb3b3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/el.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('el.simple',{ +bold_desc:"\u0388\u03BD\u03C4\u03BF\u03BD\u03B1 (Ctrl+B)", +italic_desc:"\u03A0\u03BB\u03AC\u03B3\u03B9\u03B1 (Ctrl+I)", +underline_desc:"\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03BC\u03BC\u03B9\u03C3\u03BC\u03AD\u03BD\u03B1 (Ctrl+U)", +striketrough_desc:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03BC\u03BC\u03B9\u03C3\u03BC\u03AD\u03BD\u03B1", +bullist_desc:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03C7\u03C9\u03C1\u03AF\u03C2 \u03C3\u03B5\u03B9\u03C1\u03AC", +numlist_desc:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03BC\u03B5 \u03C3\u03B5\u03B9\u03C1\u03AC", +undo_desc:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 (Ctrl+Z)", +redo_desc:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7 (Ctrl+Y)", +cleanup_desc:"\u039A\u03B1\u03B8\u03B1\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 \u03BC\u03C0\u03B5\u03C1\u03B4\u03B5\u03BC\u03AD\u03BD\u03BF\u03C5 \u03BA\u03CE\u03B4\u03B9\u03BA\u03B1" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/en.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/en.js new file mode 100644 index 00000000..9f08f102 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/en.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('en.simple',{ +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +cleanup_desc:"Cleanup messy code" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/es.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/es.js new file mode 100644 index 00000000..bf6985f2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/es.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('es.simple',{ +bold_desc:"Negrita (Ctrl+B)", +italic_desc:"Cursiva (Ctrl+I)", +underline_desc:"Subrayado (Ctrl+U)", +striketrough_desc:"Tachado", +bullist_desc:"Lista desordenada", +numlist_desc:"Lista ordenada", +undo_desc:"Deshacer (Ctrl+Z)", +redo_desc:"Rehacer (Ctrl+Y)", +cleanup_desc:"Limpiar c\u00F3digo basura" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/et.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/et.js new file mode 100644 index 00000000..ce3ef22f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/et.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('et.simple',{ +bold_desc:"Rasvane (Ctrl+B)", +italic_desc:"Kursiiv (Ctrl+I)", +underline_desc:"Allajoonitud (Ctrl+U)", +striketrough_desc:"L\u00E4bijoonitud", +bullist_desc:"Ebakorrap\u00E4rane loetelu", +numlist_desc:"Korrap\u00E4rane loetelu", +undo_desc:"V\u00F5ta tagasi (Ctrl+Z)", +redo_desc:"Tee uuesti (Ctrl+Y)", +cleanup_desc:"Puhasta segane kood" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fa.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fa.js new file mode 100644 index 00000000..fdf3fc59 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fa.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('fa.simple',{ +bold_desc:"\u0636\u062E\u06CC\u0645 (Ctrl+B)", +italic_desc:"\u0643\u062C (Ctrl+I)", +underline_desc:"\u0632\u06CC\u0631 \u062E\u0637 (Ctrl+U)", +striketrough_desc:"\u062E\u0637 \u0648\u0633\u0637", +bullist_desc:"\u0644\u06CC\u0633\u062A \u0646\u0627\u0645\u0631\u062A\u0628", +numlist_desc:"\u0644\u06CC\u0633\u062A \u0645\u0631\u062A\u0628", +undo_desc:"\u0627\u0646\u062C\u0627\u0645 \u0639\u0645\u0644 \u0642\u0628\u0644 (Ctrl+Z)", +redo_desc:"\u0627\u0646\u062C\u0627\u0645 \u0639\u0645\u0644 \u0628\u0639\u062F (Ctrl+Y)", +cleanup_desc:"\u067E\u0627\u0643 \u0633\u0627\u0632\u06CC \u0643\u062F \u0647\u0627\u06CC \u0628\u0647\u0645 \u062E\u0648\u0631\u062F\u0647" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fi.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fi.js new file mode 100644 index 00000000..b666d582 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fi.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('fi.simple',{ +bold_desc:"Lihavointi (Ctrl+B)", +italic_desc:"Kursivointi (Ctrl+I)", +underline_desc:"Alleviivaus (Ctrl+U)", +striketrough_desc:"Yliviivaus", +bullist_desc:"J\u00E4rjest\u00E4m\u00E4t\u00F6n lista", +numlist_desc:"J\u00E4rjestetty lista", +undo_desc:"Peru (Ctrl+Z)", +redo_desc:"Tee uudestaan (Ctrl+Y)", +cleanup_desc:"Siisti sekainen koodi" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fr.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fr.js new file mode 100644 index 00000000..f341fd84 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/fr.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('fr.simple',{ +bold_desc:"Gras (Ctrl+B)", +italic_desc:"Italique (Ctrl+I)", +underline_desc:"Soulign\u00E9 (Ctrl+U)", +striketrough_desc:"Barr\u00E9", +bullist_desc:"Liste non-num\u00E9rot\u00E9e", +numlist_desc:"Liste num\u00E9rot\u00E9e", +undo_desc:"D\u00E9faire (Ctrl+Z)", +redo_desc:"Refaire (Ctrl+Y)", +cleanup_desc:"Nettoyer le code non propre" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/gl.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/gl.js new file mode 100644 index 00000000..3d0a7732 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/gl.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('gl.simple',{ +bold_desc:"Negri\u00F1a (Ctrl+B)", +italic_desc:"Cursiva (Ctrl+I)", +underline_desc:"Suli\u00F1ado (Ctrl+U)", +striketrough_desc:"Tachado", +bullist_desc:"Lista desordenada", +numlist_desc:"Lista ordenada", +undo_desc:"Desfacer (Ctrl+Z)", +redo_desc:"Re-facer (Ctrl+Y)", +cleanup_desc:"Limpar lixo no c\u00F3digo" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/he.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/he.js new file mode 100644 index 00000000..ece84f40 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/he.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('he.simple',{ +bold_desc:"\u05DE\u05D5\u05D3\u05D2\u05E9 (Ctrl+B)", +italic_desc:"\u05E0\u05D8\u05D5\u05D9 (Ctrl+I)", +underline_desc:"\u05E7\u05D5 \u05EA\u05D7\u05EA\u05D5\u05DF(Ctrl+U)", +striketrough_desc:"\u05E7\u05D5 \u05D7\u05D5\u05E6\u05D4", +bullist_desc:"\u05EA\u05D1\u05DC\u05D9\u05D8\u05D9\u05DD", +numlist_desc:"\u05DE\u05E1\u05E4\u05D5\u05E8", +undo_desc:"\u05D1\u05D8\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4 (Ctrl+Z)", +redo_desc:"\u05D7\u05D6\u05D5\u05E8 \u05E4\u05E2\u05D5\u05DC\u05D4 (Ctrl+Y)", +cleanup_desc:"\u05E0\u05E7\u05D4 \u05E7\u05D5\u05D3" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/hr.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/hr.js new file mode 100644 index 00000000..aa5750d5 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/hr.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('hr.simple',{ +bold_desc:"Podebljaj (Ctrl+B)", +italic_desc:"Kurziv (Ctrl+I)", +underline_desc:"Podcrtaj (Ctrl+U)", +striketrough_desc:"Precrtaj", +bullist_desc:"Neure\u0111ena lista", +numlist_desc:"Ure\u0111ena lista", +undo_desc:"Poni\u0161ti (Ctrl+Z)", +redo_desc:"Ponovi (Ctrl+Y)", +cleanup_desc:"Po\u010Disti kod" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/hu.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/hu.js new file mode 100644 index 00000000..ccd2d3a9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/hu.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('hu.simple',{ +bold_desc:"F\u00E9lk\u00F6v\u00E9r (Ctrl+B)", +italic_desc:"D\u0151lt (Ctrl+I)", +underline_desc:"Al\u00E1h\u00FAzott (Ctrl+U)", +striketrough_desc:"\u00C1th\u00FAzott", +bullist_desc:"Felsorol\u00E1sos lista", +numlist_desc:"Sorrendezett lista", +undo_desc:"Visszavon (Ctrl+Z)", +redo_desc:"M\u00E9gis v\u00E9grehajt (Ctrl+Y)", +cleanup_desc:"Rendetlen k\u00F3d tiszt\u00EDt\u00E1sa" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ia.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ia.js new file mode 100644 index 00000000..37cd0170 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ia.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ia.simple',{ +bold_desc:"\u7C97\u4F53(Ctrl+B)", +italic_desc:"\u659C\u4F53(Ctrl+I)", +underline_desc:"\u5E95\u7EBF (Ctrl+U)", +striketrough_desc:"\u4E2D\u5212\u7EBF", +bullist_desc:"\u6E05\u5355\u7B26\u53F7", +numlist_desc:"\u7F16\u53F7", +undo_desc:"\u64A4\u9500 (Ctrl+Z)", +redo_desc:"\u6062\u590D (Ctrl+Y)", +cleanup_desc:"\u5220\u9664\u5197\u4F59\u7801" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ii.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ii.js new file mode 100644 index 00000000..9b9391c1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ii.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ii.simple',{ +bold_desc:"\u7C97\u4F53 (Ctrl+B)", +italic_desc:"\u659C\u4F53 (Ctrl+I)", +underline_desc:"\u5E95\u7EBF (Ctrl+U)", +striketrough_desc:"\u5220\u9664\u7EBF", +bullist_desc:"\u9879\u76EE\u65B9\u5F0F\u5217\u8868", +numlist_desc:"\u7F16\u53F7\u65B9\u5F0F\u5217\u8868", +undo_desc:"\u8FD8\u539F (Ctrl+Z)", +redo_desc:"\u91CD\u590D (Ctrl+Y)", +cleanup_desc:"\u6E05\u9664\u5197\u4F59\u4EE3\u7801" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/is.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/is.js new file mode 100644 index 00000000..6f8282a2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/is.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('is.simple',{ +bold_desc:"Feitletra (Ctrl+B)", +italic_desc:"Sk\u00E1letra (Ctrl+I)", +underline_desc:"Undirstrika (Ctrl+U)", +striketrough_desc:"Yfirstrika", +bullist_desc:"B\u00F3lulisti", +numlist_desc:"N\u00FAmera\u00F0ur listi", +undo_desc:"Taka til baka (Ctrl+Z)", +redo_desc:"Endurtaka (Ctrl+Y)", +cleanup_desc:"Hreinsa sk\u00EDtugan k\u00F3\u00F0a" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/it.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/it.js new file mode 100644 index 00000000..33dd6468 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/it.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('it.simple',{ +bold_desc:"Grassetto (Ctrl+B)", +italic_desc:"Corsivo (Ctrl+I)", +underline_desc:"Sottolineato (Ctrl+U)", +striketrough_desc:"Barrato", +bullist_desc:"Lista non ordinata", +numlist_desc:"Lista ordinata", +undo_desc:"Annulla (Ctrl+Z)", +redo_desc:"Ripristina (Ctrl+Y)", +cleanup_desc:"Pulisci codice disordinato" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ja.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ja.js new file mode 100644 index 00000000..abf452ec --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ja.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ja.simple',{ +bold_desc:"\u592A\u5B57 (Ctrl+B)", +italic_desc:"\u659C\u4F53 (Ctrl+I)", +underline_desc:"\u4E0B\u7DDA (Ctrl+U)", +striketrough_desc:"\u6253\u6D88\u3057\u7DDA", +bullist_desc:"\u756A\u53F7\u306A\u3057\u30EA\u30B9\u30C8", +numlist_desc:"\u756A\u53F7\u3064\u304D\u30EA\u30B9\u30C8", +undo_desc:"\u5143\u306B\u623B\u3059 (Ctrl+Z)", +redo_desc:"\u3084\u308A\u76F4\u3059 (Ctrl+Y)", +cleanup_desc:"\u30B3\u30FC\u30C9\u6574\u5F62" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ko.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ko.js new file mode 100644 index 00000000..6ababfaa --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ko.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ko.simple',{ +bold_desc:"\uAD75\uC740 \uAE00\uC528(Ctrl+B)", +italic_desc:"\uC774\uD0E4\uB9AD(Ctrl+I)", +underline_desc:"\uBC11\uC904(Ctrl+U)", +striketrough_desc:"\uCDE8\uC18C\uC120", +bullist_desc:"\uBE44\uC21C\uCC28\uBAA9\uB85D", +numlist_desc:"\uC21C\uCC28\uBAA9\uB85D", +undo_desc:"\uC2E4\uD589\uCDE8\uC18C(Ctrl+Z)", +redo_desc:"\uB2E4\uC2DC\uC2E4\uD589(Ctrl+Y)", +cleanup_desc:"\uC9C0\uC800\uBD84\uD55C \uCF54\uB4DC \uC0AD\uC81C" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/lt.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/lt.js new file mode 100644 index 00000000..cc716d08 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/lt.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('lt.simple',{ +bold_desc:"Storas (Ctrl+B)", +italic_desc:"Pasvir\u0119s (Ctrl+I)", +underline_desc:"Pabrauktas (Ctrl+U)", +striketrough_desc:"Perbrauktas", +bullist_desc:"Ner\u016B\u0161iuotas s\u0105ra\u0161as", +numlist_desc:"R\u016B\u0161iuotas skai\u010Diais s\u0105ra\u0161as", +undo_desc:"Atstatyti (Ctrl+Z)", +redo_desc:"Perdaryti (Ctrl+Y)", +cleanup_desc:"I\u0161valyti netvarking\u0105 kod\u0105" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/lv.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/lv.js new file mode 100644 index 00000000..e6ae787e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/lv.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('lv.simple',{ +bold_desc:"Treknraksts (Ctrl+B)", +italic_desc:"Sl\u012Bpraksts (Ctrl+I)", +underline_desc:"Pasv\u012Btrojums (Ctrl+U)", +striketrough_desc:"P\u0101rsv\u012Btrojums", +bullist_desc:"Nenumur\u0113ts saraksts", +numlist_desc:"Numur\u0113ts saraksts", +undo_desc:"Atsaukt (Ctrl+Z)", +redo_desc:"Atatsaukt (Ctrl+Y)", +cleanup_desc:"Izt\u012Br\u012Bt nek\u0101rt\u012Bgu kodu" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/mk.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/mk.js new file mode 100644 index 00000000..234fa6f4 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/mk.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('mk.simple',{ +bold_desc:"Podebljaj (Ctrl+B)", +italic_desc:"Kurziv (Ctrl+I)", +underline_desc:"Podcrtaj (Ctrl+U)", +striketrough_desc:"Precrtaj", +bullist_desc:"Neure\u0111ena lista", +numlist_desc:"Ure\u0111ena lista", +undo_desc:"Poni\u0161ti (Ctrl+Z)", +redo_desc:"Ponovi (Ctrl+Y)", +cleanup_desc:"Po\u010Disti kod" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/mn.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/mn.js new file mode 100644 index 00000000..b3e3b372 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/mn.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('mn.simple',{ +bold_desc:"\u0422\u043E\u0434 (Ctrl+B)", +italic_desc:"\u041D\u0430\u043B\u0443\u0443 (Ctrl+I)", +underline_desc:"\u0414\u043E\u043E\u0433\u0443\u0443\u0440 \u0437\u0443\u0440\u0430\u0430\u0441 (Ctrl+U)", +striketrough_desc:"\u0414\u0430\u0440\u0441\u0430\u043D", +bullist_desc:"\u0422\u043E\u043E\u0447\u0438\u043B\u0442", +numlist_desc:"\u0414\u0443\u0433\u0430\u0430\u0440\u0442 \u0442\u043E\u043E\u0447\u0438\u043B\u0442", +undo_desc:"\u0411\u0443\u0446\u0430\u0430\u0445 (Ctrl+Z)", +redo_desc:"\u0426\u0443\u0446\u043B\u0430\u0445 (Ctrl+Y)", +cleanup_desc:"\u042D\u0445 \u043A\u043E\u0434\u044B\u0433 \u0446\u044D\u0432\u044D\u0440\u043B\u044D\u0445" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ms.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ms.js new file mode 100644 index 00000000..f2ed53f6 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ms.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ms.simple',{ +bold_desc:"Tebal (Ctrl+B)", +italic_desc:"Condong (Ctrl+I)", +underline_desc:"Garis bawah (Ctrl+U)", +striketrough_desc:"Garis tengah", +bullist_desc:"Senarai tidak tertib", +numlist_desc:"Senarai tertib", +undo_desc:"Buat asal (Ctrl+Z)", +redo_desc:"Buat semula (Ctrl+Y)", +cleanup_desc:"Bersihkan kod yang bersepah" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nb.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nb.js new file mode 100644 index 00000000..9038c372 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nb.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('nb.simple',{ +bold_desc:"Fet", +italic_desc:"Kursiv", +underline_desc:"Understreking", +striketrough_desc:"Gjennomstreking", +bullist_desc:"Punktliste", +numlist_desc:"Nummerliste", +undo_desc:"Angre (Ctrl+Z)", +redo_desc:"Gj\u00F8r om (Ctrl + Y)", +cleanup_desc:"Rens ukurant kode" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nl.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nl.js new file mode 100644 index 00000000..a28ea639 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nl.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('nl.simple',{ +bold_desc:"Vet (Ctrl+B)", +italic_desc:"Cursief (Ctrl+I)", +underline_desc:"Onderstrepen (Ctrl+U)", +striketrough_desc:"Doorhalen", +bullist_desc:"Opsommingstekens", +numlist_desc:"Nummering", +undo_desc:"Ongedaan maken (Ctrl+Z)", +redo_desc:"Herhalen (Ctrl+Y)", +cleanup_desc:"Code opruimen" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nn.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nn.js new file mode 100644 index 00000000..63fc36f1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/nn.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('nn.simple',{ +bold_desc:"Feit", +italic_desc:"Kursiv", +underline_desc:"Understreking", +striketrough_desc:"Gjennomstreking", +bullist_desc:"Punktliste", +numlist_desc:"Nummerliste", +undo_desc:"Angre", +redo_desc:"Gjer om", +cleanup_desc:"Rens grisete kode" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/pl.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/pl.js new file mode 100644 index 00000000..ebc9ec01 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/pl.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('pl.simple',{ +bold_desc:"Pogrubienie (Ctrl+B)", +italic_desc:"Kursywa (Ctrl+I)", +underline_desc:"Podkre\u015Blenie (Ctrl+U)", +striketrough_desc:"Przekre\u015Blenie", +bullist_desc:"Lista nienumerowana", +numlist_desc:"Lista numerowana", +undo_desc:"Cofnij (Ctrl+Z)", +redo_desc:"Pon\u00F3w (Ctrl+Y)", +cleanup_desc:"Wyczy\u015B\u0107 nieuporz\u0105dkowany kod" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/pt.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/pt.js new file mode 100644 index 00000000..cd1890e9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/pt.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('pt.simple',{ +bold_desc:"Negrito (Ctrl+B)", +italic_desc:"It\u00E1lico (Ctrl+I)", +underline_desc:"Sublinhado (Ctrl+U)", +striketrough_desc:"Rasurado", +bullist_desc:"Lista n\u00E3o-ordenada", +numlist_desc:"Lista ordenada", +undo_desc:"Desfazer (Ctrl+Z)", +redo_desc:"Refazer (Ctrl+Y)", +cleanup_desc:"Limpar c\u00F3digo incorrecto" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ro.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ro.js new file mode 100644 index 00000000..3c8b479f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ro.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ro.simple',{ +bold_desc:"\u00CEngro\u015Fat (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Subliniat (Ctrl+U)", +striketrough_desc:"T\u0103iat", +bullist_desc:"List\u0103 neordonat\u0103", +numlist_desc:"List\u0103 ordonat\u0103", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Ref\u0103 (Ctrl+Y)", +cleanup_desc:"Cur\u0103\u0163\u0103 cod invalid" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ru.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ru.js new file mode 100644 index 00000000..8f032c52 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/ru.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ru.simple',{ +bold_desc:"\u041F\u043E\u043B\u0443\u0436\u0438\u0440\u043D\u044B\u0439 (Ctrl+B)", +italic_desc:"\u041A\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)", +underline_desc:"\u041F\u043E\u0434\u0447\u0451\u0440\u043A\u043D\u0443\u0442\u044B\u0439 (Ctrl+U)", +striketrough_desc:"\u041F\u0435\u0440\u0435\u0447\u0451\u0440\u043A\u043D\u0443\u0442\u044B\u0439", +bullist_desc:"\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A", +numlist_desc:"\u041D\u0443\u043C\u0435\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A", +undo_desc:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C (Ctrl+Z)", +redo_desc:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C (Ctrl+Y)", +cleanup_desc:"\u041F\u043E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043A\u0440\u0438\u0432\u043E\u0439 \u043A\u043E\u0434" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sc.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sc.js new file mode 100644 index 00000000..0d650c78 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sc.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('sc.simple',{ +bold_desc:"\u7C97\u4F53(Ctrl+B)", +italic_desc:"\u659C\u4F53(Ctrl+I)", +underline_desc:"\u4E0B\u5212\u7EBF(Ctrl+U)", +striketrough_desc:"\u4E2D\u5212\u7EBF", +bullist_desc:"\u5217\u8868\u7B26\u53F7", +numlist_desc:"\u7F16\u53F7", +undo_desc:"\u64A4\u9500(Ctrl+Z)", +redo_desc:"\u6062\u590D(Ctrl+Y)", +cleanup_desc:"\u5220\u9664\u5197\u4F59\u7801" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/se.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/se.js new file mode 100644 index 00000000..28c61bb3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/se.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('se.simple',{ +bold_desc:"Fet (Ctrl+B)", +italic_desc:"Kursiv (Ctrl+I)", +underline_desc:"Understruken (Ctrl+U)", +striketrough_desc:"Genomstruken", +bullist_desc:"Punktlista", +numlist_desc:"Nummerlista", +undo_desc:"\u00C5ngra (Ctrl+Z)", +redo_desc:"G\u00F6r om (Ctrl+Y)", +cleanup_desc:"St\u00E4da upp i k\u00E4llkoden" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/si.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/si.js new file mode 100644 index 00000000..414c03e3 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/si.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('si.simple',{ +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +cleanup_desc:"Cleanup messy code" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sk.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sk.js new file mode 100644 index 00000000..88e91815 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sk.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('sk.simple',{ +bold_desc:"Tu\u010Dn\u00FD text (Ctrl+B)", +italic_desc:"\u0160ikm\u00FD text (kurziv\u00E1) (Ctrl+I)", +underline_desc:"Pod\u010Diarknut\u00FD text (Ctrl+U)", +striketrough_desc:"Pre\u0161krtnut\u00FD text", +bullist_desc:"Zoznam s odr\u00E1\u017Ekami", +numlist_desc:"\u010C\u00EDslovan\u00FD zoznam", +undo_desc:"Sp\u00E4\u0165 (Ctrl+Z)", +redo_desc:"Znovu (Ctrl+Y)", +cleanup_desc:"Vy\u010Disti\u0165 neupraven\u00FD k\u00F3d" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sl.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sl.js new file mode 100644 index 00000000..42a10f3b --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sl.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('sl.simple',{ +bold_desc:"Krepko (Ctrl+B)", +italic_desc:"Po\u0161evno (Ctrl+I)", +underline_desc:"Pod\u010Drtano (Ctrl+U)", +striketrough_desc:"Pre\u010Drtano", +bullist_desc:"Alineje", +numlist_desc:"Na\u0161tevanje", +undo_desc:"Razveljavi (Ctrl+Z)", +redo_desc:"Uveljavi (Ctrl+Y)", +cleanup_desc:"Pre\u010Disti kodo" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sq.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sq.js new file mode 100644 index 00000000..eaba5d34 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sq.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('sq.simple',{ +bold_desc:"I Trash\u00EB (Ctrl+B)", +italic_desc:"I Pjerr\u00EBt (Ctrl+I)", +underline_desc:"I N\u00EBnvizuar (Ctrl+U)", +striketrough_desc:"Vij\u00EB n\u00EB mes", +bullist_desc:"List\u00EB e parregullt", +numlist_desc:"List\u00EB e rregullt", +undo_desc:"\u00C7b\u00EBj (Ctrl+Z)", +redo_desc:"Rib\u00EBj (Ctrl+Y)", +cleanup_desc:"Pastro kodin" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sr.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sr.js new file mode 100644 index 00000000..b45107b8 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sr.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('sr.simple',{ +bold_desc:"Podebljaj (Ctrl+B)", +italic_desc:"Kurziv (Ctrl+I)", +underline_desc:"Podcrtaj (Ctrl+U)", +striketrough_desc:"Precrtaj", +bullist_desc:"Neure\u0111ena lista", +numlist_desc:"Ure\u0111ena lista", +undo_desc:"Poni\u0161ti (Ctrl+Z)", +redo_desc:"Ponovi (Ctrl+Y)", +cleanup_desc:"Po\u010Disti kod" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sv.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sv.js new file mode 100644 index 00000000..974987ae --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/sv.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('sv.simple',{ +bold_desc:"Fet (Ctrl+B)", +italic_desc:"Kursiv (Ctrl+I)", +underline_desc:"Understruken (Ctrl+U)", +striketrough_desc:"Genomstruken", +bullist_desc:"Punktlista", +numlist_desc:"Nummerlista", +undo_desc:"\u00C5ngra (Ctrl+Z)", +redo_desc:"G\u00F6r om (Ctrl+Y)", +cleanup_desc:"St\u00E4da upp i k\u00E4llkoden" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tr.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tr.js new file mode 100644 index 00000000..af17ab24 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tr.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('tr.simple',{ +bold_desc:"Kal\u0131n (Ctrl+B)", +italic_desc:"E\u011Fik (Ctrl+I)", +underline_desc:"Alt\u0131 \u00E7izgili (Ctrl+U)", +striketrough_desc:"Ortas\u0131 \u00E7izgili", +bullist_desc:"S\u0131ras\u0131z liste", +numlist_desc:"S\u0131ral\u0131 liste", +undo_desc:"Geri al (Ctrl+Z)", +redo_desc:"Tekrarla (Ctrl+Y)", +cleanup_desc:"Da\u011F\u0131n\u0131k kodu temizle" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tt.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tt.js new file mode 100644 index 00000000..83c6b0f2 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tt.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('tt.simple',{ +bold_desc:"\u7C97\u9AD4(Ctrl+B)", +italic_desc:"\u659C\u9AD4(Ctrl+I)", +underline_desc:"\u5E95\u7DDA (Ctrl+U)", +striketrough_desc:"\u4E2D\u5283\u7DDA", +bullist_desc:"\u6E05\u55AE\u7B26\u865F", +numlist_desc:"\u7DE8\u865F", +undo_desc:"\u53D6\u6D88\u8B8A\u66F4 (Ctrl+Z)", +redo_desc:"\u91CD\u4F5C\u8B8A\u66F4 (Ctrl+Y)", +cleanup_desc:"\u6E05\u9664\u5167\u5BB9" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tw.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tw.js new file mode 100644 index 00000000..13069b5f --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/tw.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('tw.simple',{ +bold_desc:"(Ctrl+B)", +italic_desc:"\u659C\u9AD4(Ctrl+I)", +underline_desc:"\u5E95\u7DDA(Ctrl+U)", +striketrough_desc:"\u522A\u9664\u7DDA", +bullist_desc:"\u9805\u76EE\u7B26\u865F", +numlist_desc:"\u7DE8\u865F", +undo_desc:"\u56DE\u5FA9(Ctrl+Z)", +redo_desc:"\u91CD\u505A(Ctrl+Y)", +cleanup_desc:"\u6E05\u9664\u591A\u9918\u4EE3\u78BC" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/uk.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/uk.js new file mode 100644 index 00000000..8b5a2c20 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/uk.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('uk.simple',{ +bold_desc:"\u0416\u0438\u0440\u043D\u0438\u0439 (Ctrl+B)", +italic_desc:"\u041A\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)", +underline_desc:"\u041F\u0456\u0434\u043A\u0440\u0435\u0441\u043B\u0435\u043D\u0438\u0439 (Ctrl+U)", +striketrough_desc:"\u0417\u0430\u043A\u0440\u0435\u0441\u043B\u0435\u043D\u0438\u0439", +bullist_desc:"\u0421\u043F\u0438\u0441\u043E\u043A", +numlist_desc:"\u0421\u043F\u0438\u0441\u043E\u043A \u043D\u0443\u043C\u0435\u0440\u043E\u0432\u0430\u043D\u0438\u0439", +undo_desc:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 (Ctrl+Z)", +redo_desc:"\u041F\u043E\u0432\u0435\u0440\u043D\u0443\u0442\u0438 (Ctrl+Y)", +cleanup_desc:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0437\u0430\u0439\u0432\u0438\u0439 \u043A\u043E\u0434" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/vi.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/vi.js new file mode 100644 index 00000000..36e5dfb9 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/vi.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('vi.simple',{ +bold_desc:"\u0110\u1EADm (Ctrl+B)", +italic_desc:"Nghi\u00EAng (Ctrl+I)", +underline_desc:"G\u1EA1ch ch\u00E2n (Ctrl+U)", +striketrough_desc:"G\u1EA1ch x\u00F3a", +bullist_desc:"Danh s\u00E1ch", +numlist_desc:"Danh s\u00E1ch th\u1EE9 t\u1EF1", +undo_desc:"Kh\u00F4i ph\u1EE5c (Ctrl+Z)", +redo_desc:"L\u1EB7p l\u1EA1i (Ctrl+Y)", +cleanup_desc:"D\u1ECDn d\u1EB9p m\u00E3 l\u1ED9n x\u1ED9n" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/zh.js b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/zh.js new file mode 100644 index 00000000..1b6e1a8c --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/langs/zh.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('zh.simple',{ +bold_desc:"\u9ED1\u4F53(Ctrl+B)", +italic_desc:"\u659C\u4F53(Ctrl+I)", +underline_desc:"\u4E0B\u5212\u7EBF(Ctrl+U)", +striketrough_desc:"\u5220\u9664\u7EBF", +bullist_desc:"\u9879\u76EE\u7B26\u53F7", +numlist_desc:"\u7F16\u53F7", +undo_desc:"\u64A4\u9500(Ctrl+Z)", +redo_desc:"\u91CD\u505A(Ctrl+Y)", +cleanup_desc:"\u6E05\u9664\u591A\u4F59\u4EE3\u7801" +}); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_content.css b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/default/content.css similarity index 65% rename from includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_content.css rename to includes/tinymce/jscripts/tiny_mce/themes/simple/skins/default/content.css index 45540f56..2506c807 100644 --- a/includes/tinymce/jscripts/tiny_mce/themes/advanced/editor_content.css +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/default/content.css @@ -1,23 +1,25 @@ -body { - background-color: #FFFFFF; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; - scrollbar-3dlight-color: #F0F0EE; - scrollbar-arrow-color: #676662; - scrollbar-base-color: #F0F0EE; - scrollbar-darkshadow-color: #DDDDDD; - scrollbar-face-color: #E0E0DD; - scrollbar-highlight-color: #F0F0EE; - scrollbar-shadow-color: #F0F0EE; - scrollbar-track-color: #F5F5F5; -} - -td { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; -} - -pre { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; -} +body, td, pre { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; +} + +body { + background-color: #FFFFFF; +} + +.mceVisualAid { + border: 1px dashed #BBBBBB; +} + +/* MSIE specific */ + +* html body { + scrollbar-3dlight-color: #F0F0EE; + scrollbar-arrow-color: #676662; + scrollbar-base-color: #F0F0EE; + scrollbar-darkshadow-color: #DDDDDD; + scrollbar-face-color: #E0E0DD; + scrollbar-highlight-color: #F0F0EE; + scrollbar-shadow-color: #F0F0EE; + scrollbar-track-color: #F5F5F5; +} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/default/ui.css b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/default/ui.css new file mode 100644 index 00000000..076fe84e --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/default/ui.css @@ -0,0 +1,32 @@ +/* Reset */ +.defaultSimpleSkin table, .defaultSimpleSkin tbody, .defaultSimpleSkin a, .defaultSimpleSkin img, .defaultSimpleSkin tr, .defaultSimpleSkin div, .defaultSimpleSkin td, .defaultSimpleSkin iframe, .defaultSimpleSkin span, .defaultSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} + +/* Containers */ +.defaultSimpleSkin {position:relative} +.defaultSimpleSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;} +.defaultSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;} +.defaultSimpleSkin .mceToolbar {height:24px;} + +/* Layout */ +.defaultSimpleSkin span.mceIcon, .defaultSimpleSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} + +/* Button */ +.defaultSimpleSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px} +.defaultSimpleSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSimpleSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} + +/* Separator */ +.defaultSimpleSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:0 2px 0 4px} + +/* Theme */ +.defaultSimpleSkin span.mce_bold {background-position:0 0} +.defaultSimpleSkin span.mce_italic {background-position:-60px 0} +.defaultSimpleSkin span.mce_underline {background-position:-140px 0} +.defaultSimpleSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSimpleSkin span.mce_undo {background-position:-160px 0} +.defaultSimpleSkin span.mce_redo {background-position:-100px 0} +.defaultSimpleSkin span.mce_cleanup {background-position:-40px 0} +.defaultSimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} +.defaultSimpleSkin span.mce_insertorderedlist {background-position:-80px 0} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/content.css b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/content.css new file mode 100644 index 00000000..595809fa --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/content.css @@ -0,0 +1,17 @@ +body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} + +body {background: #FFF;} +.mceVisualAid {border: 1px dashed #BBB;} + +/* IE */ + +* html body { +scrollbar-3dlight-color: #F0F0EE; +scrollbar-arrow-color: #676662; +scrollbar-base-color: #F0F0EE; +scrollbar-darkshadow-color: #DDDDDD; +scrollbar-face-color: #E0E0DD; +scrollbar-highlight-color: #F0F0EE; +scrollbar-shadow-color: #F0F0EE; +scrollbar-track-color: #F5F5F5; +} diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png new file mode 100644 index 00000000..527e3495 Binary files /dev/null and b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png differ diff --git a/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/ui.css b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/ui.css new file mode 100644 index 00000000..cf6c35d1 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/ui.css @@ -0,0 +1,35 @@ +/* Reset */ +.o2k7SimpleSkin table, .o2k7SimpleSkin tbody, .o2k7SimpleSkin a, .o2k7SimpleSkin img, .o2k7SimpleSkin tr, .o2k7SimpleSkin div, .o2k7SimpleSkin td, .o2k7SimpleSkin iframe, .o2k7SimpleSkin span, .o2k7SimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} + +/* Containers */ +.o2k7SimpleSkin {position:relative} +.o2k7SimpleSkin table.mceLayout {background:#E5EFFD; border:1px solid #ABC6DD;} +.o2k7SimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #ABC6DD;} +.o2k7SimpleSkin .mceToolbar {height:26px;} + +/* Layout */ +.o2k7SimpleSkin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; } +.o2k7SimpleSkin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px} +.o2k7SimpleSkin span.mceIcon, .o2k7SimpleSkin img.mceIcon {display:block; width:20px; height:20px} +.o2k7SimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} + +/* Button */ +.o2k7SimpleSkin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px} +.o2k7SimpleSkin a.mceButton span, .o2k7SimpleSkin a.mceButton img {margin:1px 0 0 1px} +.o2k7SimpleSkin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px} +.o2k7SimpleSkin a.mceButtonActive {background-position:0 -44px} +.o2k7SimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} + +/* Separator */ +.o2k7SimpleSkin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} + +/* Theme */ +.o2k7SimpleSkin span.mce_bold {background-position:0 0} +.o2k7SimpleSkin span.mce_italic {background-position:-60px 0} +.o2k7SimpleSkin span.mce_underline {background-position:-140px 0} +.o2k7SimpleSkin span.mce_strikethrough {background-position:-120px 0} +.o2k7SimpleSkin span.mce_undo {background-position:-160px 0} +.o2k7SimpleSkin span.mce_redo {background-position:-100px 0} +.o2k7SimpleSkin span.mce_cleanup {background-position:-40px 0} +.o2k7SimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} +.o2k7SimpleSkin span.mce_insertorderedlist {background-position:-80px 0} diff --git a/includes/tinymce/jscripts/tiny_mce/tiny_mce.js b/includes/tinymce/jscripts/tiny_mce/tiny_mce.js index b2b01c03..55aba6e3 100644 --- a/includes/tinymce/jscripts/tiny_mce/tiny_mce.js +++ b/includes/tinymce/jscripts/tiny_mce/tiny_mce.js @@ -1,9 +1 @@ -/** - * $RCSfile: tiny_mce.js,v $ - * $Revision: 1.1 $ - * $Date: 2005/03/06 06:22:26 $ - * - * @author Moxiecode - * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved. - */ - function TinyMCE(){this.instances=new Array();this.stickyClassesLookup=new Array();this.windowArgs=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5')!=-1);this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.idCounter=0;this.init=TinyMCE_init;this.addMCEControl=TinyMCE_addMCEControl;this.triggerSave=TinyMCE_triggerSave;this._convertOnClick=TinyMCE__convertOnClick;this.resetForm=TinyMCE_resetForm;this.execCommand=TinyMCE_execCommand;this.execInstanceCommand=TinyMCE_execInstanceCommand;this._createIFrame=TinyMCE__createIFrame;this.handleEvent=TinyMCE_handleEvent;this.setupContent=TinyMCE_setupContent;this.switchClass=TinyMCE_switchClass;this.restoreAndSwitchClass=TinyMCE_restoreAndSwitchClass;this.switchClassSticky=TinyMCE_switchClassSticky;this.restoreClass=TinyMCE_restoreClass;this.setClassLock=TinyMCE_setClassLock;this.addEvent=TinyMCE_addEvent;this.onLoad=TinyMCE_onLoad;this.removeMCEControl=TinyMCE_removeMCEControl;this._initCleanup=TinyMCE__initCleanup;this._cleanupHTML=TinyMCE__cleanupHTML;this._cleanupAttribute=TinyMCE__cleanupAttribute;this._fixInlineStyles=TinyMCE__fixInlineStyles;this._cleanupElementName=TinyMCE__cleanupElementName;this._verifyClass=TinyMCE__verifyClass;this.cleanupNode=TinyMCE_cleanupNode;this.convertStringToXML=TinyMCE_convertStringToXML;this.insertLink=TinyMCE_insertLink;this.insertImage=TinyMCE_insertImage;this.getElementByAttributeValue=TinyMCE_getElementByAttributeValue;this.getElementsByAttributeValue=TinyMCE_getElementsByAttributeValue;this.isBlockElement=TinyMCE_isBlockElement;this.getParentBlockElement=TinyMCE_getParentBlockElement;this.getNodeTree=TinyMCE_getNodeTree;this.getParentElement=TinyMCE_getParentElement;this.getParam=TinyMCE_getParam;this.getLang=TinyMCE_getLang;this.replaceVar=TinyMCE_replaceVar;this.replaceVars=TinyMCE_replaceVars;this.triggerNodeChange=TinyMCE_triggerNodeChange;this.parseURL=TinyMCE_parseURL;this.convertAbsoluteURLToRelativeURL=TinyMCE_convertAbsoluteURLToRelativeURL;this.convertRelativeToAbsoluteURL=TinyMCE_convertRelativeToAbsoluteURL;this.updateContent=TinyMCE_updateContent;this._customCleanup=TinyMCE__customCleanup;this.getContent=TinyMCE_getContent;this.setContent=TinyMCE_setContent;this.importThemeLanguagePack=TinyMCE_importThemeLanguagePack;this.importPluginLanguagePack=TinyMCE_importPluginLanguagePack;this.applyTemplate=TinyMCE_applyTemplate;this.openWindow=TinyMCE_openWindow;this.handleVisualAid=TinyMCE_handleVisualAid;this.setAttrib=TinyMCE_setAttrib;this.getAttrib=TinyMCE_getAttrib;this._getThemeFunction=TinyMCE__getThemeFunction;this._themeExecCommand=TinyMCE__themeExecCommand;this.getControlHTML=TinyMCE_getControlHTML;this._setHTML=TinyMCE__setHTML;this._getElementById=TinyMCE__getElementById;this.getInstanceById=TinyMCE_getInstanceById;this.getEditorId=TinyMCE_getEditorId;this.queryInstanceCommandValue=TinyMCE_queryInstanceCommandValue;this.queryInstanceCommandState=TinyMCE_queryInstanceCommandState;this.getWindowArg=TinyMCE_getWindowArg;this.setWindowArg=TinyMCE_setWindowArg;this.getCSSClasses=TinyMCE_getCSSClasses;this.regexpReplace=TinyMCE_regexpReplace;this.cleanupEventStr=TinyMCE_cleanupEventStr;this.getAbsPosition=TinyMCE_getAbsPosition;this.openFileBrowser=TinyMCE_openFileBrowser;}function TinyMCE_init(settings){var theme,srcMode;this.settings=settings;function defParam(key,def_val){settings[key]=tinyMCE.getParam(key,def_val);}if(typeof(document.execCommand)=='undefined')return;if(!tinyMCE.baseURL){var elements=document.getElementsByTagName('script');for(var i=0;i');document.write('');document.write('');var themePlugins=tinyMCE.getParam('plugins','',true,',');if(this.settings['plugins']!=''){for(var i=0;i');}}function TinyMCE_confirmAdd(e){var elm=tinyMCE.isMSIE?event.srcElement:e.target;var elementId=elm.name?elm.name:elm.id;if(!targetElement.getAttribute('mce_noask')&&confirm(tinyMCELang['lang_edit_confirm']))tinyMCE.addMCEControl(elm,elementId);else targetElement.setAttribute('mce_noask','true');}function TinyMCE_updateContent(form_element_name){var formElement=document.getElementById(form_element_name);for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(inst.formElement==formElement){var doc=inst.getDoc();tinyMCE._setHTML(doc,inst.formElement.value);if(!tinyMCE.isMSIE)doc.body.innerHTML=tinyMCE._cleanupHTML(doc,this.settings,doc.body,inst.visualAid);}}}function TinyMCE_addMCEControl(replace_element,form_element_name,target_document){var id="mce_editor_"+tinyMCE.idCounter++;var inst=new TinyMCEControl(tinyMCE.settings);inst.editorId=id;this.instances[id]=inst;inst.onAdd(replace_element,form_element_name,target_document);}function TinyMCE_triggerSave(skip_cleanup,skip_callback){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];tinyMCE.settings['preformatted']=false;if(typeof(skip_cleanup)=="undefined")skip_cleanup=false;if(typeof(skip_callback)=="undefined")skip_callback=false;tinyMCE._setHTML(inst.getDoc(),inst.getBody().innerHTML);var htm=skip_cleanup?inst.getBody().innerHTML:tinyMCE._cleanupHTML(inst.getDoc(),this.settings,inst.getBody(),this.visualAid,true);if(tinyMCE.settings["encoding"]=="xml"||tinyMCE.settings["encoding"]=="html")htm=tinyMCE.convertStringToXML(htm);if(!skip_callback&&tinyMCE.settings['save_callback']!="")var content=eval(tinyMCE.settings['save_callback']+"(inst.formTargetElementId,htm,inst.getBody());");if((typeof(content)!="undefined")&&content!=null)htm=content;htm=tinyMCE.regexpReplace(htm,"(","(","gi");htm=tinyMCE.regexpReplace(htm,")",")","gi");htm=tinyMCE.regexpReplace(htm,";",";","gi");htm=tinyMCE.regexpReplace(htm,""",""","gi");htm=tinyMCE.regexpReplace(htm,"^","^","gi");inst.formElement.value=htm;}}function TinyMCE__convertOnClick(node){if(tinyMCE.isMSIE5)return;var elms=node.getElementsByTagName("a");for(var i=0;i","gi");content=tinyMCE.regexpReplace(content,"\r","
","gi");content=tinyMCE.regexpReplace(content,"\n","
","gi");}content=tinyMCE._customCleanup("insert_to_editor",content);if(tinyMCE.isMSIE){var styleSheet=document.frames[editor_id].document.createStyleSheet(inst.settings['content_css']);window.setInterval('try{tinyMCE.getCSSClasses(document.frames["'+editor_id+'"].document, "'+editor_id+'");}catch(e){}',500);if(tinyMCE.settings["force_br_newlines"])document.frames[editor_id].document.styleSheets[0].addRule("p","margin: 0px;");var patchFunc=function(){var event=document.frames[editor_id].event;event.target=document.frames[editor_id].document;TinyMCE_handleEvent(event);};var body=document.frames[editor_id].document.body;body.onbeforepaste=patchFunc;body.onbeforecut=patchFunc;body.onpaste=patchFunc;body.editorId=editor_id;}else{var cssImporter=doc.createElement("link");cssImporter.rel="stylesheet";cssImporter.href=inst.settings['content_css'];if(headArr=doc.getElementsByTagName("head"));headArr[0].appendChild(cssImporter);}if(!tinyMCE.isMSIE){var contentElement=inst.getDoc().createElement("body");var doc=inst.getDoc();contentElement.innerHTML=content;if(tinyMCE.settings['force_p_newlines'])content=content.replace(new RegExp('<>','g'),"");if(tinyMCE.settings['cleanup_on_startup'])inst.getBody().innerHTML=tinyMCE._cleanupHTML(doc,this.settings,contentElement);else{content=tinyMCE.regexpReplace(content,"","","gi");content=tinyMCE.regexpReplace(content,"","","gi");inst.getBody().innerHTML=contentElement.innerHTML;}inst.convertAllRelativeURLs();}else{if(tinyMCE.settings['cleanup_on_startup']){tinyMCE._setHTML(inst.getDoc(),content);eval('try {inst.getBody().innerHTML = tinyMCE._cleanupHTML(inst.contentDocument, this.settings, inst.getBody());} catch(e) {}');}else inst.getBody().innerHTML=content;}tinyMCE._convertOnClick(inst.getBody());var parentElm=document.getElementById(inst.editorId+'_parent');if(parentElm.lastChild.nodeName.toLowerCase()=="input")inst.formElement=parentElm.lastChild;else inst.formElement=parentElm.nextSibling;tinyMCE.handleVisualAid(inst.getBody(),true,tinyMCE.settings['visual']);inst.executeCallback('setupcontent_callback','_setupContent',0,editor_id,inst.getBody(),inst.getDoc());if(!tinyMCE.isMSIE)TinyMCE_addEventHandlers(editor_id);tinyMCE.selectedInstance=inst;inst.selectNode(inst.getBody(),true,true);tinyMCE.triggerNodeChange(false);}function TinyMCE_handleEvent(e){switch(e.type){case "submit":var formObj=tinyMCE.isMSIE?window.event.srcElement:e.target;for(var i=0;i");rng.collapse(false);rng.select();tinyMCE.triggerNodeChange(false);return false;}}if(e.keyCode==8||e.keyCode==46){tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(e.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(e.target,"img");tinyMCE.triggerNodeChange(false);}return false;break;case "keyup":case "keydown":if(e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];else return;if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(tinyMCE.selectedInstance._handleBackSpace(e.type)){e.preventDefault();return false;}}tinyMCE.selectedElement=null;tinyMCE.selectedNode=null;var elm=tinyMCE.selectedInstance.getFocusElement();tinyMCE.linkElement=tinyMCE.getParentElement(elm,"a");tinyMCE.imgElement=tinyMCE.getParentElement(elm,"img");tinyMCE.selectedElement=elm;if(tinyMCE.isGecko&&e.type=="keyup"&&e.keyCode==9)tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(),true,tinyMCE.settings['visual']);if(tinyMCE.isGecko&&tinyMCE.settings['document_base_url']!=""+document.location.href&&e.type=="keyup"&&e.ctrlKey&&e.keyCode==86)tinyMCE.selectedInstance.fixBrokenURLs();if(tinyMCE.isMSIE&&tinyMCE.settings['custom_undo_redo']){var keys=new Array(13,45,36,35,33,34,37,38,39,40);var posKey=false;for(var i=0;i18&&e.keyCode!=255)){tinyMCE.selectedInstance.execCommand("mceAddUndoLevel");tinyMCE.selectedInstance.typing=true;tinyMCE.triggerNodeChange(false);}if(posKey&&e.type=="keyup")tinyMCE.triggerNodeChange(false);var ctrlKeys=new Array(66,73,85,86,88);var keys=new Array(8,46);for(var i=0;i0){for(var i=0;i ";if(tinyMCE.isMSIE&&elementName=="script")return "<"+elementName+elementAttribs+">"+node.text+"";if(node.hasChildNodes()){if(elementName=="p"&&tinyMCE.cleanup_force_br_newlines)output+="";else output+="<"+elementName+elementAttribs+">";for(var i=0;i
";else output+="";}else{if(elementName=="a")output+="<"+elementName+elementAttribs+">";else{output+="<"+elementName+elementAttribs+" />";}}return output;case 3:if(node.parentNode.nodeName.toLowerCase()=="script")return node.nodeValue;return this.convertStringToXML(node.nodeValue);case 8:return "";default:return "[UNKNOWN NODETYPE "+node.nodeType+"]";}}function TinyMCE_convertStringToXML(html_data){var output="";for(var i=0;i','','gi');var html=this.cleanupNode(element);if(tinyMCE.settings['debug'])alert("Cleanup process executed in: "+(new Date().getTime()-startTime)+" ms.");html=tinyMCE.regexpReplace(html,'


','
');html=tinyMCE.regexpReplace(html,'

 


 

','
');if(!tinyMCE.isMSIE)html=html.replace(new RegExp('','g'),"");if(tinyMCE.settings['apply_source_formatting']){html=html.replace(new RegExp('<(p|div)([^>]*)>','g'),"\n<$1$2>\n");html=html.replace(new RegExp('<\/(p|div)([^>]*)>','g'),"\n\n");html=html.replace(new RegExp('
','g'),"
\n");}if(tinyMCE.settings['force_br_newlines']){var re=new RegExp('

 

','g');html=html.replace(re,"
");}if(tinyMCE.settings['force_p_newlines']){var re=new RegExp('<>','g');html=html.replace(re,"");}if(html=="
"||html=="

 

")html="";html=tinyMCE._customCleanup(on_save?"get_from_editor":"insert_to_editor",html);if(tinyMCE.settings["preformatted"])return "
"+html+"
";return html;}function TinyMCE_insertLink(href,target,title,onclick){function setAttrib(element,name,value){if(value!=null&&value!="")element.setAttribute(name,value);else element.removeAttribute(name);}this.execCommand("mceAddUndoLevel");if(this.selectedInstance&&this.selectedElement&&this.selectedElement.nodeName.toLowerCase()=="img"){var doc=this.selectedInstance.getDoc();var linkElement=doc.createElement("a");href=eval(tinyMCE.settings['urlconvertor_callback']+"(href, linkElement);");setAttrib(linkElement,'href',href);setAttrib(linkElement,'target',target);setAttrib(linkElement,'title',title);setAttrib(linkElement,'mce_onclick',onclick);linkElement.appendChild(this.selectedElement.cloneNode(true));this.selectedElement.parentNode.replaceChild(linkElement,this.selectedElement);return;}if(!this.linkElement&&this.selectedInstance){this.selectedInstance.contentDocument.execCommand("createlink",false,"#mce_temp_url#");tinyMCE.linkElement=this.getElementByAttributeValue(this.selectedInstance.contentDocument.body,"a","href","#mce_temp_url#");var elementArray=this.getElementsByAttributeValue(this.selectedInstance.contentDocument.body,"a","href","#mce_temp_url#");for(var i=0;i=strTok2.length){for(var i=0;i=strTok2.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(strTok1.length=strTok1.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(breakPoint==1)return url_to_relative;for(var i=0;i<(strTok1.length-(breakPoint-1));i++)outputString+="../";for(var i=breakPoint-1;i=0;i--){if(baseURLParts[i].length==0)continue;newBaseURLParts[newBaseURLParts.length]=baseURLParts[i];}baseURLParts=newBaseURLParts.reverse();var newRelURLParts=new Array();var numBack=0;for(var i=relURLParts.length-1;i>=0;i--){if(relURLParts[i].length==0||relURLParts[i]==".")continue;if(relURLParts[i]=='..'){numBack++;continue;}if(numBack>0){numBack--;continue;}newRelURLParts[newRelURLParts.length]=relURLParts[i];}relURLParts=newRelURLParts.reverse();var len=baseURLParts.length-numBack;var absPath=(len<=0?"":"/")+baseURLParts.slice(0,len).join('/')+"/"+relURLParts.join('/');var start="",end="";if(baseURL['protocol'])start+=baseURL['protocol']+"://";if(baseURL['host'])start+=baseURL['host'];if(baseURL['port'])start+=":"+baseURL['port'];if(relURL['query'])end+="?"+relURL['query'];if(relURL['anchor'])end+="#"+relURL['anchor'];return start+absPath+end;}function TinyMCE_getParam(name,default_value,strip_whitespace,split_chr){var value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");if(strip_whitespace)value=tinyMCE.regexpReplace(value,"[ \t\r\n]","");if(typeof(split_chr)!="undefined"&&split_chr!=null){value=value.split(split_chr);var outArray=new Array();for(var i=0;i0);if(tinyMCE.settings['custom_undo_redo']){undoIndex=inst.undoIndex;undoLevels=inst.undoLevels.length;}inst.executeCallback('handleNodeChangeCallback','_handleNodeChange',0,editorId,elm,undoIndex,undoLevels,inst.visualAid,anySelection);}}if(this.selectedInstance&&(typeof(focus)=="undefined"||focus))this.selectedInstance.contentWindow.focus();}function TinyMCE__customCleanup(type,content){var customCleanup=tinyMCE.settings['cleanup_callback'];if(customCleanup!=""&&eval("typeof("+customCleanup+")")!="undefined")content=eval(customCleanup+"(type, content);");var plugins=tinyMCE.getParam('plugins','',true,',');for(var i=0;i');}function TinyMCE_importPluginLanguagePack(name,valid_languages){var lang="en";valid_languages=valid_languages.split(',');for(var i=0;i');}function TinyMCE_applyTemplate(html,args){html=tinyMCE.replaceVar(html,"themeurl",tinyMCE.themeURL);if(typeof(args)!="undefined")html=tinyMCE.replaceVars(html,args);html=tinyMCE.replaceVars(html,tinyMCE.settings);html=tinyMCE.replaceVars(html,tinyMCELang);return html;}function TinyMCE_openWindow(template,args){var html,width,height,x,y,resizable,scrollbars,url;args['mce_template_file']=template['file'];tinyMCE.windowArgs=args;html=template['html'];if(!(width=template['width']))width=320;if(!(height=template['height']))height=200;if(tinyMCE.isMSIE)height+=30;x=parseInt(screen.width/2.0)-(width/2.0);y=parseInt(screen.height/2.0)-(height/2.0);resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];for(var name in args)url=tinyMCE.replaceVar(url,name,escape(args[name]));if(html){html=tinyMCE.replaceVar(html,"css",this.settings['popups_css']);html=tinyMCE.applyTemplate(html,args);var win=window.open("","mcePopup","top="+y+",left="+x+",scrollbars="+scrollbars+",dialog=yes,minimizable="+resizable+",modal=yes,width="+width+",height="+height+",resizable="+resizable);win.document.write(html);win.document.close();win.resizeTo(width,height);win.focus();}else{if(tinyMCE.isMSIE&&resizable!='yes'){var features="resizable:"+resizable+";scroll:"+scrollbars+";status:yes;center:yes;help:no;dialogWidth:"+width+"px;dialogHeight:"+height+"px;";window.showModalDialog(url,window,features);}else{var win=window.open(url,"mcePopup","top="+y+",left="+x+",scrollbars="+scrollbars+",dialog=yes,minimizable="+resizable+",modal=yes,width="+width+",height="+height+",resizable="+resizable);eval('try { win.resizeTo(width, height); } catch(e) { }');win.focus();}}}function TinyMCE_handleVisualAid(element,deep,state){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}var tableElement=null;switch(element.nodeName.toLowerCase()){case "table":var cssText=element.getAttribute("border")==0?tinyMCE.settings['visual_table_style']:"";var attribValue=getAttrib(element,"width");if(attribValue=="")attribValue=element.clientWidth;element.setAttribute("width",attribValue);var attribValue=getAttrib(element,"height");if(attribValue=="")attribValue=element.clientHeight;element.setAttribute("height",attribValue);element.style.cssText=state?cssText:"";for(var y=0;y

','g');html_content=html_content.replace(re,"
");}doc.body.innerHTML=html_content;if(tinyMCE.isMSIE&&tinyMCE.settings['fix_content_duplication']){var paras=doc.getElementsByTagName("P");for(var i=0;i<\/o:p>","
");html=tinyMCE.regexpReplace(html," <\/o:p>","");html=tinyMCE.regexpReplace(html,"","");html=tinyMCE.regexpReplace(html,"

<\/p>","");html=tinyMCE.regexpReplace(html,"

<\/p>\r\n

<\/p>","");html=tinyMCE.regexpReplace(html,"

 <\/p>","
");html=tinyMCE.regexpReplace(html,"

\s*(

\s*)?","

");html=tinyMCE.regexpReplace(html,"<\/p>\s*(<\/p>\s*)?","

");}doc.body.innerHTML=html;}}function TinyMCE__getElementById(element_id){var elm=document.getElementById(element_id);if(!elm){for(var j=0;j0){var csses=null;eval("try {var csses = tinyMCE.isMSIE ? doc.styleSheets(0).rules : doc.styleSheets[0].cssRules;} catch(e) {}");if(!csses)return null;for(var i=0;i0)tinyMCE.cssClasses=output;return output;}function TinyMCE_regexpReplace(in_str,reg_exp,replace_str,opts){if(typeof(opts)=="undefined")opts='g';var re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);}function TinyMCE_cleanupEventStr(str){str=""+str;str=str.replace('function anonymous()\n{\n','');str=str.replace('\n}','');return str;}function TinyMCE_getAbsPosition(node){var x=0,y=0;var pos=new Object();var parentNode=node;while(parentNode){x+=parentNode.offsetLeft;y+=parentNode.offsetTop;parentNode=parentNode.offsetParent;}pos.absLeft=x;pos.absTop=y;return pos;}function TinyMCE_openFileBrowser(field_name,url,type,win){var cb=tinyMCE.getParam("file_browser_callback");this.setWindowArg("window",win);if(eval('typeof('+cb+')')=="undefined")alert("Callback function: "+cb+" could not be found.");else eval(cb+"(field_name, url, type, win);");}function TinyMCE_getControlHTML(control_name){var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+"_getControlHTML";if(eval("typeof("+templateFunction+")")!='undefined'){var html=eval(templateFunction+"('"+control_name+"');");if(html!="")return tinyMCE.replaceVar(html,"pluginurl",tinyMCE.baseURL+"/plugins/"+themePlugins[i]);}}return eval('TinyMCE_'+tinyMCE.settings['theme']+"_getControlHTML"+"('"+control_name+"');");}function TinyMCE__themeExecCommand(editor_id,element,command,user_interface,value){var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+"_execCommand";if(eval("typeof("+templateFunction+")")!='undefined'){if(eval(templateFunction+"(editor_id, element, command, user_interface, value);"))return true;}}templateFunction='TinyMCE_'+tinyMCE.settings['theme']+"_execCommand";if(eval("typeof("+templateFunction+")")!='undefined')return eval(templateFunction+"(editor_id, element, command, user_interface, value);");return false;}function TinyMCE__getThemeFunction(suffix,skip_plugins){if(skip_plugins)return 'TinyMCE_'+tinyMCE.settings['theme']+suffix;var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+suffix;if(eval("typeof("+templateFunction+")")!='undefined')return templateFunction;}return 'TinyMCE_'+tinyMCE.settings['theme']+suffix;}function TinyMCEControl(settings){this.undoLevels=new Array();this.undoIndex=0;this.settings=settings;this.settings['theme']=tinyMCE.getParam("theme","default");this.settings['width']=tinyMCE.getParam("width",-1);this.settings['height']=tinyMCE.getParam("height",-1);this.executeCallback=TinyMCEControl_executeCallback;this.fixBrokenURLs=TinyMCEControl_fixBrokenURLs;this.convertAllRelativeURLs=TinyMCEControl_convertAllRelativeURLs;this.execCommand=TinyMCEControl_execCommand;this.queryCommandValue=TinyMCEControl_queryCommandValue;this.queryCommandState=TinyMCEControl_queryCommandState;this.onAdd=TinyMCEControl_onAdd;this.getFocusElement=TinyMCEControl_getFocusElement;this.autoResetDesignMode=TinyMCEControl_autoResetDesignMode;this._insertPara=TinyMCEControl__insertPara;this._insertSpace=TinyMCEControl__insertSpace;this._handleBackSpace=TinyMCEControl__handleBackSpace;this.selectNode=TinyMCEControl_selectNode;this.getBody=TinyMCEControl_getBody;this.getDoc=TinyMCEControl_getDoc;this.getWin=TinyMCEControl_getWin;this.getSel=TinyMCEControl_getSel;this.getRng=TinyMCEControl_getRng;}function TinyMCEControl_executeCallback(param,suffix,mode){function isFunc(func_name){if(func_name==null||func_name=="")return false;return eval("typeof("+func_name+")")!="undefined";}function exec(func_name,args){var str=func_name+'(';for(var i=3;i0)rng.selectNodeContents(nodes[0]);else rng.selectNodeContents(node);}else rng.selectNode(node);if(collapse){if(!to_start&&node.nodeType==3){rng.setStart(node,node.nodeValue.length);rng.setEnd(node,node.nodeValue.length);}else rng.collapse(to_start);}sel.removeAllRanges();sel.addRange(rng);}var pos=tinyMCE.getAbsPosition(node);var doc=this.getDoc();var scrollX=doc.body.scrollLeft+doc.documentElement.scrollLeft;var scrollY=doc.body.scrollTop+doc.documentElement.scrollTop;var height=tinyMCE.isMSIE?document.getElementById(this.editorId).style.pixelHeight:parseInt(this.targetElement.style.height);if(!tinyMCE.settings['auto_resize']&&!(node.absTop>scrollY&&node.absTop<(scrollY-25+height)))this.contentWindow.scrollTo(pos.absLeft,pos.absTop-height+25);tinyMCE.selectedElement=null;if(node.nodeType==1)tinyMCE.selectedElement=node;}function TinyMCEControl_getBody(){return this.getDoc().body;}function TinyMCEControl_getDoc(){return this.contentWindow.document;}function TinyMCEControl_getWin(){return this.contentWindow;}function TinyMCEControl_getSel(){if(tinyMCE.isMSIE)return this.getDoc().selection;return this.contentWindow.getSelection();}function TinyMCEControl_getRng(){var sel=this.getSel();if(sel==null)return null;if(tinyMCE.isMSIE)return sel.createRange();return this.getSel().getRangeAt(0);}function TinyMCEControl__insertPara(){function getNodeText(node){var nodes=tinyMCE.getNodeTree(node,new Array(),3);var text="";for(var i=0;i")paraBefore.innerHTML=" ";if(getNodeText(paraAfter)==""||paraAfter.innerHTML=="
")paraAfter.innerHTML=" ";rngBefore.deleteContents();rng.deleteContents();paraAfter.normalize();rng.insertNode(paraAfter);paraBefore.normalize();rngBefore.insertNode(paraBefore);}else{body.innerHTML="

 

 

";paraAfter=body.childNodes[1];}this.selectNode(paraAfter,true,true);return true;}rngBefore.setStartBefore(startChop);rngBefore.setEnd(startNode,startOffset);paraBefore.appendChild(rngBefore.cloneContents());rngAfter.setEndAfter(endChop);rngAfter.setStart(endNode,endOffset);paraAfter.appendChild(rngAfter.cloneContents());if(getNodeText(paraBefore)==""||paraBefore.innerHTML=="
")paraBefore.innerHTML=" ";if(getNodeText(paraAfter)==""||paraAfter.innerHTML=="
")paraAfter.innerHTML=" ";var rng=doc.createRange();if(!startChop.previousSibling&&startChop.parentNode.nodeName.toLowerCase()=='p')rng.setStartBefore(startChop.parentNode);else{if(rngBefore.startContainer.nodeName.toLowerCase()=='p'&&rngBefore.startOffset==0)rng.setStartBefore(rngBefore.startContainer);else rng.setStart(rngBefore.startContainer,rngBefore.startOffset);}if(!endChop.nextSibling&&endChop.parentNode.nodeName.toLowerCase()=='p')rng.setEndAfter(endChop.parentNode);else rng.setEnd(rngAfter.endContainer,rngAfter.endOffset);rng.deleteContents();rng.insertNode(paraAfter);rng.insertNode(paraBefore);paraAfter.normalize();paraBefore.normalize();this.selectNode(paraAfter,true,true);return true;}function TinyMCEControl__handleBackSpace(evt_type){var doc=this.getDoc();var sel=this.contentWindow.getSelection();if(sel==null)return false;var rng=sel.getRangeAt(0);var node=rng.startContainer;var elm=node.nodeType==3?node.parentNode:node;if(node==null)return;if(elm&&elm.nodeName==""){var para=doc.createElement("p");while(elm.firstChild)para.appendChild(elm.firstChild);elm.parentNode.insertBefore(para,elm);elm.parentNode.removeChild(elm);var rng=rng.cloneRange();rng.setStartBefore(node.nextSibling);rng.setEndAfter(node.nextSibling);rng.extractContents();this.selectNode(node.nextSibling,true,true);}var para=tinyMCE.getParentBlockElement(node);if(para!=null&¶.nodeName.toLowerCase()=='p'&&evt_type=="keypress"){var htm=para.innerHTML;var block=tinyMCE.getParentBlockElement(node);if(htm==""||htm==" "||block.nodeName.toLowerCase()=="li"){var prevElm=para.previousSibling;while(prevElm!=null&&prevElm.nodeType!=1)prevElm=prevElm.previousSibling;if(prevElm==null)return false;var nodes=tinyMCE.getNodeTree(prevElm,new Array(),3);var lastTextNode=nodes.length==0?null:nodes[nodes.length-1];if(lastTextNode!=null)this.selectNode(lastTextNode,true,false,false);para.parentNode.removeChild(para);return true;}}return false;}function TinyMCEControl__insertSpace(){return true;}function TinyMCEControl_autoResetDesignMode(){if(!tinyMCE.isMSIE&&tinyMCE.settings['auto_reset_designmode']){var sel=this.contentWindow.getSelection();if(!sel||!sel.rangeCount||sel.rangeCount==0)eval('try { this.getDoc().designMode = "On"; } catch(e) {}');}}function TinyMCEControl_execCommand(command,user_interface,value){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}if(!tinyMCE.isMSIE&&!this.useCSS){this.getDoc().execCommand("useCSS",false,true);this.useCSS=true;}this.contentDocument=this.getDoc();if(tinyMCE._themeExecCommand(this.editorId,this.contentDocument.body,command,user_interface,value))return;if(command!="mceAddUndoLevel"&&command!="Undo"&&command!="Redo"&&command!="mceImage"&&command!="mceLink"&&command!="mceToggleVisualAid"&&(command!="mceInsertTable"&&!user_interface))this.execCommand("mceAddUndoLevel");if(this.getFocusElement()&&this.getFocusElement().nodeName.toLowerCase()=="img"){var align=this.getFocusElement().getAttribute('align');switch(command){case "JustifyLeft":if(align=='left')this.getFocusElement().removeAttribute('align');else this.getFocusElement().setAttribute('align','left');tinyMCE.triggerNodeChange();return;case "JustifyCenter":if(align=='middle')this.getFocusElement().removeAttribute('align');else this.getFocusElement().setAttribute('align','middle');tinyMCE.triggerNodeChange();return;case "JustifyRight":if(align=='right')this.getFocusElement().removeAttribute('align');else this.getFocusElement().setAttribute('align','right');tinyMCE.triggerNodeChange();return;}}if(tinyMCE.settings['force_br_newlines']){var doc=this.getDoc();var alignValue="";if(doc.selection.type!="Control"){switch(command){case "JustifyLeft":alignValue="left";break;case "JustifyCenter":alignValue="center";break;case "JustifyFull":alignValue="justify";break;case "JustifyRight":alignValue="right";break;}if(alignValue!=""){var rng=doc.selection.createRange();if((divElm=tinyMCE.getParentElement(rng.parentElement(),"div"))!=null)divElm.setAttribute("align",alignValue);else if(rng.pasteHTML&&rng.htmlText.length>0)rng.pasteHTML('
'+rng.htmlText+"
");tinyMCE.triggerNodeChange();return;}}}switch(command){case "mceSelectNode":this.selectNode(value);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=value;break;case "mceSelectNodeDepth":var parentNode=this.getFocusElement();for(var i=0;parentNode;i++){if(parentNode.nodeName.toLowerCase()=="body")break;if(parentNode.nodeName.toLowerCase()=="#text"){i--;parentNode=parentNode.parentNode;continue;}if(i==value){this.selectNode(parentNode,false);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=parentNode;return;}parentNode=parentNode.parentNode;}break;case "HiliteColor":if(tinyMCE.isGecko){this.contentDocument.execCommand("useCSS",false,false);this.contentDocument.execCommand('hilitecolor',false,value);this.contentDocument.execCommand("useCSS",false,true);}else this.contentDocument.execCommand('backcolor',false,value);break;case "Cut":case "Copy":case "Paste":var cmdFailed=false;eval('try {this.contentDocument.execCommand(command, user_interface, value);} catch (e) {cmdFailed = true;}');if(tinyMCE.isGecko&&cmdFailed){if(confirm(tinyMCE.getLang('lang_clipboard_msg')))window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');return;}else tinyMCE.triggerNodeChange();break;case "mceLink":var selectedText="";if(tinyMCE.isMSIE){var doc=this.getDoc();var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText=this.contentWindow.getSelection().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return;}var href="",target="",title="",onclick="",action="insert";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=getAttrib(tinyMCE.linkElement,'href');target=getAttrib(tinyMCE.linkElement,'target');title=getAttrib(tinyMCE.linkElement,'title');onclick=getAttrib(tinyMCE.linkElement,'mce_onclick');if(onclick=="")onclick=getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);mceRealHref=getAttrib(tinyMCE.linkElement,'mce_real_href');if(mceRealHref!="")href=mceRealHref;href=eval(tinyMCE.settings['urlconvertor_callback']+"(href, tinyMCE.linkElement, true);");action="update";}if(this.settings['insertlink_callback']){var returnVal=eval(this.settings['insertlink_callback']+"(href, target, title, onclick, action);");if(returnVal&&returnVal['href'])tinyMCE.insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick']);}else{tinyMCE.openWindow(this.insertLinkTemplate,{href:href,target:target,title:title,onclick:onclick,action:action});}break;case "mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img")tinyMCE.imgElement=tinyMCE.selectedElement;if(tinyMCE.imgElement){var imgName=getAttrib(tinyMCE.imgElement,'name');if(imgName.substring(0,4)=='mce_')return;src=getAttrib(tinyMCE.imgElement,'src');alt=getAttrib(tinyMCE.imgElement,'alt');if(alt=="")alt=getAttrib(tinyMCE.imgElement,'title');border=getAttrib(tinyMCE.imgElement,'border');hspace=getAttrib(tinyMCE.imgElement,'hspace');vspace=getAttrib(tinyMCE.imgElement,'vspace');width=getAttrib(tinyMCE.imgElement,'width');height=getAttrib(tinyMCE.imgElement,'height');align=getAttrib(tinyMCE.imgElement,'align');onmouseover=getAttrib(tinyMCE.imgElement,'onmouseover');onmouseout=getAttrib(tinyMCE.imgElement,'onmouseout');title=getAttrib(tinyMCE.imgElement,'title');onmouseover=tinyMCE.cleanupEventStr(onmouseover);onmouseout=tinyMCE.cleanupEventStr(onmouseout);mceRealSrc=getAttrib(tinyMCE.imgElement,'mce_real_src');if(mceRealSrc!="")src=mceRealSrc;src=eval(tinyMCE.settings['urlconvertor_callback']+"(src, tinyMCE.imgElement, true);");action="update";}if(this.settings['insertimage_callback']){var returnVal=eval(this.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])tinyMCE.insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout']);}else tinyMCE.openWindow(this.insertImageTemplate,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action});break;case "mceCleanupWord":if(tinyMCE.isMSIE){var html=this.contentDocument.body.createTextRange().htmlText;if(html.indexOf('="mso')!=-1){tinyMCE._setHTML(this.contentDocument,this.contentDocument.body.innerHTML);html=tinyMCE._cleanupHTML(this.contentDocument,this.settings,this.contentDocument.body,this.visualAid);}this.contentDocument.body.innerHTML=html;}break;case "mceCleanup":tinyMCE._setHTML(this.contentDocument,this.contentDocument.body.innerHTML);this.contentDocument.body.innerHTML=tinyMCE._cleanupHTML(this.contentDocument,this.settings,this.contentDocument.body,this.visualAid);tinyMCE.triggerNodeChange();break;case "mceAnchor":if(!user_interface){var aElm=tinyMCE.getParentElement(this.getFocusElement(),"a","name");if(aElm){if(value==null||value==""){if(tinyMCE.isMSIE){aElm.outerHTML=aElm.innerHTML;}else{var rng=aElm.ownerDocument.createRange();rng.setStartBefore(aElm);rng.setEndAfter(aElm);rng.deleteContents();rng.insertNode(rng.createContextualFragment(aElm.innerHTML));}}else aElm.setAttribute('name',value);}else{this.contentDocument.execCommand("fontname",false,"#mce_temp_font#");var elementArray=tinyMCE.getElementsByAttributeValue(this.contentDocument.body,"font","face","#mce_temp_font#");for(var x=0;x0){value=tinyMCE.replaceVar(value,"selection",selectedText);tinyMCE.execCommand('mceInsertContent',false,value);}tinyMCE.triggerNodeChange();break;case "mceSetAttribute":if(typeof(value)=='object'){var targetElms=(typeof(value['targets'])=="undefined")?"p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address":value['targets'];var targetNode=tinyMCE.getParentElement(this.getFocusElement(),targetElms);if(targetNode){targetNode.setAttribute(value['name'],value['value']);tinyMCE.triggerNodeChange();}}break;case "mceSetCSSClass":var selectedText=false;if(tinyMCE.isMSIE){var doc=this.getDoc();var rng=doc.selection.createRange();selectedText=(rng.text&&rng.text.length>0);}else selectedText=(this.contentWindow.getSelection().toString().length>0);if(tinyMCE.selectedNode)tinyMCE.selectedElement=tinyMCE.selectedNode;if(selectedText&&!tinyMCE.selectedNode){this.contentDocument.execCommand("removeformat",false,null);this.contentDocument.execCommand("fontname",false,"#mce_temp_font#");var elementArray=tinyMCE.getElementsByAttributeValue(this.contentDocument.body,"font","face","#mce_temp_font#");for(var x=0;xcustomUndoLevels){for(var i=0;i0){this.undoIndex--;this.getBody().innerHTML=this.undoLevels[this.undoIndex];}tinyMCE.triggerNodeChange();}else this.contentDocument.execCommand(command,user_interface,value);break;case "Redo":if(tinyMCE.settings['custom_undo_redo']){if(this.undoIndex<(this.undoLevels.length-1)){this.undoIndex++;this.getBody().innerHTML=this.undoLevels[this.undoIndex];}tinyMCE.triggerNodeChange();}else this.contentDocument.execCommand(command,user_interface,value);break;case "mceToggleVisualAid":this.visualAid=!this.visualAid;tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid);tinyMCE.triggerNodeChange();break;default:this.contentDocument.execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();}}function TinyMCEControl_queryCommandValue(command){return this.getDoc().queryCommandValue(command);}function TinyMCEControl_queryCommandState(command){return this.getDoc().queryCommandState(command);}function TinyMCEControl_onAdd(replace_element,form_element_name,target_document){var targetDoc=target_document?target_document:document;this.targetDoc=targetDoc;tinyMCE.themeURL=tinyMCE.baseURL+"/themes/"+this.settings['theme'];this.settings['themeurl']=tinyMCE.themeURL;if(!replace_element){alert("Error: Could not find the target element.");return false;}var templateFunction=tinyMCE._getThemeFunction('_getInsertLinkTemplate');if(eval("typeof("+templateFunction+")")!='undefined')this.insertLinkTemplate=eval(templateFunction+'(this.settings);');var templateFunction=tinyMCE._getThemeFunction('_getInsertImageTemplate');if(eval("typeof("+templateFunction+")")!='undefined')this.insertImageTemplate=eval(templateFunction+'(this.settings);');var templateFunction=tinyMCE._getThemeFunction('_getEditorTemplate');if(eval("typeof("+templateFunction+")")=='undefined'){alert("Error: Could not find the template function: "+templateFunction);return false;}var editorTemplate=eval(templateFunction+'(this.settings, this.editorId);');var deltaWidth=editorTemplate['delta_width']?editorTemplate['delta_width']:0;var deltaHeight=editorTemplate['delta_height']?editorTemplate['delta_height']:0;var html=''+editorTemplate['html'];var templateFunction=tinyMCE._getThemeFunction('_handleNodeChange',true);if(eval("typeof("+templateFunction+")")!='undefined')this.settings['handleNodeChangeCallback']=templateFunction;html=tinyMCE.replaceVar(html,"editor_id",this.editorId);html=tinyMCE.replaceVar(html,"default_document",tinyMCE.baseURL+"/blank.htm");this.settings['default_document']=tinyMCE.baseURL+"/blank.htm";this.settings['old_width']=this.settings['width'];this.settings['old_height']=this.settings['height'];if(this.settings['width']==-1)this.settings['width']=replace_element.offsetWidth;if(this.settings['height']==-1)this.settings['height']=replace_element.offsetHeight;if(replace_element.offsetWidth==0)this.settings['width']=320;if(replace_element.offsetHeight==0)this.settings['height']=240;this.settings['area_width']=this.settings['width'];this.settings['area_height']=this.settings['height'];this.settings['area_width']+=deltaWidth;this.settings['area_height']+=deltaHeight;if((""+this.settings['width']).indexOf('%')!=-1)this.settings['area_width']="100%";if((""+this.settings['height']).indexOf('%')!=-1)this.settings['area_height']="100%";if((""+replace_element.style.width).indexOf('%')!=-1){this.settings['width']=replace_element.style.width;this.settings['area_width']="100%";}if((""+replace_element.style.height).indexOf('%')!=-1){this.settings['height']=replace_element.style.height;this.settings['area_height']="100%";}html=tinyMCE.applyTemplate(html);this.settings['width']=this.settings['old_width'];this.settings['height']=this.settings['old_height'];this.visualAid=this.settings['visual'];this.formTargetElementId=form_element_name;if(replace_element.nodeName.toLowerCase()=="textarea")this.startContent=replace_element.value;else this.startContent=replace_element.innerHTML;if(replace_element.nodeName.toLowerCase()!="textarea"){this.oldTargetElement=replace_element.cloneNode(true);if(tinyMCE.settings['debug'])html+='';else html+='';html+='';if(!tinyMCE.isMSIE){var rng=replace_element.ownerDocument.createRange();rng.setStartBefore(replace_element);var fragment=rng.createContextualFragment(html);replace_element.parentNode.replaceChild(fragment,replace_element);}else replace_element.outerHTML=html;}else{html+='';this.oldTargetElement=replace_element;if(!tinyMCE.settings['debug'])this.oldTargetElement.style.display="none";if(!tinyMCE.isMSIE){var rng=replace_element.ownerDocument.createRange();rng.setStartBefore(replace_element);var fragment=rng.createContextualFragment(html);replace_element.parentNode.insertBefore(fragment,replace_element);}else replace_element.insertAdjacentHTML("beforeBegin",html);}var dynamicIFrame=false;var tElm=targetDoc.getElementById(this.editorId);if(!tinyMCE.isMSIE){if(tElm&&tElm.nodeName.toLowerCase()=="span"){tElm=tinyMCE._createIFrame(tElm);dynamicIFrame=true;}this.targetElement=tElm;this.iframeElement=tElm;this.contentDocument=tElm.contentDocument;this.contentWindow=tElm.contentWindow;}else{if(tElm&&tElm.nodeName.toLowerCase()=="span")tElm=tinyMCE._createIFrame(tElm);else tElm=targetDoc.frames[this.editorId];this.targetElement=tElm;this.iframeElement=targetDoc.getElementById(this.editorId);this.contentDocument=tElm.window.document;this.contentWindow=tElm.window;this.contentDocument.designMode="on";}var doc=this.contentDocument;if(dynamicIFrame){var html=""+''+''+''+''+'blank_page'+''+''+''+''+'';try{this.getDoc().designMode="on";doc.open();doc.write(html);doc.close();}catch(e){this.getDoc().location.href=tinyMCE.baseURL+"/blank.htm";}}if(tinyMCE.isMSIE)window.setTimeout("TinyMCE_addEventHandlers('"+this.editorId+"');",1);tinyMCE.setupContent(this.editorId);return true;}function TinyMCEControl_getFocusElement(){if(tinyMCE.isMSIE){var doc=this.getDoc();var rng=doc.selection.createRange();var elm=rng.item?rng.item(0):rng.parentElement();}else{var sel=this.contentWindow.getSelection();var elm=(sel&&sel.anchorNode)?sel.anchorNode:null;if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img")elm=tinyMCE.selectedElement;}return elm;}var tinyMCE=new TinyMCE();var tinyMCELang=new Array(); \ No newline at end of file +var tinymce={majorVersion:'3',minorVersion:'2.1.1',releaseDate:'2008-11-27',_init:function(){var t=this,d=document,w=window,na=navigator,ua=na.userAgent,i,nl,n,base,p,v;t.isOpera=w.opera&&opera.buildNumber;t.isWebKit=/WebKit/.test(ua);t.isOldWebKit=t.isWebKit&&!w.getSelection().getRangeAt;t.isIE=!t.isWebKit&&!t.isOpera&&(/MSIE/gi).test(ua)&&(/Explorer/gi).test(na.appName);t.isIE6=t.isIE&&/MSIE [56]/.test(ua);t.isGecko=!t.isWebKit&&/Gecko/.test(ua);t.isMac=ua.indexOf('Mac')!=-1;t.isAir=/adobeair/i.test(ua);if(w.tinyMCEPreInit){t.suffix=tinyMCEPreInit.suffix;t.baseURL=tinyMCEPreInit.base;t.query=tinyMCEPreInit.query;return;}t.suffix='';nl=d.getElementsByTagName('base');for(i=0;i=items.length){for(i=0,l=base.length;i=items.length||base[i]!=items[i]){bp=i+1;break;}}}if(base.length=base.length||base[i]!=items[i]){bp=i+1;break;}}}if(bp==1)return path;for(i=0,l=base.length-(bp-1);i=0;i--){if(path[i].length==0||path[i]==".")continue;if(path[i]=='..'){nb++;continue;}if(nb>0){nb--;continue;}o.push(path[i]);}i=base.length-nb;if(i<=0)return'/'+o.reverse().join('/');return'/'+base.slice(0,i).join('/')+'/'+o.reverse().join('/');},getURI:function(nh){var s,t=this;if(!t.source||nh){s='';if(!nh){if(t.protocol)s+=t.protocol+'://';if(t.userInfo)s+=t.userInfo+'@';if(t.host)s+=t.host;if(t.port)s+=':'+t.port;}if(t.path)s+=t.path;if(t.query)s+='?'+t.query;if(t.anchor)s+='#'+t.anchor;t.source=s;}return t.source;}});})();(function(){var each=tinymce.each;tinymce.create('static tinymce.util.Cookie',{getHash:function(n){var v=this.get(n),h;if(v){each(v.split('&'),function(v){v=v.split('=');h=h||{};h[unescape(v[0])]=unescape(v[1]);});}return h;},setHash:function(n,v,e,p,d,s){var o='';each(v,function(v,k){o+=(!o?'':'&')+escape(k)+'='+escape(v);});this.set(n,o,e,p,d,s);},get:function(n){var c=document.cookie,e,p=n+"=",b;if(!c)return;b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0)return null;}else b+=2;e=c.indexOf(";",b);if(e==-1)e=c.length;return unescape(c.substring(b+p.length,e));},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+((e)?"; expires="+e.toGMTString():"")+((p)?"; path="+escape(p):"")+((d)?"; domain="+d:"")+((s)?"; secure":"");},remove:function(n,p){var d=new Date();d.setTime(d.getTime()-1000);this.set(n,'',d,p,d);}});})();tinymce.create('static tinymce.util.JSON',{serialize:function(o){var i,v,s=tinymce.util.JSON.serialize,t;if(o==null)return'null';t=typeof o;if(t=='string'){v='\bb\tt\nn\ff\rr\""\'\'\\\\';return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(a,b){i=v.indexOf(b);if(i+1)return'\\'+v.charAt(i+1);a=b.charCodeAt().toString(16);return'\\u'+'0000'.substring(a.length)+a;})+'"';}if(t=='object'){if(o instanceof Array){for(i=0,v='[';i0?',':'')+s(o[i]);return v+']';}v='{';for(i in o)v+=typeof o[i]!='function'?(v.length>1?',"':'"')+i+'":'+s(o[i]):'';return v+'}';}return''+o;},parse:function(s){try{return eval('('+s+')');}catch(ex){}}});tinymce.create('static tinymce.util.XHR',{send:function(o){var x,t,w=window,c=0;o.scope=o.scope||this;o.success_scope=o.success_scope||o.scope;o.error_scope=o.error_scope||o.scope;o.async=o.async===false?false:true;o.data=o.data||'';function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;};x=w.XMLHttpRequest?new XMLHttpRequest():get('Microsoft.XMLHTTP')||get('Msxml2.XMLHTTP');if(x){if(x.overrideMimeType)x.overrideMimeType(o.content_type);x.open(o.type||(o.data?'POST':'GET'),o.url,o.async);if(o.content_type)x.setRequestHeader('Content-Type',o.content_type);x.send(o.data);function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&c<10000&&x.status==200)o.success.call(o.success_scope,''+x.responseText,x,o);else if(o.error)o.error.call(o.error_scope,c>10000?'TIMED_OUT':'GENERAL',x,o);x=null;}else w.setTimeout(ready,10);};if(!o.async)return ready();t=w.setTimeout(ready,10);}}});(function(){var extend=tinymce.extend,JSON=tinymce.util.JSON,XHR=tinymce.util.XHR;tinymce.create('tinymce.util.JSONRequest',{JSONRequest:function(s){this.settings=extend({},s);this.count=0;},send:function(o){var ecb=o.error,scb=o.success;o=extend(this.settings,o);o.success=function(c,x){c=JSON.parse(c);if(typeof(c)=='undefined'){c={error:'JSON Parse error.'};}if(c.error)ecb.call(o.error_scope||o.scope,c.error,x);else scb.call(o.success_scope||o.scope,c.result);};o.error=function(ty,x){ecb.call(o.error_scope||o.scope,ty,x);};o.data=JSON.serialize({id:o.id||'c'+(this.count++),method:o.method,params:o.params});o.content_type='application/json';XHR.send(o);},'static':{sendRPC:function(o){return new tinymce.util.JSONRequest().send(o);}}});}());(function(){var each=tinymce.each,is=tinymce.is;var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;tinymce.create('tinymce.dom.DOMUtils',{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(d,s){var t=this;t.doc=d;t.win=window;t.files={};t.cssFlicker=false;t.counter=0;t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";t.stdMode=d.documentMode===8;this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);if(tinymce.isIE6){try{d.execCommand('BackgroundImageCache',false,true);}catch(e){t.cssFlicker=true;}}tinymce.addUnload(t.destroy,t);},getRoot:function(){var t=this,s=t.settings;return(s&&t.get(s.root_element))||t.doc.body;},getViewPort:function(w){var d,b;w=!w?this.win:w;d=w.document;b=this.boxModel?d.documentElement:d.body;return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight};},getRect:function(e){var p,t=this,sr;e=t.get(e);p=t.getPos(e);sr=t.getSize(e);return{x:p.x,y:p.y,w:sr.w,h:sr.h};},getSize:function(e){var t=this,w,h;e=t.get(e);w=t.getStyle(e,'width');h=t.getStyle(e,'height');if(w.indexOf('px')===-1)w=0;if(h.indexOf('px')===-1)h=0;return{w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight};},getParent:function(n,f,r){var na,se=this.settings;n=this.get(n);if(se.strict_root)r=r||this.getRoot();if(is(f,'string')){na=f.toUpperCase();f=function(n){var s=false;if(n.nodeType==1&&na==='*'){s=true;return false;}each(na.split(','),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName.toUpperCase()==v)){s=true;return false;}});return s;};}while(n){if(n==r)return null;if(f(n))return n;n=n.parentNode;}return null;},get:function(e){var n;if(e&&this.doc&&typeof(e)=='string'){n=e;e=this.doc.getElementById(e);if(e&&e.id!==n)return this.doc.getElementsByName(n)[1];}return e;},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n,xp;s=t.get(s)||t.doc;if(s.querySelectorAll){if(s!=t.doc){i=s.id;s.id='_mc_tmp';pa='#_mc_tmp '+pa;}l=tinymce.grep(s.querySelectorAll(pa));s.id=i;return l;}if(!t.selectorRe)t.selectorRe=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i;;if(tinymce.isAir){each(tinymce.explode(pa),function(v){if(!(xp=t.cache[v])){xp='';each(v.split(' '),function(v){v=t.selectorRe.exec(v);xp+=v[1]?'//'+v[1]:'//*';if(v[2])xp+="[@id='"+v[2]+"']";if(v[3]){each(v[3].split('.'),function(n){xp+="[@class = '"+n+"' or contains(concat(' ', @class, ' '), ' "+n+" ')]";});}});t.cache[v]=xp;}xp=t.doc.evaluate(xp,s,null,4,null);while(n=xp.iterateNext())o.push(n);});return o;}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase());};}else{function get(s,n){return s.getElementsByTagName(n);};}if(t.elmPattern.test(pa)){x=get(s,pa);for(i=0,l=x.length;i=0;i--)cs+='}, '+(i?'n':'s')+');';cs+='})';t.cache[pa]=cs=eval(cs);}cs(isIE?collectIE:collect,s);});each(o,function(n){if(isIE)n.removeAttribute('mce_save');else delete n.mce_save;});return o;},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e,k;e=is(n,'string')?t.doc.createElement(n):n;t.setAttribs(e,a);if(h){if(h.nodeType)e.appendChild(h);else t.setHTML(e,h);}return!c?p.appendChild(e):e;});},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1);},createHTML:function(n,a,h){var o='',t=this,k;o+='<'+n;for(k in a){if(a.hasOwnProperty(k))o+=' '+k+'="'+t.encode(a[k])+'"';}if(tinymce.is(h))return o+'>'+h+'';return o+' />';},remove:function(n,k){return this.run(n,function(n){var p,g;p=n.parentNode;if(!p)return null;if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n);});}return p.removeChild(n);});},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s,i;s=e.style;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(t.pixelStyles.test(na)&&(tinymce.is(v,'number')||/^[\-0-9\.]+$/.test(v)))v+='px';switch(na){case'opacity':if(isIE){s.filter=v===''?'':"alpha(opacity="+(v*100)+")";if(!n.currentStyle||!n.currentStyle.hasLayout)s.display='inline-block';}s[na]=s['-moz-opacity']=s['-khtml-opacity']=v||'';break;case'float':isIE?s.styleFloat=v:s.cssFloat=v;break;default:s[na]=v||'';}if(t.settings.update_styles)t.setAttrib(e,'mce_style');});},getStyle:function(n,na,c){n=this.get(n);if(!n)return false;if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return'-'+a;});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na);}catch(ex){return null;}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(na=='float')na=isIE?'styleFloat':'cssFloat';if(n.currentStyle&&c)return n.currentStyle[na];return n.style[na];},setStyles:function(e,o){var t=this,s=t.settings,ol;ol=s.update_styles;s.update_styles=0;each(o,function(v,n){t.setStyle(e,n,v);});s.update_styles=ol;if(s.update_styles)t.setAttrib(e,s.cssText);},setAttrib:function(e,n,v){var t=this;if(!e||!n)return;if(t.settings.strict)n=n.toLowerCase();return this.run(e,function(e){var s=t.settings;switch(n){case"style":if(!is(v,'string')){each(v,function(v,n){t.setStyle(e,n,v);});return;}if(s.keep_values){if(v&&!t._isRes(v))e.setAttribute('mce_style',v,2);else e.removeAttribute('mce_style',2);}e.style.cssText=v;break;case"class":e.className=v||'';break;case"src":case"href":if(s.keep_values){if(s.url_converter)v=s.url_converter.call(s.url_converter_scope||t,v,n,e);t.setAttrib(e,'mce_'+n,v,2);}break;case"shape":e.setAttribute('mce_style',v);break;}if(is(v)&&v!==null&&v.length!==0)e.setAttribute(n,''+v,2);else e.removeAttribute(n,2);});},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v);});});},getAttrib:function(e,n,dv){var v,t=this;e=t.get(e);if(!e||e.nodeType!==1)return false;if(!is(dv))dv='';if(/^(src|href|style|coords|shape)$/.test(n)){v=e.getAttribute("mce_"+n);if(v)return v;}if(isIE&&t.props[n]){v=e[t.props[n]];v=v&&v.nodeValue?v.nodeValue:v;}if(!v)v=e.getAttribute(n,2);if(n==='style'){v=v||e.style.cssText;if(v){v=t.serializeStyle(t.parseStyle(v));if(t.settings.keep_values&&!t._isRes(v))e.setAttribute('mce_style',v);}}if(isWebKit&&n==="class"&&v)v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,'');if(isIE){switch(n){case'rowspan':case'colspan':if(v===1)v='';break;case'size':if(v==='+0'||v===20)v='';break;case'width':case'height':case'vspace':case'checked':case'disabled':case'readonly':if(v===0)v='';break;case'hspace':if(v===-1)v='';break;case'maxlength':case'tabindex':if(v===32768||v===2147483647||v==='32768')v='';break;case'compact':case'noshade':case'nowrap':if(v===65535)return n;return dv;case'shape':v=v.toLowerCase();break;default:if(n.indexOf('on')===0&&v)v=(''+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1');}}return(v!==undefined&&v!==null&&v!=='')?''+v:dv;},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;n=t.get(n);if(n&&isIE){n=n.getBoundingClientRect();e=t.boxModel?d.documentElement:d.body;x=t.getStyle(t.select('html')[0],'borderWidth');x=(x=='medium'||t.boxModel&&!t.isIE6)&&2||x;n.top+=t.win.self!=t.win.top?2:0;return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x};}r=n;while(r){x+=r.offsetLeft||0;y+=r.offsetTop||0;r=r.offsetParent;}r=n;while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;y-=r.scrollTop||0;}r=r.parentNode;if(r==d.body)break;}return{x:x,y:y};},parseStyle:function(st){var t=this,s=t.settings,o={};if(!st)return o;function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p+'-right'+s];if(t!=r)return;b=o[p+'-bottom'+s];if(r!=b)return;l=o[p+'-left'+s];if(b!=l)return;o[ot]=l;delete o[p+'-top'+s];delete o[p+'-right'+s];delete o[p+'-bottom'+s];delete o[p+'-left'+s];};function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)return;t=o[c];if(!t)return;o[ta]=o[a]+' '+o[b]+' '+o[c];delete o[a];delete o[b];delete o[c];};st=st.replace(/&(#?[a-z0-9]+);/g,'&$1_MCE_SEMI_');each(st.split(';'),function(v){var sv,ur=[];if(v){v=v.replace(/_MCE_SEMI_/g,';');v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);return'url('+ur.length+')';});v=v.split(':');sv=tinymce.trim(v[1]);sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1];});sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return'url('+s.url_converter.call(s.url_converter_scope||t,t.decode(c),'style',null)+')';});}o[tinymce.trim(v[0]).toLowerCase()]=sv;}});compress("border","","border");compress("border","-width","border-width");compress("border","-color","border-color");compress("border","-style","border-style");compress("padding","","padding");compress("margin","","margin");compress2('border','border-width','border-style','border-color');if(isIE){if(o.border=='medium none')o.border='';}return o;},serializeStyle:function(o){var s='';each(o,function(v,k){if(k&&v){if(tinymce.isGecko&&k.indexOf('-moz-')===0)return;switch(k){case'color':case'background-color':v=v.toLowerCase();break;}s+=(s?' ':'')+k+': '+v+';';}});return s;},loadCSS:function(u){var t=this,d=t.doc;if(!u)u='';each(u.split(','),function(u){if(t.files[u])return;t.files[u]=true;t.add(t.select('head')[0],'link',{rel:'stylesheet',href:tinymce._addVer(u)});});},addClass:function(e,c){return this.run(e,function(e){var o;if(!c)return 0;if(this.hasClass(e,c))return e.className;o=this.removeClass(e,c);return e.className=(o!=''?(o+' '):'')+c;});},removeClass:function(e,c){var t=this,re;return t.run(e,function(e){var v;if(t.hasClass(e,c)){if(!re)re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");v=e.className.replace(re,' ');return e.className=tinymce.trim(v!=' '?v:'');}return e.className;});},hasClass:function(n,c){n=this.get(n);if(!n||!c)return false;return(' '+n.className+' ').indexOf(' '+c+' ')!==-1;},show:function(e){return this.setStyle(e,'display','block');},hide:function(e){return this.setStyle(e,'display','none');},isHidden:function(e){e=this.get(e);return!e||e.style.display=='none'||this.getStyle(e,'display')=='none';},uniqueId:function(p){return(!p?'mce_':p)+(this.counter++);},setHTML:function(e,h){var t=this;return this.run(e,function(e){var x,i,nl,n,p,x;h=t.processHTML(h);if(isIE){function set(){try{e.innerHTML='
'+h;e.removeChild(e.firstChild);}catch(ex){while(e.firstChild)e.firstChild.removeNode();x=t.create('div');x.innerHTML='
'+h;each(x.childNodes,function(n,i){if(i)e.appendChild(n);});}};if(t.settings.fix_ie_paragraphs)h=h.replace(/

<\/p>|]+)><\/p>|/gi,' 

');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");for(i=nl.length-1,x=0;i>=0;i--){n=nl[i];if(!n.hasChildNodes()){if(!n.mce_keep){x=1;break;}n.removeAttribute('mce_keep');}}}if(x){h=h.replace(/

]+)>|

/g,'

');h=h.replace(/<\/p>/g,'
');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.mce_tmp){p=t.doc.createElement('p');n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;if(b!=='mce_tmp'){v=n.getAttribute(b);if(!v&&b==='class')v=n.className;p.setAttribute(b,v);}});for(x=0;x|]+)>/gi,'<$1b$2>');h=h.replace(/<(\/?)em>|]+)>/gi,'<$1i$2>');}else if(isIE){h=h.replace(/'/g,''');h=h.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,'');}h=h.replace(/]+)\/>|/gi,'');if(s.keep_values){if(/)/g,'\n');s=s.replace(/^[\r\n]*|[\r\n]*$/g,'');s=s.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,'');return s;};h=h.replace(/]+|)>([\s\S]*?)<\/script>/g,function(v,a,b){b=trim(b);if(!a)a=' type="text/javascript"';if(b)b='';return''+b+'';});h=h.replace(/]+|)>([\s\S]*?)<\/style>/g,function(v,a,b){b=trim(b);return''+b+'';});}h=h.replace(//g,'');h=h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=='style'){if(t._isRes(c))return m;if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return'url('+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+')';});}}else if(b!='coords'&&b!='shape'){if(s.url_converter)u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n));}return' '+b+'="'+c+'" mce_'+b+'="'+u+'"';};a=a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,handle);a=a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,handle);return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,handle);});}return h;},getOuterHTML:function(e){var d;e=this.get(e);if(!e)return null;if(isIE)return e.outerHTML;d=(e.ownerDocument||this.doc).createElement("body");d.appendChild(e.cloneNode(true));return d.innerHTML;},setOuterHTML:function(e,h,d){var t=this;return this.run(e,function(e){var n,tp;e=t.get(e);d=d||e.ownerDocument||t.doc;if(isIE&&e.nodeType==1)e.outerHTML=h;else{tp=d.createElement("body");tp.innerHTML=h;n=tp.lastChild;while(n){t.insertAfter(n.cloneNode(true),e);n=n.previousSibling;}t.remove(e);}});},decode:function(s){var e,n,v;if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");e.innerHTML=s;n=e.firstChild;v='';if(n){do{v+=n.nodeValue;}while(n.nextSibling);}return v||s;}return s;},encode:function(s){return s?(''+s).replace(/[<>&\"]/g,function(c,b){switch(c){case'&':return'&';case'"':return'"';case'<':return'<';case'>':return'>';}return c;}):s;},insertAfter:function(n,r){var t=this;r=t.get(r);return this.run(n,function(n){var p,ns;p=r.parentNode;ns=r.nextSibling;if(ns)p.insertBefore(n,ns);else p.appendChild(n);return n;});},isBlock:function(n){if(n.nodeType&&n.nodeType!==1)return false;n=n.nodeName||n;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n);},replace:function(n,o,k){if(is(o,'array'))n=n.cloneNode(true);return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true));});}return o.parentNode.replaceChild(n,o);});},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;};if(c){s='#'+hex(c[1])+hex(c[2])+hex(c[3]);return s;}return s;},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;if(t.classes)return t.classes;function addClasses(s){each(s.imports,function(r){addClasses(r);});each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(','),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v))return;ov=v;v=v.replace(/.*\.([a-z0-9_\-]+).*/i,'$1');if(f&&!(v=f(v,ov)))return;if(!lo[v]){cl.push({'class':v});lo[v]=1;}});}break;case 3:addClasses(r.styleSheet);break;}});};try{each(t.doc.styleSheets,addClasses);}catch(ex){}if(cl.length>0)t.classes=cl;return cl;},run:function(e,f,s){var t=this,o;if(t.doc&&typeof(e)==='string')e=t.get(e);if(!e)return false;s=s||this;if(!e.nodeType&&(e.length||e.length===0)){o=[];each(e,function(e,i){if(e){if(typeof(e)=='string')e=t.doc.getElementById(e);o.push(f.call(s,e,i));}});return o;}return f.call(s,e);},getAttribs:function(n){var o;n=this.get(n);if(!n)return[];if(isIE){o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;}return n.attributes;},destroy:function(s){var t=this;t.win=t.doc=t.root=null;if(!s)tinymce.removeUnload(t.destroy);},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c);}});tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0});})();(function(){var each=tinymce.each,DOM=tinymce.DOM,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit,Event;tinymce.create('static tinymce.dom.Event',{inits:[],events:[],add:function(o,n,f,s){var cb,t=this,el=t.events,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.add(o,n,f,s));});return r;}o=DOM.get(o);if(!o)return;cb=function(e){e=e||window.event;if(e&&!e.target&&isIE)e.target=e.srcElement;if(!s)return f(e);return f.call(s,e);};if(n=='unload'){tinymce.unloads.unshift({func:cb});return cb;}if(n=='init'){if(t.domLoaded)cb();else t.inits.push(cb);return cb;}el.push({obj:o,name:n,func:f,cfunc:cb,scope:s});t._add(o,n,cb);return f;},remove:function(o,n,f){var t=this,a=t.events,s=false,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.remove(o,n,f));});return r;}o=DOM.get(o);each(a,function(e,i){if(e.obj==o&&e.name==n&&(!f||(e.func==f||e.cfunc==f))){a.splice(i,1);t._remove(o,n,e.cfunc);s=true;return false;}});return s;},clear:function(o){var t=this,a=t.events,i,e;if(o){o=DOM.get(o);for(i=a.length-1;i>=0;i--){e=a[i];if(e.obj===o){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;a.splice(i,1);}}}},cancel:function(e){if(!e)return false;this.stop(e);return this.prevent(e);},stop:function(e){if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;},_unload:function(){var t=Event;each(t.events,function(e,i){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;});t.events=[];t=null;},_add:function(o,n,f){if(o.attachEvent)o.attachEvent('on'+n,f);else if(o.addEventListener)o.addEventListener(n,f,false);else o['on'+n]=f;},_remove:function(o,n,f){if(o){try{if(o.detachEvent)o.detachEvent('on'+n,f);else if(o.removeEventListener)o.removeEventListener(n,f,false);else o['on'+n]=null;}catch(ex){}}},_pageInit:function(){var e=Event;if(e.domLoaded)return;e._remove(window,'DOMContentLoaded',e._pageInit);e.domLoaded=true;each(e.inits,function(c){c();});e.inits=[];},_wait:function(){var t;if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){Event.domLoaded=1;return;}if(isIE&&document.location.protocol!='https:'){document.write('';bi=s.body_id||'tinymce';if(bi.indexOf('=')!=-1){bi=t.getParam('body_id','','hash');bi=bi[t.id]||bi;}bc=s.body_class||'';if(bc.indexOf('=')!=-1){bc=t.getParam('body_class','','hash');bc=bc[t.id]||'';}t.iframeHTML+='';if(tinymce.relaxedDomain){if(isIE||(tinymce.isOpera&&parseFloat(opera.version())>=9.5))u='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';else if(tinymce.isOpera)u='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';}n=DOM.add(o.iframeContainer,'iframe',{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:'0',style:{width:'100%',height:h}});t.contentAreaContainer=o.iframeContainer;DOM.get(o.editorContainer).style.display=t.orgDisplay;DOM.get(t.id).style.display='none';if(tinymce.isOldWebKit){Event.add(n,'load',t.setupIframe,t);n.src=tinymce.baseURL+'/plugins/safari/blank.htm';}else{if(!isIE||!tinymce.relaxedDomain)t.setupIframe();e=n=o=null;}},setupIframe:function(){var t=this,s=t.settings,e=DOM.get(t.id),d=t.getDoc(),h,b;if(!isIE||!tinymce.relaxedDomain){d.open();d.write(t.iframeHTML);d.close();}if(!isIE){try{if(!s.readonly)d.designMode='On';}catch(ex){}}if(isIE){b=t.getBody();DOM.hide(b);if(!s.readonly)b.contentEditable=true;DOM.show(b);}t.dom=new tinymce.DOM.DOMUtils(t.getDoc(),{keep_values:true,url_converter:t.convertURL,url_converter_scope:t,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:1,fix_ie_paragraphs:1});t.serializer=new tinymce.dom.Serializer({entity_encoding:s.entity_encoding,entities:s.entities,valid_elements:s.verify_html===false?'*[*]':s.valid_elements,extended_valid_elements:s.extended_valid_elements,valid_child_elements:s.valid_child_elements,invalid_elements:s.invalid_elements,fix_table_elements:s.fix_table_elements,fix_list_elements:s.fix_list_elements,fix_content_duplication:s.fix_content_duplication,convert_fonts_to_spans:s.convert_fonts_to_spans,font_size_classes:s.font_size_classes,font_size_style_values:s.font_size_style_values,apply_source_formatting:s.apply_source_formatting,remove_linebreaks:s.remove_linebreaks,element_format:s.element_format,dom:t.dom});t.selection=new tinymce.dom.Selection(t.dom,t.getWin(),t.serializer);t.forceBlocks=new tinymce.ForceBlocks(t,{forced_root_block:s.forced_root_block});t.editorCommands=new tinymce.EditorCommands(t);t.serializer.onPreProcess.add(function(se,o){return t.onPreProcess.dispatch(t,o,se);});t.serializer.onPostProcess.add(function(se,o){return t.onPostProcess.dispatch(t,o,se);});t.onPreInit.dispatch(t);if(!s.gecko_spellcheck)t.getBody().spellcheck=0;if(!s.readonly)t._addEvents();t.controlManager.onPostRender.dispatch(t,t.controlManager);t.onPostRender.dispatch(t);if(s.directionality)t.getBody().dir=s.directionality;if(s.nowrap)t.getBody().style.whiteSpace="nowrap";if(s.auto_resize)t.onNodeChange.add(t.resizeToContent,t);if(s.custom_elements){function handleCustom(ed,o){each(explode(s.custom_elements),function(v){var n;if(v.indexOf('~')===0){v=v.substring(1);n='span';}else n='div';o.content=o.content.replace(new RegExp('<('+v+')([^>]*)>','g'),'<'+n+' mce_name="$1"$2>');o.content=o.content.replace(new RegExp('','g'),'');});};t.onBeforeSetContent.add(handleCustom);t.onPostProcess.add(function(ed,o){if(o.set)handleCustom(ed,o)});}if(s.handle_node_change_callback){t.onNodeChange.add(function(ed,cm,n){t.execCallback('handle_node_change_callback',t.id,n,-1,-1,true,t.selection.isCollapsed());});}if(s.save_callback){t.onSaveContent.add(function(ed,o){var h=t.execCallback('save_callback',t.id,o.content,t.getBody());if(h)o.content=h;});}if(s.onchange_callback){t.onChange.add(function(ed,l){t.execCallback('onchange_callback',t,l);});}if(s.convert_newlines_to_brs){t.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/\r?\n/g,'
');});}if(s.fix_nesting&&isIE){t.onBeforeSetContent.add(function(ed,o){o.content=t._fixNesting(o.content);});}if(s.preformatted){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^\s*/,'');o.content=o.content.replace(/<\/pre>\s*$/,'');if(o.set)o.content='
'+o.content+'
';});}if(s.verify_css_classes){t.serializer.attribValueFilter=function(n,v){var s,cl;if(n=='class'){if(!t.classesRE){cl=t.dom.getClasses();if(cl.length>0){s='';each(cl,function(o){s+=(s?'|':'')+o['class'];});t.classesRE=new RegExp('('+s+')','gi');}}return!t.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v)||t.classesRE.test(v)?v:'';}return v;};}if(s.convert_fonts_to_spans)t._convertFonts();if(s.inline_styles)t._convertInlineElements();if(s.cleanup_callback){t.onBeforeSetContent.add(function(ed,o){o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);});t.onPreProcess.add(function(ed,o){if(o.set)t.execCallback('cleanup_callback','insert_to_editor_dom',o.node,o);if(o.get)t.execCallback('cleanup_callback','get_from_editor_dom',o.node,o);});t.onPostProcess.add(function(ed,o){if(o.set)o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);if(o.get)o.content=t.execCallback('cleanup_callback','get_from_editor',o.content,o);});}if(s.save_callback){t.onGetContent.add(function(ed,o){if(o.save)o.content=t.execCallback('save_callback',t.id,o.content,t.getBody());});}if(s.handle_event_callback){t.onEvent.add(function(ed,e,o){if(t.execCallback('handle_event_callback',e,ed,o)===false)Event.cancel(e);});}t.onSetContent.add(function(){t.addVisual(t.getBody());});if(s.padd_empty_editor){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,'');});}if(isGecko&&!s.readonly){try{d.designMode='Off';d.designMode='On';}catch(ex){}}setTimeout(function(){if(t.removed)return;t.load({initial:true,format:(s.cleanup_on_startup?'html':'raw')});t.startContent=t.getContent({format:'raw'});t.undoManager.add({initial:true});t.initialized=true;t.onInit.dispatch(t);t.execCallback('setupcontent_callback',t.id,t.getBody(),t.getDoc());t.execCallback('init_instance_callback',t);t.focus(true);t.nodeChanged({initial:1});if(s.content_css){tinymce.each(explode(s.content_css),function(u){t.dom.loadCSS(t.documentBaseURI.toAbsolute(u));});}if(s.auto_focus){setTimeout(function(){var ed=EditorManager.get(s.auto_focus);ed.selection.select(ed.getBody(),1);ed.selection.collapse(1);ed.getWin().focus();},100);}},1);e=null;},focus:function(sf){var oed,t=this,ce=t.settings.content_editable;if(!sf){if(!ce&&(!isIE||t.selection.getNode().ownerDocument!=t.getDoc()))t.getWin().focus();}if(EditorManager.activeEditor!=t){if((oed=EditorManager.activeEditor)!=null)oed.onDeactivate.dispatch(oed,t);t.onActivate.dispatch(t,oed);}EditorManager._setActive(t);},execCallback:function(n){var t=this,f=t.settings[n],s;if(!f)return;if(t.callbackLookup&&(s=t.callbackLookup[n])){f=s.func;s=s.scope;}if(is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);t.callbackLookup=t.callbackLookup||{};t.callbackLookup[n]={func:f,scope:s};}return f.apply(s||t,Array.prototype.slice.call(arguments,1));},translate:function(s){var c=this.settings.language||'en',i18n=EditorManager.i18n;if(!s)return'';return i18n[c+'.'+s]||s.replace(/{\#([^}]+)\}/g,function(a,b){return i18n[c+'.'+b]||'{#'+b+'}';});},getLang:function(n,dv){return EditorManager.i18n[(this.settings.language||'en')+'.'+n]||(is(dv)?dv:'{#'+n+'}');},getParam:function(n,dv,ty){var tr=tinymce.trim,v=is(this.settings[n])?this.settings[n]:dv,o;if(ty==='hash'){o={};if(is(v,'string')){each(v.indexOf('=')>0?v.split(/[;,](?![^=;,]*(?:[;,]|$))/):v.split(','),function(v){v=v.split('=');if(v.length>1)o[tr(v[0])]=tr(v[1]);else o[tr(v[0])]=tr(v);});}else o=v;return o;}return v;},nodeChanged:function(o){var t=this,s=t.selection,n=s.getNode()||t.getBody();if(t.initialized){t.onNodeChange.dispatch(t,o?o.controlManager||t.controlManager:t.controlManager,isIE&&n.ownerDocument!=t.getDoc()?t.getBody():n,s.isCollapsed(),o);}},addButton:function(n,s){var t=this;t.buttons=t.buttons||{};t.buttons[n]=s;},addCommand:function(n,f,s){this.execCommands[n]={func:f,scope:s||this};},addQueryStateHandler:function(n,f,s){this.queryStateCommands[n]={func:f,scope:s||this};},addQueryValueHandler:function(n,f,s){this.queryValueCommands[n]={func:f,scope:s||this};},addShortcut:function(pa,desc,cmd_func,sc){var t=this,c;if(!t.settings.custom_shortcuts)return false;t.shortcuts=t.shortcuts||{};if(is(cmd_func,'string')){c=cmd_func;cmd_func=function(){t.execCommand(c,false,null);};}if(is(cmd_func,'object')){c=cmd_func;cmd_func=function(){t.execCommand(c[0],c[1],c[2]);};}each(explode(pa),function(pa){var o={func:cmd_func,scope:sc||this,desc:desc,alt:false,ctrl:false,shift:false};each(explode(pa,'+'),function(v){switch(v){case'alt':case'ctrl':case'shift':o[v]=true;break;default:o.charCode=v.charCodeAt(0);o.keyCode=v.toUpperCase().charCodeAt(0);}});t.shortcuts[(o.ctrl?'ctrl':'')+','+(o.alt?'alt':'')+','+(o.shift?'shift':'')+','+o.keyCode]=o;});return true;},execCommand:function(cmd,ui,val,a){var t=this,s=0,o,st;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd)&&(!a||!a.skip_focus))t.focus();o={};t.onBeforeExecCommand.dispatch(t,cmd,ui,val,o);if(o.terminate)return false;if(t.execCallback('execcommand_callback',t.id,t.selection.getNode(),cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(o=t.execCommands[cmd]){st=o.func.call(o.scope,ui,val);if(st!==true){t.onExecCommand.dispatch(t,cmd,ui,val,a);return st;}}each(t.plugins,function(p){if(p.execCommand&&p.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);s=1;return false;}});if(s)return true;if(t.theme.execCommand&&t.theme.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(t.editorCommands.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}t.getDoc().execCommand(cmd,ui,val);t.onExecCommand.dispatch(t,cmd,ui,val,a);},queryCommandState:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryStateCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandState(c);if(o!==-1)return o;try{return this.getDoc().queryCommandState(c);}catch(ex){}},queryCommandValue:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryValueCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandValue(c);if(is(o))return o;try{return this.getDoc().queryCommandValue(c);}catch(ex){}},show:function(){var t=this;DOM.show(t.getContainer());DOM.hide(t.id);t.load();},hide:function(){var t=this,d=t.getDoc();if(isIE&&d)d.execCommand('SelectAll');t.save();DOM.hide(t.getContainer());DOM.setStyle(t.id,'display',t.orgDisplay);},isHidden:function(){return!DOM.isHidden(this.id);},setProgressState:function(b,ti,o){this.onSetProgressState.dispatch(this,b,ti,o);return b;},resizeToContent:function(){var t=this;DOM.setStyle(t.id+"_ifr",'height',t.getBody().scrollHeight);},load:function(o){var t=this,e=t.getElement(),h;if(e){o=o||{};o.load=true;h=t.setContent(is(e.value)?e.value:e.innerHTML,o);o.element=e;if(!o.no_events)t.onLoadContent.dispatch(t,o);o.element=e=null;return h;}},save:function(o){var t=this,e=t.getElement(),h,f;if(!e||!t.initialized)return;o=o||{};o.save=true;if(!o.no_events){t.undoManager.typing=0;t.undoManager.add();}o.element=e;h=o.content=t.getContent(o);if(!o.no_events)t.onSaveContent.dispatch(t,o);h=o.content;if(!/TEXTAREA|INPUT/i.test(e.nodeName)){e.innerHTML=h;if(f=DOM.getParent(t.id,'form')){each(f.elements,function(e){if(e.name==t.id){e.value=h;return false;}});}}else e.value=h;o.element=e=null;return h;},setContent:function(h,o){var t=this;o=o||{};o.format=o.format||'html';o.set=true;o.content=h;if(!o.no_events)t.onBeforeSetContent.dispatch(t,o);if(!tinymce.isIE&&(h.length===0||/^\s+$/.test(h))){o.content=t.dom.setHTML(t.getBody(),'
');o.format='raw';}o.content=t.dom.setHTML(t.getBody(),tinymce.trim(o.content));if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;o.content=t.dom.setHTML(t.getBody(),t.serializer.serialize(t.getBody(),o));}if(!o.no_events)t.onSetContent.dispatch(t,o);return o.content;},getContent:function(o){var t=this,h;o=o||{};o.format=o.format||'html';o.get=true;if(!o.no_events)t.onBeforeGetContent.dispatch(t,o);if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;h=t.serializer.serialize(t.getBody(),o);}else h=t.getBody().innerHTML;h=h.replace(/^\s*|\s*$/g,'');o.content=h;if(!o.no_events)t.onGetContent.dispatch(t,o);return o.content;},isDirty:function(){var t=this;return tinymce.trim(t.startContent)!=tinymce.trim(t.getContent({format:'raw',no_events:1}))&&!t.isNotDirty;},getContainer:function(){var t=this;if(!t.container)t.container=DOM.get(t.editorContainer||t.id+'_parent');return t.container;},getContentAreaContainer:function(){return this.contentAreaContainer;},getElement:function(){return DOM.get(this.settings.content_element||this.id);},getWin:function(){var t=this,e;if(!t.contentWindow){e=DOM.get(t.id+"_ifr");if(e)t.contentWindow=e.contentWindow;}return t.contentWindow;},getDoc:function(){var t=this,w;if(!t.contentDocument){w=t.getWin();if(w)t.contentDocument=w.document;}return t.contentDocument;},getBody:function(){return this.bodyElement||this.getDoc().body;},convertURL:function(u,n,e){var t=this,s=t.settings;if(s.urlconverter_callback)return t.execCallback('urlconverter_callback',u,e,true,n);if(!s.convert_urls||(e&&e.nodeName=='LINK')||u.indexOf('file:')===0)return u;if(s.relative_urls)return t.documentBaseURI.toRelative(u);u=t.documentBaseURI.toAbsolute(u,s.remove_script_host);return u;},addVisual:function(e){var t=this,s=t.settings;e=e||t.getBody();if(!is(t.hasVisual))t.hasVisual=s.visual;each(t.dom.select('table,a',e),function(e){var v;switch(e.nodeName){case'TABLE':v=t.dom.getAttrib(e,'border');if(!v||v=='0'){if(t.hasVisual)t.dom.addClass(e,s.visual_table_class);else t.dom.removeClass(e,s.visual_table_class);}return;case'A':v=t.dom.getAttrib(e,'name');if(v){if(t.hasVisual)t.dom.addClass(e,'mceItemAnchor');else t.dom.removeClass(e,'mceItemAnchor');}return;}});t.onVisualAid.dispatch(t,e,t.hasVisual);},remove:function(){var t=this,e=t.getContainer();t.removed=1;t.hide();t.execCallback('remove_instance_callback',t);t.onRemove.dispatch(t);t.onExecCommand.listeners=[];EditorManager.remove(t);DOM.remove(e);},destroy:function(s){var t=this;if(t.destroyed)return;if(!s){tinymce.removeUnload(t.destroy);tinyMCE.onBeforeUnload.remove(t._beforeUnload);if(t.theme.destroy)t.theme.destroy();t.controlManager.destroy();t.selection.destroy();t.dom.destroy();if(!t.settings.content_editable){Event.clear(t.getWin());Event.clear(t.getDoc());}Event.clear(t.getBody());Event.clear(t.formElement);}if(t.formElement){t.formElement.submit=t.formElement._mceOldSubmit;t.formElement._mceOldSubmit=null;}t.contentAreaContainer=t.formElement=t.container=t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null;if(t.selection)t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null;t.destroyed=1;},_addEvents:function(){var t=this,i,s=t.settings,lo={mouseup:'onMouseUp',mousedown:'onMouseDown',click:'onClick',keyup:'onKeyUp',keydown:'onKeyDown',keypress:'onKeyPress',submit:'onSubmit',reset:'onReset',contextmenu:'onContextMenu',dblclick:'onDblClick',paste:'onPaste'};function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEvent.dispatch(t,e,o)!==false){t[lo[e.fakeType||e.type]].dispatch(t,e,o);}};each(lo,function(v,k){switch(k){case'contextmenu':if(tinymce.isOpera){Event.add(t.getBody(),'mousedown',function(e){if(e.ctrlKey){e.fakeType='contextmenu';eventHandler(e);}});}else Event.add(t.getBody(),k,eventHandler);break;case'paste':Event.add(t.getBody(),k,function(e){var tx,h,el,r;if(e.clipboardData)tx=e.clipboardData.getData('text/plain');else if(tinymce.isIE)tx=t.getWin().clipboardData.getData('Text');eventHandler(e,{text:tx,html:h});});break;case'submit':case'reset':Event.add(t.getElement().form||DOM.getParent(t.id,'form'),k,eventHandler);break;default:Event.add(s.content_editable?t.getBody():t.getDoc(),k,eventHandler);}});Event.add(s.content_editable?t.getBody():(isGecko?t.getDoc():t.getWin()),'focus',function(e){t.focus(true);});if(tinymce.isGecko){Event.add(t.getDoc(),'DOMNodeInserted',function(e){var v;e=e.target;if(e.nodeType===1&&e.nodeName==='IMG'&&(v=e.getAttribute('mce_src')))e.src=t.documentBaseURI.toAbsolute(v);});}if(isGecko){function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko&&!s.readonly){if(t._isHidden()){try{if(!s.content_editable)d.designMode='On';}catch(ex){}}try{d.execCommand("styleWithCSS",0,false);}catch(ex){if(!t._isHidden())try{d.execCommand("useCSS",0,true);}catch(ex){}}if(!s.table_inline_editing)try{d.execCommand('enableInlineTableEditing',false,false);}catch(ex){}if(!s.object_resizing)try{d.execCommand('enableObjectResizing',false,false);}catch(ex){}}};t.onBeforeExecCommand.add(setOpts);t.onMouseDown.add(setOpts);}t.onMouseUp.add(t.nodeChanged);t.onClick.add(t.nodeChanged);t.onKeyUp.add(function(ed,e){var c=e.keyCode;if((c>=33&&c<=36)||(c>=37&&c<=40)||c==13||c==45||c==46||c==8||(tinymce.isMac&&(c==91||c==93))||e.ctrlKey)t.nodeChanged();});t.onReset.add(function(){t.setContent(t.startContent,{format:'raw'});});if(t.getParam('tab_focus')){function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);};function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParent(ed.id,'form');el=f.elements;if(f){each(el,function(e,i){if(e.id==ed.id){x=i;return false;}});if(d>0){for(i=x+1;i=0;i--){if(el[i].type!='hidden')return el[i];}}}return null;};if(e.keyCode===9){v=explode(ed.getParam('tab_focus'));if(v.length==1){v[1]=v[0];v[0]=':prev';}if(e.shiftKey){if(v[0]==':prev')el=find(-1);else el=DOM.get(v[0]);}else{if(v[1]==':next')el=find(1);else el=DOM.get(v[1]);}if(el){if(ed=EditorManager.get(el.id||el.name))ed.focus();else window.setTimeout(function(){window.focus();el.focus();},10);return Event.cancel(e);}}};t.onKeyUp.add(tabCancel);if(isGecko){t.onKeyPress.add(tabHandler);t.onKeyDown.add(tabCancel);}else t.onKeyDown.add(tabHandler);}if(s.custom_shortcuts){if(s.custom_undo_redo_keyboard_shortcuts){t.addShortcut('ctrl+z',t.getLang('undo_desc'),'Undo');t.addShortcut('ctrl+y',t.getLang('redo_desc'),'Redo');}if(isGecko){t.addShortcut('ctrl+b',t.getLang('bold_desc'),'Bold');t.addShortcut('ctrl+i',t.getLang('italic_desc'),'Italic');t.addShortcut('ctrl+u',t.getLang('underline_desc'),'Underline');}for(i=1;i<=6;i++)t.addShortcut('ctrl+'+i,'',['FormatBlock',false,'']);t.addShortcut('ctrl+7','',['FormatBlock',false,'

']);t.addShortcut('ctrl+8','',['FormatBlock',false,'

']);t.addShortcut('ctrl+9','',['FormatBlock',false,'
']);function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return v;each(t.shortcuts,function(o){if(tinymce.isMac&&o.ctrl!=e.metaKey)return;else if(!tinymce.isMac&&o.ctrl!=e.ctrlKey)return;if(o.alt!=e.altKey)return;if(o.shift!=e.shiftKey)return;if(e.keyCode==o.keyCode||(e.charCode&&e.charCode==o.charCode)){v=o;return false;}});return v;};t.onKeyUp.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyPress.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyDown.add(function(ed,e){var o=find(e);if(o){o.func.call(o.scope);return Event.cancel(e);}});}if(tinymce.isIE){Event.add(t.getDoc(),'controlselect',function(e){var re=t.resizeInfo,cb;e=e.target;if(e.nodeName!=='IMG')return;if(re)Event.remove(re.node,re.ev,re.cb);if(!t.dom.hasClass(e,'mceItemNoResize')){ev='resizeend';cb=Event.add(e,ev,function(e){var v;e=e.target;if(v=t.dom.getStyle(e,'width')){t.dom.setAttrib(e,'width',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'width','');}if(v=t.dom.getStyle(e,'height')){t.dom.setAttrib(e,'height',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'height','');}});}else{ev='resizestart';cb=Event.add(e,'resizestart',Event.cancel,Event);}re=t.resizeInfo={node:e,ev:ev,cb:cb};});t.onKeyDown.add(function(ed,e){switch(e.keyCode){case 8:if(t.selection.getRng().item){t.selection.getRng().item(0).removeNode();return Event.cancel(e);}}});}if(tinymce.isOpera){t.onClick.add(function(ed,e){Event.prevent(e);});}if(s.custom_undo_redo){function addUndo(){t.undoManager.typing=0;t.undoManager.add();};if(tinymce.isIE){Event.add(t.getWin(),'blur',function(e){var n;if(t.selection){n=t.selection.getNode();if(!t.removed&&n.ownerDocument&&n.ownerDocument!=t.getDoc())addUndo();}});}else{Event.add(t.getDoc(),'blur',function(){if(t.selection&&!t.removed)addUndo();});}t.onMouseDown.add(addUndo);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.ctrlKey){t.undoManager.typing=0;t.undoManager.add();}});t.onKeyDown.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45){if(t.undoManager.typing){t.undoManager.add();t.undoManager.typing=0;}return;}if(!t.undoManager.typing){t.undoManager.add();t.undoManager.typing=1;}});}},_convertInlineElements:function(){var t=this,s=t.settings,dom=t.dom,v,e,na,st,sp;function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.select('table,u,strike',o.node),function(n){switch(n.nodeName){case'TABLE':if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height','');}break;case'U':case'STRIKE':n.style.textDecoration=n.nodeName=='U'?'underline':'line-through';dom.setAttrib(n,'mce_style','');dom.setAttrib(n,'mce_name','span');break;}});}else if(o.set){each(t.dom.select('table,span',o.node).reverse(),function(n){if(n.nodeName=='TABLE'){if(v=dom.getStyle(n,'height'))dom.setAttrib(n,'height',v.replace(/[^0-9%]+/g,''));}else{if(n.style.textDecoration=='underline')na='u';else if(n.style.textDecoration=='line-through')na='strike';else na='';if(na){n.style.textDecoration='';dom.setAttrib(n,'mce_style','');e=dom.create(na,{style:dom.getAttrib(n,'style')});dom.replace(e,n,1);}}});}};t.onPreProcess.add(convert);if(!s.cleanup_on_startup){t.onSetContent.add(function(ed,o){if(o.initial)convert(t,{node:t.getBody(),set:1});});}},_convertFonts:function(){var t=this,s=t.settings,dom=t.dom,fz,fzn,sl,cl;if(!s.inline_styles)return;fz=[8,10,12,14,18,24,36];fzn=['xx-small','x-small','small','medium','large','x-large','xx-large'];if(sl=s.font_size_style_values)sl=explode(sl);if(cl=s.font_size_classes)cl=explode(cl);function process(no){var n,sp,nl,x;if(!s.inline_styles)return;nl=t.dom.select('font',no);for(x=nl.length-1;x>=0;x--){n=nl[x];sp=dom.create('span',{style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});dom.setStyles(sp,{fontFamily:dom.getAttrib(n,'face'),color:dom.getAttrib(n,'color'),backgroundColor:n.style.backgroundColor});if(n.size){if(sl)dom.setStyle(sp,'fontSize',sl[parseInt(n.size)-1]);else dom.setAttrib(sp,'class',cl[parseInt(n.size)-1]);}dom.setAttrib(sp,'mce_style','');dom.replace(sp,n,1);}};t.onPreProcess.add(function(ed,o){if(o.get)process(o.node);});t.onSetContent.add(function(ed,o){if(o.initial)process(o.node);});},_isHidden:function(){var s;if(!isGecko)return 0;s=this.selection.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},_fixNesting:function(s){var d=[],i;s=s.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(a,b,c){var e;if(b==='/'){if(!d.length)return'';if(c!==d[d.length-1].tag){for(i=d.length-1;i>=0;i--){if(d[i].tag===c){d[i].close=1;break;}}return'';}else{d.pop();if(d.length&&d[d.length-1].close){a=a+'';d.pop();}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(c))return a;if(/\/>$/.test(a))return a;d.push({tag:c});}return a;});for(i=d.length-1;i>=0;i--)s+='';return s;}});})();(function(){var each=tinymce.each,isIE=tinymce.isIE,isGecko=tinymce.isGecko,isOpera=tinymce.isOpera,isWebKit=tinymce.isWebKit;function isBlock(n){return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n.nodeName);};tinymce.create('tinymce.EditorCommands',{EditorCommands:function(ed){this.editor=ed;},execCommand:function(cmd,ui,val){var t=this,ed=t.editor,f;switch(cmd){case'Cut':case'Copy':case'Paste':try{ed.getDoc().execCommand(cmd,ui,val);}catch(ex){if(isGecko){ed.windowManager.confirm(ed.getLang('clipboard_msg'),function(s){if(s)window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');});}else ed.windowManager.alert(ed.getLang('clipboard_no_support'));}return true;case'mceResetDesignMode':case'mceBeginUndoLevel':return true;case'unlink':t.UnLink();return true;case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':t.mceJustify(cmd,cmd.substring(7).toLowerCase());return true;case'mceEndUndoLevel':case'mceAddUndoLevel':ed.undoManager.add();return true;default:f=this[cmd];if(f){f.call(this,ui,val);return true;}}return false;},Indent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){d.setStyle(e,'paddingLeft',(parseInt(e.style.paddingLeft||0)+iv)+iu);});return;}ed.getDoc().execCommand('Indent',false,null);if(isIE){d.getParent(s.getNode(),function(n){if(n.nodeName=='BLOCKQUOTE'){n.dir=n.style.cssText='';}});}},Outdent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,v,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){v=Math.max(0,parseInt(e.style.paddingLeft||0)-iv);d.setStyle(e,'paddingLeft',v?v+iu:'');});return;}ed.getDoc().execCommand('Outdent',false,null);},mceSetAttribute:function(u,v){var ed=this.editor,d=ed.dom,e;if(e=d.getParent(ed.selection.getNode(),d.isBlock))d.setAttrib(e,v.name,v.value);},mceSetContent:function(u,v){this.editor.setContent(v);},mceToggleVisualAid:function(){var ed=this.editor;ed.hasVisual=!ed.hasVisual;ed.addVisual();},mceReplaceContent:function(u,v){var s=this.editor.selection;s.setContent(v.replace(/\{\$selection\}/g,s.getContent({format:'text'})));},mceInsertLink:function(u,v){var ed=this.editor,s=ed.selection,e=ed.dom.getParent(s.getNode(),'A');if(tinymce.is(v,'string'))v={href:v};function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});};if(!e){ed.execCommand('CreateLink',false,'javascript:mctmp(0);');each(ed.dom.select('a'),function(e){if(e.href=='javascript:mctmp(0);')set(e);});}else{if(v.href)set(e);else ed.dom.remove(e,1);}},UnLink:function(){var ed=this.editor,s=ed.selection;if(s.isCollapsed())s.select(s.getNode());ed.getDoc().execCommand('unlink',false,null);s.collapse(0);},FontName:function(u,v){var t=this,ed=t.editor,s=ed.selection,e;if(!v){if(s.isCollapsed())s.select(s.getNode());t.RemoveFormat();}else{if(ed.settings.convert_fonts_to_spans)t._applyInlineStyle('span',{style:{fontFamily:v}});else ed.getDoc().execCommand('FontName',false,v);}},FontSize:function(u,v){var ed=this.editor,s=ed.settings,fc,fs;if(s.convert_fonts_to_spans&&v>=1&&v<=7){fs=tinymce.explode(s.font_size_style_values);fc=tinymce.explode(s.font_size_classes);if(fc)v=fc[v-1]||v;else v=fs[v-1]||v;}if(v>=1&&v<=7)ed.getDoc().execCommand('FontSize',false,v);else this._applyInlineStyle('span',{style:{fontSize:v}});},queryCommandValue:function(c){var f=this['queryValue'+c];if(f)return f.call(this,c);return false;},queryCommandState:function(cmd){var f;switch(cmd){case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':return this.queryStateJustify(cmd,cmd.substring(7).toLowerCase());default:if(f=this['queryState'+cmd])return f.call(this,cmd);}return-1;},_queryState:function(c){try{return this.editor.getDoc().queryCommandState(c);}catch(ex){}},_queryVal:function(c){try{return this.editor.getDoc().queryCommandValue(c);}catch(ex){}},queryValueFontSize:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'SPAN'))v=p.style.fontSize;if(!v&&(isOpera||isWebKit)){if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.size;return v;}return v||this._queryVal('FontSize');},queryValueFontName:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.face;if(p=ed.dom.getParent(ed.selection.getNode(),'SPAN'))v=p.style.fontFamily.replace(/, /g,',').replace(/[\'\"]/g,'').toLowerCase();if(!v)v=this._queryVal('FontName');return v;},mceJustify:function(c,v){var ed=this.editor,se=ed.selection,n=se.getNode(),nn=n.nodeName,bl,nb,dom=ed.dom,rm;if(ed.settings.inline_styles&&this.queryStateJustify(c,v))rm=1;bl=dom.getParent(n,ed.dom.isBlock);if(nn=='IMG'){if(v=='full')return;if(rm){if(v=='center')dom.setStyle(bl||n.parentNode,'textAlign','');dom.setStyle(n,'float','');this.mceRepaint();return;}if(v=='center'){if(bl&&/^(TD|TH)$/.test(bl.nodeName))bl=0;if(!bl||bl.childNodes.length>1){nb=dom.create('p');nb.appendChild(n.cloneNode(false));if(bl)dom.insertAfter(nb,bl);else dom.insertAfter(nb,n);dom.remove(n);n=nb.firstChild;bl=nb;}dom.setStyle(bl,'textAlign',v);dom.setStyle(n,'float','');}else{dom.setStyle(n,'float',v);dom.setStyle(bl||n.parentNode,'textAlign','');}this.mceRepaint();return;}if(ed.settings.inline_styles&&ed.settings.forced_root_block){if(rm)v='';each(this._getSelectedBlocks(dom.getParent(se.getStart(),dom.isBlock),dom.getParent(se.getEnd(),dom.isBlock)),function(e){dom.setAttrib(e,'align','');dom.setStyle(e,'textAlign',v=='full'?'justify':v);});return;}else if(!rm)ed.getDoc().execCommand(c,false,null);if(ed.settings.inline_styles){if(rm){dom.getParent(ed.selection.getNode(),function(n){if(n.style&&n.style.textAlign)dom.setStyle(n,'textAlign','');});return;}each(dom.select('*'),function(n){var v=n.align;if(v){if(v=='full')v='justify';dom.setStyle(n,'textAlign',v);dom.setAttrib(n,'align','');}});}},mceSetCSSClass:function(u,v){this.mceSetStyleInfo(0,{command:'setattrib',name:'class',value:v});},getSelectedElement:function(){var t=this,ed=t.editor,dom=ed.dom,se=ed.selection,r=se.getRng(),r1,r2,sc,ec,so,eo,e,sp,ep,re;if(se.isCollapsed()||r.item)return se.getNode();re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(isIE){r1=r.duplicate();r1.collapse(true);sc=r1.parentElement();r2=r.duplicate();r2.collapse(false);ec=r2.parentElement();if(sc!=ec){r1.move('character',1);sc=r1.parentElement();}if(sc==ec){r1=r.duplicate();r1.moveToElementText(sc);if(r1.compareEndPoints('StartToStart',r)==0&&r1.compareEndPoints('EndToEnd',r)==0)return re&&re.test(sc.nodeName)?null:sc;}}else{function getParent(n){return dom.getParent(n,function(n){return n.nodeType==1;});};sc=r.startContainer;ec=r.endContainer;so=r.startOffset;eo=r.endOffset;if(!r.collapsed){if(sc==ec){if(so-eo<2){if(sc.hasChildNodes()){sp=sc.childNodes[so];return re&&re.test(sp.nodeName)?null:sp;}}}}if(sc.nodeType!=3||ec.nodeType!=3)return null;if(so==0){sp=getParent(sc);if(sp&&sp.firstChild!=sc)sp=null;}if(so==sc.nodeValue.length){e=sc.nextSibling;if(e&&e.nodeType==1)sp=sc.nextSibling;}if(eo==0){e=ec.previousSibling;if(e&&e.nodeType==1)ep=e;}if(eo==ec.nodeValue.length){ep=getParent(ec);if(ep&&ep.lastChild!=ec)ep=null;}if(sp==ep)return re&&sp&&re.test(sp.nodeName)?null:sp;}return null;},InsertHorizontalRule:function(){if(isGecko||isIE)this.editor.selection.setContent('
');else this.editor.getDoc().execCommand('InsertHorizontalRule',false,'');},RemoveFormat:function(){var t=this,ed=t.editor,s=ed.selection,b;if(isWebKit)s.setContent(s.getContent({format:'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,''),{format:'raw'});else ed.getDoc().execCommand('RemoveFormat',false,null);t.mceSetStyleInfo(0,{command:'removeformat'});ed.addVisual();},mceSetStyleInfo:function(u,v){var t=this,ed=t.editor,d=ed.getDoc(),dom=ed.dom,e,b,s=ed.selection,nn=v.wrapper||'span',b=s.getBookmark(),re;function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':return dom.setAttrib(n,v.name,v.value);case'setstyle':return dom.setStyle(n,v.name,v.value);case'removeformat':return dom.setAttrib(n,'class','');}}};re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if((e=t.getSelectedElement())&&!ed.settings.force_span_wrappers)set(e,1);else{d.execCommand('FontName',false,'__');each(isWebKit?dom.select('span'):dom.select('font'),function(n){var sp,e;if(dom.getAttrib(n,'face')=='__'||n.style.fontFamily==='__'){sp=dom.create(nn,{mce_new:'1'});set(sp);each(n.childNodes,function(n){sp.appendChild(n.cloneNode(true));});dom.replace(sp,n);}});}each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!dom.getAttrib(n,'mce_new')){p=dom.getParent(n,function(n){return n.nodeType==1&&dom.getAttrib(n,'mce_new');});if(p)dom.remove(n,1);}});each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!p||!dom.getAttrib(n,'mce_new'))return;if(ed.settings.force_span_wrappers&&p.nodeName!='SPAN')return;if(p.nodeName==nn.toUpperCase()&&p.childNodes.length==1)return dom.remove(p,1);if(n.nodeType==1&&(!re||!re.test(p.nodeName))&&p.childNodes.length==1){set(p);dom.setAttrib(n,'class','');}});each(dom.select(nn).reverse(),function(n){if(dom.getAttrib(n,'mce_new')||(dom.getAttribs(n).length<=1&&n.className==='')){if(!dom.getAttrib(n,'class')&&!dom.getAttrib(n,'style'))return dom.remove(n,1);dom.setAttrib(n,'mce_new','');}});s.moveToBookmark(b);},queryStateJustify:function(c,v){var ed=this.editor,n=ed.selection.getNode(),dom=ed.dom;if(n&&n.nodeName=='IMG'){if(dom.getStyle(n,'float')==v)return 1;return n.parentNode.style.textAlign==v;}n=dom.getParent(ed.selection.getStart(),function(n){return n.nodeType==1&&n.style.textAlign;});if(v=='full')v='justify';if(ed.settings.inline_styles)return(n&&n.style.textAlign==v);return this._queryState(c);},ForeColor:function(ui,v){var ed=this.editor;if(ed.settings.convert_fonts_to_spans){this._applyInlineStyle('span',{style:{color:v}});return;}else ed.getDoc().execCommand('ForeColor',false,v);},HiliteColor:function(ui,val){var t=this,ed=t.editor,d=ed.getDoc();if(ed.settings.convert_fonts_to_spans){this._applyInlineStyle('span',{style:{backgroundColor:val}});return;}function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s);}catch(ex){d.execCommand("useCSS",0,!s);}};if(isGecko||isOpera){set(true);d.execCommand('hilitecolor',false,val);set(false);}else d.execCommand('BackColor',false,val);},Undo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.undo();ed.nodeChanged();}else ed.getDoc().execCommand('Undo',false,null);},Redo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.redo();ed.nodeChanged();}else ed.getDoc().execCommand('Redo',false,null);},FormatBlock:function(ui,val){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,bl,nb,b;function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName);};bl=dom.getParent(s.getNode(),function(n){return isBlock(n);});if(bl){if((isIE&&isBlock(bl.parentNode))||bl.nodeName=='DIV'){nb=ed.dom.create(val);each(dom.getAttribs(bl),function(v){dom.setAttrib(nb,v.nodeName,dom.getAttrib(bl,v.nodeName));});b=s.getBookmark();dom.replace(nb,bl,1);s.moveToBookmark(b);ed.nodeChanged();return;}}val=ed.settings.forced_root_block?(val||'

'):val;if(val.indexOf('<')==-1)val='<'+val+'>';if(tinymce.isGecko)val=val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,'$1');ed.getDoc().execCommand('FormatBlock',false,val);},mceCleanup:function(){var ed=this.editor,s=ed.selection,b=s.getBookmark();ed.setContent(ed.getContent());s.moveToBookmark(b);},mceRemoveNode:function(ui,val){var ed=this.editor,s=ed.selection,b,n=val||s.getNode();if(n==ed.getBody())return;b=s.getBookmark();ed.dom.remove(n,1);s.moveToBookmark(b);ed.nodeChanged();},mceSelectNodeDepth:function(ui,val){var ed=this.editor,s=ed.selection,c=0;ed.dom.getParent(s.getNode(),function(n){if(n.nodeType==1&&c++==val){s.select(n);ed.nodeChanged();return false;}},ed.getBody());},mceSelectNode:function(u,v){this.editor.selection.select(v);},mceInsertContent:function(ui,val){this.editor.selection.setContent(val);},mceInsertRawHTML:function(ui,val){var ed=this.editor;ed.selection.setContent('tiny_mce_marker');ed.setContent(ed.getContent().replace(/tiny_mce_marker/g,val));},mceRepaint:function(){var s,b,e=this.editor;if(tinymce.isGecko){try{s=e.selection;b=s.getBookmark(true);if(s.getSel())s.getSel().selectAllChildren(e.getBody());s.collapse(true);s.moveToBookmark(b);}catch(ex){}}},queryStateUnderline:function(){var ed=this.editor,n=ed.selection.getNode();if(n&&n.nodeName=='A')return false;return this._queryState('Underline');},queryStateOutdent:function(){var ed=this.editor,n;if(ed.settings.inline_styles){if((n=ed.dom.getParent(ed.selection.getStart(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;if((n=ed.dom.getParent(ed.selection.getEnd(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;}return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList()||(!ed.settings.inline_styles&&!!ed.dom.getParent(ed.selection.getNode(),'BLOCKQUOTE'));},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'UL');},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'OL');},queryStatemceBlockQuote:function(){return!!this.editor.dom.getParent(this.editor.selection.getStart(),function(n){return n.nodeName==='BLOCKQUOTE';});},mceBlockQuote:function(){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,sb,eb,n,bm,bq,r,bq2,i,nl;function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==='BLOCKQUOTE';});};sb=dom.getParent(s.getStart(),isBlock);eb=dom.getParent(s.getEnd(),isBlock);if(bq=getBQ(sb)){if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();if(getBQ(eb)){bq2=bq.cloneNode(false);while(n=eb.nextSibling)bq2.appendChild(n.parentNode.removeChild(n));}if(bq2)dom.insertAfter(bq2,bq);nl=t._getSelectedBlocks(sb,eb);for(i=nl.length-1;i>=0;i--){dom.insertAfter(nl[i],bq);}if(/^\s*$/.test(bq.innerHTML))dom.remove(bq,1);if(bq2&&/^\s*$/.test(bq2.innerHTML))dom.remove(bq2,1);if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(0);if(dom.getParent(s.getStart(),isBlock)!=sb){r=s.getRng();r.move('character',-1);r.select();}}}else t.editor.selection.moveToBookmark(bm);return;}if(isIE&&!sb&&!eb){t.editor.getDoc().execCommand('Indent');n=getBQ(s.getNode());n.style.margin=n.dir='';return;}if(!sb||!eb)return;if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();each(t._getSelectedBlocks(getBQ(s.getStart()),getBQ(s.getEnd())),function(e){if(e.nodeName=='BLOCKQUOTE'&&!bq){bq=e;return;}if(!bq){bq=dom.create('blockquote');e.parentNode.insertBefore(bq,e);}if(e.nodeName=='BLOCKQUOTE'&&bq){n=e.firstChild;while(n){bq.appendChild(n.cloneNode(true));n=n.nextSibling;}dom.remove(e);return;}bq.appendChild(dom.remove(e));});if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(1);}}else s.moveToBookmark(bm);},_applyInlineStyle:function(na,at,op){var t=this,ed=t.editor,dom=ed.dom,bm,lo={},kh;na=na.toUpperCase();if(op&&op.check_classes&&at['class'])op.check_classes.push(at['class']);function replaceFonts(){var bm;each(dom.select(tinymce.isWebKit&&!tinymce.isAir?'span':'font'),function(n){if(n.style.fontFamily=='mceinline'||n.face=='mceinline'){if(!bm)bm=ed.selection.getBookmark();at._mce_new='1';dom.replace(dom.create(na,at),n,1);}});each(dom.select(na),function(n){if(n.getAttribute('_mce_new')){function removeStyle(n){if(n.nodeType==1){each(at.style,function(v,k){dom.setStyle(n,k,'');});if(at['class']&&n.className&&op){each(op.check_classes,function(c){if(dom.hasClass(n,c))dom.removeClass(n,c);});}}};each(dom.select(na,n),removeStyle);if(n.parentNode&&n.parentNode.nodeType==1&&n.parentNode.childNodes.length==1)removeStyle(n.parentNode);dom.getParent(n.parentNode,function(pn){if(pn.nodeType==1){if(at.style){each(at.style,function(v,k){var sv;if(!lo[k]&&(sv=dom.getStyle(pn,k))){if(sv===v)dom.setStyle(n,k,'');lo[k]=1;}});}if(at['class']&&pn.className&&op){each(op.check_classes,function(c){if(dom.hasClass(pn,c))dom.removeClass(n,c);});}}return false;});n.removeAttribute('_mce_new');}});each(dom.select(na).reverse(),function(n){var c=0;each(dom.getAttribs(n),function(an){if(an.nodeName.substring(0,1)!='_'&&dom.getAttrib(n,an.nodeName)!=''){c++;}});if(c==0)dom.remove(n,1);});ed.selection.moveToBookmark(bm);return!!bm;};ed.focus();ed.getDoc().execCommand('FontName',false,'mceinline');replaceFonts();if(kh=t._applyInlineStyle.keyhandler){ed.onKeyUp.remove(kh);ed.onKeyPress.remove(kh);ed.onKeyDown.remove(kh);ed.onSetContent.remove(t._applyInlineStyle.chandler);}if(ed.selection.isCollapsed()){t._pendingStyles=tinymce.extend(t._pendingStyles||{},at.style);t._applyInlineStyle.chandler=ed.onSetContent.add(function(){delete t._pendingStyles;});t._applyInlineStyle.keyhandler=kh=function(e){if(t._pendingStyles){at.style=t._pendingStyles;delete t._pendingStyles;}if(replaceFonts()){ed.onKeyDown.remove(t._applyInlineStyle.keyhandler);ed.onKeyPress.remove(t._applyInlineStyle.keyhandler);}if(e.type=='keyup')ed.onKeyUp.remove(t._applyInlineStyle.keyhandler);};ed.onKeyDown.add(kh);ed.onKeyPress.add(kh);ed.onKeyUp.add(kh);}else t._pendingStyles=0;},_getSelectedBlocks:function(st,en){var ed=this.editor,dom=ed.dom,s=ed.selection,sb,eb,n,bl=[];sb=dom.getParent(st||s.getStart(),isBlock);eb=dom.getParent(en||s.getEnd(),isBlock);if(sb)bl.push(sb);if(sb&&eb&&sb!=eb){n=sb;while((n=n.nextSibling)&&n!=eb){if(isBlock(n))bl.push(n);}}if(eb&&sb!=eb)bl.push(eb);return bl;}});})();tinymce.create('tinymce.UndoManager',{index:0,data:null,typing:0,UndoManager:function(ed){var t=this,Dispatcher=tinymce.util.Dispatcher;t.editor=ed;t.data=[];t.onAdd=new Dispatcher(this);t.onUndo=new Dispatcher(this);t.onRedo=new Dispatcher(this);},add:function(l){var t=this,i,ed=t.editor,b,s=ed.settings,la;l=l||{};l.content=l.content||ed.getContent({format:'raw',no_events:1});l.content=l.content.replace(/^\s*|\s*$/g,'');la=t.data[t.index>0&&(t.index==0||t.index==t.data.length)?t.index-1:t.index];if(!l.initial&&la&&l.content==la.content)return null;if(s.custom_undo_redo_levels){if(t.data.length>s.custom_undo_redo_levels){for(i=0;i0){if(t.index==t.data.length&&t.index>1){i=t.index;t.typing=0;if(!t.add())t.index=i;--t.index;}l=t.data[--t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onUndo.dispatch(t,l);}return l;},redo:function(){var t=this,ed=t.editor,l=null;if(t.index','gi');t.rePadd=new RegExp(']+)><\\\/p>|]+)\\\/>|]+)>\\s+<\\\/p>|

<\\\/p>||

\\s+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR1=new RegExp(']+)>[\\s\\u00a0]+<\\\/p>|

[\\s\\u00a0]+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR2=new RegExp(']+)>( | )<\\\/p>|

( | )<\\\/p>'.replace(/p/g,elm),'gi');t.reBR2Nbsp=new RegExp(']+)>\\s*
\\s*<\\\/p>|

\\s*
\\s*<\\\/p>'.replace(/p/g,elm),'gi');t.reTrailBr=new RegExp('\\s*
\\s*<\\\/p>'.replace(/p/g,elm),'gi');function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'');o.content=o.content.replace(t.rePadd,'<'+elm+'$1$2$3$4$5$6>\u00a0');if(!isIE&&!isOpera&&o.set){o.content=o.content.replace(t.reNbsp2BR1,'<'+elm+'$1$2>
');o.content=o.content.replace(t.reNbsp2BR2,'<'+elm+'$1$2>
');}else{o.content=o.content.replace(t.reBR2Nbsp,'<'+elm+'$1$2>\u00a0');o.content=o.content.replace(t.reTrailBr,'');}};ed.onBeforeSetContent.add(padd);ed.onPostProcess.add(padd);if(s.forced_root_block){ed.onInit.add(t.forceRoots,t);ed.onSetContent.add(t.forceRoots,t);ed.onBeforeGetContent.add(t.forceRoots,t);}},setup:function(){var t=this,ed=t.editor,s=ed.settings;if(s.forced_root_block){ed.onKeyUp.add(t.forceRoots,t);ed.onPreProcess.add(t.forceRoots,t);}if(s.force_br_newlines){if(isIE){ed.onKeyPress.add(function(ed,e){var n,s=ed.selection;if(e.keyCode==13&&s.getNode().nodeName!='LI'){s.setContent('
',{format:'raw'});n=ed.dom.get('__');n.removeAttribute('id');s.select(n);s.collapse();return Event.cancel(e);}});}return;}if(!isIE&&s.force_p_newlines){ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&!e.shiftKey){if(!t.insertPara(e))Event.cancel(e);}});if(isGecko){ed.onKeyDown.add(function(ed,e){if((e.keyCode==8||e.keyCode==46)&&!e.shiftKey)t.backspaceDelete(e,e.keyCode==8);});}}function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function(a){if(a.specified&&a.nodeValue)ne.setAttribute(a.nodeName.toLowerCase(),a.nodeValue);});each(rn.childNodes,function(n){ne.appendChild(n.cloneNode(true));});rn.parentNode.replaceChild(ne,rn);return ne;};if(isIE&&s.element!='P'){ed.onKeyPress.add(function(ed,e){t.lastElm=ed.selection.getNode().nodeName;});ed.onKeyUp.add(function(ed,e){var bl,sel=ed.selection,n=sel.getNode(),b=ed.getBody();if(b.childNodes.length===1&&n.nodeName=='P'){n=ren(n,s.element);sel.select(n);sel.collapse();ed.nodeChanged();}else if(e.keyCode==13&&!e.shiftKey&&t.lastElm!='P'){bl=ed.dom.getParent(n,'P');if(bl){ren(bl,s.element);ed.nodeChanged();}}});}},find:function(n,t,s){var ed=this.editor,w=ed.getDoc().createTreeWalker(n,4,null,false),c=-1;while(n=w.nextNode()){c++;if(t==0&&n==s)return c;if(t==1&&c==s)return n;}return-1;},forceRoots:function(ed,e){var t=this,ed=t.editor,b=ed.getBody(),d=ed.getDoc(),se=ed.selection,s=se.getSel(),r=se.getRng(),si=-2,ei,so,eo,tr,c=-0xFFFFFF;var nx,bl,bp,sp,le,nl=b.childNodes,i,n,eid;for(i=nl.length-1;i>=0;i--){nx=nl[i];if(nx.nodeType==3||(!t.dom.isBlock(nx)&&nx.nodeType!=8)){if(!bl){if(nx.nodeType!=3||/[^\s]/g.test(nx.nodeValue)){if(si==-2&&r){if(!isIE){if(r.startContainer.nodeType==1&&(n=r.startContainer.childNodes[r.startOffset])&&n.nodeType==1){eid=n.getAttribute("id");n.setAttribute("id","__mce");}else{if(ed.dom.getParent(r.startContainer,function(e){return e===b;})){so=r.startOffset;eo=r.endOffset;si=t.find(b,0,r.startContainer);ei=t.find(b,0,r.endContainer);}}}else{tr=d.body.createTextRange();tr.moveToElementText(b);tr.collapse(1);bp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(1);sp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(0);le=(tr.move('character',c)*-1)-sp;si=sp-bp;ei=le;}}bl=ed.dom.create(ed.settings.forced_root_block);bl.appendChild(nx.cloneNode(1));nx.parentNode.replaceChild(bl,nx);}}else{if(bl.hasChildNodes())bl.insertBefore(nx,bl.firstChild);else bl.appendChild(nx);}}else bl=null;}if(si!=-2){if(!isIE){bl=b.getElementsByTagName(ed.settings.element)[0];r=d.createRange();if(si!=-1)r.setStart(t.find(b,1,si),so);else r.setStart(bl,0);if(ei!=-1)r.setEnd(t.find(b,1,ei),eo);else r.setEnd(bl,0);if(s){s.removeAllRanges();s.addRange(r);}}else{try{r=s.createRange();r.moveToElementText(b);r.collapse(1);r.moveStart('character',si);r.moveEnd('character',ei);r.select();}catch(ex){}}}else if(!isIE&&(n=ed.dom.get('__mce'))){if(eid)n.setAttribute('id',eid);else n.removeAttribute('id');r=d.createRange();r.setStartBefore(n);r.setEndBefore(n);se.setRng(r);}},getParentBlock:function(n){var d=this.dom;return d.getParent(n,d.isBlock);},insertPara:function(e){var t=this,ed=t.editor,dom=ed.dom,d=ed.getDoc(),se=ed.settings,s=ed.selection.getSel(),r=s.getRangeAt(0),b=d.body;var rb,ra,dir,sn,so,en,eo,sb,eb,bn,bef,aft,sc,ec,n,vp=dom.getViewPort(ed.getWin()),y,ch,car;function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n=n.replace(/<[^>]+>/g,'');return n.replace(/[ \t\r\n]+/g,'')=='';};rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(true);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(true);dir=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;sn=dir?s.anchorNode:s.focusNode;so=dir?s.anchorOffset:s.focusOffset;en=dir?s.focusNode:s.anchorNode;eo=dir?s.focusOffset:s.anchorOffset;if(sn===en&&/^(TD|TH)$/.test(sn.nodeName)){dom.remove(sn.firstChild);ed.dom.add(sn,se.element,null,'
');aft=ed.dom.add(sn,se.element,null,'
');r=d.createRange();r.selectNodeContents(aft);r.collapse(1);ed.selection.setRng(r);return false;}if(sn==b&&en==b&&b.firstChild&&ed.dom.isBlock(b.firstChild)){sn=en=sn.firstChild;so=eo=0;rb=d.createRange();rb.setStart(sn,0);ra=d.createRange();ra.setStart(en,0);}sn=sn.nodeName=="HTML"?d.body:sn;sn=sn.nodeName=="BODY"?sn.firstChild:sn;en=en.nodeName=="HTML"?d.body:en;en=en.nodeName=="BODY"?en.firstChild:en;sb=t.getParentBlock(sn);eb=t.getParentBlock(en);bn=sb?sb.nodeName:se.element;if(t.dom.getParent(sb,function(n){return/OL|UL|PRE/.test(n.nodeName);}))return true;if(sb&&(sb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(sb.style.position))){bn=se.element;sb=null;}if(eb&&(eb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(eb.style.position))){bn=se.element;eb=null;}if(/(TD|TABLE|TH|CAPTION)/.test(bn)||(sb&&bn=="DIV"&&/left|right/gi.test(sb.style.cssFloat))){bn=se.element;sb=eb=null;}bef=(sb&&sb.nodeName==bn)?sb.cloneNode(0):ed.dom.create(bn);aft=(eb&&eb.nodeName==bn)?eb.cloneNode(0):ed.dom.create(bn);aft.removeAttribute('id');if(/^(H[1-6])$/.test(bn)&&sn.nodeValue&&so==sn.nodeValue.length)aft=ed.dom.create(se.element);n=sc=sn;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;sc=n;}while((n=n.previousSibling?n.previousSibling:n.parentNode));n=ec=en;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;ec=n;}while((n=n.nextSibling?n.nextSibling:n.parentNode));if(sc.nodeName==bn)rb.setStart(sc,0);else rb.setStartBefore(sc);rb.setEnd(sn,so);bef.appendChild(rb.cloneContents()||d.createTextNode(''));try{ra.setEndAfter(ec);}catch(ex){}ra.setStart(en,eo);aft.appendChild(ra.cloneContents()||d.createTextNode(''));r=d.createRange();if(!sc.previousSibling&&sc.parentNode.nodeName==bn){r.setStartBefore(sc.parentNode);}else{if(rb.startContainer.nodeName==bn&&rb.startOffset==0)r.setStartBefore(rb.startContainer);else r.setStart(rb.startContainer,rb.startOffset);}if(!ec.nextSibling&&ec.parentNode.nodeName==bn)r.setEndAfter(ec.parentNode);else r.setEnd(ra.endContainer,ra.endOffset);r.deleteContents();if(isOpera)ed.getWin().scrollTo(0,vp.y);if(bef.firstChild&&bef.firstChild.nodeName==bn)bef.innerHTML=bef.firstChild.innerHTML;if(aft.firstChild&&aft.firstChild.nodeName==bn)aft.innerHTML=aft.firstChild.innerHTML;if(isEmpty(bef))bef.innerHTML='
';function appendStyles(e,en){var nl=[],nn,n,i;e.innerHTML='';if(se.keep_styles){n=en;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)){nn=n.cloneNode(false);dom.setAttrib(nn,'id','');nl.push(nn);}}while(n=n.parentNode);}if(nl.length>0){for(i=nl.length-1,nn=e;i>=0;i--)nn=nn.appendChild(nl[i]);nl[0].innerHTML=isOpera?' ':'
';return nl[0];}else e.innerHTML=isOpera?' ':'
';};if(isEmpty(aft))car=appendStyles(aft,en);if(isOpera&&parseFloat(opera.version())<9.5){r.insertNode(bef);r.insertNode(aft);}else{r.insertNode(aft);r.insertNode(bef);}aft.normalize();bef.normalize();function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode()||n;};r=d.createRange();r.selectNodeContents(isGecko?first(car||aft):car||aft);r.collapse(1);s.removeAllRanges();s.addRange(r);y=ed.dom.getPos(aft).y;ch=aft.clientHeight;if(yvp.y+vp.h){ed.getWin().scrollTo(0,y'); +// Some global instances +var tinymce = null, tinyMCEPopup, tinyMCE; + +tinyMCEPopup = { + init : function() { + var t = this, w, ti, li, q, i, it; + + li = ('' + document.location.search).replace(/^\?/, '').split('&'); + q = {}; + for (i=0; i'); + tinymce.ScriptLoader.markDone(u); + } + } + }, + + pickColor : function(e, element_id) { + this.execCommand('mceColorPicker', true, { + color : document.getElementById(element_id).value, + func : function(c) { + document.getElementById(element_id).value = c; + + try { + document.getElementById(element_id).onchange(); + } catch (ex) { + // Try fire event, ignore errors + } + } + }); + }, + + openBrowser : function(element_id, type, option) { + tinyMCEPopup.restoreSelection(); + this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window); + }, + + confirm : function(t, cb, s) { + this.editor.windowManager.confirm(t, cb, s, window); + }, + + alert : function(tx, cb, s) { + this.editor.windowManager.alert(tx, cb, s, window); + }, + + close : function() { + var t = this; + + // To avoid domain relaxing issue in Opera + function close() { + t.editor.windowManager.close(window); + tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup + }; + + if (tinymce.isOpera) + t.getWin().setTimeout(close, 0); + else + close(); + }, + + // Internal functions + + _restoreSelection : function() { + var e = window.event.srcElement; + + if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button')) + tinyMCEPopup.restoreSelection(); + }, + +/* _restoreSelection : function() { + var e = window.event.srcElement; + + // If user focus a non text input or textarea + if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text') + tinyMCEPopup.restoreSelection(); + },*/ + + _onDOMLoaded : function() { + var t = this, ti = document.title, bm, h, nv; + + // Translate page + if (t.features.translate_i18n !== false) { + h = document.body.innerHTML; + + // Replace a=x with a="x" in IE + if (tinymce.isIE) + h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"') + + document.dir = t.editor.getParam('directionality',''); + + if ((nv = t.editor.translate(h)) && nv != h) + document.body.innerHTML = nv; + + if ((nv = t.editor.translate(ti)) && nv != ti) + document.title = ti = nv; + } + + document.body.style.display = ''; + + // Restore selection in IE when focus is placed on a non textarea or input element of the type text + if (tinymce.isIE) + document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection); + + t.restoreSelection(); + t.resizeToInnerSize(); + + // Set inline title + if (!t.isWindow) + t.editor.windowManager.setTitle(window, ti); + else + window.focus(); + + if (!tinymce.isIE && !t.isWindow) { + tinymce.dom.Event._add(document, 'focus', function() { + t.editor.windowManager.focus(t.id) + }); + } + + // Patch for accessibility + tinymce.each(t.dom.select('select'), function(e) { + e.onkeydown = tinyMCEPopup._accessHandler; + }); + + // Call onInit + // Init must be called before focus so the selection won't get lost by the focus call + tinymce.each(t.listeners, function(o) { + o.func.call(o.scope, t.editor); + }); + + // Move focus to window + if (t.getWindowArg('mce_auto_focus', true)) { + window.focus(); + + // Focus element with mceFocus class + tinymce.each(document.forms, function(f) { + tinymce.each(f.elements, function(e) { + if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) { + e.focus(); + return false; // Break loop + } + }); + }); + } + + document.onkeyup = tinyMCEPopup._closeWinKeyHandler; + }, + + _accessHandler : function(e) { + e = e || window.event; + + if (e.keyCode == 13 || e.keyCode == 32) { + e = e.target || e.srcElement; + + if (e.onchange) + e.onchange(); + + return tinymce.dom.Event.cancel(e); + } + }, + + _closeWinKeyHandler : function(e) { + e = e || window.event; + + if (e.keyCode == 27) + tinyMCEPopup.close(); + }, + + _wait : function() { + var t = this, ti; + + if (tinymce.isIE && document.location.protocol != 'https:') { + // Fake DOMContentLoaded on IE + document.write(''); - document.write(''); - document.write(''); - - // Add theme plugins - var themePlugins = tinyMCE.getParam('plugins', '', true, ','); - if (this.settings['plugins'] != '') { - for (var i=0; i'); - } -} - -function TinyMCE_confirmAdd(e) { - var elm = tinyMCE.isMSIE ? event.srcElement : e.target; - var elementId = elm.name ? elm.name : elm.id; - - if (!targetElement.getAttribute('mce_noask') && confirm(tinyMCELang['lang_edit_confirm'])) - tinyMCE.addMCEControl(elm, elementId); - else - targetElement.setAttribute('mce_noask', 'true'); -} - -function TinyMCE_updateContent(form_element_name) { - // Find MCE instance linked to given form element and copy it's value - var formElement = document.getElementById(form_element_name); - for (var n in tinyMCE.instances) { - var inst = tinyMCE.instances[n]; - if (inst.formElement == formElement) { - var doc = inst.getDoc(); - - tinyMCE._setHTML(doc, inst.formElement.value); - - if (!tinyMCE.isMSIE) - doc.body.innerHTML = tinyMCE._cleanupHTML(doc, this.settings, doc.body, inst.visualAid); - } - } -} - -function TinyMCE_addMCEControl(replace_element, form_element_name, target_document) { - var id = "mce_editor_" + tinyMCE.idCounter++; - var inst = new TinyMCEControl(tinyMCE.settings); - - inst.editorId = id; - this.instances[id] = inst; - - inst.onAdd(replace_element, form_element_name, target_document); -} - -function TinyMCE_triggerSave(skip_cleanup, skip_callback) { - // Cleanup and set all form fields - for (var n in tinyMCE.instances) { - var inst = tinyMCE.instances[n]; - tinyMCE.settings['preformatted'] = false; - - // Default to false - if (typeof(skip_cleanup) == "undefined") - skip_cleanup = false; - - // Default to false - if (typeof(skip_callback) == "undefined") - skip_callback = false; - - tinyMCE._setHTML(inst.getDoc(), inst.getBody().innerHTML); - - var htm = skip_cleanup ? inst.getBody().innerHTML : tinyMCE._cleanupHTML(inst.getDoc(), this.settings, inst.getBody(), this.visualAid, true); - - //var htm = tinyMCE._cleanupHTML(inst.getDoc(), tinyMCE.settings, inst.getBody(), false, true); - - if (tinyMCE.settings["encoding"] == "xml" || tinyMCE.settings["encoding"] == "html") - htm = tinyMCE.convertStringToXML(htm); - - if (!skip_callback && tinyMCE.settings['save_callback'] != "") - var content = eval(tinyMCE.settings['save_callback'] + "(inst.formTargetElementId,htm,inst.getBody());"); - - // Use callback content if available - if ((typeof(content) != "undefined") && content != null) - htm = content; - - // Replace some weird entities (Bug: #1056343) - htm = tinyMCE.regexpReplace(htm, "(", "(", "gi"); - htm = tinyMCE.regexpReplace(htm, ")", ")", "gi"); - htm = tinyMCE.regexpReplace(htm, ";", ";", "gi"); - htm = tinyMCE.regexpReplace(htm, """, """, "gi"); - htm = tinyMCE.regexpReplace(htm, "^", "^", "gi"); - - inst.formElement.value = htm; - } -} - -function TinyMCE__convertOnClick(node) { - // Skip on MSIE < 6+ - if (tinyMCE.isMSIE5) - return; - - // Convert all onclick to mce_onclick - var elms = node.getElementsByTagName("a"); - for (var i=0; i", "gi"); - content = tinyMCE.regexpReplace(content, "\r", "
", "gi"); - content = tinyMCE.regexpReplace(content, "\n", "
", "gi"); - } - - // Call custom cleanup code - content = tinyMCE._customCleanup("insert_to_editor", content); - - if (tinyMCE.isMSIE) { - var styleSheet = document.frames[editor_id].document.createStyleSheet(inst.settings['content_css']); - - // Ugly!!! - window.setInterval('try{tinyMCE.getCSSClasses(document.frames["' + editor_id + '"].document, "' + editor_id + '");}catch(e){}', 500); - - if (tinyMCE.settings["force_br_newlines"]) - document.frames[editor_id].document.styleSheets[0].addRule("p", "margin: 0px;"); - - var patchFunc = function() { - var event = document.frames[editor_id].event; - event.target = document.frames[editor_id].document; - - TinyMCE_handleEvent(event); - }; - - var body = document.frames[editor_id].document.body; - - body.onbeforepaste = patchFunc; - body.onbeforecut = patchFunc; - body.onpaste = patchFunc; - body.editorId = editor_id; - } else { - // Import editor css - var cssImporter = doc.createElement("link"); - cssImporter.rel = "stylesheet"; - cssImporter.href = inst.settings['content_css']; - if (headArr = doc.getElementsByTagName("head")); - headArr[0].appendChild(cssImporter); - } - - // Fix for bug #958637 - if (!tinyMCE.isMSIE) { - var contentElement = inst.getDoc().createElement("body"); - var doc = inst.getDoc(); - - contentElement.innerHTML = content; - - // Remove weridness! - if (tinyMCE.settings['force_p_newlines']) - content = content.replace(new RegExp('<>', 'g'), ""); - - if (tinyMCE.settings['cleanup_on_startup']) - inst.getBody().innerHTML = tinyMCE._cleanupHTML(doc, this.settings, contentElement); - else { - // Convert all strong/em to b/i - content = tinyMCE.regexpReplace(content, "", "", "gi"); - content = tinyMCE.regexpReplace(content, "", "", "gi"); - inst.getBody().innerHTML = contentElement.innerHTML; - } - - inst.convertAllRelativeURLs(); - } else { - if (tinyMCE.settings['cleanup_on_startup']) { - tinyMCE._setHTML(inst.getDoc(), content); - // Produces permission denied error in MSIE 5.5 - eval('try {inst.getBody().innerHTML = tinyMCE._cleanupHTML(inst.contentDocument, this.settings, inst.getBody());} catch(e) {}'); - } else - inst.getBody().innerHTML = content; - } - - tinyMCE._convertOnClick(inst.getBody()); - - // Fix for bug #957681 - //inst.getDoc().designMode = inst.getDoc().designMode; - - // Setup element references - var parentElm = document.getElementById(inst.editorId + '_parent'); - if (parentElm.lastChild.nodeName.toLowerCase() == "input") - inst.formElement = parentElm.lastChild; - else - inst.formElement = parentElm.nextSibling; - - tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual']); - inst.executeCallback('setupcontent_callback', '_setupContent', 0, editor_id, inst.getBody(), inst.getDoc()); - - // Re-add design mode on mozilla - if (!tinyMCE.isMSIE) - TinyMCE_addEventHandlers(editor_id); - - // Trigger node change - tinyMCE.selectedInstance = inst; - inst.selectNode(inst.getBody(), true, true); - tinyMCE.triggerNodeChange(false); -} - -function TinyMCE_handleEvent(e) { - //window.status = e.type + " " + e.target.nodeName + " " + (e.relatedTarget ? e.relatedTarget.nodeName : ""); - - switch (e.type) { - case "submit": - var formObj = tinyMCE.isMSIE ? window.event.srcElement : e.target; - - // Disable all UI form elements that TinyMCE created - for (var i=0; i"); - rng.collapse(false); - rng.select(); - - tinyMCE.triggerNodeChange(false); - return false; - } - } - - // Backspace or delete - if (e.keyCode == 8 || e.keyCode == 46) { - tinyMCE.selectedElement = e.target; - tinyMCE.linkElement = tinyMCE.getParentElement(e.target, "a"); - tinyMCE.imgElement = tinyMCE.getParentElement(e.target, "img"); - tinyMCE.triggerNodeChange(false); - } - - return false; - break; - - case "keyup": - case "keydown": - if (e.target.editorId) - tinyMCE.selectedInstance = tinyMCE.instances[e.target.editorId]; - else - return; - - // Handle backspace - if (tinyMCE.isGecko && tinyMCE.settings['force_p_newlines'] && (e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) { - // Insert P element instead of BR - if (tinyMCE.selectedInstance._handleBackSpace(e.type)) { - // Cancel event - e.preventDefault(); - return false; - } - } - - tinyMCE.selectedElement = null; - tinyMCE.selectedNode = null; - var elm = tinyMCE.selectedInstance.getFocusElement(); - tinyMCE.linkElement = tinyMCE.getParentElement(elm, "a"); - tinyMCE.imgElement = tinyMCE.getParentElement(elm, "img"); - tinyMCE.selectedElement = elm; - - // Update visualaids on tabs - if (tinyMCE.isGecko && e.type == "keyup" && e.keyCode == 9) - tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(), true, tinyMCE.settings['visual']); - - // Run image/link fix on Gecko if diffrent document base on paste - if (tinyMCE.isGecko && tinyMCE.settings['document_base_url'] != "" + document.location.href && e.type == "keyup" && e.ctrlKey && e.keyCode == 86) - tinyMCE.selectedInstance.fixBrokenURLs(); - - // Insert space instead of   -/* if (e.type == "keydown" && e.keyCode == 32) { - if (tinyMCE.selectedInstance._insertSpace()) { - // Cancel event - e.returnValue = false; - e.cancelBubble = true; - return false; - } - }*/ - - // MSIE custom key handling - if (tinyMCE.isMSIE && tinyMCE.settings['custom_undo_redo']) { - // Check if it's a position key press - var keys = new Array(13,45,36,35,33,34,37,38,39,40); - var posKey = false; - for (var i=0; i 18 && e.keyCode != 255)) { - tinyMCE.selectedInstance.execCommand("mceAddUndoLevel"); - tinyMCE.selectedInstance.typing = true; - tinyMCE.triggerNodeChange(false); - } - - if (posKey && e.type == "keyup") - tinyMCE.triggerNodeChange(false); - - var ctrlKeys = new Array(66,73,85,86,88); // B/I/U/V/X - var keys = new Array(8,46); // Backspace,Delete - for (var i=0; i 0) { - for (var i=0; i "; - - // Is MSIE script element - if (tinyMCE.isMSIE && elementName == "script") - return "<" + elementName + elementAttribs + ">" + node.text + ""; - - // Clean up children - if (node.hasChildNodes()) { - // Force BR - if (elementName == "p" && tinyMCE.cleanup_force_br_newlines) - output += ""; - else - output += "<" + elementName + elementAttribs + ">"; - - for (var i=0; i"; - } else { - // Allways leave anchor elements open - if (elementName == "a") - output += "<" + elementName + elementAttribs + ">"; - else { - // No children - output += "<" + elementName + elementAttribs + " />"; - } - } - - return output; - - case 3: // Text - // Do not convert script elements - if (node.parentNode.nodeName.toLowerCase() == "script") - return node.nodeValue; - - return this.convertStringToXML(node.nodeValue); - - case 8: // Comment - return ""; - - default: // Unknown - return "[UNKNOWN NODETYPE " + node.nodeType + "]"; - } -} - -function TinyMCE_convertStringToXML(html_data) { - var output = ""; - - for (var i=0; i', '', 'gi'); - - var html = this.cleanupNode(element); - - if (tinyMCE.settings['debug']) - alert("Cleanup process executed in: " + (new Date().getTime()-startTime) + " ms."); - - // Remove pesky HR paragraphs - html = tinyMCE.regexpReplace(html, '


', '
'); - html = tinyMCE.regexpReplace(html, '

 


 

', '
'); - - // Remove some mozilla crap - if (!tinyMCE.isMSIE) - html = html.replace(new RegExp('', 'g'), ""); - - if (tinyMCE.settings['apply_source_formatting']) { - html = html.replace(new RegExp('<(p|div)([^>]*)>', 'g'), "\n<$1$2>\n"); - html = html.replace(new RegExp('<\/(p|div)([^>]*)>', 'g'), "\n\n"); - html = html.replace(new RegExp('
', 'g'), "
\n"); - } - - if (tinyMCE.settings['force_br_newlines']) { - var re = new RegExp('

 

', 'g'); - html = html.replace(re, "
"); - } - - if (tinyMCE.settings['force_p_newlines']) { - // Remove weridness! - var re = new RegExp('<>', 'g'); - html = html.replace(re, ""); - } - - // Emtpy node, return empty - if (html == "
" || html == "

 

") - html = ""; - - // Call custom cleanup code - html = tinyMCE._customCleanup(on_save ? "get_from_editor" : "insert_to_editor", html); - - if (tinyMCE.settings["preformatted"]) - return "
" + html + "
"; - - return html; -} - -function TinyMCE_insertLink(href, target, title, onclick) { - function setAttrib(element, name, value) { - if (value != null && value != "") - element.setAttribute(name, value); - else - element.removeAttribute(name); - } - - this.execCommand("mceAddUndoLevel"); - - if (this.selectedInstance && this.selectedElement && this.selectedElement.nodeName.toLowerCase() == "img") { - var doc = this.selectedInstance.getDoc(); - - var linkElement = doc.createElement("a"); - - href = eval(tinyMCE.settings['urlconvertor_callback'] + "(href, linkElement);"); - setAttrib(linkElement, 'href', href); - setAttrib(linkElement, 'target', target); - setAttrib(linkElement, 'title', title); - setAttrib(linkElement, 'mce_onclick', onclick); - - linkElement.appendChild(this.selectedElement.cloneNode(true)); - - this.selectedElement.parentNode.replaceChild(linkElement, this.selectedElement); - - return; - } - - if (!this.linkElement && this.selectedInstance) { - this.selectedInstance.contentDocument.execCommand("createlink", false, "#mce_temp_url#"); - tinyMCE.linkElement = this.getElementByAttributeValue(this.selectedInstance.contentDocument.body, "a", "href", "#mce_temp_url#"); - - var elementArray = this.getElementsByAttributeValue(this.selectedInstance.contentDocument.body, "a", "href", "#mce_temp_url#"); - - for (var i=0; i= strTok2.length) { - for (var i=0; i= strTok2.length || strTok1[i] != strTok2[i]) { - breakPoint = i + 1; - break; - } - } - } - - if (strTok1.length < strTok2.length) { - for (var i=0; i= strTok1.length || strTok1[i] != strTok2[i]) { - breakPoint = i + 1; - break; - } - } - } - - if (breakPoint == 1) - return url_to_relative; - - for (var i=0; i<(strTok1.length-(breakPoint-1)); i++) - outputString += "../"; - - for (var i=breakPoint-1; i=0; i--) { - if (baseURLParts[i].length == 0) - continue; - - newBaseURLParts[newBaseURLParts.length] = baseURLParts[i]; - } - baseURLParts = newBaseURLParts.reverse(); - - // Merge relURLParts chunks - var newRelURLParts = new Array(); - var numBack = 0; - for (var i=relURLParts.length-1; i>=0; i--) { - if (relURLParts[i].length == 0 || relURLParts[i] == ".") - continue; - - if (relURLParts[i] == '..') { - numBack++; - continue; - } - - if (numBack > 0) { - numBack--; - continue; - } - - newRelURLParts[newRelURLParts.length] = relURLParts[i]; - } - - relURLParts = newRelURLParts.reverse(); - - // Remove end from absolute path - var len = baseURLParts.length-numBack; - var absPath = (len <= 0 ? "" : "/") + baseURLParts.slice(0, len).join('/') + "/" + relURLParts.join('/'); - var start = "", end = ""; - - // Build start part - if (baseURL['protocol']) - start += baseURL['protocol'] + "://"; - - if (baseURL['host']) - start += baseURL['host']; - - if (baseURL['port']) - start += ":" + baseURL['port']; - - // Build end part - if (relURL['query']) - end += "?" + relURL['query']; - - if (relURL['anchor']) - end += "#" + relURL['anchor']; - - return start + absPath + end; -} - -function TinyMCE_getParam(name, default_value, strip_whitespace, split_chr) { - var value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name]; - - // Fix bool values - if (value == "true" || value == "false") - return (value == "true"); - - if (strip_whitespace) - value = tinyMCE.regexpReplace(value, "[ \t\r\n]", ""); - - if (typeof(split_chr) != "undefined" && split_chr != null) { - value = value.split(split_chr); - var outArray = new Array(); - - for (var i=0; i 0); - - if (tinyMCE.settings['custom_undo_redo']) { - undoIndex = inst.undoIndex; - undoLevels = inst.undoLevels.length; - } - - inst.executeCallback('handleNodeChangeCallback', '_handleNodeChange', 0, editorId, elm, undoIndex, undoLevels, inst.visualAid, anySelection); - } - } - - if (this.selectedInstance && (typeof(focus) == "undefined" || focus)) - this.selectedInstance.contentWindow.focus(); -} - -function TinyMCE__customCleanup(type, content) { - // Call custom cleanup - var customCleanup = tinyMCE.settings['cleanup_callback']; - if (customCleanup != "" && eval("typeof(" + customCleanup + ")") != "undefined") - content = eval(customCleanup + "(type, content);"); - - // Trigger plugin cleanups - var plugins = tinyMCE.getParam('plugins', '', true, ','); - for (var i=0; i'); -} - -function TinyMCE_importPluginLanguagePack(name, valid_languages) { - var lang = "en"; - - valid_languages = valid_languages.split(','); - for (var i=0; i'); -} - -/** - * Adds themeurl, settings and lang to HTML code. - */ -function TinyMCE_applyTemplate(html, args) { - html = tinyMCE.replaceVar(html, "themeurl", tinyMCE.themeURL); - - if (typeof(args) != "undefined") - html = tinyMCE.replaceVars(html, args); - - html = tinyMCE.replaceVars(html, tinyMCE.settings); - html = tinyMCE.replaceVars(html, tinyMCELang); - - return html; -} - -function TinyMCE_openWindow(template, args) { - var html, width, height, x, y, resizable, scrollbars, url; - - args['mce_template_file'] = template['file']; - tinyMCE.windowArgs = args; - - html = template['html']; - if (!(width = template['width'])) - width = 320; - - if (!(height = template['height'])) - height = 200; - - // Add to height in M$ due to SP2 WHY DON'T YOU GUYS IMPLEMENT innerWidth of windows!! - if (tinyMCE.isMSIE) - height += 30; - - x = parseInt(screen.width / 2.0) - (width / 2.0); - y = parseInt(screen.height / 2.0) - (height / 2.0); - - resizable = (args && args['resizable']) ? args['resizable'] : "no"; - scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no"; - url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file']; - - // Replace all args as variables in URL - for (var name in args) - url = tinyMCE.replaceVar(url, name, escape(args[name])); - - if (html) { - html = tinyMCE.replaceVar(html, "css", this.settings['popups_css']); - html = tinyMCE.applyTemplate(html, args); - - var win = window.open("", "mcePopup", "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=yes,minimizable=" + resizable + ",modal=yes,width=" + width + ",height=" + height + ",resizable=" + resizable); - win.document.write(html); - win.document.close(); - win.resizeTo(width, height); - win.focus(); - } else { - if (tinyMCE.isMSIE && resizable != 'yes') { - var features = "resizable:" + resizable - + ";scroll:" - + scrollbars + ";status:yes;center:yes;help:no;dialogWidth:" - + width + "px;dialogHeight:" + height + "px;"; - - window.showModalDialog(url, window, features); - } else { - var win = window.open(url, "mcePopup", "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=yes,minimizable=" + resizable + ",modal=yes,width=" + width + ",height=" + height + ",resizable=" + resizable); - eval('try { win.resizeTo(width, height); } catch(e) { }'); - win.focus(); - } - } -} - -function TinyMCE_handleVisualAid(element, deep, state) { - function getAttrib(elm, name) { - return elm.getAttribute(name) ? elm.getAttribute(name) : ""; - } - - var tableElement = null; - - switch (element.nodeName.toLowerCase()) { - case "table": - var cssText = element.getAttribute("border") == 0 ? tinyMCE.settings['visual_table_style'] : ""; - - // Fix width - var attribValue = getAttrib(element, "width"); - if (attribValue == "") - attribValue = element.clientWidth; - element.setAttribute("width", attribValue); - - // Fix height - var attribValue = getAttrib(element, "height"); - if (attribValue == "") - attribValue = element.clientHeight; - element.setAttribute("height", attribValue); - - element.style.cssText = state ? cssText : ""; - - for (var y=0; y'; - return; - } - - break;*/ - } - - if (deep && element.hasChildNodes()) { - for (var i=0; i

breaks runtime? - if (tinyMCE.isMSIE) { - var re = new RegExp('


', 'g'); - html_content = html_content.replace(re, "
"); - } - - doc.body.innerHTML = html_content; - - // Content duplication bug fix - if (tinyMCE.isMSIE && tinyMCE.settings['fix_content_duplication']) { - // Remove P elements in P elements - var paras = doc.getElementsByTagName("P"); - for (var i=0; i<\/o:p>", "
"); - html = tinyMCE.regexpReplace(html, " <\/o:p>", ""); - html = tinyMCE.regexpReplace(html, "", ""); - html = tinyMCE.regexpReplace(html, "

<\/p>", ""); - html = tinyMCE.regexpReplace(html, "

<\/p>\r\n

<\/p>", ""); - html = tinyMCE.regexpReplace(html, "

 <\/p>", "
"); - html = tinyMCE.regexpReplace(html, "

\s*(

\s*)?", "

"); - html = tinyMCE.regexpReplace(html, "<\/p>\s*(<\/p>\s*)?", "

"); - } - - // Always set the htmlText output - doc.body.innerHTML = html; - } -} - -function TinyMCE__getElementById(element_id) { - var elm = document.getElementById(element_id); - if (!elm) { - // Check for element in forms - for (var j=0; j 0) { - var csses = null; - - // Just ignore any errors - eval("try {var csses = tinyMCE.isMSIE ? doc.styleSheets(0).rules : doc.styleSheets[0].cssRules;} catch(e) {}"); - if (!csses) - return null; - - for (var i=0; i 0) - tinyMCE.cssClasses = output; - - return output; -} - -function TinyMCE_regexpReplace(in_str, reg_exp, replace_str, opts) { - if (typeof(opts) == "undefined") - opts = 'g'; - - var re = new RegExp(reg_exp, opts); - return in_str.replace(re, replace_str); -} - -function TinyMCE_cleanupEventStr(str) { - str = "" + str; - str = str.replace('function anonymous()\n{\n', ''); - str = str.replace('\n}', ''); - - return str; -} - -function TinyMCE_getAbsPosition(node) { - var x = 0, y = 0; - var pos = new Object(); - - var parentNode = node; - while (parentNode) { - x += parentNode.offsetLeft; - y += parentNode.offsetTop; - - parentNode = parentNode.offsetParent; - } - - pos.absLeft = x; - pos.absTop = y; - - return pos; -} - -function TinyMCE_openFileBrowser(field_name, url, type, win) { - var cb = tinyMCE.getParam("file_browser_callback"); - - this.setWindowArg("window", win); - - // Call to external callback - if(eval('typeof('+cb+')') == "undefined") - alert("Callback function: " + cb + " could not be found."); - else - eval(cb + "(field_name, url, type, win);"); -} - -function TinyMCE_getControlHTML(control_name) { - var themePlugins = tinyMCE.getParam('plugins', '', true, ','); - var templateFunction; - - // Is it defined in any plugins - for (var i=themePlugins.length; i>=0; i--) { - templateFunction = 'TinyMCE_' + themePlugins[i] + "_getControlHTML"; - if (eval("typeof(" + templateFunction + ")") != 'undefined') { - var html = eval(templateFunction + "('" + control_name + "');"); - if (html != "") - return tinyMCE.replaceVar(html, "pluginurl", tinyMCE.baseURL + "/plugins/" + themePlugins[i]); - } - } - - return eval('TinyMCE_' + tinyMCE.settings['theme'] + "_getControlHTML" + "('" + control_name + "');"); -} - -function TinyMCE__themeExecCommand(editor_id, element, command, user_interface, value) { - var themePlugins = tinyMCE.getParam('plugins', '', true, ','); - var templateFunction; - - // Is it defined in any plugins - for (var i=themePlugins.length; i>=0; i--) { - templateFunction = 'TinyMCE_' + themePlugins[i] + "_execCommand"; - if (eval("typeof(" + templateFunction + ")") != 'undefined') { - if (eval(templateFunction + "(editor_id, element, command, user_interface, value);")) - return true; - } - } - - // Theme funtion - templateFunction = 'TinyMCE_' + tinyMCE.settings['theme'] + "_execCommand"; - if (eval("typeof(" + templateFunction + ")") != 'undefined') - return eval(templateFunction + "(editor_id, element, command, user_interface, value);"); - - // Pass to normal - return false; -} - -function TinyMCE__getThemeFunction(suffix, skip_plugins) { - if (skip_plugins) - return 'TinyMCE_' + tinyMCE.settings['theme'] + suffix; - - var themePlugins = tinyMCE.getParam('plugins', '', true, ','); - var templateFunction; - - // Is it defined in any plugins - for (var i=themePlugins.length; i>=0; i--) { - templateFunction = 'TinyMCE_' + themePlugins[i] + suffix; - if (eval("typeof(" + templateFunction + ")") != 'undefined') - return templateFunction; - } - - return 'TinyMCE_' + tinyMCE.settings['theme'] + suffix; -} - -// TinyMCEControl -function TinyMCEControl(settings) { - // Undo levels - this.undoLevels = new Array(); - this.undoIndex = 0; - - // Default settings - this.settings = settings; - this.settings['theme'] = tinyMCE.getParam("theme", "default"); - this.settings['width'] = tinyMCE.getParam("width", -1); - this.settings['height'] = tinyMCE.getParam("height", -1); - - // Functions - this.executeCallback = TinyMCEControl_executeCallback; - this.fixBrokenURLs = TinyMCEControl_fixBrokenURLs; - this.convertAllRelativeURLs = TinyMCEControl_convertAllRelativeURLs; - this.execCommand = TinyMCEControl_execCommand; - this.queryCommandValue = TinyMCEControl_queryCommandValue; - this.queryCommandState = TinyMCEControl_queryCommandState; - this.onAdd = TinyMCEControl_onAdd; - this.getFocusElement = TinyMCEControl_getFocusElement; - this.autoResetDesignMode = TinyMCEControl_autoResetDesignMode; - this._insertPara = TinyMCEControl__insertPara; - this._insertSpace = TinyMCEControl__insertSpace; - this._handleBackSpace = TinyMCEControl__handleBackSpace; - this.selectNode = TinyMCEControl_selectNode; - this.getBody = TinyMCEControl_getBody; - this.getDoc = TinyMCEControl_getDoc; - this.getWin = TinyMCEControl_getWin; - this.getSel = TinyMCEControl_getSel; - this.getRng = TinyMCEControl_getRng; -} - -function TinyMCEControl_executeCallback(param, suffix, mode) { - function isFunc(func_name) { - if (func_name == null || func_name == "") - return false; - - return eval("typeof(" + func_name + ")") != "undefined"; - } - - function exec(func_name, args) { - var str = func_name + '('; - - // Add all arguments - for (var i=3; i 0) - rng.selectNodeContents(nodes[0]); - else - rng.selectNodeContents(node); - } else - rng.selectNode(node); - - if (collapse) { - // Special treatment of textnode collapse - if (!to_start && node.nodeType == 3) { - rng.setStart(node, node.nodeValue.length); - rng.setEnd(node, node.nodeValue.length); - } else - rng.collapse(to_start); - } - - sel.removeAllRanges(); - sel.addRange(rng); - } - - // Scroll to node position - var pos = tinyMCE.getAbsPosition(node); - var doc = this.getDoc(); - var scrollX = doc.body.scrollLeft + doc.documentElement.scrollLeft; - var scrollY = doc.body.scrollTop + doc.documentElement.scrollTop; - var height = tinyMCE.isMSIE ? document.getElementById(this.editorId).style.pixelHeight : parseInt(this.targetElement.style.height); - - // Only scroll if out of visible area - if (!tinyMCE.settings['auto_resize'] && !(node.absTop > scrollY && node.absTop < (scrollY - 25 + height))) - this.contentWindow.scrollTo(pos.absLeft, pos.absTop - height + 25); - - // Set selected element - tinyMCE.selectedElement = null; - if (node.nodeType == 1) - tinyMCE.selectedElement = node; -} - -function TinyMCEControl_getBody() { - return this.getDoc().body; -} - -function TinyMCEControl_getDoc() { - return this.contentWindow.document; -} - -function TinyMCEControl_getWin() { - return this.contentWindow; -} - -function TinyMCEControl_getSel() { - if (tinyMCE.isMSIE) - return this.getDoc().selection; - - return this.contentWindow.getSelection(); -} - -function TinyMCEControl_getRng() { - var sel = this.getSel(); - if (sel == null) - return null; - - if (tinyMCE.isMSIE) - return sel.createRange(); - - return this.getSel().getRangeAt(0); -} - -function TinyMCEControl__insertPara() { - function getNodeText(node) { - var nodes = tinyMCE.getNodeTree(node, new Array(), 3); - var text = ""; - - for (var i=0; i") - paraBefore.innerHTML = " "; - - // Check if it's a empty paragraph - if (getNodeText(paraAfter) == "" || paraAfter.innerHTML == "
") - paraAfter.innerHTML = " "; - - // Delete old contents - rngBefore.deleteContents(); - rng.deleteContents(); - - // Insert new paragraphs - paraAfter.normalize(); - rng.insertNode(paraAfter); - paraBefore.normalize(); - rngBefore.insertNode(paraBefore); - } else { - body.innerHTML = "

 

 

"; - paraAfter = body.childNodes[1]; - } - - this.selectNode(paraAfter, true, true); - - //showHTML(this.getBody().innerHTML); - - return true; - } - - // Place first part within new paragraph - rngBefore.setStartBefore(startChop); - rngBefore.setEnd(startNode, startOffset); - paraBefore.appendChild(rngBefore.cloneContents()); - - // Place secound part within new paragraph - rngAfter.setEndAfter(endChop); - rngAfter.setStart(endNode, endOffset); - paraAfter.appendChild(rngAfter.cloneContents()); - - // Check if it's a empty paragraph - if (getNodeText(paraBefore) == "" || paraBefore.innerHTML == "
") - paraBefore.innerHTML = " "; - - // Check if it's a empty paragraph - if (getNodeText(paraAfter) == "" || paraAfter.innerHTML == "
") - paraAfter.innerHTML = " "; - - // Create a range around everything - var rng = doc.createRange(); - - if (!startChop.previousSibling && startChop.parentNode.nodeName.toLowerCase() == 'p') - rng.setStartBefore(startChop.parentNode); - else { - if (rngBefore.startContainer.nodeName.toLowerCase() == 'p' && rngBefore.startOffset == 0) - rng.setStartBefore(rngBefore.startContainer); - else - rng.setStart(rngBefore.startContainer, rngBefore.startOffset); - } - - if (!endChop.nextSibling && endChop.parentNode.nodeName.toLowerCase() == 'p') - rng.setEndAfter(endChop.parentNode); - else - rng.setEnd(rngAfter.endContainer, rngAfter.endOffset); - - // Delete all contents and insert new paragraphs - rng.deleteContents(); - rng.insertNode(paraAfter); - rng.insertNode(paraBefore); - - paraAfter.normalize(); - paraBefore.normalize(); - - this.selectNode(paraAfter, true, true); - //showHTML(this.getBody().innerHTML); - - return true; -} - -function TinyMCEControl__handleBackSpace(evt_type) { - var doc = this.getDoc(); - var sel = this.contentWindow.getSelection(); - if (sel == null) - return false; - - var rng = sel.getRangeAt(0); - var node = rng.startContainer; - var elm = node.nodeType == 3 ? node.parentNode : node; - - if (node == null) - return; - - // Empty node, wrap contents in paragraph - if (elm && elm.nodeName == "") { - var para = doc.createElement("p"); - - while (elm.firstChild) - para.appendChild(elm.firstChild); - - elm.parentNode.insertBefore(para, elm); - elm.parentNode.removeChild(elm); - - var rng = rng.cloneRange(); - rng.setStartBefore(node.nextSibling); - rng.setEndAfter(node.nextSibling); - rng.extractContents(); - - this.selectNode(node.nextSibling, true, true); - } - - // Remove empty paragraphs - var para = tinyMCE.getParentBlockElement(node); - if (para != null && para.nodeName.toLowerCase() == 'p' && evt_type == "keypress") { - var htm = para.innerHTML; - var block = tinyMCE.getParentBlockElement(node); - - // Empty node, we do the killing!! - if (htm == "" || htm == " " || block.nodeName.toLowerCase() == "li") { - var prevElm = para.previousSibling; - - while (prevElm != null && prevElm.nodeType != 1) - prevElm = prevElm.previousSibling; - - if (prevElm == null) - return false; - - // Get previous elements last text node - var nodes = tinyMCE.getNodeTree(prevElm, new Array(), 3); - var lastTextNode = nodes.length == 0 ? null : nodes[nodes.length-1]; - - // Select the last text node and move curstor to end - if (lastTextNode != null) - this.selectNode(lastTextNode, true, false, false); - - // Remove the empty paragrapsh - para.parentNode.removeChild(para); - - //debug("within p element" + para.innerHTML); - //showHTML(this.getBody().innerHTML); - return true; - } - } - - // Remove BR elements -/* while (node != null && (node = node.nextSibling) != null) { - if (node.nodeName.toLowerCase() == 'br') - node.parentNode.removeChild(node); - else if (node.nodeType == 1) // Break at other element - break; - }*/ - - //showHTML(this.getBody().innerHTML); - - return false; -} - -function TinyMCEControl__insertSpace() { - return true; -} - -function TinyMCEControl_autoResetDesignMode() { - // Add fix for tab/style.display none/block problems in Gecko - if (!tinyMCE.isMSIE && tinyMCE.settings['auto_reset_designmode']) { - var sel = this.contentWindow.getSelection(); - - // Weird, wheres that cursor selection? - if (!sel || !sel.rangeCount || sel.rangeCount == 0) - eval('try { this.getDoc().designMode = "On"; } catch(e) {}'); - } -} - -function TinyMCEControl_execCommand(command, user_interface, value) { - function getAttrib(elm, name) { - return elm.getAttribute(name) ? elm.getAttribute(name) : ""; - } - - // Mozilla issue - if (!tinyMCE.isMSIE && !this.useCSS) { - this.getDoc().execCommand("useCSS", false, true); - this.useCSS = true; - } - - //alert("command: " + command + ", user_interface: " + user_interface + ", value: " + value); - this.contentDocument = this.getDoc(); // <-- Strange!! - - // Call theme execcommand - if (tinyMCE._themeExecCommand(this.editorId, this.contentDocument.body, command, user_interface, value)) - return; - - // Add undo level of operation - if (command != "mceAddUndoLevel" && command != "Undo" && command != "Redo" && command != "mceImage" && command != "mceLink" && command != "mceToggleVisualAid" && (command != "mceInsertTable" && !user_interface)) - this.execCommand("mceAddUndoLevel"); - - // Fix align on images - if (this.getFocusElement() && this.getFocusElement().nodeName.toLowerCase() == "img") { - var align = this.getFocusElement().getAttribute('align'); - - switch (command) { - case "JustifyLeft": - if (align == 'left') - this.getFocusElement().removeAttribute('align'); - else - this.getFocusElement().setAttribute('align', 'left'); - - tinyMCE.triggerNodeChange(); - return; - - case "JustifyCenter": - if (align == 'middle') - this.getFocusElement().removeAttribute('align'); - else - this.getFocusElement().setAttribute('align', 'middle'); - - tinyMCE.triggerNodeChange(); - return; - - case "JustifyRight": - if (align == 'right') - this.getFocusElement().removeAttribute('align'); - else - this.getFocusElement().setAttribute('align', 'right'); - - tinyMCE.triggerNodeChange(); - return; - } - } - - if (tinyMCE.settings['force_br_newlines']) { - var doc = this.getDoc(); - var alignValue = ""; - - if (doc.selection.type != "Control") { - switch (command) { - case "JustifyLeft": - alignValue = "left"; - break; - - case "JustifyCenter": - alignValue = "center"; - break; - - case "JustifyFull": - alignValue = "justify"; - break; - - case "JustifyRight": - alignValue = "right"; - break; - } - - if (alignValue != "") { - var rng = doc.selection.createRange(); - - if ((divElm = tinyMCE.getParentElement(rng.parentElement(), "div")) != null) - divElm.setAttribute("align", alignValue); - else if (rng.pasteHTML && rng.htmlText.length > 0) - rng.pasteHTML('
' + rng.htmlText + "
"); - - tinyMCE.triggerNodeChange(); - return; - } - } - } - - switch (command) { - case "mceSelectNode": - this.selectNode(value); - tinyMCE.triggerNodeChange(); - tinyMCE.selectedNode = value; - break; - - case "mceSelectNodeDepth": - var parentNode = this.getFocusElement(); - for (var i=0; parentNode; i++) { - if (parentNode.nodeName.toLowerCase() == "body") - break; - - if (parentNode.nodeName.toLowerCase() == "#text") { - i--; - parentNode = parentNode.parentNode; - continue; - } - - if (i == value) { - this.selectNode(parentNode, false); - tinyMCE.triggerNodeChange(); - tinyMCE.selectedNode = parentNode; - return; - } - - parentNode = parentNode.parentNode; - } - - break; - - case "HiliteColor": - if (tinyMCE.isGecko) { - this.contentDocument.execCommand("useCSS", false, false); - this.contentDocument.execCommand('hilitecolor', false, value); - this.contentDocument.execCommand("useCSS", false, true); - } else - this.contentDocument.execCommand('backcolor', false, value); - break; - - case "Cut": - case "Copy": - case "Paste": - var cmdFailed = false; - - // Try executing command - eval('try {this.contentDocument.execCommand(command, user_interface, value);} catch (e) {cmdFailed = true;}'); - - // Alert error in gecko if command failed - if (tinyMCE.isGecko && cmdFailed) { - // Confirm more info - if (confirm(tinyMCE.getLang('lang_clipboard_msg'))) - window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', 'mceExternal'); - - return; - } else - tinyMCE.triggerNodeChange(); - break; - - case "mceLink": - var selectedText = ""; - - if (tinyMCE.isMSIE) { - var doc = this.getDoc(); - var rng = doc.selection.createRange(); - selectedText = rng.text; - } else - selectedText = this.contentWindow.getSelection().toString(); - - if (!tinyMCE.linkElement) { - if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0)) - return; - } - - var href = "", target = "", title = "", onclick = "", action = "insert"; - - if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a") - tinyMCE.linkElement = tinyMCE.selectedElement; - - // Is anchor not a link - if (tinyMCE.linkElement != null && getAttrib(tinyMCE.linkElement, 'href') == "") - tinyMCE.linkElement = null; - - if (tinyMCE.linkElement) { - href = getAttrib(tinyMCE.linkElement, 'href'); - target = getAttrib(tinyMCE.linkElement, 'target'); - title = getAttrib(tinyMCE.linkElement, 'title'); - onclick = getAttrib(tinyMCE.linkElement, 'mce_onclick'); - - // Try old onclick to if copy/pasted content - if (onclick == "") - onclick = getAttrib(tinyMCE.linkElement, 'onclick'); - - onclick = tinyMCE.cleanupEventStr(onclick); - - // Fix for drag-drop/copy paste bug in Mozilla - mceRealHref = getAttrib(tinyMCE.linkElement, 'mce_real_href'); - if (mceRealHref != "") - href = mceRealHref; - - href = eval(tinyMCE.settings['urlconvertor_callback'] + "(href, tinyMCE.linkElement, true);"); - action = "update"; - } - - if (this.settings['insertlink_callback']) { - var returnVal = eval(this.settings['insertlink_callback'] + "(href, target, title, onclick, action);"); - if (returnVal && returnVal['href']) - tinyMCE.insertLink(returnVal['href'], returnVal['target'], returnVal['title'], returnVal['onclick']); - } else { - tinyMCE.openWindow(this.insertLinkTemplate, {href : href, target : target, title : title, onclick : onclick, action : action}); - } - break; - - case "mceImage": - var src = "", alt = "", border = "", hspace = "", vspace = "", width = "", height = "", align = ""; - var title = "", onmouseover = "", onmouseout = "", action = "insert"; - - if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") - tinyMCE.imgElement = tinyMCE.selectedElement; - - if (tinyMCE.imgElement) { - // Is it a internal MCE visual aid image, then skip this one. - var imgName = getAttrib(tinyMCE.imgElement, 'name'); - if (imgName.substring(0, 4)=='mce_') - return; - - src = getAttrib(tinyMCE.imgElement, 'src'); - alt = getAttrib(tinyMCE.imgElement, 'alt'); - - // Try polling out the title - if (alt == "") - alt = getAttrib(tinyMCE.imgElement, 'title'); - - border = getAttrib(tinyMCE.imgElement, 'border'); - hspace = getAttrib(tinyMCE.imgElement, 'hspace'); - vspace = getAttrib(tinyMCE.imgElement, 'vspace'); - width = getAttrib(tinyMCE.imgElement, 'width'); - height = getAttrib(tinyMCE.imgElement, 'height'); - align = getAttrib(tinyMCE.imgElement, 'align'); - onmouseover = getAttrib(tinyMCE.imgElement, 'onmouseover'); - onmouseout = getAttrib(tinyMCE.imgElement, 'onmouseout'); - title = getAttrib(tinyMCE.imgElement, 'title'); - - onmouseover = tinyMCE.cleanupEventStr(onmouseover); - onmouseout = tinyMCE.cleanupEventStr(onmouseout); - - // Fix for drag-drop/copy paste bug in Mozilla - mceRealSrc = getAttrib(tinyMCE.imgElement, 'mce_real_src'); - if (mceRealSrc != "") - src = mceRealSrc; - - src = eval(tinyMCE.settings['urlconvertor_callback'] + "(src, tinyMCE.imgElement, true);"); - action = "update"; - } - - if (this.settings['insertimage_callback']) { - var returnVal = eval(this.settings['insertimage_callback'] + "(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);"); - if (returnVal && returnVal['src']) - tinyMCE.insertImage(returnVal['src'], returnVal['alt'], returnVal['border'], returnVal['hspace'], returnVal['vspace'], returnVal['width'], returnVal['height'], returnVal['align'], returnVal['title'], returnVal['onmouseover'], returnVal['onmouseout']); - } else - tinyMCE.openWindow(this.insertImageTemplate, {src : src, alt : alt, border : border, hspace : hspace, vspace : vspace, width : width, height : height, align : align, title : title, onmouseover : onmouseover, onmouseout : onmouseout, action : action}); - break; - - case "mceCleanupWord": - if (tinyMCE.isMSIE) { - var html = this.contentDocument.body.createTextRange().htmlText; - - if (html.indexOf('="mso') != -1) { - tinyMCE._setHTML(this.contentDocument, this.contentDocument.body.innerHTML); - html = tinyMCE._cleanupHTML(this.contentDocument, this.settings, this.contentDocument.body, this.visualAid); - } - - this.contentDocument.body.innerHTML = html; - } - break; - - case "mceCleanup": - tinyMCE._setHTML(this.contentDocument, this.contentDocument.body.innerHTML); - this.contentDocument.body.innerHTML = tinyMCE._cleanupHTML(this.contentDocument, this.settings, this.contentDocument.body, this.visualAid); - tinyMCE.triggerNodeChange(); - break; - - case "mceAnchor": - if (!user_interface) { - var aElm = tinyMCE.getParentElement(this.getFocusElement(), "a", "name"); - if (aElm) { - if (value == null || value == "") { - if (tinyMCE.isMSIE) { - aElm.outerHTML = aElm.innerHTML; - } else { - var rng = aElm.ownerDocument.createRange(); - rng.setStartBefore(aElm); - rng.setEndAfter(aElm); - rng.deleteContents(); - rng.insertNode(rng.createContextualFragment(aElm.innerHTML)); - } - } else - aElm.setAttribute('name', value); - } else { - this.contentDocument.execCommand("fontname", false, "#mce_temp_font#"); - var elementArray = tinyMCE.getElementsByAttributeValue(this.contentDocument.body, "font", "face", "#mce_temp_font#"); - for (var x=0; x 0) { - value = tinyMCE.replaceVar(value, "selection", selectedText); - tinyMCE.execCommand('mceInsertContent',false,value); - } - - tinyMCE.triggerNodeChange(); - break; - - case "mceSetAttribute": - if (typeof(value) == 'object') { - var targetElms = (typeof(value['targets']) == "undefined") ? "p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address" : value['targets']; - var targetNode = tinyMCE.getParentElement(this.getFocusElement(), targetElms); - - if (targetNode) { - targetNode.setAttribute(value['name'], value['value']); - tinyMCE.triggerNodeChange(); - } - } - break; - - case "mceSetCSSClass": - var selectedText = false; - - if (tinyMCE.isMSIE) { - var doc = this.getDoc(); - var rng = doc.selection.createRange(); - selectedText = (rng.text && rng.text.length > 0); - } else - selectedText = (this.contentWindow.getSelection().toString().length > 0); - - // Use selectedNode instead if defined - if (tinyMCE.selectedNode) - tinyMCE.selectedElement = tinyMCE.selectedNode; - - if (selectedText && !tinyMCE.selectedNode) { - this.contentDocument.execCommand("removeformat", false, null); - this.contentDocument.execCommand("fontname", false, "#mce_temp_font#"); - var elementArray = tinyMCE.getElementsByAttributeValue(this.contentDocument.body, "font", "face", "#mce_temp_font#"); -/* this.contentDocument.execCommand("createlink", false, "#mce_temp_url#"); - var elementArray = tinyMCE.getElementsByAttributeValue(this.contentDocument.body, "a", "href", "#mce_temp_url#"); -*/ - // Change them all - for (var x=0; x customUndoLevels) { - for (var i=0; i 0) { - this.undoIndex--; - this.getBody().innerHTML = this.undoLevels[this.undoIndex]; - } - - //window.status = "Undo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex; - tinyMCE.triggerNodeChange(); - } else - this.contentDocument.execCommand(command, user_interface, value); - break; - - case "Redo": - if (tinyMCE.settings['custom_undo_redo']) { - if (this.undoIndex < (this.undoLevels.length-1)) { - this.undoIndex++; - this.getBody().innerHTML = this.undoLevels[this.undoIndex]; - //window.status = "Redo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex; - } - - tinyMCE.triggerNodeChange(); - } else - this.contentDocument.execCommand(command, user_interface, value); - break; - - case "mceToggleVisualAid": - this.visualAid = !this.visualAid; - tinyMCE.handleVisualAid(this.getBody(), true, this.visualAid); - tinyMCE.triggerNodeChange(); - break; -/* - case "removeformat": - //this.contentDocument.execCommand('FormatBlock', user_interface, ''); - var doc = this.getDoc(); - var rng = doc.selection.createRange(); - var elm = rng.item ? rng.item(0) : rng.parentElement(); - - html = "" + rng.text + "<" + elm.nodeName + ">"; - - this.contentDocument.execCommand('FontName', user_interface, '#mce_temp_name#'); - var html = this.contentDocument.innerHTML; - html.replace('' + editorTemplate['html']; - - var templateFunction = tinyMCE._getThemeFunction('_handleNodeChange', true); - if (eval("typeof(" + templateFunction + ")") != 'undefined') - this.settings['handleNodeChangeCallback'] = templateFunction; - - html = tinyMCE.replaceVar(html, "editor_id", this.editorId); - html = tinyMCE.replaceVar(html, "default_document", tinyMCE.baseURL + "/blank.htm"); - this.settings['default_document'] = tinyMCE.baseURL + "/blank.htm"; - - this.settings['old_width'] = this.settings['width']; - this.settings['old_height'] = this.settings['height']; - - // Set default width, height - if (this.settings['width'] == -1) - this.settings['width'] = replace_element.offsetWidth; - - if (this.settings['height'] == -1) - this.settings['height'] = replace_element.offsetHeight; - - // If no width/height then default to 320x240, better than nothing - if (replace_element.offsetWidth == 0) - this.settings['width'] = 320; - - if (replace_element.offsetHeight == 0) - this.settings['height'] = 240; - - this.settings['area_width'] = this.settings['width']; - this.settings['area_height'] = this.settings['height']; - this.settings['area_width'] += deltaWidth; - this.settings['area_height'] += deltaHeight; - - // Special % handling - if (("" + this.settings['width']).indexOf('%') != -1) - this.settings['area_width'] = "100%"; - - if (("" + this.settings['height']).indexOf('%') != -1) - this.settings['area_height'] = "100%"; - - if (("" + replace_element.style.width).indexOf('%') != -1) { - this.settings['width'] = replace_element.style.width; - this.settings['area_width'] = "100%"; - } - - if (("" + replace_element.style.height).indexOf('%') != -1) { - this.settings['height'] = replace_element.style.height; - this.settings['area_height'] = "100%"; - } - - html = tinyMCE.applyTemplate(html); - - this.settings['width'] = this.settings['old_width']; - this.settings['height'] = this.settings['old_height']; - - this.visualAid = this.settings['visual']; - this.formTargetElementId = form_element_name; - - // Get replace_element contents - if (replace_element.nodeName.toLowerCase() == "textarea") - this.startContent = replace_element.value; - else - this.startContent = replace_element.innerHTML; - - // If not text area - if (replace_element.nodeName.toLowerCase() != "textarea") { - this.oldTargetElement = replace_element.cloneNode(true); - - // Debug mode - if (tinyMCE.settings['debug']) - html += ''; - else - html += ''; - - html += ''; - - // Output HTML and set editable - if (!tinyMCE.isMSIE) { - var rng = replace_element.ownerDocument.createRange(); - rng.setStartBefore(replace_element); - - var fragment = rng.createContextualFragment(html); - replace_element.parentNode.replaceChild(fragment, replace_element); - } else - replace_element.outerHTML = html; - } else { - html += ''; - - // Just hide the textarea element - this.oldTargetElement = replace_element; - - if (!tinyMCE.settings['debug']) - this.oldTargetElement.style.display = "none"; - - // Output HTML and set editable - if (!tinyMCE.isMSIE) { - var rng = replace_element.ownerDocument.createRange(); - rng.setStartBefore(replace_element); - - var fragment = rng.createContextualFragment(html); - replace_element.parentNode.insertBefore(fragment, replace_element); - } else - replace_element.insertAdjacentHTML("beforeBegin", html); - } - - // Setup iframe - var dynamicIFrame = false; - var tElm = targetDoc.getElementById(this.editorId); - - if (!tinyMCE.isMSIE) { - if (tElm && tElm.nodeName.toLowerCase() == "span") { - tElm = tinyMCE._createIFrame(tElm); - dynamicIFrame = true; - } - - this.targetElement = tElm; - this.iframeElement = tElm; - this.contentDocument = tElm.contentDocument; - this.contentWindow = tElm.contentWindow; - - //this.getDoc().designMode = "on"; - } else { - if (tElm && tElm.nodeName.toLowerCase() == "span") - tElm = tinyMCE._createIFrame(tElm); - else - tElm = targetDoc.frames[this.editorId]; - - this.targetElement = tElm; - this.iframeElement = targetDoc.getElementById(this.editorId); - this.contentDocument = tElm.window.document; - this.contentWindow = tElm.window; - this.contentDocument.designMode = "on"; - } - - // Setup base HTML - var doc = this.contentDocument; - if (dynamicIFrame) { - var html = "" - + '' - + '' - + '' - + '' - + 'blank_page' - + '' - + '' - + '' - + '' - + ''; - - try { - this.getDoc().designMode = "on"; - doc.open(); - doc.write(html); - doc.close(); - } catch (e) { - // Failed Mozilla 1.3 - this.getDoc().location.href = tinyMCE.baseURL + "/blank.htm"; - } - } - - // This timeout is needed in MSIE 5.5 for some odd reason - // it seems that the document.frames isn't initialized yet? - if (tinyMCE.isMSIE) - window.setTimeout("TinyMCE_addEventHandlers('" + this.editorId + "');", 1); - - //window.setTimeout("tinyMCE.setupContent('" + this.editorId + "');", (tinyMCE.isMSIE ? 1 : 1000)); - tinyMCE.setupContent(this.editorId); - - return true; -} - -function TinyMCEControl_getFocusElement() { - if (tinyMCE.isMSIE) { - var doc = this.getDoc(); - var rng = doc.selection.createRange(); - var elm = rng.item ? rng.item(0) : rng.parentElement(); - } else { - var sel = this.contentWindow.getSelection(); - var elm = (sel && sel.anchorNode) ? sel.anchorNode : null; - - if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") - elm = tinyMCE.selectedElement; - } - - return elm; -} - -// Global instances -var tinyMCE = new TinyMCE(); -var tinyMCELang = new Array(); + +/* file:jscripts/tiny_mce/classes/tinymce.js */ + +var tinymce = { + majorVersion : '3', + minorVersion : '2.1.1', + releaseDate : '2008-11-27', + + _init : function() { + var t = this, d = document, w = window, na = navigator, ua = na.userAgent, i, nl, n, base, p, v; + + // Browser checks + t.isOpera = w.opera && opera.buildNumber; + t.isWebKit = /WebKit/.test(ua); + t.isOldWebKit = t.isWebKit && !w.getSelection().getRangeAt; + t.isIE = !t.isWebKit && !t.isOpera && (/MSIE/gi).test(ua) && (/Explorer/gi).test(na.appName); + t.isIE6 = t.isIE && /MSIE [56]/.test(ua); + t.isGecko = !t.isWebKit && /Gecko/.test(ua); + t.isMac = ua.indexOf('Mac') != -1; + t.isAir = /adobeair/i.test(ua); + + // TinyMCE .NET webcontrol might be setting the values for TinyMCE + if (w.tinyMCEPreInit) { + t.suffix = tinyMCEPreInit.suffix; + t.baseURL = tinyMCEPreInit.base; + t.query = tinyMCEPreInit.query; + return; + } + + // Get suffix and base + t.suffix = ''; + + // If base element found, add that infront of baseURL + nl = d.getElementsByTagName('base'); + for (i=0; i : + s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s); + cn = s[3].match(/(^|\.)(\w+)$/i)[2]; // Class name + + // Create namespace for new class + ns = t.createNS(s[3].replace(/\.\w+$/, '')); + + // Class already exists + if (ns[cn]) + return; + + // Make pure static class + if (s[2] == 'static') { + ns[cn] = p; + + if (this.onCreate) + this.onCreate(s[2], s[3], ns[cn]); + + return; + } + + // Create default constructor + if (!p[cn]) { + p[cn] = function() {}; + de = 1; + } + + // Add constructor and methods + ns[cn] = p[cn]; + t.extend(ns[cn].prototype, p); + + // Extend + if (s[5]) { + sp = t.resolve(s[5]).prototype; + scn = s[5].match(/\.(\w+)$/i)[1]; // Class name + + // Extend constructor + c = ns[cn]; + if (de) { + // Add passthrough constructor + ns[cn] = function() { + return sp[scn].apply(this, arguments); + }; + } else { + // Add inherit constructor + ns[cn] = function() { + this.parent = sp[scn]; + return c.apply(this, arguments); + }; + } + ns[cn].prototype[cn] = ns[cn]; + + // Add super methods + t.each(sp, function(f, n) { + ns[cn].prototype[n] = sp[n]; + }); + + // Add overridden methods + t.each(p, function(f, n) { + // Extend methods if needed + if (sp[n]) { + ns[cn].prototype[n] = function() { + this.parent = sp[n]; + return f.apply(this, arguments); + }; + } else { + if (n != cn) + ns[cn].prototype[n] = f; + } + }); + } + + // Add static methods + t.each(p['static'], function(f, n) { + ns[cn][n] = f; + }); + + if (this.onCreate) + this.onCreate(s[2], s[3], ns[cn].prototype); + }, + + walk : function(o, f, n, s) { + s = s || this; + + if (o) { + if (n) + o = o[n]; + + tinymce.each(o, function(o, i) { + if (f.call(s, o, i, n) === false) + return false; + + tinymce.walk(o, f, n, s); + }); + } + }, + + createNS : function(n, o) { + var i, v; + + o = o || window; + + n = n.split('.'); + for (i=0; i= items.length) { + for (i = 0, l = base.length; i < l; i++) { + if (i >= items.length || base[i] != items[i]) { + bp = i + 1; + break; + } + } + } + + if (base.length < items.length) { + for (i = 0, l = items.length; i < l; i++) { + if (i >= base.length || base[i] != items[i]) { + bp = i + 1; + break; + } + } + } + + if (bp == 1) + return path; + + for (i = 0, l = base.length - (bp - 1); i < l; i++) + out += "../"; + + for (i = bp - 1, l = items.length; i < l; i++) { + if (i != bp - 1) + out += "/" + items[i]; + else + out += items[i]; + } + + return out; + }, + + toAbsPath : function(base, path) { + var i, nb = 0, o = []; + + // Split paths + base = base.split('/'); + path = path.split('/'); + + // Remove empty chunks + each(base, function(k) { + if (k) + o.push(k); + }); + + base = o; + + // Merge relURLParts chunks + for (i = path.length - 1, o = []; i >= 0; i--) { + // Ignore empty or . + if (path[i].length == 0 || path[i] == ".") + continue; + + // Is parent + if (path[i] == '..') { + nb++; + continue; + } + + // Move up + if (nb > 0) { + nb--; + continue; + } + + o.push(path[i]); + } + + i = base.length - nb; + + // If /a/b/c or / + if (i <= 0) + return '/' + o.reverse().join('/'); + + return '/' + base.slice(0, i).join('/') + '/' + o.reverse().join('/'); + }, + + getURI : function(nh) { + var s, t = this; + + // Rebuild source + if (!t.source || nh) { + s = ''; + + if (!nh) { + if (t.protocol) + s += t.protocol + '://'; + + if (t.userInfo) + s += t.userInfo + '@'; + + if (t.host) + s += t.host; + + if (t.port) + s += ':' + t.port; + } + + if (t.path) + s += t.path; + + if (t.query) + s += '?' + t.query; + + if (t.anchor) + s += '#' + t.anchor; + + t.source = s; + } + + return t.source; + } + + }); +})(); + +/* file:jscripts/tiny_mce/classes/util/Cookie.js */ + +(function() { + var each = tinymce.each; + + tinymce.create('static tinymce.util.Cookie', { + getHash : function(n) { + var v = this.get(n), h; + + if (v) { + each(v.split('&'), function(v) { + v = v.split('='); + h = h || {}; + h[unescape(v[0])] = unescape(v[1]); + }); + } + + return h; + }, + + setHash : function(n, v, e, p, d, s) { + var o = ''; + + each(v, function(v, k) { + o += (!o ? '' : '&') + escape(k) + '=' + escape(v); + }); + + this.set(n, o, e, p, d, s); + }, + + get : function(n) { + var c = document.cookie, e, p = n + "=", b; + + // Strict mode + if (!c) + return; + + b = c.indexOf("; " + p); + + if (b == -1) { + b = c.indexOf(p); + + if (b != 0) + return null; + } else + b += 2; + + e = c.indexOf(";", b); + + if (e == -1) + e = c.length; + + return unescape(c.substring(b + p.length, e)); + }, + + set : function(n, v, e, p, d, s) { + document.cookie = n + "=" + escape(v) + + ((e) ? "; expires=" + e.toGMTString() : "") + + ((p) ? "; path=" + escape(p) : "") + + ((d) ? "; domain=" + d : "") + + ((s) ? "; secure" : ""); + }, + + remove : function(n, p) { + var d = new Date(); + + d.setTime(d.getTime() - 1000); + + this.set(n, '', d, p, d); + } + + }); +})(); + +/* file:jscripts/tiny_mce/classes/util/JSON.js */ + +tinymce.create('static tinymce.util.JSON', { + serialize : function(o) { + var i, v, s = tinymce.util.JSON.serialize, t; + + if (o == null) + return 'null'; + + t = typeof o; + + if (t == 'string') { + v = '\bb\tt\nn\ff\rr\""\'\'\\\\'; + + return '"' + o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g, function(a, b) { + i = v.indexOf(b); + + if (i + 1) + return '\\' + v.charAt(i + 1); + + a = b.charCodeAt().toString(16); + + return '\\u' + '0000'.substring(a.length) + a; + }) + '"'; + } + + if (t == 'object') { + if (o instanceof Array) { + for (i=0, v = '['; i 0 ? ',' : '') + s(o[i]); + + return v + ']'; + } + + v = '{'; + + for (i in o) + v += typeof o[i] != 'function' ? (v.length > 1 ? ',"' : '"') + i + '":' + s(o[i]) : ''; + + return v + '}'; + } + + return '' + o; + }, + + parse : function(s) { + try { + return eval('(' + s + ')'); + } catch (ex) { + // Ignore + } + } + + }); + +/* file:jscripts/tiny_mce/classes/util/XHR.js */ + +tinymce.create('static tinymce.util.XHR', { + send : function(o) { + var x, t, w = window, c = 0; + + // Default settings + o.scope = o.scope || this; + o.success_scope = o.success_scope || o.scope; + o.error_scope = o.error_scope || o.scope; + o.async = o.async === false ? false : true; + o.data = o.data || ''; + + function get(s) { + x = 0; + + try { + x = new ActiveXObject(s); + } catch (ex) { + } + + return x; + }; + + x = w.XMLHttpRequest ? new XMLHttpRequest() : get('Microsoft.XMLHTTP') || get('Msxml2.XMLHTTP'); + + if (x) { + if (x.overrideMimeType) + x.overrideMimeType(o.content_type); + + x.open(o.type || (o.data ? 'POST' : 'GET'), o.url, o.async); + + if (o.content_type) + x.setRequestHeader('Content-Type', o.content_type); + + x.send(o.data); + + function ready() { + if (!o.async || x.readyState == 4 || c++ > 10000) { + if (o.success && c < 10000 && x.status == 200) + o.success.call(o.success_scope, '' + x.responseText, x, o); + else if (o.error) + o.error.call(o.error_scope, c > 10000 ? 'TIMED_OUT' : 'GENERAL', x, o); + + x = null; + } else + w.setTimeout(ready, 10); + }; + + // Syncronous request + if (!o.async) + return ready(); + + // Wait for response, onReadyStateChange can not be used since it leaks memory in IE + t = w.setTimeout(ready, 10); + } + + } +}); + +/* file:jscripts/tiny_mce/classes/util/JSONRequest.js */ + +(function() { + var extend = tinymce.extend, JSON = tinymce.util.JSON, XHR = tinymce.util.XHR; + + tinymce.create('tinymce.util.JSONRequest', { + JSONRequest : function(s) { + this.settings = extend({ + }, s); + this.count = 0; + }, + + send : function(o) { + var ecb = o.error, scb = o.success; + + o = extend(this.settings, o); + + o.success = function(c, x) { + c = JSON.parse(c); + + if (typeof(c) == 'undefined') { + c = { + error : 'JSON Parse error.' + }; + } + + if (c.error) + ecb.call(o.error_scope || o.scope, c.error, x); + else + scb.call(o.success_scope || o.scope, c.result); + }; + + o.error = function(ty, x) { + ecb.call(o.error_scope || o.scope, ty, x); + }; + + o.data = JSON.serialize({ + id : o.id || 'c' + (this.count++), + method : o.method, + params : o.params + }); + + // JSON content type for Ruby on rails. Bug: #1883287 + o.content_type = 'application/json'; + + XHR.send(o); + }, + + 'static' : { + sendRPC : function(o) { + return new tinymce.util.JSONRequest().send(o); + } + } + + }); +}()); +/* file:jscripts/tiny_mce/classes/dom/DOMUtils.js */ + +(function() { + // Shorten names + var each = tinymce.each, is = tinymce.is; + var isWebKit = tinymce.isWebKit, isIE = tinymce.isIE; + + tinymce.create('tinymce.dom.DOMUtils', { + doc : null, + root : null, + files : null, + listeners : {}, + pixelStyles : /^(top|left|bottom|right|width|height|borderWidth)$/, + cache : {}, + idPattern : /^#[\w]+$/, + elmPattern : /^[\w_*]+$/, + elmClassPattern : /^([\w_]*)\.([\w_]+)$/, + props : { + "for" : "htmlFor", + "class" : "className", + className : "className", + checked : "checked", + disabled : "disabled", + maxlength : "maxLength", + readonly : "readOnly", + selected : "selected", + value : "value", + id : "id", + name : "name", + type : "type" + }, + + DOMUtils : function(d, s) { + var t = this; + + t.doc = d; + t.win = window; + t.files = {}; + t.cssFlicker = false; + t.counter = 0; + t.boxModel = !tinymce.isIE || d.compatMode == "CSS1Compat"; + t.stdMode = d.documentMode === 8; + + this.settings = s = tinymce.extend({ + keep_values : false, + hex_colors : 1, + process_html : 1 + }, s); + + // Fix IE6SP2 flicker and check it failed for pre SP2 + if (tinymce.isIE6) { + try { + d.execCommand('BackgroundImageCache', false, true); + } catch (e) { + t.cssFlicker = true; + } + } + + tinymce.addUnload(t.destroy, t); + }, + + getRoot : function() { + var t = this, s = t.settings; + + return (s && t.get(s.root_element)) || t.doc.body; + }, + + getViewPort : function(w) { + var d, b; + + w = !w ? this.win : w; + d = w.document; + b = this.boxModel ? d.documentElement : d.body; + + // Returns viewport size excluding scrollbars + return { + x : w.pageXOffset || b.scrollLeft, + y : w.pageYOffset || b.scrollTop, + w : w.innerWidth || b.clientWidth, + h : w.innerHeight || b.clientHeight + }; + }, + + getRect : function(e) { + var p, t = this, sr; + + e = t.get(e); + p = t.getPos(e); + sr = t.getSize(e); + + return { + x : p.x, + y : p.y, + w : sr.w, + h : sr.h + }; + }, + + getSize : function(e) { + var t = this, w, h; + + e = t.get(e); + w = t.getStyle(e, 'width'); + h = t.getStyle(e, 'height'); + + // Non pixel value, then force offset/clientWidth + if (w.indexOf('px') === -1) + w = 0; + + // Non pixel value, then force offset/clientWidth + if (h.indexOf('px') === -1) + h = 0; + + return { + w : parseInt(w) || e.offsetWidth || e.clientWidth, + h : parseInt(h) || e.offsetHeight || e.clientHeight + }; + }, + + getParent : function(n, f, r) { + var na, se = this.settings; + + n = this.get(n); + + if (se.strict_root) + r = r || this.getRoot(); + + // Wrap node name as func + if (is(f, 'string')) { + na = f.toUpperCase(); + + f = function(n) { + var s = false; + + // Any element + if (n.nodeType == 1 && na === '*') { + s = true; + return false; + } + + each(na.split(','), function(v) { + if (n.nodeType == 1 && ((se.strict && n.nodeName.toUpperCase() == v) || n.nodeName.toUpperCase() == v)) { + s = true; + return false; // Break loop + } + }); + + return s; + }; + } + + while (n) { + if (n == r) + return null; + + if (f(n)) + return n; + + n = n.parentNode; + } + + return null; + }, + + get : function(e) { + var n; + + if (e && this.doc && typeof(e) == 'string') { + n = e; + e = this.doc.getElementById(e); + + // IE and Opera returns meta elements when they match the specified input ID, but getElementsByName seems to do the trick + if (e && e.id !== n) + return this.doc.getElementsByName(n)[1]; + } + + return e; + }, + + + // #if !jquery + + select : function(pa, s) { + var t = this, cs, c, pl, o = [], x, i, l, n, xp; + + s = t.get(s) || t.doc; + + // Look for native support and use that if it's found + if (s.querySelectorAll) { + // Element scope then use temp id + // We need to do this to be compatible with other implementations + // See bug report: http://bugs.webkit.org/show_bug.cgi?id=17461 + if (s != t.doc) { + i = s.id; + s.id = '_mc_tmp'; + pa = '#_mc_tmp ' + pa; + } + + // Select elements + l = tinymce.grep(s.querySelectorAll(pa)); + + // Restore old id + s.id = i; + + return l; + } + + if (!t.selectorRe) + t.selectorRe = /^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i;; + + // Air doesn't support eval due to security sandboxing and querySelectorAll isn't supported yet + if (tinymce.isAir) { + each(tinymce.explode(pa), function(v) { + if (!(xp = t.cache[v])) { + xp = ''; + + each(v.split(' '), function(v) { + v = t.selectorRe.exec(v); + + xp += v[1] ? '//' + v[1] : '//*'; + + // Id + if (v[2]) + xp += "[@id='" + v[2] + "']"; + + // Class + if (v[3]) { + each(v[3].split('.'), function(n) { + xp += "[@class = '" + n + "' or contains(concat(' ', @class, ' '), ' " + n + " ')]"; + }); + } + }); + + t.cache[v] = xp; + } + + xp = t.doc.evaluate(xp, s, null, 4, null); + + while (n = xp.iterateNext()) + o.push(n); + }); + + return o; + } + + if (t.settings.strict) { + function get(s, n) { + return s.getElementsByTagName(n.toLowerCase()); + }; + } else { + function get(s, n) { + return s.getElementsByTagName(n); + }; + } + + // Simple element pattern. For example: "p" or "*" + if (t.elmPattern.test(pa)) { + x = get(s, pa); + + for (i = 0, l = x.length; i= 0; i--) + cs += '}, ' + (i ? 'n' : 's') + ');'; + + cs += '})'; + + // Compile CSS pattern function + t.cache[pa] = cs = eval(cs); + } + + // Run selector function + cs(isIE ? collectIE : collect, s); + }); + + // Cleanup + each(o, function(n) { + if (isIE) + n.removeAttribute('mce_save'); + else + delete n.mce_save; + }); + + return o; + }, + + // #endif + + add : function(p, n, a, h, c) { + var t = this; + + return this.run(p, function(p) { + var e, k; + + e = is(n, 'string') ? t.doc.createElement(n) : n; + t.setAttribs(e, a); + + if (h) { + if (h.nodeType) + e.appendChild(h); + else + t.setHTML(e, h); + } + + return !c ? p.appendChild(e) : e; + }); + }, + + create : function(n, a, h) { + return this.add(this.doc.createElement(n), n, a, h, 1); + }, + + createHTML : function(n, a, h) { + var o = '', t = this, k; + + o += '<' + n; + + for (k in a) { + if (a.hasOwnProperty(k)) + o += ' ' + k + '="' + t.encode(a[k]) + '"'; + } + + if (tinymce.is(h)) + return o + '>' + h + ''; + + return o + ' />'; + }, + + remove : function(n, k) { + return this.run(n, function(n) { + var p, g; + + p = n.parentNode; + + if (!p) + return null; + + if (k) { + each (n.childNodes, function(c) { + p.insertBefore(c.cloneNode(true), n); + }); + } + + // Fix IE psuedo leak + /* if (isIE) { + p = n.cloneNode(true); + n.outerHTML = ''; + + return p; + }*/ + + return p.removeChild(n); + }); + }, + + // #if !jquery + + setStyle : function(n, na, v) { + var t = this; + + return t.run(n, function(e) { + var s, i; + + s = e.style; + + // Camelcase it, if needed + na = na.replace(/-(\D)/g, function(a, b){ + return b.toUpperCase(); + }); + + // Default px suffix on these + if (t.pixelStyles.test(na) && (tinymce.is(v, 'number') || /^[\-0-9\.]+$/.test(v))) + v += 'px'; + + switch (na) { + case 'opacity': + // IE specific opacity + if (isIE) { + s.filter = v === '' ? '' : "alpha(opacity=" + (v * 100) + ")"; + + if (!n.currentStyle || !n.currentStyle.hasLayout) + s.display = 'inline-block'; + } + + // Fix for older browsers + s[na] = s['-moz-opacity'] = s['-khtml-opacity'] = v || ''; + break; + + case 'float': + isIE ? s.styleFloat = v : s.cssFloat = v; + break; + + default: + s[na] = v || ''; + } + + // Force update of the style data + if (t.settings.update_styles) + t.setAttrib(e, 'mce_style'); + }); + }, + + getStyle : function(n, na, c) { + n = this.get(n); + + if (!n) + return false; + + // Gecko + if (this.doc.defaultView && c) { + // Remove camelcase + na = na.replace(/[A-Z]/g, function(a){ + return '-' + a; + }); + + try { + return this.doc.defaultView.getComputedStyle(n, null).getPropertyValue(na); + } catch (ex) { + // Old safari might fail + return null; + } + } + + // Camelcase it, if needed + na = na.replace(/-(\D)/g, function(a, b){ + return b.toUpperCase(); + }); + + if (na == 'float') + na = isIE ? 'styleFloat' : 'cssFloat'; + + // IE & Opera + if (n.currentStyle && c) + return n.currentStyle[na]; + + return n.style[na]; + }, + + setStyles : function(e, o) { + var t = this, s = t.settings, ol; + + ol = s.update_styles; + s.update_styles = 0; + + each(o, function(v, n) { + t.setStyle(e, n, v); + }); + + // Update style info + s.update_styles = ol; + if (s.update_styles) + t.setAttrib(e, s.cssText); + }, + + setAttrib : function(e, n, v) { + var t = this; + + // Whats the point + if (!e || !n) + return; + + // Strict XML mode + if (t.settings.strict) + n = n.toLowerCase(); + + return this.run(e, function(e) { + var s = t.settings; + + switch (n) { + case "style": + if (!is(v, 'string')) { + each(v, function(v, n) { + t.setStyle(e, n, v); + }); + + return; + } + + // No mce_style for elements with these since they might get resized by the user + if (s.keep_values) { + if (v && !t._isRes(v)) + e.setAttribute('mce_style', v, 2); + else + e.removeAttribute('mce_style', 2); + } + + e.style.cssText = v; + break; + + case "class": + e.className = v || ''; // Fix IE null bug + break; + + case "src": + case "href": + if (s.keep_values) { + if (s.url_converter) + v = s.url_converter.call(s.url_converter_scope || t, v, n, e); + + t.setAttrib(e, 'mce_' + n, v, 2); + } + + break; + + case "shape": + e.setAttribute('mce_style', v); + break; + } + + if (is(v) && v !== null && v.length !== 0) + e.setAttribute(n, '' + v, 2); + else + e.removeAttribute(n, 2); + }); + }, + + setAttribs : function(e, o) { + var t = this; + + return this.run(e, function(e) { + each(o, function(v, n) { + t.setAttrib(e, n, v); + }); + }); + }, + + // #endif + + getAttrib : function(e, n, dv) { + var v, t = this; + + e = t.get(e); + + if (!e || e.nodeType !== 1) + return false; + + if (!is(dv)) + dv = ''; + + // Try the mce variant for these + if (/^(src|href|style|coords|shape)$/.test(n)) { + v = e.getAttribute("mce_" + n); + + if (v) + return v; + } + + if (isIE && t.props[n]) { + v = e[t.props[n]]; + v = v && v.nodeValue ? v.nodeValue : v; + } + + if (!v) + v = e.getAttribute(n, 2); + + if (n === 'style') { + v = v || e.style.cssText; + + if (v) { + v = t.serializeStyle(t.parseStyle(v)); + + if (t.settings.keep_values && !t._isRes(v)) + e.setAttribute('mce_style', v); + } + } + + // Remove Apple and WebKit stuff + if (isWebKit && n === "class" && v) + v = v.replace(/(apple|webkit)\-[a-z\-]+/gi, ''); + + // Handle IE issues + if (isIE) { + switch (n) { + case 'rowspan': + case 'colspan': + // IE returns 1 as default value + if (v === 1) + v = ''; + + break; + + case 'size': + // IE returns +0 as default value for size + if (v === '+0' || v === 20) + v = ''; + + break; + + case 'width': + case 'height': + case 'vspace': + case 'checked': + case 'disabled': + case 'readonly': + if (v === 0) + v = ''; + + break; + + case 'hspace': + // IE returns -1 as default value + if (v === -1) + v = ''; + + break; + + case 'maxlength': + case 'tabindex': + // IE returns default value + if (v === 32768 || v === 2147483647 || v === '32768') + v = ''; + + break; + + case 'compact': + case 'noshade': + case 'nowrap': + if (v === 65535) + return n; + + return dv; + + case 'shape': + v = v.toLowerCase(); + break; + + default: + // IE has odd anonymous function for event attributes + if (n.indexOf('on') === 0 && v) + v = ('' + v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/, '$1'); + } + } + + return (v !== undefined && v !== null && v !== '') ? '' + v : dv; + }, + + getPos : function(n) { + var t = this, x = 0, y = 0, e, d = t.doc, r; + + n = t.get(n); + + // Use getBoundingClientRect on IE, Opera has it but it's not perfect + if (n && isIE) { + n = n.getBoundingClientRect(); + e = t.boxModel ? d.documentElement : d.body; + x = t.getStyle(t.select('html')[0], 'borderWidth'); // Remove border + x = (x == 'medium' || t.boxModel && !t.isIE6) && 2 || x; + n.top += t.win.self != t.win.top ? 2 : 0; // IE adds some strange extra cord if used in a frameset + + return {x : n.left + e.scrollLeft - x, y : n.top + e.scrollTop - x}; + } + + r = n; + while (r) { + x += r.offsetLeft || 0; + y += r.offsetTop || 0; + r = r.offsetParent; + } + + r = n; + while (r) { + // Opera 9.25 bug fix, fixed in 9.50 + if (!/^table-row|inline.*/i.test(t.getStyle(r, "display", 1))) { + x -= r.scrollLeft || 0; + y -= r.scrollTop || 0; + } + + r = r.parentNode; + + if (r == d.body) + break; + } + + return {x : x, y : y}; + }, + + parseStyle : function(st) { + var t = this, s = t.settings, o = {}; + + if (!st) + return o; + + function compress(p, s, ot) { + var t, r, b, l; + + // Get values and check it it needs compressing + t = o[p + '-top' + s]; + if (!t) + return; + + r = o[p + '-right' + s]; + if (t != r) + return; + + b = o[p + '-bottom' + s]; + if (r != b) + return; + + l = o[p + '-left' + s]; + if (b != l) + return; + + // Compress + o[ot] = l; + delete o[p + '-top' + s]; + delete o[p + '-right' + s]; + delete o[p + '-bottom' + s]; + delete o[p + '-left' + s]; + }; + + function compress2(ta, a, b, c) { + var t; + + t = o[a]; + if (!t) + return; + + t = o[b]; + if (!t) + return; + + t = o[c]; + if (!t) + return; + + // Compress + o[ta] = o[a] + ' ' + o[b] + ' ' + o[c]; + delete o[a]; + delete o[b]; + delete o[c]; + }; + + st = st.replace(/&(#?[a-z0-9]+);/g, '&$1_MCE_SEMI_'); // Protect entities + + each(st.split(';'), function(v) { + var sv, ur = []; + + if (v) { + v = v.replace(/_MCE_SEMI_/g, ';'); // Restore entities + v = v.replace(/url\([^\)]+\)/g, function(v) {ur.push(v);return 'url(' + ur.length + ')';}); + v = v.split(':'); + sv = tinymce.trim(v[1]); + sv = sv.replace(/url\(([^\)]+)\)/g, function(a, b) {return ur[parseInt(b) - 1];}); + + sv = sv.replace(/rgb\([^\)]+\)/g, function(v) { + return t.toHex(v); + }); + + if (s.url_converter) { + sv = sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g, function(x, c) { + return 'url(' + s.url_converter.call(s.url_converter_scope || t, t.decode(c), 'style', null) + ')'; + }); + } + + o[tinymce.trim(v[0]).toLowerCase()] = sv; + } + }); + + compress("border", "", "border"); + compress("border", "-width", "border-width"); + compress("border", "-color", "border-color"); + compress("border", "-style", "border-style"); + compress("padding", "", "padding"); + compress("margin", "", "margin"); + compress2('border', 'border-width', 'border-style', 'border-color'); + + if (isIE) { + // Remove pointless border + if (o.border == 'medium none') + o.border = ''; + } + + return o; + }, + + serializeStyle : function(o) { + var s = ''; + + each(o, function(v, k) { + if (k && v) { + if (tinymce.isGecko && k.indexOf('-moz-') === 0) + return; + + switch (k) { + case 'color': + case 'background-color': + v = v.toLowerCase(); + break; + } + + s += (s ? ' ' : '') + k + ': ' + v + ';'; + } + }); + + return s; + }, + + loadCSS : function(u) { + var t = this, d = t.doc; + + if (!u) + u = ''; + + each(u.split(','), function(u) { + if (t.files[u]) + return; + + t.files[u] = true; + t.add(t.select('head')[0], 'link', {rel : 'stylesheet', href : tinymce._addVer(u)}); + }); + }, + + // #if !jquery + + addClass : function(e, c) { + return this.run(e, function(e) { + var o; + + if (!c) + return 0; + + if (this.hasClass(e, c)) + return e.className; + + o = this.removeClass(e, c); + + return e.className = (o != '' ? (o + ' ') : '') + c; + }); + }, + + removeClass : function(e, c) { + var t = this, re; + + return t.run(e, function(e) { + var v; + + if (t.hasClass(e, c)) { + if (!re) + re = new RegExp("(^|\\s+)" + c + "(\\s+|$)", "g"); + + v = e.className.replace(re, ' '); + + return e.className = tinymce.trim(v != ' ' ? v : ''); + } + + return e.className; + }); + }, + + hasClass : function(n, c) { + n = this.get(n); + + if (!n || !c) + return false; + + return (' ' + n.className + ' ').indexOf(' ' + c + ' ') !== -1; + }, + + show : function(e) { + return this.setStyle(e, 'display', 'block'); + }, + + hide : function(e) { + return this.setStyle(e, 'display', 'none'); + }, + + isHidden : function(e) { + e = this.get(e); + + return !e || e.style.display == 'none' || this.getStyle(e, 'display') == 'none'; + }, + + // #endif + + uniqueId : function(p) { + return (!p ? 'mce_' : p) + (this.counter++); + }, + + setHTML : function(e, h) { + var t = this; + + return this.run(e, function(e) { + var x, i, nl, n, p, x; + + h = t.processHTML(h); + + if (isIE) { + function set() { + try { + // IE will remove comments from the beginning + // unless you padd the contents with something + e.innerHTML = '
' + h; + e.removeChild(e.firstChild); + } catch (ex) { + // IE sometimes produces an unknown runtime error on innerHTML if it's an block element within a block element for example a div inside a p + // This seems to fix this problem + + // Remove all child nodes + while (e.firstChild) + e.firstChild.removeNode(); + + // Create new div with HTML contents and a BR infront to keep comments + x = t.create('div'); + x.innerHTML = '
' + h; + + // Add all children from div to target + each (x.childNodes, function(n, i) { + // Skip br element + if (i) + e.appendChild(n); + }); + } + }; + + // IE has a serious bug when it comes to paragraphs it can produce an invalid + // DOM tree if contents like this

  • Item 1

is inserted + // It seems to be that IE doesn't like a root block element placed inside another root block element + if (t.settings.fix_ie_paragraphs) + h = h.replace(/

<\/p>|]+)><\/p>|/gi, ' 

'); + + set(); + + if (t.settings.fix_ie_paragraphs) { + // Check for odd paragraphs this is a sign of a broken DOM + nl = e.getElementsByTagName("p"); + for (i = nl.length - 1, x = 0; i >= 0; i--) { + n = nl[i]; + + if (!n.hasChildNodes()) { + if (!n.mce_keep) { + x = 1; // Is broken + break; + } + + n.removeAttribute('mce_keep'); + } + } + } + + // Time to fix the madness IE left us + if (x) { + // So if we replace the p elements with divs and mark them and then replace them back to paragraphs + // after we use innerHTML we can fix the DOM tree + h = h.replace(/

]+)>|

/g, '

'); + h = h.replace(/<\/p>/g, '
'); + + // Set the new HTML with DIVs + set(); + + // Replace all DIV elements with he mce_tmp attibute back to paragraphs + // This is needed since IE has a annoying bug see above for details + // This is a slow process but it has to be done. :( + if (t.settings.fix_ie_paragraphs) { + nl = e.getElementsByTagName("DIV"); + for (i = nl.length - 1; i >= 0; i--) { + n = nl[i]; + + // Is it a temp div + if (n.mce_tmp) { + // Create new paragraph + p = t.doc.createElement('p'); + + // Copy all attributes + n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi, function(a, b) { + var v; + + if (b !== 'mce_tmp') { + v = n.getAttribute(b); + + if (!v && b === 'class') + v = n.className; + + p.setAttribute(b, v); + } + }); + + // Append all children to new paragraph + for (x = 0; x|]+)>/gi, '<$1b$2>'); + h = h.replace(/<(\/?)em>|]+)>/gi, '<$1i$2>'); + } else if (isIE) { + h = h.replace(/'/g, '''); // IE can't handle apos + h = h.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi, ''); // IE doesn't handle default values correct + } + + // Fix some issues + h = h.replace(/]+)\/>|/gi, ''); // Force open + + // Store away src and href in mce_src and mce_href since browsers mess them up + if (s.keep_values) { + // Wrap scripts and styles in comments for serialization purposes + if (/)/g, '\n'); + s = s.replace(/^[\r\n]*|[\r\n]*$/g, ''); + s = s.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g, ''); + + return s; + }; + + // Preserve script elements + h = h.replace(/]+|)>([\s\S]*?)<\/script>/g, function(v, a, b) { + // Remove prefix and suffix code for script element + b = trim(b); + + // Force type attribute + if (!a) + a = ' type="text/javascript"'; + + // Wrap contents in a comment + if (b) + b = ''; + + // Output fake element + return '' + b + ''; + }); + + // Preserve style elements + h = h.replace(/]+|)>([\s\S]*?)<\/style>/g, function(v, a, b) { + b = trim(b); + return '' + b + ''; + }); + } + + h = h.replace(//g, ''); + + // Process all tags with src, href or style + h = h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi, function(a, n) { + function handle(m, b, c) { + var u = c; + + // Tag already got a mce_ version + if (a.indexOf('mce_' + b) != -1) + return m; + + if (b == 'style') { + // Why did I need this one? + //if (isIE) + // u = t.serializeStyle(t.parseStyle(u)); + + // No mce_style for elements with these since they might get resized by the user + if (t._isRes(c)) + return m; + + if (s.hex_colors) { + u = u.replace(/rgb\([^\)]+\)/g, function(v) { + return t.toHex(v); + }); + } + + if (s.url_converter) { + u = u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g, function(x, c) { + return 'url(' + t.encode(s.url_converter.call(s.url_converter_scope || t, t.decode(c), b, n)) + ')'; + }); + } + } else if (b != 'coords' && b != 'shape') { + if (s.url_converter) + u = t.encode(s.url_converter.call(s.url_converter_scope || t, t.decode(c), b, n)); + } + + return ' ' + b + '="' + c + '" mce_' + b + '="' + u + '"'; + }; + + a = a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi, handle); // W3C + a = a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi, handle); // W3C + + return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi, handle); // IE + }); + } + + return h; + }, + + getOuterHTML : function(e) { + var d; + + e = this.get(e); + + if (!e) + return null; + + if (isIE) + return e.outerHTML; + + d = (e.ownerDocument || this.doc).createElement("body"); + d.appendChild(e.cloneNode(true)); + + return d.innerHTML; + }, + + setOuterHTML : function(e, h, d) { + var t = this; + + return this.run(e, function(e) { + var n, tp; + + e = t.get(e); + d = d || e.ownerDocument || t.doc; + + if (isIE && e.nodeType == 1) + e.outerHTML = h; + else { + tp = d.createElement("body"); + tp.innerHTML = h; + + n = tp.lastChild; + while (n) { + t.insertAfter(n.cloneNode(true), e); + n = n.previousSibling; + } + + t.remove(e); + } + }); + }, + + decode : function(s) { + var e, n, v; + + // Look for entities to decode + if (/&[^;]+;/.test(s)) { + // Decode the entities using a div element not super efficient but less code + e = this.doc.createElement("div"); + e.innerHTML = s; + n = e.firstChild; + v = ''; + + if (n) { + do { + v += n.nodeValue; + } while (n.nextSibling); + } + + return v || s; + } + + return s; + }, + + encode : function(s) { + return s ? ('' + s).replace(/[<>&\"]/g, function (c, b) { + switch (c) { + case '&': + return '&'; + + case '"': + return '"'; + + case '<': + return '<'; + + case '>': + return '>'; + } + + return c; + }) : s; + }, + + // #if !jquery + + insertAfter : function(n, r) { + var t = this; + + r = t.get(r); + + return this.run(n, function(n) { + var p, ns; + + p = r.parentNode; + ns = r.nextSibling; + + if (ns) + p.insertBefore(n, ns); + else + p.appendChild(n); + + return n; + }); + }, + + // #endif + + isBlock : function(n) { + if (n.nodeType && n.nodeType !== 1) + return false; + + n = n.nodeName || n; + + return /^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n); + }, + + // #if !jquery + + replace : function(n, o, k) { + if (is(o, 'array')) + n = n.cloneNode(true); + + return this.run(o, function(o) { + if (k) { + each(o.childNodes, function(c) { + n.appendChild(c.cloneNode(true)); + }); + } + + // Fix IE psuedo leak for elements since replacing elements if fairly common + // Will break parentNode for some unknown reason + /* if (isIE && o.nodeType === 1) { + o.parentNode.insertBefore(n, o); + o.outerHTML = ''; + return n; + }*/ + + return o.parentNode.replaceChild(n, o); + }); + }, + + // #endif + + toHex : function(s) { + var c = /^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s); + + function hex(s) { + s = parseInt(s).toString(16); + + return s.length > 1 ? s : '0' + s; // 0 -> 00 + }; + + if (c) { + s = '#' + hex(c[1]) + hex(c[2]) + hex(c[3]); + + return s; + } + + return s; + }, + + getClasses : function() { + var t = this, cl = [], i, lo = {}, f = t.settings.class_filter, ov; + + if (t.classes) + return t.classes; + + function addClasses(s) { + // IE style imports + each(s.imports, function(r) { + addClasses(r); + }); + + each(s.cssRules || s.rules, function(r) { + // Real type or fake it on IE + switch (r.type || 1) { + // Rule + case 1: + if (r.selectorText) { + each(r.selectorText.split(','), function(v) { + v = v.replace(/^\s*|\s*$|^\s\./g, ""); + + // Is internal or it doesn't contain a class + if (/\.mce/.test(v) || !/\.[\w\-]+$/.test(v)) + return; + + // Remove everything but class name + ov = v; + v = v.replace(/.*\.([a-z0-9_\-]+).*/i, '$1'); + + // Filter classes + if (f && !(v = f(v, ov))) + return; + + if (!lo[v]) { + cl.push({'class' : v}); + lo[v] = 1; + } + }); + } + break; + + // Import + case 3: + addClasses(r.styleSheet); + break; + } + }); + }; + + try { + each(t.doc.styleSheets, addClasses); + } catch (ex) { + // Ignore + } + + if (cl.length > 0) + t.classes = cl; + + return cl; + }, + + run : function(e, f, s) { + var t = this, o; + + if (t.doc && typeof(e) === 'string') + e = t.get(e); + + if (!e) + return false; + + s = s || this; + if (!e.nodeType && (e.length || e.length === 0)) { + o = []; + + each(e, function(e, i) { + if (e) { + if (typeof(e) == 'string') + e = t.doc.getElementById(e); + + o.push(f.call(s, e, i)); + } + }); + + return o; + } + + return f.call(s, e); + }, + + getAttribs : function(n) { + var o; + + n = this.get(n); + + if (!n) + return []; + + if (isIE) { + o = []; + + // Object will throw exception in IE + if (n.nodeName == 'OBJECT') + return n.attributes; + + // It's crazy that this is faster in IE but it's because it returns all attributes all the time + n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi, function(a, b) { + o.push({specified : 1, nodeName : b}); + }); + + return o; + } + + return n.attributes; + }, + + destroy : function(s) { + var t = this; + + t.win = t.doc = t.root = null; + + // Manual destroy then remove unload handler + if (!s) + tinymce.removeUnload(t.destroy); + }, + + _isRes : function(c) { + // Is live resizble element + return /^(top|left|bottom|right|width|height)/i.test(c) || /;\s*(top|left|bottom|right|width|height)/i.test(c); + } + + /* + walk : function(n, f, s) { + var d = this.doc, w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(s || this, n); + } else + tinymce.walk(n, f, 'childNodes', s); + } + */ + + /* + toRGB : function(s) { + var c = /^\s*?#([0-9A-F]{2})([0-9A-F]{1,2})([0-9A-F]{2})?\s*?$/.exec(s); + + if (c) { + // #FFF -> #FFFFFF + if (!is(c[3])) + c[3] = c[2] = c[1]; + + return "rgb(" + parseInt(c[1], 16) + "," + parseInt(c[2], 16) + "," + parseInt(c[3], 16) + ")"; + } + + return s; + } + */ + + }); + + // Setup page DOM + tinymce.DOM = new tinymce.dom.DOMUtils(document, {process_html : 0}); +})(); + +/* file:jscripts/tiny_mce/classes/dom/Event.js */ + +(function() { + // Shorten names + var each = tinymce.each, DOM = tinymce.DOM, isIE = tinymce.isIE, isWebKit = tinymce.isWebKit, Event; + + tinymce.create('static tinymce.dom.Event', { + inits : [], + events : [], + + // #if !jquery + + add : function(o, n, f, s) { + var cb, t = this, el = t.events, r; + + // Handle array + if (o && o instanceof Array) { + r = []; + + each(o, function(o) { + o = DOM.get(o); + r.push(t.add(o, n, f, s)); + }); + + return r; + } + + o = DOM.get(o); + + if (!o) + return; + + // Setup event callback + cb = function(e) { + e = e || window.event; + + // Patch in target in IE it's W3C valid + if (e && !e.target && isIE) + e.target = e.srcElement; + + if (!s) + return f(e); + + return f.call(s, e); + }; + + if (n == 'unload') { + tinymce.unloads.unshift({func : cb}); + return cb; + } + + if (n == 'init') { + if (t.domLoaded) + cb(); + else + t.inits.push(cb); + + return cb; + } + + // Store away listener reference + el.push({ + obj : o, + name : n, + func : f, + cfunc : cb, + scope : s + }); + + t._add(o, n, cb); + + return f; + }, + + remove : function(o, n, f) { + var t = this, a = t.events, s = false, r; + + // Handle array + if (o && o instanceof Array) { + r = []; + + each(o, function(o) { + o = DOM.get(o); + r.push(t.remove(o, n, f)); + }); + + return r; + } + + o = DOM.get(o); + + each(a, function(e, i) { + if (e.obj == o && e.name == n && (!f || (e.func == f || e.cfunc == f))) { + a.splice(i, 1); + t._remove(o, n, e.cfunc); + s = true; + return false; + } + }); + + return s; + }, + + clear : function(o) { + var t = this, a = t.events, i, e; + + if (o) { + o = DOM.get(o); + + for (i = a.length - 1; i >= 0; i--) { + e = a[i]; + + if (e.obj === o) { + t._remove(e.obj, e.name, e.cfunc); + e.obj = e.cfunc = null; + a.splice(i, 1); + } + } + } + }, + + // #endif + + cancel : function(e) { + if (!e) + return false; + + this.stop(e); + return this.prevent(e); + }, + + stop : function(e) { + if (e.stopPropagation) + e.stopPropagation(); + else + e.cancelBubble = true; + + return false; + }, + + prevent : function(e) { + if (e.preventDefault) + e.preventDefault(); + else + e.returnValue = false; + + return false; + }, + + _unload : function() { + var t = Event; + + each(t.events, function(e, i) { + t._remove(e.obj, e.name, e.cfunc); + e.obj = e.cfunc = null; + }); + + t.events = []; + t = null; + }, + + _add : function(o, n, f) { + if (o.attachEvent) + o.attachEvent('on' + n, f); + else if (o.addEventListener) + o.addEventListener(n, f, false); + else + o['on' + n] = f; + }, + + _remove : function(o, n, f) { + if (o) { + try { + if (o.detachEvent) + o.detachEvent('on' + n, f); + else if (o.removeEventListener) + o.removeEventListener(n, f, false); + else + o['on' + n] = null; + } catch (ex) { + // Might fail with permission denined on IE so we just ignore that + } + } + }, + + _pageInit : function() { + var e = Event; + + // Safari on Mac fires this twice + if (e.domLoaded) + return; + + e._remove(window, 'DOMContentLoaded', e._pageInit); + e.domLoaded = true; + + each(e.inits, function(c) { + c(); + }); + + e.inits = []; + }, + + _wait : function() { + var t; + + // No need since the document is already loaded + if (window.tinyMCE_GZ && tinyMCE_GZ.loaded) { + Event.domLoaded = 1; + return; + } + + if (isIE && document.location.protocol != 'https:') { + // Fake DOMContentLoaded on IE + document.write(''; + + bi = s.body_id || 'tinymce'; + if (bi.indexOf('=') != -1) { + bi = t.getParam('body_id', '', 'hash'); + bi = bi[t.id] || bi; + } + + bc = s.body_class || ''; + if (bc.indexOf('=') != -1) { + bc = t.getParam('body_class', '', 'hash'); + bc = bc[t.id] || ''; + } + + t.iframeHTML += ''; + + // Domain relaxing enabled, then set document domain + if (tinymce.relaxedDomain) { + // We need to write the contents here in IE since multiple writes messes up refresh button and back button + if (isIE || (tinymce.isOpera && parseFloat(opera.version()) >= 9.5)) + u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinyMCE.get("' + t.id + '");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'; + else if (tinymce.isOpera) + u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";document.close();ed.setupIframe();})()'; + } + + // Create iframe + n = DOM.add(o.iframeContainer, 'iframe', { + id : t.id + "_ifr", + src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 + frameBorder : '0', + style : { + width : '100%', + height : h + } + }); + + t.contentAreaContainer = o.iframeContainer; + DOM.get(o.editorContainer).style.display = t.orgDisplay; + DOM.get(t.id).style.display = 'none'; + + // Safari 2.x requires us to wait for the load event and load a real HTML doc + if (tinymce.isOldWebKit) { + Event.add(n, 'load', t.setupIframe, t); + n.src = tinymce.baseURL + '/plugins/safari/blank.htm'; + } else { + if (!isIE || !tinymce.relaxedDomain) + t.setupIframe(); + + e = n = o = null; // Cleanup + } + }, + + setupIframe : function() { + var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b; + + // Setup iframe body + if (!isIE || !tinymce.relaxedDomain) { + d.open(); + d.write(t.iframeHTML); + d.close(); + } + + // Design mode needs to be added here Ctrl+A will fail otherwise + if (!isIE) { + try { + if (!s.readonly) + d.designMode = 'On'; + } catch (ex) { + // Will fail on Gecko if the editor is placed in an hidden container element + // The design mode will be set ones the editor is focused + } + } + + // IE needs to use contentEditable or it will display non secure items for HTTPS + if (isIE) { + // It will not steal focus if we hide it while setting contentEditable + b = t.getBody(); + DOM.hide(b); + + if (!s.readonly) + b.contentEditable = true; + + DOM.show(b); + } + + // Setup objects + t.dom = new tinymce.DOM.DOMUtils(t.getDoc(), { + keep_values : true, + url_converter : t.convertURL, + url_converter_scope : t, + hex_colors : s.force_hex_style_colors, + class_filter : s.class_filter, + update_styles : 1, + fix_ie_paragraphs : 1 + }); + + t.serializer = new tinymce.dom.Serializer({ + entity_encoding : s.entity_encoding, + entities : s.entities, + valid_elements : s.verify_html === false ? '*[*]' : s.valid_elements, + extended_valid_elements : s.extended_valid_elements, + valid_child_elements : s.valid_child_elements, + invalid_elements : s.invalid_elements, + fix_table_elements : s.fix_table_elements, + fix_list_elements : s.fix_list_elements, + fix_content_duplication : s.fix_content_duplication, + convert_fonts_to_spans : s.convert_fonts_to_spans, + font_size_classes : s.font_size_classes, + font_size_style_values : s.font_size_style_values, + apply_source_formatting : s.apply_source_formatting, + remove_linebreaks : s.remove_linebreaks, + element_format : s.element_format, + dom : t.dom + }); + + t.selection = new tinymce.dom.Selection(t.dom, t.getWin(), t.serializer); + t.forceBlocks = new tinymce.ForceBlocks(t, { + forced_root_block : s.forced_root_block + }); + t.editorCommands = new tinymce.EditorCommands(t); + + // Pass through + t.serializer.onPreProcess.add(function(se, o) { + return t.onPreProcess.dispatch(t, o, se); + }); + + t.serializer.onPostProcess.add(function(se, o) { + return t.onPostProcess.dispatch(t, o, se); + }); + + t.onPreInit.dispatch(t); + + if (!s.gecko_spellcheck) + t.getBody().spellcheck = 0; + + if (!s.readonly) + t._addEvents(); + + t.controlManager.onPostRender.dispatch(t, t.controlManager); + t.onPostRender.dispatch(t); + + if (s.directionality) + t.getBody().dir = s.directionality; + + if (s.nowrap) + t.getBody().style.whiteSpace = "nowrap"; + + if (s.auto_resize) + t.onNodeChange.add(t.resizeToContent, t); + + if (s.custom_elements) { + function handleCustom(ed, o) { + each(explode(s.custom_elements), function(v) { + var n; + + if (v.indexOf('~') === 0) { + v = v.substring(1); + n = 'span'; + } else + n = 'div'; + + o.content = o.content.replace(new RegExp('<(' + v + ')([^>]*)>', 'g'), '<' + n + ' mce_name="$1"$2>'); + o.content = o.content.replace(new RegExp('', 'g'), ''); + }); + }; + + t.onBeforeSetContent.add(handleCustom); + t.onPostProcess.add(function(ed, o) { + if (o.set) + handleCustom(ed, o) + }); + } + + if (s.handle_node_change_callback) { + t.onNodeChange.add(function(ed, cm, n) { + t.execCallback('handle_node_change_callback', t.id, n, -1, -1, true, t.selection.isCollapsed()); + }); + } + + if (s.save_callback) { + t.onSaveContent.add(function(ed, o) { + var h = t.execCallback('save_callback', t.id, o.content, t.getBody()); + + if (h) + o.content = h; + }); + } + + if (s.onchange_callback) { + t.onChange.add(function(ed, l) { + t.execCallback('onchange_callback', t, l); + }); + } + + if (s.convert_newlines_to_brs) { + t.onBeforeSetContent.add(function(ed, o) { + if (o.initial) + o.content = o.content.replace(/\r?\n/g, '
'); + }); + } + + if (s.fix_nesting && isIE) { + t.onBeforeSetContent.add(function(ed, o) { + o.content = t._fixNesting(o.content); + }); + } + + if (s.preformatted) { + t.onPostProcess.add(function(ed, o) { + o.content = o.content.replace(/^\s*/, ''); + o.content = o.content.replace(/<\/pre>\s*$/, ''); + + if (o.set) + o.content = '
' + o.content + '
'; + }); + } + + if (s.verify_css_classes) { + t.serializer.attribValueFilter = function(n, v) { + var s, cl; + + if (n == 'class') { + // Build regexp for classes + if (!t.classesRE) { + cl = t.dom.getClasses(); + + if (cl.length > 0) { + s = ''; + + each (cl, function(o) { + s += (s ? '|' : '') + o['class']; + }); + + t.classesRE = new RegExp('(' + s + ')', 'gi'); + } + } + + return !t.classesRE || /(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v) || t.classesRE.test(v) ? v : ''; + } + + return v; + }; + } + + if (s.convert_fonts_to_spans) + t._convertFonts(); + + if (s.inline_styles) + t._convertInlineElements(); + + if (s.cleanup_callback) { + t.onBeforeSetContent.add(function(ed, o) { + o.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o); + }); + + t.onPreProcess.add(function(ed, o) { + if (o.set) + t.execCallback('cleanup_callback', 'insert_to_editor_dom', o.node, o); + + if (o.get) + t.execCallback('cleanup_callback', 'get_from_editor_dom', o.node, o); + }); + + t.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o); + + if (o.get) + o.content = t.execCallback('cleanup_callback', 'get_from_editor', o.content, o); + }); + } + + if (s.save_callback) { + t.onGetContent.add(function(ed, o) { + if (o.save) + o.content = t.execCallback('save_callback', t.id, o.content, t.getBody()); + }); + } + + if (s.handle_event_callback) { + t.onEvent.add(function(ed, e, o) { + if (t.execCallback('handle_event_callback', e, ed, o) === false) + Event.cancel(e); + }); + } + + t.onSetContent.add(function() { + // Safari needs some time, it will crash the browser when a link is created otherwise + // I think this crash issue is resolved in the latest 3.0.4 + //window.setTimeout(function() { + t.addVisual(t.getBody()); + //}, 1); + }); + + // Remove empty contents + if (s.padd_empty_editor) { + t.onPostProcess.add(function(ed, o) { + o.content = o.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/, ''); + }); + } + + if (isGecko && !s.readonly) { + try { + // Design mode must be set here once again to fix a bug where + // Ctrl+A/Delete/Backspace didn't work if the editor was added using mceAddControl then removed then added again + d.designMode = 'Off'; + d.designMode = 'On'; + } catch (ex) { + // Will fail on Gecko if the editor is placed in an hidden container element + // The design mode will be set ones the editor is focused + } + } + + // A small timeout was needed since firefox will remove. Bug: #1838304 + setTimeout(function () { + if (t.removed) + return; + + t.load({initial : true, format : (s.cleanup_on_startup ? 'html' : 'raw')}); + t.startContent = t.getContent({format : 'raw'}); + t.undoManager.add({initial : true}); + t.initialized = true; + + t.onInit.dispatch(t); + t.execCallback('setupcontent_callback', t.id, t.getBody(), t.getDoc()); + t.execCallback('init_instance_callback', t); + t.focus(true); + t.nodeChanged({initial : 1}); + + // Load specified content CSS last + if (s.content_css) { + tinymce.each(explode(s.content_css), function(u) { + t.dom.loadCSS(t.documentBaseURI.toAbsolute(u)); + }); + } + + // Handle auto focus + if (s.auto_focus) { + setTimeout(function () { + var ed = EditorManager.get(s.auto_focus); + + ed.selection.select(ed.getBody(), 1); + ed.selection.collapse(1); + ed.getWin().focus(); + }, 100); + } + }, 1); + + e = null; + }, + + + focus : function(sf) { + var oed, t = this, ce = t.settings.content_editable; + + if (!sf) { + // Is not content editable or the selection is outside the area in IE + // the IE statement is needed to avoid bluring if element selections inside layers since + // the layer is like it's own document in IE + if (!ce && (!isIE || t.selection.getNode().ownerDocument != t.getDoc())) + t.getWin().focus(); + + } + + if (EditorManager.activeEditor != t) { + if ((oed = EditorManager.activeEditor) != null) + oed.onDeactivate.dispatch(oed, t); + + t.onActivate.dispatch(t, oed); + } + + EditorManager._setActive(t); + }, + + execCallback : function(n) { + var t = this, f = t.settings[n], s; + + if (!f) + return; + + // Look through lookup + if (t.callbackLookup && (s = t.callbackLookup[n])) { + f = s.func; + s = s.scope; + } + + if (is(f, 'string')) { + s = f.replace(/\.\w+$/, ''); + s = s ? tinymce.resolve(s) : 0; + f = tinymce.resolve(f); + t.callbackLookup = t.callbackLookup || {}; + t.callbackLookup[n] = {func : f, scope : s}; + } + + return f.apply(s || t, Array.prototype.slice.call(arguments, 1)); + }, + + translate : function(s) { + var c = this.settings.language || 'en', i18n = EditorManager.i18n; + + if (!s) + return ''; + + return i18n[c + '.' + s] || s.replace(/{\#([^}]+)\}/g, function(a, b) { + return i18n[c + '.' + b] || '{#' + b + '}'; + }); + }, + + getLang : function(n, dv) { + return EditorManager.i18n[(this.settings.language || 'en') + '.' + n] || (is(dv) ? dv : '{#' + n + '}'); + }, + + getParam : function(n, dv, ty) { + var tr = tinymce.trim, v = is(this.settings[n]) ? this.settings[n] : dv, o; + + if (ty === 'hash') { + o = {}; + + if (is(v, 'string')) { + each(v.indexOf('=') > 0 ? v.split(/[;,](?![^=;,]*(?:[;,]|$))/) : v.split(','), function(v) { + v = v.split('='); + + if (v.length > 1) + o[tr(v[0])] = tr(v[1]); + else + o[tr(v[0])] = tr(v); + }); + } else + o = v; + + return o; + } + + return v; + }, + + nodeChanged : function(o) { + var t = this, s = t.selection, n = s.getNode() || t.getBody(); + + // Fix for bug #1896577 it seems that this can not be fired while the editor is loading + if (t.initialized) { + t.onNodeChange.dispatch( + t, + o ? o.controlManager || t.controlManager : t.controlManager, + isIE && n.ownerDocument != t.getDoc() ? t.getBody() : n, // Fix for IE initial state + s.isCollapsed(), + o + ); + } + }, + + addButton : function(n, s) { + var t = this; + + t.buttons = t.buttons || {}; + t.buttons[n] = s; + }, + + addCommand : function(n, f, s) { + this.execCommands[n] = {func : f, scope : s || this}; + }, + + addQueryStateHandler : function(n, f, s) { + this.queryStateCommands[n] = {func : f, scope : s || this}; + }, + + addQueryValueHandler : function(n, f, s) { + this.queryValueCommands[n] = {func : f, scope : s || this}; + }, + + addShortcut : function(pa, desc, cmd_func, sc) { + var t = this, c; + + if (!t.settings.custom_shortcuts) + return false; + + t.shortcuts = t.shortcuts || {}; + + if (is(cmd_func, 'string')) { + c = cmd_func; + + cmd_func = function() { + t.execCommand(c, false, null); + }; + } + + if (is(cmd_func, 'object')) { + c = cmd_func; + + cmd_func = function() { + t.execCommand(c[0], c[1], c[2]); + }; + } + + each(explode(pa), function(pa) { + var o = { + func : cmd_func, + scope : sc || this, + desc : desc, + alt : false, + ctrl : false, + shift : false + }; + + each(explode(pa, '+'), function(v) { + switch (v) { + case 'alt': + case 'ctrl': + case 'shift': + o[v] = true; + break; + + default: + o.charCode = v.charCodeAt(0); + o.keyCode = v.toUpperCase().charCodeAt(0); + } + }); + + t.shortcuts[(o.ctrl ? 'ctrl' : '') + ',' + (o.alt ? 'alt' : '') + ',' + (o.shift ? 'shift' : '') + ',' + o.keyCode] = o; + }); + + return true; + }, + + execCommand : function(cmd, ui, val, a) { + var t = this, s = 0, o, st; + + if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd) && (!a || !a.skip_focus)) + t.focus(); + + o = {}; + t.onBeforeExecCommand.dispatch(t, cmd, ui, val, o); + if (o.terminate) + return false; + + // Command callback + if (t.execCallback('execcommand_callback', t.id, t.selection.getNode(), cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Registred commands + if (o = t.execCommands[cmd]) { + st = o.func.call(o.scope, ui, val); + + // Fall through on true + if (st !== true) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return st; + } + } + + // Plugin commands + each(t.plugins, function(p) { + if (p.execCommand && p.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + s = 1; + return false; + } + }); + + if (s) + return true; + + // Theme commands + if (t.theme.execCommand && t.theme.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Editor commands + if (t.editorCommands.execCommand(cmd, ui, val)) { + t.onExecCommand.dispatch(t, cmd, ui, val, a); + return true; + } + + // Browser commands + t.getDoc().execCommand(cmd, ui, val); + t.onExecCommand.dispatch(t, cmd, ui, val, a); + }, + + queryCommandState : function(c) { + var t = this, o, s; + + // Is hidden then return undefined + if (t._isHidden()) + return; + + // Registred commands + if (o = t.queryStateCommands[c]) { + s = o.func.call(o.scope); + + // Fall though on true + if (s !== true) + return s; + } + + // Registred commands + o = t.editorCommands.queryCommandState(c); + if (o !== -1) + return o; + + // Browser commands + try { + return this.getDoc().queryCommandState(c); + } catch (ex) { + // Fails sometimes see bug: 1896577 + } + }, + + queryCommandValue : function(c) { + var t = this, o, s; + + // Is hidden then return undefined + if (t._isHidden()) + return; + + // Registred commands + if (o = t.queryValueCommands[c]) { + s = o.func.call(o.scope); + + // Fall though on true + if (s !== true) + return s; + } + + // Registred commands + o = t.editorCommands.queryCommandValue(c); + if (is(o)) + return o; + + // Browser commands + try { + return this.getDoc().queryCommandValue(c); + } catch (ex) { + // Fails sometimes see bug: 1896577 + } + }, + + show : function() { + var t = this; + + DOM.show(t.getContainer()); + DOM.hide(t.id); + t.load(); + }, + + hide : function() { + var t = this, d = t.getDoc(); + + // Fixed bug where IE has a blinking cursor left from the editor + if (isIE && d) + d.execCommand('SelectAll'); + + // We must save before we hide so Safari doesn't crash + t.save(); + DOM.hide(t.getContainer()); + DOM.setStyle(t.id, 'display', t.orgDisplay); + }, + + isHidden : function() { + return !DOM.isHidden(this.id); + }, + + setProgressState : function(b, ti, o) { + this.onSetProgressState.dispatch(this, b, ti, o); + + return b; + }, + + resizeToContent : function() { + var t = this; + + DOM.setStyle(t.id + "_ifr", 'height', t.getBody().scrollHeight); + }, + + load : function(o) { + var t = this, e = t.getElement(), h; + + if (e) { + o = o || {}; + o.load = true; + + h = t.setContent(is(e.value) ? e.value : e.innerHTML, o); + o.element = e; + + if (!o.no_events) + t.onLoadContent.dispatch(t, o); + + o.element = e = null; + + return h; + } + }, + + save : function(o) { + var t = this, e = t.getElement(), h, f; + + if (!e || !t.initialized) + return; + + o = o || {}; + o.save = true; + + // Add undo level will trigger onchange event + if (!o.no_events) { + t.undoManager.typing = 0; + t.undoManager.add(); + } + + o.element = e; + h = o.content = t.getContent(o); + + if (!o.no_events) + t.onSaveContent.dispatch(t, o); + + h = o.content; + + if (!/TEXTAREA|INPUT/i.test(e.nodeName)) { + e.innerHTML = h; + + // Update hidden form element + if (f = DOM.getParent(t.id, 'form')) { + each(f.elements, function(e) { + if (e.name == t.id) { + e.value = h; + return false; + } + }); + } + } else + e.value = h; + + o.element = e = null; + + return h; + }, + + setContent : function(h, o) { + var t = this; + + o = o || {}; + o.format = o.format || 'html'; + o.set = true; + o.content = h; + + if (!o.no_events) + t.onBeforeSetContent.dispatch(t, o); + + // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content + // It will also be impossible to place the caret in the editor unless there is a BR element present + if (!tinymce.isIE && (h.length === 0 || /^\s+$/.test(h))) { + o.content = t.dom.setHTML(t.getBody(), '
'); + o.format = 'raw'; + } + + o.content = t.dom.setHTML(t.getBody(), tinymce.trim(o.content)); + + if (o.format != 'raw' && t.settings.cleanup) { + o.getInner = true; + o.content = t.dom.setHTML(t.getBody(), t.serializer.serialize(t.getBody(), o)); + } + + if (!o.no_events) + t.onSetContent.dispatch(t, o); + + return o.content; + }, + + getContent : function(o) { + var t = this, h; + + o = o || {}; + o.format = o.format || 'html'; + o.get = true; + + if (!o.no_events) + t.onBeforeGetContent.dispatch(t, o); + + if (o.format != 'raw' && t.settings.cleanup) { + o.getInner = true; + h = t.serializer.serialize(t.getBody(), o); + } else + h = t.getBody().innerHTML; + + h = h.replace(/^\s*|\s*$/g, ''); + o.content = h; + + if (!o.no_events) + t.onGetContent.dispatch(t, o); + + return o.content; + }, + + isDirty : function() { + var t = this; + + return tinymce.trim(t.startContent) != tinymce.trim(t.getContent({format : 'raw', no_events : 1})) && !t.isNotDirty; + }, + + getContainer : function() { + var t = this; + + if (!t.container) + t.container = DOM.get(t.editorContainer || t.id + '_parent'); + + return t.container; + }, + + getContentAreaContainer : function() { + return this.contentAreaContainer; + }, + + getElement : function() { + return DOM.get(this.settings.content_element || this.id); + }, + + getWin : function() { + var t = this, e; + + if (!t.contentWindow) { + e = DOM.get(t.id + "_ifr"); + + if (e) + t.contentWindow = e.contentWindow; + } + + return t.contentWindow; + }, + + getDoc : function() { + var t = this, w; + + if (!t.contentDocument) { + w = t.getWin(); + + if (w) + t.contentDocument = w.document; + } + + return t.contentDocument; + }, + + getBody : function() { + return this.bodyElement || this.getDoc().body; + }, + + convertURL : function(u, n, e) { + var t = this, s = t.settings; + + // Use callback instead + if (s.urlconverter_callback) + return t.execCallback('urlconverter_callback', u, e, true, n); + + // Don't convert link href since thats the CSS files that gets loaded into the editor also skip local file URLs + if (!s.convert_urls || (e && e.nodeName == 'LINK') || u.indexOf('file:') === 0) + return u; + + // Convert to relative + if (s.relative_urls) + return t.documentBaseURI.toRelative(u); + + // Convert to absolute + u = t.documentBaseURI.toAbsolute(u, s.remove_script_host); + + return u; + }, + + addVisual : function(e) { + var t = this, s = t.settings; + + e = e || t.getBody(); + + if (!is(t.hasVisual)) + t.hasVisual = s.visual; + + each(t.dom.select('table,a', e), function(e) { + var v; + + switch (e.nodeName) { + case 'TABLE': + v = t.dom.getAttrib(e, 'border'); + + if (!v || v == '0') { + if (t.hasVisual) + t.dom.addClass(e, s.visual_table_class); + else + t.dom.removeClass(e, s.visual_table_class); + } + + return; + + case 'A': + v = t.dom.getAttrib(e, 'name'); + + if (v) { + if (t.hasVisual) + t.dom.addClass(e, 'mceItemAnchor'); + else + t.dom.removeClass(e, 'mceItemAnchor'); + } + + return; + } + }); + + t.onVisualAid.dispatch(t, e, t.hasVisual); + }, + + remove : function() { + var t = this, e = t.getContainer(); + + t.removed = 1; // Cancels post remove event execution + t.hide(); + + t.execCallback('remove_instance_callback', t); + t.onRemove.dispatch(t); + + // Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command + t.onExecCommand.listeners = []; + + EditorManager.remove(t); + DOM.remove(e); + }, + + destroy : function(s) { + var t = this; + + // One time is enough + if (t.destroyed) + return; + + if (!s) { + tinymce.removeUnload(t.destroy); + tinyMCE.onBeforeUnload.remove(t._beforeUnload); + + // Manual destroy + if (t.theme.destroy) + t.theme.destroy(); + + // Destroy controls, selection and dom + t.controlManager.destroy(); + t.selection.destroy(); + t.dom.destroy(); + + // Remove all events + + // Don't clear the window or document if content editable + // is enabled since other instances might still be present + if (!t.settings.content_editable) { + Event.clear(t.getWin()); + Event.clear(t.getDoc()); + } + + Event.clear(t.getBody()); + Event.clear(t.formElement); + } + + if (t.formElement) { + t.formElement.submit = t.formElement._mceOldSubmit; + t.formElement._mceOldSubmit = null; + } + + t.contentAreaContainer = t.formElement = t.container = t.settings.content_element = t.bodyElement = t.contentDocument = t.contentWindow = null; + + if (t.selection) + t.selection = t.selection.win = t.selection.dom = t.selection.dom.doc = null; + + t.destroyed = 1; + }, + + // Internal functions + + _addEvents : function() { + // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset + var t = this, i, s = t.settings, lo = { + mouseup : 'onMouseUp', + mousedown : 'onMouseDown', + click : 'onClick', + keyup : 'onKeyUp', + keydown : 'onKeyDown', + keypress : 'onKeyPress', + submit : 'onSubmit', + reset : 'onReset', + contextmenu : 'onContextMenu', + dblclick : 'onDblClick', + paste : 'onPaste' // Doesn't work in all browsers yet + }; + + function eventHandler(e, o) { + var ty = e.type; + + // Don't fire events when it's removed + if (t.removed) + return; + + // Generic event handler + if (t.onEvent.dispatch(t, e, o) !== false) { + // Specific event handler + t[lo[e.fakeType || e.type]].dispatch(t, e, o); + } + }; + + // Add DOM events + each(lo, function(v, k) { + switch (k) { + case 'contextmenu': + if (tinymce.isOpera) { + // Fake contextmenu on Opera + Event.add(t.getBody(), 'mousedown', function(e) { + if (e.ctrlKey) { + e.fakeType = 'contextmenu'; + eventHandler(e); + } + }); + } else + Event.add(t.getBody(), k, eventHandler); + break; + + case 'paste': + Event.add(t.getBody(), k, function(e) { + var tx, h, el, r; + + // Get plain text data + if (e.clipboardData) + tx = e.clipboardData.getData('text/plain'); + else if (tinymce.isIE) + tx = t.getWin().clipboardData.getData('Text'); + + // Get HTML data + /*if (tinymce.isIE) { + el = DOM.add(DOM.doc.body, 'div', {style : 'visibility:hidden;overflow:hidden;position:absolute;width:1px;height:1px'}); + r = DOM.doc.body.createTextRange(); + r.moveToElementText(el); + r.execCommand('Paste'); + h = el.innerHTML; + DOM.remove(el); + }*/ + + eventHandler(e, {text : tx, html : h}); + }); + break; + + case 'submit': + case 'reset': + Event.add(t.getElement().form || DOM.getParent(t.id, 'form'), k, eventHandler); + break; + + default: + Event.add(s.content_editable ? t.getBody() : t.getDoc(), k, eventHandler); + } + }); + + Event.add(s.content_editable ? t.getBody() : (isGecko ? t.getDoc() : t.getWin()), 'focus', function(e) { + t.focus(true); + }); + + + // Fixes bug where a specified document_base_uri could result in broken images + // This will also fix drag drop of images in Gecko + if (tinymce.isGecko) { + // Convert all images to absolute URLs +/* t.onSetContent.add(function(ed, o) { + each(ed.dom.select('img'), function(e) { + var v; + + if (v = e.getAttribute('mce_src')) + e.src = t.documentBaseURI.toAbsolute(v); + }) + });*/ + + Event.add(t.getDoc(), 'DOMNodeInserted', function(e) { + var v; + + e = e.target; + + if (e.nodeType === 1 && e.nodeName === 'IMG' && (v = e.getAttribute('mce_src'))) + e.src = t.documentBaseURI.toAbsolute(v); + }); + } + + // Set various midas options in Gecko + if (isGecko) { + function setOpts() { + var t = this, d = t.getDoc(), s = t.settings; + + if (isGecko && !s.readonly) { + if (t._isHidden()) { + try { + if (!s.content_editable) + d.designMode = 'On'; + } catch (ex) { + // Fails if it's hidden + } + } + + try { + // Try new Gecko method + d.execCommand("styleWithCSS", 0, false); + } catch (ex) { + // Use old method + if (!t._isHidden()) + try {d.execCommand("useCSS", 0, true);} catch (ex) {} + } + + if (!s.table_inline_editing) + try {d.execCommand('enableInlineTableEditing', false, false);} catch (ex) {} + + if (!s.object_resizing) + try {d.execCommand('enableObjectResizing', false, false);} catch (ex) {} + } + }; + + t.onBeforeExecCommand.add(setOpts); + t.onMouseDown.add(setOpts); + } + + // Add node change handlers + t.onMouseUp.add(t.nodeChanged); + t.onClick.add(t.nodeChanged); + t.onKeyUp.add(function(ed, e) { + var c = e.keyCode; + + if ((c >= 33 && c <= 36) || (c >= 37 && c <= 40) || c == 13 || c == 45 || c == 46 || c == 8 || (tinymce.isMac && (c == 91 || c == 93)) || e.ctrlKey) + t.nodeChanged(); + }); + + // Add reset handler + t.onReset.add(function() { + t.setContent(t.startContent, {format : 'raw'}); + }); + + if (t.getParam('tab_focus')) { + function tabCancel(ed, e) { + if (e.keyCode === 9) + return Event.cancel(e); + }; + + function tabHandler(ed, e) { + var x, i, f, el, v; + + function find(d) { + f = DOM.getParent(ed.id, 'form'); + el = f.elements; + + if (f) { + each(el, function(e, i) { + if (e.id == ed.id) { + x = i; + return false; + } + }); + + if (d > 0) { + for (i = x + 1; i < el.length; i++) { + if (el[i].type != 'hidden') + return el[i]; + } + } else { + for (i = x - 1; i >= 0; i--) { + if (el[i].type != 'hidden') + return el[i]; + } + } + } + + return null; + }; + + if (e.keyCode === 9) { + v = explode(ed.getParam('tab_focus')); + + if (v.length == 1) { + v[1] = v[0]; + v[0] = ':prev'; + } + + // Find element to focus + if (e.shiftKey) { + if (v[0] == ':prev') + el = find(-1); + else + el = DOM.get(v[0]); + } else { + if (v[1] == ':next') + el = find(1); + else + el = DOM.get(v[1]); + } + + if (el) { + if (ed = EditorManager.get(el.id || el.name)) + ed.focus(); + else + window.setTimeout(function() {window.focus();el.focus();}, 10); + + return Event.cancel(e); + } + } + }; + + t.onKeyUp.add(tabCancel); + + if (isGecko) { + t.onKeyPress.add(tabHandler); + t.onKeyDown.add(tabCancel); + } else + t.onKeyDown.add(tabHandler); + } + + // Add shortcuts + if (s.custom_shortcuts) { + if (s.custom_undo_redo_keyboard_shortcuts) { + t.addShortcut('ctrl+z', t.getLang('undo_desc'), 'Undo'); + t.addShortcut('ctrl+y', t.getLang('redo_desc'), 'Redo'); + } + + // Add default shortcuts for gecko + if (isGecko) { + t.addShortcut('ctrl+b', t.getLang('bold_desc'), 'Bold'); + t.addShortcut('ctrl+i', t.getLang('italic_desc'), 'Italic'); + t.addShortcut('ctrl+u', t.getLang('underline_desc'), 'Underline'); + } + + // BlockFormat shortcuts keys + for (i=1; i<=6; i++) + t.addShortcut('ctrl+' + i, '', ['FormatBlock', false, '']); + + t.addShortcut('ctrl+7', '', ['FormatBlock', false, '

']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, '

']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, '
']); + + function find(e) { + var v = null; + + if (!e.altKey && !e.ctrlKey && !e.metaKey) + return v; + + each(t.shortcuts, function(o) { + if (tinymce.isMac && o.ctrl != e.metaKey) + return; + else if (!tinymce.isMac && o.ctrl != e.ctrlKey) + return; + + if (o.alt != e.altKey) + return; + + if (o.shift != e.shiftKey) + return; + + if (e.keyCode == o.keyCode || (e.charCode && e.charCode == o.charCode)) { + v = o; + return false; + } + }); + + return v; + }; + + t.onKeyUp.add(function(ed, e) { + var o = find(e); + + if (o) + return Event.cancel(e); + }); + + t.onKeyPress.add(function(ed, e) { + var o = find(e); + + if (o) + return Event.cancel(e); + }); + + t.onKeyDown.add(function(ed, e) { + var o = find(e); + + if (o) { + o.func.call(o.scope); + return Event.cancel(e); + } + }); + } + + if (tinymce.isIE) { + // Fix so resize will only update the width and height attributes not the styles of an image + // It will also block mceItemNoResize items + Event.add(t.getDoc(), 'controlselect', function(e) { + var re = t.resizeInfo, cb; + + e = e.target; + + // Don't do this action for non image elements + if (e.nodeName !== 'IMG') + return; + + if (re) + Event.remove(re.node, re.ev, re.cb); + + if (!t.dom.hasClass(e, 'mceItemNoResize')) { + ev = 'resizeend'; + cb = Event.add(e, ev, function(e) { + var v; + + e = e.target; + + if (v = t.dom.getStyle(e, 'width')) { + t.dom.setAttrib(e, 'width', v.replace(/[^0-9%]+/g, '')); + t.dom.setStyle(e, 'width', ''); + } + + if (v = t.dom.getStyle(e, 'height')) { + t.dom.setAttrib(e, 'height', v.replace(/[^0-9%]+/g, '')); + t.dom.setStyle(e, 'height', ''); + } + }); + } else { + ev = 'resizestart'; + cb = Event.add(e, 'resizestart', Event.cancel, Event); + } + + re = t.resizeInfo = { + node : e, + ev : ev, + cb : cb + }; + }); + + t.onKeyDown.add(function(ed, e) { + switch (e.keyCode) { + case 8: + // Fix IE control + backspace browser bug + if (t.selection.getRng().item) { + t.selection.getRng().item(0).removeNode(); + return Event.cancel(e); + } + } + }); + } + + if (tinymce.isOpera) { + t.onClick.add(function(ed, e) { + Event.prevent(e); + }); + } + + // Add custom undo/redo handlers + if (s.custom_undo_redo) { + function addUndo() { + t.undoManager.typing = 0; + t.undoManager.add(); + }; + + // Add undo level on editor blur + if (tinymce.isIE) { + Event.add(t.getWin(), 'blur', function(e) { + var n; + + // Check added for fullscreen bug + if (t.selection) { + n = t.selection.getNode(); + + // Add undo level is selection was lost to another document + if (!t.removed && n.ownerDocument && n.ownerDocument != t.getDoc()) + addUndo(); + } + }); + } else { + Event.add(t.getDoc(), 'blur', function() { + if (t.selection && !t.removed) + addUndo(); + }); + } + + t.onMouseDown.add(addUndo); + + t.onKeyUp.add(function(ed, e) { + if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) { + t.undoManager.typing = 0; + t.undoManager.add(); + } + }); + + t.onKeyDown.add(function(ed, e) { + // Is caracter positon keys + if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45) { + if (t.undoManager.typing) { + t.undoManager.add(); + t.undoManager.typing = 0; + } + + return; + } + + if (!t.undoManager.typing) { + t.undoManager.add(); + t.undoManager.typing = 1; + } + }); + } + }, + + _convertInlineElements : function() { + var t = this, s = t.settings, dom = t.dom, v, e, na, st, sp; + + function convert(ed, o) { + if (!s.inline_styles) + return; + + if (o.get) { + each(t.dom.select('table,u,strike', o.node), function(n) { + switch (n.nodeName) { + case 'TABLE': + if (v = dom.getAttrib(n, 'height')) { + dom.setStyle(n, 'height', v); + dom.setAttrib(n, 'height', ''); + } + break; + + case 'U': + case 'STRIKE': + //sp = dom.create('span', {style : dom.getAttrib(n, 'style')}); + n.style.textDecoration = n.nodeName == 'U' ? 'underline' : 'line-through'; + dom.setAttrib(n, 'mce_style', ''); + dom.setAttrib(n, 'mce_name', 'span'); + break; + } + }); + } else if (o.set) { + each(t.dom.select('table,span', o.node).reverse(), function(n) { + if (n.nodeName == 'TABLE') { + if (v = dom.getStyle(n, 'height')) + dom.setAttrib(n, 'height', v.replace(/[^0-9%]+/g, '')); + } else { + // Convert spans to elements + if (n.style.textDecoration == 'underline') + na = 'u'; + else if (n.style.textDecoration == 'line-through') + na = 'strike'; + else + na = ''; + + if (na) { + n.style.textDecoration = ''; + dom.setAttrib(n, 'mce_style', ''); + + e = dom.create(na, { + style : dom.getAttrib(n, 'style') + }); + + dom.replace(e, n, 1); + } + } + }); + } + }; + + t.onPreProcess.add(convert); + + if (!s.cleanup_on_startup) { + t.onSetContent.add(function(ed, o) { + if (o.initial) + convert(t, {node : t.getBody(), set : 1}); + }); + } + }, + + _convertFonts : function() { + var t = this, s = t.settings, dom = t.dom, fz, fzn, sl, cl; + + // No need + if (!s.inline_styles) + return; + + // Font pt values and font size names + fz = [8, 10, 12, 14, 18, 24, 36]; + fzn = ['xx-small', 'x-small','small','medium','large','x-large', 'xx-large']; + + if (sl = s.font_size_style_values) + sl = explode(sl); + + if (cl = s.font_size_classes) + cl = explode(cl); + + function process(no) { + var n, sp, nl, x; + + // Keep unit tests happy + if (!s.inline_styles) + return; + + nl = t.dom.select('font', no); + for (x = nl.length - 1; x >= 0; x--) { + n = nl[x]; + + sp = dom.create('span', { + style : dom.getAttrib(n, 'style'), + 'class' : dom.getAttrib(n, 'class') + }); + + dom.setStyles(sp, { + fontFamily : dom.getAttrib(n, 'face'), + color : dom.getAttrib(n, 'color'), + backgroundColor : n.style.backgroundColor + }); + + if (n.size) { + if (sl) + dom.setStyle(sp, 'fontSize', sl[parseInt(n.size) - 1]); + else + dom.setAttrib(sp, 'class', cl[parseInt(n.size) - 1]); + } + + dom.setAttrib(sp, 'mce_style', ''); + dom.replace(sp, n, 1); + } + }; + + // Run on cleanup + t.onPreProcess.add(function(ed, o) { + if (o.get) + process(o.node); + }); + + t.onSetContent.add(function(ed, o) { + if (o.initial) + process(o.node); + }); + }, + + _isHidden : function() { + var s; + + if (!isGecko) + return 0; + + // Weird, wheres that cursor selection? + s = this.selection.getSel(); + return (!s || !s.rangeCount || s.rangeCount == 0); + }, + + // Fix for bug #1867292 + _fixNesting : function(s) { + var d = [], i; + + s = s.replace(/<(\/)?([^\s>]+)[^>]*?>/g, function(a, b, c) { + var e; + + // Handle end element + if (b === '/') { + if (!d.length) + return ''; + + if (c !== d[d.length - 1].tag) { + for (i=d.length - 1; i>=0; i--) { + if (d[i].tag === c) { + d[i].close = 1; + break; + } + } + + return ''; + } else { + d.pop(); + + if (d.length && d[d.length - 1].close) { + a = a + ''; + d.pop(); + } + } + } else { + // Ignore these + if (/^(br|hr|input|meta|img|link|param)$/i.test(c)) + return a; + + // Ignore closed ones + if (/\/>$/.test(a)) + return a; + + d.push({tag : c}); // Push start element + } + + return a; + }); + + // End all open tags + for (i=d.length - 1; i>=0; i--) + s += ''; + + return s; + } + + }); +})(); + +/* file:jscripts/tiny_mce/classes/EditorCommands.js */ + +(function() { + var each = tinymce.each, isIE = tinymce.isIE, isGecko = tinymce.isGecko, isOpera = tinymce.isOpera, isWebKit = tinymce.isWebKit; + + function isBlock(n) { + return /^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n.nodeName); + }; + + tinymce.create('tinymce.EditorCommands', { + EditorCommands : function(ed) { + this.editor = ed; + }, + + execCommand : function(cmd, ui, val) { + var t = this, ed = t.editor, f; + + switch (cmd) { + case 'Cut': + case 'Copy': + case 'Paste': + try { + ed.getDoc().execCommand(cmd, ui, val); + } catch (ex) { + if (isGecko) { + ed.windowManager.confirm(ed.getLang('clipboard_msg'), function(s) { + if (s) + window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', 'mceExternal'); + }); + } else + ed.windowManager.alert(ed.getLang('clipboard_no_support')); + } + + return true; + + // Ignore these + case 'mceResetDesignMode': + case 'mceBeginUndoLevel': + return true; + + // Ignore these + case 'unlink': + t.UnLink(); + return true; + + // Bundle these together + case 'JustifyLeft': + case 'JustifyCenter': + case 'JustifyRight': + case 'JustifyFull': + t.mceJustify(cmd, cmd.substring(7).toLowerCase()); + return true; + + case 'mceEndUndoLevel': + case 'mceAddUndoLevel': + ed.undoManager.add(); + return true; + + default: + f = this[cmd]; + + if (f) { + f.call(this, ui, val); + return true; + } + } + + return false; + }, + + Indent : function() { + var ed = this.editor, d = ed.dom, s = ed.selection, e, iv, iu; + + // Setup indent level + iv = ed.settings.indentation; + iu = /[a-z%]+$/i.exec(iv); + iv = parseInt(iv); + + if (ed.settings.inline_styles && (!this.queryStateInsertUnorderedList() && !this.queryStateInsertOrderedList())) { + each(this._getSelectedBlocks(), function(e) { + d.setStyle(e, 'paddingLeft', (parseInt(e.style.paddingLeft || 0) + iv) + iu); + }); + + return; + } + + ed.getDoc().execCommand('Indent', false, null); + + if (isIE) { + d.getParent(s.getNode(), function(n) { + if (n.nodeName == 'BLOCKQUOTE') { + n.dir = n.style.cssText = ''; + } + }); + } + }, + + Outdent : function() { + var ed = this.editor, d = ed.dom, s = ed.selection, e, v, iv, iu; + + // Setup indent level + iv = ed.settings.indentation; + iu = /[a-z%]+$/i.exec(iv); + iv = parseInt(iv); + + if (ed.settings.inline_styles && (!this.queryStateInsertUnorderedList() && !this.queryStateInsertOrderedList())) { + each(this._getSelectedBlocks(), function(e) { + v = Math.max(0, parseInt(e.style.paddingLeft || 0) - iv); + d.setStyle(e, 'paddingLeft', v ? v + iu : ''); + }); + + return; + } + + ed.getDoc().execCommand('Outdent', false, null); + }, + + mceSetAttribute : function(u, v) { + var ed = this.editor, d = ed.dom, e; + + if (e = d.getParent(ed.selection.getNode(), d.isBlock)) + d.setAttrib(e, v.name, v.value); + }, + + mceSetContent : function(u, v) { + this.editor.setContent(v); + }, + + mceToggleVisualAid : function() { + var ed = this.editor; + + ed.hasVisual = !ed.hasVisual; + ed.addVisual(); + }, + + mceReplaceContent : function(u, v) { + var s = this.editor.selection; + + s.setContent(v.replace(/\{\$selection\}/g, s.getContent({format : 'text'}))); + }, + + mceInsertLink : function(u, v) { + var ed = this.editor, s = ed.selection, e = ed.dom.getParent(s.getNode(), 'A'); + + if (tinymce.is(v, 'string')) + v = {href : v}; + + function set(e) { + each(v, function(v, k) { + ed.dom.setAttrib(e, k, v); + }); + }; + + if (!e) { + ed.execCommand('CreateLink', false, 'javascript:mctmp(0);'); + each(ed.dom.select('a'), function(e) { + if (e.href == 'javascript:mctmp(0);') + set(e); + }); + } else { + if (v.href) + set(e); + else + ed.dom.remove(e, 1); + } + }, + + UnLink : function() { + var ed = this.editor, s = ed.selection; + + if (s.isCollapsed()) + s.select(s.getNode()); + + ed.getDoc().execCommand('unlink', false, null); + s.collapse(0); + }, + + FontName : function(u, v) { + var t = this, ed = t.editor, s = ed.selection, e; + + if (!v) { + if (s.isCollapsed()) + s.select(s.getNode()); + + t.RemoveFormat(); + } else { + if (ed.settings.convert_fonts_to_spans) + t._applyInlineStyle('span', {style : {fontFamily : v}}); + else + ed.getDoc().execCommand('FontName', false, v); + } + }, + + FontSize : function(u, v) { + var ed = this.editor, s = ed.settings, fc, fs; + + // Use style options instead + if (s.convert_fonts_to_spans && v >= 1 && v <= 7) { + fs = tinymce.explode(s.font_size_style_values); + fc = tinymce.explode(s.font_size_classes); + + if (fc) + v = fc[v - 1] || v; + else + v = fs[v - 1] || v; + } + + if (v >= 1 && v <= 7) + ed.getDoc().execCommand('FontSize', false, v); + else + this._applyInlineStyle('span', {style : {fontSize : v}}); + }, + + queryCommandValue : function(c) { + var f = this['queryValue' + c]; + + if (f) + return f.call(this, c); + + return false; + }, + + queryCommandState : function(cmd) { + var f; + + switch (cmd) { + // Bundle these together + case 'JustifyLeft': + case 'JustifyCenter': + case 'JustifyRight': + case 'JustifyFull': + return this.queryStateJustify(cmd, cmd.substring(7).toLowerCase()); + + default: + if (f = this['queryState' + cmd]) + return f.call(this, cmd); + } + + return -1; + }, + + _queryState : function(c) { + try { + return this.editor.getDoc().queryCommandState(c); + } catch (ex) { + // Ignore exception + } + }, + + _queryVal : function(c) { + try { + return this.editor.getDoc().queryCommandValue(c); + } catch (ex) { + // Ignore exception + } + }, + + queryValueFontSize : function() { + var ed = this.editor, v = 0, p; + + if (p = ed.dom.getParent(ed.selection.getNode(), 'SPAN')) + v = p.style.fontSize; + + if (!v && (isOpera || isWebKit)) { + if (p = ed.dom.getParent(ed.selection.getNode(), 'FONT')) + v = p.size; + + return v; + } + + return v || this._queryVal('FontSize'); + }, + + queryValueFontName : function() { + var ed = this.editor, v = 0, p; + + if (p = ed.dom.getParent(ed.selection.getNode(), 'FONT')) + v = p.face; + + if (p = ed.dom.getParent(ed.selection.getNode(), 'SPAN')) + v = p.style.fontFamily.replace(/, /g, ',').replace(/[\'\"]/g, '').toLowerCase(); + + if (!v) + v = this._queryVal('FontName'); + + return v; + }, + + mceJustify : function(c, v) { + var ed = this.editor, se = ed.selection, n = se.getNode(), nn = n.nodeName, bl, nb, dom = ed.dom, rm; + + if (ed.settings.inline_styles && this.queryStateJustify(c, v)) + rm = 1; + + bl = dom.getParent(n, ed.dom.isBlock); + + if (nn == 'IMG') { + if (v == 'full') + return; + + if (rm) { + if (v == 'center') + dom.setStyle(bl || n.parentNode, 'textAlign', ''); + + dom.setStyle(n, 'float', ''); + this.mceRepaint(); + return; + } + + if (v == 'center') { + // Do not change table elements + if (bl && /^(TD|TH)$/.test(bl.nodeName)) + bl = 0; + + if (!bl || bl.childNodes.length > 1) { + nb = dom.create('p'); + nb.appendChild(n.cloneNode(false)); + + if (bl) + dom.insertAfter(nb, bl); + else + dom.insertAfter(nb, n); + + dom.remove(n); + n = nb.firstChild; + bl = nb; + } + + dom.setStyle(bl, 'textAlign', v); + dom.setStyle(n, 'float', ''); + } else { + dom.setStyle(n, 'float', v); + dom.setStyle(bl || n.parentNode, 'textAlign', ''); + } + + this.mceRepaint(); + return; + } + + // Handle the alignment outselfs, less quirks in all browsers + if (ed.settings.inline_styles && ed.settings.forced_root_block) { + if (rm) + v = ''; + + each(this._getSelectedBlocks(dom.getParent(se.getStart(), dom.isBlock), dom.getParent(se.getEnd(), dom.isBlock)), function(e) { + dom.setAttrib(e, 'align', ''); + dom.setStyle(e, 'textAlign', v == 'full' ? 'justify' : v); + }); + + return; + } else if (!rm) + ed.getDoc().execCommand(c, false, null); + + if (ed.settings.inline_styles) { + if (rm) { + dom.getParent(ed.selection.getNode(), function(n) { + if (n.style && n.style.textAlign) + dom.setStyle(n, 'textAlign', ''); + }); + + return; + } + + each(dom.select('*'), function(n) { + var v = n.align; + + if (v) { + if (v == 'full') + v = 'justify'; + + dom.setStyle(n, 'textAlign', v); + dom.setAttrib(n, 'align', ''); + } + }); + } + }, + + mceSetCSSClass : function(u, v) { + this.mceSetStyleInfo(0, {command : 'setattrib', name : 'class', value : v}); + }, + + getSelectedElement : function() { + var t = this, ed = t.editor, dom = ed.dom, se = ed.selection, r = se.getRng(), r1, r2, sc, ec, so, eo, e, sp, ep, re; + + if (se.isCollapsed() || r.item) + return se.getNode(); + + // Setup regexp + re = ed.settings.merge_styles_invalid_parents; + if (tinymce.is(re, 'string')) + re = new RegExp(re, 'i'); + + if (isIE) { + r1 = r.duplicate(); + r1.collapse(true); + sc = r1.parentElement(); + + r2 = r.duplicate(); + r2.collapse(false); + ec = r2.parentElement(); + + if (sc != ec) { + r1.move('character', 1); + sc = r1.parentElement(); + } + + if (sc == ec) { + r1 = r.duplicate(); + r1.moveToElementText(sc); + + if (r1.compareEndPoints('StartToStart', r) == 0 && r1.compareEndPoints('EndToEnd', r) == 0) + return re && re.test(sc.nodeName) ? null : sc; + } + } else { + function getParent(n) { + return dom.getParent(n, function(n) {return n.nodeType == 1;}); + }; + + sc = r.startContainer; + ec = r.endContainer; + so = r.startOffset; + eo = r.endOffset; + + if (!r.collapsed) { + if (sc == ec) { + if (so - eo < 2) { + if (sc.hasChildNodes()) { + sp = sc.childNodes[so]; + return re && re.test(sp.nodeName) ? null : sp; + } + } + } + } + + if (sc.nodeType != 3 || ec.nodeType != 3) + return null; + + if (so == 0) { + sp = getParent(sc); + + if (sp && sp.firstChild != sc) + sp = null; + } + + if (so == sc.nodeValue.length) { + e = sc.nextSibling; + + if (e && e.nodeType == 1) + sp = sc.nextSibling; + } + + if (eo == 0) { + e = ec.previousSibling; + + if (e && e.nodeType == 1) + ep = e; + } + + if (eo == ec.nodeValue.length) { + ep = getParent(ec); + + if (ep && ep.lastChild != ec) + ep = null; + } + + // Same element + if (sp == ep) + return re && sp && re.test(sp.nodeName) ? null : sp; + } + + return null; + }, + + InsertHorizontalRule : function() { + // Fix for Gecko
issue and IE bug rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + if (isGecko || isIE) + this.editor.selection.setContent('
'); + else + this.editor.getDoc().execCommand('InsertHorizontalRule', false, ''); + }, + + RemoveFormat : function() { + var t = this, ed = t.editor, s = ed.selection, b; + + // Safari breaks tables + if (isWebKit) + s.setContent(s.getContent({format : 'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g, ''), {format : 'raw'}); + else + ed.getDoc().execCommand('RemoveFormat', false, null); + + t.mceSetStyleInfo(0, {command : 'removeformat'}); + ed.addVisual(); + }, + + mceSetStyleInfo : function(u, v) { + var t = this, ed = t.editor, d = ed.getDoc(), dom = ed.dom, e, b, s = ed.selection, nn = v.wrapper || 'span', b = s.getBookmark(), re; + + function set(n, e) { + if (n.nodeType == 1) { + switch (v.command) { + case 'setattrib': + return dom.setAttrib(n, v.name, v.value); + + case 'setstyle': + return dom.setStyle(n, v.name, v.value); + + case 'removeformat': + return dom.setAttrib(n, 'class', ''); + } + } + }; + + // Setup regexp + re = ed.settings.merge_styles_invalid_parents; + if (tinymce.is(re, 'string')) + re = new RegExp(re, 'i'); + + // Set style info on selected element + if ((e = t.getSelectedElement()) && !ed.settings.force_span_wrappers) + set(e, 1); + else { + // Generate wrappers and set styles on them + d.execCommand('FontName', false, '__'); + each(isWebKit ? dom.select('span') : dom.select('font'), function(n) { + var sp, e; + + if (dom.getAttrib(n, 'face') == '__' || n.style.fontFamily === '__') { + sp = dom.create(nn, {mce_new : '1'}); + + set(sp); + + each (n.childNodes, function(n) { + sp.appendChild(n.cloneNode(true)); + }); + + dom.replace(sp, n); + } + }); + } + + // Remove wrappers inside new ones + each(dom.select(nn).reverse(), function(n) { + var p = n.parentNode; + + // Check if it's an old span in a new wrapper + if (!dom.getAttrib(n, 'mce_new')) { + // Find new wrapper + p = dom.getParent(n, function(n) { + return n.nodeType == 1 && dom.getAttrib(n, 'mce_new'); + }); + + if (p) + dom.remove(n, 1); + } + }); + + // Merge wrappers with parent wrappers + each(dom.select(nn).reverse(), function(n) { + var p = n.parentNode; + + if (!p || !dom.getAttrib(n, 'mce_new')) + return; + + if (ed.settings.force_span_wrappers && p.nodeName != 'SPAN') + return; + + // Has parent of the same type and only child + if (p.nodeName == nn.toUpperCase() && p.childNodes.length == 1) + return dom.remove(p, 1); + + // Has parent that is more suitable to have the class and only child + if (n.nodeType == 1 && (!re || !re.test(p.nodeName)) && p.childNodes.length == 1) { + set(p); // Set style info on parent instead + dom.setAttrib(n, 'class', ''); + } + }); + + // Remove empty wrappers + each(dom.select(nn).reverse(), function(n) { + if (dom.getAttrib(n, 'mce_new') || (dom.getAttribs(n).length <= 1 && n.className === '')) { + if (!dom.getAttrib(n, 'class') && !dom.getAttrib(n, 'style')) + return dom.remove(n, 1); + + dom.setAttrib(n, 'mce_new', ''); // Remove mce_new marker + } + }); + + s.moveToBookmark(b); + }, + + queryStateJustify : function(c, v) { + var ed = this.editor, n = ed.selection.getNode(), dom = ed.dom; + + if (n && n.nodeName == 'IMG') { + if (dom.getStyle(n, 'float') == v) + return 1; + + return n.parentNode.style.textAlign == v; + } + + n = dom.getParent(ed.selection.getStart(), function(n) { + return n.nodeType == 1 && n.style.textAlign; + }); + + if (v == 'full') + v = 'justify'; + + if (ed.settings.inline_styles) + return (n && n.style.textAlign == v); + + return this._queryState(c); + }, + + ForeColor : function(ui, v) { + var ed = this.editor; + + if (ed.settings.convert_fonts_to_spans) { + this._applyInlineStyle('span', {style : {color : v}}); + return; + } else + ed.getDoc().execCommand('ForeColor', false, v); + }, + + HiliteColor : function(ui, val) { + var t = this, ed = t.editor, d = ed.getDoc(); + + if (ed.settings.convert_fonts_to_spans) { + this._applyInlineStyle('span', {style : {backgroundColor : val}}); + return; + } + + function set(s) { + if (!isGecko) + return; + + try { + // Try new Gecko method + d.execCommand("styleWithCSS", 0, s); + } catch (ex) { + // Use old + d.execCommand("useCSS", 0, !s); + } + }; + + if (isGecko || isOpera) { + set(true); + d.execCommand('hilitecolor', false, val); + set(false); + } else + d.execCommand('BackColor', false, val); + }, + + Undo : function() { + var ed = this.editor; + + if (ed.settings.custom_undo_redo) { + ed.undoManager.undo(); + ed.nodeChanged(); + } else + ed.getDoc().execCommand('Undo', false, null); + }, + + Redo : function() { + var ed = this.editor; + + if (ed.settings.custom_undo_redo) { + ed.undoManager.redo(); + ed.nodeChanged(); + } else + ed.getDoc().execCommand('Redo', false, null); + }, + + FormatBlock : function(ui, val) { + var t = this, ed = t.editor, s = ed.selection, dom = ed.dom, bl, nb, b; + + function isBlock(n) { + return /^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName); + }; + + bl = dom.getParent(s.getNode(), function(n) { + return isBlock(n); + }); + + // IE has an issue where it removes the parent div if you change format on the paragrah in

Content

+ // FF and Opera doesn't change parent DIV elements if you switch format + if (bl) { + if ((isIE && isBlock(bl.parentNode)) || bl.nodeName == 'DIV') { + // Rename block element + nb = ed.dom.create(val); + + each(dom.getAttribs(bl), function(v) { + dom.setAttrib(nb, v.nodeName, dom.getAttrib(bl, v.nodeName)); + }); + + b = s.getBookmark(); + dom.replace(nb, bl, 1); + s.moveToBookmark(b); + ed.nodeChanged(); + return; + } + } + + val = ed.settings.forced_root_block ? (val || '

') : val; + + if (val.indexOf('<') == -1) + val = '<' + val + '>'; + + if (tinymce.isGecko) + val = val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi, '$1'); + + ed.getDoc().execCommand('FormatBlock', false, val); + }, + + mceCleanup : function() { + var ed = this.editor, s = ed.selection, b = s.getBookmark(); + ed.setContent(ed.getContent()); + s.moveToBookmark(b); + }, + + mceRemoveNode : function(ui, val) { + var ed = this.editor, s = ed.selection, b, n = val || s.getNode(); + + // Make sure that the body node isn't removed + if (n == ed.getBody()) + return; + + b = s.getBookmark(); + ed.dom.remove(n, 1); + s.moveToBookmark(b); + ed.nodeChanged(); + }, + + mceSelectNodeDepth : function(ui, val) { + var ed = this.editor, s = ed.selection, c = 0; + + ed.dom.getParent(s.getNode(), function(n) { + if (n.nodeType == 1 && c++ == val) { + s.select(n); + ed.nodeChanged(); + return false; + } + }, ed.getBody()); + }, + + mceSelectNode : function(u, v) { + this.editor.selection.select(v); + }, + + mceInsertContent : function(ui, val) { + this.editor.selection.setContent(val); + }, + + mceInsertRawHTML : function(ui, val) { + var ed = this.editor; + + ed.selection.setContent('tiny_mce_marker'); + ed.setContent(ed.getContent().replace(/tiny_mce_marker/g, val)); + }, + + mceRepaint : function() { + var s, b, e = this.editor; + + if (tinymce.isGecko) { + try { + s = e.selection; + b = s.getBookmark(true); + + if (s.getSel()) + s.getSel().selectAllChildren(e.getBody()); + + s.collapse(true); + s.moveToBookmark(b); + } catch (ex) { + // Ignore + } + } + }, + + queryStateUnderline : function() { + var ed = this.editor, n = ed.selection.getNode(); + + if (n && n.nodeName == 'A') + return false; + + return this._queryState('Underline'); + }, + + queryStateOutdent : function() { + var ed = this.editor, n; + + if (ed.settings.inline_styles) { + if ((n = ed.dom.getParent(ed.selection.getStart(), ed.dom.isBlock)) && parseInt(n.style.paddingLeft) > 0) + return true; + + if ((n = ed.dom.getParent(ed.selection.getEnd(), ed.dom.isBlock)) && parseInt(n.style.paddingLeft) > 0) + return true; + } + + return this.queryStateInsertUnorderedList() || this.queryStateInsertOrderedList() || (!ed.settings.inline_styles && !!ed.dom.getParent(ed.selection.getNode(), 'BLOCKQUOTE')); + }, + + queryStateInsertUnorderedList : function() { + return this.editor.dom.getParent(this.editor.selection.getNode(), 'UL'); + }, + + queryStateInsertOrderedList : function() { + return this.editor.dom.getParent(this.editor.selection.getNode(), 'OL'); + }, + + queryStatemceBlockQuote : function() { + return !!this.editor.dom.getParent(this.editor.selection.getStart(), function(n) {return n.nodeName === 'BLOCKQUOTE';}); + }, + + mceBlockQuote : function() { + var t = this, ed = t.editor, s = ed.selection, dom = ed.dom, sb, eb, n, bm, bq, r, bq2, i, nl; + + function getBQ(e) { + return dom.getParent(e, function(n) {return n.nodeName === 'BLOCKQUOTE';}); + }; + + // Get start/end block + sb = dom.getParent(s.getStart(), isBlock); + eb = dom.getParent(s.getEnd(), isBlock); + + // Remove blockquote(s) + if (bq = getBQ(sb)) { + if (sb != eb || sb.childNodes.length > 1 || (sb.childNodes.length == 1 && sb.firstChild.nodeName != 'BR')) + bm = s.getBookmark(); + + // Move all elements after the end block into new bq + if (getBQ(eb)) { + bq2 = bq.cloneNode(false); + + while (n = eb.nextSibling) + bq2.appendChild(n.parentNode.removeChild(n)); + } + + // Add new bq after + if (bq2) + dom.insertAfter(bq2, bq); + + // Move all selected blocks after the current bq + nl = t._getSelectedBlocks(sb, eb); + for (i = nl.length - 1; i >= 0; i--) { + dom.insertAfter(nl[i], bq); + } + + // Empty bq, then remove it + if (/^\s*$/.test(bq.innerHTML)) + dom.remove(bq, 1); // Keep children so boomark restoration works correctly + + // Empty bq, then remote it + if (bq2 && /^\s*$/.test(bq2.innerHTML)) + dom.remove(bq2, 1); // Keep children so boomark restoration works correctly + + if (!bm) { + // Move caret inside empty block element + if (!isIE) { + r = ed.getDoc().createRange(); + r.setStart(sb, 0); + r.setEnd(sb, 0); + s.setRng(r); + } else { + s.select(sb); + s.collapse(0); + + // IE misses the empty block some times element so we must move back the caret + if (dom.getParent(s.getStart(), isBlock) != sb) { + r = s.getRng(); + r.move('character', -1); + r.select(); + } + } + } else + t.editor.selection.moveToBookmark(bm); + + return; + } + + // Since IE can start with a totally empty document we need to add the first bq and paragraph + if (isIE && !sb && !eb) { + t.editor.getDoc().execCommand('Indent'); + n = getBQ(s.getNode()); + n.style.margin = n.dir = ''; // IE adds margin and dir to bq + return; + } + + if (!sb || !eb) + return; + + // If empty paragraph node then do not use bookmark + if (sb != eb || sb.childNodes.length > 1 || (sb.childNodes.length == 1 && sb.firstChild.nodeName != 'BR')) + bm = s.getBookmark(); + + // Move selected block elements into a bq + each(t._getSelectedBlocks(getBQ(s.getStart()), getBQ(s.getEnd())), function(e) { + // Found existing BQ add to this one + if (e.nodeName == 'BLOCKQUOTE' && !bq) { + bq = e; + return; + } + + // No BQ found, create one + if (!bq) { + bq = dom.create('blockquote'); + e.parentNode.insertBefore(bq, e); + } + + // Add children from existing BQ + if (e.nodeName == 'BLOCKQUOTE' && bq) { + n = e.firstChild; + + while (n) { + bq.appendChild(n.cloneNode(true)); + n = n.nextSibling; + } + + dom.remove(e); + return; + } + + // Add non BQ element to BQ + bq.appendChild(dom.remove(e)); + }); + + if (!bm) { + // Move caret inside empty block element + if (!isIE) { + r = ed.getDoc().createRange(); + r.setStart(sb, 0); + r.setEnd(sb, 0); + s.setRng(r); + } else { + s.select(sb); + s.collapse(1); + } + } else + s.moveToBookmark(bm); + }, + + _applyInlineStyle : function(na, at, op) { + var t = this, ed = t.editor, dom = ed.dom, bm, lo = {}, kh; + + na = na.toUpperCase(); + + if (op && op.check_classes && at['class']) + op.check_classes.push(at['class']); + + function replaceFonts() { + var bm; + + each(dom.select(tinymce.isWebKit && !tinymce.isAir ? 'span' : 'font'), function(n) { + if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') { + if (!bm) + bm = ed.selection.getBookmark(); + + at._mce_new = '1'; + dom.replace(dom.create(na, at), n, 1); + } + }); + + // Remove redundant elements + each(dom.select(na), function(n) { + if (n.getAttribute('_mce_new')) { + function removeStyle(n) { + if (n.nodeType == 1) { + each(at.style, function(v, k) { + dom.setStyle(n, k, ''); + }); + + // Remove spans with the same class or marked classes + if (at['class'] && n.className && op) { + each(op.check_classes, function(c) { + if (dom.hasClass(n, c)) + dom.removeClass(n, c); + }); + } + } + }; + + // Remove specified style information from child elements + each(dom.select(na, n), removeStyle); + + // Remove the specified style information on parent if current node is only child (IE) + if (n.parentNode && n.parentNode.nodeType == 1 && n.parentNode.childNodes.length == 1) + removeStyle(n.parentNode); + + // Remove the child elements style info if a parent already has it + dom.getParent(n.parentNode, function(pn) { + if (pn.nodeType == 1) { + if (at.style) { + each(at.style, function(v, k) { + var sv; + + if (!lo[k] && (sv = dom.getStyle(pn, k))) { + if (sv === v) + dom.setStyle(n, k, ''); + + lo[k] = 1; + } + }); + } + + // Remove spans with the same class or marked classes + if (at['class'] && pn.className && op) { + each(op.check_classes, function(c) { + if (dom.hasClass(pn, c)) + dom.removeClass(n, c); + }); + } + } + + return false; + }); + + n.removeAttribute('_mce_new'); + } + }); + + // Remove empty span elements + each(dom.select(na).reverse(), function(n) { + var c = 0; + + // Check if there is any attributes + each(dom.getAttribs(n), function(an) { + if (an.nodeName.substring(0, 1) != '_' && dom.getAttrib(n, an.nodeName) != '') { + //console.log(dom.getOuterHTML(n), dom.getAttrib(n, an.nodeName)); + c++; + } + }); + + // No attributes then remove the element and keep the children + if (c == 0) + dom.remove(n, 1); + }); + + ed.selection.moveToBookmark(bm); + + return !!bm; + }; + + // Create inline elements + ed.focus(); + ed.getDoc().execCommand('FontName', false, 'mceinline'); + replaceFonts(); + + if (kh = t._applyInlineStyle.keyhandler) { + ed.onKeyUp.remove(kh); + ed.onKeyPress.remove(kh); + ed.onKeyDown.remove(kh); + ed.onSetContent.remove(t._applyInlineStyle.chandler); + } + + if (ed.selection.isCollapsed()) { + // Start collecting styles + t._pendingStyles = tinymce.extend(t._pendingStyles || {}, at.style); + + t._applyInlineStyle.chandler = ed.onSetContent.add(function() { + delete t._pendingStyles; + }); + + t._applyInlineStyle.keyhandler = kh = function(e) { + // Use pending styles + if (t._pendingStyles) { + at.style = t._pendingStyles; + delete t._pendingStyles; + } + + if (replaceFonts()) { + ed.onKeyDown.remove(t._applyInlineStyle.keyhandler); + ed.onKeyPress.remove(t._applyInlineStyle.keyhandler); + } + + if (e.type == 'keyup') + ed.onKeyUp.remove(t._applyInlineStyle.keyhandler); + }; + + ed.onKeyDown.add(kh); + ed.onKeyPress.add(kh); + ed.onKeyUp.add(kh); + } else + t._pendingStyles = 0; + }, + +/* + _mceBlockQuote : function() { + var t = this, s = t.editor.selection, b = s.getBookmark(), bq, dom = t.editor.dom; + + function findBQ(e) { + return dom.getParent(e, function(n) {return n.nodeName === 'BLOCKQUOTE';}); + }; + + // Remove blockquote(s) + if (findBQ(s.getStart())) { + each(t._getSelectedBlocks(findBQ(s.getStart()), findBQ(s.getEnd())), function(e) { + // Found BQ lets remove it + if (e.nodeName == 'BLOCKQUOTE') + dom.remove(e, 1); + }); + + t.editor.selection.moveToBookmark(b); + return; + } + + each(t._getSelectedBlocks(findBQ(s.getStart()), findBQ(s.getEnd())), function(e) { + var n; + + // Found existing BQ add to this one + if (e.nodeName == 'BLOCKQUOTE' && !bq) { + bq = e; + return; + } + + // No BQ found, create one + if (!bq) { + bq = dom.create('blockquote'); + e.parentNode.insertBefore(bq, e); + } + + // Add children from existing BQ + if (e.nodeName == 'BLOCKQUOTE' && bq) { + n = e.firstChild; + + while (n) { + bq.appendChild(n.cloneNode(true)); + n = n.nextSibling; + } + + dom.remove(e); + + return; + } + + // Add non BQ element to BQ + bq.appendChild(dom.remove(e)); + }); + + t.editor.selection.moveToBookmark(b); + }, +*/ + _getSelectedBlocks : function(st, en) { + var ed = this.editor, dom = ed.dom, s = ed.selection, sb, eb, n, bl = []; + + sb = dom.getParent(st || s.getStart(), isBlock); + eb = dom.getParent(en || s.getEnd(), isBlock); + + if (sb) + bl.push(sb); + + if (sb && eb && sb != eb) { + n = sb; + + while ((n = n.nextSibling) && n != eb) { + if (isBlock(n)) + bl.push(n); + } + } + + if (eb && sb != eb) + bl.push(eb); + + return bl; + } + }); +})(); + + +/* file:jscripts/tiny_mce/classes/UndoManager.js */ + +tinymce.create('tinymce.UndoManager', { + index : 0, + data : null, + typing : 0, + + UndoManager : function(ed) { + var t = this, Dispatcher = tinymce.util.Dispatcher; + + t.editor = ed; + t.data = []; + t.onAdd = new Dispatcher(this); + t.onUndo = new Dispatcher(this); + t.onRedo = new Dispatcher(this); + }, + + add : function(l) { + var t = this, i, ed = t.editor, b, s = ed.settings, la; + + l = l || {}; + l.content = l.content || ed.getContent({format : 'raw', no_events : 1}); + + // Add undo level if needed + l.content = l.content.replace(/^\s*|\s*$/g, ''); + la = t.data[t.index > 0 && (t.index == 0 || t.index == t.data.length) ? t.index - 1 : t.index]; + if (!l.initial && la && l.content == la.content) + return null; + + // Time to compress + if (s.custom_undo_redo_levels) { + if (t.data.length > s.custom_undo_redo_levels) { + for (i = 0; i < t.data.length - 1; i++) + t.data[i] = t.data[i + 1]; + + t.data.length--; + t.index = t.data.length; + } + } + + if (s.custom_undo_redo_restore_selection && !l.initial) + l.bookmark = b = l.bookmark || ed.selection.getBookmark(); + + if (t.index < t.data.length) + t.index++; + + // Only initial marked undo levels should be allowed as first item + // This to workaround a bug with Firefox and the blur event + if (t.data.length === 0 && !l.initial) + return null; + + // Add level + t.data.length = t.index + 1; + t.data[t.index++] = l; + + if (l.initial) + t.index = 0; + + // Set initial bookmark use first real undo level + if (t.data.length == 2 && t.data[0].initial) + t.data[0].bookmark = b; + + t.onAdd.dispatch(t, l); + ed.isNotDirty = 0; + + //console.dir(t.data); + + return l; + }, + + undo : function() { + var t = this, ed = t.editor, l = l, i; + + if (t.typing) { + t.add(); + t.typing = 0; + } + + if (t.index > 0) { + // If undo on last index then take snapshot + if (t.index == t.data.length && t.index > 1) { + i = t.index; + t.typing = 0; + + if (!t.add()) + t.index = i; + + --t.index; + } + + l = t.data[--t.index]; + ed.setContent(l.content, {format : 'raw'}); + ed.selection.moveToBookmark(l.bookmark); + + t.onUndo.dispatch(t, l); + } + + return l; + }, + + redo : function() { + var t = this, ed = t.editor, l = null; + + if (t.index < t.data.length - 1) { + l = t.data[++t.index]; + ed.setContent(l.content, {format : 'raw'}); + ed.selection.moveToBookmark(l.bookmark); + + t.onRedo.dispatch(t, l); + } + + return l; + }, + + clear : function() { + var t = this; + + t.data = []; + t.index = 0; + t.typing = 0; + t.add({initial : true}); + }, + + hasUndo : function() { + return this.index != 0 || this.typing; + }, + + hasRedo : function() { + return this.index < this.data.length - 1; + } + + }); +/* file:jscripts/tiny_mce/classes/ForceBlocks.js */ + +(function() { + // Shorten names + var Event, isIE, isGecko, isOpera, each, extend; + + Event = tinymce.dom.Event; + isIE = tinymce.isIE; + isGecko = tinymce.isGecko; + isOpera = tinymce.isOpera; + each = tinymce.each; + extend = tinymce.extend; + + tinymce.create('tinymce.ForceBlocks', { + ForceBlocks : function(ed) { + var t = this, s = ed.settings, elm; + + t.editor = ed; + t.dom = ed.dom; + elm = (s.forced_root_block || 'p').toLowerCase(); + s.element = elm.toUpperCase(); + + ed.onPreInit.add(t.setup, t); + + t.reOpera = new RegExp('(\\u00a0| | )<\/' + elm + '>', 'gi'); + t.rePadd = new RegExp(']+)><\\\/p>|]+)\\\/>|]+)>\\s+<\\\/p>|

<\\\/p>||

\\s+<\\\/p>'.replace(/p/g, elm), 'gi'); + t.reNbsp2BR1 = new RegExp(']+)>[\\s\\u00a0]+<\\\/p>|

[\\s\\u00a0]+<\\\/p>'.replace(/p/g, elm), 'gi'); + t.reNbsp2BR2 = new RegExp(']+)>( | )<\\\/p>|

( | )<\\\/p>'.replace(/p/g, elm), 'gi'); + t.reBR2Nbsp = new RegExp(']+)>\\s*
\\s*<\\\/p>|

\\s*
\\s*<\\\/p>'.replace(/p/g, elm), 'gi'); + t.reTrailBr = new RegExp('\\s*
\\s*<\\\/p>'.replace(/p/g, elm), 'gi'); + + function padd(ed, o) { + if (isOpera) + o.content = o.content.replace(t.reOpera, ''); + + o.content = o.content.replace(t.rePadd, '<' + elm + '$1$2$3$4$5$6>\u00a0'); + + if (!isIE && !isOpera && o.set) { + // Use   instead of BR in padded paragraphs + o.content = o.content.replace(t.reNbsp2BR1, '<' + elm + '$1$2>
'); + o.content = o.content.replace(t.reNbsp2BR2, '<' + elm + '$1$2>
'); + } else { + o.content = o.content.replace(t.reBR2Nbsp, '<' + elm + '$1$2>\u00a0'); + o.content = o.content.replace(t.reTrailBr, ''); + } + }; + + ed.onBeforeSetContent.add(padd); + ed.onPostProcess.add(padd); + + if (s.forced_root_block) { + ed.onInit.add(t.forceRoots, t); + ed.onSetContent.add(t.forceRoots, t); + ed.onBeforeGetContent.add(t.forceRoots, t); + } + }, + + setup : function() { + var t = this, ed = t.editor, s = ed.settings; + + // Force root blocks when typing and when getting output + if (s.forced_root_block) { + ed.onKeyUp.add(t.forceRoots, t); + ed.onPreProcess.add(t.forceRoots, t); + } + + if (s.force_br_newlines) { + // Force IE to produce BRs on enter + if (isIE) { + ed.onKeyPress.add(function(ed, e) { + var n, s = ed.selection; + + if (e.keyCode == 13 && s.getNode().nodeName != 'LI') { + s.setContent('
', {format : 'raw'}); + n = ed.dom.get('__'); + n.removeAttribute('id'); + s.select(n); + s.collapse(); + return Event.cancel(e); + } + }); + } + + return; + } + + if (!isIE && s.force_p_newlines) { +/* ed.onPreProcess.add(function(ed, o) { + each(ed.dom.select('br', o.node), function(n) { + var p = n.parentNode; + + // Replace


with

 

+ if (p && p.nodeName == 'p' && (p.childNodes.length == 1 || p.lastChild == n)) { + p.replaceChild(ed.getDoc().createTextNode('\u00a0'), n); + } + }); + });*/ + + ed.onKeyPress.add(function(ed, e) { + if (e.keyCode == 13 && !e.shiftKey) { + if (!t.insertPara(e)) + Event.cancel(e); + } + }); + + if (isGecko) { + ed.onKeyDown.add(function(ed, e) { + if ((e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) + t.backspaceDelete(e, e.keyCode == 8); + }); + } + } + + function ren(rn, na) { + var ne = ed.dom.create(na); + + each(rn.attributes, function(a) { + if (a.specified && a.nodeValue) + ne.setAttribute(a.nodeName.toLowerCase(), a.nodeValue); + }); + + each(rn.childNodes, function(n) { + ne.appendChild(n.cloneNode(true)); + }); + + rn.parentNode.replaceChild(ne, rn); + + return ne; + }; + + // Replaces IE:s auto generated paragraphs with the specified element name + if (isIE && s.element != 'P') { + ed.onKeyPress.add(function(ed, e) { + t.lastElm = ed.selection.getNode().nodeName; + }); + + ed.onKeyUp.add(function(ed, e) { + var bl, sel = ed.selection, n = sel.getNode(), b = ed.getBody(); + + if (b.childNodes.length === 1 && n.nodeName == 'P') { + n = ren(n, s.element); + sel.select(n); + sel.collapse(); + ed.nodeChanged(); + } else if (e.keyCode == 13 && !e.shiftKey && t.lastElm != 'P') { + bl = ed.dom.getParent(n, 'P'); + + if (bl) { + ren(bl, s.element); + ed.nodeChanged(); + } + } + }); + } + }, + + find : function(n, t, s) { + var ed = this.editor, w = ed.getDoc().createTreeWalker(n, 4, null, false), c = -1; + + while (n = w.nextNode()) { + c++; + + // Index by node + if (t == 0 && n == s) + return c; + + // Node by index + if (t == 1 && c == s) + return n; + } + + return -1; + }, + + forceRoots : function(ed, e) { + var t = this, ed = t.editor, b = ed.getBody(), d = ed.getDoc(), se = ed.selection, s = se.getSel(), r = se.getRng(), si = -2, ei, so, eo, tr, c = -0xFFFFFF; + var nx, bl, bp, sp, le, nl = b.childNodes, i, n, eid; + + // Fix for bug #1863847 + //if (e && e.keyCode == 13) + // return true; + + // Wrap non blocks into blocks + for (i = nl.length - 1; i >= 0; i--) { + nx = nl[i]; + + // Is text or non block element + if (nx.nodeType == 3 || (!t.dom.isBlock(nx) && nx.nodeType != 8)) { + if (!bl) { + // Create new block but ignore whitespace + if (nx.nodeType != 3 || /[^\s]/g.test(nx.nodeValue)) { + // Store selection + if (si == -2 && r) { + if (!isIE) { + // If selection is element then mark it + if (r.startContainer.nodeType == 1 && (n = r.startContainer.childNodes[r.startOffset]) && n.nodeType == 1) { + // Save the id of the selected element + eid = n.getAttribute("id"); + n.setAttribute("id", "__mce"); + } else { + // If element is inside body, might not be the case in contentEdiable mode + if (ed.dom.getParent(r.startContainer, function(e) {return e === b;})) { + so = r.startOffset; + eo = r.endOffset; + si = t.find(b, 0, r.startContainer); + ei = t.find(b, 0, r.endContainer); + } + } + } else { + tr = d.body.createTextRange(); + tr.moveToElementText(b); + tr.collapse(1); + bp = tr.move('character', c) * -1; + + tr = r.duplicate(); + tr.collapse(1); + sp = tr.move('character', c) * -1; + + tr = r.duplicate(); + tr.collapse(0); + le = (tr.move('character', c) * -1) - sp; + + si = sp - bp; + ei = le; + } + } + + bl = ed.dom.create(ed.settings.forced_root_block); + bl.appendChild(nx.cloneNode(1)); + nx.parentNode.replaceChild(bl, nx); + } + } else { + if (bl.hasChildNodes()) + bl.insertBefore(nx, bl.firstChild); + else + bl.appendChild(nx); + } + } else + bl = null; // Time to create new block + } + + // Restore selection + if (si != -2) { + if (!isIE) { + bl = b.getElementsByTagName(ed.settings.element)[0]; + r = d.createRange(); + + // Select last location or generated block + if (si != -1) + r.setStart(t.find(b, 1, si), so); + else + r.setStart(bl, 0); + + // Select last location or generated block + if (ei != -1) + r.setEnd(t.find(b, 1, ei), eo); + else + r.setEnd(bl, 0); + + if (s) { + s.removeAllRanges(); + s.addRange(r); + } + } else { + try { + r = s.createRange(); + r.moveToElementText(b); + r.collapse(1); + r.moveStart('character', si); + r.moveEnd('character', ei); + r.select(); + } catch (ex) { + // Ignore + } + } + } else if (!isIE && (n = ed.dom.get('__mce'))) { + // Restore the id of the selected element + if (eid) + n.setAttribute('id', eid); + else + n.removeAttribute('id'); + + // Move caret before selected element + r = d.createRange(); + r.setStartBefore(n); + r.setEndBefore(n); + se.setRng(r); + } + }, + + getParentBlock : function(n) { + var d = this.dom; + + return d.getParent(n, d.isBlock); + }, + + insertPara : function(e) { + var t = this, ed = t.editor, dom = ed.dom, d = ed.getDoc(), se = ed.settings, s = ed.selection.getSel(), r = s.getRangeAt(0), b = d.body; + var rb, ra, dir, sn, so, en, eo, sb, eb, bn, bef, aft, sc, ec, n, vp = dom.getViewPort(ed.getWin()), y, ch, car; + + function isEmpty(n) { + n = n.innerHTML; + n = n.replace(/<(img|hr|table)/gi, '-'); // Keep these convert them to - chars + n = n.replace(/<[^>]+>/g, ''); // Remove all tags + + return n.replace(/[ \t\r\n]+/g, '') == ''; + }; + + // If root blocks are forced then use Operas default behavior since it's really good +// Removed due to bug: #1853816 +// if (se.forced_root_block && isOpera) +// return true; + + // Setup before range + rb = d.createRange(); + + // If is before the first block element and in body, then move it into first block element + rb.setStart(s.anchorNode, s.anchorOffset); + rb.collapse(true); + + // Setup after range + ra = d.createRange(); + + // If is before the first block element and in body, then move it into first block element + ra.setStart(s.focusNode, s.focusOffset); + ra.collapse(true); + + // Setup start/end points + dir = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; + sn = dir ? s.anchorNode : s.focusNode; + so = dir ? s.anchorOffset : s.focusOffset; + en = dir ? s.focusNode : s.anchorNode; + eo = dir ? s.focusOffset : s.anchorOffset; + + // If selection is in empty table cell + if (sn === en && /^(TD|TH)$/.test(sn.nodeName)) { + dom.remove(sn.firstChild); // Remove BR + + // Create two new block elements + ed.dom.add(sn, se.element, null, '
'); + aft = ed.dom.add(sn, se.element, null, '
'); + + // Move caret into the last one + r = d.createRange(); + r.selectNodeContents(aft); + r.collapse(1); + ed.selection.setRng(r); + + return false; + } + + // If the caret is in an invalid location in FF we need to move it into the first block + if (sn == b && en == b && b.firstChild && ed.dom.isBlock(b.firstChild)) { + sn = en = sn.firstChild; + so = eo = 0; + rb = d.createRange(); + rb.setStart(sn, 0); + ra = d.createRange(); + ra.setStart(en, 0); + } + + // Never use body as start or end node + sn = sn.nodeName == "HTML" ? d.body : sn; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes + sn = sn.nodeName == "BODY" ? sn.firstChild : sn; + en = en.nodeName == "HTML" ? d.body : en; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes + en = en.nodeName == "BODY" ? en.firstChild : en; + + // Get start and end blocks + sb = t.getParentBlock(sn); + eb = t.getParentBlock(en); + bn = sb ? sb.nodeName : se.element; // Get block name to create + + // Return inside list use default browser behavior + if (t.dom.getParent(sb, function(n) { return /OL|UL|PRE/.test(n.nodeName); })) + return true; + + // If caption or absolute layers then always generate new blocks within + if (sb && (sb.nodeName == 'CAPTION' || /absolute|relative|static/gi.test(sb.style.position))) { + bn = se.element; + sb = null; + } + + // If caption or absolute layers then always generate new blocks within + if (eb && (eb.nodeName == 'CAPTION' || /absolute|relative|static/gi.test(eb.style.position))) { + bn = se.element; + eb = null; + } + + // Use P instead + if (/(TD|TABLE|TH|CAPTION)/.test(bn) || (sb && bn == "DIV" && /left|right/gi.test(sb.style.cssFloat))) { + bn = se.element; + sb = eb = null; + } + + // Setup new before and after blocks + bef = (sb && sb.nodeName == bn) ? sb.cloneNode(0) : ed.dom.create(bn); + aft = (eb && eb.nodeName == bn) ? eb.cloneNode(0) : ed.dom.create(bn); + + // Remove id from after clone + aft.removeAttribute('id'); + + // Is header and cursor is at the end, then force paragraph under + if (/^(H[1-6])$/.test(bn) && sn.nodeValue && so == sn.nodeValue.length) + aft = ed.dom.create(se.element); + + // Find start chop node + n = sc = sn; + do { + if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) + break; + + sc = n; + } while ((n = n.previousSibling ? n.previousSibling : n.parentNode)); + + // Find end chop node + n = ec = en; + do { + if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) + break; + + ec = n; + } while ((n = n.nextSibling ? n.nextSibling : n.parentNode)); + + // Place first chop part into before block element + if (sc.nodeName == bn) + rb.setStart(sc, 0); + else + rb.setStartBefore(sc); + + rb.setEnd(sn, so); + bef.appendChild(rb.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari + + // Place secnd chop part within new block element + try { + ra.setEndAfter(ec); + } catch(ex) { + //console.debug(s.focusNode, s.focusOffset); + } + + ra.setStart(en, eo); + aft.appendChild(ra.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari + + // Create range around everything + r = d.createRange(); + if (!sc.previousSibling && sc.parentNode.nodeName == bn) { + r.setStartBefore(sc.parentNode); + } else { + if (rb.startContainer.nodeName == bn && rb.startOffset == 0) + r.setStartBefore(rb.startContainer); + else + r.setStart(rb.startContainer, rb.startOffset); + } + + if (!ec.nextSibling && ec.parentNode.nodeName == bn) + r.setEndAfter(ec.parentNode); + else + r.setEnd(ra.endContainer, ra.endOffset); + + // Delete and replace it with new block elements + r.deleteContents(); + + if (isOpera) + ed.getWin().scrollTo(0, vp.y); + + // Never wrap blocks in blocks + if (bef.firstChild && bef.firstChild.nodeName == bn) + bef.innerHTML = bef.firstChild.innerHTML; + + if (aft.firstChild && aft.firstChild.nodeName == bn) + aft.innerHTML = aft.firstChild.innerHTML; + + // Padd empty blocks + if (isEmpty(bef)) + bef.innerHTML = '
'; + + function appendStyles(e, en) { + var nl = [], nn, n, i; + + e.innerHTML = ''; + + // Make clones of style elements + if (se.keep_styles) { + n = en; + do { + // We only want style specific elements + if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)) { + nn = n.cloneNode(false); + dom.setAttrib(nn, 'id', ''); // Remove ID since it needs to be unique + nl.push(nn); + } + } while (n = n.parentNode); + } + + // Append style elements to aft + if (nl.length > 0) { + for (i = nl.length - 1, nn = e; i >= 0; i--) + nn = nn.appendChild(nl[i]); + + // Padd most inner style element + nl[0].innerHTML = isOpera ? ' ' : '
'; // Extra space for Opera so that the caret can move there + return nl[0]; // Move caret to most inner element + } else + e.innerHTML = isOpera ? ' ' : '
'; // Extra space for Opera so that the caret can move there + }; + + // Fill empty afterblook with current style + if (isEmpty(aft)) + car = appendStyles(aft, en); + + // Opera needs this one backwards for older versions + if (isOpera && parseFloat(opera.version()) < 9.5) { + r.insertNode(bef); + r.insertNode(aft); + } else { + r.insertNode(aft); + r.insertNode(bef); + } + + // Normalize + aft.normalize(); + bef.normalize(); + + function first(n) { + return d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false).nextNode() || n; + }; + + // Move cursor and scroll into view + r = d.createRange(); + r.selectNodeContents(isGecko ? first(car || aft) : car || aft); + r.collapse(1); + s.removeAllRanges(); + s.addRange(r); + + // scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs + y = ed.dom.getPos(aft).y; + ch = aft.clientHeight; + + // Is element within viewport + if (y < vp.y || y + ch > vp.y + vp.h) { + ed.getWin().scrollTo(0, y < vp.y ? y : y - vp.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks + //console.debug('SCROLL!', 'vp.y: ' + vp.y, 'y' + y, 'vp.h' + vp.h, 'clientHeight' + aft.clientHeight, 'yyy: ' + (y < vp.y ? y : y - vp.h + aft.clientHeight)); + } + + return false; + }, + + backspaceDelete : function(e, bs) { + var t = this, ed = t.editor, b = ed.getBody(), n, se = ed.selection, r = se.getRng(), sc = r.startContainer, n, w, tn; + + // The caret sometimes gets stuck in Gecko if you delete empty paragraphs + // This workaround removes the element by hand and moves the caret to the previous element + if (sc && ed.dom.isBlock(sc) && !/^(TD|TH)$/.test(sc.nodeName) && bs) { + if (sc.childNodes.length == 0 || (sc.childNodes.length == 1 && sc.firstChild.nodeName == 'BR')) { + // Find previous block element + n = sc; + while ((n = n.previousSibling) && !ed.dom.isBlock(n)) ; + + if (n) { + if (sc != b.firstChild) { + // Find last text node + w = ed.dom.doc.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + while (tn = w.nextNode()) + n = tn; + + // Place caret at the end of last text node + r = ed.getDoc().createRange(); + r.setStart(n, n.nodeValue ? n.nodeValue.length : 0); + r.setEnd(n, n.nodeValue ? n.nodeValue.length : 0); + se.setRng(r); + + // Remove the target container + ed.dom.remove(sc); + } + + return Event.cancel(e); + } + } + } + + // Gecko generates BR elements here and there, we don't like those so lets remove them + function handler(e) { + var pr; + + e = e.target; + + // A new BR was created in a block element, remove it + if (e && e.parentNode && e.nodeName == 'BR' && (n = t.getParentBlock(e))) { + pr = e.previousSibling; + + Event.remove(b, 'DOMNodeInserted', handler); + + // Is there whitespace at the end of the node before then we might need the pesky BR + // to place the caret at a correct location see bug: #2013943 + if (pr && pr.nodeType == 3 && /\s+$/.test(pr.nodeValue)) + return; + + // Only remove BR elements that got inserted in the middle of the text + if (e.previousSibling || e.nextSibling) + ed.dom.remove(e); + } + }; + + // Listen for new nodes + Event._add(b, 'DOMNodeInserted', handler); + + // Remove listener + window.setTimeout(function() { + Event._remove(b, 'DOMNodeInserted', handler); + }, 1); + } + }); +})(); + +/* file:jscripts/tiny_mce/classes/ControlManager.js */ + +(function() { + // Shorten names + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend; + + tinymce.create('tinymce.ControlManager', { + ControlManager : function(ed, s) { + var t = this, i; + + s = s || {}; + t.editor = ed; + t.controls = {}; + t.onAdd = new tinymce.util.Dispatcher(t); + t.onPostRender = new tinymce.util.Dispatcher(t); + t.prefix = s.prefix || ed.id + '_'; + t._cls = {}; + + t.onPostRender.add(function() { + each(t.controls, function(c) { + c.postRender(); + }); + }); + }, + + get : function(id) { + return this.controls[this.prefix + id] || this.controls[id]; + }, + + setActive : function(id, s) { + var c = null; + + if (c = this.get(id)) + c.setActive(s); + + return c; + }, + + setDisabled : function(id, s) { + var c = null; + + if (c = this.get(id)) + c.setDisabled(s); + + return c; + }, + + add : function(c) { + var t = this; + + if (c) { + t.controls[c.id] = c; + t.onAdd.dispatch(c, t); + } + + return c; + }, + + createControl : function(n) { + var c, t = this, ed = t.editor; + + each(ed.plugins, function(p) { + if (p.createControl) { + c = p.createControl(n, t); + + if (c) + return false; + } + }); + + switch (n) { + case "|": + case "separator": + return t.createSeparator(); + } + + if (!c && ed.buttons && (c = ed.buttons[n])) + return t.createButton(n, c); + + return t.add(c); + }, + + createDropMenu : function(id, s, cc) { + var t = this, ed = t.editor, c, bm, v, cls; + + s = extend({ + 'class' : 'mceDropDown', + constrain : ed.settings.constrain_menus + }, s); + + s['class'] = s['class'] + ' ' + ed.getParam('skin') + 'Skin'; + if (v = ed.getParam('skin_variant')) + s['class'] += ' ' + ed.getParam('skin') + 'Skin' + v.substring(0, 1).toUpperCase() + v.substring(1); + + id = t.prefix + id; + cls = cc || t._cls.dropmenu || tinymce.ui.DropMenu; + c = t.controls[id] = new cls(id, s); + c.onAddItem.add(function(c, o) { + var s = o.settings; + + s.title = ed.getLang(s.title, s.title); + + if (!s.onclick) { + s.onclick = function(v) { + ed.execCommand(s.cmd, s.ui || false, s.value); + }; + } + }); + + ed.onRemove.add(function() { + c.destroy(); + }); + + // Fix for bug #1897785, #1898007 + if (tinymce.isIE) { + c.onShowMenu.add(function() { + bm = ed.selection.getBookmark(1); + }); + + c.onHideMenu.add(function() { + if (bm) + ed.selection.moveToBookmark(bm); + }); + } + + return t.add(c); + }, + + createListBox : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + + if (ed.settings.use_native_selects) + c = new tinymce.ui.NativeListBox(id, s); + else { + cls = cc || t._cls.listbox || tinymce.ui.ListBox; + c = new cls(id, s); + } + + t.controls[id] = c; + + // Fix focus problem in Safari + if (tinymce.isWebKit) { + c.onPostRender.add(function(c, n) { + // Store bookmark on mousedown + Event.add(n, 'mousedown', function() { + ed.bookmark = ed.selection.getBookmark('simple'); + }); + + // Restore on focus, since it might be lost + Event.add(n, 'focus', function() { + ed.selection.moveToBookmark(ed.bookmark); + ed.bookmark = null; + }); + }); + } + + if (c.hideMenu) + ed.onMouseDown.add(c.hideMenu, c); + + return t.add(c); + }, + + createButton : function(id, s, cc) { + var t = this, ed = t.editor, o, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.label = ed.translate(s.label); + s.scope = s.scope || ed; + + if (!s.onclick && !s.menu_button) { + s.onclick = function() { + ed.execCommand(s.cmd, s.ui || false, s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + unavailable_prefix : ed.getLang('unavailable', ''), + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + + if (s.menu_button) { + cls = cc || t._cls.menubutton || tinymce.ui.MenuButton; + c = new cls(id, s); + ed.onMouseDown.add(c.hideMenu, c); + } else { + cls = t._cls.button || tinymce.ui.Button; + c = new cls(id, s); + } + + return t.add(c); + }, + + createMenuButton : function(id, s, cc) { + s = s || {}; + s.menu_button = 1; + + return this.createButton(id, s, cc); + }, + + createSplitButton : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onclick) { + s.onclick = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + scope : s.scope, + control_manager : t + }, s); + + id = t.prefix + id; + cls = cc || t._cls.splitbutton || tinymce.ui.SplitButton; + c = t.add(new cls(id, s)); + ed.onMouseDown.add(c.hideMenu, c); + + return c; + }, + + createColorSplitButton : function(id, s, cc) { + var t = this, ed = t.editor, cmd, c, cls, bm; + + if (t.get(id)) + return null; + + s.title = ed.translate(s.title); + s.scope = s.scope || ed; + + if (!s.onclick) { + s.onclick = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + if (!s.onselect) { + s.onselect = function(v) { + ed.execCommand(s.cmd, s.ui || false, v || s.value); + }; + } + + s = extend({ + title : s.title, + 'class' : 'mce_' + id, + 'menu_class' : ed.getParam('skin') + 'Skin', + scope : s.scope, + more_colors_title : ed.getLang('more_colors') + }, s); + + id = t.prefix + id; + cls = cc || t._cls.colorsplitbutton || tinymce.ui.ColorSplitButton; + c = new cls(id, s); + ed.onMouseDown.add(c.hideMenu, c); + + // Remove the menu element when the editor is removed + ed.onRemove.add(function() { + c.destroy(); + }); + + // Fix for bug #1897785, #1898007 + if (tinymce.isIE) { + c.onShowMenu.add(function() { + bm = ed.selection.getBookmark(1); + }); + + c.onHideMenu.add(function() { + if (bm) { + ed.selection.moveToBookmark(bm); + bm = 0; + } + }); + } + + return t.add(c); + }, + + createToolbar : function(id, s, cc) { + var c, t = this, cls; + + id = t.prefix + id; + cls = cc || t._cls.toolbar || tinymce.ui.Toolbar; + c = new cls(id, s); + + if (t.get(id)) + return null; + + return t.add(c); + }, + + createSeparator : function(cc) { + var cls = cc || this._cls.separator || tinymce.ui.Separator; + + return new cls(); + }, + + setControlType : function(n, c) { + return this._cls[n.toLowerCase()] = c; + }, + + destroy : function() { + each(this.controls, function(c) { + c.destroy(); + }); + + this.controls = null; + } + + }); +})(); + +/* file:jscripts/tiny_mce/classes/WindowManager.js */ + +(function() { + var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isIE = tinymce.isIE, isOpera = tinymce.isOpera; + + tinymce.create('tinymce.WindowManager', { + WindowManager : function(ed) { + var t = this; + + t.editor = ed; + t.onOpen = new Dispatcher(t); + t.onClose = new Dispatcher(t); + t.params = {}; + t.features = {}; + }, + + open : function(s, p) { + var t = this, f = '', x, y, mo = t.editor.settings.dialog_type == 'modal', w, sw, sh, vp = tinymce.DOM.getViewPort(), u; + + // Default some options + s = s || {}; + p = p || {}; + sw = isOpera ? vp.w : screen.width; // Opera uses windows inside the Opera window + sh = isOpera ? vp.h : screen.height; + s.name = s.name || 'mc_' + new Date().getTime(); + s.width = parseInt(s.width || 320); + s.height = parseInt(s.height || 240); + s.resizable = true; + s.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0); + s.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0); + p.inline = false; + p.mce_width = s.width; + p.mce_height = s.height; + p.mce_auto_focus = s.auto_focus; + + if (mo) { + if (isIE) { + s.center = true; + s.help = false; + s.dialogWidth = s.width + 'px'; + s.dialogHeight = s.height + 'px'; + s.scroll = s.scrollbars || false; + } + } + + // Build features string + each(s, function(v, k) { + if (tinymce.is(v, 'boolean')) + v = v ? 'yes' : 'no'; + + if (!/^(name|url)$/.test(k)) { + if (isIE && mo) + f += (f ? ';' : '') + k + ':' + v; + else + f += (f ? ',' : '') + k + '=' + v; + } + }); + + t.features = s; + t.params = p; + t.onOpen.dispatch(t, s, p); + + u = s.url || s.file; + if (tinymce.relaxedDomain) + u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; + + u = tinymce._addVer(u); + + try { + if (isIE && mo) { + w = 1; + window.showModalDialog(u, window, f); + } else + w = window.open(u, s.name, f); + } catch (ex) { + // Ignore + } + + if (!w) + alert(t.editor.getLang('popup_blocked')); + }, + + close : function(w) { + w.close(); + this.onClose.dispatch(this); + }, + + createInstance : function(cl, a, b, c, d, e) { + var f = tinymce.resolve(cl); + + return new f(a, b, c, d, e); + }, + + confirm : function(t, cb, s, w) { + w = w || window; + + cb.call(s || this, w.confirm(this._decode(this.editor.getLang(t, t)))); + }, + + alert : function(tx, cb, s, w) { + var t = this; + + w = w || window; + w.alert(t._decode(t.editor.getLang(tx, tx))); + + if (cb) + cb.call(s || t); + }, + + // Internal functions + + _decode : function(s) { + return tinymce.DOM.decode(s).replace(/\\n/g, '\n'); + } + + }); +}()); \ No newline at end of file diff --git a/includes/tinymce/jscripts/tiny_mce/utils/editable_selects.js b/includes/tinymce/jscripts/tiny_mce/utils/editable_selects.js new file mode 100644 index 00000000..fff49639 --- /dev/null +++ b/includes/tinymce/jscripts/tiny_mce/utils/editable_selects.js @@ -0,0 +1,69 @@ +/** + * $Id: editable_selects.js 867 2008-06-09 20:33:40Z spocke $ + * + * Makes select boxes editable. + * + * @author Moxiecode + * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + */ + +var TinyMCE_EditableSelects = { + editSelectElm : null, + + init : function() { + var nl = document.getElementsByTagName("select"), i, d = document, o; + + for (i=0; i'; + h += ''; + + return h; +} + +function updateColor(img_id, form_element_id) { + document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value; +} + +function setBrowserDisabled(id, state) { + var img = document.getElementById(id); + var lnk = document.getElementById(id + "_link"); + + if (lnk) { + if (state) { + lnk.setAttribute("realhref", lnk.getAttribute("href")); + lnk.removeAttribute("href"); + tinyMCEPopup.dom.addClass(img, 'disabled'); + } else { + if (lnk.getAttribute("realhref")) + lnk.setAttribute("href", lnk.getAttribute("realhref")); + + tinyMCEPopup.dom.removeClass(img, 'disabled'); + } + } +} + +function getBrowserHTML(id, target_form_element, type, prefix) { + var option = prefix + "_" + type + "_browser_callback", cb, html; + + cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback")); + + if (!cb) + return ""; + + html = ""; + html += ''; + html += ''; + + return html; +} + +function openBrowser(img_id, target_form_element, type, option) { + var img = document.getElementById(img_id); + + if (img.className != "mceButtonDisabled") + tinyMCEPopup.openBrowser(target_form_element, type, option); +} + +function selectByValue(form_obj, field_name, value, add_custom, ignore_case) { + if (!form_obj || !form_obj.elements[field_name]) + return; + + var sel = form_obj.elements[field_name]; + + var found = false; + for (var i=0; i parseInt(v)) + st = this.mark(f, n); + } + } + + return st; + }, + + hasClass : function(n, c, d) { + return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className); + }, + + getNum : function(n, c) { + c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0]; + c = c.replace(/[^0-9]/g, ''); + + return c; + }, + + addClass : function(n, c, b) { + var o = this.removeClass(n, c); + n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c; + }, + + removeClass : function(n, c) { + c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' '); + return n.className = c != ' ' ? c : ''; + }, + + tags : function(f, s) { + return f.getElementsByTagName(s); + }, + + mark : function(f, n) { + var s = this.settings; + + this.addClass(n, s.invalid_cls); + this.markLabels(f, n, s.invalid_cls); + + return false; + }, + + markLabels : function(f, n, ic) { + var nl, i; + + nl = this.tags(f, "label"); + for (i=0; iLogin Logs Sessions Domain Names + FAQs diff --git a/modules/core/auth.inc.php b/modules/core/auth.inc.php index d850244f..a37ec9b4 100644 --- a/modules/core/auth.inc.php +++ b/modules/core/auth.inc.php @@ -20,8 +20,6 @@ class CORE_auth { - - var $auth_groups; var $auth_modules; var $auth_methods; var $account=false; @@ -83,6 +81,11 @@ class CORE_auth $this->module = Array("0"); } else { $this->group_list($this->account); + if (!$this->group) { + $this->group = array ('0'); + $this->module = array ('0'); + return; + } $db = &DB(); $p = AGILE_DB_PREFIX; $sql="SELECT DISTINCT MM.module_id, GM.method_id, GM.group_id, @@ -91,15 +94,15 @@ class CORE_auth FROM {$p}group_method as GM LEFT JOIN {$p}module as M on (GM.module_id=M.id and M.site_id=".DEFAULT_SITE.") LEFT JOIN {$p}module_method as MM on (GM.method_id=MM.id and MM.site_id=".DEFAULT_SITE.") "; - for($i=0; $iauth_groups); $i++) - if($i==0) $sql .= "WHERE GM.group_id={$this->auth_groups[$i]} "; - else $sql .= "OR GM.group_id={$this->auth_groups[$i]} "; - $sql .= "AND GM.site_id=".DEFAULT_SITE." ORDER BY M.name,MM.name"; + for($i=0; $igroup); $i++) + if($i==0) $sql .= "WHERE (GM.group_id={$this->group[$i]} "; + else $sql .= "OR GM.group_id={$this->group[$i]} "; + $sql .= ") AND GM.site_id=".DEFAULT_SITE." ORDER BY M.name,MM.name"; $result=$db->Execute($sql); if($result === false) { global $C_debug; - $C_debug->error('core:auth.inc.php','menu_update', $db->ErrorMsg() . '

' .$q); + $C_debug->error('core:auth.inc.php','auth_update', $db->ErrorMsg() . '

' .$q); return; } while (!$result->EOF) { @@ -283,4 +286,4 @@ class CORE_auth return auth_generate_admin_menu($this); } } -?> \ No newline at end of file +?> diff --git a/modules/core/auth_generate_admin_menu.inc.php b/modules/core/auth_generate_admin_menu.inc.php index de3f5999..ad4c4b36 100644 --- a/modules/core/auth_generate_admin_menu.inc.php +++ b/modules/core/auth_generate_admin_menu.inc.php @@ -90,8 +90,8 @@ function auth_generate_admin_menu($menu_obj) // Generate the main modules: $js = ''; - $js .= ".|Overview|javascript:openUrl('?_page=core:admin');||includes/aptree/img/icons/info.gif\n"; - $js .= ".|Exit Administration|javascript:exitAdmin();||includes/aptree/img/icons/info.gif\n"; + $js .= ".|Overview|javascript:openUrl('?_page=core:admin');\n"; + $js .= ".|Exit Administration|javascript:exitAdmin();\n"; $js .= ".|Misc\n"; $js .= "..|Documentation|http://agilebill.com/documentation|||mainFrame\n"; $js .= "..|Agileco News|http://forum.agileco.com/forumdisplay.php?f=26|||mainFrame\n"; @@ -100,54 +100,29 @@ function auth_generate_admin_menu($menu_obj) for($i=1; $i<=count($module_arr); $i++) { $name = $module_arr[$i]['name']; - # if($i>1) $js.=','; $js .= ".|{$name}\n"; // Generate the main methods: for($ii=0; $iiassign('today_start', $C_list->date(mktime(0,0,0,date("m"),date("d"), date("Y")))); @@ -171,4 +146,4 @@ function auth_generate_admin_menu($menu_obj) return $js; } -?> \ No newline at end of file +?> diff --git a/modules/core/email_piping.inc.php b/modules/core/email_piping.inc.php index a759a017..b4ce6b99 100644 --- a/modules/core/email_piping.inc.php +++ b/modules/core/email_piping.inc.php @@ -154,7 +154,6 @@ class email_piping $filecontent = imap_fetchbody($mbox,$msg,$file+2); if(empty($filecontent)) return false; $tmp = PATH_FILES.'/'. md5('piping'.$filename.microtime()); - require_once('includes/pear/Compat/Function/file_put_contents.php'); file_put_contents($tmp,$filecontent); $this->attachments[$msg][] = Array('tmp'=>$tmp, 'file'=>$filename, 'type'=> $filetype); } @@ -267,4 +266,4 @@ class email_piping return string; } } -?> \ No newline at end of file +?> diff --git a/modules/core/import.inc.php b/modules/core/import.inc.php index 479993f4..494ace6e 100644 --- a/modules/core/import.inc.php +++ b/modules/core/import.inc.php @@ -62,7 +62,6 @@ class CORE_import } # open the file for parsing - require_once('includes/pear/Compat/Function/file_get_contents.php'); $data = file_get_contents($this->file); $rows = explode("\r\n", $data); @@ -142,7 +141,6 @@ class CORE_import { global $C_debug; $this->file = PATH_FILES.$VAR['file']; - require_once('includes/pear/Compat/Function/file_get_contents.php'); $data = file_get_contents($this->file); $rows = explode("\r\n", $data); @@ -242,7 +240,6 @@ class CORE_import { global $C_debug; $this->file = PATH_FILES.$VAR['file']; - require_once('includes/pear/Compat/Function/file_get_contents.php'); $data = file_get_contents($this->file); $rows = explode("\r\n", $data); @@ -342,4 +339,4 @@ class CORE_import } } } -?> \ No newline at end of file +?> diff --git a/modules/core/vars.inc.php b/modules/core/vars.inc.php index de4c5969..157efefa 100644 --- a/modules/core/vars.inc.php +++ b/modules/core/vars.inc.php @@ -23,33 +23,20 @@ class CORE_vars var $f; function CORE_vars() { - if (phpversion() >= "4.1.0") - { - global $_GET, $_POST; - if(isset($_GET) && count($_GET) > 0) - { - reset ( $_GET ); - while ( list ($key, $val) = each ( $_GET ) ) { - $newkey=ereg_replace ('amp;', '', $key ); - $this->f["$newkey"] = $val; - } - reset ( $_GET ); - } - if(isset($_POST) && count($_POST) > 0) - { - reset ( $_POST ); - while ( list ($key, $val) = each ( $_POST ) ) $this->f["$key"] = $val; - reset ( $_POST ); - } - } - else + if(isset($_GET) && count($_GET) > 0) { - global $HTTP_POST_VARS, $HTTP_GET_VARS; - if(isset($HTTP_POST_VARS) && count($HTTP_POST_VARS) > 0) - $this->f = $HTTP_POST_VARS; - elseif(isset($HTTP_GET_VARS) && count($HTTP_GET_VARS) > 0) - $this->f = $HTTP_GET_VARS; + reset ( $_GET ); + while ( list ($key, $val) = each ( $_GET ) ) { + $this->f["$key"] = $val; + } + reset ( $_GET ); } + if(isset($_POST) && count($_POST) > 0) + { + reset ( $_POST ); + while ( list ($key, $val) = each ( $_POST ) ) $this->f["$key"] = $val; + reset ( $_POST ); + } // set the shortcuts: if(!isset($this->f["_page"])) @@ -92,4 +79,4 @@ class CORE_vars } } } -?> \ No newline at end of file +?> diff --git a/modules/core/version.inc.php b/modules/core/version.inc.php index bcbcd7f2..ec95efb5 100644 --- a/modules/core/version.inc.php +++ b/modules/core/version.inc.php @@ -34,7 +34,6 @@ $fp = fopen('http://agileco.com/Version.txt', "r"); $abv = fread($fp, 255); fclose($fp); # get encoding version -require_once('includes/pear/Compat/Function/file_get_contents.php'); $tmp = file_get_contents(PATH_AGILE.'index.php'); if(eregi('ioncube', $tmp)) @@ -73,4 +72,4 @@ $smarty->assign('version',$ver); $smarty->assign('ab_version',$abv); $smarty->assign('encoding_version',$enc); $smarty->assign('modules',@$module_arr); -?> \ No newline at end of file +?> diff --git a/modules/currency/currency.inc.php b/modules/currency/currency.inc.php index 3235a2f1..099c68be 100644 --- a/modules/currency/currency.inc.php +++ b/modules/currency/currency.inc.php @@ -124,5 +124,62 @@ class currency $db = new CORE_database; $db->search_show($VAR, $this, $type); } + + function task($VAR) + { + $db = &DB(); + + // Fetch all active currencies + $currencies = array(); + $rs = $db->Execute(sqlSelect($db, "currency", "*", "status=1")); + if ($rs) + { + while (!$rs->EOF) + { + $currencies[$rs->fields['id']] = $rs->fields; + $rs->MoveNext(); + } + + $rs->Close(); + } + + foreach ($currencies as $currFrom) + { + $conversions = array(); + foreach ($currencies as $currTo) + { + // Get currency conversion + if ($currFrom['three_digit'] != $currTo['three_digit']) + { + $ch = curl_init('http://www.xe.net/ucc/convert.cgi?Amount=1&From=' . $currFrom['three_digit'] . '&To=' . $currTo['three_digit']); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); + curl_setopt($ch, CURLOPT_CRLF, true); + $resp = curl_exec ($ch); + curl_close ($ch); + + $m = array(); + preg_match('/[0-9.]+\s*' . $currFrom['three_digit'] . '\s*=\s*([0-9.]+)\s*' . $currTo['three_digit'] . '/', $resp, $m); + } + else + { + // Conversion to/from same currency is always 1. + $m = array(1 => '1'); + } + + if (sizeof($m) > 0) + { + $conversions[$currTo['id']] = array ( + 'rate' => $m[1] + ,'iso' => $currTo['three_digit'] + ); + } + } + + // Update conversions array + $db->Execute('UPDATE ' . AGILE_DB_PREFIX . 'currency SET convert_array = ' . $db->qstr(serialize($conversions)) . ' WHERE id = ' . $db->qstr($currFrom['id']) . ' AND site_id = ' . $db->qstr($currFrom['site_id'])); + } + } } -?> \ No newline at end of file +?> diff --git a/modules/faq/faq.inc.php b/modules/faq/faq.inc.php index abe222f1..728966d7 100644 --- a/modules/faq/faq.inc.php +++ b/modules/faq/faq.inc.php @@ -55,14 +55,13 @@ class faq { $db = &DB(); if(!empty($VAR['faq_autofill']) && strlen($VAR['faq_autofill']) > 3) { - $dbm = new CORE_database(); $result = $db->Execute( - $sql = $dbm->sql_select( + $sql = sqlSelect( + $db, Array( 'faq_translate', 'faq' ), Array( 'A.*', 'B.name' ), " A.faq_id = B.id AND MATCH(A.question, A.answer) AGAINST(".$db->qstr($VAR['faq_autofill'].'*')." IN BOOLEAN MODE)", - "", - &$db + "" ) ); } @@ -96,14 +95,13 @@ class faq { if (!empty($VAR['id'])) { $db = &DB(); - $dbm = new CORE_database(); $rs = $db->Execute( - $sql = $dbm->sql_select( + $sql = sqlSelect( + $db, Array( 'faq_translate', 'faq', 'faq_category' ), Array( 'A.*', 'B.name', 'C.group_avail' ), " B.id = ::".$VAR['id'].":: AND B.id = A.faq_id AND A.language_id = '".SESS_LANGUAGE."' AND B.status = 1 AND C.status = 1 ", - "", - &$db + "" ) ); } @@ -126,25 +124,23 @@ class faq { $db = &DB(); if(!empty($VAR['search']) && strlen($VAR['search']) > 3) { - $dbm = new CORE_database(); $result = $db->Execute( - $sql = $dbm->sql_select( + $sql = sqlSelect( + $db, Array( 'faq_translate', 'faq', 'faq_category' ), Array( 'A.*', 'B.name', 'C.group_avail' ), " A.faq_id = B.id AND B.faq_category_id = C.id AND MATCH(A.question, A.answer) AGAINST(".$db->qstr($VAR['search'].'*')." IN BOOLEAN MODE) AND B.status = 1 AND C.status=1", - "", - &$db + "" ) ); } elseif (!empty($VAR['category_id'])) { - $dbm = new CORE_database(); $result = $db->Execute( - $sql = $dbm->sql_select( + $sql = sqlSelect( + $db, Array( 'faq_translate', 'faq', 'faq_category' ), Array( 'A.*', 'B.name', 'C.group_avail' ), " B.faq_category_id = ::".$VAR['category_id'].":: AND B.id = A.faq_id AND B.faq_category_id = C.id AND A.language_id = '".SESS_LANGUAGE."' AND B.status = 1 AND C.status=1", - "", - &$db + "" ) ); } @@ -175,14 +171,13 @@ class faq function faq_categories($VAR) { $db = &DB(); - $dbm = new CORE_database(); $rs = $db->Execute( $sql= - $sql = $dbm->sql_select( + $sql = sqlSelect( + $db, 'faq_category', '*' , " status=1 ", - "sort_order,name,date_orig", - &$db + "sort_order,name,date_orig" ) ); @@ -315,4 +310,4 @@ class faq return $text; } } -?> \ No newline at end of file +?> diff --git a/modules/invoice/advance_notice.php b/modules/invoice/advance_notice.php index 6f8bf760..3e25e9f9 100644 --- a/modules/invoice/advance_notice.php +++ b/modules/invoice/advance_notice.php @@ -33,7 +33,7 @@ class advance_notice /* get the max invoice days from the setup_invoice table */ if(!$this->advance_days) { $setup = $db->Execute(sqlSelect($db,"setup_invoice","advance_notice","advance_notice>0 and advance_notice != '' and advance_notice is not null")); - if(!$setup && !$setup->RecordCount()) return false; + if(!$setup->RecordCount()) return false; $this->advance_days = $setup->fields['advance_notice']; } @@ -106,4 +106,4 @@ class advance_notice $db->Execute("UPDATE ".AGILE_DB_PREFIX."service SET invoice_advance_notified=1 WHERE site_id=".DEFAULT_SITE." AND id in ($ids)"); } } -?> \ No newline at end of file +?> diff --git a/modules/invoice/invoice.inc.php b/modules/invoice/invoice.inc.php index c51a87c9..7d58ee92 100644 --- a/modules/invoice/invoice.inc.php +++ b/modules/invoice/invoice.inc.php @@ -704,7 +704,6 @@ class invoice # echo the custom tracking code to the screen: if(!is_file(PATH_FILES.'tracking.txt')) return false; - require_once('includes/pear/Compat/Function/file_get_contents.php'); $tracking = file_get_contents(PATH_FILES.'tracking.txt'); $tracking = ereg_replace('%%amount%%', "$total_amount", $tracking); $tracking = ereg_replace('%%invoice%%', $invoice, $tracking); @@ -1189,7 +1188,7 @@ class invoice $currency_symbol=$C_list->format_currency[DEFAULT_CURRENCY]['symbol']; # Get the paid/due invoice statistics - $rs = $db->Execute($sql=sqlSelect($db,"invoice","date_orig,total_amt,billing_status,refund_status,billed_amt,suspend_billing","date_orig >= $start && date_orig <= $end")); + $rs = $db->Execute($sql=sqlSelect($db,"invoice","date_orig,total_amt,billing_status,refund_status,billed_amt,suspend_billing","date_orig >= $start and date_orig <= $end")); if($rs && $rs->RecordCount()) { while(!$rs->EOF) { $day = date("j", $rs->fields['date_orig']); @@ -4373,4 +4372,4 @@ class invoice $this->limit = $construct["construct"]["limit"]; } } -?> \ No newline at end of file +?> diff --git a/modules/module/module.inc.php b/modules/module/module.inc.php index 6f858f8e..b1ba5288 100644 --- a/modules/module/module.inc.php +++ b/modules/module/module.inc.php @@ -94,7 +94,6 @@ class module global $C_auth; if(!$C_auth->auth_method_by_name("module","upgrade")) return false; - require_once('includes/pear/Compat/Function/file_get_contents.php'); if(is_file(PATH_AGILE.'Version.txt')) $f['version']=trim(file_get_contents(PATH_AGILE.'Version.txt')); else @@ -114,9 +113,6 @@ class module ### Get remote hash file and check for inconsitancys in local files function remote_update($VAR) { - ## Load file_get_contents function for older versions: - require_once('includes/pear/Compat/Function/file_get_contents.php'); - $ver = $VAR['ver']; $mis=0; $md5=0; @@ -1521,4 +1517,4 @@ class module fclose($file); } } -?> \ No newline at end of file +?> diff --git a/modules/report/class.Level.php b/modules/report/class.Level.php index 2b072ec8..8fffa4da 100644 --- a/modules/report/class.Level.php +++ b/modules/report/class.Level.php @@ -744,7 +744,6 @@ class Level_Base { */ function addFieldCriteria($sql, $bIsAggregate = false, $field = '') { - require_once PATH_INCLUDES . 'pear/Compat/Function/stripos.php'; $this->lev_setting['SQL_criteria'] = $this->addToFilter($this->lev_setting['SQL_criteria'], $sql, $bIsAggregate); @@ -870,7 +869,6 @@ class Level_Base { function find_next_sql_keyword($sql,$offset=0) { - require_once PATH_INCLUDES . 'pear/Compat/Function/stripos.php'; $ret = false; if(is_string($sql) && is_numeric($offset)) { $arr = array( @@ -898,7 +896,6 @@ class Level_Base { function shuffleSQL($sql, $groupBy='') { - require_once PATH_INCLUDES . 'pear/Compat/Function/stripos.php'; if( ($p=stripos($sql,'HAVING')) !== false) { # found a having clause $leading = ''; @@ -1057,4 +1054,4 @@ class Level_Base { } } } -?> \ No newline at end of file +?> diff --git a/modules/task/task_install_data.xml b/modules/task/task_install_data.xml index 1aebb474..ca7bbb06 100644 --- a/modules/task/task_install_data.xml +++ b/modules/task/task_install_data.xml @@ -285,8 +285,22 @@ 67 + 1 + 0 + 0 + 0 + Currency Conversion Update + Retrieves currency conversions from XE.com and updates. + 0 + currency:task + 0 + 0 + * + * + 2 + 0 - 67 + 68 - \ No newline at end of file + diff --git a/modules/ticket/ticket.inc.php b/modules/ticket/ticket.inc.php index 727c8862..c609c7e1 100644 --- a/modules/ticket/ticket.inc.php +++ b/modules/ticket/ticket.inc.php @@ -537,7 +537,6 @@ class ticket // insert any attachments if(!empty($arr['attach']) && is_array($arr['attach'])) { foreach($arr['attach'] as $attach) { - require_once('includes/pear/Compat/Function/file_get_contents.php'); @$data = file_get_contents($attach['tmp']); if(!empty($data)) { // get file size @@ -2708,4 +2707,4 @@ class ticket $this->limit = $construct["construct"]["limit"]; } } -?> \ No newline at end of file +?> diff --git a/modules/voip_prepaid/voip_prepaid.inc.php b/modules/voip_prepaid/voip_prepaid.inc.php index 4330c9e7..32537894 100644 --- a/modules/voip_prepaid/voip_prepaid.inc.php +++ b/modules/voip_prepaid/voip_prepaid.inc.php @@ -27,8 +27,16 @@ class voip_prepaid $db =& DB(); $rs = $db->Execute(sqlSelect($db,"voip","prepaid_low_balance","id=::".DEFAULT_SITE."::")); - # e-mail user's once when balance reaches this amount: - $this->lowBalance = $rs->fields[0]; + if ($rs && $rs->RecordCount() > 0) + { + # e-mail user's once when balance reaches this amount: + $this->lowBalance = $rs->fields[0]; + } + else + { + $this->lowBalance = false; + } + $this->pinLenth = 10; // up to 10 # name of this module: @@ -75,6 +83,10 @@ class voip_prepaid { include_once(PATH_MODULES.'email_template/email_template.inc.php'); + // do not run task if lowBalance is not set + if ($this->lowBalance == false) + return; + // delete expired pins? // $delrs = & $db->Execute(sqlDelete($db,"voip_prepaid"," date_expire <> 0 and date_expire is not null and date_expire > ".time())); @@ -514,4 +526,4 @@ class voip_prepaid } } } -?> \ No newline at end of file +?> diff --git a/plugins/provision/PLESK_8.php b/plugins/provision/PLESK_8.php new file mode 100644 index 00000000..48bae64b --- /dev/null +++ b/plugins/provision/PLESK_8.php @@ -0,0 +1,737 @@ + + * @package AgileBill + * @version 1.4.93 + */ + +/* +* Vars available from server config: +* +* host +* port +* user +* pass +* +* +* Vars from service config: +* +* package +* +*/ + + +class plgn_prov_PLESK_8 +{ + function plgn_prov_PLESK_8() + { + $this->name = 'PLESK_8'; + $this->task_based = false; + $this->remote_based = true; + + # PSA STUFF: + $this->psapath = "enterprise/control/agent.php"; + $this->proto = "1.4.2.0"; + } + + + # add new service + function p_new() + { + # get the common server class and set login details + include_once(PATH_MODULES.'host_server/host_server.inc.php'); + $host = new host_server; + if($this->service['host_username'] == '' || $this->service['host_password'] == '') + { + # set the limits + $pass_len = 10; + $user_len = 12; + + # Generate a new username/login: + $domain = $this->service['domain_name'].$this->service['domain_tld']; + + # set the username + $username = trim($domain); + $username = eregi_replace("[-_\.]", "", $username); + if(strlen($username) < $user_len) + { + $rand = md5(md5($username).time()); + $diff = $user_len - strlen($username); + $username = $username . substr($rand, 0, $diff); + } + else + { + $rand = md5(microtime().md5($username).microtime()); + $username = substr($username, 0, $user_len-5); + $username = $username . substr($rand, 0, 5); + } + + # Set the password + $password = substr(md5(md5(time()).$domain.$username), 0, 10); + + # Set the user/pass for the XML queries + $this->login['username'] = $username; + $this->login['password'] = $password; + + } else { + + # Validate + $this->login['username'] = $this->service['host_username']; + $this->login['password'] = $this->service['host_password']; + } + + + # get ip address + if ($this->plugin_data['ip_based'] == '1') { + $this->ip = $host->useipaddress($this->service, $this->server); + } else { + $this->ip = $this->server['name_based_ip']; + } + + + #################################################### + ### Assemble the XML for the account creation: #### + + $data =<< + + + + + {$this->account['first_name']} {$this->account['last_name']} ({$this->login['username']}) + {$this->login['username']} + {$this->login['password']} + {$this->account['email']} + 00000 + US + 0 + 18005551212 + + {$this->plugin_data['client_template_name']} + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + # Get the account id + if (!$cl_id = $this->getid($result)) + return false; + + + ############################## + ### ADD IP TO CLIENT POOL: ### + + $data =<< + + + + $cl_id + {$this->ip} + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + ####################### + ### ADD NEW DOMAIN: ### + + $data =<< + + + + + {$this->service['domain_name']}.{$this->service['domain_tld']} + $cl_id + vrt_hst + {$this->ip} + + + + + {$this->login['username']} + {$this->login['password']} + {$this->ip} + + + {$this->plugin_data['domain_template_name']} + + + +EOF; + + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + + # Get the account id + if(!$domain_id = $this->getid($result)) { + return false; + } else { + $db = &DB(); + $id = $this->service_id; + $sql = "SELECT * FROM ".AGILE_DB_PREFIX."service WHERE id = $id"; + $rs = $db->Execute($sql); + $plugin_data = unserialize($rs->fields['host_provision_plugin_data']); + $plugin_data['account_id'] = $cl_id; + $plugin_data['domain_id'] = $domain_id; + $insert = Array ('host_provision_plugin_data' => serialize($plugin_data), + 'host_username' => $this->login['username'], + 'host_password' => $this->login['password']); + $sql = $db->GetUpdateSQL($rs, $insert); + $result = $db->Execute($sql); + if ($result === false) { + global $C_debug; + $C_debug->error('PLESK_8.php','plgn_prov_PLESK_8 :: p_new()', $db->ErrorMsg(). "\r\n\r\n". $sql); + } + + # send the user the details + include_once(PATH_MODULES.'email_template/email_template.inc.php'); + $email = new email_template; + $email->send('host_new_user', $this->account['id'], $this->service_id, '', ''); + } + return true; + } + + + # edit service + function p_edit() + { + ## Get the IP + if(!empty($this->service['host_ip'])) + $this->ip = $this->service['host_ip']; + else + $this->ip = $this->server['name_based_ip']; + + + ################################################ + ### SET CLIENT LOGIN + + $data =<< + + + + + {$this->plugin_data['account_id']} + + + + {$this->service['host_username']} + {$this->service['host_password']} + + + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + + ############################ + ### SET CLIENT TEMPLATE: ### + + $data =<< + + + + + {$this->plugin_data['account_id']} + + + {$this->plugin_data['client_template_name']} + + + + {$this->plugin_data['account_id']} + {$this->ip} + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + + ### Edit the domain settings: + + $data =<< + + + + + {$this->plugin_data['domain_id']} + + + + 16 + {$this->service['domain_name']}.{$this->service['domain_tld']} + + + + + +EOF; + + + $data =<< + + + + + {$this->plugin_data['domain_id']} + + + + + 0 + {$this->service['domain_name']}.{$this->service['domain_tld']} + + + + {$this->ip}{$this->service['host_username']} + {$this->service['host_password']} + + + {$this->plugin_data['domain_template_name']} + + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + if(!empty($result)) + return true; + else + return false; + } + + + # activate service + function p_inactive() + { + $data =<< + + + + + {$this->plugin_data['account_id']} + + + + 16 + + + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + + $data =<< + + + + + {$this->plugin_data['domain_id']} + + + + 16 + + + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + if(!empty($result)) + return true; + else + return false; + } + + + # deactivate service + function p_active() + { + $data =<< + + + + + {$this->plugin_data['account_id']} + + + + 0 + + + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + + $data =<< + + + + + {$this->plugin_data['domain_id']} + + + + 0 + {$this->service['domain_name']}.{$this->service['domain_tld']} + + + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + + if(!empty($result)) + return true; + else + return false; + } + + + + + # delete service + function p_delete() + { + # recycle the IP if ip_based: + if ($this->plugin_data['ip_based'] == '1') { + include_once(PATH_MODULES.'host_server/host_server.inc.php'); + $host = new host_server; + $this->ip = $host->unuseipaddress($this->server, $this->service['host_ip']); + } + + $data =<< + + + + + {$this->plugin_data['account_id']} + + + + +EOF; + + # Connect & get response: + $result = $this->connect( + $this->server_cfg['host'], + $this->server_cfg['port'], + $this->server_cfg['user'], + $this->server_cfg['pass'], + $data + ); + + # Debug: + $this->debug($data, $result); + + if(!empty($result)) + return true; + else + return false; + } + + + # construct echo all updates + function p_one($id) + { + global $C_debug; + + # Get the service details + $db = &DB(); + $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'service WHERE + id = ' . $db->qstr( $id ) . ' AND + site_id = ' . $db->qstr(DEFAULT_SITE); + $rs = $db->Execute($sql); + if($rs->RecordCount() == 0) { + return false; + } + $this->service = $rs->fields; + $this->service_id = $rs->fields['id']; + @$this->plugin_data = unserialize($this->service['host_provision_plugin_data']); + + # Get the account details + $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'account WHERE + id = ' . $db->qstr( $this->service['account_id'] ) . ' AND + site_id = ' . $db->qstr(DEFAULT_SITE); + $acct = $db->Execute($sql); + $this->account = $acct->fields; + + # Get the server details + $db = &DB(); + $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'host_server WHERE + id = ' . $db->qstr( $this->service['host_server_id'] ) . ' AND + site_id = ' . $db->qstr(DEFAULT_SITE); + $rs = $db->Execute($sql); + if (@$rs->RecordCount() == 0) { + return false; + } else { + $this->server = $rs->fields; + @$this->server_cfg = unserialize($rs->fields['provision_plugin_data']); + } + + + # determine the correct action + switch ($this->service['queue']) + { + # new + case 'new': + $result = $this->p_new(); + break; + + # active + case 'active': + $result = $this->p_active(); + break; + + # inactive + case 'inactive': + $result = $this->p_inactive(); + break; + + # edit + case 'edit': + $result = $this->p_edit(); + if ($this->service['active'] == 1 ) + $result = $this->p_active(); + else + $result = $this->p_inactive(); + break; + + # delete + case 'delete': + $result = $this->p_delete(); + break; + } + + + # update service record + if(@$result) + { + # update + $db = &DB(); + $sql = 'UPDATE ' . AGILE_DB_PREFIX . 'service SET + queue = ' . $db->qstr( 'none' ) . ', + date_last = ' . $db->qstr( time() ) . ' + WHERE + id = ' . $db->qstr( $this->service_id ) . ' AND + site_id = ' . $db->qstr(DEFAULT_SITE); + $upd = $db->Execute($sql); + + } else { + # error log + $C_debug->error($this->name.'.php', $this->service['queue'], $this->service['queue'] . ' For service id '. $this->service_id . ' Failed!'); + } + } + + + /* + * Get the id returned + */ + + function getid($result) + { + preg_match ("/()+([0-9]){1,99}/i", $result, $arr); + if(is_array($arr) && count($arr) > 0) { + $id = ereg_replace("","", $arr[0]); + if(!is_numeric($id)) + return false; + else + return $id; + } else { + return false; + } + return false; + } + + /* + * Debug + */ + + function debug($data,$result=false) + { + if($this->server['debug']) { + echo '
REQUEST:

'; + echo "
" . htmlspecialchars($data) . "
"; + echo 'RESPONSE:
'; + echo "
" . htmlspecialchars($result) . "
"; + } + } + + /* + * Curl connect functions + */ + function connect($HOST, $PORT, $LOGIN, $PASSWD, $DATA) + { + $url = "https://" . $HOST . ":" . $PORT . "/" . $this->psapath; + + $headers = array( + "HTTP_AUTH_LOGIN: " . $LOGIN, + "HTTP_AUTH_PASSWD: " . $PASSWD, + "HTTP_PRETTY_PRINT: TRUE", + "Content-Type: text/xml", + ); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POSTFIELDS, $DATA); + curl_setopt($ch, CURLOPT_VERBOSE, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $result = curl_exec($ch); + $this->result = $result; + curl_close($ch); + return $result; + } +} + +?> diff --git a/test.php b/test.php index ec8057af..1718bffe 100644 --- a/test.php +++ b/test.php @@ -33,51 +33,6 @@ $php_info .= ob_get_contents(); ob_end_clean(); -############################################################### -### ENCODING ### - -if (eregi('Zend Optimizer', $php_info)) - $zend = true; -else - $zend = false; - - -if (function_exists("mmcache")) - $mmcache = true; -else - $mmcache = false; - -if (extension_loaded('ionCube Loader')) -{ - $ioncube = true; -} -else -{ - $ion = new ioncube_test; - $ioncube_arr = $ion->test(); - if($ioncube_arr[0] == true) - $ioncube = true; - else - $ioncube = false; -} - -if($ioncube || $mmcache || $zend ) -{ - $encoding['font'] = "FFFFFF"; - $encoding['back'] = "009900"; - $encoding['text'] = "OK:"; - if($ioncube) - $encoding['text'] .= " [Ioncube] "; - if ($mmcache) - $encoding['text'] .= " [MMCache] "; - if ($zend) - $encoding['text'] .= " [Zend] "; -} else { - $encoding['font'] = "FFFFFF"; - $encoding['back'] = "990000"; - $encoding['text'] = "Failed."; -} - ############################################################### # GD if (extension_loaded('gd')) @@ -121,7 +76,7 @@ if ($sslx == true) ############################################################### # PHP -if(phpversion() >= '4.3' ) +if(phpversion() >= '5.0' ) { $php['font'] = "FFFFFF"; $php['back'] = "009900"; @@ -129,7 +84,7 @@ if(phpversion() >= '4.3' ) } else { $php['font'] = "FFFFFF"; $php['back'] = "990000"; - $php['text'] = "Failed!"; + $php['text'] = "Failed! (PHP 5.0 or later is required)"; } ############################################################### @@ -142,7 +97,7 @@ if(is_callable("mysql_connect") && is_callable("mysql_get_client_info") && mysql } else { $mysql['font'] = "FFFFFF"; $mysql['back'] = "990000"; - $mysql['text'] = "Failed!"; + $mysql['text'] = "Failed! (MySQL 4.0 or later is required)"; } @@ -201,16 +156,6 @@ document.getElementById("help").src = "http://agilebill.com/Requirements#"+loca - "> - - - - ">
ENCODING - "> - - - -
MySQL "> @@ -289,226 +234,3 @@ document.getElementById("help").src = "http://agilebill.com/Requirements#"+loca

- - - - - -
| => |v\">)([^ <]*)(.* $thread_safe, - 'DEBUG_BUILD' => $debug_build, - 'PHP_INI' => $php_ini_path, - 'CGI_CLI' => $cgi_cli); -} - -function test() -{ - - $nl = ((php_sapi_name() == 'cli') ? "\n" : '
'); - $ok = true; - $already_installed = false; - $here = dirname(__FILE__); - - $sys_info = $this->ic_system_info(); - - if ($sys_info['THREAD_SAFE'] && !$sys_info['CGI_CLI']) { - $msg = "Your PHP install appears to have threading support and run-time Loading - is only possible on threaded web servers if using the CGI, FastCGI or - CLI interface.$nl${nl}To run encoded files please install the Loader in the php.ini file.$nl"; - $ok = false; - } - - if ($sys_info['DEBUG_BUILD']) { - $msg = "Your PHP installation appears to be built with debugging support - enabled and this is incompatible with ionCube Loaders.$nl${nl}Debugging support in PHP produces slower execution, is - not recommended for production builds and was probably a mistake.${nl}${nl}You should rebuild PHP without the --enable-debug option and if - you obtained your PHP install from an RPM then the producer of the - RPM should be notified so that it can be corrected.$nl"; - $ok = false; - } - - if (ini_get('safe_mode')) { - $msg = "PHP safe mode is enabled and run time loading will not be possible.$nl"; - $ok = false; - } - - - // If ok to try and find a Loader - if ($ok) { - - // Old style naming should be long gone now - $test_old_name = false; - - $_u = php_uname(); - $_os = substr($_u,0,strpos($_u,' ')); - $_os_key = strtolower(substr($_u,0,3)); - - $_php_version = phpversion(); - $_php_family = substr($_php_version,0,3); - - $_loader_sfix = (($_os_key == 'win') ? '.dll' : '.so'); - - $_ln_old="ioncube_loader.$_loader_sfix"; - $_ln_old_loc="/ioncube/$_ln_old"; - - $_ln_new="ioncube_loader_${_os_key}_${_php_family}${_loader_sfix}"; - $_ln_new_loc="/ioncube/$_ln_new"; - - #echo "${nl}Looking for Loader '$_ln_new'"; - if ($test_old_name) { - #echo " or '$_ln_old'"; - } - #echo $nl.$nl; - - $_extdir = ini_get('extension_dir'); - if ($_extdir == './') { - $_extdir = '.'; - } - - $_oid = $_id = realpath($_extdir); - - $_here = dirname(__FILE__); - if ((@$_id[1]) == ':') { - $_id = str_replace('\\','/',substr($_id,2)); - $_here = str_replace('\\','/',substr($_here,2)); - } - $_rd=str_repeat('/..',substr_count($_id,'/')).$_here.'/'; - - if ($_oid !== false) { - #echo "Extensions Dir: $_extdir ($_id)$nl"; - #echo "Relative Path: $_rd$nl"; - } else { - #echo "Extensions Dir: $_extdir (NOT FOUND)$nl$nl"; - - #echo "The directory set for the extension_dir entry in the - # php.ini file may not exist, and run time loading will not be possible. - # The system administrator should create the $_extdir directory, - # or install the Loader in the php.ini file.$nl"; - $ok = false; - } - - if ($ok) { - $_ln = ''; - $_i=strlen($_rd); - while($_i--) { - if($_rd[$_i]=='/') { - if ($test_old_name) { - // Try the old style Loader name - $_lp=substr($_rd,0,$_i).$_ln_old_loc; - $_fqlp=$_oid.$_lp; - if(@file_exists($_fqlp)) { - $msg = "Found Loader: $_fqlp$nl"; - return Array (true, $msg); - $_ln=$_lp; - break; - } - } - // Try the new style Loader name - $_lp=substr($_rd,0,$_i).$_ln_new_loc; - $_fqlp=$_oid.$_lp; - if(@file_exists($_fqlp)) { - $msg = "Found Loader: $_fqlp$nl"; - return Array (true, $msg); - $_ln=$_lp; - break; - } - } - } - - // - // If Loader not found, try the fallback of in the extensions directory - // - if (!$_ln) { - if ($test_old_name) { - if (@file_exists($_id.$_ln_old_loc)) { - $_ln = $_ln_old_loc; - } - } - if (@file_exists($_id.$_ln_new_loc)) { - $_ln = $_ln_new_loc; - } - - if ($_ln) { - $msg = "Found Loader $_ln in extensions directory.$nl"; - return Array (true, $msg); - } - } - - echo $nl; - - if ($_ln) { - #echo "Trying to install Loader - this may produce an error...$nl$nl"; - dl($_ln); - - if(extension_loaded('ionCube Loader')) { - $msg = "The Loader was successfully installed and encoded files should be able to - automatically install the Loader when needed. No changes to your php.ini file - are required to use encoded files on this system.${nl}"; - return Array (true, $msg); - } else { - $msg = "The Loader was not installed.$nl"; - return Array (false, $msg); - } - } else { - $msg = "Run-time loading should be possible on your system but no suitable Loader - was found.$nl$nl . The $_os Loader for PHP $_php_family releases is required.$nl"; - return Array (true, $msg); - } - } - } - return Array (false, $msg); -} -} -?> \ No newline at end of file diff --git a/themes/default/blocks/email_template_translate/add.tpl b/themes/default/blocks/email_template_translate/add.tpl index 77cfc518..e99e65ea 100644 --- a/themes/default/blocks/email_template_translate/add.tpl +++ b/themes/default/blocks/email_template_translate/add.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", relative_urls: 'false', width : "100%" }); diff --git a/themes/default/blocks/email_template_translate/view.tpl b/themes/default/blocks/email_template_translate/view.tpl index 2a74f7a6..5b421361 100644 --- a/themes/default/blocks/email_template_translate/view.tpl +++ b/themes/default/blocks/email_template_translate/view.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", relative_urls: 'true', width : "100%" }); diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_8.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_8.tpl new file mode 100644 index 00000000..bf7f3b0c --- /dev/null +++ b/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_8.tpl @@ -0,0 +1,33 @@ +{$list->unserial($host_server.provision_plugin_data, "plugin_data")} + + + + + + + + + + + + + + + + + + + + + + +
* Plesk Port + + eg: 8443
* Plesk Host + + eg: server.com
* Plesk Login + + eg: admin
* Plesk Password + +
* = required fields 
+ \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_8.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_8.tpl new file mode 100644 index 00000000..0f986cb7 --- /dev/null +++ b/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_8.tpl @@ -0,0 +1,36 @@ +{$list->unserial($product.host_provision_plugin_data, "plugin_data")} + + + + + + + + + + + + + + + + + + + + + + + + + +
   
IP Based Plan? + { $list->bool("product_host_provision_plugin_data[ip_based]", $plugin_data.ip_based, "form_menu") } +
   
Client/Domain Templates 
Client template + +
Domain template + +
+ + + diff --git a/themes/default/blocks/invoice/view.tpl b/themes/default/blocks/invoice/view.tpl index c44deb58..f1cda4f9 100644 --- a/themes/default/blocks/invoice/view.tpl +++ b/themes/default/blocks/invoice/view.tpl @@ -330,11 +330,11 @@ title_service {/translate} | - {if $list->is_installed("affiliate") } | + {if $list->is_installed("affiliate") } {translate module=invoice} title_affiliate - {/translate} + {/translate} | {/if} @@ -1228,4 +1228,4 @@ showIFrame('iframeInvoice',getPageWidth(600),200,'?_page=invoice:refund&id='+invoice_id+'&_escape=1&amount='+amt); } -{/literal} \ No newline at end of file +{/literal} diff --git a/themes/default/blocks/newsletter/add.tpl b/themes/default/blocks/newsletter/add.tpl index 55132dd1..23e75b5f 100644 --- a/themes/default/blocks/newsletter/add.tpl +++ b/themes/default/blocks/newsletter/add.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", width : "100%" }); diff --git a/themes/default/blocks/newsletter/send.tpl b/themes/default/blocks/newsletter/send.tpl index 81f45da5..a6ad87f5 100644 --- a/themes/default/blocks/newsletter/send.tpl +++ b/themes/default/blocks/newsletter/send.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", width : "100%" }); diff --git a/themes/default/blocks/newsletter/view.tpl b/themes/default/blocks/newsletter/view.tpl index 88ebe163..fe82333f 100644 --- a/themes/default/blocks/newsletter/view.tpl +++ b/themes/default/blocks/newsletter/view.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", width : "100%" }); diff --git a/themes/default/blocks/product/add.tpl b/themes/default/blocks/product/add.tpl index c4c0e529..5e9da7b3 100644 --- a/themes/default/blocks/product/add.tpl +++ b/themes/default/blocks/product/add.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", relative_urls: 'false', width : "100%" }); diff --git a/themes/default/blocks/product_cat_translate/add.tpl b/themes/default/blocks/product_cat_translate/add.tpl index 3a8bd470..35db49b2 100644 --- a/themes/default/blocks/product_cat_translate/add.tpl +++ b/themes/default/blocks/product_cat_translate/add.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", width : "100%" }); diff --git a/themes/default/blocks/product_cat_translate/view.tpl b/themes/default/blocks/product_cat_translate/view.tpl index fb2469ae..2edb8776 100644 --- a/themes/default/blocks/product_cat_translate/view.tpl +++ b/themes/default/blocks/product_cat_translate/view.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", width : "100%" }); diff --git a/themes/default/blocks/product_translate/edit.tpl b/themes/default/blocks/product_translate/edit.tpl index d04fe9e8..711ef497 100644 --- a/themes/default/blocks/product_translate/edit.tpl +++ b/themes/default/blocks/product_translate/edit.tpl @@ -6,22 +6,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", relative_urls: 'true', width : "100%" }); diff --git a/themes/default/blocks/static_page_translate/add.tpl b/themes/default/blocks/static_page_translate/add.tpl index cd78e707..76e9c22a 100644 --- a/themes/default/blocks/static_page_translate/add.tpl +++ b/themes/default/blocks/static_page_translate/add.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", relative_urls: 'true', width : "100%" }); diff --git a/themes/default/blocks/static_page_translate/view.tpl b/themes/default/blocks/static_page_translate/view.tpl index 3b9bdc6a..75e4593c 100644 --- a/themes/default/blocks/static_page_translate/view.tpl +++ b/themes/default/blocks/static_page_translate/view.tpl @@ -4,22 +4,18 @@ tinyMCE.init({ mode : "specific_textareas", theme : "advanced", - plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print", + plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print", theme_advanced_buttons1_add : "fontselect,fontsizeselect", - theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor", + theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", - theme_advanced_buttons3_add : "iespell,flash,advhr", + theme_advanced_buttons3_add : "iespell,media,advhr", theme_advanced_toolbar_location : "bottom", theme_advanced_toolbar_align : "center", content_css : "themes/default/style.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]", - external_link_list_url : "example_link_list.js", - external_image_list_url : "example_image_list.js", - flash_external_list_url : "example_flash_list.js", - file_browser_callback : "fileBrowserCallBack", relative_urls: 'true', width : "100%" }); diff --git a/themes/default/template.tpl b/themes/default/template.tpl index 23be5411..2cb83661 100644 --- a/themes/default/template.tpl +++ b/themes/default/template.tpl @@ -44,6 +44,7 @@ {if $smarty.const.SHOW_CONTACT_LINK} | {translate}contact{/translate} {/if} {if $smarty.const.SHOW_AFFILIATE_LINK} | {translate}affiliates{/translate} {/if} {if $smarty.const.SHOW_TICKET_LINK} | {translate}tickets{/translate} {/if} + | {translate}faqs{/translate} {if $SESS_LOGGED} | {translate}account{/translate} @@ -99,4 +100,4 @@ - \ No newline at end of file +