How can I remove posters info in first post?

Itworx4me

Well-known member
I would like to remove the posters info in the first post. I would also like to be able to control which forum the information is removed from. Can this be done?

member info.webp
 
You can edit the thread_view template to achieve that:

Change this:
Code:
<xen:include template="message_user_info">
    <xen:map from="$message" to="$user" />
</xen:include>

To this:
Code:
<xen:if is="!{$post.position} == 0">
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
</xen:if>

You will need to apply some custom css though otherwise there will be a blank space where the message user info should be.
 
Here's a quick and dirty version.

In the same template, look for:
Code:
    <div class="messageInfo primaryContent">

Replace with:
Code:
<xen:if is="!{$post.position} == 0">
    <div class="messageInfo primaryContent">
<xen:else />
    <div style="margin:0">
</xen:if>

Ideally you want to replace the inline styling (<div style="margin:0">) with a new class and put the css for that class in EXTRA.css.
 
That might be a bit trickier.

I currently use a condition <xen:if is="{$quickNavSelected} != 'node-55'"> to remove the breadcrumbs from a certain node, but that is in the PAGE_CONTAINER template.
I'm not sure it's possible to achieve what you want in the thread_view template but I'll have a look when I get a chance.
 
I tested this in the thread_view template, and it works:

<xen:if is="{$forum.title} == 'what the forums title is">

</xen:if>

I'm sure there is a better way (I just looked quickly) as you need to use the exact name of the forum title. For example:

<xen:if is="{$forum.title} == 'General Support and Questions">
 
Works for thread_view template, not the message template. Been too long, grrrr. Still testing.

ok, got it, not pretty but it works: in the message template (not thread_view), find:
Code:
<xen:include template="message_user_info">
<xen:map from="$message" to="$user" />
</xen:include>
and replace with this:
Code:
<xen:if is="{$post.position} == '0'">
    <xen:if is="{$forum.title} != 'One for Testing'">
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
    <xen:else />
  include the template containing the CSS over-ride here
    </xen:if>
<xen:else />
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
</xen:if>
Change the One for Testing to the forum's title you do not want the posters info block to appear in the first post.

As Brogan stated you do need to change the css to reclaim the unused white space.
 
Works for thread_view template, not the message template. Been too long, grrrr. Still testing.

ok, got it: in the message template (not thread_view), find:
**codes here**
Change the forum title to the forum's title you do not want the posters info block to appear.

As Brogan stated you do need to change the css to reclaim the unused white space.

i changed a line for useful using

HTML:
<xen:if is="{$post.position} == '0'">
    <xen:if is="!in_array({$forum.node_id}, array(1,2,51,52))">
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
    </xen:if>
<xen:else />
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
</xen:if>
 
i changed a line for useful using

HTML:
<xen:if is="{$post.position} == '0'">
    <xen:if is="!in_array({$forum.node_id}, array(1,2,51,52))">
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
    </xen:if>
<xen:else />
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
</xen:if>

Excellent, thanks! I been away from XenForo for a couple of months and checking for node_id slipped my mind.

Code:
<xen:if is="{$post.position} == '0'">
    <xen:if is="!in_array({$forum.node_id}, array(1,2,51,52))">
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
    <xen:else />
  include the template containing the CSS over-ride here
    </xen:if>
<xen:else />
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
</xen:if>
 
Excellent, thanks! I been away from XenForo for a couple of months and checking for node_id slipped my mind.

Code:
<xen:if is="{$post.position} == '0'">
    <xen:if is="!in_array({$forum.node_id}, array(1,2,51,52))">
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
    <xen:else />
  include the template containing the CSS over-ride here
    </xen:if>
<xen:else />
    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>
</xen:if>
I customize the css as the first message? to introduce code to recognize the plantilla.css?
 
Top Bottom