We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14050
    • 788 Posts
    Sometimes I am retarded when I code. When I did the HTML entity cleanup, I only applied it to the description. I just updated it again and applied it to the raw text so no matter what field you place those in, it will output properly and XHTML Strict. Check the first post for 1.3.3 and you just have to paste in the GoogleEvents.php file.
      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
      Thanks for the great snippet! I am using it and love it (so do the bosses)!

      One question is how would I get the calender to appear above the lists when display is set for both?

      Right now, the list appears above my calender, and I’m not sure where or how to modify the code to flip it.

      Thanks!
        • 14050
        • 788 Posts
        If you don’t want to edit any code, you should be able to just use to calls to the snippet like so:

        [!GoogleEvents?email=`[email protected]` &outputType=`calendar`!]
        
        [!GoogleEvents?email=`[email protected]` &outputType=`list`!] 


        I will look into possibly allowing one call with a placeholder for the calendar, as this would be more efficient.
          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
          When I try the two snippet calls, the calender portion disappears, and the list stays in the same place. Not sure where else to look, and your previous post cut off.

          Thanks for the help!
            • 8619
            • 229 Posts
            Never Mind! Stupid cold fingers typed in calender, not calendar! It is working just fine!

            Thanks a ton!

            ....now to find some cold weather typing gloves! grin
              • 30128
              • 78 Posts
              Quote from: jesster444 at Nov 02, 2006, 07:56 PM

              It supports using CURL by default, and if your server doesn’t support it, it will fall back to fopen. Redundancy, sweet.

              Hm.. the instructions tell me to use the simplePie check though, and that the script will NOT work if that test fails. As a matter of fact it does fail on my server, complaining about CURL. It’s a fact too that I can’t get the script to work; if I use this snippet call
              [!GoogleEvents?dayNameSize=`full`&outputType=`calendar`&calendarType=`wide`&email=`[email protected]`!]
              then here’s the error I get when I go to a page with that call:
              « MODx Parse Error »MODx encountered the following error while attempting to parse the requested resource:
              « PHP Parse Error »
               
              PHP error debug
                Error: 	sort() expects parameter 1 to be array, null given	 
                Error type/ Nr.: 	Warning - 2	 
                File: 	/isp_server/some/path/mywebsite/manager/includes/document.parser.class.inc.php(748) : eval()'d code	 
                Line: 	240


              So which is right? Do I need CURL, or does the script actually gracefully fall back? I picked up version 1.3.4 from somewhere. And I’m still confused as to the difference between Google Events and GoogleEvents smiley

              System:
              MODx v0.9.5, GoogleEvents v1.3.4, PHP v5.2.1, Apache v1.3.37, only_one_set_of_php_start_tags_in_snippet v1.0, fully_shared_google_calendar v1.0

              Tjalve
                • 14050
                • 788 Posts
                GoogleEvents and Google Events was just a typo. Version 1.3.4 was my version made more efficient by Kyle. It is definitely the version to use. Unfortunately, it is possible that your server does not support CURL, nor does it support FOPEN for HTTP (What it falls back to). In that case, this snippet would not work for you.
                  Jesse R.
                  Consider trying something new and extraordinary.
                  Illinois Wine

                  Have you considered donating to MODx lately?
                  Donate now. Every contribution helps.
                  • 30128
                  • 78 Posts
                  Here’s the result of the test:


                  [table]
                  [tr][td]Test[/td] [td] Should Be[/td][td] What You Have[/td][/tr]
                  [tr][td]PHP[/td] [td] 4.3.2–4.4.x or 5.0.3–5.1.x[/td][td] 5.2.1[/td][/tr]
                  [tr][td]XML[/td][td] Enabled[/td] [td] Enabled[/td][/tr]
                  [tr][td]PCRE[/td][td] Enabled[/td][td] Enabled[/td][/tr]
                  [tr][td]cURL[/td][td] 7.10.5[/td][td] [/td][/tr][/table]
                  Fatal error: Call to undefined function curl_version() in /<snip>/sp_compatibility_test.php on line 20

                  So, it is only cURL that fails. Also, other scripts like FeedX works fine. FeedX both fetches remote datastreams and use the filesystem. What more does GoogleEvents need?

                  By changing the calendar (making it not shared, making it depend on other calendars not shared etc.), I triggered other errors. When it was correct, the error I posted earlier came.
                    • 14050
                    • 788 Posts
                    I know Kyle was working on a version that used FeedX, but I don’t know where that is in the pipeline. I know if you look at the FeedX support thread, I do provide a solution for using FeedX to output a simple list of your events from the Google Calendar.
                      Jesse R.
                      Consider trying something new and extraordinary.
                      Illinois Wine

                      Have you considered donating to MODx lately?
                      Donate now. Every contribution helps.
                      • 30128
                      • 78 Posts
                      Ï don’t really have any need to combine FeedX and GoogleEvents. I’m just not sure that it is the capabilities of my server system that is the problem here, and thus wanted to give you some more feedback in hope that you could pinpoint the error.