Show
Ignore:
Timestamp:
08/31/10 13:21:09 (21 months ago)
Author:
gnum
Message:

Added better comments to educourse_blog view date header displaying logic

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/views/default/edufeedr/educourse_blog.php

    r153 r154  
    2727                        $post_date = ""; 
    2828                        foreach ($posts as $post) { 
    29                                 // Check if we need to display the posts date header 
     29                                // See if comment belongs to the same date as previous one, if not - add the date header 
    3030                                if ($post_date != date('d.m.Y', $post['date'])) { 
    3131                                        $phtml .= '<h3>' . elgg_view('output/calendar', array('value' => (int) $post['date'])) . '</h3>'; 
     
    5858        $body .= '</td><td style="padding-left: 5px;">'; 
    5959        $comments = $es->getCourseComments(array($vars['entity']->getGUID(),10)); 
    60         if ($comments) { 
     60                if ($comments) { 
    6161                        $chtml = ''; 
    6262                        $c = 1; 
    6363                        $comm_date = ""; 
    6464                        foreach ($comments as $comment) { 
    65                                 // Check if we need to display the comments date header 
     65                                // See if comment belongs to the same date as previous one, if not - add the date header 
    6666                                if ($comm_date != date('d.m.Y', $comment['date'])) { 
    6767                                        $chtml .= '<h3>' . elgg_view('output/calendar', array('value' => (int) $comment['date'])) . '</h3>';