vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Another Additional Profile Option

[F] Another Additional Profile Option - Posted By dog199200 (dog199200) on 9th Mar 08 at 6:30pm
Would t be possible to ad an Main Admin Only option in the Editable By: section of the Additional Profile section?

Re: Another Additional Profile Option - Posted By Michael (wrighty) on 30th Mar 08 at 1:03pm
What sort of things would this be used for? {Unsure}

Re: Another Additional Profile Option - Posted By Marc (cr0w) on 30th Mar 08 at 1:22pm
Also, this is a suggestion. If the board is closed then posting suggestions in the support board won't get them added. {Unsure}

If you'd like something added between now and when the board is re-opened, post in Code Requests and someone will make you a code to achieve what you'd like in the meantime.

Re: Another Additional Profile Option - Posted By dog199200 (dog199200) on 30th Mar 08 at 9:07pm
no it wasn't a suggestion i was just wondering if it was possible. so i know if i should suggest it when the time comes when the board is open again or if i should ask for a code to do so... but until then fine a code will work, umm i need it so that i make sure that only the main admin can adjust a of the things in that category, because i am using it for rp stats and i have a new staff member that likes playing with things and i would rather him not to, but at the same time i wont it open so that other staff can add options to the list if needed, sorry thats kind of rambling and i hope it make sence.

Re: Another Additional Profile Option - Posted By Michael (wrighty) on 1st Apr 08 at 3:29pm
This code will allow you to remove any part or section in the modify profile page that you wish.

I suggest that you add a staff only 'extra' profile option, and then add this code. That just stops members editting it! {Smile}

<script>
var users = /(admin)/;
var name = /(E-Mail|Display Name)/;

var r = get('tr','tag');
if(/modify_profile/.test(location.href)){
    for(i=0;i<r.length;i++){
        if(r[i].cells[0] && r[i].cells[0].firstChild && r[i].cells[0].firstChild.size == '2' && r[i].cells[0].firstChild.innerHTML.match(name) && !users.test(vf_username)){
            r[i].style.display = 'none';
        }
    }
}
</script>


To edit this do the following:
Adding users able to edit the field:
/(admin)/;
/(admin|wrighty|ross)/;
[Enter their username there]

Changing hidden field:
'E-Mail';
Edit in the same way as the user one just above! {Smile}
This IS case sensitive! {Smile}

Main Footer

Re: Another Additional Profile Option - Posted By dog199200 (dog199200) on 1st Apr 08 at 11:42pm
ok i have them all set to staff only to begin with but ok, justr wondering if i want to add more do i just add a , between them?

Re: Another Additional Profile Option - Posted By Michael (wrighty) on 1st Apr 08 at 11:43pm
Try that! {Smile}

Re: Another Additional Profile Option - Posted By dog199200 (dog199200) on 1st Apr 08 at 11:45pm
{Smile} ok ty

Re: Another Additional Profile Option - Posted By Michael (wrighty) on 2nd Apr 08 at 12:15am
Np. Let me know if it works! {Smile}

Re: Another Additional Profile Option - Posted By dog199200 (dog199200) on 2nd Apr 08 at 12:19am
weow major error, anyways, i cant tell unless i make another acount and make it staff to check but i dont have time of that right now

Re: Another Additional Profile Option - Posted By Michael (wrighty) on 2nd Apr 08 at 12:25am
Link to forum? {Smile}

Re: Another Additional Profile Option - Posted By dog199200 (dog199200) on 2nd Apr 08 at 12:27am
i meant the glitch was on here, ok heres the link

http://www.omegabloodlust.vforums.co.uk

Re: Another Additional Profile Option - Posted By Michael (wrighty) on 2nd Apr 08 at 9:57am
Ok,I'll mark this as filled.

If you have any problems with it, feel free to make a new thread! {Smile}