function _mass_contact_create_node_type in Mass Contact 5.2
Create the mass contact node type.
1 call to _mass_contact_create_node_type()
- mass_contact_mail_page_submit in ./
mass_contact.module - Processes the main Mass Contact mail form.
File
- ./
mass_contact.module, line 1646 - This is the main code file for the Mass Contact module. This module enables users to contact multiple users through selected roles.
Code
function _mass_contact_create_node_type() {
$info->type = "mass_contact";
$info->name = "Mass Contact Message";
$info->module = "node";
$info->description = "Archived copy of mass e-mails sent from this site";
$info->help = "";
$info->has_title = 1;
$info->title_label = "Subject";
$info->has_body = 1;
$info->body_label = "Message Body";
$info->min_word_count = 0;
$info->custom = 1;
$info->modified = 0;
$info->locked = 0;
$info->orig_type = 'mass_contact';
db_query("INSERT INTO {node_type} (type, name, module, description, help, has_title, title_label, has_body, body_label, min_word_count, custom, modified, locked, orig_type) VALUES ('%s', '%s', '%s', '%s', '%s', %d, '%s', %d, '%s', %d, %d, %d, %d, '%s')", $info->type, $info->name, $info->module, $info->description, $info->help, $info->has_title, $info->title_label, $info->has_body, $info->body_label, $info->min_word_count, $info->custom, $info->modified, $info->locked, $info->orig_type);
module_invoke_all('node_type', 'insert', $info);
drupal_set_message(t('Node type created.'));
}