2008-08-06 22:22:50

tubhi
» FTalker
FTalk Level: zero
112
0
1969-12-31

Re: [align=justify][b]bagi member yang ingin bertanya seputar tweaking FS, silahkan bertanya dan posting disini, tapi jangan lupa,,sebelum itu tolong [url=http://theftalk.com/t2744-%5BImportant%5D-

hahha masa gk tau si bro brandalz >.< makcud na tu ya buat ngerubah letak box mini viewer na ^_^ tu udah sama bro cetra tapi kok enggak ada add box na ya punya ku :paranoid: [quote]/* MINI VIEWER */ if (!attachOnLoadHandler(function() { mainVpic();})) window.onload = function() { mainVpic();}; function mainVpic() { if(pageViewerID!="") SPAWNPIC.init(); } if (typeof SPAWNPIC == "undefined") { SPAWNPIC = {}; } SPAWNPIC = { photo: [], li: [], ul: [], info: { name: null, photo: null, status: null, since: null, location: null }, regexp: { name: /controlpanel_header">([^@]+?)<a\s+name="controlpanel/i, photo: /imgblock200"><a[^@]*?>([^@]+?)<\/a><\/div>/i, status: /data">([^@]+?)<\/span><\/li>/i, since: /Since\:\s+<\/span>([^@]+?)<\/li>/i, location: /Location\:\s+<\/span>([^@]+?)<\/li>/i }, init: function() { this.ajaxRequest("/"+pageViewerID,"SPAWNPIC.viewer",null); }, viewer: function(ph) { if (ph.replace(/^\s*|\s*$/g,"") === "") { alert("VMP Error: Unable to parse the photo!"); return; }else if (ph) { for (val in this.info) { try { this.info[val] = new RegExp(this.regexp[val]).exec(ph)[1].replace(/^(\d)$/,"0$1"); }catch(e) { this.info[val] = ""; } } this.photo = "<div class=\"fitem1wrapper\">"+ "<table class\"fitem1table\">"+ "<tr>"+ "<td class=\"itd\">"+ "<a href=\"/"+pageViewerID+"\" title=\""+pageViewerFName+"\">"+ this.info.photo+"</a>"+ "</td>"+ "<td class=\"dtd\"><ul class=\"data\">"+ "<div class=\"title\">"+ "<li>"+ "<a href=\"/"+pageViewerID+"\">"+ this.info.name+"</a>\n"+ "Friendster ID: <a href=\"/"+pageViewerID+"\">"+pageViewerID+"</a>"+ this.info.status+"\n"+ "Member Since: "+this.info.since+"\n"+ "Location: "+this.info.location+"</li>"+ "</div>"+ "</ul>"+ "</td>"+ "</tr>"+ "</table>"+ "</div>"; this.photo = this.photo.replace(/\n/g,"<br />").replace(/<br>/gi,"<br />"); this.HTML("hEiii !!! : "+this.info.name,this.photo,"spawnpic",/friends/i,"above"); } }, ajaxRequest: function(url,ajaxfunc,handler) { if(handler) handler = ","+handler; else handler = ""; var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); if(ajaxfunc) eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+ajaxfunc+"(httprequest.responseText"+handler+");}}"); httprequest.open('GET', url, true); httprequest.send(null); }, HTML: function(head,code,id,sibling,x) { this.li = document.createElement("LI"); if (!head) head = ""; else head = "<h2>"+head+"</h2>"; this.li.innerHTML = "<div class=\"commonbox "+id+"\" id=\""+id+"\">"+ head+ "<div id=\"content_"+id+"\">"+ code+ "</div>"+ "</div>"; if (!x) this.getModuleByClassName(sibling)[0].parentNode.parentNode.appendChild(this.li); else if (x == "below") this.getModuleByClassName(sibling)[0].parentNode.appendChild(this.li); else if (x == "above") { this.ul = this.getModuleByClassName(sibling)[0]; this.ul.parentNode.parentNode.insertBefore(this.li,this.ul.parentNode); } }, getModuleByClassName: function(sClass) { var elm = []; var els = document.getElementsByTagName("*") || document.all; for (var j=0,k=els.length;j<k;j++) { if (new RegExp(sClass).test(els[j].className))elm.push(els[j]); } return elm; } };[/quote] kalo seperti yg di atas harus digimanain ya brow :thumbsup::thumbsup:

Last edited by tubhi (2008-08-06 22:24:05)

Board footer

© 2024 F Talk

Current time is 21:08

[ 13 queries - 0.657 second ]
Privacy Policy