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) »
  • Trying to add feature to "View Contact" screen for individual
Pages: [1]

Author Topic: Trying to add feature to "View Contact" screen for individual  (Read 1220 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Trying to add feature to "View Contact" screen for individual
April 26, 2009, 08:04:59 pm
I am trying to add 2 calculated output fields on the "View Contact" screen for an individual. For the first calculated output field, I need date of birth and a custom field that I already defined ( called "birth before sunset" For the second calculated field, I need date of death and a custom field ( called "death before sunset" )

Based on the inputs, I will calculate the dates in the Hebrew calendar and display it on the page. 

What files do I need to update?

Thanks,
Sarah
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Trying to add feature to "View Contact" screen for individual
April 27, 2009, 08:46:19 am
Sarah,

You will have to modify CRM/Contact/Page/View/Tabbed.php, view() function.

HTh

Kurund
Found this reply helpful? Support CiviCRM

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Trying to add feature to "View Contact" screen for individual
April 28, 2009, 09:01:37 am
I have the feature added, but in a very simplistic way. I have attached a screen shot. Notice it displays the Hebrew birth date and if the person is deceased, then it shows the Hebrew date of death.     I would like to make this feature more robust. I need  a Administrative setting ( under Administer CiviCRM -> Global Settings -> Date Settings) that could be used to turn on support for Hebrew dates.   How do I create a new admin setting?  Hopefully this feature can be made part of a future release of CiviCRM as many Jewish and Israeli organizations would use this feature.    I will do the coding to get this feature to be complete.   Currently I am relying on custom fields to store the extra date info ( ie "before sunset" )  I would like to have a standard place to store the date info: what would be a better place to put it? Should I create a new table such as "civicrm_dates_extended"?   For each date I need the "before sunset" flag and the time zone.   

Hopefully this feature can be done in a way that can accommodate other non-Western calendars in the future. 
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Trying to add feature to "View Contact" screen for individual
April 28, 2009, 10:39:34 am
There is already civicrm_preference_date table, you can add new format and then use it for your dates. I guess logic can be similar to birth ?
Check http://drupal.demo.civicrm.org/civicrm/admin/setting/preferences/date?reset=1

HTh

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Trying to add feature to "View Contact" screen for individual

This forum was archived on 2017-11-26.