Answers.Body: <p>The event dashboard shows <code>recent and upcoming events (where start date is 7 days ago OR later)</code>. If you want to show all events of current year than you can do it in either one of the two way given below.</p>
  
  <ol>
  <li><p>Over-ride CRM/Event/BAO/Event.php and edit the where clause at line <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/BAO/Event.php#L357" rel="nofollow noreferrer">357</a> and <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/BAO/Event.php#L419" rel="nofollow noreferrer">419</a>.</p></li>
  <li><p>Create an extension and use <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_pageRun/" rel="nofollow noreferrer">pageRun()</a> hook to over-ride <code>$eventSummary</code> variable in smarty and also copy paste CRM_Event_BAO_Event::getEventSummary(); into your extension and update the where clause at line <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/BAO/Event.php#L357" rel="nofollow noreferrer">357</a> and <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/BAO/Event.php#L419" rel="nofollow noreferrer">419</a>. Below code shows how you can use the hook(not tested)</p></li>
  </ol>
  
  <blockquote>
  <pre><code>function abc_civicrm_pageRun(&amp;$page) {   
      if ($page-&gt;getVar('_name') == 'CRM_Event_Page_DashBoard') {
        // Call to your custom function which is replica of
        // CRM_Event_BAO_Event::getEventSummary(); but change in where clause.
        $eventSummary = EXTENSION_CLASS_FILE_PATH::getEventSummary();
        $enableCart = Civi::settings()-&gt;get('enable_cart');
        $eventSummary['tab'] = CRM_Event_Page_ManageEvent::tabs($enableCart);
        $page-&gt;assign('eventSummary', $eventSummary);   
     } 
  }
  </code></pre>
  </blockquote>
  
  <p>PS - #1 is not recommended as it will be difficult to maintain during Incremental upgrade.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-12T07:15:36.627Z
Answers.Text: Would it be too complicated to add a parameter to set the day limits in the CiviEvents preferences?
Answers.UserDisplayName: masetto
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-05T13:04:58.163Z
Answers.Text: The ability to choose the number of events in the Event dashboard is a great idea. Has an extension as described above been created? If so where can I find it?
Answers.UserDisplayName: EricLB
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-24T08:54:58.133Z
Answers.LastActivityDate: 2018-01-24T08:54:58.133Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>The 'Event Summary' part in the Events Dashboard has a very useful view of a participant status count per event, but it only shows a few events.
  How can I customize it to show ALL events in the current year?</p>
  
  <p>The 'Manage Events' page does not have this option to see how many people are in what status, per event.</p>
  
Tags: <civievent>
Title: How to Customize Events Dashboard
ThreadText: # How to Customize Events Dashboard
  
  (Asked by: username_0 on 2018-01-23)
  
  The 'Event Summary' part in the Events Dashboard has a very useful view of a participant status count per event, but it only shows a few events.
  How can I customize it to show ALL events in the current year?
  
  The 'Manage Events' page does not have this option to see how many people are in what status, per event.
  
  **Tags:** civievent
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-24. Score: 2 | Accepted answer
  
  The event dashboard shows recent and upcoming events (where start date is 7 days ago OR later). If you want to show all events of current year than you can do it in either one of the two way given below.
  
  Over-ride CRM/Event/BAO/Event.php and edit the where clause at line 357 and 419.
  Create an extension and use pageRun() hook to over-ride $eventSummary variable in smarty and also copy paste CRM_Event_BAO_Event::getEventSummary(); into your extension and update the where clause at line 357 and 419. Below code shows how you can use the hook(not tested)
  
  
  function abc_civicrm_pageRun(&$page) {   
      if ($page->getVar('_name') == 'CRM_Event_Page_DashBoard') {
        // Call to your custom function which is replica of
        // CRM_Event_BAO_Event::getEventSummary(); but change in where clause.
        $eventSummary = EXTENSION_CLASS_FILE_PATH::getEventSummary();
        $enableCart = Civi::settings()->get('enable_cart');
        $eventSummary['tab'] = CRM_Event_Page_ManageEvent::tabs($enableCart);
        $page->assign('eventSummary', $eventSummary);   
     } 
  }
  
  
  PS - #1 is not recommended as it will be difficult to maintain during Incremental upgrade.
  
  > **Comments:**
  > **username_2**: Would it be too complicated to add a parameter to set the day limits in the CiviEvents preferences?  
  > **username_3**: The ability to choose the number of events in the Event dashboard is a great idea. Has an extension as described above been created? If so where can I find it?  
  
  ---
  
  