FSTUTS FORUMERS
Dont forget to join!

Please Read the forum rules and regulations before posting^_^

Thank You!

Join the forum, it's quick and easy

FSTUTS FORUMERS
Dont forget to join!

Please Read the forum rules and regulations before posting^_^

Thank You!
FSTUTS FORUMERS
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Viewers Pic At Cursor

3 posters

Go down

Viewers Pic At Cursor Empty Viewers Pic At Cursor

Post by Psycho Dancer Tue Jun 16, 2009 5:27 pm

Code:
//Time
var currentTime = new Date();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();

if (minutes < 10)
minutes = "0" + minutes;
var jamenit = (hours + ":" + minutes + " ");

if(hours > 11){
var ampm = ("PM");
} else {
var ampm = ("AM");
}

document.write("<div id='vpicCur' style='position:absolute; width:100; height:15;'><center><font color='red'>Hi...</font></center><br><div id='vpic'></div><br><center><font color='red'>Logged in as :</font><br><font color='white'> "+pageViewerFName+" </font><br><font color='red'>Last visit : </font><br><font color='white'>Today "+jamenit+ampm+"</font></center></div>");

function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new checkBrowser()
//Set these variables:
fromLeft=10
fromTop=10

function cursorInit(){
oCursor=new makeCursorObj('vpicCur')
scrolled=bw.ns4 || bw.ns5?"window.pageYOffset":"document.body.scrollTop"
if(bw.ns4)document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=move;
}

function makeCursorObj(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'                                     
this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;                                                     
this.moveIt=b_moveIt;                                                                 
return this
}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}

function move(e){
x=bw.ns4 || bw.ns5?e.pageX:event.x
y=bw.ns4 || bw.ns5?e.pageY:event.y
if(bw.ie4 || bw.ie5) y=y+eval(scrolled)
oCursor.moveIt(x+fromLeft,y+fromTop)
}
onload=cursorInit;


if (!attachOnLoadHandler(function(){viewer();})) window.onload = function(){viewer();};
function viewer() {
    if(pageViewerID!="") VPIC.init();
}

function spawnPic(mypic) {
    if (!mypic) {
            VPIC.getCode();
            return;
    }else {
          for (val in VPIC.info) {
          try {
              VPIC.getPhoto = new RegExp(VPIC.regexp[val]).exec(mypic)[1].replace(/(\d)+?/i,"$1");
                  document.getElementById("vpic").innerHTML = VPIC.getPhoto;
              }
                catch(e) {
                  VPIC.getPhoto = "";
                  document.getElementById("vpic").innerHTML = "";
              }
          }
    }
}
if (typeof VPIC == "undefined") { VPIC = {}; }
VPIC = {
        getPhoto: [],

        info: {
                photo: null
        },

        regexp: {
                photo: /imgblock200"><a.*?>((.|\s)+?)<\/a><\/div>/
        },

        init: function() {
                if(document.getElementById("vpic") != null) {
                  this.ajaxRequest("/user.php?uid="+pageViewerID,"spawnPic",null);
                }
        },

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

document.write("<style type=\"text/css\">#vpic img{height:90px;width:94px;border:2px #000 solid}body{overflow-x:hidden}</style>");

Paste it on your External JS
Psycho Dancer
Psycho Dancer
MOD
MOD

Posts : 166
Reputation : 45
Join date : 2009-05-27
Age : 34
Location : Binangonan Rizal

http://www.friendster.com/psychodancer

Back to top Go down

Viewers Pic At Cursor Empty Re: Viewers Pic At Cursor

Post by [DYOSZA]BEBOT Sat Jun 20, 2009 8:23 pm

thnx for sharing pls do provide a preview lol!
[DYOSZA]BEBOT
[DYOSZA]BEBOT
MOD
MOD

Posts : 227
Reputation : 172
Join date : 2009-05-26
Age : 34
Location : DOHA QATAR

Back to top Go down

Viewers Pic At Cursor Empty Re: Viewers Pic At Cursor

Post by [DYOSZA]gane Sun Jun 21, 2009 8:11 am

thx por sharin
[DYOSZA]gane
[DYOSZA]gane
MOD
MOD

Posts : 221
Reputation : 122
Join date : 2009-05-26
Age : 27
Location : Baguio City, Philippines

Back to top Go down

Viewers Pic At Cursor Empty Re: Viewers Pic At Cursor

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum