Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » Preview: Event Calendar Module

Discuss all other Modules here.

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

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Go to End
Author Topic: 39421 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: Event Calendar Module Link to this post

    Many apologies. I just realized I did miss one <% control Times %>. Should be set now.

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: Preview: Event Calendar Module Link to this post


    class MyCustomCalendar_Controller extends Calendar_Controller
    {
    public function FundRaisingEvents()
    {
    return parent::Events("Type = 'Fundraising');
    }
    }

    Even if I remove or close " it always causes php error. Would be it possible to give a full sample of MyCustomCalendar.php ?

    Thanks! Victor

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: Event Calendar Module Link to this post

    That was just example code that was not to be taken literally. You need to actually create a custom calendar class with your custom fields. Please read the SS wiki entry "Recipes: Extending the Event Calendar." It starts with a basic customization, like you're trying to do, and then gets progressively more complex toward the end.

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: Preview: Event Calendar Module Link to this post


    You need to actually create a custom calendar class with your custom fields. Please read the SS wiki entry "Recipes: Extending the Event Calendar."
    {/color]

    Already started to read.

    Issues:

    1) Repeating events: how to limit the repetition? End date seems to have no effect
    2) Repeating events and ICS: it looks like it creates files for each instance of the repeating event rather than a single file.
    It would be nice to have export of repeating event, of selected category, of everything
    3) What about ICS import?

    Thank you for your efforts. Victor

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: Event Calendar Module Link to this post

    1) Repeating events: how to limit the repetition? End date seems to have no effect

    ==> Known bug. Not sure when I'll be able to fix it. Requires rewriting the recurring event logic.

    2) Repeating events and ICS: it looks like it creates files for each instance of the repeating event rather than a single file.
    It would be nice to have export of repeating event, of selected category, of everything

    ==> Another request that's been on the books for a while. The syntax for a recurring event is kind of complicated in ICS format, so this is a ways off, unfortunately.

    3) What about ICS import?

    ==> Working on it as we speak!

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: Preview: Event Calendar Module Link to this post

    I follow literally

    http://doc.silverstripe.com/doku.php?id=recipes:extending_the_event_calendar&s=recipes%20calendar

    > We’ll add the following below the $_Content line:

    There is $Content but not $_Content in Calendar.ss copied as WorkshopHolder.ss

    Even if I change two instances of $Content to $_Content

    Register now!
    Category:
    Sponsor:

    return empty.

    Following "more" returns just white page with a single "Workshop".

    Calendar works as supposed to, and yes, I have run /dev/build

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: Event Calendar Module Link to this post

    $_Content doesn't exist anymore I should update that docuementation. You were correct to just use $Content.

    If you just get a blank page that says "Workshop" it means you haven't created a Workshop_Controller class.

  • Xeal
    Avatar
    Community Member
    37 Posts

    Re: Preview: Event Calendar Module Link to this post

    Hey I've tried looking up this error elsewhere but I couldn't find a way to fix it. Love the module by the way it's really great. Only thing is whenever I create an Event and try to access it via the Calendar (on the published site) I get this error.

    [Warning] file_get_contents() [function.file-get-contents]: Filename cannot be empty

    Source

    268    /**
    269     * Used by <% include Identifier %> statements to get the full
    270     * unparsed content of a template file.
    271     *
    272     * @uses getTemplateFile()
    273     * @param string $identifier A template name without '.ss' extension or path.
    274     * @return string content of template
    275     */
    276    public static function getTemplateContent($identifier) {
    277       return file_get_contents(SSViewer::getTemplateFile($identifier));
    278    }
    279    
    280    /**
    281     * @ignore
    282     */
    283    static private $flushed = false;

    39421 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
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.