We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    you can try this one
    http://modxcms.com/forums/index.php/topic,26825.0.html
    to manage events for Easy Events in the frontend
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 19227
      • 9 Posts
      Hello,
      I’ve been trying to template event pages, but can’t seem to output the time from the start/end date tvs (they just seem to give the date). Is there any way I can use a bit of Easy Events to give me something fairly similar to the mini list?
      Cheers,
      Mike
        • 36447
        • 98 Posts
        Does anyone have a working Easy Events calendar posted (other than jaredc’s demo)?

        I’d really like to see a few variously styled calendars that uses jaredc’s naming conventions used in the documentation.

        Wish List:
        1) Presently when a viewer clicks an event listed under "Coming events" on the calendar page, that event’s full entry appears. But then there’s no way to return to "Coming events" without refreshing the page. How about a backbutton to return to Coming events?
        2) What about events that repeat, say, every Wednesday? It’d be nice to enter these just once and not every week.

        Thanks, jaredc, for all your hard work--I wish all snippet documentation was that thorough!
          • 19741
          • 90 Posts
          Does anyone have a working Easy Events calendar posted (other than jaredc’s demo)?
          You can see a german "kalender" here: http://www.simcopack.de/de/home/kalender.html (only one event - but that is not my fault wink).
            Bye,
            Mithrandir
            • 16892
            • 107 Posts
            Is it possible to do this:

            When eE first loads, I don’t want the list of events to appear at the bottom (in div listContainerDivId) unless there is an event for that date. I want the items to appear in the div only when a date with events is clicked.

            Any help appreciated. Thanks for the great snippet.



              • 13577
              • 302 Posts
              @legatissima

              If you’re willing hack a bit, you can achieve your goal. Just open up your EasyEvents_ListMini snippet and comment out the code that loads the default list:

              // Default - adequate Easy Events query string variables not present
              else
              {
                  // Create today's events list
                  $today = date('Y-m-d',time());
                  $nowTime = date('g:i:s',time());
                  if ( $todaysEvents = $g_easyEvents->makeEventList($today,$today,$todayTitle,$gotoDetailsPage,$listPageId,0,FALSE,TRUE,$nowTime) )
                  {
                      $listDetails .= $todaysEvents;
                  }
              
                  // Coming events
                  $tomorrow = date('Y-m-d',time()+(60*60*24));
                  $endDay = $g_easyEvents->upperDateBoundary;
                  if ( $comingEvents = $g_easyEvents->makeEventList($tomorrow,$endDay,$comingTitle,$gotoDetailsPage,$listPageId,$maxEvents) )
                  {
                      $listDetails .= $comingEvents;
                  }
              
                  // Default message if no events found
                  if ( !$listDetails )
                  {
                      $listDetails .= $g_easyEvents->templify('noEvents',array($g_easyEvents->misc['missingEventsMessagePlaceholder'] => $g_easyEvents->lang['noEvents']));
                  }
              }
              


              I haven’t tested it, but that should do what you’re trying to do. I’d comment it out rather than delete so you can add it back later if you choose.
                Standard Disclaimer
                I could be totally wrong.
                • 18854
                • 1 Posts
                Hey Jared!

                First of all I’d like to give a huge »Thanks!« for your work you’ve done! I’m absolutely new to MODx and this is one of the first snippets i’ve ever used.
                I’m very happy with the way events are added and how they get displayed.

                I’ve got one thing on my wish-list, and it would be great if you or someone else could give a hint how this can be achieved (I’m not afraid of sort of »hacking« the code wink )

                _ Since i don’t have that much events i’d like to have a list of events per year. I don’t make use of the mini-calendar so there’s a plain list of all events per year. That works fine already with the exception of events that already happened. I’d like to have a list with all events even the ones that lie in the past.

                How could i achieve that? In which file or snippet do i have to look after this?


                Would be great if someone could help me!


                Best wishes from Germany!

                Marc.
                  • 18878
                  • 210 Posts
                  Hello Jared,

                  First, thanks a lot for such a great and useful snippet!

                  I’ve been creating events from inside the manager backend, and they display with no problems. But I wanted to give my end users the ability to publish events at the front end, so I installed the FDM snippet. This snippet does its job, I mean it creates documents with no problems.

                  The thing is: for some unknown reason, EasyEvents won’t list events created with FDM. These are the steps I followed to create an event:
                  1) Created a new document at the Front End with FDM and specified a start date
                  2) I verified at the Manager, and the document is there. It was succesfully created by FDM
                  3) I refreshed the "events" section of my website front end, but the event does not show up

                  What is really strange is that EasyEvents will show all events created at the manager, but events created at the frontend are being ignored. Then I compared both documents in the site_content table, and the only difference I found is the field createdby had the value -1 for all documents created with FDM. So I manually changed the value from -1 to 1 hoping that EasyEvents would recognize the event, but I had no sucess.

                  Are there any special table attributes that EasyEvents needs in order to display events?

                  Please, your help will be greatly appreciated.

                  Mc
                    • 13577
                    • 302 Posts
                    @mcclausky

                    I’m afraid I don’t know what the FDM snippet is. That aside, I’ll do my best to help you troubleshoot.

                    The first question is - does this front end tool also save the start/end date and show time template variable fields? These are critical to Easy Events displaying. Particularly the start date. My inclination is to start there. Those things won’t show up in the *site_content table because they’re stored in the *site_tmplvar_contentvalues table.

                    To-do:
                    When you create an Easy Event from the front end, and then look at it in the back end (via manager), are the template variable fields populated?

                    Update: Just found the FDM thing, am reading about it now.
                      Standard Disclaimer
                      I could be totally wrong.
                      • 18878
                      • 210 Posts
                      Jaredc,

                      Thanks for your answer.

                      Answering your questions:
                      - Yes, FMD will save the Start/end date template variable fields.
                      - Yes, when I create an Event at the Front End, then I look at it at the back end, and the template variable fields are populated.

                      I detected that when End Date is empty, FDM will assign a value of ’’ , but I guess the correct value should be null.

                      So I modified EasyEvents.class.php around line 941,

                      from:
                                          OR
                                          (
                                              e_tvcv.value IS NULL
                                              AND
                      


                      to:
                                          OR
                                          (
                                              (e_tvcv.value IS NULL OR e_tvcv.value='')
                                              AND
                      


                      and that fixed the problem! grin

                      I didn’t test the case when Start Date is empty, because I am forcing my users to fill the Start Date.

                      regards!

                      Mc