• Resolved seaus

    (@seaus)


    Hey there

    Just upgraded to 1.0 version of the calendar. Love most changes, but did loose one important part

    Before the change (and I documented it for you) I was able to via changing PHP for the Upcoming event widget (which your notes now say is going away) to format the display of dates. Yes, I am aware the actual date formatting is connected to the blog now, which is great, but I am talking about multiple date and showing start AND stop times/dates.

    Here is the code I had in before:
    // multiple day event, spanning all day
    if ($event->allDay) {
    $out .= $event->start_date;
    $out .= ‘ – ‘ . $event->end_date;
    // multiple day event, not spanning all day
    } else {
    $out .= $event->start_date . ‘ (‘ . $event->start_time. ‘) – ‘ . $event->end_date . ‘ (‘ . $event->end_time. ‘)’;
    }
    } else {
    // one day event, spanning all day
    if ($event->allDay) {
    $out .= $event->start_date;
    // one day event, spanning hours
    } else {
    $out .= $event->start_date . ‘ (‘ . $event->start_time. ‘ – ‘ . $event->end_time. ‘)’;
    }

    Now no end times are being shown for single date or multiple date. I am happy to mess with the code, but am not sure where the formatting of the [eventlist] shortcode is.

    Please advise.

    Thanks

    Serge

    http://wordpress.org/extend/plugins/ajax-event-calendar/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Eran Miller

    (@eranmiller)

    http://code.google.com/p/wp-aec/wiki/PluginInstallation
    Step 5 has a link to shortcode options

    Thread Starter seaus

    (@seaus)

    Yes, Eran, I saw those, but there is nothing in there to show both the start and end date and times of events spanning multiple days.

    Plugin Contributor Eran Miller

    (@eranmiller)

    Ah, I thought you were asking something else. As pointed out in your post, display customization of the dates/times can only be done by editing the code.

    Thread Starter seaus

    (@seaus)

    Yes, I figured that.

    Which file? Can I simply use the code I pasted above?

    Plugin Contributor Eran Miller

    (@eranmiller)

    The main file: ajax-event-calendar.php

    Possibly, but I can’t guarantee it won’t break.

    Unfortunately, I don’t have the capacity to research the matter or offer more specific help for free.

    In general, I don’t recommend customizing plugins, unless you’re open to the likelihood that you’ll need to change your code with each update.

    I actually made similar changes to mine today, for the purpose of the eventlist.

    $out .= '<span class="fc-event-time">';
    
    // always display the start date
    $out .= $row->start_date;
    
    // only display the end date if different than the start date
    if (!($row->end_date == $row->start_date)) {
       $out .= ' - ' . $row->end_date;
    }
    
    // only display times if the event is not all-day
    if (!$row->allDay) {
       $out .= '<br>' . $row->start_time . ' - ' . $row->end_time;
    }

    It seems to work just fine, though obviously that can change with future versions. It should address all of the possible date and time states

    Now one issue was that when displaying both a start-date and an end-date, the line wrapped around. I fixed that by changing to a three-letter display of months in WordPress settings, instead of full-word month names.

    Plugin Contributor Eran Miller

    (@eranmiller)

    thanks for posting your solution!

    Thread Starter seaus

    (@seaus)

    Will try it out

    Eran, any chance in next version something like custom code block for formatting of data display would be available?

    Plugin Contributor Eran Miller

    (@eranmiller)

    To properly be considered, all feature requests must be submitted to the issue tracker with as much detail as possible about:
    1. what the feature does
    2. how it will be used
    3. why it will improve the plugin

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Ajax Event Calendar] Customize the [eventlist] display for multi-day events’ is closed to new replies.