Post by Roger Semaan on Jul 5, 2008 8:47:51 GMT -8
Well yeah my first project with Chris!
Anyways Chris and I decided to give u guys more Mini Profiles, so there!
New Mini profile for Pb users!
Concept by me, and Coding by Chris!
Place: Global Footer.
Preview: Clicky
And to test it or whatever u want...
Made an account for u guys!
Username: Test
Pass: 123456
Enjoy!
Anyways Chris and I decided to give u guys more Mini Profiles, so there!
New Mini profile for Pb users!
Concept by me, and Coding by Chris!
Place: Global Footer.
Preview: Clicky
And to test it or whatever u want...
Made an account for u guys!
Username: Test
Pass: 123456
Enjoy!
<script type="text/Javascript">
// Roger Miniprofile v1 by Chris
// Free for anyone's use. Do not redistribute outside of SZ.
var br_re = /<br\s?\/?>/gi;
var rankLines = 2;
function miniProfile(ext){
var _arr = [];
_arr["customtitle"] = _arr["status"] = _arr["contacts"] = _arr["personal"] = _arr["joined"] = _arr["rank2"] = "";
_arr["karmalinks"] = _arr["avatar"] = _arr["location"] = _arr["gender"] = false;
_arr["posts"] = _arr["karma"] = 0;
var cen = ext.getElementsByTagName("center")[ext.getElementsByTagName("center").length-1]; // Gets around the use of center UBBC in custom title
var cens = cen.innerHTML.split(br_re);
for(var a=0;a<cens.length;a++){
if(cens[a].match(/\[avatar\]/i))
_arr["avatar"] = cens[a];
else if(cens[a].match(/\[(icq|yim|msn|aim|homepage|email|send\spm)\]/i))
_arr["contacts"] += cens[a];
else
_arr["personal"] += cens[a];
}
cen.parentNode.removeChild(cen);
var spi = ext.innerHTML.split(br_re);
_arr["display"] = spi[0];
_arr["rank1"] = spi[1];
_arr["user"] = (spi[0].match(/user=(.+?)("|'|\s|>)/i)?RegExp.$1:"");
if(rankLines == 2){
_arr["rank2"] = spi[2];
spi.splice(2,1);
}
spi.splice(0,2);
for(var a=0;a<spi.length;a++){
if(spi[a].match(/Gender: (.+?)$/i))
_arr["gender"] = RegExp.$1;
else if(spi[a].match(/Joined: (.+?)$/i))
_arr["joined"] = RegExp.$1;
else if(spi[a].match(/Posts: ([\d,]+)/i))
_arr["posts"] = RegExp.$1;
else if(spi[a].match(/Location: (.+?)$/i))
_arr["location"] = RegExp.$1;
else if(spi[a].match(/Karma: (-?[\d,]+)/i))
_arr["karma"] = RegExp.$1;
else if(spi[a].match(/>Exalt</) && spi[a].match(/>Smite</))
_arr["karmalinks"] = spi[a];
else if(spi[a].match(/Member is ((<b>)?(on|off)line(<\/b>)?)/i))
_arr["status"] = RegExp.$1.replace(/<\/?b>/gi,"");
else if(spi[a] != "") // Fix glitch where in IE, it removes it from the array if it has no value. This duplicates it for FF
_arr["customtitle"] += spi[a]+"<br />";
}
return _arr;
}
var aTD = document.getElementsByTagName("td");
if(location.href.match(/action=((calendar|pm)?view|display)/) || document.title.match(/\s-\s(Preview|Search)/)){
for(a=0;a<aTD.length;a++){
if(aTD[a].width == "20%" && aTD[a].innerHTML.match(/Posts/i)){
var x = miniProfile(aTD[a].cloneNode(true), 2);
var d = "<table width='90%' class='bordercolor' cellpadding='4' cellspacing='1'>";
d += "<tr><td align='center' class='windowbg'>"+x.display+"</td></tr>";
d += "<tr><td align='center' class='windowbg'>"+x.rank1+"</td></tr>";
d += "<tr><td align='center' class='windowbg'>"+x.rank2+"</td></tr>";
if(x.customtitle.length > 1){
d += "<tr><td align='center' class='windowbg'>"+x.customtitle+"</td></tr>";
}
d += "<tr><td align='center' class='windowbg2'>Posts: "+x.posts+"</td></tr>";
d += "<tr><td align='center' class='windowbg2'>Joined: "+x.joined+"</td></tr>";
if(x.location){
d += "<tr><td align='center' class='windowbg2'>Location: "+x.location+"</td></tr>";
}
if(x.gender){
d += "<tr><td align='center' class='windowbg2'>Sex: "+x.gender+"</td></tr>";
}
d += "<tr><td align='center' class='windowbg2'>Karma: "+x.karma+"</td></tr>";
if(x.contacts.length > 1){
d += "<tr><td align='center' class='windowbg'>"+x.contacts+"</td></tr>";
}
if(x.personal.length > 1){
d += "<tr><td align='center' class='windowbg'>"+x.personal+"</td></tr>";
}
if(x.avatar){
d += "<tr><td align='center' class='windowbg'>"+x.avatar+"</td></tr>";
}
d += "<tr><td align='center' class='windowbg'><span style='float: right'>"+x.status+"</span>"+(x.karmalinks?x.karmalinks:"")+"</td></tr>";
aTD[a].innerHTML = d+"</table>";
}
}
}
</script>