By kar2905 on
Hello ,
I want a "email" option to be available in "admin/content/node" page so that I could email the selected node content to a group of users . I tried to use hook_node_operations() for the purpose .
the following is my code
function email_node_operations()
{
$operations.=array(
email=>array(
'label'=> t('Email the node content');
callback => 'email_nodeid';
));
return $operations;
}
I get the following error when I try to enable the module
"Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 57 bytes) in /home/kartik/www/drupal-6.14/includes/common.inc on line 2823"
Please help
Comments
My code is : function
My code is :
function email_node_operations()
{
$operations = array(
'email'=>array(
'label'=> t('Email the node content'),
'callback' => 'email_nodeid',
),
);
return $operations;
}
It is not working .
mem leak...
Does email_nodeid call email_node_operations()?
Something is calling it too many times right?
No .. I have still not
No ..
I have still not defined email_nodeid .
For now , I am just trying to create a option in the page .
Is your module named 'email'?
Is your module named 'email'?
Contact me to contract me for D7 -> D10/11 migrations.
Yes , it is named email
Yes , it is named email
You may need to create the
You may need to create the callback function before it is recognized then. Try clearing your cache as well - there is a good chance that this hook isn't called every time that page is loaded.
Contact me to contract me for D7 -> D10/11 migrations.
Is it neccesary to create the
Is it neccesary to create the callback also ?
I will try as you suggested .
Is the code alright ?
Thanks for the information
Is this functionality not covered by other modules?
http://drupal.org/project/epublish_email
http://drupal.org/project/select_publication
http://drupal.org/project/epublish
No , its different from what
No , its different from what I want ..
I got the option there .
I got the option there . Thanks for the help .
It sends the nodeid of the nodes selected automatically to the calling function .
But in my case , I have to redirect it to a new page and send the node by GET option( appending in the url )
How do I do that ?
What was the problem? How did
What was the problem? How did you fix it?
Contact me to contract me for D7 -> D10/11 migrations.
As you had said , I need to
As you had said , I need to create the callback function also . Then it worked .
But now also the function does not work . The option is displayed though nothing happens when you click on it .
Pls help
I did this and the problem
I did this and the problem got fixed .
$items['node/%/emailnode'] = array(
'title' => 'Send Email ',
'page callback' => 'emailnode_display_users',
'page arguments' => array(1), // <- nodeID (from % in node path)
'access arguments' => array('administer users'),
'type' => MENU_LOCAL_TASK,
);