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

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

Discussion in 'Styling and Customization Questions' started by erich37, Jul 4, 2011.

  1. erich37

    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!
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.png
     
    erich37 and Lu Kas like this.
  3. erich37

    erich37 Well-Known Member

    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!
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Style Properties -> Message Elements

    Screen shot 2011-07-05 at 9.40.40 AM.png
     
    erich37 likes this.

Share This Page