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

    just coded my first snippet - I would appreciate any feedback very much.

    It’s a snippet for MODx to build a schedule out of google calendar events, grouped by same named events

    * Inspired by Jesse R. snippet GoogleEvents
    * Uses simplepie as interface to google

    You can see an example on
    http://bischof.homelinux.net/modx/index.php?id=101


    The snippet does not do a calendar like GoogleEvents or other calendar tools, it instead shows the whole week (days in colums) and events with the same title in the same row, with their title in the first column.

    This can be useful i.e. for a sport school or any organisation offering different courses at different weekdays/times, for example lessons for beginners, intermediates, advanced or language lessons for different languages on different skill levels.

    I needed it for a Karate school, and thought it might be useful for others as well.

    There’s a readme.txt included which explains everything in detail (hopefully), but to get it running simply unpack everything to assets/snippets/GoogleSchedule, copy the content of GoogleSchedule.snippet.php to a new snippet called GoogleSchedule and call it like:

    [!GoogleSchedule?outputType=`eventTable`&doSort=`true`&firstDay=`1`&maxEvents=`50`&lastEvent=`7`&email=`[email protected]`&order=`a`&timeFormat=`H:i`!]

    (don’t forget to change the email adress to one you have a shared calendar on google for).

    Have fun!

    Cheers
    Frisco
      • 25547
      • 61 Posts
      Nice work, will try it out later grin