| 1 |
<?php |
<?php |
| 2 |
// $Id: xmpp_server.admin.inc,v 1.2 2008/09/21 04:18:06 t0talmeltd0wn Exp $ |
// $Id: xmpp_server.admin.inc,v 1.3 2008/09/25 06:45:41 t0talmeltd0wn Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Form builder. Configure XMPP server settings. |
* Form builder. Configure XMPP server settings. |
| 11 |
$form = array(); |
$form = array(); |
| 12 |
|
|
| 13 |
$form['xmpp_server_cache_lists'] = array( |
$form['xmpp_server_cache_lists'] = array( |
| 14 |
|
'#title' => t('List caching'), |
| 15 |
'#type' => 'checkbox', |
'#type' => 'checkbox', |
| 16 |
'#title' => t('List caching'), |
'#title' => t('List caching'), |
| 17 |
'#description' => t('Set whether or not the XMPP server should cache it\'s roster or presence lists. (May hinder development.)'), |
'#description' => t('Set whether or not the XMPP server should cache it\'s roster or presence lists. (May hinder development.)'), |
| 21 |
$running = (variable_get('xmpp_server_ping', 0) > time() - 10) && variable_get('xmpp_server_running', false); |
$running = (variable_get('xmpp_server_ping', 0) > time() - 10) && variable_get('xmpp_server_running', false); |
| 22 |
|
|
| 23 |
$form['xmpp_server_running'] = array( |
$form['xmpp_server_running'] = array( |
| 24 |
|
'#title' => t('Running'), |
| 25 |
'#type' => 'checkbox', |
'#type' => 'checkbox', |
| 26 |
'#title' => t('Running'), |
'#title' => t('Running'), |
| 27 |
'#description' => t('Set whether or not the XMPP Server should continue running. (Only for stopping the server.)'), |
'#description' => t('Set whether or not the XMPP Server should continue running. (Only for stopping the server.)'), |
| 36 |
); |
); |
| 37 |
|
|
| 38 |
$form['xmpp_server_host_settings']['xmpp_server_host'] = array( |
$form['xmpp_server_host_settings']['xmpp_server_host'] = array( |
| 39 |
|
'#title' => t('XMPP Server Hostname'), |
| 40 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 41 |
'#title' => t('XMPP Server Hostname'), |
'#title' => t('XMPP Server Hostname'), |
| 42 |
'#description' => t('The hostname that the XMPP Server will identify itself as.'), |
'#description' => t('The hostname that the XMPP Server will identify itself as.'), |
| 56 |
); |
); |
| 57 |
|
|
| 58 |
$form['xmpp_server_connection']['xmpp_server_address'] = array( |
$form['xmpp_server_connection']['xmpp_server_address'] = array( |
| 59 |
|
'#title' => t('XMPP Server address'), |
| 60 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 61 |
'#title' => t('XMPP Server address'), |
'#title' => t('XMPP Server address'), |
| 62 |
'#description' => t('The address that your XMPP server should bind to.'), |
'#description' => t('The address that your XMPP server should bind to.'), |
| 64 |
); |
); |
| 65 |
|
|
| 66 |
$form['xmpp_server_connection']['xmpp_server_port'] = array( |
$form['xmpp_server_connection']['xmpp_server_port'] = array( |
| 67 |
|
'#title' => t('XMPP Server port'), |
| 68 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 69 |
'#title' => t('XMPP Server port'), |
'#title' => t('XMPP Server port'), |
| 70 |
'#description' => t('The port that your XMPP server will run on. (Default is 5222.)'), |
'#description' => t('The port that your XMPP server will run on. (Default is 5222.)'), |
| 81 |
'#collapsible' => TRUE, |
'#collapsible' => TRUE, |
| 82 |
'#collapsed' => TRUE, |
'#collapsed' => TRUE, |
| 83 |
); |
); |
| 84 |
|
|
| 85 |
|
$form['xmpp_server_ssl']['xmpp_server_ssl_enabled'] = array( |
| 86 |
|
'#title' => t('Enabled'), |
| 87 |
|
'#type' => 'checkbox', |
| 88 |
|
'#description' => t('Check to enable SSL support, or uncheck to disable.'), |
| 89 |
|
'#default_value' => variable_get('xmpp_server_ssl_enabled', true), |
| 90 |
|
); |
| 91 |
|
|
| 92 |
$form['xmpp_server_ssl']['xmpp_server_ssl_local_cert'] = array( |
$form['xmpp_server_ssl']['xmpp_server_ssl_local_cert'] = array( |
| 93 |
'#title' => t('Local Certificate'), |
'#title' => t('Local Certificate'), |