Forum Replies Created
-
AuthorPosts
-
May 24, 2012 at 3:12 pm in reply to: Allowing Users to Subscribe to Calendar for Google Calendar, iCAL, Outlook? #19684
Andy Fragen
Moderator@Maxwell, there should be a +Google Calendar link already showing at the bottom of the month view. I’ve added the following to my Events Calendar > Settings > Templates in the after the calendar field.
I’m not sure what will work in Outlook.
May 24, 2012 at 3:03 pm in reply to: iCal Import – How do we get it to add event to an existing calendar in Outlook #19683Andy Fragen
Moderator@Jonah, with the appropriately placed `add_filters` function I could write up a quick hack for the theme’s functions.php file that would survive updates.
Andy Fragen
Moderator@Rob, etc.
Here’s the solution. I’ve tested and it works for me.
https://gist.github.com/2758724
You will need to add a single line to events-calendar-pro.php then add the other code to your theme’s functions.php file.
The fix will truncate your event description to 1000 characters. That works for Google.
Andy Fragen
ModeratorOops, looks like that would only work if you add an ‘apply filters’ in the function googleCalendarLink () or replace
'details' => str_replace( ' ', '+', strip_tags( apply_filters( 'the_content', urlencode( get_the_content() ) ) ) ),
with
'details' => substr(str_replace( ' ', '+', strip_tags( apply_filters( 'the_content', urlencode( get_the_content() ) ) ) ), 0, 100),
More elegant solution might be to populate the $params array as you’ve done in function iCalFeed, add an apply filters after populating the array and change the array item similarly to the code in the gist above. Of course that means changing core files first. ๐
Andy Fragen
Moderator@Rob, take a look at the code I provided https://gist.github.com/2649910 in trying to answer Leading spaces in iCal . It will fix the issue for long event descriptions. It causes the description to truncate at 100 characters. It’s easy to see in the code where to change that. Also, if there is a problem for the event title it would be simple to modify the code to truncate that as well.
If anyone wants to try the code out for themselves just put it in your theme’s function.php file.
Andy Fragen
Moderator@Kevin, I agree with you that your calendar is presenting itself as GMT+0. I am GMT-8 currently. I have subscribed to my own calendar and find the times are spot on in Google calendar.
Two things come to mind.
1. Check to see if you have the correct time zone selected within the Google calendar settings.
2. Check to see if you have the correct time zone selected within WordPress settings.ECP does add the **X-WR-TIMEZONE:America/Los_Angeles** tag to my ics files. It gets this from the WordPress settings. If you have your WP > Settings > General > Timezone set to something like UTC-4, try setting it to a nearby city in the list.
Andy Fragen
Moderator@Rob, something to consider, when I throw Kevin’s ical feed at iCalendar Validator, http://severinghaus.org/projects/icv/ , I get the following error, though not fatal.
Your calendar is using an invalid newline format. Make sure to use \r\n to end lines rather than just \n (RFC 2445 ยง4.1).
Andy Fragen
ModeratorOops, copied wrong URL.
Andy Fragen
ModeratorJD, I did a lot of guessing as to what you might want. I assumed that you wanted to shorten the DESCRIPTION value in the iCal feed. I’ve created a bit of code that you can add to your theme’s function.php file that will truncate the iCal feed DESCRIPTION value to 100 characters. You should use a non-modified version of ECP 2.0.6 or better with this.
git://gist.github.com/2649910.git
If I’m guessing wrong please let me know.
Regards,
AndyAndy Fragen
ModeratorJonah, if your going to write up a post I’ve gotten the plugin uploaded to the WP Plugin Repository.
http://wordpress.org/extend/plugins/the-events-calendar-pro-alarm/
Shane gave me the nudge and thanks to Brent @ http://thereforei.am/2011/04/21/git-to-svn-automated-wordpress-plugin-deployment/ for a simple Git -> SVN deployment script.
Andy Fragen
ModeratorFWIW, I’ve found a way to change any event field created for an ics file, though I still don’t know what changes you want to make to which field and why?
Andy Fragen
ModeratorJD, I’ve been playing around and I think I’ve found a solution to what you want to do, but to be sure I need to know precisely what that is. FWIW, my solution doesn’t change the events-calendar-pro.php file.
Andy Fragen
ModeratorJD, what is the purpose of your PHP mods? What I mean is what precisely are you wanting to do?
Andy Fragen
ModeratorJD, I have some time to look at your code today if you could post the modified iCalFeed function to pastebin or github.
Andy Fragen
ModeratorJD, I see the same leading blanks as you do in your feed and it doesn’t open in iOS calendar. I’m not at a desktop right now. ๐
Can you reinstall a clean version of ECP 2.0.6 and don’t put in your edits. Can you also put up a pastebin of what your edits are, perhaps just your version of function iCalFeed()? Perhaps there’s an edit that isn’t doing what you think it should be doing. I have a clean install of 2.0.6 and I specifically do not see leading blanks.
-
AuthorPosts
