{if $unreadMsgs and $gBitUser->getPreference('messages_alert') == 'y' and !$smarty.cookies.messages_alert_sent} {/if}