By ibragim on
Does anyone know where i can read about CCK API, i am interesting how to create fields for content type programaticly by using powerfull module CCK.
Thanks.
Does anyone know where i can read about CCK API, i am interesting how to create fields for content type programaticly by using powerfull module CCK.
Thanks.
Comments
_
There's developer docs available via the 'read documentation' link on the module's project page.
I am realy surprised that in
I am realy surprised that in this powerfull module(CCK) no API to create node type or field, it's must be SHAME for developers!!!
_
I have no idea what you're talking about-- there's a complete api, including hooks, available. And creating a node type was moved to core with d5, see http://api.drupal.org/api/function/hook_node_info/6
thx for this information! i
thx for this information!
i just want to say that it would be great to have ability create node types and (important!) field just calling some functions,
as example:
hook_node_info() // here we define node type
create_field ("node_type") // here we create new field, like it's do CCK, but put all needed information here, incoming node type name
_
THERE IS
Ok, can you provide some
Ok, can you provide some little example? (Like, How to create new field for node type that already exist)
Are you even reading
Are you even reading Worldfallz posts? The guy told you exactly what you asked, and your next posts were completely ignoring him. As for the answer to your last question, a simple search on the site would give you the answer faster than we can type it for you.
Contact me to contract me for D7 -> D10/11 migrations.
I can't find example to
I can't find example to Drupal 5.x, if to you not hard to write little example, please do this.
_
ok i'm done-- if you continue to refuse to read anything you'll not find much help in the forums. The first link in the api page i linked above is a "a sample cck field' and it's tagged with d5, sheesh. no one is going to rewrite the available handbook documentation in a forum thread just for you.
Thanks everyone, I would like
Thanks everyone, I would like to receive an adequate answer to the question, but it turned out as always.
Awesome support.
How rude. You asked
How rude. You asked questions, you were given answers, then you complained about the lack of help.
I'll tell you what, you should ask for a refund. You obviously paid too much money for the assistance you got here.
Contact me to contract me for D7 -> D10/11 migrations.
_
Thaks
I had the same question, and Google directed me to this forum. Interesting conversation :) Thanks a lot for the answers provided in your second post, the linked pages appear useful.
I think this function help
I think this function help you http://drupalcontrib.org/api/function/content_field_instance_create/6
For example:
// Create several fields at a time.
foreach ($fields as $field) {
content_field_instance_create($field, FALSE);
}
// Clear caches and rebuild menu.
content_clear_type_cache(TRUE);
menu_rebuild();