CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event Dashboard, changing the tpl view
Pages: [1]

Author Topic: Event Dashboard, changing the tpl view  (Read 1563 times)

gbear

  • Guest
Event Dashboard, changing the tpl view
May 06, 2008, 05:30:01 pm
Hi - I am interested in increasing the number events showing in the event summary (to include all active->future events instead of just 10).  Also removing the recent registrations list. 

I've looked in \templates\CRM\Event\Page\DashBoard.tpl where I see the output - I see the call to eventSummary and the foreach statement looping, but  not seeing where that limit of 10 is being set.  I then started looking in the DAO classes to see if it was hard coded somewhere but not able to locate how this is being limited.

Thanks a lot,
-Greg

MichaƂ Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Event Dashboard, changing the tpl view
May 06, 2008, 07:21:43 pm
Greg,

Number of events on CiviEvent Dashboard is hardcoded in CRM/Event/BAO/Event.php, in getEventSummary function, somewhere around line 329 (assuming you're running CiviCRM 2.0). Look for line saying: "LIMIT      0, 10" - changing 10 to some other number will give you larger number of events. Removing LIMIT clause completely should make the dashboard display all the events.

You might also want to make a feature request in our issue tracker (http://issues.civicrm.org) to make it configurable in one of upcoming versions or, perfect scenario, put some resources into implementing this and contributing a patch.

Remember it will be a local modification that will disappear after an upgrade, so you'll have to reintroduce until system provide configurable setting for this.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

gbear

  • Guest
Re: Event Dashboard, changing the tpl view
May 06, 2008, 09:53:10 pm
Thanks kindly, that was exactly the info I needed. 

So many ways to implement the desktop views... from giant settings pages to google desktop-like functionality.  I think its pretty well implemented the way it is actually.  Most things (except this limit) have been in the template layer so easily customized by a competent html/css person.  Sort of a slippery slope  to expose much of that functionality up to site admins/users.  Could add a little "rows=xx" parameter to the eventSummary.events call perhaps so it could all be handled in the theme.

Thanks for pointing me to the correct source file.

advicepig

  • Guest
Re: Event Dashboard, changing the tpl view
June 24, 2009, 07:05:32 pm
Note that in 2.2 you have to change the limit in two queries.

If you change the limit in GetEventSummary, you should also change the limit in GetParticipantCount! If not, you will only be able to see the number of participants for the first ten events with registrations.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event Dashboard, changing the tpl view

This forum was archived on 2017-11-26.