Die Variable $this->messages ist jetzt in 3 Kategorien unterteilt:
PHP-Code:
$this->messages = array
(
'confirmation' => array(),
'info' => array(),
'error' => array()
)
Deshalb müsste der Code jetzt anders lauten:
PHP-Code:
$blnMessages = (count($this->messages['confirmation']) + count($this->messages['info']) + count($this->messages['error'])) > 0;
PHP-Code:
<?php if ($blnMessages): ?>
<a name="newsletter"></a>
<script type="text/javascript">
window.location.hash = 'newsletter';
</script>
<?php endif; ?>
PHP-Code:
<?php if ($blnMessages): ?>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
window.addEvent('domready', function() { alert('<?php echo implode('\n', array_merge($this->messages['confirmation'], $this->messages['info'], $this->messages['error'])); ?>'); });
//--><!]]>
</script>
<noscript>
<?php
foreach ($this->messages as $strClass => $arrMessages):
foreach ($arrMessages as $strMessage):
?>
<p class="message <?php echo $strClass; ?>"><?php echo $strMessage ?></p>
<?php
endforeach;
endforeach;
?>
</noscript>
<?php endif; ?>