1. 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')

Discussion in 'XenForo Development Discussions' started by Marcus, Oct 22, 2013.

  1. Marcus

    Marcus 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: Oct 22, 2013
  2. Marcus

    Marcus Well-Known Member

    That way one can modify the content at template level, not at php level.
  3. Marcus

    Marcus 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.

Share This Page