My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1300: How can someone add two gcal events Google calendar feeds
3 people starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Aug 2013


Sign in to add a comment
 
Reported by johnnys...@gmail.com, Feb 17, 2012
i have the gcal event working well.
but i want to add the holiday feed to and i cant get it to work for beans

can someone give me an example please or tell me where to add it to my code below please. ive tried multi way to do it from addEventSource to the eventSources here http://arshaw.com/fullcalendar/docs/event_data/eventSources/
nothing seams to work, maybe i have it wrong. any help would be great.

i am using fullcalendar v1.5.3

heres my script

        $(document).ready(function() {



                $('#calendar').fullCalendar({
                        header: {
                                left: 'prev, today',
                                center: 'title',
                                right: 'next'
                        },
                        // US Holidays
                        //events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/admin@familiesinchrist.org/public/basic'),
                        //America/New_York
                        timeFormat: "h(:mm) tt",
                        //timeFormat: "g:ix-{g:ix}",
                                //2009-11-05T13:15:30Z
                                //output is 2010-01-08 16:12:12
                        //renderEvent: function(event, element) {
                        //      element.attr('title', event.description);
                        //},
                        events: $.fullCalendar.gcalFeed(
                        'https://www.google.com/calendar/feeds/lcwchurch@gmail.com/public/basic',
                        {
			                className: 'gcal-event',           // an option!
			                currentTimezone: 'America/New_York' // an option!
			}
                       ),
                        //className: 'gcal-event',
                        //formatDate(event.start, 'DD, MM dd, y h:mm a'),
			// US Holidays
			//events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic'),
			

                        /* works really well offset on tip*/
                        //$events .= "tooltip:'<FONT COLOR=#000><strong>".$row_EventStr['event_title']."<\/strong><\/font><br/><FONT SIZE=-2 COLOR=#008000>Date: ".$date_fix."<\/FONT><hr style=\"width:100%;text-align:left;margin-left:0\">".str_replace("\r\n","<br>",$row_EventStr['event_body'])."'";

                        eventMouseover: function(e,m) {
                                //console.log(e);
                                var tPosX = m.pageX + 5 ;
                                var tPosY = m.pageY - 50 ;
                                $('#tooltip').css({top: tPosY, left: tPosX, display: 'block'});
                                var tt = '';
                                //e.location
                                if (!e.location) {e.location ='N/A';};
                                //$.fullCalendar.formatDate(e.start, 'DD, MM dd, y h:mm a');
                                //var d = $.datepicker.parseDate("DD, MM dd, yy",  e.start);
				//var datestrInNewFormat = $.datepicker.formatDate( "mm/dd/yy", d);
                                tt += '<FONT COLOR=#000><strong>'+e.title+'<\/strong><\/font><br/><FONT SIZE=-2 COLOR=#008000><STRONG>Start</STRONG>: '+$.fullCalendar.formatDate(e.start, 'dddd, MMMM dd, yyyy h:mm tt')+' <\/FONT><br><FONT SIZE=-2 COLOR=#800000><STRONG>End</STRONG>: &nbsp;&nbsp;'+$.fullCalendar.formatDate(e.end, 'dddd, MMMM dd, yyyy h:mm tt')+'<\/FONT><BR><FONT SIZE=-2><STRONG>Location</STRONG>: '+e.location+'</FONT><hr style=\"width:100%;text-align:left;margin-left:0\"><br>';
                                tt += e.description+'<br />';
                                $('#tooltip').html(tt);
                                $('#tooltip').fadeIn("slow");
                        },
                        eventMouseout: function() {
                                $('#tooltip').css({display: 'none'});
                        },

                        eventClick: function(calEvent, jsEvent, view) {

                                //alert('Event: ' + calEvent.title);
                                //alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
                                //alert('View: ' + view.name);
                                //alert('EVENT CLICK ' + calEvent.tooltip);
                                //bgiframe: true,
                                //autoOpen: true,//false,
                                //height: 320,
                                //modal: true,
                                // change the border color just for fun
                                //$(this).css('border-color', 'red');
                                 $(this).addClass('thickbox');
                                 if (calEvent.url) {
                                        window.open(calEvent.url, calEvent.title,'class=thickbox,width=525,height=490,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
                                        return false;
                                }
                        },
                        /*
                        jQuery("#dialog").dialog({
                              bgiframe: true, autoOpen: false, height: 100, modal: true
                            });
                        */
                        /* works
                        eventClick: function(event) {
                                // opens events in a popup window
                                window.open(event.url, 'thickbox', 'width=525,height=490,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
                                return false;
                        },
                        */
                        loading: function(bool) {
                                if (bool) {
                                        $('#loading').show();
                                }else{
                                        $('#loading').hide();
                                }
                        }


                });
        });


Feb 17, 2012
#1 johnnys...@gmail.com
i figured it out between the last two brackets
                });
        });

do
                });
                       
            $('#calendar').fullCalendar( 'addEventSource', 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic')
        });

so its still inside your

        $(document).ready(function() {

and it works
Aug 15, 2013
Project Member #2 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Invalid
Sign in to add a comment

Powered by Google Project Hosting