If you are willing to take a look at the installation send me a mail on [email protected] or add me on MSN with [email protected] then we can see if it's just me or a bug?
I also tried your package and must say -it's great.
But I also have still trouble with the events and version 1.2.
All events I create don't appear - and the only event of the preinstalled events with the package i can see is the "A little event" - the others aren't visible, too.
Thanks for the comment. The calendar doesn't seem to be very aware internationally. It currently checks against a hard coded list of month names to see if there are any events this month. I may need to make this work using numbers.
Do you know of a way I can test internationally without switching the global server settings? Or if you could potentially send test access to dan [at] geckonm.com I'll take a look.
Dan
p.s. I'm currently working on separating the calendar into its own package, so this could be mighty helpful.
Hi Dan, I really love this package- perfect for not having to remove styling before apply your own, and I like having a good look at how you're doing things with XSLT.
I just wanted to add my vote to making the events functionality a stand alone package - I'm a bit nervous about unpicking them from the rest of this package and I could see it being very popular.
Have been looking at packaging the calendar up as a separate package today, and it's beginning to get a bit complicated...
I'd like the ability to "Calendarise Anything", but am having trouble with xpat5h queries built up from strings. Perhaps will create a post in a day or two to ask the experts.
I've successfully managed to get the calendar function implemented on a site and have used it as a booking calendar for a tennis club. The calendar is tied into the Umbraco membership controls so that members can make bookings on the court of their choice (I use a different calendar for each of the 3 courts).
I've written some macros so that they can also amend or delete their own bookings. The system works really well but I would like to extend it further to include booking / event validation so that when a booking is made, the start & end time for that particular booking are compared against existing bookings to see if they clash.
I just wondered if you can explored this area, and if so have you any pointers you could give me? Would this be better implemented in XSLT or through an Event Handler (which I have yet to play with!)?
@Nick - That sounds really really nice - have you considered talking with Dan and then creating an calendar / event package? It would be really nice - and then maybe at the same time make the calendar a bit more dynamic in sence of nationality and so?
This sounds like a great implementation - I'd love to see it at work.
As for checking bookings, that may be better implemented in a usercontrol but xslt is my only hammer and when all you've got is a hammer everything starts to look like a nail!
If javascript dependencies were allowed, I'd maybe create a simple xslt macro that takes a date and room as input and returns a simple "booked" or "not booked" variable. This script could then be called via jquery ajax (or similar) as the user requests a booking to check the chosen dates against bookings.
Would love to see that released as a package - If I can be of any assistance let me know
At the moment I'm still in the experimental stage to see what is possible. I've combined Dan's calendar with Doc2Form which I use for amending existing bookings. I'm currently working on setting up email confirmations for bookings and amendments which I've nearly managed to crack.
Dan - do you have any more pointers about a usercontrol or XSLT I could use for checking bookings? I'm not quite at the Umbraco Level 2 stage yet so any ideas you have would be most useful!!
OK, this is by no means a complete solution but it should get you off in the right direction.
Basically, I've created an xslt file that will accept two dates (start, end) as input, then check through all events on the website. In your case you'd probably be checking against "bookings" and not events. If it finds an event that clashes with the dates passed in, it will add a record to an xml file which is returned with the info on the clashes.
I'd use this as a standalone script that I call via jQuery ajax, then parse the returned xml in jQuery. If we find clashes we inform the user and ask them to pick other dates, along with giving them the reason(s) why it was declined.
You'd need to keep adding rules for clashes - I've only got the following:
1) Does the chosen start time fall between the start/end times of any bookings? 2) Does the chosen end time fall betweent the start/end times of any bookings? 3) Do any bookings fall within the complete range of chosen start/end times?
So you will probably need more rules here, I ran out of brainpower and need to move on to something else!
<!-- The following variables define what (if any) gap should be left between bookings (in minutes) --> <xsl:variable name="bookingStartGap" select="number(15)" /> <xsl:variable name="bookingEndGap" select="number(15)" />
<!-- Change MIME type to XML --> <xsl:value-of select="umbraco.library:ChangeContentType('application/xml')" />
And here's what the script returns, ready to be parsed
<bookings> <booking id="1141" name="eventTest" start="2010-03-23T11:46:00" end="2010-03-23T13:46:00" error="Booking start time between event start/end times"/> <booking id="1141" name="eventTest" start="2010-03-23T11:46:00" end="2010-03-23T13:46:00" error="Event occurs between selected times"/> </bookings>
So if no errors are returned you must be able to book.
You'll also note I started adding $bookingStartGap and $bookingEndGap, anticipating that there may need to be a gap of several minutes between bookings. You'd also need some error checking for bad dates etc.
So this should set you off on the right path, without fully solving the problem! An interesting problem though.
Events
Hi,
I just installed Umbraco 4.0.2.1 and this package.
But the Events wont appear when I create them - is this a known bug or?
Hi Daniel
It's definitely not known, and it just might be a bug...
I tested it on the test server and it's working fine -> http://beta2.geckonm.com/events.aspx and http://beta2.geckonm.com/events/test-for-daniel-horn.aspx.
Did you fill in all required fields, especially the event dates?
Dan
yeah - filled out everything but nothing appearing - can't really see where it goes wrong..
If you are willing to take a look at the installation send me a mail on [email protected] or add me on MSN with [email protected] then we can see if it's just me or a bug?
Sure thing - Will catch up tomorrow.
Dan
We found and fixed a bug relating to the casing of Month names, now fixed and 1.2 released.
Hi Dan,
I also tried your package and must say -it's great.
But I also have still trouble with the events and version 1.2.
All events I create don't appear - and the only event of the preinstalled events with the package i can see is the "A little event" - the others aren't visible, too.
BTW: I'm working on a german windows server 2003.
Any idea ?
Thanks,
Thorsten
Hi Thorsten
Thanks for the comment. The calendar doesn't seem to be very aware internationally. It currently checks against a hard coded list of month names to see if there are any events this month. I may need to make this work using numbers.
Do you know of a way I can test internationally without switching the global server settings? Or if you could potentially send test access to dan [at] geckonm.com I'll take a look.
Dan
p.s. I'm currently working on separating the calendar into its own package, so this could be mighty helpful.
I found the solution:
I changed the english month names to german monthnames in eventArea.xslt and everything works fine now :-)
Thorsten
Hi Dan,
i will make a demo-installation with the package on my german server for you.
With this installation you be able to test your package internationally.
I'll send you the test access later.
Thorsten
I wonder if there's a way to get the system "month name" without hard-coding - will investigate
Ok I'm getting towards making this more generic and less reliant on hardcoded strings. Watch this space...
Thanks for the heads-up Daniel and Thorsten
Dan
Dan,
you could use a piece of c# in your xslt to get the names according to the culture that is set:
For example:
public virtual string MonthName(DateTime _date)
{
return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(CultureInfo.CurrentCulture.DateTimeFormat.MonthNames[(int)_date.Month - 1]);
}
HTH,
Peter
Hi Dan,
i've setup a fresh umbraco installation with your package on my german server:
http://beta2.sitekern.com
You will get username and password via mail.
Thorsten
Hi Dan, I really love this package- perfect for not having to remove styling before apply your own, and I like having a good look at how you're doing things with XSLT.
I just wanted to add my vote to making the events functionality a stand alone package - I'm a bit nervous about unpicking them from the rest of this package and I could see it being very popular.
All the best,
Barney
Hi Dan,
Please add my vote to the growing list to see the Events as a separate package. This is just what I have been looking for in terms of functionality!
Thanks,
Nick.
Argh, I'll try to get time to do this soon, sorry!
Dan
Ha ha - no worries. I know the pub is calling at this time of year!
Nick
Hi Dan (or anyone else for that matter),
Would you be able to help me with a bit of XSLT that will allow me to display the current months events within a homepage list?
It doesn't need to scroll through any other months, just list the events in that current month with the date icon/element.
I'm not sure how to call on the events from the homepage as it's not $currentPage... ?
Cheers man,
Barney
Ignore me, I managed to do it by making a copy of the eventArea XSLT control and hacking away at what I didn't need.
Cheers,
Barney
Cool, glad you got it sorted. I had an extended hiatus over xmas there, but my new years resolution is to package the calendar up!
Hi Dan - just seeing if you've managed to make any further progress on the calendar package?
Cheers,
Nick.
Hi Nick
Apologies, I've been way too busy with client work. I'll probably just do it at home now... urgh, sorry!
Dan
Hi Dan, if I wanted to display only this weeks events (rather than this month) how would I go about it?
I've had a look and you seem to be working with a $currentMonthYear variable, but I can't work out where you've defined it?
Any help you can offer much appreciate as ever mate!
Cheers,
Barney
That variable is a (slightly hacky) way of checking dates, and is defined as such
So it basically, just gives something like "November,2009". This is then checked in the for-each against the event date as follows
I think if I was changing this to be a weekly calendar I'd be looking at something like http://www.exslt.org/date/functions/week-in-year/index.html, but it isn't something I've been able to test myself.
Dan
Erk out of my depth here. Any further pointers you could offer?
Thanks
Have a look at PDCalendar. You can define whatever period to list your events.
http://our.umbraco.org/projects/pdcalendar
HTH,
Peter
I'd also recommend PDCalendar, having used it for several projects in the past.
Dan
Yeah that looks good actually. Cheers chaps...
If you need any assistance, just give me a shout :)
Have been looking at packaging the calendar up as a separate package today, and it's beginning to get a bit complicated...
I'd like the ability to "Calendarise Anything", but am having trouble with xpat5h queries built up from strings. Perhaps will create a post in a day or two to ask the experts.
Dan
Hi Dan,
I've successfully managed to get the calendar function implemented on a site and have used it as a booking calendar for a tennis club. The calendar is tied into the Umbraco membership controls so that members can make bookings on the court of their choice (I use a different calendar for each of the 3 courts).
I've written some macros so that they can also amend or delete their own bookings. The system works really well but I would like to extend it further to include booking / event validation so that when a booking is made, the start & end time for that particular booking are compared against existing bookings to see if they clash.
I just wondered if you can explored this area, and if so have you any pointers you could give me? Would this be better implemented in XSLT or through an Event Handler (which I have yet to play with!)?
Cheers,
Nick.
@Nick - That sounds really really nice - have you considered talking with Dan and then creating an calendar / event package? It would be really nice - and then maybe at the same time make the calendar a bit more dynamic in sence of nationality and so?
Hi Nick
This sounds like a great implementation - I'd love to see it at work.
As for checking bookings, that may be better implemented in a usercontrol but xslt is my only hammer and when all you've got is a hammer everything starts to look like a nail!
If javascript dependencies were allowed, I'd maybe create a simple xslt macro that takes a date and room as input and returns a simple "booked" or "not booked" variable. This script could then be called via jquery ajax (or similar) as the user requests a booking to check the chosen dates against bookings.
Would love to see that released as a package - If I can be of any assistance let me know
At the moment I'm still in the experimental stage to see what is possible. I've combined Dan's calendar with Doc2Form which I use for amending existing bookings. I'm currently working on setting up email confirmations for bookings and amendments which I've nearly managed to crack.
Dan - do you have any more pointers about a usercontrol or XSLT I could use for checking bookings? I'm not quite at the Umbraco Level 2 stage yet so any ideas you have would be most useful!!
Cheers,
Nick.
Do you store the start and end datetimes of the bookings?
Yes, I've got start and end datetimes and a court number (1,2 or 3) stored as properties.
OK, this is by no means a complete solution but it should get you off in the right direction.
Basically, I've created an xslt file that will accept two dates (start, end) as input, then check through all events on the website. In your case you'd probably be checking against "bookings" and not events. If it finds an event that clashes with the dates passed in, it will add a record to an xml file which is returned with the info on the clashes.
I'd use this as a standalone script that I call via jQuery ajax, then parse the returned xml in jQuery. If we find clashes we inform the user and ask them to pick other dates, along with giving them the reason(s) why it was declined.
You'd need to keep adding rules for clashes - I've only got the following:
1) Does the chosen start time fall between the start/end times of any bookings?
2) Does the chosen end time fall betweent the start/end times of any bookings?
3) Do any bookings fall within the complete range of chosen start/end times?
So you will probably need more rules here, I ran out of brainpower and need to move on to something else!
Here's the xslt
And here's how it is called (plus live example at this url)
And here's what the script returns, ready to be parsed
So if no errors are returned you must be able to book.
You'll also note I started adding $bookingStartGap and $bookingEndGap, anticipating that there may need to be a gap of several minutes between bookings. You'd also need some error checking for bad dates etc.
So this should set you off on the right path, without fully solving the problem! An interesting problem though.
Good luck,
Dan
Hi Dan,
Thanks ever so much for your work on this - I'll have an in-depth look later when I get back from work and let you know how I get on!!
Kind regards,
Nick.
Has there been any progress on this recently? I am looking to implement something similar.
Chau
Hi,
I implented the Events functionality of the Business Website Startekit in this website:
www.dirk-voorhoof.ugent.be
But when I click on the export events (iCal) link and try to open the .ics file I get this message from Outlook (2010):
the file calendarExport-1.ics is not a valid internet agenda data file
Anyony experienced the same problem with this iCal function in the Business Website Starter Kit ?
Thanks for your help,
Anthony Candaele
Belgium
is working on a reply...