Exemplo n.º 1
0
function todayPosts($month, $currentDay, $year)
{
    global $myvar;
    global $date;
    global $event_month;
    global $event_day;
    global $event_year;
    $todaysevents = '';
    $temp = strLen($currentDay);
    $twoDay = '';
    $nextTwoDay = '';
    if ($temp < 2) {
        $twoDay = '0' . $currentDay;
    } else {
        $twoDay = $currentDay;
    }
    $nextDay = $currentDay + 1;
    if ($temp < 2) {
        $nextTwoDay = '0' . $currentDay;
    } else {
        $nextTwoDay = $currentDay;
    }
    $args = array('post_type' => 'lccc_event', 'meta_key' => 'event_start_date', 'meta_value' => $year . '/' . $month . '/' . $twoDay, 'meta_value_num' => time(), 'orderby' => 'meta_value_num', 'compare' => 'BETWEEN', 'type' => 'DATE');
    query_posts($args);
    // The Query
    $the_query = new WP_Query($args);
    // The Loop
    if ($the_query->have_posts()) {
        $todaysevents .= '<ul class="clanedardayseventslist">';
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $eventdate = event_meta_box_get_meta('event_start_date');
            $date = strtotime($eventdate);
            $today_event_month = date("m", $date);
            $today_event_day = date("j", $date);
            $todaysevents .= '<li><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></li>';
        }
        $todaysevents .= '</ul>';
    } else {
        // no posts found
    }
    /* Restore original Post Data */
    wp_reset_postdata();
    return $todaysevents;
}
Exemplo n.º 2
0
function event_meta_box_html($post)
{
    wp_nonce_field('_event_meta_box_nonce', 'event_meta_box_nonce');
    ?>
	
<script>
jQuery(document).ready(function(){
jQuery('#event_start_date').datepicker({
	dateFormat: "mm/dd/yy"
<<<<<<< HEAD
});
jQuery('#event_start_time').timepicker({
	timeFormat: "hh:mm tt"
});
jQuery('#event_end_date').datepicker({
	dateFormat: "mm/dd/yy"
});
=======
});
jQuery('#event_start_time').timepicker({
	timeFormat: "hh:mm tt"
});
jQuery('#event_end_date').datepicker({
	dateFormat: "mm/dd/yy"
});
>>>>>>> master
jQuery('#event_end_time').timepicker({
	timeFormat: "hh:mm tt"
});	

});
</script>

<h4>Submitted by:</h4>
	<p>
		<label for="event_meta_box_name"><?php 
    _e('Your Name', 'event_meta_box');
    ?>
</label><br>
		<input class="widefat" type="text" name="event_meta_box_name" id="event_meta_box_name" value="<?php 
    echo event_meta_box_get_meta('event_meta_box_name');
    ?>
">
	
	</p>	
<p>
		<label for="event_meta_box_e_mail"><?php 
    _e('E-Mail', 'event_meta_box');
    ?>
</label><br>
		<input class="widefat"  type="text" name="event_meta_box_e_mail" id="event_meta_box_e_mail" value="<?php 
    echo event_meta_box_get_meta('event_meta_box_e_mail');
    ?>
">
	
	</p>
<p>
		<label for="event_meta_box_phone"><?php 
    _e('Phone', 'event_meta_box');
    ?>
</label><br>
		<input class="widefat"  type="text" name="event_meta_box_phone" id="event_meta_box_phone" value="<?php 
    echo event_meta_box_get_meta('event_meta_box_phone');
    ?>
">
	
	</p>		
	<p>
		<label for="event_meta_box_department_organization_sponsor_"><?php 
    _e('Sponsoring/Host Department or Organization:', 'event_meta_box');
    ?>
</label><br>
		<input class="widefat"  type="text" name="event_meta_box_department_organization_sponsor_" id="event_meta_box_department_organization_sponsor_" value="<?php 
    echo event_meta_box_get_meta('event_meta_box_department_organization_sponsor_');
    ?>
">
	</p>
<p>
<br>
	<p>
