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

Diff of /contributions/modules/roledelay/roledelay.module

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

revision 1.2, Mon Aug 29 01:12:12 2005 UTC revision 1.3, Wed Jul 26 16:36:09 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: roledelay.module,v 1.1 2005/08/14 22:47:33 crunchywelch Exp $  // $Id$
3    
4  /**  /**
5   * hook_settings() implementation   * hook_settings() implementation
# Line 10  function roledelay_settings() { Line 10  function roledelay_settings() {
10    $periods = array(3600 => t('hours'), 86400 => t('days'), 604800 => t('weeks'));    $periods = array(3600 => t('hours'), 86400 => t('days'), 604800 => t('weeks'));
11    $increments = range(1, 28);    $increments = range(1, 28);
12    
13    $form = form_select('User Role', 'roledelay_role1', variable_get('roledelay_role1', 'none'), $roles, t('The role that will be granted to new users after the specified wait time.'));  /*  $form = form_select('User Role', 'roledelay_role1', variable_get('roledelay_role1', 'none'), $roles, t('The role that will be granted to new users after the specified wait time.'));
14    $form .= form_select('Wait period', 'roledelay_period1', variable_get('roledelay_period1', '3600'), $periods, t('The wait period type.'));    $form .= form_select('Wait period', 'roledelay_period1', variable_get('roledelay_period1', '3600'), $periods, t('The wait period type.'));
15    $form .= form_select('Wait Increment', 'roledelay_increment1', variable_get('roledelay_increment1', '1'), $increments, t('The number to increment the wait period type by.'));    $form .= form_select('Wait Increment', 'roledelay_increment1', variable_get('roledelay_increment1', '1'), $increments, t('The number to increment the wait period type by.'));
16    $group = form_group(t('First Role Delay'), $form);    $group = form_group(t('First Role Delay'), $form);
# Line 20  function roledelay_settings() { Line 20  function roledelay_settings() {
20    $form .= form_select('Wait Increment', 'roledelay_increment2', variable_get('roledelay_increment2', '1'), $increments, t('The number to increment the wait period type by.'));    $form .= form_select('Wait Increment', 'roledelay_increment2', variable_get('roledelay_increment2', '1'), $increments, t('The number to increment the wait period type by.'));
21    $group .= form_group(t('Second Role Delay'), $form);    $group .= form_group(t('Second Role Delay'), $form);
22    
23    return $group;    return $group;*/
24    
25      $form['first_role_delay'] = array(
26        '#type' => 'fieldset',
27        '#title' => 'First Role Delay',
28        );
29      $form['first_role_delay']['roledelay_role1'] = array(
30        '#type' => 'select',
31        '#title' => t('User role'),
32        '#default_value' => variable_get('roledelay_role1', 'none'),
33        '#options' => $roles,
34        '#description' => t('The role that will be granted to new users after the specified wait time.')
35        );
36      $form['first_role_delay']['roledelay_period1'] = array(
37        '#type' => 'select',
38        '#title' => t('Wait period'),
39        '#default_value' => variable_get('roledelay_period1', '3600'),
40        '#options' => $periods,
41        '#description' => t('The wait period type.')
42        );
43      $form['first_role_delay']['roledelay_increment1'] = array(
44        '#type' => 'select',
45        '#title' => t('Wait increment'),
46        '#default_value' => variable_get('roledelay_increment1', '1'),
47        '#options' => $increments,
48        '#description' => t('The number to increment the wait period type by.')
49        );
50    
51    
52      $form['second_role_delay'] = array(
53        '#type' => 'fieldset',
54        '#title' => 'Second Role Delay',
55      );
56      $form['second_role_delay']['roledelay_role2'] = array(
57        '#type' => 'select',
58        '#title' => t('User role'),
59        '#default_value' => variable_get('roledelay_role2', 'none'),
60        '#options' => $roles,
61        '#description' => t('The role that will be granted to new users after the specified wait time.')
62        );
63      $form['second_role_delay']['roledelay_period2'] = array(
64        '#type' => 'select',
65        '#title' => t('Wait period'),
66        '#default_value' => variable_get('roledelay_period2', '3600'),
67        '#options' => $periods,
68        '#description' => t('The wait period type.')
69        );
70      $form['second_role_delay']['roledelay_increment2'] = array(
71        '#type' => 'select',
72        '#title' => t('Wait increment'),
73        '#default_value' => variable_get('roledelay_increment2', '1'),
74        '#options' => $increments,
75        '#description' => t('The number to increment the wait period type by.')
76        );
77    
78      return $form;
79  }  }
80    
81    
82  /**  /**
83   * hook_user() implementation   * hook_user() implementation
84   */   */

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2