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

XF 1.3 How to make thread starter/author posts stand out?

Discussion in 'Styling and Customization Questions' started by Alfa1, Feb 11, 2014.

  1. Alfa1

    Alfa1 Well-Known Member

    Many of my forums are support journals, where the thread starter/author posts their daily experience and other members offer support. The thread starter post are therefore the main content while the posts by other members are basically comments.

    Is there a way to have different styling to the thread starter's posts to make these stand out more?

    What I am thinking about it to add a background colour or border for the author's posts, while removing various postbit and styling elements from the posts by other members. Is this possible? How is this done?
    I could not find any addons for this.
    Suggestions and other ideas are very welcome.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can use this conditional statement: <xen:if is="{$post.user_id} == {$thread.user_id}">

    You would need to combine that with template edits and CSS to achieve the result you want.
    Alfa1 likes this.
  3. Null

    Null Well-Known Member

    Alfa1 likes this.
  4. Alfa1

    Alfa1 Well-Known Member

    That's not enough emphasis. Its the same principle, but does not affect the post styling. Only the avatar.
  5. Alfa1

    Alfa1 Well-Known Member

    What would that conditional be if I want to apply it only to specific nodes?
  6. Brogan

    Brogan XenForo Moderator Staff Member

    <xen:if is="in_array({$forum.node_id}, array(x, y, z)) AND {$post.user_id} == {$thread.user_id}">
    Alfa1 likes this.
  7. Alfa1

    Alfa1 Well-Known Member

    So I guess I should apply two custom classes (author_class and comment_class) to posts (with the above conditional) and add the css properties to extra.css?
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, there are various ways of doing it but using classes, rather than inline styling, is the way to go.

    It's all a bit manic at the moment but I can look at knocking something up for you later when I get a chance.
    Alfa1 likes this.

Share This Page