before anything, i want to thanks to all people answer me, the last question i did, all it's working, really thks to all of you. now, i have, i think, a problem, i create a new content type node, its working, but, i don't want to insert data in nodes table, just in the table where save de info of the contents created, its that possible?? the hook_delete dosn't work fine :( function module_delete(&$node){ db_query("DELETE FROM {module_table} WHERE mid = %d", $node->mid); } -- ---------------------- Aldo Martinez Selleras Administrador del Nodo CITMATEL GND Camaguey Tel: 32-291661 E-mail: aldo@caonao.cu Linux User #364356
Yes, it is possible to create new content types in a custom module which do not use the node API, and therefore do not store any data in the node related tables. You opt out of a lot of the added functionality (e.g. taxonomies) that comes automatically with nodes, unless you write additional code for your module to make those functions available. You will have to write code to handle all of insert, update, search and delete operations on your module's database table. All of this assumes I'm actually answering the question you are asking. I'm not entirely sure on that account. On Tue, Dec 23, 2008 at 10:14 AM, Aldo Martinez Selleras <aldo@caonao.cu> wrote:
before anything, i want to thanks to all people answer me, the last question i did, all it's working, really thks to all of you.
now, i have, i think, a problem, i create a new content type node, its working, but, i don't want to insert data in nodes table, just in the table where save de info of the contents created, its that possible??
the hook_delete dosn't work fine :(
function module_delete(&$node){ db_query("DELETE FROM {module_table} WHERE mid = %d", $node->mid); }
-- ---------------------- Aldo Martinez Selleras Administrador del Nodo CITMATEL GND Camaguey Tel: 32-291661 E-mail: aldo@caonao.cu Linux User #364356
you want to say, if i use taxonomy, can't use by example, hook_insert, hook_update, and others? if this module i'm developing, do not need exactly the node database, what can i do for this, if all the data it's saved in my table. can i save in node table, just title and any other thing in the body record? what i have to do for the option Edit work for my module?? -- ---------------------- Aldo Martinez Selleras Administrador del Nodo CITMATEL GND Camaguey Tel: 32-291661 E-mail: aldo@caonao.cu Linux User #364356
hook_insert and hook_update are hooks for node modules. If your new content type is not going to store any data in the node table, it will not be a node module. Most new content types extend the node type. They may extend the kinds and fields of data stored in the node table (and related tables, such as node_revisions) with their own database table. This is when you would use hook_insert and hook_update, so insert and update your table whenever the corresponding records in the node tables were inserted or updated. Take a look at the node_example.module: http://api.drupal.org/api/file/developer/examples/node_example.module/6/sour... ..chris On Wed, Dec 24, 2008 at 7:08 AM, Aldo Martinez Selleras <aldo@caonao.cu> wrote:
you want to say, if i use taxonomy, can't use by example, hook_insert, hook_update, and others?
if this module i'm developing, do not need exactly the node database, what can i do for this, if all the data it's saved in my table.
can i save in node table, just title and any other thing in the body record?
what i have to do for the option Edit work for my module??
-- ---------------------- Aldo Martinez Selleras Administrador del Nodo CITMATEL GND Camaguey Tel: 32-291661 E-mail: aldo@caonao.cu Linux User #364356
participants (2)
-
Aldo Martinez Selleras -
Chris Johnson