Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Mini Profile Background Image (31st Dec 07 at 1:04am UTC) | | This will allow your users to add a background to their mini profile.
Global Footer
Code: - <script>
- /*Mini Profile BG Image
- Created By Wrighty
- support.virtualforums.co.uk*/
-
- if(document.profile_form && document.profile_form.hidden){
- var f = document.profile_form;
- r = f.avatar_height.parentNode.parentNode.parentNode.parentNode.insertRow(16);
- r.insertCell(0).innerHTML = '<font size=2>Mini-Profile Bg:</font>';
- r.insertCell(1).innerHTML = '<input type="text" size="25" name="vf_mp">';
- r.insertCell(2).innerHTML = '<font size=1>Enter a URL to the image you want to use as the background for your miniprofile.</font>';
- f.vf_mp.value=(f.hidden.value.match(/{vf_mp:(.+?)}/))?RegExp.$1:'';
- f.hidden.value = f.hidden.value.replace(/{vf_mp:(.+?)}/,'');
- function save(){
- if(!f.vf_mp.value == "" ){
- f.hidden.value = '{vf_mp:'+f.vf_mp.value+'}' +f.hidden.value;
- }}
- if(document.addEventListener){
- f.addEventListener('submit', save,false);
- }else{
- f.attachEvent('onsubmit', save);
- }}
- if(location.href.match(/view/)) {
- var x=document.getElementsByTagName('td');
- for(i=0;i<x.length;i++){
- if(x[i].width=="20%"){
- var d = x[i].getElementsByTagName('span')[0];
- BgImg= (d.innerHTML.match(/{vf_mp:(.+?)}/))?RegExp.$1:'';
- x[i].style.backgroundImage = 'url("'+BgImg+'")';
- }}}
- </script>
| |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: Mini Profile Background Image (31st Dec 07 at 1:24am UTC) | | For the second post, on my forum it does not show the background, but on my first post it shows.
Example:
Darkmage | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Mini Profile Background Image (31st Dec 07 at 1:35am UTC) | | Recopy the code! | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | |
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Mini Profile Background Image (31st Dec 07 at 1:54am UTC) | | recopy... hmm strange..
I just recopied from my forum. | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: Mini Profile Background Image (31st Dec 07 at 1:58am UTC) | | Nope it still don't, and the image fully goes in. | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Mini Profile Background Image (31st Dec 07 at 2:03am UTC) | | haha I win!
I beat the code!
I know why it was, I had it coded to work with the tabulated mini profile, it now works with both side mini profiles! | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: Mini Profile Background Image (31st Dec 07 at 2:08am UTC) | | ok thanks. Do I have to re copy? | |
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Mini Profile Background Image (31st Dec 07 at 2:09am UTC) | | ya.. sorry | |
|
Nick Very Senior Member
Posts: 3,012 Status: Offline Gender: Male Location: vForums Age: 34 Joined:
pmwww | Re: Mini Profile Background Image (31st Dec 07 at 2:12am UTC) | | ok thanks ^_^ | |
|