if($mini_cal_count==MINI_CAL_FDOW) { $template->assign_block_vars('mini_cal_row', array()); } // is this a valid weekday? if($mini_cal_count==($mini_cal->day[$i][7])) { $mini_cal_this_day = $mini_cal->day[$i][0]; $d_mini_cal_today = $mini_cal_this_year . ( ($mini_cal_this_month <= 9) ? '0' . $mini_cal_this_month : $mini_cal_this_month ) . ( ($mini_cal_this_day <= 9) ? '0' . $mini_cal_this_day : $mini_cal_this_day ); $mini_cal_day = ( $mini_cal_today == $d_mini_cal_today ) ? '<span class="' . MINI_CAL_TODAY_CLASS . '" style="border-style:outset; border-width:thin; color:' . $config['portal_minicalendar_today_color'] . '">' . '<b>' . $mini_cal_this_day . '</b>' . '</span>' : $mini_cal_this_day; if ( (MINI_CAL_CALENDAR_VERSION != 'NONE') && (MINI_CAL_DATE_SEARCH == 'EVENTS') ) { $mini_cal_day_link = '<a href="' . getMiniCalSearchURL($d_mini_cal_today) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '" style="color:' . $config['portal_minicalendar_day_link_color'] . '">' . ( $mini_cal_day ) . '</a>'; $mini_cal_day = ( in_array($mini_cal_this_day, $mini_cal_event_days) ) ? $mini_cal_day_link : $mini_cal_day; } else { $nix_mini_cal_today = gmmktime($config['board_timezone'], 0, 0, $mini_cal_this_month, $mini_cal_this_day, $mini_cal_this_year); $mini_cal_day_link = '<a href="' . append_sid($phpbb_root_path . "search.$phpEx?search_id=unanswered&st=" . $nix_mini_cal_today) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '" style="color:' . $config['portal_minicalendar_day_link_color'] . '">' . ( $mini_cal_day ) . '</a>'; $mini_cal_day = ( $mini_cal_today >= $d_mini_cal_today ) ? $mini_cal_day_link : $mini_cal_day; } $template->assign_block_vars('mini_cal_row.mini_cal_days', array( 'MINI_CAL_DAY' => $mini_cal_day )); $i++; } // no day
} // output the days for the current month // if MINI_CAL_DATE_SEARCH = POSTS then hyperlink any days which have already past // if MINI_CAL_DATE_SEARCH = EVENTS then hyperlink any which have events for ($i = 0; $i < $mini_cal_month_days;) { // is this the first day of the week? if ($mini_cal_count == MINI_CAL_FDOW) { $template->assign_block_vars('mini_cal_row', array()); } // is this a valid weekday? if ($mini_cal_count == $mini_cal->day[$i][7]) { $mini_cal_this_day = $mini_cal->day[$i][0]; $d_mini_cal_today = $mini_cal_this_year . ($mini_cal_this_month <= 9 ? '0' . $mini_cal_this_month : $mini_cal_this_month) . ($mini_cal_this_day <= 9 ? '0' . $mini_cal_this_day : $mini_cal_this_day); $mini_cal_day = $mini_cal_today == $d_mini_cal_today ? '<span class="' . MINI_CAL_TODAY_CLASS . '">' . $mini_cal_this_day . '</span>' : $mini_cal_this_day; if (MINI_CAL_CALENDAR_VERSION != 'NONE' && MINI_CAL_DATE_SEARCH == 'EVENTS') { $mini_cal_day_link = '<a href="' . getMiniCalSearchURL($d_mini_cal_today) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '">' . $mini_cal_day . '</a>'; $mini_cal_day = in_array($mini_cal_this_day, $mini_cal_event_days) ? $mini_cal_day_link : $mini_cal_day; } else { $nix_mini_cal_today = gmmktime($config['board_timezone'], 0, 0, $mini_cal_this_month, $mini_cal_this_day, $mini_cal_this_year); $mini_cal_day_link = '<a href="' . append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?search_id=mini_cal&d=' . $nix_mini_cal_today) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '">' . $mini_cal_day . '</a>'; $mini_cal_day = $mini_cal_today >= $d_mini_cal_today ? $mini_cal_day_link : $mini_cal_day; } $template->assign_block_vars('mini_cal_row.mini_cal_days', array('MINI_CAL_DAY' => $mini_cal_day)); $i++; } else { $template->assign_block_vars('mini_cal_row.mini_cal_days', array('MINI_CAL_DAY' => ' ')); } // is this the last day of the week? if ($mini_cal_count == 6) { // if so then reset the count $mini_cal_count = 0;