<h4 class="metabox-field-title">Audience:</h4>

	<p>
		<input type="checkbox" name="event_meta_box_employee" id="event_meta_box_employee" value="LCCC Employees" <?php 
    echo event_meta_box_get_meta('event_meta_box_employee') === 'LCCC Employees' ? 'checked' : '';
    ?>
>
		<label for="event_meta_box_employee"><?php 
    _e('LCCC Employees', 'lccc_event_metabox');
    ?>
</label>	
</p>	
<p>
		<input type="checkbox" name="event_meta_box_community" id="event_meta_box_community" value="Community and Perspective Students" <?php 
    echo event_meta_box_get_meta('event_meta_box_community') === 'Community and Perspective Students' ? 'checked' : '';
    ?>
>
		<label for="event_meta_box_community"><?php 
    _e('Community and Perspective Students', 'lccc_event_metabox');
    ?>
</label>	
</p>
		<p>
		<input type="checkbox" name="event_meta_box_students" id="event_meta_box_students" value="LCCC Students" <?php 
    echo event_meta_box_get_meta('event_meta_box_students') === 'LCCC Students' ? 'checked' : '';
    ?>
>
		<label for="event_meta_box_students"><?php 
    _e('LCCC Students', 'lccc_event_metabox');
    ?>
</label>	
</p>

<h4 class="metabox-field-title">Event Location</h4><br>
<select name='event_meta_box_event_location' id='event_meta_box_event_location'>
 		<?php 
    $mypages = get_pages('post_type=lccc_location');
    foreach ($mypages as $page) {
        ?>
<option><?php 
        echo $page->post_title;
        ?>
</option><?php 
    }
    ?>
</select>
<h4 class="metabox-field-title">Ticket Price(s):</h4>
<p>
		<input type="text" name="event_meta_box_ticket_price_s_" id="event_meta_box_ticket_price_s_" value="<?php 
    echo event_meta_box_get_meta('event_meta_box_ticket_price_s_');
    ?>
">
	</p>
<h4 class="metabox-field-title">Event Dates and Times:</h4>

<p>		
		<label for="event_start_date"><?php 
    _e('Event Start date:', 'event_meta_box');
    ?>
</label><br>
		<input type="text" name="event_start_date" id="event_start_date" value="<?php 
    echo event_meta_box_get_meta('event_start_date');
    ?>
">
	</p>

<p>		
		<label for="event_start_time"><?php 
    _e('Event Start time:', 'event_meta_box');
    ?>
</label><br>
		<input type="text" name="event_start_time" id="event_start_time" value="<?php 
    echo event_meta_box_get_meta('event_start_time');
    ?>
">
	</p>

<p>
		<label for="event_end_date"><?php 
    _e('Event End date:', 'event_meta_box');
    ?>
</label><br>
		<input type="text" name="event_end_date" id="event_end_date" value="<?php 
    echo event_meta_box_get_meta('event_end_date');
    ?>
">
	</p>	

<p>
		<label for="event_end_time"><?php 
    _e('Event End time:', 'event_meta_box');
    ?>
</label><br>
		<input type="text" name="event_end_time" id="event_end_time" value="<?php 
    echo event_meta_box_get_meta('event_end_time');
    ?>
">
	</p>	

<h4 class="metabox-field-title">Who should your audience contact for more information?</h4>
<p>
			<label for="lccc_event_contact_name"><?php 
    _e('Name:', 'event_meta_box');
    ?>
</label><br>
			<input class="widefat"  type="text" name="lccc_event_contact_name" id="lccc_event_contact_name" value="<?php 
    echo event_meta_box_get_meta('lccc_event_contact_name');
    ?>
">
		<label for="event_meta_box_contact_phone_"><?php 
    _e('Phone:', 'event_meta_box');
    ?>
</label><br>
		<input class="widefat"  type="text" name="event_meta_box_contact_phone_" id="event_meta_box_contact_phone_" value="<?php 
    echo event_meta_box_get_meta('event_meta_box_contact_phone_');
    ?>
">
		<label for="event_meta_box_contact_email"><?php 
    _e('Email:', 'event_meta_box');
    ?>
