|
Post by Stella on Jan 16, 2011 17:50:09 GMT -6
I was wondering if we could have background for our mini profiles. EXP CLICK Stella's profile here. I have the code and all it does it let people add a background when they modify their page!
|
|
|
Post by shaman.♥ on Jan 16, 2011 20:24:13 GMT -6
I don't really see it there o.o ( love your avatar, btw ) But I know what you're talking about. I code is cool, and I'll add it in.. But there are a few things that people would have to do.
1. Make sure it matches. That would annoy me to no end xD. 2. Make sure it look right when it repeats with long posts, because well.. That would annoy me too xD.
But I'm fine with trying it out! Can you gimme the code, cause I wouldn't even know where to start looking <3
|
|
|
Post by Stella on Jan 17, 2011 14:03:11 GMT -6
alright thanks and here ya go
<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>
|
|
|
Post by Stella on Jan 17, 2011 17:43:27 GMT -6
edit
I added it for ya{the code} hope its all good and that my own background is fine ^^
|
|