We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    The $Vars just isn’t getting passed to the calDbDelete function.

    I put in a print_r for the POST at line 330, where calDeletePost gets called, and this is what it has:

    Array ( [opcode] => delete [calid] => 24 [currday] => [currmonth] => [curryear] => )

    so the dates aren’t getting passed.

    In the switch statement, before that, if calid is in the POST, it skips the day, month and year? That would explain why it’s not in $PostVars. Why?

    No, wrong variables. It’s late here; I’m quitting for the night. Starting to make dumb mistakes. M
      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
      • 32241
      • 1,495 Posts
      Ah, now I see what you mean. I just tested this out with update, but never try the delete function.
      I’ll work on this.
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 32241
        • 1,495 Posts
        After looking the code, I do realize that I make quite a lot of mess inside, so I’m cleaning it up a bit, and now I figure out the root of all the problem.

        Ao I fix it, I already test the system, and it works fine for delete, update, and new. If you guys find anything wrong with it again, please let me know. If you guys willing to make the interface looks much better, please do so, and give me an update on it. I would like to see a better interface for the system, but I’m lacking time in making it nice.

        I attached the sample website that I’m working on right now with calendar built into it. I didn’t do the design, we got our own dedicated designer here, so all I do is coding, while he is doing the design. lol



        Allrighty,
        Take care
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
          • 10487 MODX Staff
          • 1,535 Posts
          You’re a star! Working a treat now grin

          I’ll have a stab at the user interface next week when I’m on my hols from work, see what I can do.

          BTW, cracking website, calendar looks cool!

          See ya, Garry
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 8461
            • 205 Posts
            Hey Wendy,

            You have put some effort into that calendar and it looks really good, well done you !!
              • 4018
              • 1,131 Posts
              Just downloaded this to tryout since I’ll likely be starting a project that requires something like this. However, after setting it up, I’m lost! I got the SQL into the database, added the snippet, and tried to add a calendar to a page by adding [!Calendar!] to it. Err...the calendar comes up, but the CSS file isn’t attached and it looks like I’m missing something that allows for adding entries to each day.

              I guess what I’m asking is this: How do you implement this once you’ve setup the snippet and stuff? Does anyone have a login to a MODx site I could use to see how this is implemented? Thanks! Looks good so far! laugh
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                • 32241
                • 1,495 Posts
                Hey Jeff,

                Check this out, quote from Garryn


                I went delving into the calendar.class.php and realised that it’s using the regClientStartupScript() API function. This has been reported as not functioning correctly in 0.9.1 with a fix for it being found at: http://modxcms.com/forums/index.php/topic,1942.msg18261.html#msg18261

                So, I fixed that.

                You need to fix the regClientScript first. smiley
                  Wendy Novianto
                  [font=Verdana]PT DJAMOER Technology Media
                  [font=Verdana]Xituz Media
                  • 32241
                  • 1,495 Posts
                  I forgot to make this as a note, so I add the link to the front page, hope it helps others to get started with the snippet.

                  Sincerely,
                    Wendy Novianto
                    [font=Verdana]PT DJAMOER Technology Media
                    [font=Verdana]Xituz Media
                    • 4018
                    • 1,131 Posts
                    Definitely a help for those just starting out with this. However, when inserting the snippet into a page, is the snippet supposed to load all the necessary CSS and Javascript files automatically? Or do I have to add those to my template?
                      Jeff Whitfield

                      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                      • 32241
                      • 1,495 Posts
                      Quote from: Bravado at Feb 02, 2006, 04:47 PM

                      Definitely a help for those just starting out with this. However, when inserting the snippet into a page, is the snippet supposed to load all the necessary CSS and Javascript files automatically? Or do I have to add those to my template?
                      If you just call it as [!Calendar!], then it’s suppose to work just fine, it will automcatically use all the default templating included with the snippet. If you want to create your own design, then you can read the parameter option on the snippet, and assign whatever chunk to the template, and customize it to whatever you like.

                      FYI, the templating system is really flexible, so if you can come up with another good desing, it won’t hurt for me to replace the default template right now, because I do think the current template looks ugly.

                      Thanks
                        Wendy Novianto
                        [font=Verdana]PT DJAMOER Technology Media
                        [font=Verdana]Xituz Media