Calendar export (ics) only exports top 30 events v2

Home Forums Calendar Products Events Calendar PRO Calendar export (ics) only exports top 30 events v2

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1431988
    Peter
    Participant

    Hi there,

    Following on from the last post-1400904. The code recommended has a conflict: https://gist.github.com/andrasguseo/b8e2739b11fdbd2d5ebacce23d862046#file-ical-export-events-custom-php

    Screen shot: https://cl.ly/oxEo

    This was never an issue in the past but came from updates earlier last year. It renders the calendar export useless as there is no way to select or filter what you need and only exports the last 30 entries.

    Regards
    Peter

    #1433380
    Victor
    Member

    Hi Peter!

    Thanks for reaching out to us! Let me help you with this topic.

    The error message you are getting means the filter_ical_query() function is being defined more than once. Could you please make sure you are not placing the code twice anywhere else?

    I tried the code myself and couldn’t reproduce the issue you are having.

    Please let me know about it.

    Thanks,
    Victor

    #1434224
    Peter
    Participant

    Hi Victor,

    The conflict is removed. It was set in the child theme for testing which is now deleted.

    However this does not resolve the problem with only one months view being exported? Is there any other way to fix this problem as it is required for all members to import the events into their preferred school calendars?

    Can we also set the calendar export button to show at the top and bottom of the event listing?

    Regards
    Peter

    • This reply was modified 8 years, 3 months ago by Peter.
    #1435086
    Victor
    Member

    Hi Peter!

    Thanks for following up with this.

    I’m glad you could eliminate the conflict. Just to confirm, is the snippet not working for you at all, even if you place it once in your theme’s functions.php file?

    Please let me know.

    Thanks,
    Victor

    #1435407
    Peter
    Participant

    Hi Victor,
    The code is set in the themes functions.php file at present and is not working. I still can’t download the years events that you can see on the events page.
    I also need the events download button before and after the events listed. What would be the code to do this?

    #1435844
    Victor
    Member

    This reply is private.

    #1437671
    Peter
    Participant

    This reply is private.

    #1446209
    Victor
    Member

    Hi Peter!

    Thanks for following up with this.

    First, let me apologise for the delay in getting back to you. We’ve been out on our annual team trip and we are slowly getting back to normal response times.

    I have come up with a snippet to accomplish what you are looking for. Please try adding it into your theme’s functions.php file and see if it works.

    /**
    * Move calendar export links to before the month calendar.
    */
    class Tribe__Events__Move__Export__Links {
    public function __construct() {
    add_action( 'init', array( $this, 'view_links' ) );
    }
    
    public function view_links() {
    remove_action(
    'tribe_events_after_footer',
    array( $this->ical_provider(), 'maybe_add_link' )
    );
    add_action(
    'tribe_events_before_header',
    array( $this->ical_provider(), 'maybe_add_link' )
    );
    }
    
    protected function ical_provider() {
    return function_exists( 'tribe' )
    ? tribe( 'tec.iCal' ) // Current
    : 'Tribe__Events__iCal'; // Legacy
    }
    }
    new Tribe__Events__Move__Export__Links();
    
    add_filter( 'tribe_get_ical_link', 'custom_tribe_get_ical_link' );
    function custom_tribe_get_ical_link( $output ) {
    $output = $output . '&tribe_display=custom';
    return $output;
    }
    
    add_filter('tribe_events_force_filtered_ical_link', '__return_true' );

    Does it work for your site? Please let me know.

    Best,
    Victor

    #1467193
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Calendar export (ics) only exports top 30 events v2’ is closed to new replies.