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

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

Discussion in 'Closed Suggestions' started by Carlos, Nov 6, 2011.

  1. Carlos

    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?
    James likes this.
  2. Fuhrmann

    Fuhrmann Well-Known Member

    There is a tweak to achive this, if you want.

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

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

    if (!$this->_getPostModel()->canReportPost($post$thread$forum$errorPhraseKey) || !$thread['discussion_open'])
  3. Carlos

    Carlos Well-Known Member

    If there isn't a fix for this in 1.1 I will do exactly what you suggest, Fuhrmann.
    Fuhrmann likes this.
  4. James

    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.
  5. Fuhrmann

    Fuhrmann Well-Known Member

    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!
  6. Carlos

    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 likes this.
  7. Fuhrmann

    Fuhrmann Well-Known Member

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

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

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

Share This Page