Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Preview: Event Calendar Module


Go to End


293 Posts   69223 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 April 2009 at 2:01am

Is that in the file I sent you? You can take that out. Those files were made when that requirement was necessary.

Avatar
Xeal

Community Member, 37 Posts

10 April 2009 at 2:06am

The reference to calendar_toggle.js is from the files you posted on the tutorial, so I figured it was needed. As for why the announcements are breaking I'm not sure, that's what I'm trying to find out. It really does everything it's supposed to except for save it to the db.

It's really frustrating it actually does all the same steps that my non extended Calendar does.. Makes it a lot harder to figure out the problem and as far as I can see there is no problem with my code. I'll try taking the files you posted and see if it works. If it does I'll just replace what I have with your files. At least it'll be fixed.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 April 2009 at 2:14am

The development on this project has been so rapid, it's really difficult to keep the documentation up to date. Most of what is in there is still accurate, but some functionality has been added and lost, as well.

I'm quite sure this bug was resolved a couple versions ago. I was experiencing it as well as one other user, and when I checked in the change, they were both fixed. Can you confirm that line 244 of CalendarDateTime.php reads as follows?

		if($obj == "DataObjectManager") {
			$table->setAddTitle("Announcement");
			$table->setParentClass("Calendar");
		}

Actually, I may have answered my own question. It appears that the fix was only added for DataObjectManager users. If you're on a CTF, you're not getting the setParentClass(). Will check that in now.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 April 2009 at 2:15am

Ok, check out the latest version and let me know how you do. I'm assuming you do not have DataObjectManager installed on this site?

Avatar
Xeal

Community Member, 37 Posts

10 April 2009 at 2:20am

Thank you UC! :D

If DataOjbectManager is another module then no. The only module I have is the event_calendar, but now it works. Thanks for the updates! If there's anything I can do to help just let me know I'll keep an eye out for other bugs or glitches I might encounter. Thanks for all the help

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 April 2009 at 2:33am

One thing I'm not really familiar with in Silverstripe is getting the table to use custom formatting for each field. For instance, it would be nice if the Start Date / End Date didn't display in MySQL timestamp format -- or if the Time could display in 12 hour format optionally. Any idea how to do that? Can't I just change the headings array in my table to something like:

array ('StartDate' => 'StartDate.Nice' ...etc..)

Avatar
Victor

Community Member, 128 Posts

10 April 2009 at 2:42am

I followed all tutorial (except adding Staff).

My goal is to make Seminars for our Dept, each seminar consists of weekly events and each even has its own speaker, title, ....., and Content which must be formatted properly. There are two possible ways to do it

1) Consider each seminar as repeating event. In this case speaker, ... should be added to WorshopDateTime. But what about Content? Is it possible to add Content (editable with TinyMCE to WorkshopDateTime)

2) Consider each seminar meeting as separate event (Workshop) and each seminar as WorkshopHolder. But then I need AllWorkshopHolder which is parent to WorkshopHolder and displaying all its children. How to do it?

Sure, we can make all seminars as categories but we really want to have them in Menu(2) (it is more observable than pulldown and also some seminars are external so we just place there Redirects)

Thanks!

Victor

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 April 2009 at 2:54am

Well, the big question is how many seminars will you have?

If you want to have editable HTML content on a DateTime object, you can install the DataObjectManager, and change the Content field to a SimpleHTMLEditorField.

WorkshopDateTime.php

function extendAnnouncement()
{
$this->removeAnnouncementField('Content');
$this->addAnnouncementField(new SimpleHTMLEditorField('Content'));
}

Go to Top