We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    I have a question. In the module, all I’m getting is a message "No Events to list for Current Month". How do I access previous events to delete or edit them?
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 34084 ☆ A M B ☆
      • 756 Posts
      Quote from: sottwell at Apr 02, 2010, 09:19 PM

      I have a question. In the module, all I’m getting is a message "No Events to list for Current Month". How do I access previous events to delete or edit them?

      sorry for the delayed response, that is a major issue with all the previous releases that is addressed in the coming, very very soon, 0.0.5b release.

      in short the only way to edit this is to change the class file; you can try the following
      //-- change Line 249 (the following)
      $result = $this->_getEvents();
      
      //-- to this Note: the first value, 5, is the number of events to list per page (default is 20 if Null)
      $result = $this->_getEventsPagination(20,(isset($_REQUEST['pg']) ? $_REQUEST['pg'] : 0 )); 
      $pagination = $result[1];
      $result = $result[0];
      


      then add the following to the mxCalendar.class.php file

      //-- Add this new function to the class file
      		//-- Events with pagination
                      function _getEventsPagination($limit=20,$page=0,$filter=NULL){
                          global $modx;
      		    switch($filter){
      			default:
      			
      				$where_or[] = 'startdate >=  \''.date("Y-m-d").'\' ';
      				$where_or[] = '`repeat` REGEXP  \''.date("Y-m-d").'\'';
      				$where_or[] = 'enddate <=  \''.date("Y-m-d").'\'';
      				$where[] =  'E.active=1';
      		    }
                          $eventsSQL = 'SELECT *,E.id as eid,E.category as catID, C.name as category, (SELECT DATEDIFF(E.enddate, E.startdate)) as DurationDays, (SELECT TIMEDIFF(E.endtime, E.starttime)) as DurationTime
                                  FROM '.$modx->getFullTableName($this->tables['events']).' as E
                                  LEFT JOIN '.$modx->getFullTableName($this->tables['categories']).' as C
                                   ON E.category = C.id
                                  WHERE '.implode(' or ',$where_or).' and '.implode(' and ', $where).'
                                  ORDER BY startdate LIMIT '.($page*$limit).','.$limit;
                          $results = $modx->db->query($eventsSQL);
      
                          $eventsSQLpg = 'SELECT count(E.id)
                                  FROM '.$modx->getFullTableName($this->tables['events']).' as E
                                  LEFT JOIN '.$modx->getFullTableName($this->tables['categories']).' as C
                                   ON E.category = C.id
                                  WHERE '.implode(' or ',$where_or).' and '.implode(' and ', $where).'
                                  ORDER BY startdate';
                          $resultsCount = $modx->db->query($eventsSQLpg);
      		    $data = mysql_fetch_array($resultsCount);
      		    $numevents = $data[0];
      		    
      		    //-- create the pagination links
      		    $resltLastPage = ceil($numevents/$limit);
      		    $paginationLinks = '';
      		    for($x=0;$x<$resltLastPage;$x++)
      			$paginationLinks .= "  <a href='".(($x == $page) ? '#' : "?{$_SERVER['QUERY_STRING']}&pg={$x}")."' class='mxcPage".($x==$page ? 'active' : '')."'>".($x + 1)."</a> ";
      			
                          return array($results,$paginationLinks);
                      }		
      
      
        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
        Visit CharlesMx.com for latest news and status updates.
        • 34084 ☆ A M B ☆
        • 756 Posts
        Update:

        I’m getting very close to release the next updated package, which has significant improvements based on all those who have provided feedback.

        Currently I’m scheduling it to be released on April 15th, it’s taken more time in testing and documentation than anticipated.

        Thanks again to everyone for you patience on this release and I believe you’ll all be very happy with the improvements.

        cheers
          Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
          Visit CharlesMx.com for latest news and status updates.
          • 34084 ☆ A M B ☆
          • 756 Posts
          teaser of the category manager
            Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
            Visit CharlesMx.com for latest news and status updates.
            • 34084 ☆ A M B ☆
            • 756 Posts
            teaser of the configuration manager in new release 0.0.5

              Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
              Visit CharlesMx.com for latest news and status updates.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Is there any way to limit viewing to a given category to a given web user group?
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 30319
                • 406 Posts
                release?? smiley
                  • 34084 ☆ A M B ☆
                  • 756 Posts
                  Quote from: sottwell at Apr 16, 2010, 05:24 AM

                  Is there any way to limit viewing to a given category to a given web user group?

                  not yet, but it’s in the road map to setup ACL (access control layer) via the ModX groups for events and categories in the release after 0.0.5.

                  cheers
                    Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                    Visit CharlesMx.com for latest news and status updates.
                    • 34084 ☆ A M B ☆
                    • 756 Posts
                    Quote from: TomMLS at Apr 16, 2010, 05:42 AM

                    release?? smiley

                    sorry, I found some bugs late so I want to get those cleaned up today and plan to release later today and will post status here
                      Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                      Visit CharlesMx.com for latest news and status updates.
                      • 30319
                      • 406 Posts
                      That’s a good update...thank you!! smiley smiley