1

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?

2

Re: How to show membership in profile?

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.

3

Re: How to show membership in profile?

And simple solution is:

<!-- IF member_group_id == "2" -->
Regular member
<!-- ELSEIF member_group_id == "5" -->
Paid member
<!-- ENDIF -->

4

Re: How to show membership in profile?

I will try that, thanks!

5

Re: How to show membership in profile?

is not working for me.. can you help me.. I used your code Radioact

6

Re: How to show membership in profile?

What template you edit, Arielleonos?

7

Re: How to show membership in profile?

I tried to modify header.tpl.. is it possible or not?

8

Re: How to show membership in profile?

Then use {session.group_id}

9

Re: How to show membership in profile?

Ok I tried and now it's working.. There was a mistake on the size of the pictures.. thanks!

10

Re: How to show membership in profile?

what should i change in the given code, exactly the same. I tried this but its displaying - group_id , can u suggest.

11

Re: How to show membership in profile?

radioact wrote

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!

12

Re: How to show membership in profile?

radioact wrote

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" />

13

Re: How to show membership in profile?

william1872 wrote

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!!

14

Re: How to show membership in profile?

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 Netzzwerg78 (2012-01-06 15:46:58)

15

Re: How to show membership in profile?

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 -->

16

Re: How to show membership in profile?

not work on member_profile.tpl