Example #1
0
 /**
  * Create the events APM with the additional APM filters that TEC uses.
  *
  * @return void
  */
 public function ecp_filters()
 {
     if (!class_exists('Tribe_APM')) {
         add_action('admin_notices', array($this, 'maybe_notify_about_new_plugin'));
         return;
     }
     $filter_args = array('ecp_venue_filter_key' => array('name' => tribe_get_venue_label_singular(), 'custom_type' => 'ecp_venue_filter', 'sortable' => 'true'), 'ecp_organizer_filter_key' => array('name' => tribe_get_organizer_label_singular(), 'custom_type' => 'ecp_organizer_filter', 'sortable' => 'true'), 'ecp_start_date' => array('name' => __('Start Date', 'tribe-events-calendar-pro'), 'custom_type' => 'custom_date', 'disable' => 'columns'), 'ecp_end_date' => array('name' => __('End Date', 'tribe-events-calendar-pro'), 'custom_type' => 'custom_date', 'disable' => 'columns'), 'ecp_cost' => array('name' => __('Event Cost', 'tribe-events-calendar-pro'), 'meta' => '_EventCost', 'cast' => 'NUMERIC'), 'ecp_cat' => array('name' => __('Event Cats', 'tribe-events-calendar-pro'), 'taxonomy' => Tribe__Events__Main::TAXONOMY, 'disable' => 'columns'), 'ecp_title' => array('name' => __('Title', 'tribe-events-calendar-pro'), 'custom_type' => 'title', 'disable' => 'columns'), 'ecp_recur' => array('name' => __('Recurring', 'tribe-events-calendar-pro'), 'custom_type' => 'recur', 'disable' => 'columns'), 'ecp_content' => array('name' => __('Description', 'tribe-events-calendar-pro'), 'custom_type' => 'content', 'disable' => 'columns'));
     global $ecp_apm;
     $ecp_apm = new Tribe_APM(Tribe__Events__Main::POSTTYPE, $filter_args);
     $ecp_apm->do_metaboxes = false;
     $ecp_apm->add_taxonomies = false;
 }
Example #2
0
 /**
  * Create the events APM with the additional APM filters that TEC uses.
  *
  * @return void
  */
 public function ecp_filters()
 {
     if (!class_exists('Tribe_APM')) {
         add_action('admin_notices', array($this, 'maybe_notify_about_new_plugin'));
         return;
     }
     $filter_args = array('ecp_venue_filter_key' => array('name' => tribe_get_venue_label_singular(), 'custom_type' => 'ecp_venue_filter', 'sortable' => 'true'), 'ecp_organizer_filter_key' => array('name' => tribe_get_organizer_label_singular(), 'custom_type' => 'ecp_organizer_filter', 'sortable' => 'true'), 'ecp_start_date' => array('name' => esc_html__('Start Date', 'tribe-events-calendar-pro'), 'custom_type' => 'custom_date', 'disable' => 'columns'), 'ecp_end_date' => array('name' => esc_html__('End Date', 'tribe-events-calendar-pro'), 'custom_type' => 'custom_date', 'disable' => 'columns'), 'ecp_cost' => array('name' => esc_html__('Event Cost', 'tribe-events-calendar-pro'), 'meta' => '_EventCost', 'cast' => 'NUMERIC'), 'ecp_cat' => array('name' => esc_html__('Event Cats', 'tribe-events-calendar-pro'), 'taxonomy' => Tribe__Events__Main::TAXONOMY, 'disable' => 'columns'), 'ecp_title' => array('name' => esc_html__('Title', 'tribe-events-calendar-pro'), 'custom_type' => 'title', 'disable' => 'columns'), 'ecp_recur' => array('name' => esc_html__('Recurring', 'tribe-events-calendar-pro'), 'custom_type' => 'recur', 'disable' => 'columns'), 'ecp_content' => array('name' => esc_html__('Description', 'tribe-events-calendar-pro'), 'custom_type' => 'content', 'disable' => 'columns'));
     /**
      * Allows filtering the filters set up arguments.
      *
      * @since 4.1
      *
      * @param array $filter_args An associative array of filter set up arguments, see each filter for details.
      */
     $filter_args = apply_filters('tribe_events_pro_apm_filters_args', $filter_args);
     global $ecp_apm;
     $ecp_apm = new Tribe_APM(Tribe__Events__Main::POSTTYPE, $filter_args);
     $ecp_apm->do_metaboxes = false;
     $ecp_apm->add_taxonomies = false;
 }
    /**
     * Injects event meta data into the Attendees report
     *
     * @param int $event_id
     */
    public function event_details_top($event_id)
    {
        $post_type = get_post_type($event_id);
        if (Tribe__Events__Main::POSTTYPE === $post_type) {
            echo '
				<li>
					<strong>' . esc_html__('Start Date:', 'the-events-calendar') . '</strong>
					' . tribe_get_start_date($event_id, false, tribe_get_date_format(true)) . ' 
				</li>
			';
        }
        if (tribe_has_venue($event_id)) {
            $venue_id = tribe_get_venue_id($event_id);
            echo '
				<li class="venue-name">
					<strong>' . tribe_get_venue_label_singular() . ': </strong>
					<a href="' . get_edit_post_link($venue_id) . '" title="' . esc_html__('Edit Venue', 'the-events-calendar') . '">' . tribe_get_venue($event_id) . '</a>
				</li>
			';
        }
    }
