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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • New module that links a civicrm entity and a drupal node
Pages: [1]

Author Topic: New module that links a civicrm entity and a drupal node  (Read 1085 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
New module that links a civicrm entity and a drupal node
January 30, 2011, 04:01:58 am
Hi,

Working on a support system, the idea is to have the "content/discussion" part on drupal and the overview as activities on civi.

Got several options I can think off:
- custom field on activities in civi to store the node id
- CCK on drupal to store the civicrm activity id
- new table

What do you think ? What's the best option ?

No matter what, I'd need to write a few hooks
- create the node if creating the activity
- creating the activity if creating the node
- display page hook to put the link to the node on the activity
- probably update a bit the node when updating the activity, and vice versa

Not sure how to handle the delete. probably changing the status of the corresponding element  'orpheaned' instead of simply deleting it

X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: New module that links a civicrm entity and a drupal node
January 30, 2011, 05:50:33 am
Quote from: xavier on January 30, 2011, 04:01:58 am
Working on a support system, the idea is to have the "content/discussion" part on drupal and the overview as activities on civi.

Got several options I can think off:
- custom field on activities in civi to store the node id
- CCK on drupal to store the civicrm activity id
- new table

I would think a CCK field--the code you write will be in Drupal so it may be easier to keep as much as possible in Drupal.

Quote from: xavier on January 30, 2011, 04:01:58 am
Not sure how to handle the delete. probably changing the status of the corresponding element  'orpheaned' instead of simply deleting it

Makes sense to me. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • New module that links a civicrm entity and a drupal node

This forum was archived on 2017-11-26.