You are viewing a post by filaryan. 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);