• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add-on Member Card - Show Custom Profile Fields

Who would like to see this mod

  • Yes

    Votes: 11 91.7%
  • No

    Votes: 1 8.3%
  • Don't see the point of it

    Votes: 0 0.0%

  • Total voters
    12
D

DirtRider

Guest
#1
My members like to be able to view extra information about each other in a quick and easy manner. Without having to clutter up the postbits section with all this additional information I would like to be able to add this to the Members Card. So by just clicking on the members card other members would be able to view the selected information.

If we get a bit more fancy the member themselves could add different information to their own Members Card
 

Chris D

XenForo developer
Staff member
#2
Have you tried editing the member card template?

It should be possible to edit that template to show whatever custom fields you like.
 
D

DirtRider

Guest
#3
No I am not very into doing manual template edits at all. I see you have done a few mods on the Members Card so would you be up for doing this one for me then :D
 

giorgino

Well-known member
#5
It should be possible to edit that template to show whatever custom fields you like.
@Chris D can you explain how? I need to add a custom user field in this point of member_card template

Code:
        <div class="userTitleBlurb">
            <h4 class="userTitle">{xen:helper userTitle, $user}</h4>
            <div class="userBlurb">{xen:helper userBlurb, $user, 0}</div>
           
           <div class="userBlurb">{xen:?????}</div>

        </div>
 

giorgino

Well-known member
#6
@Chris D
I've just find this way, but don't seem to work

Template is member_list_item

Search:
Code:
<div class="userInfo">
                <div class="userBlurb dimmed">{xen:helper userBlurb, $user}</div>
Change to:
Code:
<div class="userInfo">
                <div class="userBlurb dimmed">{xen:helper userBlurb, $user}
                    <xen:if hascontent="true">
                        <xen:contentcheck>
                            {xen:helper userFieldValue, $userFieldsInfo.nella_vita_faccio_il, $user, {$user.customFields.nella_vita_faccio_il}}
                        </xen:contentcheck>
                    </xen:if>
                </div>
This is the desired result:

Schermata 2015-02-02 alle 17.07.50.png
 

giorgino

Well-known member
#8
That screenshot isn't the member card.
You're right @Brogan I've solved the member_card insert in this way:

Template is: member_card

Search:
Code:
<div class="userTitleBlurb">
            <h4 class="userTitle">{xen:helper userTitle, $user}</h4>
            <div class="userBlurb">{xen:helper userBlurb, $user, 0}</div>
        </div>
Code:
<div class="userTitleBlurb">
            <h4 class="userTitle">{xen:helper userTitle, $user}</h4>
           
Repleace with:
            <xen:if hascontent="true">
                <xen:contentcheck>
                    <h4 class="userTitle">{xen:helper userFieldValue, $userFieldsInfo.nella_vita_faccio_il, $user, {$user.customFields.nella_vita_faccio_il}}</h4>
                </xen:contentcheck>
            </xen:if>
           
            <div class="userBlurb">{xen:helper userBlurb, $user, 0}</div>
        </div>
So now I search a solution for previous post.
https://xenforo.com/community/threads/member-card-show-custom-profile-fields.67269/#post-891694