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.

All other Modules /

Discuss all other Modules here.

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

EventCalendar and announcements


Reply


40 Posts   4857 Views

Avatar
alexanm

Community Member, 38 Posts

7 July 2009 at 3:17am

Hello UncleCheese,

ok thanks for the information.
Yes I have seen the things in the _config.php, but the things I am talking of, are the month name abbreviations which are hard coded in your code as english, and also in the jQuery classes.
And the other thing is, that you have the function Time.nice12 in your code, which will always result in a time having the am/pm string regardless, of what is set in the config file...

Markus

Avatar
UncleCheese

Forum Moderator, 4094 Posts

7 July 2009 at 3:26am

Where are the month abbreviations hard coded as English? I was sure I removed all of that. And where is the Nice12() function? This is the first i've heard of it.

I believe the calendar widget is translatable and locale-aware, but that's all handled by the jQuery plugin, and I'm not too familiar with it.

More reason to add an AJAX based calendar widget to the module, though. Then we could take advantage of the Silverstripe i18n features.

Avatar
alexanm

Community Member, 38 Posts

7 July 2009 at 3:37am

Hello UncleCheese,

I have changed the Month abbreviations in CalendarUtil.$months_map to German. Only after this change, the month names are displayed correctly.

Regarding the nice13 function, I'm not sure about this because I do not have the original code here, but I think it was at CalendarDateTime._Times().

It may, that this has been changed in a recent version, but I have not been updating to every new release because of the changes I had to make for the interface to be in german...

Markus Alexander

Avatar
UncleCheese

Forum Moderator, 4094 Posts

7 July 2009 at 3:50am

Edited: 07/07/2009 3:50am

Avatar
UncleCheese

Forum Moderator, 4094 Posts

7 July 2009 at 3:53am

Yeah, that's why you shouldn't mod the core. This module gets updated very frequently, so you want to make sure you isolate your changes.

I'm not sure the $months_map array is used anywhere. What part of the interface does that update?

Avatar
alexanm

Community Member, 38 Posts

7 July 2009 at 4:39am

Hello UncleCheese,

I have attached a Screenshot with the Filter drop down. I have only changed the abbreviation of "May". As you can see it is different in the two dropdown boxes. But as far as I can remember, they are also used by the dates for the events.

The second screenshot shows the Nice24 issue. It was my mistake in the previous posts: The function was Time.Nice and it alsways used the 12 hour format. Onyl changing this to Nice24 used the 24 hour format (see Screenshot 2).

But wait before you go and search your code, and everything is because of an old version: I try to upgrade to the newest relase of both silverstripe itself and of course your modules too...

Markus Alexander

Attached Files
Avatar
alexanm

Community Member, 38 Posts

11 July 2009 at 5:48am

Edited: 11/07/2009 5:51am

Hello UncleCheese,

regarding the two issues from above: I have finally managed to upgrade to version 2.3.2 of silverstripe and have also upgraded to the latest version of your module.

The Nice() function is used in the CalendarDateTime._Times() function --> As I do not see any place where I can set the format of the time it prints the time in 12 hour format. I have managed to override this function in my descendant of CalendarDateTime and use the function Nice24().

The $month_map array is used when building the filter dropdown as described above. I could not manage to change this behaviour in my code, so I had to change the original files again.

One more point is that the ${sMonthShort}, ${eMonthShort}, ${sMonthFull} and ${eMonthFull} in the calendar headers are in english as well, even when I have set the language of the calendar to german. Is there a way to change this behaviour.

I also have managed to change the english date title in the datepicker by copying the jquery files into mysite and use these ones in my templates. Any better workaround for this?

Two more things:
* I thought that php will handle all the date stuff (correct language and formats) by itself, when you set the correct locale.
* In the calendar widget you can click on the month and year header, but the cursor is an IBeam.

And the really last thing: Could you also add localizations for the filter captions (start and end), please?

Thanks
Markus Alexander

Avatar
alexanm

Community Member, 38 Posts

15 July 2009 at 8:56am

Hello UncleCheese,

one more Question from me: Now I have your actual version of the vent calendar working and everything is working fine except for the small things in my last post.

So I have the following situation: I have written descendants for all the classes (Calendar, CalendarEvent and CalendarDateTime) and changed the things I needed. I have added a Category field to my descendant of the CalendarDateTime class. Now I would like to write a small widget which shows the next appointment for each of the categories...
There are two things I am not sure about: First the handling of events and appointments, because when its an event I would like to show a link to it. The second one is the recurrence of an event. How do I get the next instance of a recurreing event. And last but not least, I would like to use the same formatting as in the event calendar itself.

As always, many thanks for your fast and excellent help
Markus Alexander