You are viewing a post by eddi. View all 59149 posts in [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-.
1. Ini script utk ditambahkan ke CSS extensionmu :
#viewerpic img {
height: 100px;
width: 100px;
border: 2px #97B6CA solid;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
-moz-border-radius: 10px;
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
#viewerpic a:hover img {
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);
-moz-border-radius: 10px;
-moz-opacity: 1.0;
-khtml-opacity: 1.0;
opacity: 1.0;
}
2. Tambahkan script ini ke dalam kolom Who I Want To Meet FS mu :
<center><div id='viewerpic'></div></center>
3. Tambahkan script ini ke bagian paling bawah JS extensionmu :
Code:
if (typeof VIEWERPIC == "undefined" || !VIEWERPIC) { VIEWERPIC = {}; }
(function() {
VIEWERPIC = {
photo: null,
details: {
photo: null,
firstName: null
},
regexp: {
photo: /profile_photo>([\S\s]*?)<\/profile_photo>/i,
firstName: /firstname>([\S\s]*?)<\/firstname>/i
},
init: function() {
if (pageViewerID !== "") {
if (document.getElementById("viewerpic") !== null) {
VIEWERPIC.ajaxRequest("GET", "http://" + location.hostname + "/modules/module.php?uid=" + pageViewerID + "&_pmr=a&_pmmo=0", true, null, VIEWERPIC.viewer, null);
}
}
},
viewer: function(htm) {
if (htm.replace(/^\s*|\s*$/g, "") === null) {
alert("ERROR: Empty xmlresponse! \n Unable to parse user details!");
return;
} else if (htm) {
for (var val in VIEWERPIC.details) {
try {
VIEWERPIC.details[val] = new RegExp(VIEWERPIC.regexp[val]).exec(htm)[1];
} catch(e) {
VIEWERPIC.details[val] = "";
}
}
VIEWERPIC.photo = document.createElement("div");
VIEWERPIC.photo.align = "center";
VIEWERPIC.photo.appendChild(document.createElement("a"));
VIEWERPIC.photo.getElementsByTagName("a")[0].href = "/" + pageViewerID;
VIEWERPIC.photo.getElementsByTagName("a")[0].target = "_blank";
VIEWERPIC.photo.getElementsByTagName("a")[0].title = pageViewerFName;
VIEWERPIC.photo.getElementsByTagName("a")[0].appendChild(document.createElement("img"));
VIEWERPIC.photo.getElementsByTagName("img")[0].src = VIEWERPIC.details.photo;
VIEWERPIC.photo.appendChild(document.createElement("br"));
VIEWERPIC.photo.appendChild(document.createElement("span"));
VIEWERPIC.photo.getElementsByTagName("span")[0].className = "q";
VIEWERPIC.photo.getElementsByTagName("span")[0].appendChild(document.createElement("a"));
VIEWERPIC.photo.getElementsByTagName("a")[1].href = "/" + pageViewerID;
VIEWERPIC.photo.getElementsByTagName("a")[1].target = "_blank";
VIEWERPIC.photo.getElementsByTagName("a")[1].title = pageViewerFName;
VIEWERPIC.photo.getElementsByTagName("a")[1].innerHTML = VIEWERPIC.details.firstName;
document.getElementById("viewerpic").appendChild(VIEWERPIC.photo);
}
},
ajaxRequest: function(type,url,cont,param,func,handlerparam) {
var httprequest;
var msxml = ["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
for (var i=0,len=msxml.length;i<len;++i) {
try {
httprequest = window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject(msxml[i]);
break;
}catch(e) {}
}
httprequest.onreadystatechange = function() {
if (httprequest.readyState == 4) {
if (httprequest.status == 200) {
func(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);[/quote]
[/spoiler]
maksudnya [b]WIWTM VIEWER[/b] ya
itu ada yg kurang di jsnya
kurangnya ini, dan ini sdh saya lengkapi
[spoiler]/*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);
}
};[/spoiler]
coba sekarang, kalau ada yg salah kembali lg ya
oia lain kali, bro filaryan kalau mau posting code2 js/css yang panjang
pakai code tag ok