Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel Horn 319 posts 344 karma points
    Nov 26, 2009 @ 18:14
    Daniel Horn
    0

    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?

  • dandrayne 1138 posts 2262 karma points
    Nov 26, 2009 @ 18:22
    dandrayne
    0

    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

  • Daniel Horn 319 posts 344 karma points
    Nov 26, 2009 @ 18:33
    Daniel Horn
    0

    yeah - filled out everything but nothing appearing - can't really see where it goes wrong..

     

     

  • Daniel Horn 319 posts 344 karma points
    Nov 26, 2009 @ 18:35
    Daniel Horn
    0

    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?

  • dandrayne 1138 posts 2262 karma points
    Nov 26, 2009 @ 18:37
    dandrayne
    0

    Sure thing - Will catch up tomorrow.

    Dan

  • dandrayne 1138 posts 2262 karma points
    Nov 27, 2009 @ 11:07
    dandrayne
    0

    We found and fixed a bug relating to the casing of Month names, now fixed and 1.2 released.

  • Thorsten Hoffmann 48 posts 119 karma points
    Dec 03, 2009 @ 15:17
    Thorsten Hoffmann
    0

    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

     

     

  • dandrayne 1138 posts 2262 karma points
    Dec 03, 2009 @ 15:49
    dandrayne
    0

    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.

  • Thorsten Hoffmann 48 posts 119 karma points
    Dec 03, 2009 @ 15:51
    Thorsten Hoffmann
    0

    I found the solution:

    I changed the english month names to german monthnames in eventArea.xslt and everything works fine now :-)


    Thorsten

     

  • Thorsten Hoffmann 48 posts 119 karma points
    Dec 03, 2009 @ 15:55
    Thorsten Hoffmann
    0

    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

     

     

  • dandrayne 1138 posts 2262 karma points
    Dec 03, 2009 @ 16:09
    dandrayne
    0

    I wonder if there's a way to get the system "month name" without hard-coding - will investigate

  • dandrayne 1138 posts 2262 karma points
    Dec 03, 2009 @ 18:35
    dandrayne
    0

    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

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Dec 03, 2009 @ 19:45
    Peter Dijksterhuis
    0

    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

  • Thorsten Hoffmann 48 posts 119 karma points
    Dec 03, 2009 @ 22:16
    Thorsten Hoffmann
    0

    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

  • BarneyHall 141 posts 210 karma points
    Dec 07, 2009 @ 15:34
    BarneyHall
    0

    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

     

  • Nick Rowntree 7 posts 27 karma points
    Dec 15, 2009 @ 18:34
    Nick Rowntree
    0

    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.

  • dandrayne 1138 posts 2262 karma points
    Dec 16, 2009 @ 12:21
    dandrayne
    0

    Argh, I'll try to get time to do this soon, sorry!

    Dan

  • Nick Rowntree 7 posts 27 karma points
    Dec 16, 2009 @ 12:27
    Nick Rowntree
    0

    Ha ha - no worries.  I know the pub is calling at this time of year!

     

    Nick

  • BarneyHall 141 posts 210 karma points
    Dec 22, 2009 @ 15:42
    BarneyHall
    0

    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

  • BarneyHall 141 posts 210 karma points
    Dec 22, 2009 @ 18:18
    BarneyHall
    0

    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

  • dandrayne 1138 posts 2262 karma points
    Jan 05, 2010 @ 11:56
    dandrayne
    0

    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! 

  • Nick Rowntree 7 posts 27 karma points
    Feb 02, 2010 @ 14:17
    Nick Rowntree
    0

    Hi Dan - just seeing if you've managed to make any further progress on the calendar package? 

     

    Cheers,

     

    Nick.

  • dandrayne 1138 posts 2262 karma points
    Feb 02, 2010 @ 15:27
    dandrayne
    0

    Hi Nick

    Apologies, I've been way too busy with client work.  I'll probably just do it at home now... urgh, sorry!

    Dan

  • BarneyHall 141 posts 210 karma points
    Feb 04, 2010 @ 13:27
    BarneyHall
    0

    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

  • dandrayne 1138 posts 2262 karma points
    Feb 04, 2010 @ 13:56
    dandrayne
    0

    That variable is a (slightly hacky) way of checking dates, and is defined as such

    <xsl:variable name="currentMonthYear" select="concat($MonthName,',',$Year)" />

    So it basically, just gives something like "November,2009".  This is then checked in the for-each against the event date as follows

    <xsl:for-each select="$currentPage//node [@nodeTypeAlias='Event' and Exslt.ExsltStrings:lowercase($currentMonthYear) = Exslt.ExsltStrings:lowercase(umbraco.library:FormatDateTime(data [@alias='eventStartDateTime'], 'MMMM,yyyy'))]">

    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

  • BarneyHall 141 posts 210 karma points
    Feb 04, 2010 @ 15:33
    BarneyHall
    0

    Erk out of my depth here. Any further pointers you could offer?

    Thanks

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 04, 2010 @ 15:47
    Peter Dijksterhuis
    0

    Have a look at PDCalendar. You can define whatever period to list your events.

    http://our.umbraco.org/projects/pdcalendar

    HTH,

    Peter

  • dandrayne 1138 posts 2262 karma points
    Feb 04, 2010 @ 15:59
    dandrayne
    0

    I'd also recommend PDCalendar, having used it for several projects in the past. 

    Dan

     

  • BarneyHall 141 posts 210 karma points
    Feb 04, 2010 @ 16:35
    BarneyHall
    0

    Yeah that looks good actually. Cheers chaps...

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 04, 2010 @ 16:39
    Peter Dijksterhuis
    0

    If you need any assistance, just give me a shout :)

  • dandrayne 1138 posts 2262 karma points
    Feb 08, 2010 @ 18:27
    dandrayne
    0

    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

  • Nick Rowntree 7 posts 27 karma points
    Mar 26, 2010 @ 18:43
    Nick Rowntree
    0

    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.

  • Daniel Horn 319 posts 344 karma points
    Mar 26, 2010 @ 20:01
    Daniel Horn
    0

    @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?

  • dandrayne 1138 posts 2262 karma points
    Mar 29, 2010 @ 11:39
    dandrayne
    0

    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



  • Nick Rowntree 7 posts 27 karma points
    Mar 30, 2010 @ 12:03
    Nick Rowntree
    0

    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.

  • dandrayne 1138 posts 2262 karma points
    Mar 30, 2010 @ 12:39
    dandrayne
    0

    Do you store the start and end datetimes of the bookings?

  • Nick Rowntree 7 posts 27 karma points
    Mar 30, 2010 @ 14:08
    Nick Rowntree
    0

    Yes, I've got start and end datetimes and a court number (1,2 or 3) stored as properties.

  • dandrayne 1138 posts 2262 karma points
    Mar 30, 2010 @ 15:15
    dandrayne
    0

    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

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">


    <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">


    <!-- 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')" />

    <!-- format our datetimes -->
    <xsl:variable name="start" select="string(umbraco.library:FormatDateTime(umbraco.library:RequestQueryString('start'),'yyyy-MM-ddThh:mm:00'))" />
    <xsl:variable name="end" select="string(umbraco.library:FormatDateTime(umbraco.library:RequestQueryString('end'),'yyyy-MM-ddThh:mm:00'))" />

    <xsl:variable name="matchedBookings">
    <bookings>
    <xsl:for-each select="$currentPage/ancestor-or-self::root//node[@nodeTypeAlias='event']">
    <!--<xsl:if test="umbraco.library.DateDiff('16-02-2010 16:00', '16-02-2010 17:00', 'm')"> = 60 -->
    <xsl:if test="umbraco.library:DateDiff($start,./data[@alias='eventStart'], 'm') &gt;= 0 and umbraco.library:DateDiff($start,./data[@alias='eventEnd'], 'm') &lt;= 0">
    <booking id="{@id}" name="{@nodeName}" start="{./data[@alias='eventStart']}" end="{./data[@alias='eventEnd']}" error="Booking start time between event start/end times" />
    </xsl:if>
    <xsl:if test="umbraco.library:DateDiff($end,./data[@alias='eventStart'], 'm') &gt;= 0 and umbraco.library:DateDiff($end,./data[@alias='eventEnd'], 'm') &lt;= 0">
    <booking id="{@id}" name="{@nodeName}" start="{./data[@alias='eventStart']}" end="{./data[@alias='eventEnd']}" error="Booking end time between event start/end times" />
    </xsl:if>
    <xsl:if test="umbraco.library:DateDiff($end,./data[@alias='eventStart'], 'm') &lt;= 0 and umbraco.library:DateDiff($end,./data[@alias='eventEnd'], 'm') &lt;= 0">
    <booking id="{@id}" name="{@nodeName}" start="{./data[@alias='eventStart']}" end="{./data[@alias='eventEnd']}" error="Event occurs between selected times" />
    </xsl:if>
    </xsl:for-each>
    </bookings>
    </xsl:variable>

    <!--<textarea rows="30" cols="50"><xsl:copy-of select="$matchedBookings" /></textarea>-->

    <xsl:copy-of select="msxml:node-set($matchedBookings)" />


    </xsl:template>

    </xsl:stylesheet>

    And here's how it is called (plus live example at this url)

    http://playground.geckonm.com/products/checkAvailability.aspx?start=2010-03-23%2011:56&end=2010-03-23%2013:55

    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.

    Good luck,
    Dan

     

     

  • Nick Rowntree 7 posts 27 karma points
    Mar 30, 2010 @ 16:58
    Nick Rowntree
    0

    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.

  • Chau 66 posts 97 karma points
    May 04, 2010 @ 21:53
    Chau
    0

    Has there been any progress on this recently? I am looking to implement something similar.

    Chau

  • Anthony Candaele 1197 posts 2049 karma points
    Mar 24, 2011 @ 11:01
    Anthony Candaele
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft