/** * 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(); }
echo "<div class='row'>\n\t\t\t\t\t\t\t\t\t<p class='color_circle' data-hex='8c8c8c'></p>\n\t\t\t\t\t\t\t\t\t<p class='evoau_color_picker'>\n\t\t\t\t\t\t\t\t\t\t<input type='hidden' class='evcal_event_color' name='evcal_event_color'/>\n\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='evcal_event_color_n' class='evcal_event_color_n' value='0'/>\n\t\t\t\t\t\t\t\t\t\t<label for='" . $__field_id . "'>" . $__field_name . "</label>\n\t\t\t\t\t\t\t\t\t</p>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>"; break; case 'tax': $terms = get_terms($field[1], array('hide_empty' => false)); if (count($terms) > 0) { echo "<div class='row'>\n\t\t\t\t\t\t\t\t\t\t<p class='label'><label for='" . $__field_id . "'>" . $__field_name . "</label></p><p class='checkbox_row'>"; foreach ($terms as $term) { echo "<span><input type='checkbox' name='" . $__field_id . "[]' value='" . $term->term_id . "'/> " . $term->name . "</span>"; } echo "</p>\n\t\t\t\t\t\t\t\t\t</div>"; } break; case 'image': echo "<div class='row'>\n\t\t\t\t\t\t\t\t\t<p class='label'><label for='" . $__field_id . "'>" . $__field_name . "</label></p>\n\t\t\t\t\t\t\t\t\t<p><input type='file' id='" . $__field_id . "' name='" . $__field_id . "' /></p>\n\t\t\t\t\t\t\t\t</div>"; break; } } } } // Submit button echo "<div class='submit_row row'><p><input id='evoau_submit' type='submit' value='" . eventon_get_custom_language($opt_2, 'evoAUL_se', 'Submit Event', $lang) . "'/></p></div>"; ?> </div> <?php } ?> </form> </div>
/** * reusable variables within the calendar * @return */ public function reused() { $lang = !empty($this->cal->shortcode_args['lang']) ? $this->cal->shortcode_args['lang'] : 'L1'; // for each event type category $ett_i18n_names = evo_get_localized_ettNames($lang, $this->cal->evopt1, $this->cal->evopt2); for ($x = 1; $x < $this->cal->event_types; $x++) { $ab = $x == 1 ? '' : $x; $this->cal->lang_array['et' . $ab] = $ett_i18n_names[$x]; } $this->cal->lang_array['no_event'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_noeve', 'No Events', $lang); $this->cal->lang_array['evcal_lang_yrrnd'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_yrrnd', 'Year Around Event', $lang); $this->cal->lang_array['evloc'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_evloc', 'Event Location', $lang); $this->cal->lang_array['evorg'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_evorg', 'Event Organizer', $lang); $this->cal->lang_array['evsme'] = eventon_get_custom_language($this->cal->evopt2, 'evcal_lang_sme', 'Show More Events', $lang); //print_r($this->lang_array); }
public function _event_date($event_id, $event_pmv = '') { global $eventon; $time = $this->get_correct_times($event_id, $event_pmv = ''); $evcal_lang_allday = eventon_get_custom_language('', 'evcal_lang_allday', 'All Day'); $event_post_meta = !empty($event_pmv) ? $event_pmv : get_post_custom($event_id); $date_array = $eventon->evo_generator->generate_time_('', '', $event_post_meta, $evcal_lang_allday, '', '', $time['start'], $time['end']); return $date_array; }
?> </div><!-- .evoau_table--> </div><!-- inner --> <div class='evoau_json' style='display:none'><?php $nofs = array('nof0' => !empty($this->evoau_opt['evoaun_msg_f']) ? $this->evoau_opt['evoaun_msg_f'] : __('Required fields missing', 'eventon'), 'nof1' => eventon_get_custom_language($opt_2, 'evoAUL_nof1', 'Required Feidls Missing', $lang), 'nof2' => eventon_get_custom_language($opt_2, 'evoAUL_nof2', 'Invalid validation code please try again', $lang), 'nof3' => eventon_get_custom_language($opt_2, 'evoAUL_nof3', 'Thank you for submitting your event!', $lang), 'nof4' => eventon_get_custom_language($opt_2, 'evoAUL_nof4', 'Could not create event post, try again later!', $lang), 'nof5' => eventon_get_custom_language($opt_2, 'evoAUL_nof5', 'Bad nonce form verification, try again!', $lang), 'nof6' => eventon_get_custom_language($opt_2, 'evoAUL_nof6', 'You can only submit one event!', $lang)); echo json_encode($nofs); ?> </div> <div class='evoau_success_msg' style='display:<?php echo $LIMITSUB ? 'block' : 'none'; ?> '><p><b></b><?php echo $LIMITSUB ? eventon_get_custom_language($opt_2, 'evoAUL_nof6', 'You can only submit one event!', $lang) : ''; ?> </p></div> <?php if ($_msub) { ?> <p class='msub_row' style='display:none;text-align:center'><a id='evoau_msub' class='msub evcal_btn'><?php echo evo_lang('Submit another event', $lang, $opt_2); ?> </a></p> <?php } ?> <?php } // close if $LOGINCHECK
</tr> <?php } ?> </tbody> </table> <div class="single_variation_wrap evotx_orderonline_add_cart" style="display:none;"> <div class="single_variation"></div> <div class="variations_button"> <a class='evcal_btn evoAddToCart variable_add_to_cart_button' data-product_id='<?php echo $woo_product_id; ?> '><?php echo eventon_get_custom_language($opt, 'evoTX_002', 'Add to Cart'); ?> </a> <input type="hidden" name="variation_id" value="" /> <?php woocommerce_quantity_input(array(), $product); ?> <input type="hidden" name="add-to-cart" value="<?php echo $product->id; ?> " /> <input type="hidden" name="product_id" value="<?php echo esc_attr($woo_product_id); ?> " /> <div class="clear"></div>
/** * Event Top section * process content as html output * @since eventon 2.4.8 * @version 0.1 */ function eventon_get_eventtop_print($array, $evOPT, $evOPT2) { $OT = ''; $_additions = apply_filters('evo_eventtop_adds', array()); foreach ($array as $element => $elm) { // convert to an object $object = new stdClass(); foreach ($elm as $key => $value) { $object->{$key} = $value; } $boxname = in_array($element, $_additions) ? $element : null; switch ($element) { case has_filter("eventon_eventtop_{$boxname}"): $helpers = array('evOPT' => $evOPT, 'evoOPT2' => $evOPT2); $OT .= apply_filters("eventon_eventtop_{$boxname}", $object, $helpers); break; case 'ft_img': $url = !empty($object->url_med) ? $object->url_med : $object->url; $url = apply_filters('eventon_eventtop_image_url', $url); $OT .= "<span class='ev_ftImg' data-img='" . (!empty($object->url_full) ? $object->url_full[0] : '') . "' data-thumb='" . $url . "' style='background-image:url(" . $url . ")'></span>"; break; case 'day_block': $OT .= "<span class='evcal_cblock " . ($object->yearlong ? 'yrl ' : null) . ($object->monthlong ? 'mnl ' : null) . "' data-bgcolor='" . $object->color . "' data-smon='" . $object->start['F'] . "' data-syr='" . $object->start['Y'] . "'>"; if ($object->showyear == 'yes') { $OT .= "<em class='evo_year' >" . $object->start['Y'] . '</em>'; } $OT .= "<em class='evo_date' >" . $object->day_name . $object->html['html_date'] . '</em>'; $OT .= "<span class='evo_time'>" . $object->html['html_time'] . "</span>"; $OT .= "<em class='clear'></em></span>"; break; // title section of the event top // title section of the event top case 'titles': $show_widget_eventtops = !empty($evOPT['evo_widget_eventtop']) && $evOPT['evo_widget_eventtop'] == 'yes' ? '' : 'hide_eventtopdata '; $OT .= "<span class='evcal_desc evo_info " . $show_widget_eventtops . ($object->yearlong ? 'yrl ' : null) . ($object->monthlong ? 'mnl ' : null) . "' {$object->loc_vars} >"; // above title inserts $OT .= "<span class='evo_above_title'>"; $OT .= apply_filters("eventon_eventtop_abovetitle", '', $object); if ($object->cancel) { $OT .= "<span class='evo_event_headers canceled' title='" . (!empty($object->cancel_reason) ? $object->cancel_reason : null) . "'>" . eventon_get_custom_language($evOPT2, 'evcal_evcard_evcancel', 'Event Cancelled') . "</span>"; } $OT .= "</span>"; // event edit button $editBTN = ''; if (current_user_can('manage_options') && !empty($evOPT['evo_showeditevent']) && $evOPT['evo_showeditevent'] == 'yes') { $editBTN = "<i href='" . get_edit_post_link($object->eventid) . "' class='editEventBtnET fa fa-pencil'></i>"; } $OT .= "<span class='evcal_desc2 evcal_event_title' itemprop='name'>" . $object->title . $editBTN . "</span>"; // below title inserts $OT .= "<span class='evo_below_title'>"; if ($object->subtitle) { $OT .= "<span class='evcal_event_subtitle' >" . $object->subtitle . "</span>"; } $OT .= "</span>"; break; case 'belowtitle': $OT .= "<span class='evcal_desc_info' >"; // time if ($object->fields_ && in_array('time', $object->fields)) { $OT .= "<em class='evcal_time'>" . $object->html['html_fromto'] . (!empty($object->timezone) ? ' <em class="evo_etop_timezone">' . $object->timezone . '</em>' : null) . "</em> "; } // location information if ($object->fields_) { // location name $LOCname = in_array('locationame', $object->fields) && $object->locationname ? $object->locationname : false; // location address $LOCadd = in_array('location', $object->fields) && !empty($object->locationaddress) ? $object->locationaddress : false; if ($LOCname || $LOCadd) { $OT .= '<em class="evcal_location" ' . ($object->lonlat ? $object->lonlat : null) . ' data-add_str="' . $LOCadd . '">' . ($LOCname ? '<em class="event_location_name">' . $LOCname . '</em>' : '') . ($LOCname && $LOCadd ? ', ' : '') . $LOCadd . '</em>'; } } $OT .= "</span>"; $OT .= "<span class='evcal_desc3'>"; //organizer $org = $object->organizer_name ? $object->organizer_name : (!empty($object->evvals['evcal_organizer']) ? $object->evvals['evcal_organizer'][0] : false); if ($object->fields_ && in_array('organizer', $object->fields) && $org) { $OT .= "<em class='evcal_oganizer'><i>" . eventon_get_custom_language($evOPT2, 'evcal_evcard_org', 'Event Organized By') . ':</i> ' . $org . "</em>"; } //event type if ($object->tax) { $OT .= $object->tax; } // event tags if ($object->fields_ && in_array('tags', $object->fields) && !empty($object->tags)) { $OT .= "<span class='evo_event_tags'>\n\t\t\t\t\t\t<em><i>" . eventon_get_custom_language($evOPT2, 'evo_lang_eventtags', 'Event Tags') . "</i></em>"; $count = count($object->tags); $i = 1; foreach ($object->tags as $tag) { $OT .= "<em data-tagid='{$tag->term_id}'>{$tag->name}" . ($count == $i ? '' : ',') . "</em>"; $i++; } $OT .= "</span>"; } // custom fields for ($x = 1; $x < $object->cmdcount + 1; $x++) { if ($object->fields_ && in_array('cmd' . $x, $object->fields) && !empty($object->evvals['_evcal_ec_f' . $x . 'a1_cus'])) { $def = $evOPT['evcal_ec_f' . $x . 'a1']; // default custom meta field name $i18n_nam = eventon_get_custom_language($evOPT2, 'evcal_cmd_' . $x, $def); // custom fiels icon $icon_string = ''; if (!empty($evOPT['evcal__fai_00c' . $x]) && !empty($evOPT['evo_eventtop_customfield_icons']) && $evOPT['evo_eventtop_customfield_icons'] == 'yes') { $icon_string = '<i class="fa ' . $evOPT['evcal__fai_00c' . $x] . '"></i>'; } $OT .= $x == 1 ? "<b class='clear'></b>" : null; // type button if (!empty($evOPT['evcal_ec_f' . $x . 'a2']) && $evOPT['evcal_ec_f' . $x . 'a2'] == 'button') { $href = !empty($object->evvals['_evcal_ec_f' . $x . 'a1_cusL']) ? $object->evvals['_evcal_ec_f' . $x . 'a1_cusL'][0] : ''; $target = !empty($object->evvals['_evcal_ec_f' . $x . '_onw']) ? $object->evvals['_evcal_ec_f' . $x . '_onw'][0] : 'no'; $OT .= "<em class='evcal_cmd evocmd_button' data-href='" . $href . "' data-target='" . $target . "'>" . $icon_string . $object->evvals['_evcal_ec_f' . $x . 'a1_cus'][0] . "</em> "; } else { $OT .= "<em class='evcal_cmd'>" . $icon_string . "<i>" . $i18n_nam . ':</i> ' . $object->evvals['_evcal_ec_f' . $x . 'a1_cus'][0] . "</em> "; } } } break; case 'close1': $OT .= "</span>"; // span.evcal_desc3 break; case 'close2': $OT .= "</span>"; // span.evcal_desc $OT .= "<em class='clear'></em>"; break; } } return $OT; }
function html_yesnobtn($args = '') { $defaults = array('id' => '', 'var' => '', 'no' => '', 'default' => '', 'input' => false, 'inputAttr' => '', 'label' => '', 'guide' => '', 'guide_position' => '', 'abs' => 'no', 'attr' => '', 'afterstatement' => '', 'lang' => 'L1'); $args = shortcode_atts($defaults, $args); $_attr = $no = ''; if (!empty($args['var'])) { $no = $args['var'] == 'yes' ? null : (!empty($args['default']) && $args['default'] == 'yes' ? null : 'NO'); } else { $no = !empty($args['default']) && $args['default'] == 'yes' ? null : 'NO'; } if (!empty($args['attr'])) { foreach ($args['attr'] as $at => $av) { $_attr .= $at . '="' . $av . '" '; } } // input field $input = ''; if ($args['input']) { $input_value = !empty($args['var']) ? $args['var'] : (!empty($args['default']) ? $args['default'] : 'no'); // Attribut values for input field $inputAttr = ''; if (!empty($args['inputAttr'])) { foreach ($args['inputAttr'] as $at => $av) { $inputAttr .= $at . '="' . $av . '" '; } } // input field $input = "<input {$inputAttr} type='hidden' name='{$args['id']}' value='{$input_value}'/>"; } $guide = ''; if (!empty($args['guide'])) { $guide = $this->tooltips($args['guide'], $args['guide_position']); } $label = ''; if (!empty($args['label'])) { $label = "<label class='ajde_yn_btn_label' for='{$args['id']}'>{$args['label']}{$guide}</label>"; } $text_NO = eventon_get_custom_language($this->opt2, 'evo_lang_no', 'NO', $args['lang']); $text_YES = eventon_get_custom_language($this->opt2, 'evo_lang_yes', 'YES', $args['lang']); return '<span id="' . $args['id'] . '" class="ajde_yn_btn ' . ($no ? 'NO' : null) . '' . ($args['abs'] == 'yes' ? ' absolute' : null) . '" ' . $_attr . ' data-afterstatement="' . $args['afterstatement'] . '"><span class="btn_inner" style=""><em class="no">' . $text_NO . '</em><span class="catchHandle"></span><em class="yes">' . $text_YES . '</em></span></span>' . $input . $label; }
/** out put just the sort bar for the calendar */ public function eventon_get_cal_sortbar($args, $sortbar = true) { // define variable values $sorting_options = !empty($this->evopt1['evcal_sort_options']) ? $this->evopt1['evcal_sort_options'] : null; $filtering_options = !empty($this->evopt1['evcal_filter_options']) ? $this->evopt1['evcal_filter_options'] : array(); $content = ''; $this->reused(); // update reusable variables real quikc // START the magic ob_start(); // IF sortbar is set to be shown if ($sortbar) { echo $this->evcal_hide_sort != 'yes' ? "<a class='evo_sort_btn'>" . eventon_get_custom_language($this->evopt2, 'evcal_lang_sopt', 'Sort Options') . "</a>" : null; } // expand sort section by default or not $SO_display = !empty($args['exp_so']) && $args['exp_so'] == 'yes' ? 'block' : 'none'; echo "<div class='eventon_sorting_section' style='display:{$SO_display}'>"; if ($this->evcal_hide_sort != 'yes') { // if sort bar is set to show // sorting section $evsa1 = array('date' => 'Date', 'title' => 'Title', 'color' => 'Color'); $sort_options = array(1 => 'sort_date', 'sort_title', 'sort_color'); $__sort_key = substr($args['sort_by'], 5); echo "\n\t\t\t\t\t<div class='eventon_sort_line evo_sortOpt' >\n\t\t\t\t\t\t<div class='evo_sortby'><p>" . eventon_get_custom_language($this->evopt2, 'evcal_lang_sort', 'Sort By') . ":</p></div>\n\t\t\t\t\t\t<div class='evo_srt_sel'><p class='fa'>" . eventon_get_custom_language($this->evopt2, 'evcal_lang_s' . $__sort_key, $__sort_key) . "</p>"; if (!empty($sorting_options)) { echo "<div class='evo_srt_options'>"; $cnt = 1; if (is_array($sorting_options)) { foreach ($evsa1 as $so => $sov) { if (in_array($so, $sorting_options) || $so == 'date') { echo "<p data-val='sort_" . $so . "' data-type='" . $so . "' class='evs_btn " . ($args['sort_by'] == $sort_options[$cnt] ? 'evs_hide' : null) . "' >" . eventon_get_custom_language($this->evopt2, 'evcal_lang_s' . $so, $sov) . "</p>"; } $cnt++; } } echo "</div>"; } // endif; echo "</div>"; echo "<div class='clear'></div>\n\t\t\t\t\t</div>"; } $__text_all_ = eventon_get_custom_language($this->evopt2, 'evcal_lang_all', 'All'); // filtering options array $_filter_array = array('evloc' => 'event_location', 'evorg' => 'event_organizer'); // EACH EVENT TYPE $__event_types = $this->shell->get_event_types(); foreach ($__event_types as $ety => $event_type) { $_filter_array[$ety] = $event_type; } // hook for additional filters $_filter_array = apply_filters('eventon_so_filters', $_filter_array); // filtering section echo "<div class='eventon_filter_line'>"; foreach ($_filter_array as $ff => $vv) { // vv = event_type etc. if (in_array($vv, $filtering_options)) { // filtering value filter is set to show //print_r($cats); $inside = ''; // check whether this filter type value passed if ($args[$vv] == 'all') { // show all filter type $__filter_val = 'all'; $__text_all = $__text_all_; $inside .= "<p class='evf_hide' data-filter_val='all'>{$__text_all}</p>"; $cats = get_categories(array('taxonomy' => $vv)); foreach ($cats as $ct) { $inside .= "<p data-filter_val='" . $ct->term_id . "' data-filter_slug='" . $ct->slug . "'>" . $ct->name . "</p>"; } } else { $__filter_val = !empty($args[$vv]) ? $args[$vv] : 'all'; $__text_all = get_term_by('id', $args[$vv], $vv, ARRAY_N); $__text_all = $__text_all[1]; $inside .= "<p class='evf_hide' data-filter_val='{$args[$vv]}'>{$__text_all}</p>"; $cats = get_categories(array('taxonomy' => $vv)); $inside .= "<p data-filter_val='all'>{$__text_all_}</p>"; foreach ($cats as $ct) { if ($ct->term_id != $__filter_val) { $inside .= "<p data-filter_val='" . $ct->term_id . "' data-filter_slug='" . $ct->slug . "'>" . $ct->name . "</p>"; } } } // only for event type taxonomies $_isthis_ett = in_array($vv, $__event_types) ? true : false; $ett_count = $ff == 1 ? '' : $ff; $lang__ = $_isthis_ett ? $this->lang_array['et' . $ett_count] : $this->lang_array[$ff]; echo "<div class='eventon_filter evo_sortOpt' data-filter_field='{$vv}' data-filter_val='{$__filter_val}' data-filter_type='tax' data-fl_o='IN'>\n\t\t\t\t\t\t\t<div class='eventon_sf_field'><p>" . $lang__ . ":</p></div>\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class='eventon_filter_selection'>\n\t\t\t\t\t\t\t\t<p class='filtering_set_val' data-opts='evs4_in'>{$__text_all}</p>\n\t\t\t\t\t\t\t\t<div class='eventon_filter_dropdown' style='display:none'>"; echo $inside; echo "</div>\n\t\t\t\t\t\t\t</div><div class='clear'></div>\n\t\t\t\t\t\t</div>"; } else { // if not tax values is passed if (!empty($args[$vv])) { $taxFL = eventon_tax_filter_pro($args[$vv]); echo "<div class='eventon_filter' data-filter_field='{$vv}' data-filter_val='{$taxFL[0]}' data-filter_type='tax' data-fl_o='{$taxFL[1]}'></div>"; } } } // (---) Hook for addon if (has_action('eventon_sorting_filters')) { echo do_action('eventon_sorting_filters', $content); } echo "</div>"; // #eventon_filter_line echo "<div class='clear'></div>"; // clear echo "</div>"; // #eventon_sorting_section // (---) Hook for addon if (has_action('eventon_below_sorts')) { echo do_action('eventon_below_sorts', $content); } // load bar for calendar echo "<div id='eventon_loadbar_section'><div id='eventon_loadbar'></div></div>"; // (---) Hook for addon if (has_action('eventon_after_loadbar')) { echo do_action('eventon_after_loadbar', $content); } return ob_get_clean(); }
/** * Event Top section * process content as html output * @since eventon 2.3.7 * @version 0.1 */ function eventon_get_eventtop_print($array, $evOPT, $evOPT2) { $OT = ''; $_additions = apply_filters('evo_eventtop_adds', array()); foreach ($array as $element => $elm) { // convert to an object $object = new stdClass(); foreach ($elm as $key => $value) { $object->{$key} = $value; } $boxname = in_array($element, $_additions) ? $element : null; switch ($element) { case has_filter("eventon_eventtop_{$boxname}"): $helpers = array('evOPT' => $evOPT, 'evoOPT2' => $evOPT2); $OT .= apply_filters("eventon_eventtop_{$boxname}", $object, $helpers); break; case 'ft_img': $url = !empty($object->url_med) ? $object->url_med : $object->url; $OT .= "<span class='ev_ftImg' style='background-image:url(" . $url . ")'></span>"; break; case 'day_block': $OT .= "<span class='evcal_cblock' data-bgcolor='" . $object->color . "' data-smon='" . $object->start['F'] . "' data-syr='" . $object->start['Y'] . "'><em class='evo_date' >" . $object->day_name . $object->html['html_date'] . '</em>'; $OT .= "<em class='evo_time'>" . $object->html['html_time'] . "</em>"; $OT .= "<em class='clear'></em></span>"; break; case 'titles': $OT .= "<span class='evcal_desc evo_info " . ($object->yearlong ? 'yrl' : null) . "' {$object->loc_vars} >"; if ($object->cancel) { $OT .= "<span class='evo_event_headers canceled' title='" . (!empty($object->cancel_reason) ? $object->cancel_reason : null) . "'>" . eventon_get_custom_language($evOPT2, 'evcal_evcard_evcancel', 'Event Cancelled') . "</span>"; } $OT .= "<span class='evcal_desc2 evcal_event_title' itemprop='name'>" . $object->title . "</span>"; if ($object->subtitle) { $OT .= "<span class='evcal_event_subtitle' >" . $object->subtitle . "</span>"; } break; case 'belowtitle': $OT .= "<span class='evcal_desc_info' >"; // time if ($object->fields_ && in_array('time', $object->fields)) { $OT .= "<em class='evcal_time'>" . $object->html['html_fromto'] . (!empty($object->timezone) ? ' <em class="evo_etop_timezone">' . $object->timezone . '</em>' : null) . "</em> "; } //location if ($object->fields_ && in_array('location', $object->fields) && !empty($object->location)) { $OT .= $object->location; } //location name if ($object->fields_ && in_array('locationame', $object->fields) && $object->locationname) { $OT .= '<em class="evcal_location event_location_name">' . stripslashes($object->locationname) . '</em>'; } $OT .= "</span>"; $OT .= "<span class='evcal_desc3'>"; //organizer $org = !empty($object->evvals['evcal_organizer']) ? $object->evvals['evcal_organizer'][0] : ''; if ($object->fields_ && in_array('organizer', $object->fields) && !empty($org)) { $OT .= "<em class='evcal_oganizer'><i>" . eventon_get_custom_language($evOPT2, 'evcal_evcard_org', 'Event Organized By') . ':</i> ' . $org . "</em>"; } //event type if ($object->tax) { $OT .= $object->tax; } // event tags if ($object->fields_ && in_array('tags', $object->fields) && !empty($object->tags)) { $OT .= "<span class='evo_event_tags'>\r\n\t\t\t\t\t\t<em><i>" . eventon_get_custom_language($evOPT2, 'evo_lang_eventtags', 'Event Tags') . "</i></em>"; $count = count($object->tags); $i = 1; foreach ($object->tags as $tag) { $OT .= "<em data-tagid='{$tag->term_id}'>{$tag->name}" . ($count == $i ? '' : ',') . "</em>"; $i++; } $OT .= "</span>"; } // custom fields for ($x = 1; $x < $object->cmdcount + 1; $x++) { if ($object->fields_ && in_array('cmd' . $x, $object->fields) && !empty($object->evvals['_evcal_ec_f' . $x . 'a1_cus'])) { $def = $evOPT['evcal_ec_f' . $x . 'a1']; // default custom meta field name $i18n_nam = eventon_get_custom_language($evOPT2, 'evcal_cmd_' . $x, $def); $OT .= ($x == 1 ? "<b class='clear'></b>" : null) . "<em class='evcal_cmd'><i>" . $i18n_nam . ':</i> ' . $object->evvals['_evcal_ec_f' . $x . 'a1_cus'][0] . "</em> "; } } break; case 'close1': $OT .= "</span>"; // span.evcal_desc3 break; case 'close2': $OT .= "</span>"; // span.evcal_desc $OT .= "<em class='clear'></em>"; break; } } return $OT; }
function lang($variable, $default_text, $lang = '') { return eventon_get_custom_language($this->opt2, $variable, $default_text, $lang); }
} if ($email) { ?> <tr> <td style='padding:20px; text-align:left;border-top:1px dashed #d1d1d1; font-style:italic; color:#ADADAD'> <?php $__link = !empty($evo_options['evors_contact_link']) ? $evo_options['evors_contact_link'] : site_url(); ?> <p style='<?php echo $__sty_lh . $__sty_m0; ?> '><?php echo eventon_get_custom_language($evo_options_2, 'evoTX_007', 'We look forward to seeing you!'); ?> </p> <p style='<?php echo $__sty_lh . $__sty_m0; ?> '><a style='' href='<?php echo $__link; ?> '><?php echo eventon_get_custom_language($evo_options_2, 'evoTX_008', 'Contact Us for questions and concerns'); ?> </a></p> </td> </tr> <?php } ?> </table>
/** * event card content processed and output as html * @version 2.3.21 */ function eventon_eventcard_print($array, $evOPT, $evoOPT2) { global $eventon; $evoOPT2 = !empty($evoOPT2) ? $evoOPT2 : ''; $OT = ''; $count = 1; $items = count($array); // close button $close = "<div class='evcal_evdata_row evcal_close' title='" . eventon_get_custom_language($evoOPT2, 'evcal_lang_close', 'Close') . "'></div>"; // additional fields array $_additions = apply_filters('evo_eventcard_adds', array()); // FOR each foreach ($array as $box_f => $box) { $end = $count == $items ? $close : null; $end_row_class = $count == $items ? ' lastrow' : null; // convert to an object $object = new stdClass(); foreach ($box as $key => $value) { $object->{$key} = $value; } $boxname = in_array($box_f, $_additions) ? $box_f : null; //echo($box_f.' '); //print_r($boxname); //$OT.="".$items.'-'.$count." ".$box_f; // each eventcard type switch ($box_f) { // addition case has_filter("eventon_eventCard_{$boxname}"): $helpers = array('evOPT' => $evOPT, 'evoOPT2' => $evoOPT2, 'end_row_class' => $end_row_class, 'end' => $end); $OT .= apply_filters("eventon_eventCard_{$boxname}", $object, $helpers); break; // Event Details // Event Details case 'eventdetails': // check if character length of description is longer than X size if (!empty($evOPT['evo_morelass']) && $evOPT['evo_morelass'] != 'yes' && strlen($object->fulltext) > 600) { $more_code = "<div class='eventon_details_shading_bot'>\r\n\t\t\t\t\t\t\t\t<p class='eventon_shad_p' content='less'><span class='ev_more_text' data-txt='" . eventon_get_custom_language($evoOPT2, 'evcal_lang_less', 'less') . "'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_more', 'more') . "</span><span class='ev_more_arrow'></span></p>\r\n\t\t\t\t\t\t\t</div>"; $evo_more_active_class = 'shorter_desc'; } else { $more_code = ''; $evo_more_active_class = ''; } $OT .= "<div class='evo_metarow_details evorow evcal_evdata_row bordb evcal_event_details" . $end_row_class . "'>\r\n\t\t\t\t\t\t\t" . $object->excerpt . "\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_001', 'fa-align-justify', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell " . $evo_more_active_class . "'>" . $more_code . "<div class='eventon_full_description'>\r\n\t\t\t\t\t\t\t\t\t<h3 class='padb5 evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_details', 'Event Details') . "</h3><div class='eventon_desc_in' itemprop='description'>\r\n\t\t\t\t\t\t\t\t\t" . $eventon->frontend->filter_evo_content($object->fulltext) . "</div>"; // pluggable inside event details do_action('eventon_eventcard_event_details'); $OT .= "<div class='clear'></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . $end . "</div>"; break; // TIME and LOCATION // TIME and LOCATION case 'timelocation': if ($object->address || $object->location_name) { $timezone = !empty($object->timezone) ? ' <em class="evo_eventcard_tiemzone">' . $object->timezone . '</em>' : null; $locationLink = !empty($object->location_link) ? '<a target="_blank" href="' . $object->location_link . '">' : false; $OT .= "<div class='evo_metarow_time_location evorow bordb" . $end_row_class . " '>\r\n\t\t\t\t\t\t<div class='tb' >\r\n\t\t\t\t\t\t\t<div class='tbrow'>\r\n\t\t\t\t\t\t\t<div class='evcal_col50 bordr'>\r\n\t\t\t\t\t\t\t\t<div class='evcal_evdata_row evo_time'>\r\n\t\t\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_002', 'fa-clock-o', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_time', 'Time') . "</h3><p>" . $object->timetext . $timezone . "</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div><div class='evcal_col50'>\r\n\t\t\t\t\t\t\t\t<div class='evcal_evdata_row evo_location'>\r\n\t\t\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_003', 'fa-map-marker', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t\t\t<div class='evcal_evdata_cell' data-loc_tax_id='{$object->locTaxID}'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . ($locationLink ? $locationLink : '') . eventon_get_custom_language($evoOPT2, 'evcal_lang_location', 'Location') . ($locationLink ? '</a>' : '') . "</h3>" . (!empty($object->location_name) ? "<p class='evo_location_name'>" . stripslashes($object->location_name) . "</p>" : null) . "<p>" . (!empty($object->address) ? stripslashes($object->address) : null) . "</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div><div class='clear'></div>\r\n\t\t\t\t\t\t\t</div></div>\r\n\t\t\t\t\t\t" . $end . "</div>"; } else { // time only $OT .= "<div class='evo_metarow_time evorow evcal_evdata_row bordb evcal_evrow_sm " . $end_row_class . "'>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_002', 'fa-clock-o', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_time', 'Time') . "</h3><p>" . $object->timetext . "</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . $end . "</div>"; } break; // REPEAT SERIES // REPEAT SERIES case 'repeats': $OT .= "<div class='evo_metarow_repeats evorow evcal_evdata_row bordb evcal_evrow_sm " . $end_row_class . "'>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_repeats', 'fa-repeat', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_repeats', 'Future Event Times in this Repeating Event Series') . "</h3>\r\n\t\t\t\t\t\t\t\t<p class='evo_repeat_series_dates'>"; foreach ($object->future_intervals as $interval) { $OT .= "<span>" . date($object->date_format . ' ' . $object->time_format, $interval[0]) . "</span>"; } $OT .= "</p></div>" . $end . "</div>"; break; // Location Image // Location Image case 'locImg': $img_src = wp_get_attachment_image_src($object->id, 'full'); $fullheight = (int) $object->fullheight; if (!empty($img_src)) { // text over location image $inside = ''; if (!empty($object->locName)) { $inner = !empty($object->locAdd) ? '<span>' . $object->locAdd . '</span>' : null; $inside = "<p class='evoLOCtxt'>{$object->locName}{$inner}</p>"; } $OT .= "<div class='evo_metarow_locImg evorow bordb " . (!empty($inside) ? 'tvi' : null) . "' style='height:{$fullheight}px; background-image:url(" . $img_src[0] . ")' id='" . $object->id . "_locimg' >{$inside}</div>"; } break; // GOOGLE map // GOOGLE map case 'gmap': $OT .= "<div class='evo_metarow_gmap evorow evcal_gmaps bordb ' id='" . $object->id . "_gmap' style='max-width:none'></div>"; break; // Featured image // Featured image case 'ftimage': $__hoverclass = !empty($object->hovereffect) && $object->hovereffect != 'yes' ? ' evo_imghover' : null; $__noclickclass = !empty($object->clickeffect) && $object->clickeffect == 'yes' ? ' evo_noclick' : null; $__zoom_cursor = !empty($evOPT['evo_ftim_mag']) && $evOPT['evo_ftim_mag'] == 'yes' ? ' evo_imgCursor' : null; // if set to direct image if (!empty($evOPT['evo_ftimg_height_sty']) && $evOPT['evo_ftimg_height_sty'] == 'direct') { $OT .= "<div class='evo_metarow_directimg'><img src='{$object->img[0]}'/></div>"; } else { $height = !empty($object->img[2]) ? $object->img[2] : ''; $width = !empty($object->img[1]) ? $object->img[1] : ''; $OT .= "<div class='evo_metarow_fimg evorow evcal_evdata_img " . $end_row_class . $__hoverclass . $__zoom_cursor . $__noclickclass . "' data-imgheight='" . $height . "' data-imgwidth='" . $width . "' style='background-image: url(" . $object->img[0] . ")' data-imgstyle='" . $object->ftimg_sty . "' data-minheight='" . $object->min_height . "' data-status=''>" . $end . "</div>"; } break; // event organizer // event organizer case 'organizer': $evcal_evcard_org = eventon_get_custom_language($evoOPT2, 'evcal_evcard_org', 'Organizer'); $ORGMeta = evo_get_term_meta('event_organizer', $object->organizer_term_id, '', true); $img_src = !empty($ORGMeta['evo_org_img']) ? wp_get_attachment_image_src($ORGMeta['evo_org_img'], 'medium') : null; $newdinwow = !empty($ORGMeta['_evocal_org_exlink_target']) && $ORGMeta['_evocal_org_exlink_target'] == 'yes' ? 'target="_blank"' : ''; // organizer name text openinnewwindow if (!empty($ORGMeta['evcal_org_exlink'])) { $orgNAME = "<span class='evo_card_organizer_name_t'><a " . $newdinwow . " href='{$ORGMeta['evcal_org_exlink']}'>" . $object->organizer_name . "</a></span>"; } else { $orgNAME = "<span class='evo_card_organizer_name_t'>" . $object->organizer_name . "</span>"; } $OT .= "<div class='evo_metarow_organizer evorow evcal_evdata_row bordb evcal_evrow_sm " . $end_row_class . "'>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_004', 'fa-headphones', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . $evcal_evcard_org . "</h3>\r\n\t\t\t\t\t\t\t\t" . (!empty($img_src) ? "<p class='evo_data_val evo_card_organizer_image'><img src='{$img_src[0]}'/></p>" : null) . "\r\n\t\t\t\t\t\t\t\t<div class='evo_card_organizer'><p class='evo_data_val evo_card_organizer_name'>\r\n\t\t\t\t\t\t\t\t\t" . $orgNAME . (!empty($ORGMeta['evcal_org_contact']) ? "<span class='evo_card_organizer_contact'>{$ORGMeta['evcal_org_contact']}</span>" : null) . "\r\n\t\t\t\t\t\t\t\t\t" . (!empty($ORGMeta['evcal_org_address']) ? "<span class='evo_card_organizer_address'>{$ORGMeta['evcal_org_address']}</span>" : null) . "\r\n\t\t\t\t\t\t\t\t\t</p></div>\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . $end . "</div>"; break; // get directions // get directions case 'getdirection': $_lang_1 = eventon_get_custom_language($evoOPT2, 'evcalL_getdir_placeholder', 'Type your address to get directions'); $_lang_2 = eventon_get_custom_language($evoOPT2, 'evcalL_getdir_title', 'Click here to get directions'); $OT .= "<div class='evo_metarow_getDr evorow evcal_evdata_row bordb evcal_evrow_sm getdirections'>\r\n\t\t\t\t\t\t<form action='https://maps.google.com/maps' method='get' target='_blank'>\r\n\t\t\t\t\t\t<input type='hidden' name='daddr' value='{$object->fromaddress}'/> \r\n\t\t\t\t\t\t<p><input class='evoInput' type='text' name='saddr' placeholder='{$_lang_1}' value=''/>\r\n\t\t\t\t\t\t<button type='submit' class='evcal_evdata_icons evcalicon_9' title='{$_lang_2}'><i class='fa " . get_eventON_icon('evcal__fai_008a', 'fa-road', $evOPT) . "'></i></button>\r\n\t\t\t\t\t\t</p></form>\r\n\t\t\t\t\t</div>"; break; // learnmore ICS and close button // learnmore ICS and close button case 'learnmoreICS': // Initial $__ics_url = admin_url('admin-ajax.php') . '?action=eventon_ics_download&event_id=' . $object->event_id . '&sunix=' . $object->estart . '&eunix=' . $object->eend; $__googlecal_link = eventon_get_addgoogle_cal($object); // which options to show for add to calendar $addCaloptions = !empty($evOPT['evo_addtocal']) ? $evOPT['evo_addtocal'] : 'all'; $addCalContent = ''; // add to cal section switch ($addCaloptions) { case 'ics': $addCalContent = "<a href='{$__ics_url}' class='evo_ics_nCal' title='" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_addics', 'Add to your calendar') . "'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_calncal', 'Calendar') . "</a>"; break; case 'gcal': $addCalContent = "<a href='{$__googlecal_link}' target='_blank' class='evo_ics_gCal' title='" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_addgcal', 'Add to google calendar') . "'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_calgcal', 'GoogleCal') . "</a>"; break; case 'all': $addCalContent = "<a href='{$__ics_url}' class='evo_ics_nCal' title='" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_addics', 'Add to your calendar') . "'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_calncal', 'Calendar') . "</a>" . "<a href='{$__googlecal_link}' target='_blank' class='evo_ics_gCal' title='" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_addgcal', 'Add to google calendar') . "'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_calgcal', 'GoogleCal') . "</a>"; break; } // learn more and ICS if (!empty($object->learnmorelink) && $addCaloptions != 'none') { ob_start(); ?> <div class='evo_metarow_learnMICS evorow bordb <?php echo $end_row_class; ?> '> <div class='tb'> <div class='tbrow'> <a class='evcal_col50 dark1 bordr evo_clik_row' href='<?php echo $object->learnmorelink; ?> ' <?php echo $object->learnmore_target; ?> > <span class='evcal_evdata_row ' > <span class='evcal_evdata_icons'><i class='fa <?php echo get_eventON_icon('evcal__fai_006', 'fa-link', $evOPT); ?> '></i></span> <h3 class='evo_h3'><?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_learnmore2', 'Learn More'); ?> </h3> </span> </a> <div class='evo_ics evcal_col50 dark1 evo_clik_row' > <div class='evcal_evdata_row'> <span class="evcal_evdata_icons"><i class="fa fa-calendar"></i></span> <div class='evcal_evdata_cell'> <p><?php echo $addCalContent; ?> </p> </div> </div> </div></div></div> <?php echo $end; ?> </div> <?php $OT .= ob_get_clean(); // only learn more } else { if (!empty($object->learnmorelink)) { $OT .= "<div class='evo_metarow_learnM evorow bordb'>\r\n\t\t\t\t\t\t\t<a class='evcal_evdata_row evo_clik_row dark1 ' href='" . $object->learnmorelink . "' " . $object->learnmore_target . ">\r\n\t\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_006', 'fa-link', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_learnmore2', 'Learn More') . "</h3>\r\n\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t" . $end . "</div>"; // only ICS } else { if ($addCaloptions != 'none') { ob_start(); //echo get_option('gmt_offset', 0).'ttt'; ?> <div class='evo_metarow_ICS evorow bordb evcal_evdata_row'> <span class="evcal_evdata_icons"><i class="fa fa-calendar"></i></span> <div class='evcal_evdata_cell'> <p><?php echo $addCalContent; ?> </p> </div><?php echo $end; ?> </div> <?php $OT .= ob_get_clean(); } } } break; // paypal link // paypal link case 'paypal': $text = !empty($object->text) ? $object->text : eventon_get_custom_language($evoOPT2, 'evcal_evcard_tix1', 'Buy ticket via Paypal'); $email = $object->email; $currency = !empty($evOPT['evcal_pp_cur']) ? $evOPT['evcal_pp_cur'] : false; if ($currency && $email) { // get proper time to append to event title $evodate = new evo_datetime(); $eventtime = $evodate->evo_date($object->estart, $object->evvals); ob_start(); ?> <div class='evo_metarow_paypal evorow evcal_evdata_row bordb evo_paypal'> <span class='evcal_evdata_icons'><i class='fa <?php echo get_eventON_icon('evcal__fai_007', 'fa-ticket', $evOPT); ?> '></i></span> <div class='evcal_evdata_cell'> <p><?php echo $text; ?> </p> <form target="_blank" name="_xclick" action="https://www.paypal.com/us/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="<?php echo $email; ?> "> <input type="hidden" name="currency_code" value="<?php echo $currency; ?> "> <input type="hidden" name="item_name" value="<?php echo $object->title . ' ' . $eventtime; ?> "> <input type="hidden" name="amount" value="<?php echo $object->price; ?> "> <input type='submit' class='evcal_btn' value='<?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_btn1', 'Buy Now'); ?> '/> </form> </div><?php echo $end; ?> </div> <?php $OT .= ob_get_clean(); } break; } // end switch // for custom meta data fields if (!empty($object->x) && $box_f == 'customfield' . $object->x) { $i18n_name = eventon_get_custom_language($evoOPT2, 'evcal_cmd_' . $object->x, $evOPT['evcal_ec_f' . $object->x . 'a1']); if ($object->visibility_type == 'admin' && !current_user_can('manage_options') || $object->visibility_type == 'loggedin' && !is_user_logged_in()) { continue; } $OT .= "<div class='evo_metarow_cusF{$object->x} evorow evcal_evdata_row bordb evcal_evrow_sm '>\r\n\t\t\t\t\t\t<span class='evcal_evdata_custometa_icons'><i class='fa " . $object->imgurl . "'></i></span>\r\n\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<h3 class='evo_h3'>" . $i18n_name . "</h3>"; if ($object->type == 'button') { $_target = !empty($object->_target) && $object->_target == 'yes' ? 'target="_blank"' : null; $OT .= "<a href='" . $object->valueL . "' {$_target} class='evcal_btn evo_cusmeta_btn'>" . $object->value . "</a>"; } else { $OT .= "<div class='evo_custom_content evo_data_val'>" . $eventon->frontend->filter_evo_content($object->value) . "</div>"; } $OT .= "</div>" . $end . "</div>"; } $count++; } // end foreach return $OT; }
function lang($var, $default) { $lang = !empty($this->shortcode_args['lang']) ? $this->shortcode_args['lang'] : 'L1'; return eventon_get_custom_language($this->evopt2, $var, $default, $lang); }
function frontend_box($object, $helpers) { global $evotx, $woocommerce; $txmeta = get_post_custom($object->event_id); // not show event tickets if tickets to show only for loggedin users if (!empty($evotx->evotx_opt['evotx_loggedinuser']) && $evotx->evotx_opt['evotx_loggedinuser'] == 'yes' && !is_user_logged_in()) { return; } if (!empty($txmeta['evotx_tix']) && $txmeta['evotx_tix'][0] == 'yes') { // get options array $woo_product_id = $txmeta['tx_woocommerce_product_id'][0]; $woometa = get_post_custom($woo_product_id); $opt = $helpers['evoOPT2']; ob_start(); ?> <div class='evorow evcal_evdata_row bordb evcal_evrow_sm evo_metarow_tix <?php echo $helpers['end_row_class']; ?> ' data-tx='' data-event_id='<?php echo $object->event_id; ?> ' data-ri='<?php echo $object->repeat_interval; ?> '> <span class='evcal_evdata_icons'><i class='fa <?php echo get_eventON_icon('evcal__evotx_001', 'fa-tags', $helpers['evOPT']); ?> '></i></span> <div class='evcal_evdata_cell'> <h3 class='evo_h3'><?php echo eventon_get_custom_language($opt, 'evoTX_001', 'Ticket Section Title'); ?> </h3> <p class='evo_data_val'><?php echo evo_meta($woometa, '_tx_text'); ?> </p> <?php // ticket image id - if exists $_tix_image_id = !empty($txmeta['_tix_image_id']) ? $txmeta['_tix_image_id'][0] : false; ?> <div class='evoTX_wc <?php echo $_tix_image_id ? 'tximg' : ''; ?> ' data-si='<?php echo !empty($woometa['_sold_individually']) ? $woometa['_sold_individually'][0] : '-'; ?> ' > <div class='evoTX_wc_section'> <?php $_repeat_in_stock = true; $capacity_of_this_repeat = 'none'; // check if capacity managed by repeat intervals of event if (evo_check_yn($txmeta, '_manage_repeat_cap') && evo_check_yn($txmeta, 'evcal_repeat') && !empty($txmeta['repeat_intervals']) && !empty($txmeta['ri_capacity']) && $product->product_type == 'simple') { $ri_capacity = unserialize($txmeta['ri_capacity'][0]); $capacity_of_this_repeat = isset($ri_capacity[$object->repeat_interval]) ? $ri_capacity[$object->repeat_interval] : 0; $_repeat_in_stock = $capacity_of_this_repeat == 0 ? false : true; } // get the woocommerce product $_pf = new WC_Product_Factory(); $product = $_pf->get_product($woo_product_id); if (!$_repeat_in_stock || !empty($woometa['_stock_status']) && $woometa['_stock_status'][0] == 'outofstock') { echo "<p class='evotx_soldout'>" . eventon_get_custom_language($opt, 'evoTX_012', 'Sold Out!') . "</p>"; } else { // SIMPLE product if ($product->product_type == 'simple') { $url = $evotx->addon_data['plugin_path'] . '/templates/template-add-to-cart-single.php'; include $url; } // end simple product // VARIABLE Product if ($product->product_type == 'variable') { include $evotx->addon_data['plugin_path'] . '/templates/template-add-to-cart-variable.php'; } } // is_in_stock() ?> <?php // show remaining tickets or not if ($_repeat_in_stock && evo_check_yn($txmeta, '_show_remain_tix') && evo_check_yn($woometa, '_manage_stock') && !empty($woometa['_stock']) && $woometa['_stock_status'][0] == 'instock' && (!empty($txmeta['remaining_count']) && (int) $txmeta['remaining_count'][0] >= $woometa['_stock'][0] || empty($txmeta['remaining_count'])) && $product->product_type == 'simple') { // get the remaining ticket // count for event // show this remaining total only for simple events $remaining_count = $capacity_of_this_repeat != 'none' ? $capacity_of_this_repeat : $woometa['_stock'][0]; $remaining_count = (int) $remaining_count; echo "<p class='evotx_remaining' data-count='{$remaining_count}'><span>" . $remaining_count . "</span> " . eventon_get_custom_language($opt, 'evoTX_013', 'Tickets remaining!') . "</p>"; } ?> <?php // inquire before buy form include 'html-ticket-inquery.php'; ?> <?php ?> </div><!-- .evoTX_wc_section --> <?php // content for ticket image seciton if ($_tix_image_id) { $img_src = $_tix_image_id ? wp_get_attachment_image_src($_tix_image_id, 'medium') : null; $tix_img_src = !empty($img_src) ? $img_src[0] : null; ?> <div class='evotx_image'> <img src='<?php echo $tix_img_src; ?> '/> <?php if (!empty($txmeta['_tx_img_text'])) { ?> <p class='evotx_caption'><?php echo $txmeta['_tx_img_text'][0]; ?> </p> <?php } ?> </div><div class="clear"></div> <?php } ?> </div> </div> <div class='tx_wc_notic' style='display:none'> <p><b></b><span><?php echo eventon_get_custom_language($opt, 'evoTX_009', 'Successfully added to cart!'); ?> </span> <a class='evcal_btn view_cart' href='<?php echo $woocommerce->cart->get_cart_url(); ?> '><?php echo eventon_get_custom_language($opt, 'evoTX_011', 'View cart'); ?> </a> <a class='evcal_btn checkout' href='<?php echo $woocommerce->cart->get_checkout_url(); ?> '><?php echo eventon_get_custom_language($opt, 'evoTX_010', 'Checkout'); ?> </a><em></em></p> </div> <?php echo $helpers['end']; ?> </div> <?php $output = ob_get_clean(); return $output; } }
// version : 0.3 ?> <div class='tx_single'> <p itemprop="price" class="price tx_price_line"><?php echo eventon_get_custom_language($opt, 'evoTX_002ff', 'Price') . ': ' . $product->get_price_html(); ?> </p> <form class='tx_orderonline_single' data-producttype='single' method="post" enctype='multipart/form-data'> <div class='tx_orderonline_add_cart'> <?php if (!$product->is_sold_individually()) { woocommerce_quantity_input(array('min_value' => apply_filters('woocommerce_quantity_input_min', 1, $product), 'max_value' => apply_filters('woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product)), $product); } ?> <input type="hidden" name="add-to-cart" value="<?php echo esc_attr($product->id); ?> " /> <button data-product_id='<?php echo $woo_product_id; ?> ' id='cart_btn' class="evoAddToCart evcal_btn single_add_to_cart_button button alt"><?php echo apply_filters('single_add_to_cart_text', eventon_get_custom_language($opt, 'evoTX_002', 'Add to Cart'), $product->product_type); ?> </button> <div class="clear"></div> </div> </form> </div>
function content_below_sortbar_this($content, $args = '') { global $eventon_dv; // check if daily view is running on this calendar if (!$eventon_dv->is_running_dv) { return; } $day_data = $this->focus_day_data; $evcal_val1 = get_option('evcal_options_evcal_1'); $this->set_three_letter_day_names(); $this->set_full_day_names(); //print_r($day_data); // DAILY VIEW section $dv_strip_margin = $day_data['day'] * -60 + 130 . 'px'; $hide_arrows = $evcal_val1['evcal_arrow_hide'] == 'yes' ? true : false; // current date section $day_of_week = date('N', $day_data['focus_start_date_range']); $dayname = $this->get_full_day_names($day_of_week); // top date box if (!empty($this->shortcode_args['hide_date_box']) && $this->shortcode_args['hide_date_box'] != 'yes') { $number_days_in_month = $this->days_in_month($day_data['month'], $day_data['year']); $disable_prev = $day_data['day'] == 1 ? 'disable' : null; $disable_next = $day_data['day'] == $number_days_in_month ? 'disable' : null; $content .= "<div class='evodv_current_day'>\r\n\t\t\t\t\t<p class='evodv_dayname'>{$dayname}</p>\r\n\t\t\t\t\t<p class='evodv_daynum'><span class='prev {$disable_prev}' data-dir='prev'><i class='fa fa-angle-left'></i></span><b>{$day_data['day']}</b><span class='next {$disable_next}' data-dir='next'><i class='fa fa-angle-right'></i></span></p>\r\n\t\t\t\t\t<p class='evodv_events' style='display:none'><span>2</span>" . eventon_get_custom_language('', 'evcal_lang_events', 'Events') . "</p>\r\n\t\t\t\t</div>"; } $content .= "\r\n\t\t\t<div class='eventon_daily_list " . (!$hide_arrows ? 'dvlist_hasarrows' : 'dvlist_noarrows') . "' cal_id='{$day_data['cal_id']}'>\r\n\t\t\t\t<div class='eventon_dv_outter'>\r\n\t\t\t\t\t<div class='eventon_daily_in' data-left='{$dv_strip_margin}' style='left:{}'>"; $content .= $this->get_daily_view_list($day_data['day'], $day_data['month'], $day_data['year']); //$content .= $this->get_daily_view_list($day_data['day'],$day_data['month']+1, $day_data['year']); $content .= "</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>"; //$content.= "<div class='evodv_carousel'><div class='inner'>".$this->get_daily_view_list($day_data['day'],$day_data['month'], $day_data['year']) . "</div></div>"; echo $content; // Stop this from being getting attached to other calendars. remove_action('eventon_after_loadbar', array($this, 'content_below_sortbar_this')); }
/** * event card content processed and output as html * @param $array * @param $evOPT * @param $evoOPT2 * @return string HTML */ function eventon_eventcard_print($array, $evOPT, $evoOPT2) { $evoOPT2 = !empty($evoOPT2) ? $evoOPT2 : ''; $OT = ''; $count = 1; $items = count($array); // close button $close = "<div class='evcal_evdata_row evcal_close' title='" . eventon_get_custom_language($evoOPT2, 'evcal_lang_close', 'Close') . "'></div>"; // additional fields array $_additions = apply_filters('evo_eventcard_adds', array()); $__content_filter = !empty($evOPT['evcal_dis_conFilter']) && $evOPT['evcal_dis_conFilter'] == 'yes' ? true : false; foreach ($array as $box_f => $box) { $end = $count == $items ? $close : null; $end_row_class = $count == $items ? ' lastrow' : null; // convert to an object $object = new stdClass(); foreach ($box as $key => $value) { $object->{$key} = $value; } $boxname = in_array($box_f, $_additions) ? $box_f : null; //print_r($box_f); //print_r($box); //$OT.="".$items.'-'.$count." ".$box_f; // each eventcard type switch ($box_f) { // addition case has_filter("eventon_eventCard_{$boxname}"): $helpers = array('evOPT' => $evOPT, 'evoOPT2' => $evoOPT2, 'end_row_class' => $end_row_class, 'end' => $end); $OT .= apply_filters("eventon_eventCard_{$boxname}", $object, $helpers); break; // Event Details // Event Details case 'eventdetails': // check if character length of description is longer than X size if (!empty($evOPT['evo_morelass']) && $evOPT['evo_morelass'] != 'yes' && strlen($object->fulltext) > 600) { $more_code = "<div class='eventon_details_shading_bot'>\r\n\t\t\t\t\t\t\t\t<p class='eventon_shad_p' content='less'><span class='ev_more_text' data-txt='" . eventon_get_custom_language($evoOPT2, 'evcal_lang_less', 'less') . "'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_more', 'more') . "</span><span class='ev_more_arrow'></span></p>\r\n\t\t\t\t\t\t\t</div>"; $evo_more_active_class = 'shorter_desc'; } else { $more_code = ''; $evo_more_active_class = ''; } $OT .= "<div class='evo_metarow_details evorow evcal_evdata_row bordb evcal_event_details" . $end_row_class . "'>\r\n\t\t\t\t\t\t\t" . $object->excerpt . "\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_001', 'fa-align-justify', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell " . $evo_more_active_class . "'>" . $more_code . "<div class='eventon_full_description'>\r\n\t\t\t\t\t\t\t\t\t<h3 class='padb5 evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_details', 'Event Details') . "</h3><div class='eventon_desc_in' itemprop='description'>\r\n\t\t\t\t\t\t\t\t\t" . (!$__content_filter ? apply_filters('the_content', $object->fulltext) : $object->fulltext) . "</div><div class='clear'></div>\r\n\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . $end . "</div>"; break; // TIME and LOCATION // TIME and LOCATION case 'timelocation': if ($object->location) { $timezone = !empty($object->timezone) ? ' <em class="evo_eventcard_tiemzone">' . $object->timezone . '</em>' : null; $OT .= "<div class='evo_metarow_time_location evorow bordb" . $end_row_class . " '>\r\n\t\t\t\t\t\t<div class='tb' >\r\n\t\t\t\t\t\t\t<div class='tbrow'>\r\n\t\t\t\t\t\t\t<div class='evcal_col50 bordr'>\r\n\t\t\t\t\t\t\t\t<div class='evcal_evdata_row evo_time'>\r\n\t\t\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_002', 'fa-clock-o', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_time', 'Time') . "</h3><p>" . $object->timetext . $timezone . "</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div><div class='evcal_col50'>\r\n\t\t\t\t\t\t\t\t<div class='evcal_evdata_row evo_location'>\r\n\t\t\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_003', 'fa-map-marker', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_location', 'Location') . "</h3>" . (!empty($object->location_name) ? "<p class='evo_location_name'>" . stripslashes($object->location_name) . "</p>" : null) . "<p>" . $object->location . "</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div><div class='clear'></div>\r\n\t\t\t\t\t\t\t</div></div>\r\n\t\t\t\t\t\t" . $end . "</div>"; } else { // time only $OT .= "<div class='evo_metarow_time evorow evcal_evdata_row bordb evcal_evrow_sm " . $end_row_class . "'>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_002', 'fa-clock-o', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_lang_time', 'Time') . "</h3><p>" . $object->timetext . "</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . $end . "</div>"; } break; // Location Image // Location Image case 'locImg': $img_src = wp_get_attachment_image_src($object->id, 'full'); $fullheight = (int) $object->fullheight; if (!empty($img_src)) { // text over location image $inside = ''; if (!empty($object->locName)) { $inner = !empty($object->locAdd) ? '<span>' . $object->locAdd . '</span>' : null; $inside = "<p class='evoLOCtxt'>{$object->locName}{$inner}</p>"; } $OT .= "<div class='evo_metarow_locImg evorow bordb " . (!empty($inside) ? 'tvi' : null) . "' style='height:{$fullheight}px; background-image:url(" . $img_src[0] . ")' id='" . $object->id . "_locimg' >{$inside}</div>"; } break; // GOOGLE map // GOOGLE map case 'gmap': $OT .= "<div class='evo_metarow_gmap evorow evcal_gmaps bordb ' id='" . $object->id . "_gmap'></div>"; break; // Featured image // Featured image case 'ftimage': $__hoverclass = !empty($object->hovereffect) && $object->hovereffect != 'yes' ? ' evo_imghover' : null; $__noclickclass = !empty($object->clickeffect) && $object->clickeffect == 'yes' ? ' evo_noclick' : null; $__zoom_cursor = !empty($evOPT['evo_ftim_mag']) && $evOPT['evo_ftim_mag'] == 'yes' ? ' evo_imgCursor' : null; $OT .= "<div class='evo_metarow_fimg evorow evcal_evdata_img " . $end_row_class . $__hoverclass . $__zoom_cursor . $__noclickclass . "' data-imgheight='" . $object->img[2] . "' data-imgwidth='" . $object->img[1] . "' style='background-image: url(" . $object->img[0] . ")' data-imgstyle='" . $object->ftimg_sty . "' data-minheight='" . $object->min_height . "' data-status=''>" . $end . "</div>"; break; // event organizer // event organizer case 'organizer': $evcal_evcard_org = eventon_get_custom_language($evoOPT2, 'evcal_evcard_org', 'Organizer'); $img_src = !empty($object->imgid) ? wp_get_attachment_image_src($object->imgid, 'medium') : null; $OT .= "<div class='evo_metarow_organizer evorow evcal_evdata_row bordb evcal_evrow_sm " . $end_row_class . "'>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_004', 'fa-headphones', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<h3 class='evo_h3'>" . $evcal_evcard_org . "</h3>\r\n\t\t\t\t\t\t\t\t" . (!empty($img_src) ? "<p class='evo_data_val evo_card_organizer_image'><img src='{$img_src[0]}'/></p>" : null) . "\r\n\t\t\t\t\t\t\t\t<div class='evo_card_organizer'><p class='evo_data_val evo_card_organizer_name'>" . $object->value . "\r\n\t\t\t\t\t\t\t\t" . (!empty($object->contact) ? "<span class='evo_card_organizer_contact'>{$object->contact}</span>" : null) . "</p></div>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t" . $end . "</div>"; break; // get directions // get directions case 'getdirection': $_lang_1 = eventon_get_custom_language($evoOPT2, 'evcalL_getdir_placeholder', 'Type your address to get directions'); $_lang_2 = eventon_get_custom_language($evoOPT2, 'evcalL_getdir_title', 'Click here to get directions'); $OT .= "<div class='evo_metarow_getDr evorow evcal_evdata_row bordb evcal_evrow_sm getdirections'>\r\n\t\t\t\t\t\t<form action='https://maps.google.com/maps' method='get' target='_blank'>\r\n\t\t\t\t\t\t<input type='hidden' name='daddr' value='{$object->fromaddress}'/> \r\n\t\t\t\t\t\t<p><input class='evoInput' type='text' name='saddr' placeholder='{$_lang_1}' value=''/>\r\n\t\t\t\t\t\t<button type='submit' class='evcal_evdata_icons evcalicon_9' title='{$_lang_2}'><i class='fa " . get_eventON_icon('evcal__fai_008a', 'fa-road', $evOPT) . "'></i></button>\r\n\t\t\t\t\t\t</p></form>\r\n\t\t\t\t\t</div>"; break; // custom field // custom field case 'customfield1': case 'customfield2': case 'customfield3': case 'customfield4': case 'customfield5': case 'customfield6': case 'customfield7': case 'customfield8': case 'customfield9': case 'customfield10': $i18n_name = eventon_get_custom_language($evoOPT2, 'evcal_cmd_' . $object->x, $evOPT['evcal_ec_f' . $object->x . 'a1']); $OT .= "<div class='evo_metarow_cusF{$object->x} evorow evcal_evdata_row bordb evcal_evrow_sm '>\r\n\t\t\t\t\t\t<span class='evcal_evdata_custometa_icons'><i class='fa " . $object->imgurl . "'></i></span>\r\n\t\t\t\t\t\t<div class='evcal_evdata_cell'>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<h3 class='evo_h3'>" . $i18n_name . "</h3>"; if ($object->type == 'button') { $_target = !empty($object->_target) && $object->_target == 'yes' ? 'target="_blank"' : null; $OT .= "<a href='" . $object->valueL . "' {$_target} class='evcal_btn evo_cusmeta_btn'>" . $object->value . "</a>"; } else { $OT .= "<div class='evo_custom_content evo_data_val'>" . (!$__content_filter ? apply_filters('the_content', $object->value) : $object->value) . "</div>"; } $OT .= "</div>" . $end . "</div>"; break; // learnmore ICS and close button // learnmore ICS and close button case 'learnmoreICS': //$__ics_data_vars = "data-start='{$object->estart}' data-end='{$object->eend}' data-location='{$object->eloc}' data-summary='{$object->etitle}' data-stamp='{$object->estamp}'"; $__ics_url = admin_url('admin-ajax.php') . '?action=eventon_ics_download&event_id=' . $object->event_id . '&sunix=' . $object->estart . '&eunix=' . $object->eend; $__googlecal_link = eventon_get_addgoogle_cal($object); // learn more and ICS if (!empty($object->learnmorelink) && !empty($evOPT['evo_ics']) && $evOPT['evo_ics'] == 'yes') { ob_start(); ?> <div class='evo_metarow_learnMICS evorow bordb <?php echo $end_row_class; ?> '> <div class='tb'> <div class='tbrow'> <a class='evcal_col50 dark1 bordr evo_clik_row' href='<?php echo $object->learnmorelink; ?> ' <?php echo $object->learnmore_target; ?> > <span class='evcal_evdata_row ' > <span class='evcal_evdata_icons'><i class='fa <?php echo get_eventON_icon('evcal__fai_006', 'fa-link', $evOPT); ?> '></i></span> <h3 class='evo_h3'><?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_learnmore2', 'Learn More'); ?> </h3> </span> </a> <div class='evo_ics evcal_col50 dark1 evo_clik_row' > <div class='evcal_evdata_row'> <span class="evcal_evdata_icons"><i class="fa fa-calendar"></i></span> <div class='evcal_evdata_cell'> <p><a href='<?php echo $__ics_url; ?> ' class='evo_ics_nCal' title='<?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_addics', 'Add to your calendar'); ?> '><?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_calncal', 'Calendar'); ?> </a> <a href='<?php echo $__googlecal_link; ?> ' target='_blank' class='evo_ics_gCal' title='<?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_addgcal', 'Add to google calendar'); ?> '><?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_calgcal', 'GoogleCal'); ?> </a> </p> </div> </div> </div></div></div> <?php echo $end; ?> </div> <?php $OT .= ob_get_clean(); // only learn more } else { if (!empty($object->learnmorelink)) { $OT .= "<div class='evo_metarow_learnM evorow bordb'>\r\n\t\t\t\t\t\t<a class='evcal_evdata_row evo_clik_row dark1 ' href='" . $object->learnmorelink . "' " . $object->learnmore_target . ">\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_006', 'fa-link', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<h3 class='evo_h3'>" . eventon_get_custom_language($evoOPT2, 'evcal_evcard_learnmore2', 'Learn More') . "</h3>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t" . $end . "</div>"; // only ICS } else { if (!empty($evOPT['evo_ics']) && $evOPT['evo_ics'] == 'yes') { ob_start(); ?> <div class='evo_metarow_ICS evorow bordb evcal_evdata_row'> <span class="evcal_evdata_icons"><i class="fa fa-calendar"></i></span> <div class='evcal_evdata_cell'> <p><a href='<?php echo $__ics_url; ?> ' class='evo_ics_nCal' title='<?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_addics', 'Add to your calendar'); ?> '><?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_calncal', 'Calendar'); ?> </a> <a href='<?php echo $__googlecal_link; ?> ' target='_blank' class='evo_ics_gCal' title='<?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_addgcal', 'Add to google calendar'); ?> '><?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_calgcal', 'GoogleCal'); ?> </a> </p> </div><?php echo $end; ?> </div> <?php $OT .= ob_get_clean(); } } } break; // paypal link // paypal link case 'paypal': $text = !empty($object->text) ? $object->text : eventon_get_custom_language($evoOPT2, 'evcal_evcard_tix1', 'Buy ticket via Paypal'); $email = !empty($evOPT['evcal_pp_email']) ? $evOPT['evcal_pp_email'] : false; $currency = !empty($evOPT['evcal_pp_cur']) ? $evOPT['evcal_pp_cur'] : false; if ($currency && $email) { ob_start(); ?> <div class='evo_metarow_paypal evorow evcal_evdata_row bordb evo_paypal'> <span class='evcal_evdata_icons'><i class='fa <?php echo get_eventON_icon('evcal__fai_007', 'fa-ticket', $evOPT); ?> '></i></span> <div class='evcal_evdata_cell'> <p><?php echo $text; ?> </p> <form target="_blank" name="_xclick" action="https://www.paypal.com/us/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="<?php echo $email; ?> "> <input type="hidden" name="currency_code" value="<?php echo $currency; ?> "> <input type="hidden" name="item_name" value="<?php echo $object->title; ?> "> <input type="hidden" name="amount" value="<?php echo $object->price; ?> "> <input type='submit' class='evcal_btn' value='<?php echo eventon_get_custom_language($evoOPT2, 'evcal_evcard_btn1', 'Buy Now'); ?> '/> </form> </div><?php echo $end; ?> </div> <?php $OT .= ob_get_clean(); } break; // eventbrite // eventbrite case 'eventbrite': // GET Custom language text $evcal_tx_1 = eventon_get_custom_language($evoOPT2, 'evcal_evcard_tix2', 'Ticket for the event'); $evcal_tx_2 = eventon_get_custom_language($evoOPT2, 'evcal_evcard_btn2', 'Buy Now'); $evcal_tx_3 = eventon_get_custom_language($evoOPT2, 'evcal_evcard_cap', 'Event Capacity'); // EVENTBRITE with event capacity if (!empty($object->capacity)) { $OT .= "<div class='evorow bordb" . $end_row_class . " eventbrite'>\r\n\t\t\t\t\t<div class='evcal_col50'>\r\n\t\t\t\t\t\t<div class='evcal_evdata_row bordr '>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_007', 'fa-ticket', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\r\n\t\t\t\t\t\t\t\t<h2 class='bash'>" . $object->tix_price . "</h2>\r\n\t\t\t\t\t\t\t\t<p>" . $evcal_tx_1 . "</p>\r\n\t\t\t\t\t\t\t\t<a href='" . $object->url . "' class='evcal_btn'>" . $evcal_tx_2 . "</a>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div><div class='evcal_col50'>\r\n\t\t\t\t\t\t<div class='evcal_evdata_row'>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_005', 'fa-tachometer', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\r\n\t\t\t\t\t\t\t\t<h2 class='bash'>" . $object->capacity . "</h2>\r\n\t\t\t\t\t\t\t\t<p>" . $evcal_tx_3 . "</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div><div class='clear'></div>\r\n\t\t\t\t\t" . $end . "</div>"; } else { // No event capacity $OT .= "<div class='evorow bordb eventbrite'>\r\n\t\t\t\t\t\t<div class='evcal_evdata_row bordr '>\r\n\t\t\t\t\t\t\t<span class='evcal_evdata_icons'><i class='fa " . get_eventON_icon('evcal__fai_007', 'fa-ticket', $evOPT) . "'></i></span>\r\n\t\t\t\t\t\t\t<div class='evcal_evdata_cell'>\r\n\t\t\t\t\t\t\t\t<h2 class='bash'>" . $object->tix_price . "</h2>\r\n\t\t\t\t\t\t\t\t<p>" . $evcal_tx_1 . "</p>\r\n\t\t\t\t\t\t\t\t<a href='" . $object->url . "' class='evcal_btn'>" . $evcal_tx_2 . "</a>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class='clear'></div>\r\n\t\t\t\t\t" . $end . "</div>"; } break; } // end switch $count++; } // end foreach return $OT; }
<p><label for=""><?php echo eventon_get_custom_language($opt, 'evoTX_inq_03', 'Email Address'); ?> </label><input class='evotxinq_field' name='email' type="text"></p> <p><label for=""><?php echo eventon_get_custom_language($opt, 'evoTX_inq_04', 'Question'); ?> </label><textarea class='evotxinq_field' name='message' ></textarea></p> <p class='notif' data-notif='<?php echo eventon_get_custom_language($opt, 'evoTX_inq_05', 'All Fields are required.'); ?> '><?php echo eventon_get_custom_language($opt, 'evoTX_inq_05', 'All Fields are required.'); ?> </p> <p><a class="evcal_btn evotx_INQ_submit"><?php echo eventon_get_custom_language($opt, 'evoTX_inq_07', 'Submit'); ?> </a></p> </div> <div class='evotxINQ_msg' style='display:none'> <em></em> <p><?php echo eventon_get_custom_language($opt, 'evoTX_inq_08', 'GOT IT! -- We will get back to you as soon as we can.'); ?> </p> </div> </div> </div> <?php }
function eventon_get_event_excerpt($text, $excerpt_length, $default_excerpt = '', $title = true) { global $eventon; $content = ''; if (empty($default_excerpt)) { $words = explode(' ', $text, $excerpt_length + 1); if (count($words) > $excerpt_length) { array_pop($words); array_push($words, '[...]'); $content = implode(' ', $words); } $content = strip_shortcodes($content); $content = str_replace(']]>', ']]>', $content); $content = strip_tags($content); } else { $content = $default_excerpt; } $titletx = $title ? '<h3 class="padb5 evo_h3">' . eventon_get_custom_language($eventon->evo_generator->evopt2, 'evcal_evcard_details', 'Event Details') . '</h3>' : null; $content = '<div class="event_excerpt" style="display:none">' . $titletx . '<p>' . $content . '</p></div>'; return $content; }
public function _event_date($pmv, $start_unix, $end_unix) { global $eventon; $evcal_lang_allday = eventon_get_custom_language('', 'evcal_lang_allday', 'All Day'); $date_array = $eventon->evo_generator->generate_time_('', '', $pmv, $evcal_lang_allday, '', '', $start_unix, $end_unix); return $date_array; }