Example #4
0
 *
 * Override this template in your own theme by creating a file at:
 * [your-theme]/tribe-events/modules/meta/venue.php
 *
 * @package TribeEventsCalendar
 */
if (!tribe_get_venue_id()) {
    return;
}
$phone = tribe_get_phone();
$website = tribe_get_venue_website_link();
?>

<div class="widget tribe-events-meta-group tribe-events-meta-group-venue">
	<h3 class="widget-title special font-size-sm separator_align_left tribe-events-single-section-title"> <span><?php 
echo tribe_get_venue_label_singular();
?>
</span> </h3>
	<div class="widget-content">
		<dl>
			<?php 
do_action('tribe_events_single_meta_venue_section_start');
?>

			<dd class="author fn org"> <?php 
echo tribe_get_venue();
?>
 </dd>
			<div class="clearfix"></div>
			<?php 
// Do we have an address?
Example #5
0
<script type="text/javascript">
	jQuery('[name=venue\\[Venue\\]]').blur(function () {
		jQuery.post('<?php 
echo esc_url_raw(admin_url('admin-ajax.php'));
?>
',
			{
				action: 'tribe_event_validation',
				nonce : <?php 
echo json_encode(wp_create_nonce('tribe-validation-nonce'));
?>
,
				type  : 'venue',
				name  : jQuery('[name=venue\\[Venue\\]]').get(0).value
			},
			function (result) {
				if (result == 1) {
					jQuery('.tribe-venue-error').remove();
				} else {
					jQuery('.tribe-venue-error').remove();
					jQuery( '[name=venue\\[Venue\\]]' ).after('<div class="tribe-venue-error error form-invalid"><?php 
printf(__('%s Name Already Exists', 'the-events-calendar'), tribe_get_venue_label_singular());
?>
</div>');
				}
			}
		);
	});
</script>
    die('-1');
}
if (tribe_get_option('defaultValueReplace') && $post->post_type != TribeEvents::VENUE_POST_TYPE) {
    $_VenueAddress = tribe_get_option('eventsDefaultAddress');
    $_VenueCity = tribe_get_option('eventsDefaultCity');
    $_VenueState = tribe_get_option('eventsDefaultState');
    $_VenueProvince = tribe_get_option('eventsDefaultProvince');
    $_VenueCountry = tribe_get_option('eventsDefaultCountry');
    $_VenueZip = tribe_get_option('eventsDefaultZip');
    $_VenuePhone = tribe_get_option('eventsDefaultPhone');
}
if ($post->post_type != TribeEvents::VENUE_POST_TYPE) {
    ?>
	<tr class="venue">
		<td><?php 
    printf(__('%s Name:', 'tribe-events-calendar'), tribe_get_venue_label_singular());
    ?>
</td>
		<td>
			<input tabindex="<?php 
    tribe_events_tab_index();
    ?>
" type='text' name='venue[Venue]' size='25' value='<?php 
    if (isset($_VenueVenue)) {
        echo esc_attr($_VenueVenue);
    }
    ?>
' />
		</td>
	</tr>
<?php 
',
			{
				action: 'tribe_event_validation',
				nonce : <?php 
echo json_encode(wp_create_nonce('tribe-validation-nonce'));
?>
,
				type  : 'venue',
				name  : jQuery('[name=venue\\[Venue\\]]').get(0).value
			},
			function (result) {
				if (jQuery('[name=venue\\[Venue\\]]').get(0).value == "") {
					jQuery('.tribe-venue-error').remove();
					jQuery( '[name=venue\\[Venue\\]]' ).after('<div class="tribe-venue-error error form-invalid"><?php 
printf(esc_html__('%s Name can not be empty', 'the-events-calendar'), tribe_get_venue_label_singular());
?>
</div>');
				} else if (result == 1) {
					jQuery('.tribe-venue-error').remove();
				} else {
					jQuery('.tribe-venue-error').remove();
					jQuery( '[name=venue\\[Venue\\]]' ).after('<div class="tribe-venue-error error form-invalid"><?php 
printf(esc_html__('%s Name already exists', 'the-events-calendar'), tribe_get_venue_label_singular());
?>
</div>');
				}
			}
		);
	});
