Friendster Delight
Mini View(more Info) Testp


If you want to access fully in FD. Please do log in or register. Thank You. Welcome. FD
Friendster Delight
Mini View(more Info) Testp


If you want to access fully in FD. Please do log in or register. Thank You. Welcome. FD
Friendster Delight
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Friendster Delight


 
Home:: Portal ::Latest imagesSearchRegisterLog in

Share | 
 

 Mini View(more Info)

View previous topic View next topic Go down 
AuthorMessage
whez
Simple Moderator
Simple Moderator
whez

Posts : 259

Age : 35


Mini View(more Info) Vide
PostSubject: Mini View(more Info)   Mini View(more Info) I_icon_minitimeWed May 27, 2009 4:43 am

save in ex js..

the code...

Quote :
function addBox(head,code,id,siblingafter) {
//By marfillaster
/*
head:
html string title
null - no header bar
code:
html string content
id:
unique string css pointer
siblingafter:
regexp classname
'left' - mainbar column end
'right' - sidebar column end
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(!head) head="";
else head="<h2>"+head+"</h2>";
li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+
head+
"<div id=\"content_"+id+"\">"+
code+
"</div>"+
"</div>";

if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else {
var si=getElementsByClass(siblingafter,null,"DIV")[0];
si.parentNode.parentNode.insertBefore(li,si.parentNode);
}
}

function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp(searchClass);
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}



/**
* Viewer's Main Photo Sidebar
* Copyright 2007-2008 by FeRuZZ ©️ http://profiles.friendster.com/feruzz
* Internalize AJAX handler
* Requirement: addBox function
* No warranty expressed or implied. Use at your own risk.
**/

/*global SPAWNPIC*/
SPAWNPIC = {};

/* just get rid if you already have one */
if (pageViewerLangPref !== "en-US") {
window.location.href = "http://" + location.hostname + "/" + pageOwnerID + "?lang=en-US&updatelang=1";
}

if (!attachOnLoadHandler(function () { SPAWNPIC.init(); })) window.onload = function () { SPAWNPIC.init(); };

(function () {
SPAWNPIC = {
// private property
photo: null,

info: {
name: null,
photo: null,
gender: null,
age: null,
status: null,
location: null,
seek: null,
since: null
},

regexp: {
name: /controlpanel_header">([\S\s]*?)<a\s*name="controlpanel/i,
photo: /imgblock200"><a[\S\s]*?>([\S\s]*?)<\/a><\/div>/i,
gender: /q">([\S]*male)/i,
age: /male,\s*([\d]*),/i,
status: /male,\s*[\d]*,\s*([\S\s]*?)<\/span>/i,
location: /Location\:\s*<\/span><a[\S\s]*?>([\S\s]*?)<\/a><\/li>/i,
seek: /Interested\s*In\:\s*<\/span>([\S\s]*?)<\/li>/i,
since: /Member\s*Since\:\s*<\/span>([\w]*?[\s][\d]*?)<\/li>/i
},

init: function () {
try {
SPAWNPIC.ajaxRequest("GET", "http://" + location.hostname + "/" + pageViewerID, true, null, SPAWNPIC.viewer, null);
} catch (e) {}
},

viewer: function (htm) {
if (htm.replace(/^\s*|\s*$/g, "") === "") {
alert("VMP Error: Unable to parse user details!");
return;
} else if (htm) {
for (var val in SPAWNPIC.info) {
if (typeof SPAWNPIC.info[val] !== "function") {
try {
SPAWNPIC.info[val] = new RegExp(SPAWNPIC.regexp[val]).exec(htm)[1].replace(/^(\d)$/, "0$1");
} catch (e) {
SPAWNPIC.info[val] = "";
}
}
}
if (SPAWNPIC.info.seek === "") {
SPAWNPIC.info.seek = "Just looking around";
}
SPAWNPIC.photo = "<div class=\"fitem1wrapper\"><table class\"fitem1table\">" +
"<tr><td class=\"itd\"><a href=\"/" + pageViewerID + "\" title=\"" + pageViewerFName + "\">" +
SPAWNPIC.info.photo.replace(/<img /gi, "<img width=\"100\" height=\"100\" ") + "</a></td>" +
"<td class=\"dtd\"><ul class=\"data\"><div class=\"title\">" +
"<li><a href=\"/" + pageViewerID + "\">" +
SPAWNPIC.info.name + "</a><br>" +
pageViewerID.replace(/^\s*[\d]*?/gi, "Friendster ID: ") + "<br>" +
SPAWNPIC.info.gender + ", " + SPAWNPIC.info.age + ", " + SPAWNPIC.info.status.replace(/<[\S]*?>/g, "") + "<br>" +
SPAWNPIC.info.seek.replace(/^\s*[\S\s]*?/gi, "Interested In: ") + "<br>" +
SPAWNPIC.info.since.replace(/^\s*[\w]*?/gi, "Member Since: ") + "<br>" +
SPAWNPIC.info.location.replace(/^\s*[\S\s]*?/gi, "Location: ") + "</li>" +
"</div></ul></td></tr></table></div>";
addBox("Hello " + SPAWNPIC.info.name, SPAWNPIC.photo, "spawnpic", /commonbox[\s]*?friends/i);
}
},

ajaxRequest: function (type, url, async, param, func, handlerparam) {
/**
* ajaxRequest - You may not remove or change this notice.
* version: 2.4
* Copyright 2008 by FeRuZZ ©️ http://profiles.friendster.com/feruzz.
*
* @type: "GET" | "POST"
* @cont: true | false
* @param: string | null
* @func: string | null
* @handlerparam: string | null
**/

var httprequest = null;
var requestDone = false;
var data = null;
var responseType = "text";
var timeout = 0;
var ival = null;
var onreadystatechange = {};
var msxml = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"];
for (var x = 0, len = msxml.length; x < len; x += 1) {
try {
httprequest = window.ActiveXObject ? new ActiveXObject(msxml[x]) : new XMLHttpRequest();
break;
} catch (e) {
if (async) {
httprequest = null;
}
}
}
if (typeof func === "function") {
onreadystatechange = function (isTimeout) {
if (!requestDone && httprequest && (httprequest.readyState === 4 || isTimeout === "timeout")) {
requestDone = true;
if (ival) {
window.clearInterval(ival);
ival = null;
}
if (!httprequest.status && location.protocol === "file:" || (httprequest.status >= 200 && httprequest.status < 300) || httprequest.status === 304 || httprequest.status === 1223) {
var resPonse = (/xml/i.test(responseType))? httprequest.responseXML : httprequest.responseText;
func(resPonse.replace(new RegExp("<script[^>]*>.*?<\/script>", "gi"), ""), handlerparam);
}
}
};
}
if (async) {
ival = window.setInterval(onreadystatechange, 13);
if (timeout > 0) {
window.setTimeout(function () {
if (httprequest) {
httprequest.abort();
if (!requestDone) {
onreadystatechange("timeout");
}
}
}, timeout);
}
}
if (type === "GET" && (/GET/i.test(type))) {
var ts = new Date().getTime();
var ret = url.replace(/(\?|&)_=[\S\s]*?(&|$)/, "$1_=" + ts + "$2");
url = ret + ((ret === url) ? (url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
}
if (data && type === "GET" && (/GET/i.test(type))) {
url += (url.match(/\?/) ? "&" : "?") + data;
data = null;
}
if (type === "POST" && (/POST/i.test(type))) {
var headers = "application/x-www-form-urlencoded" + ("UTF-8" ? "; charset=" + "UTF-8" : "");
var contentLength = param ? param.length: 0;
try {
httprequest.setRequestHeader("Content-type", headers);
httprequest.setRequestHeader("Content-length", contentLength);
if (httprequest.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0, 2005])[1] < 2005) {
httprequest.setRequestHeader("Connection", "close");
}
} catch (err) {}
}
httprequest.open(type, url, async);
httprequest.setRequestHeader("ajaxRequest", "true");
httprequest.setRequestHeader("X-Requested-With", "XMLHttpRequest");
httprequest.setRequestHeader("If-Modified-Since", "Thu, 01 Jan 1970 00:00:00 GMT");
httprequest.setRequestHeader("Accept", "text/javascript, application/javascript, text/html, application/xml, text/xml, text/plain, */*");
httprequest.send(param);
if (!async) {
onreadystatechange();
}
}
};
})();





Pview -------> My page click Wink

cdts --> Java book 1.7
Embarassed
Back to top Go down
provanz
Full Moderator
Full Moderator
provanz

Posts : 2671

Age : 33


Mini View(more Info) Vide https://fddelete.forumotion.net
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitimeWed May 27, 2009 6:38 pm

wow cool ill try this to my 2nd account


BTW thnx for the sharing dude


keep it up !!!!!!!
Back to top Go down
whez
Simple Moderator
Simple Moderator
whez

Posts : 259

Age : 35


Mini View(more Info) Vide
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitimeThu May 28, 2009 7:24 am

haha...cool.....i think....
lets try....hohoho
Back to top Go down
GHEN
Graphic Master
Graphic Master
GHEN

Posts : 1150

Age : 30


Mini View(more Info) Vide http://www.ghenstar.webs.com
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitimeThu May 28, 2009 9:22 pm

what this trick for ?
is this all about the whole layout ?
Back to top Go down
joshjammark
Promoter
Promoter
joshjammark

Posts : 120


Mini View(more Info) Vide http://www.friendster.com/joshjammark
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitimeThu Jun 11, 2009 8:16 pm

thanks!


Spoiler:
Back to top Go down
vhegaricious
Guest
Guest
vhegaricious

Posts : 7

Age : 31


Mini View(more Info) Vide http://omgcodes.omgforum.net
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitimeSun Jun 14, 2009 7:13 pm

huwooohw
cool sir
thanks
Back to top Go down
sEz™
Third Timer
Third Timer
sEz™

Posts : 57

Age : 28


Mini View(more Info) Vide http://profiles.friendster.com/figmentofyourimagination
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitimeWed Jun 17, 2009 10:37 pm

EiNKSZ FOR SHARiNG ... Smile Smile Smile
Back to top Go down
whez
Simple Moderator
Simple Moderator
whez

Posts : 259

Age : 35


Mini View(more Info) Vide
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitimeThu Jun 18, 2009 7:02 pm

enjoy yourself..
Back to top Go down
keith =)
Second Timer
Second Timer
keith =)

Posts : 24


Mini View(more Info) Vide http://www.friendster.com/kaith0620
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitimeTue Aug 18, 2009 5:57 pm

tnx for this code!
Back to top Go down
Sponsored content




Mini View(more Info) Vide
PostSubject: Re: Mini View(more Info)   Mini View(more Info) I_icon_minitime

Back to top Go down
 

Mini View(more Info)

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Friendster Delight :: FD Tips & Tricks :: Java Script Codes-