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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Calendar for community site


Go to End


4 Posts   796 Views

Avatar
simples

Community Member, 77 Posts

20 May 2013 at 6:57am

Hi,

I am working with Version 2.4 of Silverstripe and would like to enable logged-in users to add and remove events to a calendar after logging into the CMS. This is a community site and I do not want these users to be able to update the events of other users.

Regarding the frontend, on the home page of the site there is a small space which is just big enough for links to the next 3 events to be visible. A scroll bar allows users to scroll to other events.

As such the calendar will be used on a page with page type set to homepage.

I am using Google Calendar at the moment because this is what my client asked me to add. However now there is a need for logged in users to add and remove events to the calendar without the potential for these users to update the events of other users. I also do not want a solution whereby the user has to first log into the CMS and then log into the calendar. I just want a single log-in solution. I suspect that accommodating both of these requirements using Google Calendar will be rather involved so this is why I am now looking at non-Google solutions.

Any ideas on how I could set this up?

Thanks if anyone has any suggestions.

Avatar
simples

Community Member, 77 Posts

22 May 2013 at 3:07am

Edited: 22/05/2013 3:29am

OK it looks like I have some of this sussed now. This is what I did.

I installed code into the following folder

event_calendar by downloading from http://www.silverstripe.org/event-calendar/

I then found I needed to install code into the following folders

dataobject_manager from http://www.silverstripe.org/dataobjectmanager-module/
uploadify from http://www.silverstripe.org/uploadify-module/

You must name folders exactly as shown above otherwise images used to decorate the CMS interface will not be found when uploading files. I found out the name of the dom and uploadify folders from the Silverstripe 2.4 book and found out the name of the event_calender folder by doing some detective work when an error message appeared.

You can then do the following.

As administrator create a calendar for each user group. For each calendar set access to the group and the site administrator/s.

Finally, populate the scrollable window on the homepage (by querying the calendar and calendarDateTime tables) with links which when clicked take the user to the announcement page.

One issue still remaining is to suss out what the difference is between announcements and events and figure out if both are needed. If not, either figure out how to disable what is not needed, or cater for instances where the user may add an event or add an announcement.

Other issues which I still need to suss out is how to avoid unlink errors to a cache template appearing when adding an announcement and how to avoid a horizontal scroll bar appearing on the announcement page.

Avatar
simples

Community Member, 77 Posts

31 May 2013 at 11:42pm

In the end I decided to write my own calendar module rather than try to resolve the issues outlined in my last comment. I have not published the module because I have been unable to figure out how to fully segregate code when creating a module in Silverstripe. In addition to this the code has only been tested in Version 2.4.

However if anyone would like to see the code, I will post it here.

Avatar
simples

Community Member, 77 Posts

1 June 2013 at 6:42am

In fact I have posted it in the post shown in the link below.

http://www.silverstripe.org/general-questions/show/23878#post322379