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

    here is a pre-release ov version 0.2b. I completely separated the data source and calendar view system, and they all being combined on the snippet calling. With this, it’s enabled us to view calendar witht he input from different data sources. One of the good example to use this feature is to have all birthday of each users on MODx system to be displayed on the calendar, which all it takes is a to create another data source layer that responsible in fetching the user birthday field, and display it on the calendar.

    Hope this does make sense to some of you.
    I haven’t put it on the main page yet, because I want Mark to help me tested out this release first, and waiting for a new improvement in the layout, before I release the first beta version of this snippet.

    Any help in testing it out and improve it will be great.
      Wendy Novianto
      [font=Verdana]PT DJAMOER Technology Media
      [font=Verdana]Xituz Media
      • 18397
      • 3,250 Posts
      Now I get this error with the latest version:

      « MODx Parse Error »
      MODx encountered the following error while attempting to parse the requested resource:
      « PHP Parse Error »
       
      PHP error debug
        Error: 	Undefined index: 57	 
        Error type/ Nr.: 	Notice - 8	 
        File: 	/home/virtual/site420/fst/var/www/html/manager/includes/document.parser.class.inc.php	 
        Line: 	274	 
        Line 274 source: 	if(is_numeric($q) && !$this->documentListing[$q]) { // we got an ID returned, check to make sure it;s no an alias 	 
       
      Parser timing
        MySQL: 	0.0000 s s	(0 Requests)
        PHP: 	0.0268 s s	 
        Total: 	0.0268 s s	 
      
        • 32241
        • 1,495 Posts
        Hemm...

        I think that’s an error from the core code, isn’t it? It doesn’t stated my code in there. Let me further investigate this. FYI, I did check my code against the php safe mode issue, and it ’s suppose to run just fine in that evironment.
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
          • 22303 MODX Staff
          • 10,725 Posts
          This error would occur if an attempt was made to find a page by an alias and no alias was found in the documentListing (i.e. no document with that alias exists). Are you creating document aliases in your code somewhere?
            • 32241
            • 1,495 Posts
            Thanks for the reply Jason.

            I did use a lot of makeUrl(doc_id, ’’, ’some_query_string’);
            I never use the middle part, because I couldn’t find the reason of using the middle parameter.

            Anyway, I tried to turn of my friendly alias path on my testing server, and everything seems to works just fine. It’s outputing the right link and etc.

            Do you think it might be caused by some other thing?

            Thanks
              Wendy Novianto
              [font=Verdana]PT DJAMOER Technology Media
              [font=Verdana]Xituz Media
              • 18397
              • 3,250 Posts
              I have friendly alias path turned ON on my server.

              Wendy, why don’t you generate your page links just via [~id~]? They will be parserd if output by a snippet any you CAN pass paramers through just by appending stuff to the end. IE:

              [~id~]?page=home&sure=yes
                • 32241
                • 1,495 Posts
                Quote from: Mark at Jan 25, 2006, 02:27 PM

                [~id~]?page=home&sure=yes

                That looks great, my question is, if the link generated contain index.php?q=3, then with the appended query string, it will be index.php?q=3?page=home&sure=yes, right? Or the core will parse the ’?’ and change it to ’=’?

                I never try this before, any information will be great.

                Thanks
                  Wendy Novianto
                  [font=Verdana]PT DJAMOER Technology Media
                  [font=Verdana]Xituz Media
                  • 25663 MODX Staff
                  • 12,272 Posts
                  It should work just fine. The URL will be written for the page differently based on whether or not you have aliases turnd on, and there will only be one "?".
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 32241
                    • 1,495 Posts
                    Kewl.

                    So what’s the point of makeUrl API? I mean I use it a lot on my snippet, and do I still need to use or not? Is there any known issue to makeUrl, like causing an incompatibility with Mark hosting server?
                      Wendy Novianto
                      [font=Verdana]PT DJAMOER Technology Media
                      [font=Verdana]Xituz Media
                      • 32241
                      • 1,495 Posts
                      Mark, try this code. Will this work on yours? I change the makeurl to [~~] tag.

                      Just change the calendar.class.php file on your snippet calendar dir with this one. Don’t forget to remove the txt wink
                        Wendy Novianto
                        [font=Verdana]PT DJAMOER Technology Media
                        [font=Verdana]Xituz Media