Topic: How to show membership in profile?
Is it possible to show the kind of membership of a member in his profile? So other members can see if the member is guest or paying member?
You are not logged in.
Is it possible to show the kind of membership of a member in his profile? So other members can see if the member is guest or paying member?
Member can't be Guest and have own profile. I suppose you mean Regular member.
What I do when I want to show member's group.
I use {member_group_id} variable to show member's group image.
Let's say your regular members have group id = 2, paid = 5, admins = 1.
You may create three different .gif or .jpg files with words in cloud "Free", "Paid", "Admin" or even use gray star, gold star and crown instead words. Name files accordingly: group_2.gif, group_5.gif, group_1 and place them to your template's media folder.
Then open your template, let's say member_profile.tpl and add anywhere you want:
<img src="{virtual_tpl_path}{session.template}/media/group_{member_group_id}.gif" alt="group_id" />And if everything ok you'll see member's group gif visiting his or her page.
And simple solution is:
<!-- IF member_group_id == "2" -->
Regular member
<!-- ELSEIF member_group_id == "5" -->
Paid member
<!-- ENDIF -->I will try that, thanks!
is not working for me.. can you help me.. I used your code Radioact
What template you edit, Arielleonos?
I tried to modify header.tpl.. is it possible or not?
Then use {session.group_id}
Ok I tried and now it's working.. There was a mistake on the size of the pictures.. thanks!
what should i change in the given code, exactly the same. I tried this but its displaying - group_id , can u suggest.
And simple solution is:
<!-- IF member_group_id == "2" --> Regular member <!-- ELSEIF member_group_id == "5" --> Paid member <!-- ENDIF -->
thanks for the code working perfecto!
Member can't be Guest and have own profile. I suppose you mean Regular member.
What I do when I want to show member's group.I use {member_group_id} variable to show member's group image.
Let's say your regular members have group id = 2, paid = 5, admins = 1.
You may create three different .gif or .jpg files with words in cloud "Free", "Paid", "Admin" or even use gray star, gold star and crown instead words. Name files accordingly: group_2.gif, group_5.gif, group_1 and place them to your template's media folder.Then open your template, let's say member_profile.tpl and add anywhere you want:
<img src="{virtual_tpl_path}{session.template}/media/group_{member_group_id}.gif" alt="group_id" />And if everything ok you'll see member's group gif visiting his or her page.
That does not work for me I added it into the member_profile.tpl and all I get is a broken image and if you lok at the html from the site <img src="{virtual_tpl_path}{session.template}/media/group_{member_group_id}.gif" alt="group_id" />
That does not work for me I added it into the member_profile.tpl and all I get is a broken image and if you lok at the html from the site <img src="{virtual_tpl_path}{session.template}/media/group_{member_group_id}.gif" alt="group_id" />
Sorry editing the wrong file duh!!
I have used the code from radioact, but it´s not working properly. The Problem is, that every user irrespective of the real member group has the same image shown.
I want to use an image for member group_2 (named: group_2.gif) and an different image for member group_5 (named: group_5.gif).
What do I have to type in the code:
<img src="{virtual_tpl_path}{session.template}/media/group_{member_group_id}.gif" alt="group_id" />
And it is possible that at the mausover about the image a text appears as e.g. "paidmember" will appear?
Last edited by sTomnitz (2012-01-06 15:46:58)
Hi,
Open your CP->Settings-Member groups and hover each group link to see correct group ids (Admins: 1, Paid: 5, Regular:2 etc)
Then add this code to your .tpl file
<!-- IF member_group_id == "5" -->
<img src="{virtual_tpl_path}{session.template}/media/group_paid.gif" alt="Paid member" title="Paid member" />
<!-- ELSEIF member_group_id == "1" -->
<img src="{virtual_tpl_path}{session.template}/media/group_admin.gif" alt="Admin" title="Admin" />
<!-- ELSEIF ....
<!-- ENDIF -->