Hide Reply Button for First Post [Deleted]

X_Plaza

Active member
X_Plaza submitted a new resource:

Hide Reply Button for First Post (version 1.0) - Hide Reply Button for First Post

Description:
Sometime you don't want your members reply with quote on first post. This modification will help you to hide reply button for first page.

Installation:
- Find this code in post template:
Code:
<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>...

Read more about this resource...
 
Hi X_Plaza, thank you for all the recent modifications relased. Would you maybe consider adding support for TMS (Template modification system) addon? It helps a lot... Thank you.
 
Good one. A question. This works only for the first post or always for the latest post? I would like to have such a mod that works on the latest post of a thread so that the user cannot quote the last post but just the previous ones. Is that possible with a template modification?
 
I would love to know how to get your nice like/reply/report.... buttons :) also, thanks :)

Save 3 files at attachment and upload to styles/default/xenforo/

Open template message.css
Find following code:
Code:
.message .messageMeta .control
                {
                    @property "messageMetaControl";
 
                    @property "/messageMetaControl";
                }
Replace with
Code:
.message .messageMeta .control{
text-decoration: none;
background-color: #eeeeee;
padding: 0 10px;
margin-top: -5px;
margin-left: 3px;
border: 1px solid #e2e2e2;
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-khtml-border-radius: 2px;
line-height: 24px;
text-shadow: #fff 0px 1px 0px;                 
@property "messageMetaControl";
 
@property "/messageMetaControl";
}

Open template Extra.css
Add following code at the bottom:
Code:
.publicControls .like:before,
.publicControls .unlike:before,
.publicControls .reply:before,
.publicControls .postComment:before{
content: "";
display: inline-block;
width: 16px;
height: 16px;
background: url('styles/default/xenforo/thumb_up.png') no-repeat 50% 50%;
float: left;
margin: 4px 6px -5px -4px !important;
}
 
.publicControls .unlike:before{
background: url('styles/default/xenforo/thumb_down.png') no-repeat 50% 50%;
}
 
.publicControls .postComment:before,
.publicControls .reply:before{
background: url('styles/default/xenforo/message_reply.png') no-repeat 50% 50%;
}

Good one. A question. This works only for the first post or always for the latest post? I would like to have such a mod that works on the latest post of a thread so that the user cannot quote the last post but just the previous ones. Is that possible with a template modification?
Yah, current mod works only for first post. If you want this effect for lastest post. You can replace
Code:
<xen:if is="{$post.position}!=0">
With
Code:
<xen:if is="{$post.post_id} == {$lastPost.post_id}">
 

Attachments

  • message_reply.webp
    message_reply.webp
    454 bytes · Views: 4
  • thumb_up.webp
    thumb_up.webp
    434 bytes · Views: 3
  • thumb_down.webp
    thumb_down.webp
    452 bytes · Views: 3
Yah, current mod works only for first post. If you want this effect for lastest post. You can replace
Code:
<xen:if is="{$post.position}!=0">
With
Code:
<xen:if is="{$post.post_id} == {$lastPost.post_id}">

No way. I've replaced the originale code with

Code:
<xen:if is="{$post.post_id} == {$lastPost.post_id}">
                <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>

but the result is that the REPLY button appear only on the latest post and not on all the other posts. Maybe an error in this code

Code:
<xen:if is="{$post.post_id} == {$lastPost.post_id}">

Can you help?
 
Sorry again. It works but the Reply button is not shown also in the last post of each thread page and this could be a problem...
 
Top Bottom