original_string: public function SettingsController_DashboardSummaries_Create($Sender) {
        // Load javascript & css, check permissions, and load side menu for this page.
        $Sender->AddJsFile('settings.js');
        $Sender->Title(T('Dashboard Summaries'));
        $Sender->RequiredAdminPermissions[] = 'Garden.Settings.Manage';
        $Sender->RequiredAdminPermissions[] = 'Garden.Users.Add';
        $Sender->RequiredAdminPermissions[] = 'Garden.Users.Edit';
        $Sender->RequiredAdminPermissions[] = 'Garden.Users.Delete';
        $Sender->RequiredAdminPermissions[] = 'Garden.Users.Approve';
        $Sender->FireEvent('DefineAdminPermissions');
        $Sender->Permission($Sender->RequiredAdminPermissions, '', FALSE);
        $Sender->AddSideMenu('dashboard/settings');
        
        $this->ConfigureRange($Sender);
  
        // Load the most active discussions during this date range
        $UserModel = new UserModel();
        $Sender->SetData('DiscussionData', $UserModel->SQL
           ->Select('d.DiscussionID, d.Name, d.CountBookmarks, d.CountViews, d.CountComments')
           ->From('Discussion d')
           ->Where('d.DateLastComment >=', $Sender->DateStart)
           ->Where('d.DateLastComment <=', $Sender->DateEnd)
           ->OrderBy('d.CountViews', 'desc')
           ->OrderBy('d.CountComments', 'desc')
           ->OrderBy('d.CountBookmarks', 'desc')
           ->Limit(10, 0)
           ->Get()
        );
        
        // Load the most active users during this date range
        $Sender->SetData('UserData', $UserModel->SQL
           ->Select('u.UserID, u.Name')
           ->Select('c.CommentID', 'count', 'CountComments')
           ->From('User u')
           ->Join('Comment c', 'u.UserID = c.InsertUserID', 'inner')
           ->GroupBy('u.UserID, u.Name')
           ->Where('c.DateInserted >=', $Sender->DateStart)
           ->Where('c.DateInserted <=', $Sender->DateEnd)
           ->OrderBy('CountComments', 'desc')
           ->Limit(10, 0)
           ->Get()
        );
        
        // Render the custom dashboard view
        $Sender->Render('dashboardsummaries', '', 'plugins/VanillaStats');
     }
code: public function SettingsController_DashboardSummaries_Create($Sender) {
        // Load javascript & css, check permissions, and load side menu for this page.
        $Sender->AddJsFile('settings.js');
        $Sender->Title(T('Dashboard Summaries'));
        $Sender->RequiredAdminPermissions[] = 'Garden.Settings.Manage';
        $Sender->RequiredAdminPermissions[] = 'Garden.Users.Add';
        $Sender->RequiredAdminPermissions[] = 'Garden.Users.Edit';
        $Sender->RequiredAdminPermissions[] = 'Garden.Users.Delete';
        $Sender->RequiredAdminPermissions[] = 'Garden.Users.Approve';
        $Sender->FireEvent('DefineAdminPermissions');
        $Sender->Permission($Sender->RequiredAdminPermissions, '', FALSE);
        $Sender->AddSideMenu('dashboard/settings');
        
        $this->ConfigureRange($Sender);
  
        // Load the most active discussions during this date range
        $UserModel = new UserModel();
        $Sender->SetData('DiscussionData', $UserModel->SQL
           ->Select('d.DiscussionID, d.Name, d.CountBookmarks, d.CountViews, d.CountComments')
           ->From('Discussion d')
           ->Where('d.DateLastComment >=', $Sender->DateStart)
           ->Where('d.DateLastComment <=', $Sender->DateEnd)
           ->OrderBy('d.CountViews', 'desc')
           ->OrderBy('d.CountComments', 'desc')
           ->OrderBy('d.CountBookmarks', 'desc')
           ->Limit(10, 0)
           ->Get()
        );
        
        // Load the most active users during this date range
        $Sender->SetData('UserData', $UserModel->SQL
           ->Select('u.UserID, u.Name')
           ->Select('c.CommentID', 'count', 'CountComments')
           ->From('User u')
           ->Join('Comment c', 'u.UserID = c.InsertUserID', 'inner')
           ->GroupBy('u.UserID, u.Name')
           ->Where('c.DateInserted >=', $Sender->DateStart)
           ->Where('c.DateInserted <=', $Sender->DateEnd)
           ->OrderBy('CountComments', 'desc')
           ->Limit(10, 0)
           ->Get()
        );
        
        // Render the custom dashboard view
        $Sender->Render('dashboardsummaries', '', 'plugins/VanillaStats');
     }
code_tokens: public function SettingsController_DashboardSummaries_Create ( $ Sender ) { // Load javascript & css, check permissions, and load side menu for this page.
   $ Sender -> AddJsFile ( 'settings.js' ) ; $ Sender -> Title ( T ( 'Dashboard Summaries' ) ) ; $ Sender -> RequiredAdminPermissions [ ] = 'Garden.Settings.Manage' ; $ Sender -> RequiredAdminPermissions [ ] = 'Garden.Users.Add' ; $ Sender -> RequiredAdminPermissions [ ] = 'Garden.Users.Edit' ; $ Sender -> RequiredAdminPermissions [ ] = 'Garden.Users.Delete' ; $ Sender -> RequiredAdminPermissions [ ] = 'Garden.Users.Approve' ; $ Sender -> FireEvent ( 'DefineAdminPermissions' ) ; $ Sender -> Permission ( $ Sender -> RequiredAdminPermissions , '' , FALSE ) ; $ Sender -> AddSideMenu ( 'dashboard/settings' ) ; $ this -> ConfigureRange ( $ Sender ) ; // Load the most active discussions during this date range
   $ UserModel = new UserModel ( ) ; $ Sender -> SetData ( 'DiscussionData' , $ UserModel -> SQL -> Select ( 'd.DiscussionID, d.Name, d.CountBookmarks, d.CountViews, d.CountComments' ) -> From ( 'Discussion d' ) -> Where ( 'd.DateLastComment >=' , $ Sender -> DateStart ) -> Where ( 'd.DateLastComment <=' , $ Sender -> DateEnd ) -> OrderBy ( 'd.CountViews' , 'desc' ) -> OrderBy ( 'd.CountComments' , 'desc' ) -> OrderBy ( 'd.CountBookmarks' , 'desc' ) -> Limit ( 10 , 0 ) -> Get ( ) ) ; // Load the most active users during this date range
   $ Sender -> SetData ( 'UserData' , $ UserModel -> SQL -> Select ( 'u.UserID, u.Name' ) -> Select ( 'c.CommentID' , 'count' , 'CountComments' ) -> From ( 'User u' ) -> Join ( 'Comment c' , 'u.UserID = c.InsertUserID' , 'inner' ) -> GroupBy ( 'u.UserID, u.Name' ) -> Where ( 'c.DateInserted >=' , $ Sender -> DateStart ) -> Where ( 'c.DateInserted <=' , $ Sender -> DateEnd ) -> OrderBy ( 'CountComments' , 'desc' ) -> Limit ( 10 , 0 ) -> Get ( ) ) ; // Render the custom dashboard view
   $ Sender -> Render ( 'dashboardsummaries' , '' , 'plugins/VanillaStats' ) ; }
docstring: A view containing most active discussions & users during a specific time
  period. This gets ajaxed into the dashboard homepage as date ranges are
  defined.
docstring_tokens: A view containing most active discussions & users during a specific time period . This gets ajaxed into the dashboard homepage as date ranges are defined .