tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/10358-external-sources-for-github-calendarCascade CMS: Discussion 2018-10-18T20:37:03Ztag:help-archives.hannonhill.com,2010-02-09:Comment/310148842014-01-09T18:53:44Z2014-01-09T18:53:44ZExternal sources for github Calendar<div><p>Hi Lauren,</p>
<p>It looks as though the Google Calendar plugin for the Full
Calendar is not properly registering the feed as a Google Calendar
feed, which seems to be causing all of the added events to be
displayed as a full day event. I went ahead and logged this as an
issue on the <a href=
"https://github.com/hannonhill/Calendar/issues/25">Github Calendar
project</a></p>
<p>The good news is I believe I was able to track down a workaround
for this. Please find my instructions below:</p>
<ul>
<li>Edit the <code>/_cascade/formats/full calendar script</code>
Velocity Format</li>
<li>Locate the following lines:
<pre>
<code>#if ($type == "Google Calendar")
$("#calendar").fullCalendar("addEventSource", {
url: "${url}",
className: calendar._getCategoryCSSClass("${sourceCategory}")
});</code>
</pre></li>
<li>Change them to:
<pre>
<code>#if ($type == "Google Calendar")
$("#calendar").fullCalendar("addEventSource", {
url: "${url}",
dataType: "gcal",
className: calendar._getCategoryCSSClass("${sourceCategory}")
});</code>
</pre></li>
<li>Save the Format and check to see if your events are displaying
correctly.</li>
</ul>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/310148842014-01-09T23:21:44Z2014-01-09T23:21:44ZExternal sources for github Calendar<div><p>Ryan,</p>
<p>I made the edit below and it still looks like the Google
calendar events are still showing as all day events.</p></div>lauren.frasertag:help-archives.hannonhill.com,2010-02-09:Comment/310148842014-01-10T13:51:09Z2014-01-10T13:51:09ZExternal sources for github Calendar<div><p>Ah, my apologies, I just noticed the <strong>dataType</strong>
property wasn't what was fixing things, it was an extra class I was
providing in the <strong>className</strong> property when I was
testing. This works, but would also affect allDay events.</p>
<p>Let me look into this a bit more and get back to you as soon as
I have additional information and/or next steps.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/310148842014-01-10T17:02:01Z2014-01-10T17:02:01ZExternal sources for github Calendar<div><p>Great. Thanks for letting me know. The only real all-day events
we have are the holidays.</p>
<p>Though this fix doesn’t seem to be working the same way in
our instance. I changed the format and everything from Google
Calendar is still displaying as an all day event.</p>
<p>Thanks,</p>
<p>Lauren</p></div>lauren.frasertag:help-archives.hannonhill.com,2010-02-09:Comment/310148842014-01-10T19:46:53Z2014-01-10T19:46:53ZExternal sources for github Calendar<div><p>Hi Lauren,</p>
<p>I believe I narrowed down the issue to being related to the way
we're styling the non-all day events. We actually manually append a
class to the event if it is not all day to achieve that inverse
look.</p>
<p>That said, at the moment the only way I can think of to address
this would be to modify the Google Calendar plugin. Please see my
instructions below:</p>
<ul>
<li>Edit <code>_files/js/vendor/gcal.js</code></li>
<li>Locate line 85:
<pre>
<code>description: entry['content']['$t']</code>
</pre></li>
<li>Replace this line with the following two lines:
<pre>
<code>description: entry['content']['$t'],
className: allDay === false ? sourceOptions.className + " fixedtime" : ""</code>
</pre></li>
</ul>
<p>This should add our custom class to non-add day events.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/310148842014-01-15T22:47:14Z2014-01-15T22:47:14ZExternal sources for github Calendar<div><p>Worked great. Thanks for the fix.</p></div>lauren.fraser