vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Staff Image Instead Of Text

[F] Staff Image Instead Of Text - Posted By dog199200 (dog199200) on 30th Mar 08 at 9:13pm
I bet i know what your thinking, "Why not just add the image under the staff name like normal?" well the thing is that i want an image to say the staff rank instead of the the text, but if i leave the staff position name blank then i can't tell which staff position is what when assigning a position, so can i please get a code that will allow me to replace the staff position name with its rank image and keep it so that i can still see the staff name as normal?

Re: Staff Image Instead Of Text - Posted By Marc (cr0w) on 30th Mar 08 at 9:20pm
You lost me. {Tongue Out}

Could you please try to explain a little better? {Smile}

Re: Staff Image Instead Of Text - Posted By dog199200 (dog199200) on 30th Mar 08 at 9:22pm
so basically i want a code that will allow ,me to have the Member Group Name show as an Image instead of the name in text and at the same time having iy show the member group names as normal text in the area where you assign the member group?

Re: Staff Image Instead Of Text - Posted By Michael (wrighty) on 31st Mar 08 at 11:53am
So you just want to remove the 'rank' text from the mini-profile... {Smile}

Well that can be done through the mini-profile templates. {Smile}

go to the template and find the part that says {rank} replace it with {rank_name} {Smile}

That'll then do what you want! ^_^

Re: Staff Image Instead Of Text - Posted By dog199200 (dog199200) on 31st Mar 08 at 10:01pm
thats not what i'm looking for, but you had the right idea so i did it myself i was looking for just the rank images showing and not the rank name so i needed this {rank_image}

Edit: wait that wont work, then it removes the rank from all members and not just the staff..so can you please make a code anyways now that i hope i gave you the idea of what i wanted?

Edit two: could you have it so that i just have to edit the mini profile and have it set to something like:

{If_Staff}{rank_image}{/if:Staff}{ifnot:Staff}{rank}{/ifnot:staff}

Re: Staff Image Instead Of Text - Posted By Michael (wrighty) on 1st Apr 08 at 3:14pm
Go to:
Image => Mini-Profile Template
Where you have {rank} or something like that.

Put this instead:

<script>
var a = /(Administrator|Moderator|Global Moderator)/;
var rank = '{rank_name}';
if(rank.match(a)){
    document.write('{rank_image}');
}else{
    document.write('{rank}');
}
</script>



Edit the red part with the 'staff ranks'.

To add more add another line ( | ) then the name of the rank. That should then do what you want! {Smile}

Re: Staff Image Instead Of Text - Posted By dog199200 (dog199200) on 1st Apr 08 at 11:49pm
... it still shows the staff name and the image, not just the staff image.

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

thats if you need it, also keep in mind that i have it running for only admin, mod and g-mod as you had it the other ranks stay as is.

Re: Staff Image Instead Of Text - Posted By Michael (wrighty) on 1st Apr 08 at 11:51pm
You need to modify the staff names! {Smile}

Also, you have 'secondary' groups. I didn't know that! >.<

Re: Staff Image Instead Of Text - Posted By dog199200 (dog199200) on 1st Apr 08 at 11:54pm
{Smile} ya, but i only want the images for the main groups, and i shouldn't have to modify the names, because the names are the exact same as they are in the member groups area, but ok i'll try that {Smile}

Re: Staff Image Instead Of Text - Posted By Michael (wrighty) on 1st Apr 08 at 11:55pm
What has happened is the 'admin' group is a 'secondary' group! {Unsure}

Re: Staff Image Instead Of Text - Posted By dog199200 (dog199200) on 1st Apr 08 at 11:58pm
ah..i dont know how that happened i selected it first..

Interesting, its second no matter what..

Re: Staff Image Instead Of Text - Posted By Michael (wrighty) on 1st Apr 08 at 11:59pm
Go to: 'Reorder Groups' and make sure you have:
= Admininstrator
= Global Mod
= Mod
+ Other Ranks

{Smile}

Re: Staff Image Instead Of Text - Posted By dog199200 (dog199200) on 2nd Apr 08 at 12:02am
ok the worked to a point...now my secondary groups dont show at all not even there rank images

Re: Staff Image Instead Of Text - Posted By Michael (wrighty) on 2nd Apr 08 at 12:05am
To show the secondary rank, go to the admin panel and add this:

{if:secondrygroup}{secondrygroup_image}
{secondrygroup_name}{/if:secondrygroup}

Or for just the image:

{if:secondrygroup}{secondrygroup_image}{/if:secondrygroup}

Under the code that I gave you! {Smile}

Re: Staff Image Instead Of Text - Posted By dog199200 (dog199200) on 2nd Apr 08 at 12:08am
:0 ok it works now ty

Re: [f] Staff Image Instead Of Text - Posted By Michael (wrighty) on 2nd Apr 08 at 12:09am
No Problem! {Smile}