Lack of interest [Tweak] Locked Threads doesn't stop report button.

Carlos

Well-known member
Recently I locked a thread where a member was trying to scold users into downloading a copy of MW3 on my forum.

This didn't stop the thread starter from reporting a post that I made saying that [that] thread is locked. I found it irritating.

The report button is supposed to be used for an open thread, informing a moderator or administrator of an open thread of some trouble.

Can we please disable reports on a LOCKED thread?
 

Fuhrmann

Well-known member
There is a tweak to achive this, if you want.

Open the file library/XenForo/ControllerPublic/Post and find this:

PHP:
if (!$this->_getPostModel()->canReportPost($post, $thread, $forum, $errorPhraseKey))
Replace with this:

PHP:
if (!$this->_getPostModel()->canReportPost($post, $thread, $forum, $errorPhraseKey) || !$thread['discussion_open'])
 

James

Well-known member
Probably be easier to tweak it in the templates rather than the code, unless you plan on using an event listener.
 

Fuhrmann

Well-known member
If there isn't a fix for this in 1.1 I will do exactly what you suggest, Fuhrmann.
I've just posted this, because we don't know if this will be implemented or not. So you can do it now and do not have to wait the next version!
 

Carlos

Well-known member
But if I do it now it's going to be overwritten and then I have to come back to this thread and do it all over again.
 

Fuhrmann

Well-known member
But if I do it now it's going to be overwritten and then I have to come back to this thread and do it all over again.

Or, as James said, you could open the template post, find this:

Code:
<xen:if is="{$post.canReport}">
and replace with this:

Code:
<xen:if is="{$post.canReport} && {$thread.discussion_state} == 1">
 
Top