This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Simplenews default registration

Is it possible to subscribe new registered members to newsletters by default?

Module functions get called twice

Hi

I've browsed a bit but couldn't find this in the forum - apologies if it has already been covered. I'm a bit new to drupal, so go easy on me : )

I've written a module and I call the main function using the menu hook:
$items[] = array(
'path' => 'foo/bar',
'title' => t('News Filter'),
'callback' => 'foobar_filter',
'access' => user_access('access filter'),
'type' => MENU_CALLBACK,
);

and the function creates and returns content:
function foobar_filter() {
drupal_set_message(t('filter called '));
$output = drupal_get_form('foobar_filter_form');
... process POST info and perform a function which filters nodes and saves the output into $results
// LOOP
$results .= node_view($newnode , array_values($_POST['nodes']);
// LOOP
...
$output .= $results;
return $output;
}

the foobar_filter_form makes a form which basically returns an array of node ID's which I use to
produce the results. (Some code has been left out - I do check the POST variables)

The problem is this. My POST variables from the form keep vanishing - after quite a bit of time
trying to figure out I finally added the drupal_set_message to the start of the function and noticed
that the function always gets called twice when I post something (i.e. I see the message "filter called"

Purpose of db_rewrite_sql?

Hi all,

I don't understand db_rewrite_sql, and the one liner explanation in the docs isn't very informative.

If I'm using db_query with parameters for user input, does db_rewrite_sql add any further security? I don't see this function being used very often.

Hope you can help.

cck node page

I created a new cck type called "Action Alert" which has a title, body, url, etc. This created a cck node type called "content_action_alert". What I can't figure out is: is their a URL automatically created that shows all of the nodes of this type. If I go to http://example.com/video it shows all our videos, or http://example.com/blog shows all of the latest blogs.

How to make Navigation menu invisible on Menus page

Hi, the problem is that i need to make Navigation menu invisible on Menus page and in all drop-down menus,
i guess Navigation menu made of menu items from different modules and making it invisible on Menus page and dislaying menu items of Navigation menu in sidebar looks a bit complicated, can someone give me direction please

Locking node edits: does 5 have this?

Allo

Just about to implement a site that will need to make sure only one person edits a node at a time. There's the checkout module (which I could have a go at updating):

http://drupal.org/node/31839

But nothing else I know of...

It doesn't seem to be a feature of 5.1 - just thought I'd see if anyone else knows whether it is there. (I can't check without running on two machines, since Drupal knows if I'm using two instances on one machine...)

Any thoughts?

Dan

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions