We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14050
    • 788 Posts
    That is good to hear. About repeating every 3 days. Just go to "Repeats->Daily->Repeat Every->3 days."
      Jesse R.
      Consider trying something new and extraordinary.
      Illinois Wine

      Have you considered donating to MODx lately?
      Donate now. Every contribution helps.
      • 3232
      • 380 Posts
      Just wanted to say thanks for this great snippet again.

      Although it is working properly I noticed in MODx system events log that every time the snippet is called it outputs a few errors actually it the same error, multiple times.

      Error
      
      Event Id: 	1 	Source: 	googleEvents - Snippet
      
      Date: 	28-Feb-2007 09:31 AM 	User: 	
      
      Called with empty time parameter


      Like I said it is functioning properly, the debug menu seems fine it’s just clogging up the logs.
        • 14050
        • 788 Posts
        Thanks for bringing that to my attention. I’ll take a look at it and see what I can come up with.

          Jesse R.
          Consider trying something new and extraordinary.
          Illinois Wine

          Have you considered donating to MODx lately?
          Donate now. Every contribution helps.
          • 14050
          • 788 Posts
          It appears that this message is generated by the strtotime() function when it is passed an empty string. I just tried a test version where I use conditionals to check that every string being passed to strtotime() was not empty, and I am still generating the warnings. From php.net it looks like this is only a problem in PHP4, as PHP5 will just return the current date stamp if it gets an empty string. Anyone with better coding skills care to take a look at this and tell me the error of my ways? grin
            Jesse R.
            Consider trying something new and extraordinary.
            Illinois Wine

            Have you considered donating to MODx lately?
            Donate now. Every contribution helps.
            • 8619
            • 229 Posts
            Ok, doing some clean up work on my formatting and it looks great!

            One question however, I am using recurring events for our shift scheduling. They are scheduled every third day and I have it formatted in the Google Calendar so far. However, it is not showing up in the MODx GoogleEvents. Only today is showing up.

            Here is my debug mode output:

            Debug mode is on.

            Getting XML feed

            Description to be parsed:
            Recurring Event
            First start: 2007-03-03 EST
            Duration: 86400
            Where: A shift - on duty
            Event Status: confirmed
            Event Description: Lt. Webster, Lt. Jones, FFM Adams, FFE Maher, FFE Weaver, FFE Schwanenberger

            Atempting to parse the following date:

            Parsed Date:
            Starting Day: Thursday, March 1st, 2007
            Starting Time:
            Endinging Day:
            Ending Time: :
            Time Greater Than 0? 1172725200

            This is what I think the "Where" string should be:
            A shift - on duty

            Description to be parsed:
            Recurring Event
            First start: 2007-03-02 EST
            Duration: 86400
            Where: C shift - on duty
            Event Status: confirmed
            Event Description: Lt. Fannin, Lt. Gruelle, FFM Maselli, FFE Coplen, FFE Ramsey

            Atempting to parse the following date:

            Parsed Date:
            Starting Day: Thursday, March 1st, 2007
            Starting Time:
            Endinging Day:
            Ending Time: :
            Time Greater Than 0? 1172725200

            This is what I think the "Where" string should be:
            C shift - on duty

            Description to be parsed:
            Recurring Event
            First start: 2007-03-01 EST
            Duration: 86400
            Where: B shift - on duty
            Event Status: confirmed
            Event Description: Lt. Conley, Lt. Mathis, FFM Anderson, FFM Slaughter, FFE Schneider, FFE Russo

            Atempting to parse the following date:

            Parsed Date:
            Starting Day: Thursday, March 1st, 2007
            Starting Time:
            Endinging Day:
            Ending Time: :
            Time Greater Than 0? 1172725200

            This is what I think the "Where" string should be:
            B shift - on duty

            Description to be parsed:
            When: Wed Feb 28, 2007 7am to Thu Mar 1, 2007 7am  EST

            Where: On duty
            Event Status: confirmed
            Event Description: Webster, Jones, Adams, Maher, Weaver, Schwanenberger, Brett H. 0830 - 1630, Hollowell 7p, Wolf 24

            Atempting to parse the following date:
            Wed Feb 28, 2007 7am to Thu Mar 1, 2007 7am

            Parsed Date:
            Starting Day: Wednesday, February 28th, 2007
            Starting Time: 7:00am
            Endinging Day: Thursday, March 1st, 2007
            Ending Time: 7:00am:
            Time Greater Than 0? 1172638800

            This is what I think the "Where" string should be:
            On duty

            It is showing all three recurring events as being scheduled for today?! Any ideas what to try to fix this? It is almost like it is pulling the ’event created on’ date instead of the ’event scheduled on’ date (or whatever language the snippet uses to detect that).

            Here is my snippet calls:

            To display the calendar: [!GoogleEvents? &debug=`1` &email=`[email protected]` &outputType=`calendar` &calendarType=`wide`!]

            To display the list: [!GoogleEvents? &email=`[email protected]` &outputType=`list` &tplFirstRow=`GEfirstrow`&tplEvenRow=`GEevenrow`&tplOddRow=`GEoddrow`&tplLastRow=`GElastrow`!]

            Thanks for any advice or fixes in advance!
              • 14050
              • 788 Posts
              Unfortunately the snippet doesn’t support recurring events.  I haven’t exactly figured out a way to include support either, so I can’t give you an ETA on when that feature might be implemented.  The problem is from the fact that I can’t find the interval of the recurring event in the XML feed (i.e. every third day in your example).  If any of the coders out there want to lend a hand, I could use some help in this area.  An unobtrusive javascript event calendar for some ajaxy goodness would be nice too, if anyone can find one.
                Jesse R.
                Consider trying something new and extraordinary.
                Illinois Wine

                Have you considered donating to MODx lately?
                Donate now. Every contribution helps.
                • 8619
                • 229 Posts
                Ok, thanks for the quick reply!

                I am seeing, after going to the simplepie feed test, that it is showing the events with the ’First Start’ date as the correct date that the event is on. However, the parsing date is showing as all today (march 1). Not sure if that helps or not. Is that something with Simple Pie that would need to be corrected/modified, or with the snippet?

                Next question: I noticed in the documentation the css declarations of:

                $cssEventContent and $cssEvent where you say that multiple classes can be generated. I’m not sure if I understand this correctly or not, so here is my scenario. I would like to have it style our ’Staffing’ and ’Training’ differently. In other words, can ’Training’ events be styled a certain way in a certain color, lets say, and then have ’Staffing’ events styled and colored another way? Is that what this is for?

                Thanks!
                  • 14050
                  • 788 Posts
                  To be honest, I am not sure. grin I will have to look. The documentation you are talking about is related to the ActiveCalendar class, which was not authored by me.
                    Jesse R.
                    Consider trying something new and extraordinary.
                    Illinois Wine

                    Have you considered donating to MODx lately?
                    Donate now. Every contribution helps.
                    • 8619
                    • 229 Posts
                    Ok, thanks! I will play around with that and see what it does.

                    As for the feed with recurring events, I am trying to figure it out also. When you parse the date in the snippet, is it pulling data for the Starting Day (which in recurring events I assume is the created on day) or is it pulling for the First Start day (which is what the recurring event date actually is)?

                    Where would I find it in the snippet and other files for this?

                    Thanks!
                      • 14050
                      • 788 Posts
                      To answer your first question. It is not a SimplePie thing, but a Google thing. They don’t provide the interval in the raw XML feed, to my knowledge. So although I could parse the "First Start," it is worthless if I don’t have an interval to add to that date.

                      Secondly, the feature you want for styling "Staffing" and "Training" differently could be accomplished with some extra coding. I am open to what the best way of doing this would be. Somehow you would have to pass the information of the class for CSS styling for each event. I could add a parameter that would allow you to denote a separater character in your event description that I could pull out and use as the class. For example.

                      Event 1:

                      Description: Blah blah blah blah..............**Training

                      Event 2:

                      Description: Blah blah blah blah..............**Staffing

                      Then when I parse it, I can set the css class for Event 1 as Training and Event 2 as Staffing so you could style it as you wish. Of course the [+description+] placeholder wouldn’t return the content after the ’**,’ but if they clinked the link to that event, it would show up there because that resides on Google’s servers.
                        Jesse R.
                        Consider trying something new and extraordinary.
                        Illinois Wine

                        Have you considered donating to MODx lately?
                        Donate now. Every contribution helps.