We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    Jesse your a star.
    v3 snippet text cured the start and end time issues.
    Thanks again
    David
      • 14050
      • 788 Posts
      Glad you got it working. And Kyle’s work is likely what fixed your issues :-D
        Jesse R.
        Consider trying something new and extraordinary.
        Illinois Wine

        Have you considered donating to MODx lately?
        Donate now. Every contribution helps.
        • 10273
        • 1 Posts
        Hi,

        I’ve finally managed to get this snippet working, although only in ’list’ mode. When I change the parameter within the snippet call to ’calendar’ I get the following error message,

        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « PHP Parse Error »

        PHP error debug
        Error: mktime() expects parameter 5 to be long, string given
        Error type/ Nr.: Warning - 2
        File: /usr1/apache/virtual/../htdocs/../assets/snippets/GoogleEvents/source/activecalendar.php
        Line: 837
        Line 837 source: else return mktime($hr,$min,$sec,$month,$day,$year);

        Parser timing
        MySQL: 0.0134 s (36 Requests)
        PHP: 0.2412 s
        Total: 0.2546 s

        Anybody know why this is happening, and how to fix it?

        Thanks for the help.
          • 6747
          • 3 Posts
          I’m managing multiple calendars in google so that I can categorize my events (classes, talks, workshops), and display a list of the appropriate type of events individually.

          The problem is that I also want to be able to display a "master calendar" that integrates the events from these multiple calendars into a single calendar view. I want to do this without having to manage a "master calendar" that I add events to from the other calendars after I create the events. Is there any way to allow multiple xml feed parameters (email addresses) to do this? I realize that I can post one after another with multiple snippet calls, but this is not what I’m after. I’d like to be able to display a calendar view with the events from multiple calendars all integrated into one.

          Thanks for the great snippet,
          Dave
            • 11614
            • 27 Posts
            Hi!

            I have a problem with my google events modul. I make a new event in the calendar for a specific date (i.e. 15.11.), but on the site it shows the current date for every event (27.10. for today). If I click to an event, in the google calendar it shows the appropriate date.
            Any idea?
              • 14050
              • 788 Posts
              Could you please tell me the version you are using, the call you are using, and a link to the site with the output, and also paste the information you get when you add the parameter "&debug=`1`"
                Jesse R.
                Consider trying something new and extraordinary.
                Illinois Wine

                Have you considered donating to MODx lately?
                Donate now. Every contribution helps.
                • 11614
                • 27 Posts
                - The link to the page: http://www.bartrender.hu/programok.html.
                - The version is 1.3.4.
                - The call:
                [!GoogleEvents?dayNameSize=`full` &outputType=`list` &calendarType=`small` &email=`[email protected]` &tpl=`googleTpl` &lastEvent=`360`!]

                - The googleTpl chunk:
                <a href="[+linkURL+]" target="_blank">[+title+]</a></h2>
                <p>mikor: [+startDate+] idopont: [+startTime+]<br />
                Info: [+content+]</p>

                - The debug info (never mind the encoding):
                Description to be parsed:
                Mikor: 2007.10.29.<br> <br>Hol: Club Sensation-ban: Budapest XI. kerßlet FehÊrvåri út 87. <br>EsemÊny ållapota: meger�sítve <br>EsemÊny leíråsa: Az el�dÜnt� Ês a dÜnt� 2007. október 29-Ên kerßl megrendezÊsre a Club Sensation-ban: Budapest XI. kerßlet FehÊrvåri út 87. Az el�dÜnt� kezdÊsi id�pontja: 2007. október 29. 10.00 óra,ÊrkezÊs 9:00 óra. A dÜnt� id�pontja kezdÊsi id�pontja: 2007. október 29. 21.00 óra, ÊrkezÊs 20.00 óra.
                
                Atempting to parse the following date:
                
                Parsed Date:
                Starting Day: 2007, October 28, Sunday
                Starting Time:
                Ending Day: 2007, October 28, Sunday
                Ending Time:
                Time Greater Than 0? 1193522400
                
                This is what I think the "Where" string should be:
                
                Description to be parsed:
                Mikor: 2007.12.31.<br> <br>Hol: Royal Vip Club. <br>EsemÊny ållapota: meger�sítve <br>EsemÊny leíråsa: Rendez� cÊg: Magyar Bårmixer Unió
                
                Atempting to parse the following date:
                
                Parsed Date:
                Starting Day: 2007, October 28, Sunday
                Starting Time:
                Ending Day: 2007, October 28, Sunday
                Ending Time:
                Time Greater Than 0? 1193522400
                
                This is what I think the "Where" string should be:
                
                Description to be parsed:
                Mikor: 2007.12.30.<br> <br>Hol: Stex Håz. József KÜrút. 55-57 <br>EsemÊny ållapota: meger�sítve <br>EsemÊny leíråsa: Rendez� cÊg: Magyar Bårmixer Unió
                
                Atempting to parse the following date:
                
                Parsed Date:
                Starting Day: 2007, October 28, Sunday
                Starting Time:
                Ending Day: 2007, October 28, Sunday
                Ending Time:
                Time Greater Than 0? 1193522400
                
                This is what I think the "Where" string should be:
                
                Description to be parsed:
                Mikor: 2007.11.30.<br> <br>Hol: Stex Håz. József KÜrút. 55-57 <br>EsemÊny ållapota: meger�sítve <br>EsemÊny leíråsa: Magyar Bårmixer Unió
                
                Atempting to parse the following date:
                
                Parsed Date:
                Starting Day: 2007, October 28, Sunday
                Starting Time:
                Ending Day: 2007, October 28, Sunday
                Ending Time:
                Time Greater Than 0? 1193522400
                
                This is what I think the "Where" string should be:
                
                Description to be parsed:
                Mikor: 2007.10.31.<br> <br>EsemÊny ållapota: meger�sítve <br>EsemÊny leíråsa: Rendez� cÊg: Magyar Bårmixer Unió
                
                Atempting to parse the following date:
                
                Parsed Date:
                Starting Day: 2007, October 28, Sunday
                Starting Time:
                Ending Day: 2007, October 28, Sunday
                Ending Time:
                Time Greater Than 0? 1193522400
                
                This is what I think the "Where" string should be:


                Is there any hope for me? smiley
                  • 11614
                  • 27 Posts
                  Hi Jess,
                  Any progress with my problem?
                    • 14050
                    • 788 Posts
                    The snippet is not parsing the date correctly because it is looking for strings in English to do the parsing logic. If you are just looking to have a list, have you thought about utilizing FeedX? I believe it would work for your site and I could help you figure out how to template it in that thread.

                    Another solution would be to go through the snippet code and replace the English strings with strings appropriate for the language you are using.

                    I have attached an updated version that should allow you to translate this a lot easier. Just change this area in the code to the appropriate strings:

                    //Strings that need to be translated
                    define("WHERE_STRING", "Where:");
                    define("WHEN_STRING", "When:");
                    define("DESCRIPTION_STRING", "Event Description: ");


                    I haven’t tested it, but that should work. Also, in about three weeks, I will have some time to refactor this snippet using the new SimplePie 1.0 and should hopefully solve the problems with recurring events, internationalization, and possibly add the ability to mash multiple calendars together.
                      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
                      I went ahead and switched it over to SimplePie 1.0.1. Try that version and see if it fixes your problems.

                      http://modxcms.com/forums/index.php/topic,11681.msg123978.html#msg123978

                      Moderators...can this thread be locked down? The other thread tracks the most up to date version.
                        Jesse R.
                        Consider trying something new and extraordinary.
                        Illinois Wine

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