drupal-content-types

How to insert into database Drupal Custom Fields

半腔热情 提交于 2019-12-13 04:43:30
问题 I retrieve content types with the following code $form['ct'] = array( '#type' => 'checkboxes', '#options' => node_type_get_names(), '#title' => t('Hangi tür içerikler hakkında bilgi almak istersiniz?'), ); And It gives the following output http://i.stack.imgur.com/TOfS6.png And when I press Create new Account button, the POST Array is so : http://i.stack.imgur.com/BtxhC.png My Question is How can I insert into database these values and read? 回答1: There are two ways of saving this data and

Hook perm for more than one content type

青春壹個敷衍的年華 提交于 2019-12-13 02:21:10
问题 Drupal 6.x I have this module that manages four different content types. For that matter, how do I define permission for each content within the same module? Is that even possible? I can't figure out how to define permission for each content type cuz hook_perm has to be named with module name and it doesn't have any argument(like hook_access $node) to return permission base on content type. Here's how I'd like to do - function mymodule_perm() { if(content1) return array( 'create content1 node