• 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')

Marcus

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

PHP:
         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:

Marcus

Well-known member
#3
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.