We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33982 ☆ A M B ☆
    • 476 Posts
    Having problems getting &offset to work. My time outputs are all the same on the calendar: 5:00 pm to 6 pm. I put in the offset (i.e. &offset=`+4 hours`) and the time changes by a minute (i.e. 4:49 pm to 5:59 pm). Am I missing something? Here’s my snippet call:

    [!Calendar? &display=`calendar` &emails=`[email protected]` &template=`ical` &offset=`+4 hours`!]

    This is correct, right? All the events are outputting I put in my Google calendar.

    Here’s what I have in the Snippet for Calendar:

    <?php
    $basePath = $modx->config['base_path'] . '/assets/snippets/calendar/';
    date_default_timezone_set('America/Los_Angeles');
    include $basePath . 'calendar.inc.php';
    ?>
      Precision Web Development ... SmashStack.com
      • 13771
      • 5 Posts
      I love the demos of this snippet on the site and would love even more to get it working on my page, but I keep running into a problem. I am getting this error:

      PHP error debug
      Error: .../assets/snippets/calendar/cache/ddbcc704f4445512a01e0d7e0f67a5f1.spc is not writeable
      Error type/ Nr.: User Warning - 512

      I read through this forum and saw that someone had recreated the cache folder and set the permissions for it to be writable and I did just that (several times in fact), but I am still receiving this error message. Any ideas?
        • 34017
        • 898 Posts
        Quote from: jccarter1 at Jun 11, 2009, 01:41 PM

        I love the demos of this snippet on the site and would love even more to get it working on my page, but I keep running into a problem. I am getting this error:

        PHP error debug
        Error: .../assets/snippets/calendar/cache/ddbcc704f4445512a01e0d7e0f67a5f1.spc is not writeable
        Error type/ Nr.: User Warning - 512

        I read through this forum and saw that someone had recreated the cache folder and set the permissions for it to be writable and I did just that (several times in fact), but I am still receiving this error message. Any ideas?

        Have you set the permissions on the /cache/ folder to 777? You might need to do that. And delete all of the files that are currently in there to reset them. It’s just permission error, which sucks but should be easy to fix by changing the permissions.
          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
          • 13771
          • 5 Posts
          Quote from: ChuckTrukk at Jun 11, 2009, 01:51 PM

          Have you set the permissions on the /cache/ folder to 777? You might need to do that. And delete all of the files that are currently in there to reset them. It’s just permission error, which sucks but should be easy to fix by changing the permissions.

          I’ve set the permissions for the folder to 777 and there is nothing inside the folder at all and I am still getting this same error message. Not sure what else I should try. huh
            • 38755
            • 43 Posts
            Do you know if you’re php is running as cgi (phpsuexec or similar)? If so 777 isn’t allowed, try 755 or even 700. If those don’t work I’d contact your host to find out what needs to be done to make a folder writeable via php.
              • 34017
              • 898 Posts
              protocreate is right on. The problem is permissions, and he’s got the answer. My other thought was trying it with cache off. But that’s a sucky solution. So follow proto’s advice.

              Chuck
                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
                • 30837
                • 20 Posts
                Hi Chuck!
                Love this snippet, just one thing... in order for in to grab my templates and CSS I have to move those folders(inside the calendar folder) to the root installation... what am I doing wrong??

                Chris
                  • 34017
                  • 898 Posts
                  Hey Chris,

                  It probably stems from the $basePath being incorrect. The documentation used to have some formatting errors in it.
                    $basePath = $modx->config['base_path'] . '/assets/snippets/calendar/'; 
                    include $basePath . 'calendar.inc.php';
                  


                  If just the CSS is not being picked up, you can change the CSS call to:
                  <link href="[(site_url)]assets/snippets/calendar/templates/default/calendar.css" media="screen" rel="stylesheet" type="text/css" />
                  

                  Make not of the [(site_url)].

                  Im glad you like it.


                    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
                    • 11055 ☆ A M B ☆
                    • 3,112 Posts
                    how about making the events list based on "the next 30 days", not "in the current month" only?
                      Rico
                      Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                      MODx is great, but knowing how to use it well makes it perfect!

                      www.virtudraft.com

                      Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                      Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                      Maintainter/contributor of Babel

                      Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                      • 34017
                      • 898 Posts
                      Hey goldsky,

                      If I get around to it, I’ll probably pull the events list out of this snippet and put it into it’s own snippet. It was kind of an afterthought here as I dont use it much. But that’s a really good idea.

                      If you implement the days instead of this month, I can test it out and add it in.

                      Charlie
                        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