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

+= array in XenForo_CodeEvent::fire('notices_prepare')


Well-known member
In XenForo_ViewRenderer_HtmlPublic change placement of XenForo_CodeEvent::fire('notices_prepare') to the end, so developers can add fields to notices.

         foreach ($noticeList AS $noticeId => $notice)
           $notices[$noticeId] = array(
             'title' => $notice['title'],
             'message' => str_replace(array_keys($noticeTokens), $noticeTokens, $notice['message']),
             'wrap' => $notice['wrap'],
             'dismissible' => ($notice['dismissible'] && XenForo_Visitor::getUserId())

        XenForo_CodeEvent::fire('notices_prepare', array(&$notices, &$noticeTokens, $template, $containerData));
Last edited:


Well-known member
Update: Of course you can render the message in an additional template with the current implementation. So there is no real need of a change here.

XenForo is really very powerful.