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) »
  • how to list events whose registration end date has not passed
Pages: [1]

Author Topic: how to list events whose registration end date has not passed  (Read 1025 times)

webcomm

  • Guest
how to list events whose registration end date has not passed
May 23, 2008, 08:41:12 am
Hi,

I'd like to generate a list of events whose registration end date has not passed.  I'm using the code snippet here...

http://wiki.civicrm.org/confluence/display/CRMDOC/List+of+Upcoming+CiviEvents+or+Feed+of+Events

...to display a list of events.  There is a parameter for "is_active", but it appears that "active" is defined as events that have not yet occurred.  What I want is to list events where registration has not yet closed.

Any ideas?

Thanks.
Ryan

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: how to list events whose registration end date has not passed
May 23, 2008, 08:59:15 am
First, I would just try changing this line:

   
Code: [Select]
  if ($now > $event['start_date']) continue;
To:

   
Code: [Select]
  if ($now > $event['registration_end_date']) continue;
You can also remove the "is_active" piece if necessary, but it doesn't seem like that should really be an issue, since it's just going on the flag for if an event is active.

webcomm

  • Guest
Re: how to list events whose registration end date has not passed
May 23, 2008, 10:48:42 am
Thanks.  That appears to be working.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • how to list events whose registration end date has not passed

This forum was archived on 2017-11-26.