Home Friendster Mini Viewer Visitor Photo
Mini Viewer Visitor Photo Print
Tuesday, 24 June 2008 11:07

Trick ini untuk menampilkan photo atau picture orang yang mengunjungi profile kamu. Jadi begitu dia mengunjungi profilemu maka tampang doi akan terpampang di tampilan layout friendstermu. Biar lebih jelasnya bisa lihat hasilnya seperti gambar dibawah ini.

Untuk caranya sebenernya mudah karena tinggal copy paste script atau kodenya aja.

1. Copy kode dibawah ini ke BAGIAN C di dalam tracker.txt. Buat yang belum ngerti klik disini dulu.

//miniviewer_visitor
if (!attachOnLoadHandler(function() { mainVpic();})) window.onload = function() { mainVpic();};
function mainVpic() {
    if(pageViewerID !== "") SPAWNPIC.init();
}

if (typeof SPAWNPIC == "undefined") { SPAWNPIC = {}; }
SPAWNPIC = {
        photo: [], type: "commonbox",

        info: {
                name: null, photo: null, status: null, since: null, location: null
        },

        regexp: {
                name: /controlpanel_header">([^@]+?)<a\s+name="controlpanel/,
                photo: /imgblock200"><a[^@]*?>([^@]+?)<\/a><\/div>/,
                status: /data">([^@]+?)<\/span><\/li>/,
                since: /Since\:\s+<\/span>([^@]+?)<\/li>/,
                location: /Location\:\s+<\/span>([^@]+?)<\/li>/
        },

        init: function() {
            this.ajaxRequest("/"+pageViewerID,"SPAWNPIC.viewer",null);
        },

        viewer: function(mypic) {
                if (mypic.replace(/^\s*|\s*$/g,"") === "") {

                    alert("VMP Error: Unable to parse the photo!");
                    return;
                }else if (mypic) {
                    for (val in this.info) {
                         try {
                             this.info[val] = new RegExp(this.regexp[val]).exec(mypic)[1].replace(/^(\d)$/,"0$1");
                         }catch(e) {
                             this.info[val] = "";
                         }
                    }
                    this.photo = "<div class=\"fitem1wrapper\"><table class\"fitem1table\">"+
                                 "<tr><td class=\"itd\"><a href=\"/"+pageViewerID+"\" title=\""+pageViewerFName+"\">"+
                                 this.info.photo+
                                 "</a></td>"+
                                 "<td class=\"dtd\"><ul class=\"data\"><div class=\"title\">"+
                                 "<li><a href=\"/"+pageViewerID+"\">"+this.info.name+"</a>\n"+
                                 "My ID: <a href=\"/"+pageViewerID+"\">"+pageViewerID+"</a>"+
                                 this.info.status+"\n"+
                                 "Join: "+this.info.since+"\n"+
                                 "Cribs: "+this.info.location+"</li>"+
                                 "</div>"+
                                 "</ul></td></tr>"+
                                 "</table></div>";

                    this.photo = this.photo.replace(/\n/g,"<br />").replace(/<br>/gi,"<br />");
                    this.HTML("Greetings From "+this.info.name,this.photo,"spawnpic",/friends/i,"INSERTBEFORE");
                }
        },

        ajaxRequest: function(url,ajaxfunc,handler) {
                if(handler) handler = ","+handler;
                else handler = "";
                var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");

                if(ajaxfunc) eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+ajaxfunc+"(httprequest.responseText"+handler+");}}");
                httprequest.open('GET', url, true);
                httprequest.send(null);
        },

        HTML: function(header,code,id,sibling,insert) {
                var ul = this.getModuleByClassName(sibling)[0].parentNode;
                var li = document.createElement("LI");
                if (header) {
                    li.innerHTML = "<div class='"+this.type+"  "+id+"' id='"+id+"'>"+
                                   "<h2>"+header+"</h2>"+
                                   "<div id='content_"+id+"'>"+code+"</div>"+
                                   "</div>";
                } else li.innerHTML = "<div class='"+this.type+"  "+id+"' id='"+id+"'>"+code+"</div>";
                if (!insert) ul.parentNode.appendChild(li);
                else if (insert == "INSERTBEFORE") ul.parentNode.insertBefore(li,ul);
                else if (insert == "APPEND") ul.appendChild(li);
        },

        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;
        }
}

2. Copy kode dibawah ini kedalam external.css. Buat yang masih belom ngerti klik disini dulu.

/*Mini Viewer*/
#SPAWNPIC img {
height:105px;
width: 130px;
border: 1px #FFFFFF solid;
filter:alpha(opacity=100);
-moz-opacity: 1.0;
opacity: 1.0;
}

#SPAWNPIC a:hover img {
filter:alpha(opacity=70);  
-moz-opacity: 0.7;  
opacity: 0.7;
}

3. Copy URL dari external.css seperti gambar dibawah ini.

4. Buka file tracker.txt cari bagian kode seperti yang ditunjukkan dibawah ini.

//css injection
// change link to your external css extention optional
var mycss = document.createElement("link");
mycss.type = "text/css";
mycss.rel = "stylesheet";
mycss.href = "http://h1.ripway.com/racerkids/external.css";
mycss.media = "screen, print";
document.getElementsByTagName("head")[0].appendChild(mycss);

paste URL hasil copy tadi ke bagian yang berwarna kuning.

Credit : friendstertalk.com

Comments (0)

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
 

New Comment

Variasi Comment atau...
diganti aja settingannya .. masuk ke menu setti...
Making Linker for Fr...
ini mas linker update agustus >> http://h1.ripway....
Memperkecil / Compre...
download link nya ud bisa koq .. wink
Making Linker for Fr...
mas novan,..... bagi linker donk update yang terba...
Memperkecil / Compre...
smileyiya tuch.....ga' bizza di download koq............

Support