Jump to:

791 Posts in 369 Topics by 303 members

Widgets

SilverStripe Forums » Widgets » Event Calendar Widget

Discuss SilverStripe Widgets.

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

Page: 1 2
Go to End
Author Topic: 8641 Views
  • devnull
    Avatar
    Community Member
    7 Posts

    Re: Event Calendar Widget Link to this post

    question ... is this compatible with 2.3.3 ... this doesn't do anything for me.

  • devnull
    Avatar
    Community Member
    7 Posts

    Re: Event Calendar Widget Link to this post

    Tessory, sorry for the short reply. It was getting late for me.
    I wanted to look into this more before i posted anything to make sure it wasn't something i was mistaking though. It seems I can't pick this in the widgetarea in the cms for any page.
    I noticed a trend in widgets that don't work for me. all the widgets that don't work use the functions to return static $title and $description. The widgets that work use a declaration of static $title = '' instead of function calls. also there are no "_t()" calls in the ones that work.

    Thank you for any help, I hope I am not just missing something here.

    -devnull

  • Pipifix
    Avatar
    Community Member
    54 Posts

    Re: Event Calendar Widget Link to this post

    It seems the widget(1.3) doesn't work in 2.4Rc1. No rendering in the sidebar. Backend works fine. Any tips?

    Thanks Pipifix

  • Jstein
    Avatar
    Community Member
    2 Posts

    Re: Event Calendar Widget Link to this post

    On my site, I think I'm getting the request failed non-live version of the widget. How do I trouble shoot to find out if the request has failed and how to fix it? The widget has all dates selectable, not just the dates with events.

    Thank you,
    Jay

  • Lavan
    Avatar
    Community Member
    2 Posts

    Re: Event Calendar Widget Link to this post

    Hey Pipipix

    We have finally got this widget to work. Not sure if this is the right way to go about it, but it made it work for us (with out having to hard code it into the page).

    In the EventCalendarWidget.php we first changed the "class EventCalendarWidget_Controller extends Controller" to be "class EventCalendarWidget_Controller extends Widget_Controller" .

    Then moved the
    public function Content()
    {
    ...............
    ...............
    }
    down in to the Widget_Controller. I think that alternativly you could just put an Initi fuction in the widget_Controller that calls this function.

    Now the eventcalendar widget shows up in my side bar.

    Hope that helps...
    L

  • pbolger
    Avatar
    Community Member
    22 Posts

    Re: Event Calendar Widget Link to this post

    I'm running 2.4.1 and have widgetEventCalendar-1.3, from this thread. The calendar shows in the front end without modification now, but with problems:

    1: The calendar is displayed twice... Commenting this line "return parent::Content();" in EventCalendarWidget.php seems to fix this.

    2: All the calendar links go to 404. (http://mydomain.com/undefined2010-10-10)

    3: The Widget loads Jquery v1.3.2 - which means in my installation I have two Jquery libraries loaded at the same time. I'm not sure if this affects performance, but it seems crazy to be loading pretty well the same library twice.

  • ldf
    Avatar
    Community Member
    3 Posts

    Re: Event Calendar Widget Link to this post

    Hi,
    i have the same Problem as you. I see the Widget in the Sidebar twice, the links go to 404.... did you find any solution to this?

  • Lavan
    Avatar
    Community Member
    2 Posts

    Re: Event Calendar Widget Link to this post

    Kia Ora,

    Sorry I have only just checked this forum again. Yes we found a slight fix for the 404 issue. In the EventCalendarWidget.js file, about line 22 I added in a bit more code. I noticed that when I was on the Calendar page and clicked on a date my address became something like "http://localhost/websitename/calendar/view/2010-11-09 " , but the event calendar widget wanted to go somewhere else.

    So i added in the "view/" to my line (22?). This is what it now reads. location.href = this.options.calendar+'view/' + dateText; // <-- added in the 'view/' here..

    Again not sure if this is the right way to do (not too much of a coder myself). But it seemed to work.

    Also pbolger: The javascript stuff loading twice. I think the orginal EventCalendarWidget.php said "Requirements::javascript('widget_EventCalendar/javascript/jquery-1.3.2.min.js');" at about line 95. I changed this, so mine read "Requirements::javascript('sapphire/thirdparty/jquery/jquery.js');" This means that it reads the main sapphire jquery, and it wont try to load the script twice. Mine still requires other javascipt as well, as I have rolled a custom theme for it.

    Hope that kinda helps.

    L

    8641 Views
Page: 1 2
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.