We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21800
    • 174 Posts
    Hello again,
    how can I build a tv that gets the Time input in a eeStartTime tv as unixtime (or maybe better contrariwise)?
    It is needed for ditto purposes (ditto only works with unixtime while EE works with a more ’real’ date format)

    any help is appreciated
      • 21800
      • 174 Posts
      another item I have
      how to add the full event "timeSpan" to the "template" of the output a click on a calendar day shows (handy for events of more than one day)?
      I’m somewhat confused about the way these templates work. I would think simply to add a line with the appropriate placeholder i.e. [+timeSpan+], but that didn’t work for me.
        • 29076
        • 615 Posts
        Where can I change the text Coming events under the calendar in Easy events mini? I searched through all the files that comes with the snippet, but I couldn’t find it any where.
          I think, thererfor I am! But what I am, and why...?
          • 21800
          • 174 Posts
          It is in the snippet "EasyEvents_ListMini" in the propperties. Click the propperties tab of the snippet.
            • 29076
            • 615 Posts
            OK, right in front of my nose. grin So close, so easy.

            Thanks.
              I think, thererfor I am! But what I am, and why...?
              • 21800
              • 174 Posts
              Who am I? And if yes - how many?
                • 29076
                • 615 Posts
                wink
                  I think, thererfor I am! But what I am, and why...?
                  • 18995
                  • 13 Posts
                  Thanks Bruno17 for you fix to the "create temporary table" issue, worked for me.

                  Could Bruno17’s method be used in a future update to?

                  Great modx extra, thanks for your efforts.
                    www.mediagang.co.uk: Developing your business online
                    • 19741
                    • 90 Posts
                    Hi jaredc,

                    is there a way to show expired events with Ditto if there are no coming events?

                    I tried:
                    $_templates['noEvents'] = <<<STOP
                    <p>[+missingEventsMessage+]</p>
                    <p>[!Ditto &parents=`28` ... !]</p>
                    STOP;


                    in my config-file, but only the Ditto-call appears, not it’s results.
                      Bye,
                      Mithrandir
                      • 19741
                      • 90 Posts
                      I’ll answer my last question. wink

                      a.) You have to change the TV EasyEvents_Start to "unixtime", because Ditto-Parameter "sortDir" only works with this format (?).

                      b.) Append three lines in your config-file in misc-section (german dateformat - change it, if you like):
                      $_misc['dittoDateformat'] = '%d.%m.%Y';
                      $_misc['dittoTpl'] = 'DE_tplEasyEvent';
                      $_misc['dittoSum'] = '5';

                      These values will be used in the Ditto-call (set dittoSum to ’all’ if you want to show all events) - see d.).


                      c.) You need a chunk [the name is "DE_tplEasyEvent" -see b.)] like this - you have to change the href-part and "28" (id of your calendar-page) to your needs:
                      <div class="easyEventsList_group">
                          <div class="easyEventsList_heading"><h2>[+date+]</h2></div>
                          <div class="easyEventsList_title"><a href="/de/home/kalender/simcopack_online.html?ee_id=[+id+]" onclick="return EasyEvents.getDetails('28',[+id+])">[+pagetitle+]</a></div>
                          <div class="easyEventsList_description">[+description+]</div>
                      </div>


                      d.) Change the snippet "EasyEvents_ListMini" at the end (append second line with "$listDetails .= ..."):
                       // Default message if no events found
                          if ( !$listDetails )
                          {
                              $listDetails .= $g_easyEvents->templify('noEvents',array($g_easyEvents->misc['missingEventsMessagePlaceholder'] => $g_easyEvents->lang['noEvents']));
                              $listDetails .= $modx->runSnippet("Ditto",array( 'parents' => $nodes, 'sortBy'=>'EasyEvents_Start','sortDir'=>'DESC','tpl'=>$g_easyEvents->misc['dittoTpl'],'summarize'=>$g_easyEvents->misc['dittoSum'],'dateSource'=>'EasyEvents_Start','dateFormat'=>$g_easyEvents->misc['dittoDateformat']));
                          }
                      }
                      
                      $modx->setPlaceholder($listHolder,$listDetails);
                      
                      return;
                      ?>


                      You’re done.
                        Bye,
                        Mithrandir