Home › Forums › Calendar Products › Events Calendar PRO › Leading spaces in iCal
- This topic has 18 replies, 5 voices, and was last updated 13 years, 10 months ago by
Rob.
-
AuthorPosts
-
May 7, 2012 at 12:02 pm #18778
Steven
ParticipantI can’t get the .ics file to work because there are two leading spaces or line feeds. It will open fine in Outlook because it ignores that whitespace, but in iCal it says the format is bad.
I’ve even edited the PHP file and there’s still these leading spaces. Does anyone know why this is happening and how I can fix it?
UPDATE: Here’s an example of an iCal download with the leading spaces/line feeds:
http://pastebin.com/aFmz0EigThanks in advance for the help!
-JDMay 7, 2012 at 1:58 pm #18810Jonah
ParticipantHi Steven,
Sorry to hear about this. I’m not sure why this is happening – do you have an example I can look at?
May 7, 2012 at 3:30 pm #18820Andy Fragen
ModeratorSteven,
What program/app created the ics file? Also, as Johah said and example would help a lot. What PHP file did you edit?
May 7, 2012 at 4:44 pm #18828Steven
Participant[code]
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Neumos//NONSGML v1.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Neumos
X-ORIGINAL-URL:http://www.neumos.com
X-WR-CALDESC:Events for Neumos
BEGIN:VEVENT
DTSTART;VALUE=DATE-TIME:20120524T200000
DTEND;VALUE=DATE-TIME:20120524T200059
DTSTAMP:20120506T000233
CREATED:20120403T180452
LAST-MODIFIED:20120502T184316
UID:476-1337889600-1337889659@http://www.neumos.com
SUMMARY:The Twelves with Victor Menegaux + James Ervin + Hanibal
DESCRIPTION:Neumos and Trashed Present: The Twelves Thursday May 24th\, 2012 $12 ADV Doors at 8pm 21+ Website Advance Tickets on sale at Moe Bar + etix.com From Rio de Janeiro\, Brasil\, “The Twelves” were formed by the duo João Miguel and Luciano Oliveira back in 2005. The name came from the strange coincidence of their birth dates: twelve of july of 1980. The breakthrough for The Twelves came in July of 2007 when they remixed the track “Boyz” from M.I.A’s sophomore album\, Kala. The reworked track with an added club feel resulted in one of the most talked about remixes of 2007. The blog coverage surrounding the remix was extensive and eventually the track started to pop up in sets from high profile djs around the world\, including Kissy Sell Out\, who played it on BBC’s “In New Djs We Trust” series. The duo followed “Boyz” with equally well received remixes for Asobi Seksu and Erlend Oye\, both of which were featured on a number of blogs and music related sites. This stream of good tracks soon caught the attention of a number of labels\, including Modular Records (home of Cut Copy\, Klaxons and others) who comissioned a “Twelves” remix of the song “Get Lucky” by New Young Pony club. The resulting remix was released alongside reworkings from household names like MSTRKRFT and Who Made Who\, and received excellent reviews. Press coverage in Brazil soon started to pick up\, with interviews on Newspapers and magazines. The coverage led to appearances in festivals and concerts alongside names like Diplo\, LCD Soundsystem\, She Wants Revenge\, Van She and Phoenix. The sound of the duo brings influences from many genres. Among the most influential to their sound are Daft Punk\, Justice\, Röyksopp\, Vitalic\, Simian Mobile Disco\, MSTRKRFT\, Clor\, Cut Copy and Goldfrapp. Their live show is a unique blend of live keyboards\, drum machines\, mash-ups and remixing on the fly. Always trying to improvise as much as possible.
LOCATION:925 E. Pike St., Seattle, WA, 98122, United States
URL:http://www.neumos.com/?tribe_events=the-twelves
END:VEVENT
END:VCALENDAR
[/code]May 7, 2012 at 4:47 pm #18829Steven
ParticipantYou can see the actual copy of the code without the forum formatting at PASTEBIN:
http://pastebin.com/aFmz0EigMay 7, 2012 at 6:23 pm #18835Andy Fragen
ModeratorHow is this ics file created?
May 8, 2012 at 8:27 am #18851Andy Fragen
ModeratorSorry Steven, my bad. I see what’s creating the file. Just to confirm, you are using v2.0.6? What changes to the PHP did you make? I might be simpler to fix this problem if we all know your using a non-modified events-calendar-pro.php file.
May 8, 2012 at 11:26 am #18864Steven
ParticipantHello @Andy, et al. (My name is JD, Steven is my client) — We are using 2.0.6. I’ve tried 2.0.3 as well. The changes that I made to the code in the iCalFeed() function in “events-calendar-pro.php” was simply a trim() on the $content variable before it’s echoed back to the caller. It didn’t trim the whitespace because I think it’s happening elsewhere. I have a few client sites that this works on, just not this one: http://neumos.com — you can see what I’m talking about here: http://neumos.com/?post_type=tribe_events&eventDisplay=month
I’ve tried to get the iCal export to work with my edits and from a fresh install — but those leading spaces/line feeds cause it not to open in iCal.
-JDMay 8, 2012 at 1:01 pm #18877Andy 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.
May 9, 2012 at 8:49 am #18923Andy Fragen
ModeratorJD, I have some time to look at your code today if you could post the modified iCalFeed function to pastebin or github.
May 9, 2012 at 8:55 am #18924Andy Fragen
ModeratorJD, what is the purpose of your PHP mods? What I mean is what precisely are you wanting to do?
May 9, 2012 at 11:05 am #18944Andy 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.
May 9, 2012 at 2:37 pm #18960Andy 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?
May 10, 2012 at 8:35 am #18984Andy 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,
AndyMay 10, 2012 at 8:39 am #18985Andy Fragen
ModeratorOops, copied wrong URL.
-
AuthorPosts
- The topic ‘Leading spaces in iCal’ is closed to new replies.
