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 (Moderator: Dave Greenberg) »
  • "Subclassing" contact types
Pages: [1]

Author Topic: "Subclassing" contact types  (Read 4510 times)

outinsun

  • Guest
"Subclassing" contact types
September 16, 2008, 11:26:08 am
It appears as though you can't create new contact types beyond Individuals, Organizations, etc. Specifically, I can associate a custom data group with Individuals, but not with a specialization of Individuals. However, it also appears that you can use profiles to accomplish the same thing. If I have Custom Groups A and B, I could associate them both with Individuals, then create Profiles A and B where A only showed the A group fields and B only showed the B group fields.

Am I correct in believing a) that this is true and b) that I could apply profiles in all the places I need to (create contact, search contact, view contact, etc.)?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: "Subclassing" contact types
September 16, 2008, 01:07:29 pm
Hi,

you can certainly use profiles to edit, view, list contacts, and have as many different as you want (that's also easy to get different templates)


As for the 3 types of contacts:
1) if you don't need one of them (eg. household) you can rename it to something more specific (I did it to deal with "committee")
2) there is here and there in the code stuff to deal with sub-types. I'm not sure how finished and easy to configure it is (never used it, just some things in the code)

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

outinsun

  • Guest
Re: "Subclassing" contact types
September 16, 2008, 01:15:01 pm
Quote from: xavier on September 16, 2008, 01:07:29 pm

1) if you don't need one of them (eg. household) you can rename it to something more specific (I did it to deal with "committee")

Unfortunately I need several individual sub-types and 2 organization sub-types, so I'm way beyond 3 types total. If there isn't already an enhancement request for custom contact types I'll create one.

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: "Subclassing" contact types
September 16, 2008, 01:49:58 pm
Quote from: outinsun on September 16, 2008, 01:15:01 pm
Unfortunately I need several individual sub-types and 2 organization sub-types, so I'm way beyond 3 types total. If there isn't already an enhancement request for custom contact types I'll create one.

We do prefer a patch that addresses the issue along with the enhancement request. If just a suggestion, we prefer it be discussed in the forum: http://forum.civicrm.org/index.php/board,18.0.html

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

outinsun

  • Guest
Re: "Subclassing" contact types
September 16, 2008, 01:57:32 pm
Quote from: Donald Lobo on September 16, 2008, 01:49:58 pm
We do prefer a patch that addresses the issue along with the enhancement request. If just a suggestion, we prefer it be discussed in the forum: http://forum.civicrm.org/index.php/board,18.0.html
Still way too much of a CiviCRM n00b to start writing or contributing patches. Will take the dicsussion to the forum as requested.

Note: have been doing my best to read, Google, and experiment before posting questions like this.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: "Subclassing" contact types
September 17, 2008, 02:57:16 am
Another sugestion:

use tags to define your sub-types, and modify the templates to display or not the custom fields based upon these tags.

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: "Subclassing" contact types
September 17, 2008, 04:45:32 am
Hey Outinsun - can you flesh out a bit more about how you intend using your sub-types - with some real examples - you may find suggestions for some other workable routes using what is already available in civiCRM.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

outinsun

  • Guest
Re: "Subclassing" contact types
September 19, 2008, 10:03:21 am
Quote from: peterd on September 17, 2008, 04:45:32 am
Hey Outinsun - can you flesh out a bit more about how you intend using your sub-types - with some real examples - you may find suggestions for some other workable routes using what is already available in civiCRM.
I agree there are multiple ways to make this work with existing functionality. From a "language elegance" perspective, though, they are all "hacks" (not trying to use the term in a derogatory way). I can do everything in C with structs and function pointer tables that I can do in C++ with classes. But it's still more natural and clean to use classes. Given that so much of CiviCRM is extensible (and cleanly so), it's a shame that contact types themselves aren't.

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: "Subclassing" contact types
September 19, 2008, 10:18:00 am

There is only so many hours / day or so many features we can pack in any release. I suspect this will come in a future 2.x/3.x release

if this is important to you consider contributing code and/or sponsoring this feature. this kinda helps ensure it makes it into a sooner rather than later release

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

outinsun

  • Guest
Re: "Subclassing" contact types
September 19, 2008, 10:22:24 am
Quote from: Donald Lobo on September 19, 2008, 10:18:00 am

There is only so many hours / day or so many features we can pack in any release. I suspect this will come in a future 2.x/3.x release

if this is important to you consider contributing code and/or sponsoring this feature. this kinda helps ensure it makes it into a sooner rather than later release

lobo

Understood, and I didn't mean to rank on anyone because the feature doesn't exist yet. I also understand it's a non-trivial enhancement so I wouldn't expect myself or anyone else to get it done quickly. I suppose I was waxing philosophical and maybe that belongs in the discussion area rather than support. Apologies if that's true.

user99

  • Guest
Re: "Subclassing" contact types
April 22, 2009, 04:43:12 am
Quote from: xavier on September 16, 2008, 01:07:29 pm
Hi,

you can certainly use profiles to edit, view, list contacts, and have as many different as you want (that's also easy to get different templates)


As for the 3 types of contacts:
1) if you don't need one of them (eg. household) you can rename it to something more specific (I did it to deal with "committee")
2) there is here and there in the code stuff to deal with sub-types. I'm not sure how finished and easy to configure it is (never used it, just some things in the code)

X+


How did you manage to rename "Household" ?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: "Subclassing" contact types
April 22, 2009, 01:54:51 pm
You can either create a new language or (as I did) modify UK english to "translate" Household into whatever you want.

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

user99

  • Guest
Re: "Subclassing" contact types
April 23, 2009, 04:10:20 am
Quote from: xavier on April 22, 2009, 01:54:51 pm
You can either create a new language or (as I did) modify UK english to "translate" Household into whatever you want.

X+

Hi,

Can you please explain little more, where and what do I have to change, in order to change existing language words, or create new language.

Is it something that can be done with admin settings or some code change is needed?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • "Subclassing" contact types

This forum was archived on 2017-11-26.