2008-07-19 03:46:53

kiddy
» Banned
FTalk Level: zero
4822
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-

[quote=bang kanal]OK akan abang singkat biar lebih enak. FS kita yg sekarang ini kan biasanya pakai script mini/maxi. Dan itu semuanya berbasis document.getElementById. Kalau di tutorial bro Nopathz kan dipisahkan utk sidebox itu ada di onload handler sedang mainbox itu di luar onload handler (Bagian C). Nah sekarang itu harus dirubah semua. Semua script mini/maxinya (di luar script JS utama mini/maxi) harus berada di dalam onload handler smile Contohnya abang ambil script sederhana mini/maxi yg dikombinasikan dengan WVM : Tutorial bro Nopathz : [spoiler] function onProfileLoad() { //FRIENDS h=document.getElementById("2").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_2'); return false\"><div title=\"header=[FRIENDS LIST] body=[Hello "+pageViewerFName+". Click Here 2 C XXX's Friends]\">"+pageOwnerFName+"\'s Friends</div></a>"; show_hide('content_2'); //GROUPS h=document.getElementById("8").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_8'); return false\"><div title=\"header=[GROUPS LIST] body=[Hello "+pageViewerFName+". Click Here 2 C XXX's Groups List]\">"+pageOwnerFName+"\'s Groups</div></a>"; show_hide('content_8'); } /*TRACKER OBJECT*/ if (typeof TRACKER == "undefined") { TRACKER = {}; } TRACKER = { style: { filter: "chroma(color='#FFFFFF')", width: '285px', height: '650px', border: '0px', overflow: 'hidden' }, attributes: { frameborder: '0', allowtransparency: 'true' }, phplink: "URL PHP", exitmessage: "Thanks For Viewing "+pageViewerFName, /*do not edit below this line*/ /* WVMe Tracker Script by: Ken marfilla, http://profiles.friendster.com/mumbhaki,copyright 2007 Generated At, http://chibibo.elementfx.com copyright 2008 Credits to: Friendster.com, Friendstertalk.com, Renalvir http://renalvir.zuiken.net licensed under GNU General Public License, version 2 http://www.gnu.org/licenses/gpl.html Disclaimer: NO GUARANTEE and WARRANTY provided! For educational purposes only. Authors will not be liable of ANY damage through the use of this program */ base_domain: "http://profiles.friendster.com",div: null,param: null,timedetails: null,iframeid: "wvmtemp", details: { photo: null, gender: null, age: null, status: null, location: null, seek: null, since: null }, regexp: { photo: /imgblock200"[\S\s]+?img src="([\S\s]+?)"/i, gender: />([\S]*male)/i, age: /male, ([\d]*),/i, status: /male, [\d]*, ([\S\s]+?)<\/span>/i, location: /Location\: <\/span><a[\S\s]+?>([\S\s]+?)<\/a><\/li>/i, seek: /In\: <\/span>([\S\s]+?)<\/li>/i, since: /Since\: <\/span>([\S\s]+?)<\/li>/i }, init: function() { document.getElementById("navBg").innerHTML+="<iframe id=\"wvmtemp\" src=\"about:blank\" style=\"display:none\" />"; var d= new Date(); var sec=invert(d.getTimezoneOffset()*60); var hr=invert(d.getTimezoneOffset()/60); this.timedetails="oss="+sec+"&osh="+hr; var ifsrc=this.phplink+"?"+this.timedetails; var atr=""; var sty=""; for (val in this.attributes) { atr += val +"="+ this.attributes[val]+" "; } for (val in this.style) { sty += val +":"+ this.style[val]+";"; } try {this.div=document.createElement("<div>")} catch(e){this.div=document.createElement("div")} this.div.innerHTML="<center><iframe id=\"wvm\" "+atr+"src=\""+ifsrc+"\" style=\""+sty+"\"></iframe><br /><input type=\"button\" class=\"reloadbutt\" value=\"Refresh Tracker\" onclick=\"Reload();\" style=\"border: 1px #000000 solid; background-color: c9c9c9; margin: 3px;\"></center>"; if(pageViewerID!=pageOwnerID) if(pageViewerID!="")this.getDETAILS(); }, getDETAILS: function() { processAjaxRequest("GET",this.base_domain+"/user.php?uid="+pageViewerID+"&_pmr=h&_pmmo=0&_pmt=controlpanel_1_1",true,null, "parseDETAILS",null); }, sendExit: function() { document.getElementById(this.iframeid).src=this.phplink+this.param+"&exit=1"; alert(this.exitmessage); } }; function parseDETAILS(htm) { if(!htm) { TRACKER.getDETAILS(); return; }else { for (val in TRACKER.details) { try { TRACKER.details[val]=encodeURIComponent(new RegExp(TRACKER.regexp[val]).exec(htm)[1]); } catch(e) { TRACKER.details[val]=""; } } TRACKER.param="?owner="+pageOwnerID+"&id="+pageViewerID+"&name="+pageViewerFName+"&url="+TRACKER.details.photo+"&gender="+TRACKER.details.gender+"&age="+TRACKER.details.age+"&status="+TRACKER.details.status+"&country="+TRACKER.details.location+"&seek="+TRACKER.details.seek+"&since="+TRACKER.details.since; document.getElementById(TRACKER.iframeid).src=TRACKER.phplink+TRACKER.param; } } /*END TRACKER OBJECT*/ if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()}; TRACKER.init(); if(pageViewerID!=pageOwnerID) if(pageViewerID!="") document.write("<body onbeforeunload='TRACKER.sendExit()'>"); /*MISC FUNCTIONS*/ function urlencode(txt) { return txt.replace(/ /g,"%20").replace(/'/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E"); } function addBox (type,head,htm,id,sibling) { //by marfillaster //type "LEFT" | "RIGHT" //head header string //htm innerHTML string //id css_id string //sibling css_id_insertbefore string | null /* Available default Siblings LEFT 0 = controlpanel 1 = photos 13 = blogs 12 = reviews 6 = moreabout 18 = publiccomments 10 = scrapbook RIGHT 15 = meettrail 2 = friends 14 = googleads 7 = fan 8 = groups null - appends to last */ try { var li=document.createElement("li"); } catch(e) { var li=document.createElement("<li>"); } if(type=="LEFT") { var ul=document.getElementById("0").parentNode.parentNode; htm="<div class='boxcontent'>"+htm+"</div>"; } else var ul=document.getElementById("2").parentNode.parentNode; li.innerHTML="<div id='"+id+"' class='commonbox "+id+"'>"+ "<h2>"+head+"</h2>"+ "<div id='content_"+id+"'>"+ htm+ "</div>"+ "</div>"; if(sibling==null) ul.appendChild(li); else { sibling=document.getElementById(sibling).parentNode; ul.insertBefore(li,sibling); } } function processAjaxRequest(type,url,cont,param,handler,handlerparam) { //by marfillaster //type 'POST' | 'GET' //cont 'true' | 'false' //param string | null //handler string | null //handlerparam string |null if(handlerparam) handlerparam=","+handlerparam; else handlerparam=""; var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); if(handler) eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+handler+"(httprequest.responseText"+handlerparam+");}}"); httprequest.open( type, url, cont); if(type=="POST") { httprequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); httprequest.setRequestHeader("Content-length", param.length); httprequest.setRequestHeader("Connection", "close"); } httprequest.send(param); } function invert(x) { if(x>0) return parseInt("-"+x); else if(x<0) { x=x+""; return parseInt(x.substr(1,x.length-1)); } return 0; } function randOrd(){ return (Math.round(Math.random())-0.5); } function getElementsByClass(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp(searchClass); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } /*END MISC FUNCTIONS*/ //tracker refresher function Reload () { var f = document.getElementById('wvm'); f.src = f.src; } //CONTROLPANEL h=document.getElementById("controlpanel_header"); h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_0'); return false\"><div title=\"header=[PROFILE DATA] body=[Hello "+pageViewerFName+". Click Here 2 C The Real XXX]\">Profile Data</div></a>"; //PHOTOS h=document.getElementById("1").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_1'); return false\"><div title=\"header=[PHOTO GALLERY] body=[Hello "+pageViewerFName+". Click Here 2 C XXX's Photos]\">"+pageOwnerFName+"\'s Slide Photo Gallery</div></a>"; show_hide('content_1'); //BLOGS h=document.getElementById("13").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_13'); return false\"><div title=\"header=[BLOGS] body=[Hello "+pageViewerFName+". Click Here 2 Read XXX's Blogs]\">"+pageOwnerFName+"\'s Blogs</div></a>"; show_hide('content_13'); //MOREABOUT h=document.getElementById("6").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_6'); return false\"><div title=\"header=[ABOUT ME] body=[Hello "+pageViewerFName+". Click Here 2 Read More About XXX]\">More About "+pageOwnerFName+"</div></a>"; show_hide('content_6'); //PUBLICCOMMENTS h=document.getElementById("18").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_18'); return false\"><div title=\"header=[TESTIMONIALS & COMMENTS] body=[Hello "+pageViewerFName+". Click Here 2 Drop Some Comment For XXX]\">Slide Testimonials and Comments for "+pageOwnerFName+"</div></a>"; show_hide('content_18'); function show_hide(the_box) { if (document.getElementById(the_box)) { if (document.getElementById(the_box).style.display == 'none') { document.getElementById(the_box).style.display = 'block'; } else { document.getElementById(the_box).style.display = 'none'; } } }[/spoiler] [b] Nah kalau mau pakai JS linker on error nanti susunannya jadi :[/b] [spoiler] function onProfileLoad() { //FRIENDS h=document.getElementById("2").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_2'); return false\"><div title=\"header=[FRIENDS LIST] body=[Hello "+pageViewerFName+". Click Here 2 C XXX's Friends]\">"+pageOwnerFName+"\'s Friends</div></a>"; show_hide('content_2'); //GROUPS h=document.getElementById("8").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_8'); return false\"><div title=\"header=[GROUPS LIST] body=[Hello "+pageViewerFName+". Click Here 2 C XXX's Groups List]\">"+pageOwnerFName+"\'s Groups</div></a>"; show_hide('content_8'); //CONTROLPANEL h=document.getElementById("controlpanel_header"); h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_0'); return false\"><div title=\"header=[PROFILE DATA] body=[Hello "+pageViewerFName+". Click Here 2 C The Real XXX]\">Profile Data</div></a>"; //PHOTOS h=document.getElementById("1").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_1'); return false\"><div title=\"header=[PHOTO GALLERY] body=[Hello "+pageViewerFName+". Click Here 2 C XXX's Photos]\">"+pageOwnerFName+"\'s Slide Photo Gallery</div></a>"; show_hide('content_1'); //BLOGS h=document.getElementById("13").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_13'); return false\"><div title=\"header=[BLOGS] body=[Hello "+pageViewerFName+". Click Here 2 Read XXX's Blogs]\">"+pageOwnerFName+"\'s Blogs</div></a>"; show_hide('content_13'); //MOREABOUT h=document.getElementById("6").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_6'); return false\"><div title=\"header=[ABOUT ME] body=[Hello "+pageViewerFName+". Click Here 2 Read More About XXX]\">More About "+pageOwnerFName+"</div></a>"; show_hide('content_6'); //PUBLICCOMMENTS h=document.getElementById("18").getElementsByTagName("h2")[0]; h.innerHTML="<a href=\"#\" onClick=\"show_hide('content_18'); return false\"><div title=\"header=[TESTIMONIALS & COMMENTS] body=[Hello "+pageViewerFName+". Click Here 2 Drop Some Comment For XXX]\">Slide Testimonials and Comments for "+pageOwnerFName+"</div></a>"; show_hide('content_18'); } /*TRACKER OBJECT*/ if (typeof TRACKER == "undefined") { TRACKER = {}; } TRACKER = { style: { filter: "chroma(color='#FFFFFF')", width: '285px', height: '650px', border: '0px', overflow: 'hidden' }, attributes: { frameborder: '0', allowtransparency: 'true' }, phplink: "URL PHP", exitmessage: "Thanks For Viewing "+pageViewerFName, /*do not edit below this line*/ /* WVMe Tracker Script by: Ken marfilla, http://profiles.friendster.com/mumbhaki,copyright 2007 Generated At, http://chibibo.elementfx.com copyright 2008 Credits to: Friendster.com, Friendstertalk.com, Renalvir http://renalvir.zuiken.net licensed under GNU General Public License, version 2 http://www.gnu.org/licenses/gpl.html Disclaimer: NO GUARANTEE and WARRANTY provided! For educational purposes only. Authors will not be liable of ANY damage through the use of this program */ base_domain: "http://profiles.friendster.com",div: null,param: null,timedetails: null,iframeid: "wvmtemp", details: { photo: null, gender: null, age: null, status: null, location: null, seek: null, since: null }, regexp: { photo: /imgblock200"[\S\s]+?img src="([\S\s]+?)"/i, gender: />([\S]*male)/i, age: /male, ([\d]*),/i, status: /male, [\d]*, ([\S\s]+?)<\/span>/i, location: /Location\: <\/span><a[\S\s]+?>([\S\s]+?)<\/a><\/li>/i, seek: /In\: <\/span>([\S\s]+?)<\/li>/i, since: /Since\: <\/span>([\S\s]+?)<\/li>/i }, init: function() { document.getElementById("navBg").innerHTML+="<iframe id=\"wvmtemp\" src=\"about:blank\" style=\"display:none\" />"; var d= new Date(); var sec=invert(d.getTimezoneOffset()*60); var hr=invert(d.getTimezoneOffset()/60); this.timedetails="oss="+sec+"&osh="+hr; var ifsrc=this.phplink+"?"+this.timedetails; var atr=""; var sty=""; for (val in this.attributes) { atr += val +"="+ this.attributes[val]+" "; } for (val in this.style) { sty += val +":"+ this.style[val]+";"; } try {this.div=document.createElement("<div>")} catch(e){this.div=document.createElement("div")} this.div.innerHTML="<center><iframe id=\"wvm\" "+atr+"src=\""+ifsrc+"\" style=\""+sty+"\"></iframe><br /><input type=\"button\" class=\"reloadbutt\" value=\"Refresh Tracker\" onclick=\"Reload();\" style=\"border: 1px #000000 solid; background-color: c9c9c9; margin: 3px;\"></center>"; if(pageViewerID!=pageOwnerID) if(pageViewerID!="")this.getDETAILS(); }, getDETAILS: function() { processAjaxRequest("GET",this.base_domain+"/user.php?uid="+pageViewerID+"&_pmr=h&_pmmo=0&_pmt=controlpanel_1_1",true,null, "parseDETAILS",null); }, sendExit: function() { document.getElementById(this.iframeid).src=this.phplink+this.param+"&exit=1"; alert(this.exitmessage); } }; function parseDETAILS(htm) { if(!htm) { TRACKER.getDETAILS(); return; }else { for (val in TRACKER.details) { try { TRACKER.details[val]=encodeURIComponent(new RegExp(TRACKER.regexp[val]).exec(htm)[1]); } catch(e) { TRACKER.details[val]=""; } } TRACKER.param="?owner="+pageOwnerID+"&id="+pageViewerID+"&name="+pageViewerFName+"&url="+TRACKER.details.photo+"&gender="+TRACKER.details.gender+"&age="+TRACKER.details.age+"&status="+TRACKER.details.status+"&country="+TRACKER.details.location+"&seek="+TRACKER.details.seek+"&since="+TRACKER.details.since; document.getElementById(TRACKER.iframeid).src=TRACKER.phplink+TRACKER.param; } } /*END TRACKER OBJECT*/ if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()}; TRACKER.init(); if(pageViewerID!=pageOwnerID) if(pageViewerID!="") document.write("<body onbeforeunload='TRACKER.sendExit()'>"); /*MISC FUNCTIONS*/ function urlencode(txt) { return txt.replace(/ /g,"%20").replace(/'/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E"); } function addBox (type,head,htm,id,sibling) { //by marfillaster //type "LEFT" | "RIGHT" //head header string //htm innerHTML string //id css_id string //sibling css_id_insertbefore string | null /* Available default Siblings LEFT 0 = controlpanel 1 = photos 13 = blogs 12 = reviews 6 = moreabout 18 = publiccomments 10 = scrapbook RIGHT 15 = meettrail 2 = friends 14 = googleads 7 = fan 8 = groups null - appends to last */ try { var li=document.createElement("li"); } catch(e) { var li=document.createElement("<li>"); } if(type=="LEFT") { var ul=document.getElementById("0").parentNode.parentNode; htm="<div class='boxcontent'>"+htm+"</div>"; } else var ul=document.getElementById("2").parentNode.parentNode; li.innerHTML="<div id='"+id+"' class='commonbox "+id+"'>"+ "<h2>"+head+"</h2>"+ "<div id='content_"+id+"'>"+ htm+ "</div>"+ "</div>"; if(sibling==null) ul.appendChild(li); else { sibling=document.getElementById(sibling).parentNode; ul.insertBefore(li,sibling); } } function processAjaxRequest(type,url,cont,param,handler,handlerparam) { //by marfillaster //type 'POST' | 'GET' //cont 'true' | 'false' //param string | null //handler string | null //handlerparam string |null if(handlerparam) handlerparam=","+handlerparam; else handlerparam=""; var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); if(handler) eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+handler+"(httprequest.responseText"+handlerparam+");}}"); httprequest.open( type, url, cont); if(type=="POST") { httprequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); httprequest.setRequestHeader("Content-length", param.length); httprequest.setRequestHeader("Connection", "close"); } httprequest.send(param); } function invert(x) { if(x>0) return parseInt("-"+x); else if(x<0) { x=x+""; return parseInt(x.substr(1,x.length-1)); } return 0; } function randOrd(){ return (Math.round(Math.random())-0.5); } function getElementsByClass(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp(searchClass); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } /*END MISC FUNCTIONS*/ //tracker refresher function Reload () { var f = document.getElementById('wvm'); f.src = f.src; } function show_hide(the_box) { if (document.getElementById(the_box)) { if (document.getElementById(the_box).style.display == 'none') { document.getElementById(the_box).style.display = 'block'; } else { document.getElementById(the_box).style.display = 'none'; } } } [/spoiler] Intinya kalian harus bereksperimen sendiri dengan JS kalian karena abang juga begitu biggrin[/quote] hanya mau sambung lidah saja... ## yonda pake yang ni [url=http://www.balibersatu.com/layout/index3.html]NEH...........[/url]

Last edited by kiddy (2008-07-19 03:47:59)

Board footer

© 2024 F Talk

Current time is 06:50

[ 12 queries - 0.502 second ]
Privacy Policy