2

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.

1 Answer 1

3

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.

  1. Over-ride CRM/Event/BAO/Event.php and edit the where clause at line 357 and 419.

  2. 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.

2
  • Would it be too complicated to add a parameter to set the day limits in the CiviEvents preferences?
    – masetto
    Jul 12, 2023 at 7:15
  • 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?
    – EricLB
    Oct 5, 2023 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.