• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Mandatory Premoderation new theme in the X forum

#1
open: \library\XenForo\ControllerPublic\Forum.php

find:
Code:
$writer->set('discussion_state', $this->getModelFromCache('XenForo_Model_Post')->getPostInsertMessageState(array(), $forum));

replace for:
Code:
if ($forumId==14)
            {
                $writer->set('discussion_state', 'moderated');
            }
        else
            {
                $writer->set('discussion_state', $this->getModelFromCache('XenForo_Model_Post')->getPostInsertMessageState(array(), $forum));
            }
14 - Replace your forum to id



If you need to do pre-moderation in several forums:
Code:
if ($forumId==14 || $forumId==15 || $forumId==16)
 

Brogan

XenForo moderator
Staff member
#7
This template modification has since been superseded by the ability to individually set each forum to be moderated.

node.PNG