-
☆ 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
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.
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.
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
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
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.
-
☆ 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.
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