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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • CiviCRM and Drupal Event Module
Pages: [1]

Author Topic: CiviCRM and Drupal Event Module  (Read 3168 times)

FredJones

  • Guest
CiviCRM and Drupal Event Module
August 06, 2007, 01:06:28 pm
I am now being asked to work on a site which uses a the Drupal Event Module, including some customizations like different types of events, and they appear a separate lists (blocks) on the site and there's a calendar and a 'this week' and 'this month' view etc.

Anyway, we want to add CiviCRM but want to know if it would be feasible to integrate CiviCRM with the regular Drupal Event Module so we could keep all of the custom stuff we have.

We still of course want to allow users to register and pay etc., but for these events, not those made inside of CiviCRM.

My guess is that it will be less work to just recreate the custom stuff inside of CiviCRM, but I wanted to see if anyone has any other ideas.

Thanks.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCRM and Drupal Event Module
August 06, 2007, 01:21:31 pm
I'm not familiar with current functionality for the Drupal Event module, so I can't really speak to that. However, you can expose CiviEvent events to the Drupal Calendar modules using the iCalendar feed. There are some timezone glitches with this - but also I've seen a patch for those.

CiviEvent allows you to setup any number of different types of events - and you could pretty easily query for these different types and create separate lists/blocks.
Protect your investment in CiviCRM by  becoming a Member!

FredJones

  • Guest
Re: CiviCRM and Drupal Event Module
August 08, 2007, 05:33:42 am
Quote from: Dave Greenberg on August 06, 2007, 01:21:31 pm
CiviEvent allows you to setup any number of different types of events - and you could pretty easily query for these different types and create separate lists/blocks.

Interesting. So you are saying I would make a block for this, and then use PHP to retrieve the events. Whlie I know php/mysql I don't know Drupal so well. Could you provide just the basic idea here how to get started? I don't know how to begin the SQL call--once I get started, I can study the civicrm schema and carry on from there.

Thanks!

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: CiviCRM and Drupal Event Module
August 08, 2007, 08:38:57 am
Warning, non-coder (me) giving advice :)

Basic idea:
(1) Create a Drupal PHP block
(2) Understand how the CiviCRM API works. (http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs)
Note the sample API code and the event APIs. You basically initialize CiviCRM, then get the information you need.
(3) Use get/create/update/delete events functionality to build your PHP snippet that will run inside a Drupal page or block.

That should be enough to get you started.
Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

FredJones

  • Guest
Re: CiviCRM and Drupal Event Module
August 08, 2007, 08:44:26 am
Great, this looks like all I need--the samples look perfect. Thank you very much.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCRM and Drupal Event Module
August 08, 2007, 10:21:57 am
Fred - For events listings, you need to use one of the new ("v2") APIs - civicrm_event_search. Usage for these is slightly different - you have to include the specific API  file(s) which contain the function(s) you need. I've added a working example for listing events for a given Event Type to the API Code Snippets section:

http://wiki.civicrm.org/confluence/display/CRMDOC/Using+CiviCRM+APIs+-+Code+Snippets#UsingCiviCRMAPIs-CodeSnippets-ListPublicEventsbyEventTypeinaBlock
Protect your investment in CiviCRM by  becoming a Member!

FredJones

  • Guest
Re: CiviCRM and Drupal Event Module
August 08, 2007, 10:39:55 am
Ah, now that is PERFECT!

Thank you VERY much.

:)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • CiviCRM and Drupal Event Module

This forum was archived on 2017-11-26.