Aşağıdaki kodlarda js içindeki ama sorunu çözecek yok galiba
var nicUploadButton = nicEditorAdvancedButton.extend({ nicURI: "http://files.nicedit.com/", addPane: function() { this.im = this.ne.selectedInstance.selElm().parentTag("IMG"); this.myID = Math.round(Math.random() * Math.pow(10, 15)); this.requestInterval = 1000; this.uri = this.ne.options.uploadURI || this.nicURI; nicUploadButton.lastPlugin = this; this.myFrame = new bkElement("iframe").setAttributes({ width: "100%", height: "100px", frameBorder: 0, scrolling: "no" }).setStyle({ border: 0 }).appendTo(this.pane.pane); this.progressWrapper = new bkElement("div").setStyle({ display: "none", width: "100%", height: "20px", border: "1px solid #ccc" }).appendTo(this.pane.pane); this.progress = new bkElement("div").setStyle({ width: "0%", height: "20px", backgroundColor: "#ccc" }).setContent(" ").appendTo(this.progressWrapper); setTimeout(this.addForm.closure(this), 50) }, addForm: function() { var A = this.myDoc = this.myFrame.contentWindow.document; A.open(); A.write("<html><body>"); A.write('<form method="post" action="' + this.uri + "?id=" + this.myID + '" enctype="multipart/form-data">'); A.write('<input type="hidden" name="APC_UPLOAD_PROGRESS" value="' + this.myID + '" />'); if (this.uri == this.nicURI) { A.write('<div style="position: absolute; margin-left: 160px;"><img src="http://imageshack.us/img/imageshack.png" width="30" style="float: left;" /><div style="float: left; margin-left: 5px; font-size: 10px;">Yüklenen site</div></div>') } A.write('<div style="font-size: 14px; font-weight: bold; padding-top: 5px;">Resim Ekle</div>'); A.write('<input name="nicImage" type="file" style="margin-top: 10px;" /><a target="_blank" href="http://www.simgetasarim.net">Simge Tasarım</a> | <a href="http://www.birturku.com" target="_blank">Müzik-Video Arşivi</a>'); A.write("</form>"); A.write("</body></html>"); A.close(); this.myBody = A.body; this.myForm = $BK(this.myBody.getElementsByTagName("form")[0]); this.myInput = $BK(this.myBody.getElementsByTagName("input")[1]).addEvent("change", this.startUpload.closure(this)); this.myStatus = new bkElement("div", this.myDoc).setStyle({ textAlign: "center", fontSize: "14px" }).appendTo(this.myBody) }, startUpload: function() { this.myForm.setStyle({ display: "none" }); this.myStatus.setContent('<img src="http://files.nicedit.com/ajax-loader.gif" style="float: right; margin-right: 40px;" /><strong>Yükleniyor...</strong><br />Lütfen bekleyiniz'); this.myForm.submit(); setTimeout(this.makeRequest.closure(this), this.requestInterval) }, makeRequest: function() { if (this.pane && this.pane.pane) { nicUploadButton.lastPlugin = this; var A = new bkElement("script").setAttributes({ type: "text/javascript", src: this.uri + "?check=" + this.myID + "&rand=" + Math.round(Math.random() * Math.pow(10, 15)) }).addEvent("load", function() { A.parentNode.removeChild(A) }).appendTo(document.getElementsByTagName("head")[0]); if (this.requestInterval) { setTimeout(this.makeRequest.closure(this), this.requestInterval) } } }, setProgress: function(A) { this.progressWrapper.setStyle({ display: "block" }); this.progress.setStyle({ width: A + "%" }) }, update: function(C) { if (C == false) { this.progressWrapper.setStyle({ display: "none" }) } else { if (C.url) { this.setProgress(100); this.requestInterval = false; if (!this.im) { this.ne.selectedInstance.restoreRng(); var B = "javascript:nicImTemp();"; this.ne.nicCommand("insertImage", B); this.im = this.findElm("IMG", "src", B) } var A = parseInt(this.ne.selectedInstance.elm.getStyle("width")); if (this.im) { this.im.setAttributes({ src: C.url, width: (A && C.width) ? Math.min(A, C.width) : "" }) } this.removePane() } else { if (C.error) { this.requestInterval = false; this.setProgress(100); alert("Resim yüklenirken bir hata oluştu (" + C.error + ")."); this.removePane() } else { if (C.noprogress) { this.progressWrapper.setStyle({ display: "none" }); if (this.uri.indexOf("http:") == -1 || this.uri.indexOf(window.location.host) != -1) { this.requestInterval = false } } else { this.setProgress(Math.round((C.current / C.total) * 75)); if (C.interval) { this.requestInterval = C.interval } } } } } } }); nicUploadButton.statusCb = function(A) { nicUploadButton.lastPlugin.update(A) }; nicEditors.registerPlugin(nicPlugin, nicUploadOptions);
var nicXHTML=bkClass.extend({stripAttributes:["_moz_dirty","_moz_resizing","_extended"],noShort:["style","title","script","textarea","a"],cssReplace:{"font-weight:bold;":"strong","font-style:italic;":"em"},sizes:{1:"xx-small",2:"x-small",3:"small",4:"medium",5:"large",6:"x-large"},construct:function(A){this.ne=A;if(this.ne.options.xhtml){A.addEvent("get",this.cleanup.closure(this))}},cleanup:function(A){var B=A.getElm();var C=this.toXHTML(B);A.content=C},toXHTML:function(C,A,L){var G="";var O="";var P="";var I=C.nodeType;var Q=C.nodeName.toLowerCase();var N=C.hasChildNodes&&C.hasChildNodes();var B=new Array();switch(I){case 1:var H=C.attributes;switch(Q){case"b":Q="strong";break;case"i":Q="em";break;case"font":Q="span";break}if(A){for(var F=0;F<H.length;F++){var K=H[F];var M=K.nodeName.toLowerCase();var D=K.nodeValue;if(!K.specified||!D||bkLib.inArray(this.stripAttributes,M)||typeof (D)=="function"){continue}switch(M){case"style":var J=D.replace(/ /g,"");for(itm in this.cssReplace){if(J.indexOf(itm)!=-1){B.push(this.cssReplace[itm]);J=J.replace(itm,"")}}P+=J;D="";break;case"class"

=D.replace("Apple-style-span","");break;case"size"

+="font-size:"+this.sizes[D]+";";D="";break}if(D){O+=" "+M+'="'+D+'"'}}if(P){O+=' style="'+P+'"'}for(var F=0;F<B.length;F++){G+="<"+B[F]+">"}if(O==""&&Q=="span"){A=false}if(A){G+="<"+Q;if(Q!="br"){G+=O}}}if(!N&&!bkLib.inArray(this.noShort,M)){if(A){G+=" />"}}else{if(A){G+=">"}for(var F=0;F<C.childNodes.length;F++){var E=this.toXHTML(C.childNodes[F],true,true);if(E){G+=E}}}if(A&&N){G+="</"+Q+">"}for(var F=0;F<B.length;F++){G+="</"+B[F]+">"}break;case 3:G+=C.nodeValue;break}return G}});nicEditors.registerPlugin(nicXHTML);
var nicBBCode=bkClass.extend({construct:function(A){this.ne=A;if(this.ne.options.bbCode){A.addEvent("get",this.bbGet.closure(this));A.addEvent("set",this.bbSet.closure(this));var B=this.ne.loadedPlugins;for(itm in B){if(B[itm].toXHTML){this.xhtml=B[itm]}}}},bbGet:function(A){var B=this.xhtml.toXHTML(A.getElm());A.content=this.toBBCode(B)},bbSet:function(A){A.content=this.fromBBCode(A.content)},toBBCode:function(B){function A(D,C){B=B.replace(D,C)}A(/\n/gi,"");A(/<strong>(.*?)<\/strong>/gi,"
$1");A(/<em>(.*?)<\/em>/gi,"
$1");A(/<span.*?style="text-decoration:underline;">(.*?)<\/span>/gi,"
$1");A(/<ul>(.*?)<\/ul>/gi,"
");A(/<li>(.*?)<\/li>/gi,"[*]$1[]");A(/<ol>(.*?)<\/ol>/gi,"
- $1
");A(/<img.*?src="(.*?)".*?>/gi,"
");A(/<a.*?href="(.*?)".*?>(.*?)<\/a>/gi,"
$2");A(/<br.*?>/gi,"\n");A(/<.*?>.*?<\/.*?>/gi,"");return B},fromBBCode:function(A){function B(D,C){A=A.replace(D,C)}B(/\[b\](.*?)\[\/b\]/gi,"<strong>$1</strong>");B(/\[i\](.*?)\[\/i\]/gi,"<em>$1</em>");B(/\[u\](.*?)\[\/u\]/gi,'<span style="text-decoration:underline;">$1</span>');B(/\[list\](.*?)\[\/list\]/gi,"<ul>$1</ul>");B(/\
- (.*?)\[\/list\]/gi,"<ol>$1</ol>");B(/\[\*\](.*?)\[\/\*\]/gi,"<li>$1</li>");B(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');B(/\(.*?)\[\/url\]/gi,'<a href="$1">$2</a>');B(/\n/gi,"<br />");return A}});nicEditors.registerPlugin(nicBBCode);
nicEditor=nicEditor.extend({floatingPanel:function(){this.floating=new bkElement("DIV").setStyle({position:"absolute",top:"-1000px"}).appendTo(document.body);this.addEvent("focus",this.reposition.closure(this)).addEvent("blur",this.hide.closure(this));this.setPanel(this.floating)},reposition:function(){var B=this.selectedInstance.e;this.floating.setStyle({width
parseInt(B.getStyle("width"))||B.clientWidth)+"px"});var A=B.offsetTop-this.floating.offsetHeight;if(A<0){A=B.offsetTop+B.offsetHeight}this.floating.setStyle({top:A+"px",left:B.offsetLeft+"px",display:"block"})},hide:function(){this.floating.setStyle({top:"-1000px"})}});
var nicCodeOptions = {
buttons : {
'xhtml' : {name : 'Kaynağı Düzenle', type : 'nicCodeButton'}
}
};
var nicCodeButton=nicEditorAdvancedButton.extend({width:"350px",addPane:function(){this.addForm({"":{type:"title",txt:"Kaynağı Düzenle"},code:{type:"content",value:this.ne.selectedInstance.getContent(),style:{width:"340px",height:"200px"}}})},submit:function(B){var A=this.inputs.code.value;this.ne.selectedInstance.setContent(A);this.removePane()}});nicEditors.registerPlugin(nicPlugin,nicCodeOptions);