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

Make a section of your website work when forum is down?

Discussion in 'XenForo Development Discussions' started by Jaxel, Sep 19, 2013.

  1. Jaxel

    Jaxel Well-Known Member

    If I disable my forum, I would like to make certain sections of the forum still work... How would this be possible?
  2. Chris D

    Chris D XenForo Developer Staff Member

    XenForo_ControllerPublic_Abstract contains this function:

        * Checks that the board is currently active (and can be viewed by the visitor)
        * or throws an exception.
        * @param string $action
    protected function _assertBoardActive($action)
    $options XenForo_Application::get('options');
            if (!
    $options->boardActive && !XenForo_Visitor::getInstance()->get('is_admin'))
    $this->responseException($this->responseMessage($options->boardInactiveMessage), 503);
    With that in mind you should be able to overwrite the function in your own controller. To have something completely ignore the _assertBoardActive check, simply return true:

        protected function _assertBoardActive($action)
    Of course, as the $action parameter is passed to the function, so you can actually do it on a per action basis.
    Marcus and Daniel Hood like this.

Share This Page