</script>
Example #8
0
</span>
											</td>
										</tr>
									</table>
									<table class="whiteSpace" border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td valign="top" align="left" width="100%" height="30" style="height:30px; background:#f7f7f7; padding: 0 !important; margin:0 !important;">
												<div style="margin:0; height:30px;"></div>
											</td>
										</tr>
									</table>
									<table class="ticket-venue" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
										<tr>
											<td class="ticket-venue" valign="top" align="left" width="300" style="padding: 0 !important; width:300px; margin:0 !important;">
												<h6 style="color:#909090 !important; margin:0 0 4px 0; font-family: 'Helvetica Neue', Helvetica, sans-serif; text-transform:uppercase; font-size:13px; font-weight:700 !important;"><?php 
    _e(tribe_get_venue_label_singular(), 'the-events-calendar');
    ?>
</h6>
												<table class="venue-details" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
													<tr>
														<td class="ticket-venue-child" valign="top" align="left" width="130" style="padding: 0 10px 0 0 !important; width:130px; margin:0 !important;">
															<span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:13px; display:block; margin-bottom:5px;"><?php 
    echo $venue_name;
    ?>
</span>
															<a style="color:#006caa !important; display:block; margin:0; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:13px; text-decoration:underline;">
																<?php 
    echo $venue_address;
    ?>
<br />
																<?php 
$status = ucwords($tribe_events_status);
$inst1stat = ucwords($tribe_events_inst1_stat);
$inst2stat = ucwords($tribe_events_inst2_stat);
$inst3stat = ucwords($tribe_events_inst3_stat);
//Get User Data for Instructors
$userdata1 = get_userdata($tribe_events_inst1);
$userdata2 = get_userdata($tribe_events_inst2);
$userdata3 = get_userdata($tribe_events_inst3);
$iru = " per " . ucwords($tribe_events_inst_rate_unit);
//Get Venue Information
if (function_exists('tribe_get_venue_id')) {
    $venue_id = tribe_get_venue_id($event_id);
    if (!empty($venue_id)) {
        $venue = get_post($venue_id);
    }
    $venue_label = tribe_get_venue_label_singular();
    $venue_name = $venue_phone = $venue_address = '';
    if (!empty($venue)) {
        $venue_phone = get_post_meta($venue_id, '_VenuePhone', true);
    }
}
//Get Course(s) list
$classes = get_the_terms($event_id, 'tribe_events_cat');
if ($classes && !is_wp_error($classes)) {
    $draught_links = array();
    foreach ($classes as $class) {
        $class_links[] = $class->name;
    }
    $course_list = join(", ", $class_links);
}
?>
Example #10
0
</span>
											</td>
										</tr>
									</table>
									<table class="whiteSpace" border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td valign="top" align="left" width="100%" height="30" style="height:30px; background:#f7f7f7; padding: 0 !important; margin:0 !important;">
												<div style="margin:0; height:30px;"></div>
											</td>
										</tr>
									</table>
									<table class="ticket-venue" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
										<tr>
											<td class="ticket-venue" valign="top" align="left" width="300" style="padding: 0 !important; width:300px; margin:0 !important;">
												<h6 style="color:#909090 !important; margin:0 0 4px 0; font-family: 'Helvetica Neue', Helvetica, sans-serif; text-transform:uppercase; font-size:13px; font-weight:700 !important;"><?php 
    _e(tribe_get_venue_label_singular(), "tribe-events-calendar");
    ?>
