* @category file system * @copyright */ /** * Implementation of hook_menu(). */ function xsend_menu($may_cache) { $items = array(); $items[] = array( 'path' => 'admin/settings/file-system/x-send', 'title' => t('X-Send File Settings'), 'description' => t('Control how files may transfer to the users.'), 'callback' => 'drupal_get_form', 'callback arguments' => array('xsend_admin_settings'), 'access' => user_access('administer site configuration'), ); return $items; } /** * menu call back for admin settings */ function xsend_admin_settings() { $form = array(); if(!in_array('mod_xsendfile', apache_get_modules())) { drupal_set_message('X-send file module is not installed in your system. Untill you correctly install it do not enable this module.', 'error'); } else { $form['settings_general'] = array( '#type' => 'fieldset', '#title' => t('Fast file transfer settings'), '#collapsible' => TRUE, ); $form['settings_general']['file_transfer_handler'] = array( '#type' => 'radios', '#title' => t('Xsend file transfer support'), '#default_value' => variable_get('file_transfer_handler', "file_transfer_default"), '#options' => array("file_transfer_default"=>t('Disabled'), "file_transfer_xsendfile"=>t('Enabled')), '#description' => t('Enable X-send files support.') ); $form['settings_general']['path_to_drupal_root'] = array( '#type' => 'textfield', '#title' => t('Absolute path to Drupal installation directory'), '#default_value' => variable_get('path_to_drupal_root', dirname(__FILE__)), '#description' => t('Please set the correct path otherwise the file transfer will fail. eg:/usr/www/apache/htdocs/'), ); return system_settings_form($form); } }