/[drupal]/contributions/modules/notify/notify.module
ViewVC logotype

Diff of /contributions/modules/notify/notify.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 2.75, Fri Mar 13 02:32:27 2009 UTC revision 2.76, Tue Jun 23 23:21:05 2009 UTC
# Line 1  Line 1 
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    
# Line 68  function notify_admin_settings() { Line 68  function notify_admin_settings() {
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(
# Line 134  function notify_user($type, &$edit, &$us Line 141  function notify_user($type, &$edit, &$us
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    
# Line 149  function _notify_user_reg_fields() { Line 158  function _notify_user_reg_fields() {
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    

Legend:
Removed from v.2.75  
changed lines
  Added in v.2.76

  ViewVC Help
Powered by ViewVC 1.1.2