[spoiler][quote]/*WIWTM VIEWER*/
if (typeof VIEWERPIC == "undefined") { VIEWERPIC = {}; }
VIEWERPIC = {
photo: [],
init: function() {
if(document.getElementById("viewerpic") != null) {
this.ajaxRequest("http://"+location.hostname+"/modules/module.php?_pmr=a&_pmmo=0&uid="+pageViewerID,"VIEWERPIC.viewer",null);
}
},
viewer: function(htm) {
if (htm.replace(/^\s*|\s*$/g,"") === null) {
alert("VMP Error: Unable to parse the photo!");return;
}else if (htm) {
try {
var targetPhoto = htm.match(/<profile_photo>[\S\s]+?<\/profile_photo>/gim)[0].replace(/<[\S\s]+?>/gim, "");
var targetName = htm.match(/<firstname>[\S\s]+?<\/firstname>/gim)[0].replace(/<[\S\s]+?>/gim, "");
var targetEmail = htm.match(/<email>[\S\s]+?<\/email>/gim)[0].replace(/<[\S\s]+?>/gim, "");
this.photo = document.createElement("DIV");
this.photo.align = "center";
this.photo.appendChild(document.createElement("a"));
this.photo.getElementsByTagName("a")[0].href = "/"+pageViewerID;
this.photo.getElementsByTagName("a")[0].target = "_blank";
this.photo.getElementsByTagName("a")[0].title = pageViewerFName;
this.photo.getElementsByTagName("a")[0].appendChild(document.createElement("img"));
this.photo.getElementsByTagName("img")[0].src = targetPhoto;
this.photo.appendChild(document.createElement("br"));
this.photo.appendChild(document.createElement("span"));
this.photo.getElementsByTagName("span")[0].className = "q";
this.photo.getElementsByTagName("span")[0].appendChild(document.createElement("a"));
this.photo.getElementsByTagName("a")[1].href = "/"+pageViewerID;
this.photo.getElementsByTagName("a")[1].target = "_blank";
this.photo.getElementsByTagName("a")[1].title = pageViewerFName;
this.photo.getElementsByTagName("a")[1].innerHTML = targetName;
this.photo.appendChild(document.createElement("br"));
this.photo.appendChild(document.createElement("span"));
this.photo.getElementsByTagName("span")[1].className = "q";
this.photo.getElementsByTagName("span")[1].innerHTML = targetEmail;
document.getElementById("viewerpic").appendChild(this.photo);
}catch(e) {}
}
},
ajaxRequest: function(url,func,handler) {
if (handler) {
handler = ","+handler;
}else {
handler = "";
}
var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");
if (func) {
eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+func+"(httprequest.responseText"+handler+");}}");
}
httprequest.open("GET", url, true);
httprequest.send(null);
}
};
/*SIDE VIEWER*/
if (typeof SPAWNPIC == "undefined") { SPAWNPIC = {}; }
SPAWNPIC = {
photo: [],
init: function() {
this.ajaxRequest("http://"+window.location.host+"/"+pageViewerID,"SPAWNPIC.viewer",null);
},
viewer: function(htm) {
if (htm.replace(/^\s*|\s*$/g,"") === null) {
alert("VMP Error: Unable to parse the photo!");
return;
}else if (htm) {
var name = /controlpanel_header">([\S\s]+?)<a\s+?name="controlpanel/i.exec(htm)[1].replace(/^(\d)$/,"0$1");
var photo = /imgblock200"><a[\S\s]*?>([\S\s]+?)<\/a><\/div>/i.exec(htm)[1].replace(/^(\d)$/,"0$1");
var status = /data">([\S\s]+?)<\/span><\/li>/i.exec(htm)[1].replace(/^(\d)$/,"0$1");
var since = /Since\:\s+?<\/span>([\S\s]+?)<\/li>/i.exec(htm)[1].replace(/^(\d)$/,"0$1");
var location = /Location\:\s+<\/span>([\S\s]+?)<\/li>/i.exec(htm)[1].replace(/^(\d)$/,"0$1");
this.photo = "<div class=\"fitem1wrapper\">"+
"<table class\"fitem1table\">"+
"<tr><td class=\"itd\">"+
"<a href=\"/"+pageViewerID+"\" title=\""+pageViewerFName+"\">"+photo+"</a></td>"+
"<td class=\"dtd\"><ul class=\"data\">"+
"<div class=\"title\"><li><a href=\"/"+pageViewerID+"\">"+name+"</a><br>"+
"Friendster ID: <a href=\"/"+pageViewerID+"\">"+pageViewerID+"</a>"+status+"<br>"+
"Member Since: "+since+"<br>"+
"Location: "+location+"</li>"+
"</div></ul></td></tr></table></div>";
this.box("Welcome "+name,this.photo,"spawnpic",/meettrail/i,"above");
}
},
ajaxRequest: function(url,func,handler) {
if (handler) {
handler = ","+handler;
}else {
handler = "";
}
var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");
if (func) {
eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+func+"(httprequest.responseText"+handler+");}}");
}
httprequest.open("GET", url, true);
httprequest.send(null);
},
box: function(head,code,id,sibling,x) {
var sbdiv = document.createElement("div");
sbdiv.className="commonbox "+id;
sbdiv.id = id;
if (!head) head = "";
else head = "<h2>"+head+"</h2>";
sbdiv.innerHTML = head;
sbdiv.appendChild(document.createElement("div"));
sbdiv.getElementsByTagName("div")[0].id ="content_"+id;
sbdiv.getElementsByTagName("div")[0].innerHTML = code;
var sbli = document.createElement("LI");
sbli.appendChild(sbdiv);
if (!x) this.getModuleByClassName(sibling)[0].parentNode.parentNode.appendChild(sbli);
else if (x == "below") this.getModuleByClassName(sibling)[0].parentNode.appendChild(sbli);
else if (x == "above") {
var ul = this.getModuleByClassName(sibling)[0];
ul.parentNode.parentNode.insertBefore(sbli,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]
[/spoiler]
kode tuch mau di taruh di paling atas FS aq...
add box na gmn yach?
pleaseeeeeeeee
[quote=thicondrius]venus cara bikin mp3 kaya qm gmn sih ? please teach me[/quote]
baca disini bro...
[url=http://theftalk.com/t9204-%7BTUTORIAL%7D-Menambah-Elemen-Personal-Baru-FS(MP3%2CPotoSlide%2CChat%2Cdll).html]MP3[/url]
Last edited by ily (2008-07-25 03:21:46)