/** * Above the mail calendar header HTML content * @param array $args * @return string HTML */ public function cal_above_header($args) { //print_r($args); extract($args); // jump months section $jumper_content = ''; if ($jumper == 'yes') { $focused_year = (int) $focused_year; $jumper_content .= "<div class='evo_j_container' style='display:none' data-m='{$focused_month_num}' data-y='{$focused_year}'>\r\n\t\t\t\t\t\t<div class='evo_j_months evo_j_dates' data-val='m'>\r\n\t\t\t\t\t\t\t<p class='legend'>" . eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_jumpmonthsM', 'Month') . ": "; // months list $lang = !empty($args['lang']) ? $args['lang'] : 'L1'; $__months = eventon_get_oneL_months($this->cal->evopt2[$lang]); $count = 1; foreach ($__months as $m) { $_current = $focused_month_num == $count ? 'class="current set"' : null; $jumper_content .= "<a data-val='{$count}' {$_current} title='" . eventon_return_timely_names_('month_num_to_name', $count, 'full', $lang) . "' >{$m}</a>"; $count++; } // if jumper offset is set $__a = ''; $start_year = $focused_year - 2 + $jumper_offset; $number_of_years = apply_filters('eventon_jumper_years_count', 6); for ($x = 1; $x < $number_of_years; $x++) { $__a .= '<a' . ($start_year == $focused_year ? " class='current set'" : null) . ' data-val="' . $start_year . '">' . $start_year . '</a>'; $start_year++; } $jumper_content .= "</p><div class='clear'></div></div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class='evo_j_years evo_j_dates' data-val='y'>\r\n\t\t\t\t\t\t\t<p class='legend'>" . eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_jumpmonthsY', 'Year') . ": " . $__a . "</p><div class='clear'></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>"; } // end jump months // go to today or current month $gototoday_content = ''; $gototoday_content .= ""; // above calendar buttons $above_head = apply_filters('evo_cal_above_header_btn', array('evo-jumper-btn' => eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_jumpmonths', 'Jump Months'), 'evo-gototoday-btn' => eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_gototoday', 'Go to Today')), $args); // update array based on whether jumper is active or not if ($jumper != 'yes') { unset($above_head['evo-jumper-btn']); } $above_heade_content = apply_filters('evo_cal_above_header_content', array('evo-jumper-btn' => $jumper_content, 'evo-gototoday-btn' => $gototoday_content), $args); ob_start(); if (count($above_head) > 0) { echo "<div class='evo_cal_above'>"; foreach ($above_head as $ff => $v) { if ($ff == 'evo-gototoday-btn') { echo "<span class='" . $ff . "' style='display:none' data-mo='{$focused_month_num}' data-yr='{$focused_year}' >" . $v . "</span>"; } else { echo "<span class='" . $ff . "'>" . $v . "</span>"; } } echo "</div>"; // content for evo_cal_above echo "<div class='evo_cal_above_content'>"; foreach ($above_heade_content as $cc) { echo $cc; } echo "</div>"; } return ob_get_clean(); }
function eventon_returnmonth_name_by_num($n) { return eventon_return_timely_names_('month_num_to_name', $n); }
function set_three_letter_day_names($lang = '') { // Build 3 letter day name array to use in the fullcal from custom language for ($x = 1; $x < 8; $x++) { $evcal_day_is[$x] = eventon_return_timely_names_('day_num_to_name', $x, 'three', $lang); //print_r($evcal_day_is[$x]); } $this->day_names = $evcal_day_is; }
function get_full_day_names($dayofweekN, $lang = '') { return eventon_return_timely_names_('day_num_to_name', $dayofweekN, 'full', $lang); }