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

XF 1.2 Hide Reply Button for First Post in Specific Forum

QenTox

Well-known member
#3
Thanks, but I am not really good with this, tried that few times, but I always get this error: The following templates contained errors and were not saved: post: 1) Line 51: Template syntax error.

Could you please post here the exact place, where should I place that .node22 code?
 

QenTox

Well-known member
#5
Thanks, no error this time but for some reason still in all forums is the reply button hidden in first post. Tried CTRL + F5, but still no change.
 

QenTox

Well-known member
#6
Actually the code you provided hides the reply button for all posts in all forums except the specified node, where reply button is in all posts except the first post.
 

Brogan

XenForo moderator
Staff member
#7
Oops, yes.
G&T + support = not a good idea.

Just add a new xen:if for the node id, wrapping the original edit.
 

QenTox

Well-known member
#8
Like this?

Code:
<xen:if is="{$forum.node_id}==22">
  <xen:if is="{$post.position}!=0">
    <xen:if is="{$canReply}">
      <a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}" data-postUrl="{xen:link posts/quote, $post}" class="ReplyQuote item control reply" title="{xen:phrase reply_quoting_this_message}"><span></span>{xen:phrase reply}</a>
    </xen:if>
  </xen:if>
</xen:if>
It seems like it does the same as the code before.
 

QenTox

Well-known member
#10
Code:
<xen:if is="{$forum.node_id}==22">
<xen:else />
  <xen:if is="{$post.position}!=0">
    <xen:if is="{$canReply}">
      <a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}" data-postUrl="{xen:link posts/quote, $post}" class="ReplyQuote item control reply" title="{xen:phrase reply_quoting_this_message}"><span></span>{xen:phrase reply}</a>
    </xen:if>
  </xen:if>
</xen:if>
Not sure if I did it right, but now I have no reply at all in specified forum and in all other forums there is reply button for all posts except the first.