Support » Plugin: Event Organiser Posterboard » Display end date of multi day events

  • I wanted to see the end date of multi day events in the posterboard so it doesn’t look like it would just be during one day.
    As a proposal for the plugin, this is what I changed for it:

    event-organiser-posterboard.php: Add to $event array (defined in line 255):

    
    'event_end_day'     => eo_get_the_end( 'j' ),
    'event_end_month'   => eo_get_the_end( 'M' ),
    'event_is_multi_month'    => eo_get_the_start( 'M' ) != eo_get_the_end( 'M' ),
    'event_is_multi_day'    => eo_get_the_start( 'j' ) != eo_get_the_end( 'j' ) || eo_get_the_start( 'M' ) != eo_get_the_end( 'M' ),
    

    templates/single-event-board-item.html: Add at the end inside eo-eb-date-container div:

    
            <% if( event_is_multi_day ){ %>
              <% if( event_is_multi_month ){ %>
                <span class="eo-eb-date-month" style="background-color: <%=event_color%>;">-</span>
              <% } else { %>
                <span class="eo-eb-date-day" style="background-color: <%=event_color_light%>;line-height:0.5rem;">-</span>
              <% } %>
            <% } %>
            <% if( event_is_multi_month ){ %>
            <span class="eo-eb-date-month" style="background-color: <%=event_color%>;"><%=event_end_month%></span>
            <% } %>
            <% if( event_is_multi_day ){ %>
            <span class="eo-eb-date-day" style="background: <%=event_color_light%>;"><%=event_end_day%></span>
            <% } %>
    

    Some people might prefer to go without the “-” separator but this way turned out for me to be best readable/unterstandable.

  • The topic ‘Display end date of multi day events’ is closed to new replies.