I am trying to create an Events system using Toolset. I previously wanted to see if we could integrate The Events Calendar with Toolset so we could have the best of both worlds. That support ticket is here:
https://toolset.com/forums/topic/is-the-use-of-fields-from-the-events-calendar-plugin-possible/
I am now trying to do this exclusively with Toolset and have set up a new custom content type created with Toolset called Rides. But I'm running across some functionality I've achieved through 3rd Party plug-ins for The Events Calendar that I'm not sure if I can duplicate. I'll post tickets for each of these one a time. Understood if these are things that are beyond the scope of your support. But I thought I'd post about each one just to see if you have any suggestions. If it's something you can assist with or have solutions for, all the better. But if you have experience that lets you steer me in the right direction, that's good too.
The first item is I'd like to add a link to each Ride page that will allow the end user to add that Ride to their Google Calendar.
We've kept The Events Calendar installed on our site and renamed its content type back to Events. I have a test event in the system here:
hidden link
If you look in the lower right corner of this page, you'll see the button that has the link for the end-user to add the Event/Ride to their Google Calendar. The link on that ride leads to the following URL:
hidden link.,%20Oviedo,%20FL,%2032765,%20United%20States&trp=false&ctz=America/New_York&sprop=website:hidden link
So I see that it is pulling date/time stamps, ride title, ride location, ride address, and other information that Google Calendar uses.
Would there be any way to use custom code in Toolset to achieve the end result URL formatted the same way that I could then place in a link? We can have all the necessary field data present in our Field Group for Rides.
I was thinking there might be a way to render this in some way by putting all the parts that stay the same for every post as is and then pulling the field data from Toolset dynamically. So our URL code could possibly be achieved through something like this:
hidden link field='start-date-and-time' style='text' format='Ymd']T[types field='start-date-and-time' style='text' format='His'][types field='end-date-and-time' style='text' format='Ymd']T[types field='end-date-and-time' style='text' format='His']&text=[tb-dynamic provider="__current_post" post="current" source="post-title" force-string='first' ]=Test&location=[types field='ride-start-name'][/types],%20[types field='ride-start-address']
/types],%20United%20States&trp=false&ctz=America/New_York&sprop=website:hidden link
It looks like the only reason this would fail to generate the URL in a format that will work with Google is because the Google URL needs %20 strings in place of blank spaces. The Toolset Post Title, Locations and Address fields above will show blank spaces. So if there is only a way to use custom code to replace blank spaces with %20 strings, I think we'd be able to succeed here. Or perhaps this is not needed and it will automatically use the %20 strings wherever blank spaces appear. Or perhaps Google Calendar will accept the URL without the %20 strings and the blank spaces intact. I suppose I could go ahead and try it just to see what happens, but I'll go ahead and get your thoughts on this first.
If this can be done somehow, that would be one feature we wouldn't have to do without if we keep this done exclusively in Toolset. If you have any ideas for achieving this, that would be fantastic.
I did see the following support ticket on your site:
https://toolset.com/forums/topic/add-events-in-google-calendar/
In that, Luo Yang suggested looking at WordPress Google Calendar plugins. The issue there is they want to create their own content types so I'm not sure how it would work to use this with the Toolset created Rides content type. We want to set up this link in the Rides template so it will pull the correct information relevant to each Ride if that can be done. I guess I could use whatever content type other plugins may add and then just add our Field Group for Rides to that plugin.
I realize we may not be able to do this using Toolset exclusively. I just want to see how close I can get to having all the functionality needed. Thanks for any assistance/advice you might have.