We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Guido,

    The options I used were pulled from those available in the corresponding 'getlist' processor. You're right, some may not have a place for MaLTE. Others were put in place to override system defaults, for example to prevent pagination or maintain original functionality with your first iteration. (e.g. dir ASC, etc) ...you could probably remove the ability to pass as a snippet property, but will still want to ensure it is sent to the processor when the default value won't do.

    Good luck on your Extra!
      Mike Reid - www.pixelchutes.com
      MODx Ambassador / Contributor
      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
      ________________________________
      Where every pixel matters.
      • 20413
      • 2,877 Posts
      Thanks for sharing this sweet extra! smiley

      Here is how I run it for an internal office site where
      the work day is 9 hours (including lunch) 5 days per week
      = the timeout gap is then 15 hours = 900 minutes (If I understand this correct)

      [[malteStartDate]] - [[malteEndDate]]
      [[MaLTE?
        &timeout=`900`
        &dateStart=`[[malteStartDate]]`
        &dateEnd=`[[malteEndDate]]`
      ]]
      

      malteStartDate
      <?php
      return date("Y-m-d", strtotime('-7 weekdays'));


      malteEndDate
      <?php
      return date("Y-m-d", strtotime('+1 weekday'));

      Modification 1
              if ($diff >= $timeoutsec) {
                  // the next step is more than $timeout seconds after than the current.
                  // It's a new workunit. Something like yesterday - today or "before lunch"
                  $output .= '<div><strong>'.$thisTime.'</strong> » '.timeformat($workunit).'</div>';
                  $totalseconds += $workunit;
                  $output .= '<div>Total time: '.timeformat($totalseconds).'</div>';
                  $output .= '</p><p><div></div>';
                  $workunit = 0;
              }
      

      Modification 2
      function timeformat($seconds)
      {
          return sprintf('%02d:%02d:%02d', $seconds / 60 / 60 / 24, ($seconds / 60 / 60) % 24, ($seconds / 60) % 60, $seconds % 60);
      }
      


      Total time: 00:14:32 between 2015-10-29 - 2015-11-10

      [ed. note: mrhaw last edited this post 8 years, 5 months ago.]
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
      • MaLTE is in the official MODX repository now: http://modx.com/extras/package/malte