We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    First of all, I must point out that I did not write this snippet myself, but I just made some enhancements which I thought would be useful.

    Since I’m not such a php guru wink I find it difficult to understand all coding, so it’s not easy for me to support this snippet.

    Whithout clickable events, the snippet works very well and displays the dates well, als you can see on http://international-montessori.org/

    I’m not so familiar on using tv’s and I don’t know what you’ve changed on the snippet’s code.

    I will look into this problem, but only after the holidays.

    In the meantime, I can point you to another snippet, Calx. As far as I know, this supports clickable events and is supported very well. Perhaps this can solve your problem.
      • 34162
      • 1 Posts
      As I’ve promised, I’ve looked into the Kalender snippet and did some testing with the links.

      Since I’m building a new site right now, which uses the Kalender snippet, it’s the perfect moment to do some testing.

      I couldn’t reproduce your problem, as the snippet works just fine on this site. On another site, where I’ve used the snippet before, I also tested the links and also everything just worked fine.

      So I can’t help you with your problem. undecided

      Hope Calx works fine for you.
        • 22058
        • 8 Posts
        Quote from: nos at Jan 24, 2008, 10:58 AM

        I very much apreciate the Kalender thanx for sharing.
        It mostly works fine though 1 item I run into that I can’t see through by now.

        The switching through the months (< / >) does not work for me. Has it to do with friendly URLs? for in my resulting html (index.php?mo=12&yr=2007) there is not the special page given but on some example page (.../calendar.html?mo=12&yr=2007)

        Could someone help?

        I am having this very same problem, but I am not using friendly URL’s.

        Every time I click one of the "< / >" buttons for the next month it just takes me to the homepage of my site...

        Does anyone know how to fix this??

        EDIT: The url that my previous month ( < ) button is sending me to is http://www.mysite.com/?mo=2&yr=2009
        but (judging by WeBe’s site http://international-montessori.org) it seems like it should be sending it to http://www.mysite.com/index.php?id=1&mo=2&yr=2009, and infact, I typed that into my address bar just now and it took me to the previous month, but I have no idea how to tell the code to do this...
        Can anyone help me? Please?
          • 34162
          • 1 Posts
          Strange, I’ve no problems whatsoever.

          On http://international-montessori.org it’s used with modx 0.9.5 and I’ve recently used it on a fresh installed 0.9.6.3 site.

          Both with friendly urls on and both work just fine.

          Don’t know if it makes any difference, but try to call the snippet uncached.
            • 19368
            • 40 Posts
            Hey there,

            the instructions at http://modxcms.com/extras.html?view=package/view&package=220 have the following


            Embedding Kalender into your template
            -------------------------------------

            To display the calendar to your website template, just use this snippet call:



            Where parent=1257 points to the document id number where Kalender data resides.


            There is no content for the snippet call - makes it hard to install wink
              • 22058
              • 8 Posts
              Quote from: WeBe at Mar 10, 2009, 09:00 PM

              Strange, I’ve no problems whatsoever.

              On http://international-montessori.org it’s used with modx 0.9.5 and I’ve recently used it on a fresh installed 0.9.6.3 site.

              Both with friendly urls on and both work just fine.

              Don’t know if it makes any difference, but try to call the snippet uncached.

              Thanks so much for replying!

              I tried calling the snippet uncached but it didn’t seem to make a difference.
              BUT! I searched through the forum again and found a snippet you had uploaded a while ago (kalender_snippet.txt) and copy and pasted that into my Kalender snippet in the manager instead of the default one and it now works perfect!
              So I’d like to thank you very very much!!

              You saved my site smiley
                • 21778
                • 223 Posts
                IS it possible to get the months on the calendar displayed in another language?
                  • 34162
                  • 1 Posts
                  Yes, you can use the parameter &lang for that.

                  For instance, if you want it to be in french, just add &lang=`fr`.

                  The snippet uses setlocale for this. You can find more information on php.net.
                    • 9591
                    • 3 Posts
                    Hi there,

                    I tried the CALx and was almost going crazy - I think the kalender enhanced is a much better snippet.

                    It didn’t work for me only to set the &lang (to `de`in my case), I had to change the setlocale completely. I read a lot in this thread, I think, the kalender version changed, so the line numbers don’t fit, you have to search it in the code. In my version in the kalender_enhanced.php file it’s about line 106. Below this
                    setlocale (LC_TIME, $locale);
                    I added
                    // deutsch
                    setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');

                    Now it works correctly.

                    Quote from: FuryDE at Jun 01, 2007, 09:32 AM

                    Quote from: islander at Jun 01, 2007, 09:27 AM

                    Any ideas on how to get Monday to be the starting day of the week?

                    Nope, not yet. But I will have a look at that when I have some time for it.

                    Martin

                    Here I’ve done this: In about line 288, where the table is created, look for this line:
                    $firstday = date("w",strtotime($mm."/1/".$yyyy));
                    and change it to:
                    $firstday = date("w",strtotime($mm."/1/".$yyyy)-(24*60*60));

                    Now the first day of the week always is Monday.

                    But now you have to change the rows, too, because August 2009 for example ends with Sunday 30th.
                      • 9591
                      • 3 Posts
                      Change the rows in these lines (about 310):
                      if($firstday==6 && $maxdays>=30){
                      			// six rows when first day is saturday and max days is 30 or 31		
                      			$weekrows = 6;
                      		}
                      to
                      if($firstday==5 && $maxdays>=30){
                      			// six rows when first day is saturday and max days is 30 or 31		
                      			$weekrows = 6;
                      		}
                      		else if($firstday==6 && $maxdays>=30){
                      			// four rows when first day is sunday and max days is 30 or 31	
                      			$weekrows = 6;
                      		}