We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19315
    • 84 Posts
    Hi,

    I’m having trouble getting this snippet working. My call is:
    [!GoogleEvents?&email=`[email protected]`!]

    Now, if I have set an incorrect email address, I get "The server appears to be down" in my webpage. However, if I have my correct email address, then I get a PHP parse error page, with "sort() expects parameter 1 to be array, null given" in "manager/includes/document.parser.class.inc.php(748) : eval()’d code". I tried removing the <?php and ?> as has been suggested, but there is no effect. I don’t know if it is expected behaviour - but they then come pack the next time I view the plugin.

    Michal.
      • 19315
      • 84 Posts
      Ok, I’ve messed around with my events, adding/deleting, changing description etc, and now it seems to work. I’ve tried to reproduce the error but I haven’t been able to (sorry). However, I do now have a suggestion. How about having the default template to be valid xhtml, such as
      $defaultTemplate = '<div><p><h3>[+title+]</h3><br />[+startDate+] at [+startTime+]<br />Description: [+description+]</p></div>';

      or similar?

      Michal.

      edit: corrected typo
        • 19315
        • 84 Posts
        Oops, my suggested valid code, is not valid XHTML! Something like
        $defaultTemplate = '<div><h3>[+title+]</h3><p>[+startDate+] at [+startTime+]<br />Description: [+description+]</p></div>';

        I think is.
          • 14050
          • 788 Posts
          I corrected the default template to valid xhtml and hopefully solved the issue with the [+where+] placeholder only working sporadically.

          Check the new version out here:

          http://modxcms.com/forums/index.php/topic,8563.msg60320.html#msg60320
            Jesse R.
            Consider trying something new and extraordinary.
            Illinois Wine

            Have you considered donating to MODx lately?
            Donate now. Every contribution helps.
            • 1774
            • 34 Posts
            I’ve got the exact same error as michalc posted above. any ideas?
              Brandon Booth
              Freelance MODx specialist for hire: site construction, template conversion, snippet customization.
              Lucidgreen.net Websites made simple.
              • 3232
              • 380 Posts
              I seem to get this error when there are no future events... Are there currently any events that have not passed in your calendar yet?
                • 14050
                • 788 Posts
                Quote from: anselm1109 at Jan 10, 2007, 07:24 PM

                I’ve got the exact same error as michalc posted above. any ideas?

                Can you please post your call to GoogleEvents?

                Also, the new version, version 1.3 has a "debug" parameter that will make solving future errors easier. You can check it out, although it is in beta.

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

                  Have you considered donating to MODx lately?
                  Donate now. Every contribution helps.
                  • 1774
                  • 34 Posts
                  I know for a fact that this call works when I put a different email address in. I changed it to "[email protected]" (From an earlier post in this topic) and it works perfectly. (sorry andre!)

                  Maybe it has something to do with google? I just set up my account and made the calendars shared, does it take a while for google to get things working? I do have future events in my calendar so that shouldn’t be a problem unless I’ve done something wrong in google.

                  [!GoogleEvents?dayNameSize=`full`&firstDay=`1`&outputType=`calendar`&tplFirstRow=`GEFirstRow`&calendarType=`wide`&email=`[email protected]`&dateformat=`d.m.Y`&timeformat=`H:i`!]
                    Brandon Booth
                    Freelance MODx specialist for hire: site construction, template conversion, snippet customization.
                    Lucidgreen.net Websites made simple.
                    • 14050
                    • 788 Posts
                    That is interesting. Try sharing your calendar again and make sure that the radio option next to "Share all information on this calendar with everyone" is selected.

                    Right now when I go to your feed address, which would be:

                    "http://www.google.com/calendar/feeds/[email protected]/public/basic?start-min=2007-01-10&start-max=2007-02-09"

                    I am getting no output.

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

                      Have you considered donating to MODx lately?
                      Donate now. Every contribution helps.
                      • 1774
                      • 34 Posts
                      Okay I got it figured out. The "problem" is that all events have to be in the base "google cal" calendar. I had all of my events in another calendar which consequently had a different url.

                      Is there a way to feed the different url to the snippet. This would mean I could keep separate calendars on google and thus have separate calendars on my website. The url for the xml feed of my secondary calendar is

                      http://www.google.com/calendar/feeds/26urrodo8sfvbv9teoepqqd15s%40group.calendar.google.com/public/basic
                        Brandon Booth
                        Freelance MODx specialist for hire: site construction, template conversion, snippet customization.
                        Lucidgreen.net Websites made simple.