[align=center]pertama2 gue mo trimakasi dulu utk my guru [b]feruzz[/b]

[/align]
dulu gue pikir tweaking FS bakal ke stop variasi nya, sekarang sejak hadir nya mootools kini tweking FS jangkaunnya lebih luas lagi

kalu kita liat dari scriptnya mootools[i](dalam friendster)[/i] merupakan gabungan dari php,css dan js liat aja ada dollar2nya trus css untuk friendster dan JS nya...
ayo , hari gini masi gak pake mootools, ketinggalan lo

[color=red] mootools lebih cepet ngeload daripada js biasa[/color]
gak usa takut gak ngerti , gue juga ambil sama seperti [url=http://theftalk.com/t15339-%7BTUTORIAL%7D-Kombinasi-JS-dan-WVM-%2B-Addbox-%28UPDATE-08-03-08%29.html]referensi bang kanal[/url]
ni kode mentahnya [quote][b]//bagian A[/b]
//js injection
Asset.javascript('[b]JS_URL[/b]');
//css injection
Asset.css('[b]CSS_URL[/b]');
window.addEvent('domready', function () {
[b]
//bagian B[/b]
//kode addbox taro sini contoh
//cbox
var cbox="<div align='center' id='cboxdiv'>"+
"<iframe frameborder='0' width='100%' height='305' src='YOUR CBOX MAIN SRC' marginheight='2' marginwidth='2' scrolling='auto' allowtransparency='yes' name='cboxmain' style='border:#DBE2ED 0px solid;' id='cboxmain'></iframe><br/>"+
"<iframe frameborder='0' width='100%' height='75' src='YOUR CBOX FORM SRC' marginheight='2' marginwidth='2' scrolling='no' allowtransparency='yes' name='cboxform' style='border:#DBE2ED 0px solid;border-top:0px' id='cboxform'></iframe>"+
"</div>";
[b]addBox("chatbox aku....", cbox, "teguh", "6");[/b]
});
function addBox(head, code, id, sibling) {
var h = $type(head) ? "<h2>" + head + "</h2>" : "",
sb = new Element("div", {
"id": id,
"class": "commonbox " + id
});
sb.setHTML(h + "<div id=\"content_" + id + "\">" + code + "</div>");
if (/left/i.test(sibling)) {
sb.inject($("0").getParent().getParent(), "after");
} else if (/right/i.test(sibling)) {
sb.inject($("2").getParent().getParent(), "after");
} else {
sb.inject($(sibling).getParent(), "before");
}
return sb;
}
[b]//bagian C[/b][/quote]
*ingat yang diatas itu bukan untuk pengguna wvm


[i]*perhatikan yang d bold bagian ini[/i] [b]addBox("chatbox aku....", cbox, "teguh", "6");[/b]
cukup nama header [i]chatbox aku....[/i]
dan samakan var nya [i]cbox[/i]
terus buat id nya tersera [i]teguh[/i]
posisinya diatas box apa dengan mengenal contentnya [b]"6"[/b]
*yup bener banget,jadi gak ada left ama right lagi, lebi simpel

[hr]

[b]pake wvm[/b]
thanks [url=http://theftalk.com/profile.php?id=79514]mas haris[/url] :rose:
kali ini kita ambil contoh wvm bang [b]nopz[/b] alias wvm 2.1
jadinya begini [quote][b]// BAGIAN A[/b]
function onProfileLoad () {
//addboxes here
[b]// BAGIAN B[/b]
[color=blue]addBox(pageOwnerFName+"\'s Visitors",TRACKER.div.innerHTML,"tracker","7");[/color]
}
/*TRACKER OBJECT*/
if (typeof TRACKER == "undefined") { TRACKER = {}; }
TRACKER = {
style: {
filter: "chroma(color='#FFFFFF')",
width: '300px',
height: '520px',
border: '0px',
overflow: 'hidden'
},
attributes: {
frameborder: '0',
allowtransparency: 'true'
},
phplink: "[b]URL_OF_TRACKER.PHP[/b]",
exitmessage: "Goodbye "+pageViewerFName,
/*do not edit below this line*/
/*
WVMv2.1
by marfillaster, copyright 2007 friendster.com/mumbhaki
credits: feruzz, renalvir(pimped), nopathz, friendstertalk.com, friendster.com
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. Author 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><\/li>/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() {
getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].innerHTML+="<iframe id=\""+this.iframeid+"\" src=\"about:blank\" style=\"display:none\"></iframe>";
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></center>";
if(pageViewerID!=pageOwnerID) if(pageViewerID!="")this.getDETAILS();
},
getDETAILS: function() {
ajaxRequest(this.base_domain + "/user.php?uid=" + pageViewerID, parseDETAILS);
},
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.replace(/m.jpg/gi,"t.jpg")+"&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;
}
}
window.addEvent('domready', function(){onProfileLoad();});
TRACKER.init();
if(pageViewerID!=pageOwnerID) if(pageViewerID!="") document.write("<body onbeforeunload='TRACKER.sendExit()'>");
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;
}
/*END TRACKER OBJECT*/
/*MISC FUNCTIONS*/
function urlencode(txt) {
return txt.replace(/ /g,"%20").replace(/'/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E");
}
function ajaxRequest(url, func) {
var req = new Ajax(url, {
method: 'get',
onComplete: function (htm) {
func(htm);
}
}).request();
}
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;
}
function addBox(head, code, id, sibling) {
var h = $type(head) ? "<h2>" + head + "</h2>" : "",
sb = new Element("div", {
"id": id,
"class": "commonbox " + id
});
sb.setHTML(h + "<div id=\"content_" + id + "\">" + code + "</div>");
if (/left/i.test(sibling)) {
sb.inject($("0").getParent().getParent(), "after");
} else if (/right/i.test(sibling)) {
sb.inject($("2").getParent().getParent(), "after");
} else {
sb.inject($(sibling).getParent(), "before");
}
return sb;
}
/*END MISC FUNCTIONS*/
//other codes goes here
// BAGIAN C[/quote]
ingat [color=blue]addBox(pageOwnerFName+"\'s Visitors",TRACKER.div.innerHTML,"tracker","7");[/color]
berbeda ama fungsi addbox yang sering kita jumpai,kini gak usa pake right atau left lagi
sekedar pemberitahuan apa aja si yang d ganti..noh..
ini <">jadi <">contoh lainnya <">diganti ama <">[hr]

[url=http://profiles.friendster.com/65742083]PREVIEW[/url]
[hr]
Last edited by teguh0203 (2008-10-05 11:34:31)