2008-04-10 09:36:21

Burningheart
» FTalkGeek
FTalk Level: zero
1164
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-

ni bang code2 yg andy trakhir masukin ke js utama na bang :thumbsdown: [spoiler][b]/******** RANDOMIZED FRIENDS ********/ if (typeof Ffetcher == "undefined") { Ffetcher = {}; } Ffetcher = { friends: new Array(), pages: null, maxfriends: null, container: null, cached: new Array(), display: 10, init: function() { var num=document.links; for(var x=0;x<num.length;x++) { if (num[x].href.match(/\/friends\/[\d]+?/)) { var t=/\(([\d]+?)\)/; this.maxfriends=t.exec(num[x].innerHTML)[1]; break; } } this.pages=Math.floor(this.maxfriends/30); var htm="<div id='fcontainer' class='boxcontent'></div>"; addBox("RIGHT","Friends",htm,"frbox","18"); document.getElementById("content_frbox").innerHTML+="<div class='viewall'><a href='javascript: void(Ffetcher.more())'>More Random Friends</a></div>"; this.container=document.getElementById("fcontainer"); this.fetch(0); }, fetch: function(page) { document.getElementById("frbox").childNodes[0].innerHTML="Friends Loading... Pls wait..."; processAjaxRequest("GET",TRACKER.base_domain+"/friends/"+pageOwnerID+"/"+page,true,null, "parseFriends",page); }, show: function() { this.container.innerHTML=""; this.friends.sort(randOrd); for(var x=0;x<this.display;x++) { this.container.innerHTML+=this.friends[x]; } }, more: function() { if(this.cached.length<(this.pages+1)) { var temp; do { temp=Math.ceil(Math.random()*(this.pages)); }while(this.cached.toString().indexOf(":"+temp+":")!=-1); this.fetch(temp); } else { this.show(); } } }; function parseFriends(htm,page) { if(!htm){ Ffetcher.fetch(page); return; } var r= /search1\x22>[\S\s]+?paginglinksmodule\x22>([\S\s]+?)<div class=\x22paginglinksmodule/; var temp=r.exec(htm)[1]; temp=temp.match(/<div class="flogriditem">[\S\s]+?<\/div>\n<\/div><\/div>/g); for(var x=0;x<temp.length;x++) { temp[x]=temp[x].replace("samsg_icon.gif>","samsg_icon.gif />"); temp[x]=temp[x].replace(/<a /g,"<a target=_blank "); if(!temp[x].match("nophoto")) Ffetcher.friends.push(temp[x]); } Ffetcher.cached.push(":"+page+":"); document.getElementById("frbox").childNodes[0].innerHTML="<a href=\"#\" onClick=\"show_hide('content_frbox'); return false\"><div>Randomized Friends</div></a> "; show_hide('content_frbox'); Ffetcher.show(); } [/b][/spiler] sama ini bang cek fs :thumbsdown: [b][spoiler]/******** CEK FS ********/ var header="CEK FS"; var code="<div><form>"+ "Friendster ID : <input type='text' id='txtcekfs' value='"+pageViewerID+"' maxlength='8' size='8' style='padding: 2px 0px 2px 0px;margin-bottom:2px; text-align:center; color: #CCCCCC; border: 1px solid #808080; background-color: #404040;' /> "+ " <input type='button' class='tombol' id='cek_0' onclick='cekfs()' value=':: Profile ::' />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_0\" onclick=\"show_hide_cekid('outputcekfs')\" value=\"Open/Close\" /><br />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_1\" onclick=\"cek2('1')\" value=\" Photos \" />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_2\" onclick=\"cek2('2')\" value=\" Friends \" />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_6\" onclick=\"cek2('6')\" value=\" More About \" />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_15\" onclick=\"cek2('15')\" value=\" Connections \" /><br />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_18\" onclick=\"cek2('18')\" value=\" Comments \" />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_7\" onclick=\"cek2('7')\" value=\" Fan \" />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_8\" onclick=\"cek2('8')\" value=\" Groups \" />"+ " <input type=\"button\" class=\"tombol\" id=\"cek_13\" onclick=\"cek2('13')\" value=\" Blog \" />"+ "</form><br /><div id='outputcekfs'></div></div>"; addBox("<a href=\"#\" onClick=\"show_hide('content_custombox_132'); return false\"><div>.::CEK FS::.</div></a>",code,"custombox_132","right"); show_hide("content_custombox_132");[/b][/spoiler] fungsi cek fs na :thumbsdown: [spoiler][b] /******** CEK FS ID ********/ function cekfs() { if(pageViewerID!="") CEKFSID.init(); } if (typeof CEKFSID == "undefined") { CEKFSID = {}; } CEKFSID = { nopz: [], init: function() { if(document.getElementById("txtcekfs") != null) { document.getElementById("outputcekfs").innerHTML="<b><blink>Tunggu bentar ...</blink></b>"; var idnya=document.getElementById("txtcekfs").value; this.ajaxRequest("http://"+location.hostname+"/modules/module.php?_pmr=a&_pmmo=0&uid="+idnya,CEKFSID.nopzcek,null); } }, nopzcek: function(htm) { if (htm.replace(/^\s*|\s*$/g,"") === null) { alert("Pesan Error: maap, gagal ...!");return; }else if (htm) { try { var cekPhoto = htm.match(/<profile_photo>[\S\s]+?<\/profile_photo>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekUID = htm.match(/<\/country><uid>[\S\s]+?<\/uid>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekGender = htm.match(/<gender>[\S\s]+?<\/gender>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekAge = htm.match(/<age>[\S\s]+?<\/age>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekFirstName = htm.match(/<firstname>[\S\s]+?<\/firstname>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekLastName = htm.match(/<lastname>[\S\s]+?<\/lastname>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekDOB = htm.match(/<dob>[\S\s]+?<\/dob>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekSinceMonth = htm.match(/<membersinceMonth>[\S\s]+?<\/membersinceMonth>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekSinceYear = htm.match(/<membersinceYear>[\S\s]+?<\/membersinceYear>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekFriends = htm.match(/<friendcount>[\S\s]+?<\/friendcount>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekViews = htm.match(/<pageviews><total>[\S\s]+?<\/total>/gim)[0].replace(/<[\S\s]+?>/gim, ""); var cekSince = htm.match(/<since>[\S\s]+?<\/since>/gim)[0].replace(/<[\S\s]+?>/gim, ""); this.nopz = document.createElement("DIV"); this.nopz.align = "center"; this.nopz.style.width="300px"; this.nopz.appendChild(document.createElement("a")); this.nopz.getElementsByTagName("a")[0].href = "/"+cekUID; this.nopz.getElementsByTagName("a")[0].target = "_blank"; this.nopz.getElementsByTagName("a")[0].title = cekFirstName+" "+cekLastName; this.nopz.getElementsByTagName("a")[0].appendChild(document.createElement("img")); this.nopz.getElementsByTagName("img")[0].src = cekPhoto; if (cekGender=="m") cekGender="Male"; if (cekGender=="f") cekGender="Female"; this.nopz.appendChild(document.createElement("br")); this.nopz.appendChild(document.createElement("span")); this.nopz.getElementsByTagName("span")[0].className = "q"; this.nopz.getElementsByTagName("span")[0].innerHTML = cekGender+ " ("+cekAge+")"; this.nopz.appendChild(document.createElement("hr")); this.nopz.appendChild(document.createElement("span")); this.nopz.getElementsByTagName("span")[1].className = "q"; this.nopz.getElementsByTagName("span")[1].innerHTML = "First Name : "+cekFirstName; this.nopz.appendChild(document.createElement("br")); this.nopz.appendChild(document.createElement("span")); this.nopz.getElementsByTagName("span")[2].className = "q"; this.nopz.getElementsByTagName("span")[2].innerHTML = "Last Name : "+cekLastName; this.nopz.appendChild(document.createElement("br")); this.nopz.appendChild(document.createElement("span")); this.nopz.getElementsByTagName("span")[3].className = "q"; this.nopz.getElementsByTagName("span")[3].innerHTML = "Date of Birth : "+cekDOB; this.nopz.appendChild(document.createElement("br")); this.nopz.appendChild(document.createElement("span")); this.nopz.getElementsByTagName("span")[4].className = "q"; this.nopz.getElementsByTagName("span")[4].innerHTML = "Member Since : " + cekSinceMonth + " " + cekSinceYear ; this.nopz.appendChild(document.createElement("hr")); this.nopz.appendChild(document.createElement("span")); this.nopz.getElementsByTagName("span")[5].className = "q"; this.nopz.getElementsByTagName("span")[5].innerHTML = "Friends : "+cekFriends; this.nopz.appendChild(document.createElement("br")); this.nopz.appendChild(document.createElement("span")); this.nopz.getElementsByTagName("span")[6].className = "q"; this.nopz.getElementsByTagName("span")[6].innerHTML = cekViews+" views since "+cekSince; document.getElementById("outputcekfs").innerHTML=""; document.getElementById("outputcekfs").appendChild(this.nopz); }catch(e) {} } }, ajaxRequest: function(url,func,handler) { var httprequest = window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); httprequest.onreadystatechange = function() { if (httprequest.readyState == 4) { if (httprequest.status == 200) { func(httprequest.responseText,handler); } } }; httprequest.open("GET", url, true); httprequest.send(null); } }; function cek2(boxid) { if(pageViewerID!="") CEK2.init(boxid); } if (typeof CEK2 == "undefined") { CEK2 = {}; } CEK2 = { nopz: [], init: function(boxid) { if(document.getElementById("txtcekfs") != null) { document.getElementById("outputcekfs").innerHTML="<b><blink>Tunggu bentar ...</blink></b>"; var idnya=document.getElementById("txtcekfs").value; this.ajaxRequest("http://"+location.hostname+"/modules/module.php?_pmr=h&_pmmo="+boxid+"&uid="+idnya, CEK2.nopzcek, null); } }, nopzcek: function(htm) { if (htm.replace(/^\s*|\s*$/g,"") === null) { alert("Pesan Error: maap, gagal ...!");return; }else if (htm) { try { var homenya = "a href=\"http://www.friendster.com/" var cekother = htm.substr(3).replace(/content_/gi,"cekx"); cekother = cekother.replace(/a href="\/photo/gi,homenya+"photo"); cekother = cekother.replace(/a href="\/friend/gi,homenya+"friend"); cekother = cekother.replace(/a href="\/group/gi,homenya+"group"); cekother = cekother.replace(/<script>document.write\(fMakeDate\("/gi,""); cekother = cekother.replace(/","","%M%M\/%D%D\/%y%y%y%y %h:%m%m %a"\)\);<\/script>/gi,""); this.nopz = document.createElement("DIV"); this.nopz.innerHTML=cekother; this.nopz.style.width="450px"; document.getElementById("outputcekfs").innerHTML=""; document.getElementById("outputcekfs").appendChild(this.nopz); }catch(e) {} } }, ajaxRequest: function(url,func,handler) { var httprequest = window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); httprequest.onreadystatechange = function() { if (httprequest.readyState == 4) { if (httprequest.status == 200) { func(httprequest.responseText,handler); } } }; httprequest.open("GET", url, true); httprequest.send(null); } }; function show_hide_cekid(isicek) { if (document.getElementById(isicek)) { if (document.getElementById(isicek).style.display == 'none') { document.getElementById(isicek).style.display = 'block'; } else { document.getElementById(isicek).style.display = 'none'; } } } [/b][/spoiler] dan ini bagian cek fs yg di css na bang :thumbsdown: [spoiler][b]/******** CEK FS ********/ #outputcekfs * {background:none !important;} #cekx8, #cekx18 {text-align:left} .tombol{ border-top: 1px #888888 solid; border-left: 1px #666666 solid; border-right: 1px #222222 solid; border-bottom: 1px #000000 solid; background-color: #444444; color: #CCCCCC; font-weight: bold; margin: 3px; padding: 0px 3px; } .tombol:hover{ background-color: #666666; }[/b][/spoiler] dan ini buat random friend na :thumbsdown: [spoiler][b] #fcontainer * { padding: 0px; margin: 0px; font-size: 9px } .thumbnaildelete { display: none } #fcontainer { text-align: center; height: 225px } #fcontainer .flogriditem { width: 75px; overflow: hidden; margin: 4px; height: 75px } .inlinelt { position: relative; left: -2px; top: 1px } .flo50 .ic .imgblock a img { height: 80px } .flo50 .ic .imgblock { height: 80px; width: 80px; overflow: hidden; background: #000000; border: 2px #ffffff solid; text-align: center; }[/b][/spoiler] itu smua code yg andy trkhir masukin ke js utama bang... tolong dunk di periksain dari mana tuh salah na code bang tolong bantuan na sory kalaok kepanjangan maafkan sebesar2 na :wallbash: sory sekali lagi kali andy ngulang2ngin postingan na:wallbash::wallbash: mau edit yg bagian atas tapi connecsi lola jadi na ngulang deh posting lagi buat tmn2 dan mod2 yg lain maafin kesalahan saya :wallbash: janjji gak ngulangin lagi

Last edited by Burningheart (2008-04-10 09:41:59)

Board footer

© 2024 F Talk

Current time is 03:36

[ 12 queries - 1.762 second ]
Privacy Policy