</label><br>
		<input class="widefat"  type="text" name="event_meta_box_contact_email" id="event_meta_box_contact_email" value="<?php 
    echo event_meta_box_get_meta('event_meta_box_contact_email');
    ?>
">

	<label for="event_meta_box_associated_web_address_"><?php 
    _e('Website:', 'event_meta_box');
    ?>
</label><br>
		<input class="widefat"  type="text" name="event_meta_box_associated_web_address_" id="event_meta_box_associated_web_address_" value="<?php 
    echo event_meta_box_get_meta('event_meta_box_associated_web_address_');
    ?>
">
	</p>

<?php 
}
Exemplo n.º 3
0
			
	<div class="row">
 	<div class="large-12 medium-12 small-12 columns">
			<article id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class();
        ?>
>
				<h2><?php 
        the_title();
        ?>
</h2>
				<p>Start Date: <?php 
        echo event_meta_box_get_meta('event_meta_box_event_start_date_and_time_');
        ?>
</p>
				<h3>Description:</h3>
				<?php 
        the_content();
        ?>
			</article>
		</div>
 </div>

<?php 
    }
}
wp_reset_postdata();
?>
Exemplo n.º 4
0
			</div>
			<div class="small-12 medium-12 large-12 columns events-list">	
						
										<?php 
$args = array('post_type' => 'lccc_event', 'meta_query' => array(array('key' => 'event_start_date', 'value' => $myvar, 'comapre' > 'BETWEEN', 'type' => 'DATE')), 'orderby' => 'meta_value', 'meta_key' => 'event_start_time', 'order' => 'ASC');
query_posts($args);
// The Query
$the_query = new WP_Query($args);
// The Loop
if ($the_query->have_posts()) {
    while ($the_query->have_posts()) {
        ?>
																	<div class="small-12 medium-12 large-12 columns todays-event">
																	<?php 
        $the_query->the_post();
        $eventdate = event_meta_box_get_meta('event_start_date');
        $date = strtotime($eventdate);
        $today_event_month = date("m", $date);
        $today_event_day = date("j", $date);
        $time = date("h:i A", $date);
        the_title('<h2 class="event-title">', '</h2>');
        echo '<p class="event-time">' . $time . '</p>';
        the_content('<p>', '</p>');
        ?>
																	</div>	
																	<?php 
    }
} else {
    // no posts found
}
?>
Exemplo n.º 5
0
    $endeventtimehours = 24;
}
$durationhours = $endeventtimehours - $starteventtimehours;
if ($durationhours > 0) {
    if ($durationhours == 24) {
        $duration .= '1 day';
    } else {
        $duration .= $durationhours . 'hrs';
    }
}
$durationminutes = $endeventtimeminutes - $starteventtimeminutes;
if ($durationminutes > 0) {
    $duration .= $durationminutes . 'mins';
}
$location = event_meta_box_get_meta('event_meta_box_event_location');
$cost = event_meta_box_get_meta('event_meta_box_ticket_price_s_');
?>
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
	<div class="small-12 medium-2 large-2 columns">
	<?php 
