Post by ME! on Jun 21, 2006 18:54:55 GMT
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
<--
<--
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