Post by (¯`•DregondRahl•._) on Sept 14, 2006 3:53:43 GMT -8
What this code does is it gives each individual user the ability to have his/her own background in the mini profile area over here.
<--
<--
A field will apper in the modify profile page.
Preview1
Preview2
Preview3
GLOBAL FOOTER
<script type="text/javascript">
<!--
//Profile Editable MiniProfile Background - DregondRahl
// Do not repost or ajust copyright
if(document.modifyForm && document.modifyForm.signature){
Form = document.modifyForm;
AH = Form.avatarheight.parentNode.parentNode.parentNode;
MpTr = AH.parentNode.insertRow(1);
MpTr.insertCell(0).innerHTML = '<font size=2>MP BackGround</font>';
MpTr.insertCell(1).innerHTML = '<input type="text" size="35" name="mpbg">';
MpTr.insertCell(2).innerHTML = '<font size=1>Enter the URL Of the Background Image for the Mini Profile</font>';
if(Form.signature.value.match(/\[MpB:(.+?)\]/))
Form.mpbg.value=RegExp. $1;
Form.signature.value = Form.signature.value.replace(/\[MpB:(.+?)\]/,'');
function doBg(){
if(!Form.mpbg.value == "" ){
BgImage = Form.mpbg.value;
Form.signature.value = '[MpB:'+BgImage+']' +Form.signature.value;
}
}
if(document.addEventListener){
Form.profileaction[0].addEventListener('click',doBg,false);
} else {
Form.profileaction[0].attachEvent('onclick',doBg);
}
}
if(location.href.match(/ion=((pm|calendar)?view|display)/)) {
var td = document.getElementsByTagName("td");
for(t=0; t<td.length; t++) {
if((td[t].colSpan == '2' || td[t].colSpan == '3') && td[t].innerHTML.match(/\[MpB:(.+?)\]/)){
BgImg = (RegExp.$1.replace(/ /g,''))
td[t].innerHTML= td[t].innerHTML.replace(/\[MpB:(.+?)\]/,' ');
var obj = td[t].parentNode;
while(!obj.nodeName.match(/^td$/i)) {
obj = obj.parentNode;
}
obj.previousSibling.style.backgroundImage = 'url("'+BgImg+'")';
}
}
}
//-->
</script>
Just Enter The background Image URL of your Choice In the
"MP Background Field" that is thier in the Modify Profile Section
Note: The information is stored in the signature area, so keep some space for it oh and its compatible with other Profile Editable codes
Note for When/If Removing this Code:
This code stores information in the "Siganture" field of the users profile. If at some point you decide to remove this code or for whatever reason the code stops working then that information will remain visible in the signature until you or the user removes it. This information would look something like: [MpB:http://yourhost.com/image.gif]
<--
<--
A field will apper in the modify profile page.
Preview1
Preview2
Preview3
GLOBAL FOOTER
<script type="text/javascript">
<!--
//Profile Editable MiniProfile Background - DregondRahl
// Do not repost or ajust copyright
if(document.modifyForm && document.modifyForm.signature){
Form = document.modifyForm;
AH = Form.avatarheight.parentNode.parentNode.parentNode;
MpTr = AH.parentNode.insertRow(1);
MpTr.insertCell(0).innerHTML = '<font size=2>MP BackGround</font>';
MpTr.insertCell(1).innerHTML = '<input type="text" size="35" name="mpbg">';
MpTr.insertCell(2).innerHTML = '<font size=1>Enter the URL Of the Background Image for the Mini Profile</font>';
if(Form.signature.value.match(/\[MpB:(.+?)\]/))
Form.mpbg.value=RegExp. $1;
Form.signature.value = Form.signature.value.replace(/\[MpB:(.+?)\]/,'');
function doBg(){
if(!Form.mpbg.value == "" ){
BgImage = Form.mpbg.value;
Form.signature.value = '[MpB:'+BgImage+']' +Form.signature.value;
}
}
if(document.addEventListener){
Form.profileaction[0].addEventListener('click',doBg,false);
} else {
Form.profileaction[0].attachEvent('onclick',doBg);
}
}
if(location.href.match(/ion=((pm|calendar)?view|display)/)) {
var td = document.getElementsByTagName("td");
for(t=0; t<td.length; t++) {
if((td[t].colSpan == '2' || td[t].colSpan == '3') && td[t].innerHTML.match(/\[MpB:(.+?)\]/)){
BgImg = (RegExp.$1.replace(/ /g,''))
td[t].innerHTML= td[t].innerHTML.replace(/\[MpB:(.+?)\]/,' ');
var obj = td[t].parentNode;
while(!obj.nodeName.match(/^td$/i)) {
obj = obj.parentNode;
}
obj.previousSibling.style.backgroundImage = 'url("'+BgImg+'")';
}
}
}
//-->
</script>
Just Enter The background Image URL of your Choice In the
"MP Background Field" that is thier in the Modify Profile Section
Note: The information is stored in the signature area, so keep some space for it oh and its compatible with other Profile Editable codes
Note for When/If Removing this Code:
This code stores information in the "Siganture" field of the users profile. If at some point you decide to remove this code or for whatever reason the code stops working then that information will remain visible in the signature until you or the user removes it. This information would look something like: [MpB:http://yourhost.com/image.gif]