echo '<div class="small-12 medium-12 large-12 columns event-date">';
echo '<div class="small-12 medium-12 large-12 columns calender">';
echo '<p class="stocker-month">' . $eventstartmonth . '</p>';
echo '<p class="stocker-day">' . $eventstartday . '</p>';
echo '</div>';
Exemplo n.º 6
0
$nextDay = $currentDay + 1;
if ($temp < 2) {
    $nextTwoDay = '0' . $currentDay;
} else {
    $nextTwoDay = $currentDay;
}
$today = "{$year}-{$twomonth}-{$twoDay}";
$eventargs = array('post_type' => 'lccc_event', 'post_status' => 'publish', 'posts_per_page' => $numberofposts, 'category_name' => $widgetcategory, 'meta_query' => array('relation' => 'AND', 'start_date' => array('key' => 'event_start_date', 'compare' => 'EXISTS', 'type' => 'DATE'), 'time_order' => array('key' => 'event_start_time', 'compare' => 'EXISTS')), 'orderby' => array('start_date' => 'ASC', 'time_order' => 'ASC'));
$newevents = new WP_Query($eventargs);
if ($newevents->have_posts()) {
    while ($newevents->have_posts()) {
        $newevents->the_post();
        $starteventdate = event_meta_box_get_meta('event_start_date');
        $starteventtime = event_meta_box_get_meta('event_start_time');
        $endeventdate = event_meta_box_get_meta('event_end_date');
        $endtime = event_meta_box_get_meta('event_end_time');
        $starttimevar = strtotime($starteventtime);
        $starttime = date("h:i a", $starttimevar);
        $starteventtimehours = date("G", $starttimevar);
        $starteventtimeminutes = date("i", $starttimevar);
        $startdate = strtotime($starteventdate);
        $eventstartdate = date("Y-m-d", $startdate);
        $eventstartmonth = date("M", $startdate);
        $eventstartday = date("j", $startdate);
        $endeventtimevar = strtotime($endtime);
        $endeventtime = date("h:i a", $endeventtimevar);
        $endeventtimehours = date("G", $endeventtimevar);
        $endeventtimeminutes = date("i", $endeventtimevar);
        $enddate = strtotime($endeventdate);
        $endeventdate = date("Y-m-d", $enddate);
        $duration = '';
Exemplo n.º 7
0
if ($durationhours > 0) {
    if ($durationhours == 24) {
        $duration .= '1 day';
    } else {
        $duration .= $durationhours . 'hrs';
    }
}
$durationminutes = $endeventtimeminutes - $starteventtimeminutes;
if ($durationminutes > 0) {
    $duration .= $durationminutes . 'mins';
}
$location = event_meta_box_get_meta('event_meta_box_event_location');
$cost = event_meta_box_get_meta('event_meta_box_ticket_price_s_');
$bgcolor = event_meta_box_get_meta('event_meta_box_stoccker_bg_color');
$ticketlink = event_meta_box_get_meta('event_meta_box_stocker_ticket_link');
$eventsubheading = event_meta_box_get_meta('event_meta_box_sub_heading');
?>
<article id="post-<?php 
the_ID();
?>
">
    <div class="small-12 medium-12 large-12 columns">
   <?php 
the_title('<h1 class="entry-title indiv-event">', '</h1>');
?>
			<?php 
if ($eventsubheading != '') {
    ?>
						<h4 class="event-sub-heading"><?php 
    echo $eventsubheading;
    ?>
if ($endeventtimehours == 0) {
    $endeventtimehours = 24;
}
$durationhours = $endeventtimehours - $starteventtimehours;
if ($durationhours > 0) {
    if ($durationhours == 24) {
        $duration .= '1 day';
    } else {
        $duration .= $durationhours . 'hrs';
    }
}
$durationminutes = $endeventtimeminutes - $starteventtimeminutes;
if ($durationminutes > 0) {
    $duration .= $durationminutes . 'mins';
}
$location = event_meta_box_get_meta('announcement_meta_box_event_location');
?>
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
    <div class="small-12 medium-12 large-12 columns">
   <?php 
the_title('<h1 class="entry-title">', '</h1>');
?>
    </div>
	<div class="small-12 medium-12 large-12 columns event-image"><?php 
the_post_thumbnail();
    $endeventtimehours = 24;
}
$durationhours = $endeventtimehours - $starteventtimehours;
if ($durationhours > 0) {
    if ($durationhours == 24) {
        $duration .= '1 day';
    } else {
        $duration .= $durationhours . 'hrs';
    }
}
$durationminutes = $endeventtimeminutes - $starteventtimeminutes;
if ($durationminutes > 0) {
    $duration .= $durationminutes . 'mins';
}
$location = event_meta_box_get_meta('announcement_meta_box_event_location');
$cost = event_meta_box_get_meta('announcement_meta_box_ticket_price_s_');
?>
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
	<div class="small-12 medium-3 large-4 columns">
	<?php 
the_post_thumbnail();
?>
 </div>
	<div class="small-12 medium-9 large-8 columns nopadding">
		<div class="small-12 medium-12 large-12 columns">