Brent Kozlowski

Forum Replies Created

Viewing 8 posts - 31 through 38 (of 38 total)
  • Author
    Posts
  • in reply to: Changing the Upcoming Events view for single-organizer.php #1023876
    Brent Kozlowski
    Participant

    Ok, I figured out that I need to modify “/list/content.php”, but how do I create a conditional statement that only shows my modified template for just the single-organizer.php and keeps the default list view on the main calendar view? Also, what file would it go in?

    in reply to: Changing the Upcoming Events view for single-organizer.php #1023870
    Brent Kozlowski
    Participant

    Apologies I should have been more specific. I already have a single-organizer.php in my child theme. I’m trying to modify the events view that appears for a specific organizer.

    My intention is to only modify the “list view” for the single-organizer and not the “List view” that appears on the main map/calendar page.

    in reply to: Changing the Upcoming Events view for single-organizer.php #1023865
    Brent Kozlowski
    Participant

    Apologies I should have been more specific. I already have a single-organizer.php in my child theme. I’m trying to modify the events view that appears for a specific organizer. My intention is to only modify the “list view” for the single-organizer and not the “List view” that appears on the main map/calendar page.

    in reply to: How to display recurrence rules? #1019130
    Brent Kozlowski
    Participant

    If anyone is wondering what the correct solution for displaying the “end” date for a recurring event the solution can be found below:

    $meta_data = get_post_meta(get_the_ID(), '_EventRecurrence', true);
    $end_ts = strtotime($meta_data['rules'][0]['end']);
    
    <?php esc_html_e( date('F j, Y', $end_ts)); ?>

    P.S. @george – I had to pay $40 for the solution to this and I’m sharing it with everyone here at no cost because that’s what a forum is meant for. I imagine quite a few people will benefit from it as this should be in the knowledge base or the codex and is completely unacceptable to have to hire someone for this. I hope you can use better judgement in the future.

    in reply to: How to display recurrence rules? #1019090
    Brent Kozlowski
    Participant

    I really feel as though grabbing this value shouldn’t be considered custom programming and should be adequately documented if not readily retrievable for an “out-of-the-box” solution. I’ve spent more than a few hours researching this and this is the closest I have come with no luck whatsoever. Your help would be greatly appreciated as I’m sure there will be more than a few people this will help down the road.

    Thanks!

    $last_date = get_post_meta($post->ID,'my_key',true);
    foreach ($last_date as $myvalue) { echo $myvalue.', '; }
    in reply to: Displaying Recurrence Rules for Custom Events #1017968
    Brent Kozlowski
    Participant

    Hi Nico,

    It appears that my post got published twice. Please see this thread for more details:

    https://theeventscalendar.com/support/forums/topic/how-to-display-recurrence-rules/

    Thanks!

    in reply to: How to display recurrence rules? #1017505
    Brent Kozlowski
    Participant

    As far as I can tell I need to pull the “end” value from the meta_value which is in a serialized array?

    meta_key = _EventRecurrence

    meta_value = a:2:{s:5:”rules”;a:1:{i:0;a:7:{s:4:”type”;s:6:”Custom”;s:8:”end-type”;s:2:”On”;s:3:”end”;s:10:”2016-01-21″;s:9:”end-count”;s:0:””;s:6:”custom”;a:5:{s:4:”type”;s:6:”Weekly”;s:8:”interval”;s:1:”1″;s:4:”week”;a:1:{s:3:”day”;a:1:{i:0;s:1:”5″;}}s:10:”start-time”;a:3:{s:4:”hour”;s:2:”05″;s:6:”minute”;s:2:”00″;s:8:”meridian”;s:2:”pm”;}s:8:”duration”;a:3:{s:4:”days”;s:0:””;s:5:”hours”;s:1:”3″;s:7:”minutes”;s:0:””;}}s:14:”EventStartDate”;s:19:”2015-11-05 17:00:00″;s:12:”EventEndDate”;s:19:”2015-11-05 20:00:00″;}}s:10:”exclusions”;a:0:{}}

    in reply to: How to display recurrence rules? #1017407
    Brent Kozlowski
    Participant

    Thanks for the quick response! To clarify I was asking how to add an elseif statement for a recurring event in a meta/details.php. I’ve since added the following code with a call to “tribe_is_recurring_event()” to achieve it. Seems to work as intended.

    What I’m confused on is how do I grab the “Final/last Date” from? Recurrence text or some other variable? I see the following variables, but none for the day of the week or last/final date.

    Example:
    $start_datetime = tribe_get_start_date();
    $start_date = tribe_get_start_date( null, false );
    $start_time = tribe_get_start_date( null, false, $time_format );
    $start_ts = tribe_get_start_date( null, false, Tribe__Events__Date_Utils::DBDATEFORMAT );

    $last_date = ??????
    $day_of_week = ??????

    $end_datetime = tribe_get_end_date();
    $end_date = tribe_get_end_date( null, false );
    $end_time = tribe_get_end_date( null, false, $time_format );
    $end_ts = tribe_get_end_date( null, false, Tribe__Events__Date_Utils::DBDATEFORMAT );

    <?php 
    		//is recurring 
    
    		elseif ( tribe_is_recurring_event() ) :
    			?>
    
    		<dt> <?php esc_html_e( 'Starts:', 'the-events-calendar' ) ?> </dt>
    			<dd>
    				<abbr class="tribe-events-abbr updated published dtstart" title="<?php esc_attr_e( $start_ts ) ?>"> <?php esc_html_e( $start_date ) ?> </abbr>
    			</dd>
    
    			<dt> <?php esc_html_e( 'Ends:', 'the-events-calendar' ) ?> </dt>
    			<dd>
    				<abbr class="tribe-events-abbr dtend" title="<?php esc_attr_e( $last_date ) ?>"> <?php esc_html_e( $last_date ) ?> </abbr>
    			</dd>
    
    			<dt> <?php esc_html_e( 'Meets:', 'the-events-calendar' ) ?> </dt>
    			<dd>
    				Every <?php esc_html_e($day_of_week) ?> <abbr class="tribe-events-abbr dtmeets" title="<?php esc_attr_e( $start_time ) ?>">@<?php esc_html_e( $start_time ) ?> </abbr>
    			</dd>
Viewing 8 posts - 31 through 38 (of 38 total)