Google Calendar export in new tab

Home Forums Calendar Products Events Calendar PRO Google Calendar export in new tab

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #956440
    Jeff
    Participant

    Where can I find the code for the Google and iCal export buttons so I can add ‘target_blank’ to open the calendars in a new tab. When adding now at least on Google Calendar because there seems to be a mouse trap configuration preventing using the back button to get back to the website?

    #956441
    Jeff
    Participant

    Thanks in advance for help with this!

    #956519
    George
    Participant

    Hey Jeff!

    The back button and such are indeed a bit tricky with these export links, but you should be able to at least help improve that functionality as you describe here by heading to /lib/tribe-ical.class.php in your Events Calendar plugin files – the core, free version, not the PRO add-on or any other add-on.

    Once here, head to around line 69 or so and look for a function single_event_links() – simply add target=”_blank” here, and save the file, and it should work well.

    One important note: since these are changes to the core plugin files, you will lose these changes after the next auto-update – no worries though, the function is in the same place, with nothing new except the name of the file being simply /lib/iCal.php instead of /lib/tribe-ical.class.php. Just add the changes back and re-save the file, and you should be good to go. (You can even bookmark this support topic for reference or something).

    Let us know if this helps!
    George

    #956757
    Jeff
    Participant

    Thanks George, could not get it to work…

    Line 69, in file indicated: public static function single_event_links() {

    Where do I place the: target=”_blank”?

    When I put it in like this: public static function single_event_links() target=”_blank” {
    I get an error indicator on both line # 69 and 76 (get a red box around them) in Dreamweaver, and the Google and iCal export buttons still open in the same browser tab.

    Suggestions?

    #957658
    George
    Participant

    Hey Jeff,

    An example for this customization would be what I’ve done in this screenshot – look in the line of the second echo() statement → https://cloudup.com/cIrDTEd9KVK

    That works well for me, and there’s no need to add that to the iCal export button since that just opens a file for download – although this admittedly may just be how my browsers behave, and if yours are different and you do want target=”_blank” in the iCal links, using the same idea as in the above screenshot should work fine too.

    If you make your code exactly the same as I have in the above screenshot, and are certain that you’ve uploaded the new version of this file to your site so that it’s used instead of the original, and you still have issues, then from there it would unfortunately seem that something specific to your site is preventing that functionality from working.

    Let us know what you find!

    #957821
    Jeff
    Participant

    Added the code as shown in your screen shot, and it now opens gcal in a new tab but.. that tab indicates a Google “invalid request”

    Here is the link to one of our events http://abicyclebuiltfortwobillion.com/event/ventura-mud/

    #958109
    George
    Participant

    Hey Jeff,

    I added the customization on my site and do not get the invalid request error, and further wen to your site and temporarily remove the target=”_blank” markup in your link, and tried the link again and still get the Invalid Request error.

    Can you confirm this behavior? If you do nothing else but remove the target=”_blank” customization, do the gCal links work again? Or does the invalid request issue persist?

    If the issue does persist, then I’d recommend first adding back the target=”_blank” customization, and then proceeding with some debugging steps:

    1. Deactivate Jetpack on your site and see if anything improves.
    2. If not, proceed with deactivating other plugins one at a time, checking on the issue one at a time.
    3. If even deactivating all other plugins does not help, as in steps 1 and 2 here, then proceed with activating a default theme like Twenty Twelve and testing this again.

    Thanks for your patience Jeff!

    #984083
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Google Calendar export in new tab’ is closed to new replies.