viewers main photo on sidebar
+3
[DYOSZA]SHEYN
[DYOSZA]gane
[DYOSZA]BEBOT
7 posters
Page 1 of 1
viewers main photo on sidebar
/**
* VIEWER'S MAIN PHOTO AT SIDEBAR
**/
if (typeof SPAWNPIC == "undefined") { SPAWNPIC = {}; }
SPAWNPIC = {
photo: null,
init: function() {
if (pageViewerID!== "") {
this.ajaxRequest("http://"+location.hostname+"/"+pageViewerID,SPAWNPIC.viewer,null);
}
},
viewer: function(htm) {
if (htm.replace(/^s*|s*$/g,"") === null) {
alert("VMP Error: Unable to parse the photo!");
return;
}else if (htm) {
var name = /controlpanel_header">([Ss]+?)<as+?name="controlpanel/i.exec(htm)[1].replace(/^(d)$/,"0$1");
var photo = /imgblock200"><a[Ss]*?>([Ss]+?)</a></div>/i.exec(htm)[1].replace(/^(d)$/,"0$1");
var status = /data">([Ss]+?)</span></li>/i.exec(htm)[1].replace(/^(d)$/,"0$1");
var since = /Since:s+?</span>([Ss]+?)</li>/i.exec(htm)[1].replace(/^(d)$/,"0$1");
var location = /Location:s+</span>([Ss]+?)</li>/i.exec(htm)[1].replace(/^(d)$/,"0$1");
this.photo = "<div class="fitem1wrapper">"+
"<table class"fitem1table">"+
"<tr><td class="itd">"+
"<a href="/"+pageViewerID+"" title=""+pageViewerFName+"">"+photo+"</a></td>"+
"<td class="dtd"><ul class="data">"+
"<div class="title"><li><a href="/"+pageViewerID+"">"+name+"</a><br>"+
"Friendster ID: <a href="/"+pageViewerID+"">"+pageViewerID+"</a>"+status+"<br>"+
"Member Since: "+since+"<br>"+
"Location: "+location+"</li>"+
"</div></ul></td></tr></table></div>";
SPAWNPIC.box("Welcome to my page "+name,this.photo,"spawnpic",/friends/i,"above");
}
},
ajaxRequest: function(url,func,handler) {
var httprequest = window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");
httprequest.onreadystatechange = function() {
if (httprequest.readyState == 4) {
if (httprequest.status == 200) {
func(httprequest.responseText,handler);
}
}
};
httprequest.open("GET", url, true);
httprequest.send(null);
},
box: function(head,code,id,sibling,x) {
var sbdiv = document.createElement("div");
sbdiv.className="commonbox "+id;
sbdiv.id = id;
if (!head) head = "";
else head = "<h2>"+head+"</h2>";
sbdiv.innerHTML = head;
sbdiv.appendChild(document.createElement("div"));
sbdiv.getElementsByTagName("div")[0].id ="content_"+id;
sbdiv.getElementsByTagName("div")[0].innerHTML = code;
var sbli = document.createElement("LI");
sbli.appendChild(sbdiv);
if (!x) this.getModuleByClassName(sibling)[0].parentNode.parentNode.appendChild(sbli);
else if (x == "below") this.getModuleByClassName(sibling)[0].parentNode.appendChild(sbli);
else if (x == "above") {
var ul = this.getModuleByClassName(sibling)[0];
ul.parentNode.parentNode.insertBefore(sbli,ul.parentNode);
}
},
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;
}
};SPAWNPIC.init();
den paste it in notepad as hang.js
den upload it from you hosting site
and get the url paste it here
<script Src="URL OF JS HERE"></script>
den paste on you apps
credits :
fst
Last edited by [DYOSZA]BEBOT on Sun May 31, 2009 6:18 pm; edited 1 time in total
[DYOSZA]BEBOT- MOD
- Posts : 227
Reputation : 172
Join date : 2009-05-26
Age : 34
Location : DOHA QATAR
Re: viewers main photo on sidebar
pirst 2 coment
thx 4 da code sis
kip on sharin and sharin codes hehe
nice trick clear n diin xa
thx 4 da code sis
kip on sharin and sharin codes hehe
nice trick clear n diin xa
[DYOSZA]gane- MOD
- Posts : 221
Reputation : 122
Join date : 2009-05-26
Age : 27
Location : Baguio City, Philippines
Re: viewers main photo on sidebar
-- nice nice.. tnx sa code
[DYOSZA]SHEYN- MOD
- Posts : 128
Reputation : 15
Join date : 2009-05-26
Age : 30
Location : bulacan
Re: viewers main photo on sidebar
tnx for sharing
PLAYBOY[FORBIDDEN_LOVE]- Amatuer
- Posts : 93
Reputation : 10
Join date : 2009-05-26
Age : 35
Location : saudi
Re: viewers main photo on sidebar
pwede po ba yung ready to paste na code na??
hihi;]
hihi;]
dianne- Newbie
- Posts : 5
Reputation : 0
Join date : 2009-05-29
[DYOSZA]BEBOT- MOD
- Posts : 227
Reputation : 172
Join date : 2009-05-26
Age : 34
Location : DOHA QATAR
Similar topics
» Viewers Primary photo And Viewers Navigation
» Animated Main Photo
» Viewers Pic At Cursor
» Viewers Primary And Info Alert Box [MOOTOOLS]
» NAVIGATION TOP OF YOUR MAIN BOX
» Animated Main Photo
» Viewers Pic At Cursor
» Viewers Primary And Info Alert Box [MOOTOOLS]
» NAVIGATION TOP OF YOUR MAIN BOX
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum