We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8720
    • 2 Posts
    Fantastic script. I’m running into only one issue. I have the demo unmodified on my server and the mini calendar, default and iCal example all work brilliantly. But for some reason the Event List does not load. It will show the snippet call and template files list, but under that no events ever load. But all the other calendar examples work flawlessly. Any idea why this could be happening? I have not modified any of the code, just looking at the demos on my server.
      • 34017
      • 898 Posts
      The event list is kind of buggy. It needs some work.

      If it’s just events in a month, I would recommend just using the calendar type, but using UL - LI for the templating- if that makes sense (get rid of the tables).
        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
        • 8720
        • 2 Posts
        Cool, that makes sense and seems to be working for me smiley

        A couple things to mention, maybe there are already solutions?

        -Default calendar shows my times correctly, for example 10am - 12pm but on the iCal the same events show 10:02am - 12:02pm. Where does the discrepancy come from?

        -All day events still show a time range. For example, 12pm-12pm. Is there a way to recognize all day events and instead of showing a time range display "All Day Event"? Or something similar.
          • 34017
          • 898 Posts
          Hey Eli,

          - That seems to be a bug on the iCal one. Are the placeholders the same in the templates?

          - The all day thing is pretty frustrating. There’s some code out there that show how to do that (I think the Drupal module does some checking for it. If you hack it or find any code that work for it, Im all ears. The original modx GCal has the same problem.
            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
            • 11532
            • 1 Posts
            Hi Chuck!
            Great snippet, keep up the good work.

            The snippet works well when I insert my email address, but when I add a particular email of a site that uses Google calendars service, the events do not show. I changed the calendar sharing settings to public with no luck. The only difference I see its in google’s URL, where the one that works(my personal), has http//... And theone not working is https://... Thoughts?

            I hope this makes sense to you.

            Thank you

            PD: Just updating this entry. I fixed this issue by disabling the https settings. In case anyone else runs with this issue, http://mail.google.com/support/bin/answer.py?hl=en&answer=74765
              • 14723
              • 7 Posts
              Hi,

              First of all: great Snippet! The posibilities are endless!

              One thing though:
              I’d like to use a 24h notation instead of the AM/PM. Where and how do ik change that?
                • 34017
                • 898 Posts
                Hey Jorgen,

                You can use PHX to format [+startDate+] however you’d like such as 24h
                  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
                  • 14723
                  • 7 Posts
                  So if i use PHx i can replace the output.
                  But what does [+startDate+] parse? Is it like a PHP ’strftime’ time format?

                  If so, i try to get the right syntax but can’t seem to get it right.
                  e.g. [+startdate+] gives an output of: Oct 1, 09 7:00
                  Which i want to convert to ’19:00’.
                  So I use:
                  [+phx:input=`[+startDate+]`:is=date`%b %m, %g %I:%M`:then=date`%H:%M`+]

                  Nothing happens.
                  I am able to convert the output string as whole, but that’s of course not the way to go.

                  I understand this is more of PHx question, but if you can tell which format the [+startDate+] is in, it will help me a lot.
                    • 3927
                    • 16 Posts
                    Chuck,

                    how do I start the days with a different day. Now Sunday is the first day of the week, what about Mondays?

                    Wouldn’t it be better to change the template parts to use template chunks? Or would you like to keep it this way?

                    My final thought is, should we try and create the navigation of the ’ical’ template to be via Ajax? It think this would be much better, than simply posting the variables in the URL.
                      • 34017
                      • 898 Posts
                      Hey Jorgen,

                      Sorry about that, it should’ve been [+sortDate+]. Looking at the code, it doesnt reflect the offset, but that’s where you do it. You could also change the code (around line 97) to:
                                      'startDate' => $startDate - $offset,
                                      'endDate'   => $endDate - $offset,
                                      'pubDate'   => $item->get_publish_date() -$offset,
                      



                      @boudie,
                      No I dont want these to be template chunks. You can make your version do that if you wish. And you can definitely use ajax for the navigation. Should be simple with some jquery.
                        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