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

Events module language problems and Image Gallery question


Reply


6 Posts   1475 Views

Avatar
gabriel

Community Member, 7 Posts

8 June 2009 at 8:12pm

Edited: 09/06/2009 7:27am

Hi, I have a problem with the Events Calendar module. When I try to add it in other pages, I get this error:
<br >
<br >Fatal error: Call to a member function format() on a non-object in /html/event_calendar/code/CalendarUI.class.php on line 10
<br >
<br >I added this:
<br >
<br >

function GlobalCalendarWidget()
<br >{
<br >$calendarPage = DataObject::get_one("Calendar"); // If you have multiple calendars, specify an id or url segment.
<br >return new CalendarWidget($calendarPage);
<br >}


<br >
<br >In my Page.php in the
<br >

<br >class Page_Controller extends ContentController
<br >


<br >and
<br >

<br >$GlobalCalendarWidget
<br >


<br >in my Page.ss
<br >
<br >Did I miss something somewhere? On the events page (without the part added to Page.php) the calendar widget appears correctly...
<br >
<br >
<br >My second question is about the language of the module. I tried to put it in french but nothing changes... in my _config.php file I have this line
<br >

Calendar::set_param('language','fr');


<br >I tried fr in caps and nothing changed...
<br >
<br >Thank you,
<br >Gabriel
<br >
<br >

Avatar
gabriel

Community Member, 7 Posts

8 June 2009 at 8:35pm

First problem solved, it seems I had a version of the module that had it wrong somewhere, downloaded it again and it works. And about the language problem, is it because there is no translation yet? (The old version I had didn't have a lang folder, so I didn't know where to look for) Is there somewhere I could look to see if anyone translated it or I have to make one?

Thanks,
Gabriel

Avatar
UncleCheese

Forum Moderator, 4096 Posts

9 June 2009 at 2:26am

AFAIK, everything in the event_calendar module is translated (I had some help from a German user). The only exception may be that calendar widget tool because it works with Javascript and bypasses all the PHP translations.

Avatar
gabriel

Community Member, 7 Posts

9 June 2009 at 7:26am

That means that for the calendar widget, I'd need to look in the Javascript file to find the months names and changed them in there?

And I also have a question for the Image Gallery module, is it possible to allow comments on photos? In the lightbox for example, or would I have to modify the module so it opens each photo in a new page type that has the comments function?

thanks
Gabriel

Avatar
UncleCheese

Forum Moderator, 4096 Posts

9 June 2009 at 7:58am

Yeah, you'd just have to extend the class and add that functionality. Pretty easy to do.

I'll look at that JS file. It may come with a lang selection.

Avatar
gabriel

Community Member, 7 Posts

9 June 2009 at 10:30am

Again I found where to change the language for the date picker, I was only looking in the datePicker.js, but the language file is in the jQuery.date.js

So thank you and I hope you didn't lose time with this.

Although I'd appreciate some tips on how to extend the class for the gallery, I just don't know exactly where to start... I'm new to Silverstripe and I have a hard time trying to find and understand what I'm looking for in the docs.

Thank you again,
Gabriel