| 1 |
<?php |
<?php |
| 2 |
// $Id: notify.module,v 2.74 2009/02/03 01:52:57 matt2000 Exp $ |
// $Id: notify.module,v 2.75 2009/03/13 02:32:27 matt2000 Exp $ |
| 3 |
|
|
| 4 |
define('NOTIFY_NODE_TYPE', 'notify_node_type_'); |
define('NOTIFY_NODE_TYPE', 'notify_node_type_'); |
| 5 |
|
|
| 68 |
'#default_value' => variable_get('notify_attempts', array(5)), |
'#default_value' => variable_get('notify_attempts', array(5)), |
| 69 |
'#options' => array(t('Disabled'), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20), |
'#options' => array(t('Disabled'), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20), |
| 70 |
); |
); |
| 71 |
|
|
| 72 |
|
$form[notify_settings]['notify_reg_default'] = array( |
| 73 |
|
'#type' => 'checkbox', |
| 74 |
|
'#title' => 'Notification checkbox default on new user registration form', |
| 75 |
|
'#return_value' => 1, |
| 76 |
|
'#default_value' => variable_get('notify_reg_default',1), |
| 77 |
|
); |
| 78 |
|
|
| 79 |
$set = 'ntype'; |
$set = 'ntype'; |
| 80 |
$form[$set] = array( |
$form[$set] = array( |
| 141 |
* Returns form fields to be added to User Regsitration form |
* Returns form fields to be added to User Regsitration form |
| 142 |
*/ |
*/ |
| 143 |
function _notify_user_reg_fields() { |
function _notify_user_reg_fields() { |
| 144 |
|
if (!user_access('access notify')) return; |
| 145 |
|
|
| 146 |
// Get the variable for how often the notifications are sent out |
// Get the variable for how often the notifications are sent out |
| 147 |
$period = variable_get("notify_send", 86400); |
$period = variable_get("notify_send", 86400); |
| 148 |
|
|
| 158 |
'#type' => 'checkbox', |
'#type' => 'checkbox', |
| 159 |
'#title' => t('Receive email notifications of news posted to this site. Notifications are sent every ' . format_interval($period).'.'), |
'#title' => t('Receive email notifications of news posted to this site. Notifications are sent every ' . format_interval($period).'.'), |
| 160 |
'#return_value' => 1, |
'#return_value' => 1, |
| 161 |
'#default_value' => 1, |
'#default_value' => variable_get('notify_reg_default',1), |
| 162 |
'#description' => t('By accepting to receive <em>daily email news notifications</em>, you will be kept informed of news associated with ' . variable_get('site_name', 'Drupal') . '.') |
'#description' => t('By accepting to receive <em>daily email news notifications</em>, you will be kept informed of news associated with ' . variable_get('site_name', 'Drupal') . '.') |
| 163 |
); |
); |
| 164 |
|
|