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

Diff of /contributions/modules/rcmail/rcmail.module

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

revision 1.2.2.2, Wed Mar 28 14:04:19 2007 UTC revision 1.2.2.3, Wed Jul 11 14:29:34 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  /* $Id: rcmail.module,v 1.2.2.1 2007/03/24 12:59:17 polyformalsp Exp $ */  /* $Id: rcmail.module polyformal Exp $ */
3    
4  /**  /**
5   * @file   * @file
# Line 24  function rcmail_help($section) { Line 24  function rcmail_help($section) {
24    }    }
25  }  }
26    
27  function rcmail_settings() {  function rcmail_admin_settings() {
28    // only administrators can access this function    // only administrators can access this function
29    if (!user_access('adminster rcmail')) {    /*if (!user_access('adminster rcmail')) {
30    return message_access();    return message_access();
31    }    }*/
32    
33  $form["rcmail_iframe_width"] = array(  $form["rcmail_iframe_width"] = array(
34    '#type' => 'textfield',    '#type' => 'textfield',
# Line 47  $form["rcmail_iframe_height"] = array( Line 47  $form["rcmail_iframe_height"] = array(
47    '#maxlength' => 15,    '#maxlength' => 15,
48    '#description' => t("Enter width of the iframe. Optimum is 550px"),    '#description' => t("Enter width of the iframe. Optimum is 550px"),
49  );  );
50    return $form;   return system_settings_form($form);
51  }  }
52    
53  function rcmail_perm() {  function rcmail_perm() {
# Line 55  function rcmail_perm() { Line 55  function rcmail_perm() {
55  }  }
56    
57  /**  /**
  * hook_menu() implementation  
  */  
   
   
 /**  
58   * Implementation of hook_user().   * Implementation of hook_user().
59   *   *
60   * Grab the settings of the imap account for each user   * Grab the settings of the imap account for each user
# Line 82  function rcmail_user($type, &$edit, &$us Line 77  function rcmail_user($type, &$edit, &$us
77    '#type' => 'textfield',    '#type' => 'textfield',
78    '#title' => t('user'),    '#title' => t('user'),
79    '#default_value' => $edit['rcmail_username'],    '#default_value' => $edit['rcmail_username'],
80    '#size' => 20,    '#size' => 30,
81    '#maxlength' => 20,    '#maxlength' => 40,
82    '#description' => t('Enter the username of your IMAP account.'),    '#description' => t('Enter the username of your IMAP account.'),
83  );  );
84    
# Line 91  $form['rcmail_settings']['rcmail_passwor Line 86  $form['rcmail_settings']['rcmail_passwor
86    '#type' => 'password',    '#type' => 'password',
87    '#title' => t('password'),    '#title' => t('password'),
88    '#default_value' => $dec,    '#default_value' => $dec,
89    '#size' => 20,    '#size' => 30,
90    '#maxlength' => 20,    '#maxlength' => 40,
91    '#required' => TRUE,    '#required' => TRUE,
92    '#description' => t('Enter your the password of your IMAP account.'),    '#description' => t('Enter your the password of your IMAP account.'),
93  );  );
# Line 101  $form['rcmail_settings']['rcmail_passwor Line 96  $form['rcmail_settings']['rcmail_passwor
96    '#type' => 'textfield',    '#type' => 'textfield',
97    '#title' => t('server'),    '#title' => t('server'),
98    '#default_value' => $edit['rcmail_server'],    '#default_value' => $edit['rcmail_server'],
99    '#size' => 20,    '#size' => 30,
100    '#maxlength' => 20,    '#maxlength' => 40,
101    '#description' => t('Enter the servername of your IMAP account.'),    '#description' => t('Enter the servername of your IMAP account.'),
102  );  );
   
103    return $form;    return $form;
   
104    } //eof if    } //eof if
105    
106    case 'update':    case 'update':
# Line 118  $form['rcmail_settings']['rcmail_passwor Line 111  $form['rcmail_settings']['rcmail_passwor
111  /**  /**
112   * hook_menu() implementation   * hook_menu() implementation
113   */   */
114  function rcmail_menu() {  function rcmail_menu($may_cache) {
115    $items[] = array(    $items = array();
116      'path' => 'rcmail',    if ($may_cache) {
117      'title' => t('roundcubemail'),          $items[] = array(
118      'callback' => 'rcmail_page',        'path' => 'rcmail',
119      'access' => (user_access('use rcmail'))        'title' => t('roundcubemail'),
120          'callback' => 'rcmail_page',
121          'access' => (user_access('use rcmail'))
122      );      );
123        $items[] = array(
124          'path' => 'admin/settings/rcmail',
125          'title' => t('rcmail settings'),
126          'description' => t('Configure roundcube appearance (height an width of the iframe).'),
127          'callback' => 'drupal_get_form',
128          'callback arguments' => 'rcmail_admin_settings',
129          'access' => user_access('administer site configuration'),
130          'type' => MENU_NORMAL_ITEM,
131        );
132      }
133    return $items;    return $items;
134  }  }
135    
# Line 173  function _encrypt($dec) { Line 178  function _encrypt($dec) {
178    $enc = base64_encode($enc);    $enc = base64_encode($enc);
179    return $enc;    return $enc;
180  }  }
   
181  ?>  ?>

Legend:
Removed from v.1.2.2.2  
changed lines
  Added in v.1.2.2.3

  ViewVC Help
Powered by ViewVC 1.1.2