function calendar_display_mobile_date_page

7.x calendar.module calendar_display_mobile_date_page($date, $cids_csv)
6.x calendar.module calendar_display_mobile_date_page($date, $cids_csv)

This function is specifically for displaying the events on a particular day for the user, presumed to be in a mobile experience.

The HTML we need to display is assumed to be in our SESSION[calendar_cache][date][cid]

1 call to calendar_display_mobile_date_page()

File

modules/calendar/calendar.module, line 3086

Code

function calendar_display_mobile_date_page($date, $cids_csv) {
  $rtn = "";

  fp_add_css(fp_get_module_path('calendar') . '/css/style.css');

  $date_ts = strtotime($date);
  $month_desc = date('F', $date_ts);
  $month = date('m', $date_ts);
  $year = date('Y', $date_ts);
  $day = date('d', $date_ts);
  $ord = date('S', $date_ts);
  $dow = date('l', $date_ts);


  fp_set_title("$dow, $month_desc $day$ord, $year");
  $cids = explode(",", $cids_csv);



  $rtn .= "<div class='mobile-day-page'>";

  foreach ($cids as $cid) {

    $rtn .= $_SESSION ['calendar_cache'][$date][$cid];

  } // foreach


  $rtn .= "</div>";

  // Let's set our breadcrumbs
  $db = get_global_database_handler();
  $crumbs = array();
  $crumbs [] = array(
    'text' => t("Calendar"),
    'path' => 'calendar',
    'query' => "month_year=$month" . "_$year",
  );
  fp_set_breadcrumbs($crumbs);


  return $rtn;
}