taudactyl
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Multi-Day Events showing same dateYes, exactly.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Multi-Day Events showing same dateHere’s a proof of concept patch that adds the
[current-date]shortcode I was thinking of:--- a/includes/class-gce-event.php +++ b/includes/class-gce-event.php @@ -94,3 +94,3 @@ */ - function get_event_markup( $display_type, $num_in_day, $num ) { + function get_event_markup( $display_type, $num_in_day, $num, $current_day_time ) { //Set the display type (either tooltip or list) @@ -104,2 +104,5 @@ + //Set the time of the start of the current event day + $this->current_day_time = $current_day_time; + $this->time_now = current_time( 'timestamp' ); @@ -220,2 +223,3 @@ 'start-date', //The start date of the event (uses the date format from the feed options, if it is set. Otherwise uses the default WordPress date format) + 'current-date', 'start-custom', //The start time / date of the event (uses a custom PHP date format, specified in the 'format' attribute) @@ -316,2 +320,5 @@ + case 'current-date': + return $m[1] . date_i18n( $this->feed->date_format, $this->current_day_time + $offset ) . $m[6]; + case 'start-custom': --- a/includes/class-gce-display.php +++ b/includes/class-gce-display.php @@ -368,3 +368,3 @@ //Add the event markup - $event->get_event_markup( 'list', $num_in_day, $i ) . + $event->get_event_markup( 'list', $num_in_day, $i, $key ) . '</div>';Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Multi-Day Events showing same dateI’m also encountering this issue. The problem occurs when you have a multi-day event (say, March 20 through March 22) in your calendar and are displaying events as a list. With a format like
[start-date]: [event-title], they show up like– Feb 11: A previous event
– Mar 20: Multi-Day Event
– Mar 20: Multi-Day Event
– Mar 20: Multi-Day Event
– Apr 17: A subsequent eventIt would be much preferable to have the events show as
– Feb 11: A previous event
– Mar 20: Multi-Day Event
– Mar 21: Multi-Day Event
– Mar 22: Multi-Day Event
– Apr 17: A subsequent eventwith each multi-day event entry with the date of that day. Now, I understand that this occurs because I am using the
[start-date]shortcode, which always gives the first day of the event, but I don’t see what else I should use. Perhaps there should be a new[current-date]shortcode added?Alternatively, perhaps the event shouldn’t be displayed repeatedly for each day, but instead show a range when the event spans multiple days.
The specific widget settings I’m actually using are
Display Events as: List Sort Order: Ascending Events Per Page: Number of Events, 7 Display Start Date Offset: Number of Days Back, 1