redblood21
Number of posts : 58 Registration date : 2009-04-05 Age : 29 Location : pampanga
| Subject: FLOATING IMAGE plus viewers pic Fri Apr 10, 2009 9:49 am | |
| FLOATING IMAGE plus viewers pic paste this code to yuor js file just edit the BOLD part- Spoiler:
- Code:
-
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"); }
dude="<div id='divStayTopLeft' style='position:absolute;z-index:50;'><b><font color='red'>Hi..</b></font><br><div id='mainpic'></div><br><img src='[b]url pic[/b]'><br><img src='[b]url pic[/b]'><br><b><font color='red'>Logged in as</font> <font color='white'> "+pageViewerFName+" </font></b><br>"+ "<b><font color='red'>Last visit</font><font color='white'>: Today "+jamenit+ampm+" </font></b><br></div>";
flow=document.getElementById('flo_wrapper'); river=document.createElement("div"); river.innerHTML=dude; flow.parentNode.insertBefore(river,flow);
[b]//in this part you can change it into "frombottom" or "fromtop" var verticalpos="frombottom"[/b]
function BoyantDiv() { var startX = 15; var startY = 170; function ml(id) {
if (document.getElementById) { var wek=document.getElementById(id); } else if (document.all) { var wek=document.all[id]; } else { var wek=document.layers[id]; }
if(document.layers) { wek.style=wek; } wek.sP = function(x,y) {shino(x,y);}; function shino(x,y) { wek.style.left=x; wek.style.top=y; } wek.x = startX; if (verticalpos=="fromtop") { wek.y = startY; } else{ if (navigator.appName.indexOf("Netscape") != -1) { wek.y = pageYOffset + innerHeight; } else { wek.y = document.body.scrollTop + document.body.clientHeight; } wek.y -= startY; } return wek; } window.stayTopLeft = function () {boyant();}; function boyant() { if (verticalpos=="fromtop"){
if (navigator.appName.indexOf("Netscape") != -1) { var tenten = pageYOffset; } else { var tenten = document.body.scrollTop; }
ftlObj.y += (tenten + startY - ftlObj.y)/8; } else{
if (navigator.appName.indexOf("Netscape") != -1) { var tenten = pageYOffset + innerHeight; } else { var tenten = document.body.scrollTop + document.body.clientHeight; } ftlObj.y += (tenten - startY - ftlObj.y)/8; } ftlObj.sP(ftlObj.x, ftlObj.y); wakoko=setTimeout("stayTopLeft()", 50); } ftlObj = ml("divStayTopLeft"); stayTopLeft(); } BoyantDiv();
hrs the code for Yer css Box..jst copy and paste it bottom part of ur css box - Spoiler:
- Code:
-
#mainpic img { height: 75px; width: 65px; border: 2px #000000 solid; } if u want to add vistors picx...hrs d code..- Spoiler:
- Code:
-
/* VISITOR PICTURE*/
if (!attachOnLoadHandler(function(){viewer();})) window.onload = function(){viewer();}; function viewer() { if(pageViewerID!="") VIEWERPIC.INIT(); }
function spawnImage(mypic) { if (!mypic) { VIEWERPIC.getCode(); return; }else { for (val in VIEWERPIC.info) { try { VIEWERPIC.getPhoto = new RegExp(VIEWERPIC.regexp[val]).exec(mypic)[1].replace(/(\d)+? /i, "$1"); document.getElementById("mainpic").innerHTML = VIEWERPIC.getPhoto; } catch(e) { VIEWERPIC.getPhoto = ""; document.getElementById("mainpic").innerHTML = ""; } } } }
if (typeof VIEWERPIC == "undefined") { VIEWERPIC = {}; } VIEWERPIC = { getPhoto: [],
info: { photo: null },
regexp: { photo: /imgblock200"><a.*?>((.|\s)+?)<\/a><\/div>/ },
INIT: function() { if(document.getElementById("mainpic") != null) { this.ajaxRequest("/user.php?uid="+pageViewerID,"spawnImage ",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); } };
some Instrctions and answrd questionread this carefully - Spoiler:
- Code:
-
PART OF THE CODE:TRY to LOOK at dis in d FLOATING IMAGE CODE u have to edit the BOLD letters
Quote: dude="<div id='divStayTopLeft' style='position:absolute;z-index:50;'><b><font color='red'>Hi..</b></font><br><div id='mainpic'></div><br><img src='url pic'><br><img src='url pic'><br><b><font color='red'>Logged in as</font> <font color='white'> "+pageViewerFName+" </font></b><br>"+
wen edting d code..use yer notepad...
wen edting is done,,,pls save it as filename.js (filename watever u want but be sure .js )
ul need a hosting site...to host yer..js file...
exmple of hosting site .....fileave ,ripway,stormpages......ayt..
u have to upload ur js file ...
wen uploading is done....
jst copy d DIRECT LINK of yer js file
den paste yer direct link
Quote: <script src="DIRECTLINKHERE"></script>
jst pste yer code to who i want to meet or about me section
question: the code is not working?
u have oder js file,u have to compile dt...u may use js injection...or use externals...
ur pic doesnt appear?
yer url pic is wrong...change it...u may use photbucket as yer host for image
wen yer floating imge appers on bottom part? jst chane "fromtop"
jst find this in yer code Quote:
//in this part you can change it into "frombottom" or "fromtop" var verticalpos="frombottom"
CREDIT TO HIDECODESGALORE POSTED BY JESEL.xd PREVIEW HERE | |
|