We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1343 ☆ A M B ☆
    • 2,213 Posts
    Quote from: ChuckTrukk at Apr 14, 2009, 12:16 PM

    Quote from: AMDbuilder at Apr 13, 2009, 05:46 PM

    Can you display several calendar’s events at once?

    Can you have links to your site in the popups (iCal) for more information?

    1. You can show multiple events at once. Each event for a day is displayed using the eachEvent.tpl file. The calendar loops through each day. If the day has at least one event, it uses the dayWithEvent.tpl template then loops through each event using the eachEvent.tpl template. If there is no event for the day, it use dayNoEvent.tpl as the template.


    I think you misunderstood... If I have say 5 calenders on the gmail site it displays them all on the main calendar. If you use the iframe include you can also have this option. My question is can I have multi calendars displayed at once using this setup?

    AMDbuilder
      Patrick | Server Wrangler
      About Me: Website | Tweets |  MODX Hosting
      • 34017
      • 898 Posts
      Quote from: AMDbuilder at Apr 14, 2009, 04:36 PM

      If I have say 5 calenders on the gmail site it displays them all on the main calendar. My question is can I have multi calendars displayed at once using this setup?

      You couldn’t previously. I updated the code this morning to allow for multiple calendars.
        Chuck the Trukk
        ProWebscape.com :: Nashville-WebDesign.com
        - - - - - - - -
        What are TV's? Here's some info below.
        http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
        http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
        • 7253
        • 97 Posts
        This looks like excellent work! Thanks for adding the multiple calendar support - that’s really handy. Is there a placeholder available for the calendar_name, so that this could be used for class="[+calendar_name+]" type stuff? This would then allow for events from different calendars to be displayed in different colours - which would be nice.

        Thanks!
        Dunc
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          Quote from: ChuckTrukk at Apr 15, 2009, 05:22 AM

          You couldn’t previously. I updated the code this morning to allow for multiple calendars.

          Great! I look forward to some testing time next week. In the mean time I second the above request as merging the calendars is half the battle if they can be merged and color coded that would be outstanding.

          AMDbuilder
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 34017
            • 898 Posts
            Added placeholders for calendar name and email. You can view the changes in the ical example.
              Chuck the Trukk
              ProWebscape.com :: Nashville-WebDesign.com
              - - - - - - - -
              What are TV's? Here's some info below.
              http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
              http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
              • 16892
              • 107 Posts
              Your snippet now requires "$emails" instead of "$email". Could you update your demo pages with the correct info? It took me a minute to realize the change. Thanks!
                • 28033
                • 925 Posts
                Parse error: syntax error, unexpected $end in /home/wynen/public_html/talesunion/manager/includes/document.parser.class.inc.php(769) : eval()’d code on line 4

                Any idea why that pops up when I try calling the script?
                  My Snippets
                  -> PopUpChunk v1.0
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Looking at the Readme file, if you copy/pasted that code in your snippet, it’s missing a final semicolon in the include line:
                  $basePath = $modx->config['base_path'] . '/assets/snippets/calendar/';
                  include $basePath . 'calendar.inc.php'
                  
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 28033
                    • 925 Posts
                    Quote from: sottwell at Apr 17, 2009, 07:58 PM

                    Looking at the Readme file, if you copy/pasted that code in your snippet, it’s missing a final semicolon in the include line:
                    $basePath = $modx->config['base_path'] . '/assets/snippets/calendar/';
                    include $basePath . 'calendar.inc.php'
                    


                    I got some weird fatal error if I added it, IIRC, so I dunno if maybe something’s wrong in the code...
                      My Snippets
                      -> PopUpChunk v1.0
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Hm. I notice the first line in the included .php file is a single-line comment. I’ve gotten this error when uploading .php and .js files that were originally with windows line-endings, got unzipped on my mac, and uploaded to a unix system. The single-line comment tags, because of the non-Unix style line-endings, ended up making the entire rest of the file one big comment. My solution was to open the file in my handy-dandy programmer’s editor and convert all the line-endings to Unix line-endings and upload that.

                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org