10387 Posts in 2198 Topics by 1712 members
| Go to End | Next > | |
| Author | Topic: | 35166 Views |
-
Re: Preview: Event Calendar Module

5 February 2009 at 2:00pm
Sounds to me like something really simple is missing. Could you provide one, some, or all of the following?
- The website
- The code
- A temporary login to your CMS -
Re: Preview: Event Calendar Module

5 February 2009 at 2:52pm Last edited: 25 February 2009 1:06pm
Thanks UncleCheese, Detail are:
Website: www.supportact.com.au/ss/
Code: SalEvent.php
<?php
class SalEvent extends CalendarEvent
{
static $db = array (
'Location' => 'Varchar(100)',
'Cost' => 'Varchar(50)',
'RegistrationLink' => 'Varchar(100)'
);static $has_one = array (
'Image' => 'Image'
);public function getCMSFields()
{
$f = parent::getCMSFields();
$f->addFieldToTab("Root.Content.Main", new TextField('Location'), 'Content');
$f->addFieldToTab("Root.Content.Main", new TextField('Cost'), 'Content');
$f->addFieldToTab("Root.Content.Main", new TextField('RegistrationLink','Registration Link'),'Content');
$f->addFieldToTab("Root.Content.Image", new ImageField('Image'));return $f;
}
} // end SalEvent subclassclass SalEvent_Controller extends CalendarEvent_Controller
{
}?>
SalEventHolder.php
<?php
class SalEventHolder extends Calendar
{
static $has_many = array (
'SalEvents' => 'SalEvent'
);static $allowed_children = array (
'SalEvent'
);
}class SalEventHolder_Controller extends Calendar_Controller
{
}?>
Thanks again
-
Re: Preview: Event Calendar Module

5 February 2009 at 3:14pm
Sigh.. This is a bug with the CollapseDatesAndTimes function which I've tried so hard to make work, but it looks like it's still not there. You probably wont' need the function, so just take it out.
Calendar.php, Line 245
Change this:
if($events = $this->getStandardEvents($filter))
$event_list = CalendarUtil::CollapseDatesAndTimes($this->getStandardEvents($filter));to this:
if($events = $this->getStandardEvents($filter))
$event_list = $events;That should fix it. Keep my tempuser account active in case it doesn't.
-
Re: Preview: Event Calendar Module

6 February 2009 at 1:23am
Is it possible and how to extend the Announcements (for example with locations)
like it is described for Dates and Times with WorkshopDateTime? -
Re: Preview: Event Calendar Module

6 February 2009 at 3:26am
Interesting. I did consider that for that initial release, but here was my thought process:
"Should I make an API for the Announcement object, too? Nah, no one will ask for that feature."
I'm hesitant to start moving things around now that is looking much closer to stable, but I'm happy to play around with it. If I add something like that, I'll let you know and you can check it out from the SVN.
-
Re: Preview: Event Calendar Module

6 February 2009 at 3:38am
ok. Thanks.
I have another issue.
Under configuration event descr behaviour and word count is not shown. (e_c svn + sv 2.3rc3) -
Re: Preview: Event Calendar Module

6 February 2009 at 3:40am
I took that out in the latest version. You shouldn't need it. It was there to give users more control over the presentation, but I realized that sort of stuff doesn't belong in the CMS -- it belongs on the template.
| 35166 Views | ||
| Go to Top | Next > |

