hook_nodeapi() is the hook that on Drupal 6, and previous versions, acts on nodes.

learn more… | top users | synonyms

0
votes
2answers
371 views

post-save case in node api?

Is there such thing as a post-save type of case in the node_api function or any other type of function? This question is in reference to a question I posted What operation should I use to write ...
1
vote
2answers
365 views

How do I delete nodes older than X days?

Does anyone have a snippet for deleting nodes that are older than 1 day? I would like to run this on cron tasks.
0
votes
0answers
22 views

How to create a form inside a form which is created in a custom content type

I've created a custom content-type using hook_node_info. Now in that hook_node_info I've declared 'base' as some test. Now i want to create a form. For that I've used hook_form which is "test_form" ...
0
votes
1answer
28 views

How to add a confirmation form after the user clicks “Save” on a node edit form?

On a site I'm building, a user can edit certain fields on a node that cause a chain reaction to happen (which I've implemented using hook_nodeapi's "update" op). Since this chain reaction potentially ...
1
vote
2answers
67 views

Programmatically Filter Node Access beyond permissions, views, etc

Short Version: What would you say is the best way to filter how nodes appear (in a binary sense: published vs. hidden) to users based off of a dynamic value? This solution is beyond the scope of ...
0
votes
1answer
60 views

how to hide a field when its value is set to zero

I want to hide a field on a node when its value is set to zero using a content type. Here is what I had done so far to achieve my goal. function pay_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { ...
1
vote
1answer
39 views

Modify value only if node is new

I am using the following function to alter the node's data before saving it to the database. function mymodule_node_presave($node) { if ($node->type="mytype") { if ($node->is_new) { ...
0
votes
1answer
386 views

db_set_active() and node_save() not working as expected

I'm writing a module to use on a multisite setup that enables nodes to be published to another site on the same installation. Suppose I have Site A and Site B. I want this module to provide the ...
0
votes
2answers
29 views

Blocking node creation after validation

We have a lot of spammers (which are logged in users) creating content on our site. They are creating photo nodes without photos (which I have recently allowed as a way to catch them and ignore them, ...
1
vote
1answer
40 views

Get Facebook content from node_load()

I want a content type having a field "FB URL" that get the URL of a Facebook Event and that when people load a node of this type, the content of the facebook event is retrieved through FB API. It ...
0
votes
0answers
13 views

Why is _node_resource_file_save_upload not executing correctly?

I've been trying to figure out why my upload from a mobile platform to drupal is failing. I don't get any errors, but the file is not save. I've traced it to an area of node_resources.inc. Inside ...
1
vote
2answers
96 views

How do I display a field that's set to “Hidden” by the content type in the template?

I have an existing site where a bunch of the fields are set to Hidden in the Display fields for the content type. I don't want to change that because I'm not 100% sure how that will affect other ...
3
votes
2answers
176 views

Change the view mode programatically

I want to change the view mode of node programmatically. I used hook_preprocess_node(&$vars) and set the view mode function moduleName_preprocess_node(&$vars) { // if conditions to ...
2
votes
2answers
46 views

custom node type that save to a custom table

I’m trying to convert one of my sites into a Drupal site. The site is a travel site and has a lot of data on there, so I’m trying to convert my database tables to custom node types, but my tables are ...
5
votes
1answer
539 views

Feeds: Hook after Import done

I am wondering how to implement a Hook after the import of one of my importers is finished. The last imported node and the name of the importer itself would be the parameters that i need to have at ...

1 2 3 4 5 7
15 30 50 per page