vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F]Profile Spoiler Area - View Topic (Page 2 of 2)Page: 1 2
Topic Rating: *****
Printable View
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Profile Spoiler Area (12th May 08 at 4:21am UTC)
Could I get a link to the user's sig where the problem is occurring? {Smile}

rroll.to— Shorten a link, rickroll your friends.
dog199200
Guest
Re: Profile Spoiler Area (12th May 08 at 4:29am UTC)
here is the thread:

http://deluxeanimeforum.vforums.co.uk/board/Introductions/topic/5/action/view_topic/hello-all.---//page/2/#reply-56

here is her profile:

http://deluxeanimeforum.vforums.co.uk/action/view_profile/user/melody/
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Profile Spoiler Area (15th May 08 at 4:56pm UTC)
Try this: {Grin}

<script>
/*Profile Spoiler Area in Signature
Created By Wrighty
support.virtualforums.co.uk*/

var d;
function save(){
    if(!f.vf_mp.value == "" ){
        f.hidden.value = '{w_spoiler:'+f.vf_mp.value+'}' + f.hidden.value;
    }
}
if(document.profile_form && document.profile_form.hidden){
    var f = document.profile_form;
    r = f.avatar_height.parentNode.parentNode.parentNode.parentNode.insertRow(8);
    r.insertCell(0).innerHTML = '<font size=2>Personal Spoiler:</font>';
    r.insertCell(1).innerHTML = '<input type="text" size="25" name="vf_mp">';
    r.insertCell(2).innerHTML = '<font size=1>Seperate each item by a comma.</font>';
    f.vf_mp.value=(f.hidden.value.match(/{w_spoiler:(.+?)}/))?RegExp.$1:'';
    f.hidden.value = f.hidden.value.replace(/{w_spoiler:(.+?)}/,'');
    if(document.addEventListener){
        f.addEventListener('submit', save,false);
    }else{
        f.attachEvent('onsubmit', save);
    }
}
if(location.href.match(/view/)) {
    var num = 0;
    var x = get('tr','tag');
    for(re=0;re<x.length;re++){
        if(x[re].innerHTML.match(/hidden_vars/) && x[re].innerHTML.match(/w_spoiler/)){
            var s = x[re].getElementsByTagName('span');
            for(ui=0;ui<s.length;ui++){
                if(s[ui].id.match(/hidden_vars/)){
                    d = s[ui];
                }
            }
            for(z=0;z<x[re].getElementsByTagName('td').length;z++){
                if(d.innerHTML.match(/{w_spoiler:(.+?)}/) && RegExp.$1 != ''){
                    var d_ub = document.createElement('SELECT');
                    var w_ub = [];
                    w_ub = RegExp.$1.split(/,/);
                        for (ar=0;ar<w_ub.length;ar++) {
                            d_ub.options[d_ub.options.length] = new Option(w_ub[ar]);
                        }
                        if(x[re].getElementsByTagName('td')[z].className.match(/signature/) && num != 0){
                            x[re].getElementsByTagName('td')[z].insertBefore(d_ub, x[re].getElementsByTagName('td')[z].getElementsByTagName('font')[0]);
                            break;
                        }else if(x[re].getElementsByTagName('td')[z].getElementsByTagName('div')[0] && x[re].getElementsByTagName('td')[z].getElementsByTagName('div')[0].id.match(/signature/)){
                            x[re].getElementsByTagName('td')[z].getElementsByTagName('div')[0].insertBefore(d_ub, x[re].getElementsByTagName('td')[z].getElementsByTagName('div')[0].firstChild);
                    break;
                    }
                }
            }
            num++;
        }
    }
}
</script>


Replace the last one with that.
dog199200
Guest
Re: Profile Spoiler Area (15th May 08 at 5:35pm UTC)
ok the input box for it is still in the modify profile area, but the spolier box doesn't show up anywhere.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Profile Spoiler Area (15th May 08 at 6:10pm UTC)
You have no signature. This is needed for the code to work.
dog199200
Guest
Re: Profile Spoiler Area (16th May 08 at 12:51am UTC)
ok now it only shows when viewing the persons profile...
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Profile Spoiler Area (16th May 08 at 3:31pm UTC)
put it at the top of GLOBAL FOOTER? {Unsure}
dog199200
Guest
Re: Profile Spoiler Area (17th May 08 at 12:48am UTC)
{Smile} ok taht works ty so much
 Printable View
Page: 1 2

All times are GMT+0 :: The current time is 2:51am
Page generated in 0.2023 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums