Jump to:

10842 Posts in 2512 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Events module language problems and Image Gallery question

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1340 Views
  • gabriel
    Avatar
    Community Member
    7 Posts

    Events module language problems and Image Gallery question Link to this post

    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 >

  • gabriel
    Avatar
    Community Member
    7 Posts

    Re: Events module language problems and Image Gallery question Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Events module language problems and Image Gallery question Link to this post

    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.

  • gabriel
    Avatar
    Community Member
    7 Posts

    Re: Events module language problems and Image Gallery question Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Events module language problems and Image Gallery question Link to this post

    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.

  • gabriel
    Avatar
    Community Member
    7 Posts

    Re: Events module language problems and Image Gallery question Link to this post

    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

    1340 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.