Using civinode to build a directory
gmasky - September 17, 2007 - 12:54
| Project: | CiviNode And Civinode CCK |
| Version: | 4.7.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
I hv Drupal 4.7.0, Civicrm 1.7 and CCK installed. I have Civicrm profiles: Personal Profile, Business/Profession profile, Alumni profile and Group profile that appear in Drupal registration form.
I need to use the Personal profile and the Business/Profession profile to build a Business/Profession directory of registered Alumni. Something like the Yahoo Business directory.
Thus when an Alumni registers the information from the Personal and Business profile are used to directly create a directory.
I am not quite sure how Civinode and Civinode CCk work. Can the above be done.
Any help will be highly appreciated

#1
You may be able to do this using CiviCRM alone, since the information you enter via a CiviCRM profile goes into the user's corresponding contact in CiviCRM. CiviCRM then can let you display a directory, using its own UI.
CiviNode could potentially help you display the directory list from inside of a Drupal page, using CiviNode's CCK support to create a display page and displaying lists using CiviNode's Views support. I key things now on the user's Contact ID (used in CiviCRM), and not the user's UID (the Drupal user ID), but am considering adding this support as well.
#2
1. I have Personal profile and Business Profile (both civicrm profiles)
2. I have Drupal categories(taxonomy) and sub-categories (terms) for different businesses (say) Autos, Computers, Food and Drink...etc
3. Using CCK and Views I can easily create a directory, however this involves re-entering information of registered users.
4. I need to use the Civicrm Personal and Business profiles with Drupal categories to create a Yahoo type directory
5. The idea being at the time of registration a user filling out these details automatically gets slotted into the relevant category within the business directory
6.I need to expose the personal & business profile and drupal categories within the registration form.
How can this be done?
Thanks,
Gerry
#3
It's an interesting problem, and I'm not sure how to solve it.
If I understand you, a Business or a Person is represented as a CCK-enhanced node. I'm not sure if there is one node type or two from what you're describing.
I'm guessing that they are also represented as Drupal user, which has its corresponding CiviCRM contact record. You want an Individual record for a Person, and probably want an Organization record for a business (the latter is hard to do, since CiviCRM does not currently support this).
You would like to assign the corresponding node record to a category based upon data that got put into CiviCRM when the Drupal user registered.
If I understand you right, getting the data into CiviCRM is pretty easy if you use the same profiles in all Drupal registration forms. And you can pretty easily turn that data into CiviCRM Smart Groups by testing the data that was put into CiviCRM. Using CiviNode's CCK Widgets, you can create node types to display the data you put into CiviCRM.
That much won't be hard. Assigning the categories is the hard part. CiviNode doesn't know anything about Taxonomy, and it won't create the corresponding node for you automatically.
You'd need to write (or have somebody write for you) a Drupal module that uses CiviCRM's hook_civicrm_post to watch when a contact is created or updated. The module would do something like this:
It's not trivial to do this, but it is certainly possible. It wouldn't be a part of CiviNode, but would be something custom you used for any site you needed to organize this way.
#4
Ah, this is an alumni directory?
You'd still need to write a module similar to what I've described to assign categories, but at least you'd be dealing with only one node type.
#5
I may not ave expressed myself clearly.
I am trying to create a Business/Profession directory from the information of Alumni at the time of registration. When he registers he fills in the username and password. He then fills in the Civicrm profiles: Personal, Alumni and Group and Business/Profession
The Civicrm Personal Information has the regular fields:
First Name
Middle Name
Last Name
Nick Name
Gender
Birth Date
Marital Status
Family Details
Street Address (Primary)
Supplemental Address 1 (Primary)
City (Primary)
Postal Code (Primary)
Country (Primary)
Phone (Primary)
IM Screen Name (Primary)
Home URL
The Civicrm Business Profile has the following field
Business/Profession Title:
Business/Profession Description:
Business/Profession Address:
Business/Profession Address1:
City
Country
Zip
Business Telephone
Business email
Business website
A corresponding drupal and civicrm record is created for each user who registers. The corresponding civicrm record is for an individual and not an organization.
I am trying to categorize this information above into a directory using drupal taxonomy (vocabulary and terms)
The directory will have fields from the above two profiles:
Business/Profession Title:
Business/Profession Description:
Name of Alumni:
Address:
Address1:
Address2:
City:
Zip Code
Country:
Country:
Cell Phone
Email:
Website Title:
This is the general idea and I was hoping to do this with civinode and civinode CCK
#6
gmasky --
Have you looked at the node_profile module? It sounds like it does part of what you want to do, and might well work fine with CiviNode.