</h6>
												<table class="venue-details" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
													<tr>
														<td class="ticket-venue-child" valign="top" align="left" width="130" style="padding: 0 10px 0 0 !important; width:130px; margin:0 !important;">
															<span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:13px; display:block; margin-bottom:5px;"><?php 
    echo $venue_name;
    ?>
</span>
															<a style="color:#006caa !important; display:block; margin:0; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:13px; text-decoration:underline;">
																<?php 
    echo $venue_address;
    ?>
<br />
																<?php 
Example #11
0
            ?>
						<span class="tribe-events-divider">|</span>
						<span class="tribe-events-event-cost">
						<?php 
            echo tribe_get_cost(get_the_ID(), true);
            ?>
					</span>
					<?php 
        }
        ?>
				</li>
			<?php 
    }
    ?>
		</ul>
		<?php 
    do_action('tribe_events_venue_widget_after_the_list');
    ?>
	<?php 
}
?>

	<a href="<?php 
echo esc_url(tribe_get_venue_link($venue_ID, false));
?>
"><?php 
printf(__('View all %1$s at this %2$s', 'tribe-events-calendar'), $events_label_plural, tribe_get_venue_label_singular());
?>
</a>
</div>
    /**
     * Injects event meta data into the Attendees report
     */
    public function event_details_top($event_id)
    {
        if (Tribe__Events__Main::POSTTYPE !== get_post_type($event_id)) {
            return;
        }
        $url = null;
        if (tribe_has_venue($event_id)) {
            $venue_id = tribe_get_venue_id($event_id);
            $url = get_post_meta($venue_id, '_VenueURL', true);
            if ($url) {
                $url_path = @parse_url($url, PHP_URL_PATH);
                $display_url = @parse_url($url, PHP_URL_HOST);
                $display_url .= empty($url_path) && $url_path !== '/' ? '/&hellip;' : '';
                $display_url = apply_filters('tribe_venue_display_url', $display_url, $url, $venue_id);
            }
        }
        ?>
		<li>
			<strong><?php 
        esc_html_e('Start Date / Time:', 'event-tickets');
        ?>
</strong>
			<?php 
        echo tribe_get_start_date($event_id, false, tribe_get_datetime_format(true));
        ?>
		</li>

		<li>
			<strong><?php 
        esc_html_e('End Date / Time:', 'event-tickets');
        ?>
</strong>
			<?php 
        echo tribe_get_end_date($event_id, false, tribe_get_datetime_format(true));
        ?>
		</li>
		<?php 
        if (tribe_has_venue($event_id)) {
            ?>

			<li class="venue-name">
				<strong><?php 
            echo tribe_get_venue_label_singular();
            ?>
: </strong>
				<a href="<?php 
            echo get_edit_post_link($venue_id);
            ?>
" title="<?php 
            esc_html_e('Edit Venue', 'the-events-calendar');
            ?>
"><?php 
            echo tribe_get_venue($event_id);
            ?>
</a>
			</li>

			<li class="venue-address">
				<strong><?php 
            _e('Address:', 'the-events-calendar');
            ?>
 </strong>
				<?php 
            echo tribe_get_full_address($venue_id);
            ?>
			</li>

			<?php 
            if ($phone = tribe_get_phone($venue_id)) {
                ?>
				<li class="venue-phone">
					<strong><?php 
                echo esc_html(__('Phone:', 'the-events-calendar'));
                ?>
 </strong>
					<?php 
                echo esc_html($phone);
                ?>
				</li>
				<?php 
            }
            //end if
            if ($url) {
                ?>
				<li class="venue-url">
					<strong><?php 
                echo esc_html(__('Website:', 'the-events-calendar'));
                ?>
 </strong>
					<a target="_blank" href="<?php 
                echo esc_url($url);
                ?>
">
						<?php 
                echo esc_html($display_url);
                ?>
					</a>
				</li>
				<?php 
            }
            //end if
        }
    }
