[development] Making custom fields available to CCK administration menus

nan wich nan_wich at bellsouth.net
Thu Jan 27 14:43:03 UTC 2011


function mymodule_content_extra_fields($type_name) {
  if ($type_name != 'blog') {
    return;
  }
  $extras = array();
  $extras['add_comment'] = array(
    'label' => t('Add comment'),
    'description' => t('Content section') . ': ' . t('Link to the new comment 
form'),
    'weight' => 0,
    );
  $extras['plus1_widget'] = array(
    'label' => t('Recommend'),
    'description' => t('Content section') . ': ' . t('Link to recommend node'),
    'weight' => 0,
    );
  $extras['tweetmeme'] = array(
    'label' => t('Retweet'),
    'description' => t('Content section') . ': ' . t('TweetMeme button'),
    'weight' => 0,
    );
  $extras['service_links'] = array(
    'label' => t('Save and Share'),
    'description' => t('Content section') . ': ' . t('Service Links buttons'),
    'weight' => 0,
    );
  $extras['print_links'] = array(
    'label' => t('Print Links'),
    'description' => t('Content section') . ': ' . t('Print Links?'),
    'weight' => 0,
    );
  $extras['see-more'] = array(
    'label' => t('See more'),
    'description' => t('Content section') . ': ' . t('See more posts Links'),
    'weight' => 0,
    );
  $extras['categories'] = array(
    'label' => t('Categories'),
    'description' => t('Content section') . ': ' . t('Term links from 
Categories'),
    'weight' => 0,
    );
  $extras['related'] = array(
    'label' => t('Related research'),
    'description' => t('Content section') . ': ' . t('List of related 
research'),
    'weight' => 0,
    );
  return $extras;
}
 
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.




________________________________
From: Karl Giesing <khzmusik at hotmail.com>
To: development at drupal.org
Sent: Wed, January 26, 2011 11:39:51 PM
Subject: [development] Making custom fields available to CCK administration 
menus

Hi, this is Karl Giesing, aka Karlheinz. I'm the developer of the Discogs 
module:
http://drupal.org/project/discogs

I have a user who uses CCK, and would like to administer the fields I created, 
using CCK's "Manage Fields" and "Display Fields" menus. I did NOT create the 
fields using CCK, and was wondering if this is possible.

Any ideas? I haven't found any documentation on how to do this.

-Karl.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110127/cec91fae/attachment.html 


More information about the development mailing list