Enable custom cck fields to offer realname intergration

cdale - November 6, 2009 - 05:14
Project:RealName
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:cdale
Status:needs review
Description

I created a custom field type that is basically a combination of text fields with some extra processing. I wanted to be able to use my new field in a realname, but found that realname explicitly looks for type 'text' to choose which fields to add.

I'm not sure if this is the best approach, but it enables custom cck field types to announce that they are able to be used in a realname.

It'd be great if something like this could make it in. I've attached a patch, which once applied, other cck field modules can use it as follows:

<?php
function hook_field_settings($op, $field) {
  switch (
$op) {
    case
'form':
     
$form['realname_capable'] = array(
       
'#type' => 'value',
       
'#value' => TRUE,
      );

      return
$form;

    case
'save':
      return array(
'realname_capable');
        break;
}
?>

AttachmentSize
realname-content_profile-custom-cck-fields.patch1.78 KB
 
 

Drupal is a registered trademark of Dries Buytaert.