1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Welcome to XenForo 1.5!

For more information, click here.

Adding Certain Profile Fields to Member Card

Discussion in 'Styling and Customization Questions' started by Ranger375, Nov 17, 2011.

  1. Ranger375

    Ranger375 Well-Known Member

    Is this possible? If so, how? :D
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> member_card

    Add the red code near the bottom:

    		<xen:if is="{$canViewOnlineStatus}">
    			<dl class="pairsInline lastActivity">
    				<dt>{xen:phrase x_was_last_seen, 'username={$user.username}'}:</dt>
    					<xen:if is="{$user.activity}">
    						<xen:if is="{$user.activity.description}">
    							{$user.activity.description}<xen:if is="{$user.activity.itemTitle}"> <em><a href="{$user.activity.itemUrl}" class="concealed">{$user.activity.itemTitle}</a></em></xen:if>,
    						<xen:else />
    							{xen:phrase viewing_unknown_page},
    						<xen:datetime time="{$user.effective_last_activity}" class="muted" />
    					<xen:else />
    						<xen:datetime time="{$user.effective_last_activity}" />
    		<xen:if hascontent="true">
    			<dl class="pairsColumns lastActivity">
    				<xen:if is="{$user.customFields.field_id}">
    					<dt>Field Name:</dt>
    	<a class="close OverlayCloser"></a>
    You need to specify the field_id of the profile field, and type in the Field Name to give it a label. You can add more instances of the blue code inside of the red code to show multiple fields.

    The result:

    Screen shot 2011-11-20 at 1.10.37 PM.png
  3. Ranger375

    Ranger375 Well-Known Member

    Awesome, thank you
  4. JamesBrown

    JamesBrown Well-Known Member

    How could I show the users Unique ID number here? Thanks
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The user_id?


Share This Page