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) »
  • Drupal CiviCRM Contact Reference formatter, tiny enhancement
Pages: [1]

Author Topic: Drupal CiviCRM Contact Reference formatter, tiny enhancement  (Read 610 times)

chiebert

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Drupal CiviCRM Contact Reference formatter, tiny enhancement
December 18, 2012, 10:50:20 am
Hey - while trying to track down some way to get Rules tokens to work better with CiviCRM contact reference fields, I discovered that one cannot choose '(raw) contact_id' as a field formatter option. So I added one. I haven't created patches for CiviCRM Drupal files before, so the attached is a simple diff [old file] [changed file] > filename.patch, to be applied to civicrm_contact_ref.module - and clear caches, of course. Now, in addition to choosing 'Title (link)' and 'Title (plain)', one also gets 'CID (raw)'.

Is this a stupid idea?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Drupal CiviCRM Contact Reference formatter, tiny enhancement
December 18, 2012, 11:33:01 am

IMO, nothing is a stupid idea. Anything with a patch is even better :)

Can you please file an issue and attach the patch to it. A context diff (diff -u) would be even better and easier to apply

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

chiebert

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Drupal CiviCRM Contact Reference formatter, tiny enhancement
December 18, 2012, 02:23:08 pm
Thanks, Lobo. Done: http://issues.civicrm.org/jira/browse/CRM-11510

I cleaned up the labels for the formatters (Contact ID instead of CID), and added both a formatter linked to the contact page as well as the original raw cid.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Drupal CiviCRM Contact Reference formatter, tiny enhancement

This forum was archived on 2017-11-26.