FSTUTS FORUMERS
Dont forget to join!

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

Thank You!

viewers main photo on sidebar

View previous topic View next topic Go down

viewers main photo on sidebar

Post by [DYOSZA]BEBOT on Tue May 26, 2009 7:35 pm


/**
* 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 Smile
credits :
fst


Last edited by [DYOSZA]BEBOT on Sun May 31, 2009 6:18 pm; edited 1 time in total
avatar
[DYOSZA]BEBOT
MOD
MOD

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

Back to top Go down

Re: viewers main photo on sidebar

Post by [DYOSZA]gane on Tue May 26, 2009 7:50 pm

pirst 2 coment

thx 4 da code sis
kip on sharin and sharin codes hehe
nice trick clear n diin xa Very Happy
avatar
[DYOSZA]gane
MOD
MOD

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

Back to top Go down

Re: viewers main photo on sidebar

Post by [DYOSZA]SHEYN on Tue May 26, 2009 8:33 pm

-- nice nice.. tnx sa code Very Happy
avatar
[DYOSZA]SHEYN
MOD
MOD

Posts : 128
Reputation : 15
Join date : 2009-05-26
Age : 23
Location : bulacan

Back to top Go down

Re: viewers main photo on sidebar

Post by JM RADA on Wed May 27, 2009 3:44 am

TNX for sharing...
avatar
JM RADA
ADMIN
ADMIN

Posts : 100
Reputation : 2
Join date : 2009-05-26
Age : 27
Location : UNDER UR CHEST

http://profiles.friendster.com/jmrada

Back to top Go down

Re: viewers main photo on sidebar

Post by PLAYBOY[FORBIDDEN_LOVE] on Thu May 28, 2009 7:10 pm

tnx for sharing
avatar
PLAYBOY[FORBIDDEN_LOVE]
Amatuer
Amatuer

Posts : 93
Reputation : 10
Join date : 2009-05-26
Age : 28
Location : saudi

Back to top Go down

Re: viewers main photo on sidebar

Post by dianne on Fri May 29, 2009 2:24 pm

pwede po ba yung ready to paste na code na??
hihi;]

dianne
Newbie
Newbie

Posts : 5
Reputation : 0
Join date : 2009-05-29

Back to top Go down

Re: viewers main photo on sidebar

Post by [DYOSZA]JiNRiKiSHA on Fri May 29, 2009 2:34 pm

wew!

thanks 4 the codes..

include the CREDITs Razz

_________________
avatar
[DYOSZA]JiNRiKiSHA
Graphic Artist
Graphic Artist

Posts : 207
Reputation : 15
Join date : 2009-05-26
Age : 26
Location : Mars

http://www.friendster.com/miinidii

Back to top Go down

Re: viewers main photo on sidebar

Post by [DYOSZA]BEBOT on Wed Jun 10, 2009 5:32 am

wc po thnx din Razz

_________________
]

nsa iba man ang hnhnap mo
iba parin pgako GIRLFRIEND MO Smile
fs cko

http://profiles.friendster.com/luciitaelbolera01
ym : b.3bot

LONG LEAVE DYOSZA :d
avatar
[DYOSZA]BEBOT
MOD
MOD

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

Back to top Go down

Re: viewers main photo on sidebar

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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