• Resolved shayanfaisal

    (@shayanfaisal)


    Greetings,

    I’m currently using the Events Calendar plugin. I’d like to make it so where the user subscribes and is able to have two links included within their subscription description:

    1. Organizer’s website
    2. Event’s website (in this case, https://qalamcounseling.com/deadline/lums-undergraduate/)

    I have managed to achieve this for Single Google Calendar subscriptions, but want to do so when a user subscribes to all events (from https://qalamcounseling.com/deadlines/).

    This is the code I am using which seems to be working for Google Calendar for single events:

    add_filter( 'tec_views_v2_single_event_gcal_link_parameters', 'tribe_add_event_url_to_gcal_description', 10, 2 );
    
    function tribe_add_event_url_to_gcal_description( $pieces, $event ) {
    	// Get the organizer website URL
    	$organizer_url = tribe_get_organizer_website_url( $event->ID );
    	// Get the event link
    	$event_link = get_permalink( $event->ID );
    	$event_description = urlencode( $event->post_content . "<br><br>Counselor Website: " . $organizer_url . "<br>Event Link: " . $event_link );
    	$pieces["details"] = $event_description;
    	return $pieces;
    }

    Please help out in how I can enable the above to happen.

    • This topic was modified 2 years, 9 months ago by shayanfaisal.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello @shayanfaisal,

    Thanks for getting in touch with us.

    Extra customization like that is something beyond the scope of support we provide.

    When it comes to advanced customizations and third-party integrations, sometimes the best path forward is to hire an experienced developer to turn your dreams into reality.

    We know finding a reliable developer can be difficult. That’s why we recommend starting your search with Codeable, a helpful site that connects people needing on-demand website support with their network of trusted WordPress developers.

    Here is a list of template files for The Events Calendar and Events Calendar Pro. You can view our Full guide on customizations, our REST API, and our Developer Docs here: https://docs.theeventscalendar.com/.

    I hope that helps. Do not hesitate to reach out if you need further assistance.

    Thread Starter shayanfaisal

    (@shayanfaisal)

    Hello. I am not asking for aid on customization, but only guidance towards anything similar to the following (but for all events, instead of just a singular Google subscription), as stated above:

    add_filter( ‘tec_views_v2_single_event_gcal_link_parameters’, ‘tribe_add_event_url_to_gcal_description’, 10, 2 );

    Surely, this much can be aided with. I’d just like a pointer towards something that can help me add to the descriptions of all events being imported.

    Thread Starter shayanfaisal

    (@shayanfaisal)

    https://docs.theeventscalendar.com/reference/hooks/tribe_google_calendar_parameters/

    I found a hook that might be of use within your docs, but it’s not working as intended. It says it would modify the Google Calendar parameters, but it only does so for single events & not calendar subscriptions. Is there something I am missing, or is it intended to work that way?

    Is there anything in your docs that might help me export an event with the necessary additions detailed above (having the event link & organizer link appended in the description)?

    Plugin Support Darian

    (@d0153)

    Hi @shayanfaisal

    Could you try adding this code snippet, and see if that works for you?

    add_filter(
        'tribe_ical_feed_item',
        function( $item ) {
            $item['DESCRIPTION'] .= $item['URL']; // Just append the URL to the description. No formatting, etc.
    
            return $item;
        }
    );

    Plugin Support Darian

    (@d0153)

    Hi @shayanfaisal

    I hope you’re doing well. I just wanted to touch base and check in with you. It’s been a little while since we’ve heard from you. I was just curious if you had the chance to try out the recommendation provided above.

    Let me know if there’s anything I can assist you with.

    Plugin Support Darian

    (@d0153)

    Hi @shayanfaisal

    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.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Subscribing Parameters – Description’ is closed to new replies.