Post by bass5098 on Sept 11, 2011 15:15:29 GMT -5
Description: This is a code that enables users to put their skype username or their telephone number in their mini-profile.
Previews:
Link In Miniprofile
Field In Modify Profile
Live Preview: Link
Placement: Global Footers
Code:
Compatibility: This code works with all other codes that add an option to the modify profile page like the myspace in the profile code.
Previews:
Link In Miniprofile
Field In Modify Profile
Live Preview: Link
Placement: Global Footers
Code:
<script type="text/javascript">
/*
=== Skype in Profile ===
Code Created By Bass5098
This Code May Not Be Reposted Without Creators Permission
Header Must Stay Intact At All Times
*/
// Do Not Edit Below This Line
function mskype(){
var table = document.body.getElementsByTagName("table");
for(t = 0 ; t<table.length ; t++){
if(table[t].cellSpacing=="2" && table[t].rows[0].cells[0].innerHTML.match(/AIM:/)){
var srow = table[t].insertRow(0);
var sell1 = srow.insertCell(0);
var sell2 = srow.insertCell(1);
var sell3 = srow.insertCell(2);
sell1.innerHTML = "<font size='2'>Skype Username/Number:</font>";
sell2.innerHTML = "<input id='skype' size='35'>";
sell3.innerHTML = "<font size='-2'>Your skype username or telephone number. Please note that this information will be visible to everyone who sees any posts of yours or visits your profile.</font>";
var skype = document.getElementById('skype');
if(document.addEventListener){
var iPassField=document.modifyForm.password;
window.addEventListener('load', function(){
iPassField.value='';
}, false);
}
if(document.modifyForm.personaltext.value.match(/\[SKB:(.+?)?\]/)){
skype.value = RegExp.$1;
}
var pTextField=document.modifyForm.personaltext;
pTextField.value = pTextField.value.replace(/\[SKB:(.+?)?\]/,"");
document.modifyForm.onsubmit = function(){
if(document.modifyForm.personaltext.value.match(/\[SKB:(.+?)?\]/)){
document.modifyForm.personaltext.value = document.modifyForm.personaltext.value.replace(/\[SKB:(.+?)?\]/,"[SKB:" +skype.value+ "]");
}else{
document.modifyForm.personaltext.value+= "[SKB:" +skype.value+ "]";
}
}
}
}
}
function vskype(){
var sdata = "";
var td=document.body.getElementsByTagName("td");
for( t = 0 ; t<td.length ; t++){
if(td[t].width=="20%" && td[t].innerHTML.match(/\[SKB:(.+?)?\]/)){
sdata = RegExp.$1;
td[t].innerHTML = td[t].innerHTML.replace(/\[SKB:(.+?)?\]/,"");
td[t].innerHTML += "<br />Skype: <a href=\"skype:"+sdata+"\">" + sdata + "</a>";
}
}
}
if(document.modifyForm){
mskype();
}
if(/(calendar|pm|(modify)?pre)?view(profile)?|search2|display/i.test(pb_action)){
vskype();
}
</script>
Compatibility: This code works with all other codes that add an option to the modify profile page like the myspace in the profile code.