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

Hide Reply Button for First Post [Deleted]

X_Plaza

Active member
#1
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...
 

yavuz

Well-known member
#2
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.
 

AndreaMarucci

Well-known member
#4
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?
 

X_Plaza

Active member
#5
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

AndreaMarucci

Well-known member
#7
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?