how to put the "Start a conversation" button or link to profile?

erich37

Well-known member
How do I put a button or link to each member´s profile (positioned underneath the avatar in the forums) for "Start a Conversation" (PM) ?

Appreciate your help!
 
Admin CP -> Appearance -> Templates -> message_user_info

Add this code:

Code:
			<div class="userTitle"><a href="{xen:link 'conversations/add', '', 'to={$user.username}'}">{xen:phrase start_conversation}</a></div>

Like so:

Code:
	<xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
		<h3 class="userText">
			<xen:username user="$user" itemprop="name" rich="true" />
			<xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
			<div class="userTitle"><a href="{xen:link 'conversations/add', '', 'to={$user.username}'}">{xen:phrase start_conversation}</a></div>
			<!-- slot: message_user_info_text -->
		</h3>
	</xen:hook>

The result:

Screen shot 2011-07-04 at 10.13.48 AM.webp
 
many thanks Jake, great help as always ! your kind help is very much appreciated !

May I ask another question ?

How do I get the user-location also into this box ?

Thanks again!
 
Top Bottom