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

How Do I Add Elements Profile Sidebar?

#1
Hello,

I've figured out how to add elements on a users profile sidebar that appears on message threads but how do I add elements to the user profile sidebar on the profile page itself?

I have a screenshot below...I added a custom field (country flag) that appears on the threads but not in the profile:

http://screencast.com/t/Dufn8ajBUs5

How do I add it here?

Thanks. :)

Ken
 

Jake Bunce

XenForo moderator
Staff member
#2
Admin CP -> Appearance -> Templates -> member_view

Add the red code and specify the field_id:

Code:
		<div class="section infoBlock">
			<dl class="secondaryContent pairs">

				<xen:hook name="member_view_info_block">
				
				<xen:if is="{$canViewOnlineStatus}">
					<dt>{xen:phrase last_activity}:</dt>
						<dd><xen:datetime time="$user.effective_last_activity" /></dd>
				</xen:if>

				<dt>{xen:phrase joined}:</dt>
					<dd>{xen:date $user.register_date}</dd>

				<dt>{xen:phrase messages}:</dt>
					<dd>{xen:number $user.message_count}</dd>

				<dt>{xen:phrase likes_received}:</dt>
					<dd>{xen:number $user.like_count}</dd>

				<dt>{xen:phrase trophy_points}:</dt>
					<dd><a href="{xen:link 'members/trophies', $user}" class="OverlayTrigger">{xen:number $user.trophy_points}</a></dd>
					
				<xen:if is="{$canViewWarnings}">
					<dt>{xen:phrase warning_points}:</dt><dd>{xen:number $user.warning_points}</dd>
				</xen:if>

				<xen:if is="{$user.customFields.field_id}">
					<dt>{xen:helper userFieldTitle, 'field_id'}:</dt><dd>{xen:helper userFieldValue, {$userFieldsInfo.field_id}, $user, {$user.customFields.field_id}}</dd>
				</xen:if>
					
				</xen:hook>

			</dl>
		</div>
The result:

Screen shot 2012-09-01 at 7.09.38 AM.png