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

XF 1.5 How to edit responsive settings?

Discussion in 'Styling and Customization Questions' started by viper357, Mar 1, 2016.

  1. viper357

    viper357 Active Member

    Hi all,

    How do I hide things like Location, Posts, Join Date etc. in responsive view?

    On default style it works fine, but I'm looking to hide all of this information in my custom style as well.

    Is there a template I can copy and paste the code from the default style into my custom style?

    post2.png

    post1.png

    Thank You.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. viper357

    viper357 Active Member

    Thanks for that. I've managed to do it, thank you. :)

    One thing I am trying to do but am struggling with is how to show a members post count in responsive view. Is this possible? I've tried it using
    <xen:if is="@enableResponsive"> but I'm not very good with css. Any tips on how to do this?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    That conditional statement is just for whether the style has the responsive flag set.

    You will need to look for the existing code which shows the post count and override or remove whatever is currently hiding it in the narrow view.
     
  5. viper357

    viper357 Active Member

    Figured it out, thanks.

    In template message_user_info I added:
    Code:
    <!-- show post count in responsive view -->
    <xen:if is="@messageShowMessageCount AND {$user.user_id}">
    <span class="responsiveMessageCount">{xen:phrase messages}: <a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed" rel="nofollow">{xen:number $user.message_count}</a></span>
    </xen:if> 
    <!--  end of showing post count in responsive -->    
    then in message_user_info.css I added this to the top:
    Code:
    /* code to show posts only in responsive view */
    span.responsiveMessageCount
    {
      display: none;
    }
    /* end of code to show posts in responsive view */
    and this near the bottom under the responsive section:
    Code:
    /* code to show posts only in responsive view */
        .Responsive .responsiveMessageCount
        {
            display: block;
        }
    /* end of code to show posts in responsive view */
    I hope my coding is ok, I have no idea what half of it means, lol. :X3:

    01-03-2016-12-17-05.png
     

Share This Page