Return to Snippet

Revision: 56518
at April 1, 2012 11:11 by jdhall75

Initial Code
if (isset($data[$day]))
  // Cells with content
  $temp = ($is_current_month === TRUE AND $day == $cur_day) ?
    $this->temp['cal_cell_content_today'] : $this->temp['cal_cell_content'];
  foreach($data[$day] as $content) {
    $out .= str_replace(array('{link}','{link_text}', '{day}'), 
      array($content['link'], $content['link_text'], $day), $temp);
  // Cells with no content
  $temp = ($is_current_month === TRUE AND $day == $cur_day) ?
    $this->temp['cal_cell_no_content_today'] : $this->temp['cal_cell_no_content'];
  $out .= str_replace('{day}', $day, $temp);

Initial URL

Initial Description
At line 220 you should see the the start if an if block.  This is the section that needs to be edited.  I added the foreach block to itterate over the data array and create links in the table cells.

Initial Title
CI calendar class changes

Initial Tags
class, codeigniter

Initial Language