Beispiel #1
0
	$date = date('Y-m-d', strtotime($n->getSystemNotificationDateTime()));
	$time = date('g:i A', strtotime($n->getSystemNotificationDateTime()));
	
	if ($date != $lastDate) { ?>
		<li class="ccm-dashboard-notification-list-date"><h2><? 
			if (date('Y-m-d') == $date) { 
				print t('Today');
			} else if (date('Y-m-d', strtotime('-1 days')) == $date) { 
				print t('Yesterday');
			} else {
				print date('F jS', strtotime($date));
			}
		?></h2></li>
	<? } ?>
	
	<li class="<?=getNotificationClassName($n)?>">
	
	<h3><?=$n->getSystemNotificationTitle()?> <span class="ccm-dashboard-notification-time"><?=$time?></span></h3>
	<? if ($isDashboardModule && in_array($n->getSystemNotificationTypeID(), array(
		SystemNotification::SN_TYPE_CORE_MESSAGE_HELP,
		SystemNotification::SN_TYPE_CORE_MESSAGE_NEWS,
		SystemNotification::SN_TYPE_CORE_MESSAGE_OTHER
	))) { ?>
		<? /* <p><?=$txt->shorten(strip_tags($n->getSystemNotificationDescription()), 64)?></p> */ ?>
	<? } else { ?>
		<p><?=$n->getSystemNotificationDescription()?></p>
	<? } ?>
	
	<? 
	if ($n->getSystemNotificationTypeID() == SystemNotification::SN_TYPE_CORE_UPDATE || $n->getSystemNotificationTypeID() == SystemNotification::SN_TYPE_CORE_UPDATE_CRITICAL) {
		$bodyReadMore = t('Full Release Notes');
            print t('Today');
        } else {
            if (date('Y-m-d', strtotime('-1 days')) == $date) {
                print t('Yesterday');
            } else {
                print date('F jS', strtotime($date));
            }
        }
        ?>
</h2></li>
	<?php 
    }
    ?>
	
	<li class="<?php 
    echo getNotificationClassName($n);
    ?>
">
	
	<h3><?php 
    echo $n->getSystemNotificationTitle();
    ?>
 <span class="ccm-dashboard-notification-time"><?php 
    echo $time;
    ?>
</span></h3>
	<?php 
    if ($isDashboardModule && in_array($n->getSystemNotificationTypeID(), array(SystemNotification::SN_TYPE_CORE_MESSAGE_HELP, SystemNotification::SN_TYPE_CORE_MESSAGE_NEWS, SystemNotification::SN_TYPE_CORE_MESSAGE_OTHER))) {
        ?>
		<p><?php 
        echo $txt->shorten(strip_tags($n->getSystemNotificationDescription()), 64);
	$date = date('Y-m-d', strtotime($n->getSystemNotificationDateTime()));
	$time = date('g:i A', strtotime($n->getSystemNotificationDateTime()));
	
	if ($date != $lastDate) { ?>
		<li class="ccm-dashboard-notification-list-date"><h2><?php  
			if (date('Y-m-d') == $date) { 
				print t('Today');
			} else if (date('Y-m-d', strtotime('-1 days')) == $date) { 
				print t('Yesterday');
			} else {
				print date('F jS', strtotime($date));
			}
		?></h2></li>
	<?php  } ?>
	
	<li class="<?php echo getNotificationClassName($n)?>">
	
	<h3><?php echo $n->getSystemNotificationTitle()?> <span class="ccm-dashboard-notification-time"><?php echo $time?></span></h3>
	<?php  if ($isDashboardModule && in_array($n->getSystemNotificationTypeID(), array(
		SystemNotification::SN_TYPE_CORE_MESSAGE_HELP,
		SystemNotification::SN_TYPE_CORE_MESSAGE_NEWS,
		SystemNotification::SN_TYPE_CORE_MESSAGE_OTHER
	))) { ?>
		<?php  /* <p><?php echo $txt->shorten(strip_tags($n->getSystemNotificationDescription()), 64)?></p> */ ?>
	<?php  } else { ?>
		<p><?php echo $n->getSystemNotificationDescription()?></p>
	<?php  } ?>
	
	<?php  
	if ($n->getSystemNotificationTypeID() == SystemNotification::SN_TYPE_CORE_UPDATE || $n->getSystemNotificationTypeID() == SystemNotification::SN_TYPE_CORE_UPDATE_CRITICAL) {
		$bodyReadMore = t('Full Release Notes');