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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • how to use nick name instead of first name for individual display name
Pages: [1]

Author Topic: how to use nick name instead of first name for individual display name  (Read 3942 times)

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
how to use nick name instead of first name for individual display name
June 02, 2011, 07:50:40 am
For individuals, the `display_name` field seems to be populated by concatenating `first_name`, `middle_name`, and `last_name`. This behavior makes sense, however I'd strongly prefer that it use `nick_name` instead of `first_name` when possible, and I'd also rather that it not use `middle_name` at all. I'd like for this same logic to apply to the `sort_name` field as well.

I'm okay with hacking core files to make this change in logic. Would someone be able to point me to the right location in the code to to make this change? I can take care of updating the data in the database -- I just need to figure out where the logic is in code. Thanks!

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: how to use nick name instead of first name for individual display name
June 02, 2011, 07:59:42 am
Check CRM/Contact/BAO/Individual.php and format() function.

HTh
Kurund
Found this reply helpful? Support CiviCRM

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: how to use nick name instead of first name for individual display name
June 02, 2011, 08:02:27 am
Of course don't forget to keep your hacks to yourself:

http://wiki.civicrm.org/confluence/display/CRMDOC40/Directories

I.E. in the right location. :)
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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • how to use nick name instead of first name for individual display name

This forum was archived on 2017-11-26.