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

Calendar event module - upcoming events on homepage?


Reply

36 Posts   5957 Views

Avatar
dreamstudio

19 March 2009 at 7:26am (Last edited: 19 March 2009 7:31am), Community Member, 48 Posts

Im trying to add a similar thing... on every page have a upcoming events.. lets say the next 5 and put it into a side panel.... I looked at the code given above but it didnt work and wanted to know... do the pages have to be event page types or can it be put on any page and can you shed a little more light on where to add the code

Also ... is there a way to modify the look / size of the calender and then put that in the sidebar too

one other thing... when i click on the calendar for a date that has something.. it doesnt goto the correct url... it drops part of the url so instead of http://79.170.40.231/domainname.co.uk/events/2009-03-24 it goes to http://79.170.40.231/events/2009-03-24

if you actually click on an event it works ok just not on the calendar

is there a way to change the look of the calendar on the right side.. ie colours etc?

Avatar
UncleCheese

19 March 2009 at 7:42am 4085 Posts

Do you have the event_calendar module or the calendar module? Just making sure.. the code I sent you works for the event_calendar module.

To change the look and feel of the calendar widget, just edit your CSS file. It's all styled in an external stylesheet that is meant to be overridden.

To get the upcoming events on every page, just add this to your Page_Controller:

function UpcomingEvents()
{
return DataObject::get_one("Calendar")->upcomingEvents(5);
}

And you'll be able to do a <% control UpcomingEvents %> on any page.

The bug that was causing the calendar to redirect to the wrong URL was fixed a few versions ago. Make sure you do an SVN update.

Avatar
dreamstudio

19 March 2009 at 10:31am (Last edited: 19 March 2009 10:36am), Community Member, 48 Posts

I tried getting the latest version that I can see at http://svn.codespaces.com/bluehousegroup/event_calendar but it asks for a username and password

the version I got was on your bluehouse group website... so not sure what version im running but cant get the latest due to passwording on the link

Also, forgive my ignorance... im picking up SS well but not sure when you say to put that code into the page controller.. do you mean the code

function UpcomingEvents()
{
return DataObject::get_one("Calendar")->upcomingEvents(5);
}

into page.ss under my theme or another location?

Avatar
UncleCheese

19 March 2009 at 10:55am 4085 Posts

That's really weird that the SVN is trying to authenticate you. I have anonymous checkout set up.

I posted a new SVN export to extensions.bluehousegroup.com. Try that.

Avatar
dreamstudio

19 March 2009 at 11:08am Community Member, 48 Posts

I tried downloading that file but all the files inside the zip are 0.... so it cant export them

Avatar
dreamstudio

19 March 2009 at 9:57pm Community Member, 48 Posts

I moved the files out of the zip by hand as a few files were 0 byte empty files.. which seems to have worked..

The only question is where do i copy the code you mentioned, which pages to load them to

Avatar
banal

19 March 2009 at 11:25pm (Last edited: 19 March 2009 11:25pm), Community Member, 901 Posts

Hi UncleCheese

I just tried to download and install your calendar module and encountered the same SVN authentication problem as "dreamstudio" did.
Here's the command i used:

svn co http://svn.codespaces.com/bluehousegroup/event_calendar ~/Sites/SilverStripe-v2.3.1-rc2/event_calendar
Authentication realm: <http://svn.codespaces.com:80> Code Spaces Subversion Repository Authentication
Password for 'roman':

Any idea what could cause this?
Best - Roman

Avatar
dreamstudio

19 March 2009 at 11:48pm Community Member, 48 Posts

After getting the zip file from your website working... installed and works ok, however couple of questions

On the documentation it says about blind down on the configuration menu... my install doesnt have that just the number of events, default date header and future dates.. so could it be the file i downloaded from your website is still an old version

Also you mentioned orignally about being able to put the upcoming events details on a homepage.... so is it possible to put the calendar widget on ANY page of a SS site... ie I want to put it down the side so people can go through the calendar and click a date.. as well as upcoming dates listed below that on the sidebar - is it possible or can you only drop calendar features on calendar pages

Lovely module by the way....