Closed boonebgorges closed 4 years ago
Seems to be working OK:
@rekmla @nalonsopress I believe this report was originally from you - could you please provide a bit of info about what's missing in your outgoing notifications? Maybe a screenshot would help.
@boonebgorges Here is what I came up with which includes timezone and description, based off what you did:
`$content = ''; if ( 'bpeo_create_event' === $type ) { $content_parts = array();
$content_parts[] = sprintf( __( "Title: %s", 'bp-event-organiser' ), $event->post_title );
$content_parts[] = sprintf( __( "Description: %s", 'bp-event-organiser' ), $event->post_content );
$date = eo_get_next_occurrence( eo_get_event_datetime_format( $event_id ), $event_id );
$dateTime = new DateTime();
$dateTime->setTimeZone( new DateTimeZone(eo_get_blog_timezone()->getName() ) );
$event_timezone = $dateTime->format('T');
if ( $date ) {
$content_parts[] = sprintf( __( "Date: %s %s", 'bp-event-organiser' ), esc_html( $date ), esc_html( $event_timezone ) );
}
$venue_id = eo_get_venue( $event_id );
if ( $venue_id ) {
$venue = eo_get_venue_name( $venue_id );
$content_parts[] = sprintf( __( "Location: %s", 'bp-event-organiser' ), esc_html( $venue ) );
}
$content_parts[] = "\r";
$content = implode( "\n\r", $content_parts );
}
`
@nalonsopress Ah, so the issue is that there's not as much content as you'd like, not that the intended content is not there?
Timezone and Description both seem like good additions to the plugin. I'll go ahead and add them.
Updating @rekmla
Let me know what you think of eba00f9.
That looks good. Thanks. The ICS solution was pretty clever too, I was trying to filter bp_send_mail lol
ha ha - if you get a chance to test the ICS thing, it'd be great
@boonebgorges I see the attachment but it's blank when I open it. I see this error in the log:
PHP Warning: file_get_contents(BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Humanities Commons//NONSGML Events//EN CALSCALE:GREGORIAN X-ORIGINAL-URL:https://...@127.0.0.1 STATUS:CONFIRMED DTSTAMP:20190424T144028Z CREATED:20190424T184027Z LAST-MODIFIED:20190424T184027Z DTSTART;TZID=America/New_York:20190424T150000 DTEND;TZID=America/New_York:20190424T160000 SUMMARY: asdfasdfasdf DESCRIPTION: asdfasdfasdf X-ALT-DESC;FMTTYPE=text/html: <p>asdfasdfasdf</p> ORGANIZER;CN="Jennifer Jones":MAILTO:jennifer@signhcommons.org URL;VALUE=URI:https://hcommons-dev.org/events/event/asdfasdfasdf/ END:VEVENT BEGIN:VTIMEZONE TZID:America/New_York BEGIN:STANDARD TZOFFSETFROM:-0400 TZOFFSETTO:-0500 DTSTART:20181104T060000 TZNAME:EST END:STANDARD BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 DTSTART:20190310T070000 TZNAME:EDT END:DAYLIGHT END:VTIMEZONE END:VCALENDAR ): failed to open stream: No such file or directory in /srv/www/commons/current/web/app/plugins/sparkpost/mailer.http.class.php on line 175
@nalonsopress - Looks like a SparkPost WP plugin compatibility issue.
Going to close this one out.
In https://github.com/cuny-academic-commons/bp-event-organiser/commit/f0f3849ab731c8f868dc7d86020efd8abc468a6c I added some support for event details being put into the activity stream. I got a report that this isn't always working, at least in the BPGES notification, so I'd like to review and potentially make BPGES-specific improvements to the way the content is formatted.