getMessageQueue(); // Build the sorted message list if (is_array($messages) && count($messages)) { foreach ($messages as $msg) { if (isset($msg['type']) && isset($msg['message'])) { $lists[$msg['type']][] = $msg['message']; } } } // If messages exist render them if (is_array($lists)) { // Build the return string $contents .= "\n
"; foreach ($lists as $type => $msgs) { if (count($msgs)) { $contents .= "\n
".JText::_( $type )."
"; $contents .= "\n
"; $contents .= "\n\t"; $contents .= "\n
"; } } $contents .= "\n
"; } return $contents; } }