• Resolved nicami2

    (@nicami2)


    Hello,

    we are using the TheEventsCalendar Plugin together with The EventsCalendar Pro Plugin.

    We are also using the feature to export the information about events to several calendar formats, for example the Google Calendar, Apple iCalendar or the Outlook Calendar.

    We managed to customize the content of the output files for the above noted calendar formats by manipulating the files in the src/Tribe/Views/V2/iCalendar/Links/GoogleCalendar.php and the-events-calendar/src/Tribe/Views/V2/iCalendar/Traits/Outlook_Methods.php and
    the-events-calendar/src/Tribe/iCal.php files.

    For example in the File src/Tribe/Views/V2/iCalendar/Links/GoogleCalendar.php
    we changed the statement around line 127

    $event_details = $event->post_content;
    to
    $event_details = $event->post_excerpt;

    to put the excerpt text of the post into the output for the Google Calendar.

    But all our customization are placed in the Plugin (Core) Files and after every update of the plugin the changes have to be made again in the Plugin Core Files

    As our changes effect the core files of The Event Calendar plugin we are now wondering where to put these changes in a local folder so that the changes will not be lost when new versions of your plugins are released.
    We are also wondering if there is the possibility to place code into the child theme’s funtion.php-file to make our changes safe for updating.

    We are aware that there are resources for customizing template files in the knowledgebase. But we think that these are not appropriate for our issue.

    Does anyone have a hint or advice to help us?

    Many thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support masoodak

    (@masoodak)

    Hi @nicami2,

    Thanks for reaching out!

    Since you are a premium license holder, you have access to premium support, and we ask that you submit a ticket here as we will be able to assist you in a better way,

    https://theeventscalendar.com/support/#contact

    Kind regards,
    Masood

    Thread Starter nicami2

    (@nicami2)

    Hello Masood,

    many thanks for your reply.

    We have already submitted a ticket in the support area regarding this issue.

    There we got the reply that our issue is not within the scope of the support because core files of the plugin are customized and the support service does not cover situations where the core plugin files have been modified.

    We have also got the suggestion to post our issue in this forum.

    best wishes

    Chin-Man

    Plugin Support Abz

    (@abzlevelup)

    Hi @nicami2, sorry to hear about this. Yes, as per the Terms of our Support Policy, we are not able to provide full Support for Customization requests such as what you’re trying to accomplish here, and also since the core files are modified.

    Although we do not support customization, let me point you to a potential solution. Let’s see what we can do here. I’m also curious about what you’re trying to achieve here, it seems like you wanted to add the excerpt to the export. The description gets truncated and encoded – via the format_event_details_for_url() function.

    So perhaps you could something like this:

    add_filter(
    	'tec_views_v2_single_event_gcal_link_parameters',
    	function( $pieces, $event ) {
    		
    		$excerpt = get_the_excerpt( $event );
    		
    		$pieces['details'] = tribe( Tribe\Events\Views\V2\iCalendar\Links\Google_Calendar::class )->format_event_details_for_url( $excerpt, $event );
    		
    		return $pieces;
    	},
    	10,
    	2
    );

    Note that you’d need to tidy this a bit, and tailor what you’re trying to accomplish here. But this is somehow what I think.

    Let me know if this helps. Have a great weekend ahead.

    Best,
    Abz

    Thread Starter nicami2

    (@nicami2)

    Hello Abz,

    many thanks for your support.

    Your solution for the Google Calendar works.

    We are now wondering what the filter hooks for the other Calendars such as Outlook Live, Outlook 365, iCal could be.

    Is this the source to find all the information about manipulating the other Calendar Links?

    https://docs.theeventscalendar.com/

    best wishes

    Chin-Man

    Plugin Support Abz

    (@abzlevelup)

    Hi @nicami2, good to know it worked for the Google Calendar. However, as far as I know, there’s no key or function/hook available for Outlook and iCal. I’d need to double-check with our team if we do have any workaround.

    And yes, all of our functions and dev resources are found in our Dev Docs → https://docs.theeventscalendar.com/

    Let me get back to you, hang tight for now.

    Have a great day.
    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    Hi @nicami2, apologies for the delay here. It seems like this was missed out. One of our devs suggests using tec_views_v2_single_event_gcal_link_parameters see the dev docs here → https://docs.theeventscalendar.com/reference/hooks/tec_views_v2_single_event_gcal_link_parameters/

    Let me know if that helps.

    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    Hi @nicami2,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    Thread Starter nicami2

    (@nicami2)

    Hello,

    thanks for your reply.
    The Hook you described “tec_views_v2_single_event_gcal_link_parameters” is the same as in the code example you submitted in a previous post.
    It is for manipulating the Google Calendar.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Customizing Calendar Export Output’ is closed to new replies.