开发者

Creating custom CCK Field Types in Drupal

I've been trying to get this module to work and no matter what I've tried I can't seem to get this to show up in the "Add Field" selection box, full code is over here:

http://drupalbin.com/11854

The gist follows, I have the following hooks implemented:

function uc_product_content_install() {

}

function uc_product_content_uninstall() {

}

function uc_product_content_enable() {

}

function uc_product_content_disable() {

}

function uc_product_content_field_info() {

}

function uc_product_content_field_settings($op, $field) {

}

function uc_product_content_field($op, &$node, $field, &$items, $teaser, $page) {

}

function uc_product_co开发者_如何学Pythonntent_is_empty($item, $field) {

}

function uc_product_content_field_formatter_info() {

}

function uc_product_content_default_value(&$form, &$form_state, $field, $delta) {
}

function uc_product_content_widget(&$form, &$form_state, $field, $items, $delta = 0) {

}


In addition to the above hooks, I defined the following:

function uc_product_content_widget_info() {

}

function uc_product_content_widget_settings($op, $widget) {

}

And now it's showing up as a field, so I can continue working on it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