Support » Plugin: All-in-One Event Calendar » Custom iCal Import

  • We are importing from a calendar system called Master Calendar (which interfaces with a room reservation system called EMS). We then import the events to WordPress using their iCal feed:

    Calendar .ics Feed Link

    The originating calendar adds this to the bottom of every event dynamically (which we want to remove):

    Event Url

    The company has no way to remove this “feature” (ie bug).

    I was able to come up with two solutions. The better of the two required editing the core plugin.

    My question is if anyone could help my convert the core edit to a function that I could add to functions.php instead.

    Core Edit Option
    lib/import-export/ics.php around line 500 before the data array is created, I added:

    $description = substr($description, 0, strpos( $description, 'Event Url'));

    This worked best for me as it stripped the content before saving into WordPress, but required editing the core plugin.

    Single Page Display Option
    For the second, workable, but problematic option, I created a custom single-ai1ec_event.php page and filtered the content so:

    $old_content = ob_get_clean();
    $new_content = substr($old_content, 0, strpos( $old_content, 'Event Url'));
    echo $new_content;

    The above prevent the unwanted URL string from being displayed, but it is still stored in the database. The major downside being that if someone subscribes/adds an event to their personal calendar from our website, they would still get the unwanted URL string embedded in the Event Description.

  • The topic ‘Custom iCal Import’ is closed to new replies.