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

Discussion in 'Resource and Add-on Requests' started by DirtRider, Jan 23, 2014.

?

Who would like to see this mod

  1. Yes

    11 vote(s)
    91.7%
  2. No

    1 vote(s)
    8.3%
  3. Don't see the point of it

    0 vote(s)
    0.0%
  1. DirtRider

    DirtRider Guest

    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
     
    erich37 likes this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    Have you tried editing the member card template?

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

    DirtRider Guest

    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
     
  4. RAHSTYLES

    RAHSTYLES Active Member

    I second that
     
  5. giorgino

    giorgino Well-Known Member

    @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>
     
  6. giorgino

    giorgino Well-Known Member

    @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
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    That screenshot isn't the member card.

    Is that where you are trying to add the content?
     
  8. giorgino

    giorgino Well-Known Member

    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
     

Share This Page