Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi,

    No right now it’s not possible.

    Thread Starter Chip

    (@chip_88)

    This is really a pitty!
    Acutally, I should be possible very, very easy…
    I’m sure it’s just one entry in the export.php or something like this…

    @ Nicola:
    Will this be soon possible, please?!

    I meant you couldn’t do it in a setting. If you want to look at code, look at method do_execute in lib/command/export-events.php

    Thread Starter Chip

    (@chip_88)

    Nicola, I just found this:

    $filter = apply_filters( 'ai1ec_export_filter', $filter );
    		// when exporting events by post_id, do not look up the event's start/end date/time
    		$start  = ( $ai1ec_post_ids !== false )
    			? $this->_registry->get( 'date.time', '-3 years' )
    			: $this->_registry->get( 'date.time', time() - 24 * 60 * 60 ); // Include any events ending today
    		$end    = $this->_registry->get( 'date.time', '+3 years' );
    		$search = $this->_registry->get( 'model.search' );
    		$params = array(
    			'no_html' => $this->_params['no_html'],
    		);
    		$export_controller = $this->_registry->get(
    			'controller.import-export',
    			array( 'ics' ),
    			$params
    		);
    
    		$args['events'] = $this->unique_events(
    			$search->get_events_between( $start, $end, $filter )
    		);
    		$ics = $export_controller->export_events( 'ics', $args );
    		return array( 'data' => $ics );

    Do you have any advice, we have to change there to export past events?!

    I am wondering about the information:

    // when exporting events by post_id, do not look up the event’s start/end date/time

    Thanks in advance!
    Chipy

    Just set $ai1ec_post_ids = true; and you should be done ??

    Thread Starter Chip

    (@chip_88)

    Hey nicola!

    Thank you for your answer.
    As suggested, I changed the following code:
    $start = ( $ai1ec_post_ids !== false )

    to:
    $start = ( $ai1ec_post_ids !== true )

    But it doesn’t work at all.
    It still imports just upcoming events.

    I even changed
    $start = ( $ai1ec_post_ids !== false )

    to:
    $start = ( $ai1ec_post_ids = true )

    and it still doesn’t work.

    Then I tried changing:

    public function do_execute() {
    		$ai1ec_cat_ids  = $this->_params['cat_ids'];
    		$ai1ec_tag_ids  = $this->_params['tag_ids'];
    		$ai1ec_post_ids = $this->_params['post_ids'];

    to:

    public function do_execute() {
    		$ai1ec_cat_ids  = $this->_params['cat_ids'];
    		$ai1ec_tag_ids  = $this->_params['tag_ids'];
    		$ai1ec_post_ids = true;

    And I am still not getting the expected result.

    After all those changes, I delete everytime the cache folder…

    I think I changed the wrong code.
    Do have a further advice for me, please?!

    Thanks in advance!
    Chipy

    $start = $this->_registry->get( 'date.time', '-3 years' );
    $end    = $this->_registry->get( 'date.time', '+3 years' );
    Thread Starter Chip

    (@chip_88)

    Hi Nicola!

    Changed:

    $start  = ( $ai1ec_post_ids !== false )
    			? $this->_registry->get( 'date.time', '-3 years' )
    			: $this->_registry->get( 'date.time', time() - 24 * 60 * 60 ); // Include any events ending today
    		$end    = $this->_registry->get( 'date.time', '+3 years' );

    to:

    $start = $this->_registry->get( 'date.time', '-3 years' );
    $end    = $this->_registry->get( 'date.time', '+3 years' );

    It still doesn’t import all events.
    I am sure, I am doing something wrong… :/

    Thread Starter Chip

    (@chip_88)

    Nicola, where exactly do I have to set:
    $ai1ec_post_ids = true;

    in this part?

    public function do_execute() {
    		$ai1ec_cat_ids  = $this->_params['cat_ids'];
    		$ai1ec_tag_ids  = $this->_params['tag_ids'];
    		$ai1ec_post_ids = $this->_params['post_ids'];

    After all those changes, I delete everytime the cache folder…
    Do I maybe have to refresh anything anywhere else?!

    Thanks in advance!

    Then i have no other suggestions sorry, this should have solved issue, try to make sure there is no caching and google is seeing changes

    $start = $this->_registry->get( 'date.time', '-3 years' );
    $end    = $this->_registry->get( 'date.time', '+3 years' );
    Thread Starter Chip

    (@chip_88)

    Hi Nicola!

    OK, I have very good news.
    The code given by you

    $start = $this->_registry->get( 'date.time', '-3 years' );
    $end    = $this->_registry->get( 'date.time', '+3 years' );

    was totally correct.

    BUT: The troublemaker is Google itself.
    All the time when I chose “Subscribe → Add to Google” just the upcoming events appeared. Although I canceled the subscription, nothing changed.

    This evenig I searched around and found, that Google Calendar actualizes the events once per 24 hours and has a very persistent cache…

    So, in the end, I tried it directly within the Google Calender and added the events from my Time.ly Calendar via URL.
    → Finally, all past events appeared!!!

    Now I added some new events to my ai1ec, but until now have not appeared in my Google Calendar. Let’s see, when they will appear there…

    Anyway, THANK YOU VERY MUCH, NICOLA, FOR ALL YOUR SUPPORT!!!
    It was really, really great!!!

    Kind regards,
    Chipy

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Subscribe to past events?!’ is closed to new replies.