Aller directement à la fin des métadonnées
Aller au début des métadonnées


Documentation Search


CiviCRM 4.1 Documentation

Developer Resources


CiviCRM books!

Make sure to check out our Online User/Administrator and Developer Guides! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

Currently (CiviCRM 4.0.0) the available event listings do not represent whether an event is fully-booked in the listing itself. Users must click on an event before being told that an event is fully-booked on the event info page. This is because it is not a straightforward database query to find out if an event is fully booked as there are multiple factors such as pending places to take into account. This page shows a way to use the Drupal Views PHP module to create an event listing incorporating a fully-booked flag.

  1. In Drupal install the Views and Views PHP modules
  2. Add a new view...
  3. Add and configure the Event fields you want to display, here we will just display the title and make that link to the event page...
  4.  Now add a "Global: PHP" field with setup and value code like this...
  5. That's pretty much it. You'll probably want to do things like exclude the Event ID from the display, make the PHP field inline, sort by event start date and filter to only show events in the future. Here for example is a filter to show future events only...

After all that here's the sort of page we can generate...

  • Popular Event is fully booked
  • Unpopular Event is available
Étiquette
  • Aucun