We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    After fiddling with my hosting environment, switching to php cgi mode, and testing with stopOnNotice I got this to run. But nomatter what I do to create an event it does nothing! Yes, I’m calling the snippet uncached. I tried your demo Wendy and was able to add an event just fine in the same mannar as I have been on mine. Any ideas?
      • 32241
      • 1,495 Posts
      @briggsy
      Yes, you can output a list of all the events on specific month with the current provided API located on db class. The down side will be, it’s not fully supported in the calendar view class, so you have to code it manually smiley I’ll make a note on that. I think other than the current 3 supported view, I will need to add this ability as well, plus week view and detailed day and week view to have the events listed in hourly manner.

      @Mark, that’s a goo thing to know, even though I’m still curious about why my bad coding practice breaks on your environment. grin Mark, feel free to check the code, and play with it, but my question will be, do you see the popup prompt box asking for what type of db backend that you’re going to use? The default value suppose to be ’db’. FYI, I will re-write most of the class to suppot my current template library, which I think it helps a lot for me to create a full-fledge catalog shop snippet for MODx, and I would love to see this being implemented on Calendar as well.

      Ah, that reminds me of my bad day. Sorry, it’s out of topic, but I’m feeling really sad right now, because my coding work for 8 hours had accidentally got erased, before I went home from my office. *sigh* I got the inventory listing done, but the code is gone because of my stupidity. Now I wish I have SVN for all my projects. :’(
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 18397
        • 3,250 Posts
        Yes, I see the popup and the default value is db. Everything visually is identical to your example site. Just upon hitting Submit or Create new the changes are not applied.
          • 32241
          • 1,495 Posts
          Try to visit your ftp, and browse to the cache folder under calendar snippet folder. If you see a files in there, clean it and try to refresh your calendar. If the new events is still not displaying, please check the database table, does it add any new entry to the database.

          Thanks
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media
            • 11526
            • 93 Posts
            Before i try to get it working, i would like to know the following:

            Is it possible that all registered users can post (add) event(s), and they can change or delete their own, but not those of other users?

            If yes, how can i do that?
              • 32241
              • 1,495 Posts
              Quote from: Gust at Mar 13, 2006, 06:39 AM

              Before i try to get it working, i would like to know the following:

              Is it possible that all registered users can post (add) event(s), and they can change or delete their own, but not those of other users?

              If yes, how can i do that?

              Unfortunately not. The permission is not base on per user basis. All the calendar events will be editable by all users that has the right permisison to edit the calendar.
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I considered that when I made the DocMan snippet; I gave each document a field in the database for "owner" which is the webInternalKey from the SESSION when a file is uploaded, and only the owner can access the edit properties/delete functions for each file. It took some interesting sql joins to get it to work!
                  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
                  • 11526
                  • 93 Posts
                  Quote from: Djamoer at Mar 13, 2006, 08:49 AM

                  Unfortunately not. The permission is not base on per user basis. All the calendar events will be editable by all users that has the right permisison to edit the calendar.

                  hmmm. I was hoping it could be done...

                  Maybe i will try to install this calendar first, and then try to solve the problem with the permissions. I think it couldn’t be that hard at all to implement this feature. Just when users click on the delete or edit link, the snippet should check wether the user that is logged in is the same as the author of the event (or that the user logged in is an administrator). If so, no prob, else it should display an error message...

                  Or am I wrong to say this?
                    • 32241
                    • 1,495 Posts
                    Yes you could do it, if you’re eager to.

                    Here is the things that you need to look at.
                    You need to add 1 more column to the database field, so that it will remember the userid of the user who submited the event. Then you need to change the class for database layer, so it will fetch the current user id and insert it into the database. The last will be to check the user id corresponding to the event everytime the user click on edit and delete.

                    Hope you got your solution work, if yes, please feel free to post it in here.
                      Wendy Novianto
                      [font=Verdana]PT DJAMOER Technology Media
                      [font=Verdana]Xituz Media
                      • 11526
                      • 93 Posts
                      Quote from: Djamoer at Mar 13, 2006, 09:40 AM

                      Yes you could do it, if you’re eager to.

                      Here is the things that you need to look at.
                      You need to add 1 more column to the database field, so that it will remember the userid of the user who submited the event. Then you need to change the class for database layer, so it will fetch the current user id and insert it into the database. The last will be to check the user id corresponding to the event everytime the user click on edit and delete.

                      Hope you got your solution work, if yes, please feel free to post it in here.

                      Thnx 4 pointing me in the right direction. For the moment, i have no time and i am not a coding freak when it comes to php, but next week i will see what i can do smiley