Example #13
0
			<table class="eventtable ticket_list">
				<tr>
					<td width="33%" valign="top">
						<?php 
echo sprintf('<h4>%s</h4>', esc_html(__('Event Details', 'tribe-events-calendar')));
echo sprintf('<strong>%s </strong> %s', esc_html(__('Start Date / Time:', 'tribe-events-calendar')), tribe_get_start_date($event_id, false, tribe_get_datetime_format(true)));
echo "<br/>";
echo sprintf('<strong>%s </strong> %s', esc_html(__('End Date / Time:', 'tribe-events-calendar')), tribe_get_end_date($event_id, false, tribe_get_datetime_format(true)));
$venue_id = tribe_get_venue_id($event_id);
if (!empty($venue_id)) {
    $venue = get_post($venue_id);
}
if (!empty($venue)) {
    echo "<br/>";
    echo sprintf('<strong>%s: </strong> %s', esc_html(__(tribe_get_venue_label_singular(), 'tribe-events-calendar')), esc_html($venue->post_title));
    $phone = get_post_meta($venue_id, '_VenuePhone', true);
    if (!empty($phone)) {
        echo "<br/>";
        echo sprintf('<strong>%s </strong> %s', esc_html(__('Phone:', 'tribe-events-calendar')), esc_html($phone));
    }
    $website = get_post_meta($venue_id, '_VenueURL', true);
    if (!empty($website)) {
        echo "<br/>";
        echo sprintf('<strong>%s </strong> <a target="_blank" href="%s">%s</a>', esc_html(__('Website:', 'tribe-events-calendar')), esc_url($website), esc_html($website));
    }
}
?>
					</td>
					<td width="33%" valign="top">
						<?php 
Example #14
0
            ?>
						<span class="tribe-events-divider">|</span>
						<span class="tribe-events-event-cost">
						<?php 
            echo tribe_get_cost(get_the_ID(), true);
            ?>
					</span>
					<?php 
        }
        ?>
				</li>
			<?php 
    }
    ?>
		</ul>
		<?php 
    do_action('tribe_events_venue_widget_after_the_list');
    ?>
	<?php 
}
?>

	<a href="<?php 
echo tribe_get_venue_link($venue_ID, false);
?>
"><?php 
printf(__('View all Events at this %s', 'tribe-events-calendar'), tribe_get_venue_label_singular());
?>
</a>
</div>
Example #15
0
 * Single Event Meta (Venue) Template
 *
 */
if (!tribe_get_venue_id()) {
    return;
}
$phone = tribe_get_phone();
$website = tribe_get_venue_website_link();
?>

<div class="grve-tribe-events-meta-group grve-tribe-events-meta-group-venue">
	<?php 
if (is_single('tribe_events')) {
    ?>
	<h5 class="grve-title"> <?php 
    _e(tribe_get_venue_label_singular(), GRVE_THEME_TRANSLATE);
    ?>
 </h5>
	<?php 
} else {
    ?>
	<h5 class="grve-title"> <?php 
    echo tribe_get_venue();
    ?>
 </h5>
	<?php 
}
?>

	<ul>
		<?php