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

XF 1.4 Message and Thread Title

Discussion in 'Styling and Customization Questions' started by Tuncay1551, Mar 1, 2015.

  1. Tuncay1551

    Tuncay1551 New Member

    I want to customize my message layout as the picture shown below.

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> message

    Add the red code:

    		<xen:hook name="message_content" params="{xen:array 'message={$message}'}">
    		<xen:if is="{$thread.title}">
    		<div style="border-bottom: 1px solid #dddddd; padding-bottom: 5px; margin-bottom: 5px;">
    		<div class="messageContent">		
    				<blockquote class="messageText ugc baseHtml{xen:if $message.isIgnored, ' ignored'}">
    					<xen:include template="ad_message_body" />
    					{xen:raw $message.messageHtml}
    			{xen:raw $messageContentAfterTemplate}
    viper357 likes this.
  3. Tuncay1551

    Tuncay1551 New Member

    Thanks alot Jake it works :)
  4. viper357

    viper357 Active Member

    How could I do it so that the red code is not displayed in responsive view? I've tried to figure it out using Brogan's guides but I can't get my head around it? I have the thread title displaying next to the date and time in a post, but I want to hide the thread title in responsive view.

    To do this I simply added {$thread.title} at the end of this line:
    <a href="{xen:link threads/post-permalink, $thread, 'post={$post}'}" title="{xen:phrase permalink}" class="datePermalink"><span class="DateTime">{xen:datetime {$post.post_date}, 'absolute'} - {$thread.title}</span></a>
    Spring Specials at Aquaria SA   Marine Aquariums South Africa.png

    Thanks. :)
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    Surround your code with a block with a class, such as:

    <span class="myExtraThreadStuff">
    Then add CSS to hide it in Responsive mode:

    Admin CP -> Appearance -> Templates -> EXTRA.css

    .Responsive .myExtraThreadStuff
    	display: none;
  6. viper357

    viper357 Active Member

    Thank You. (y)

Share This Page