| 1 |
<?php
|
| 2 |
// $Id: auditfiles.admin.inc,v 1.1 2007/12/05 22:33:19 stuartgreenfield Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Callback for settings page
|
| 7 |
*/
|
| 8 |
function auditfiles_admin_settings() {
|
| 9 |
|
| 10 |
$form['exclusions'] = array(
|
| 11 |
'#type' => 'fieldset',
|
| 12 |
'#title' => t('Exclusions'),
|
| 13 |
'#collapsible' => TRUE,
|
| 14 |
'#collapsed' => FALSE,
|
| 15 |
);
|
| 16 |
$form['exclusions']['auditfiles_exclude_files'] = array(
|
| 17 |
'#type' => 'textfield',
|
| 18 |
'#title' => t('Exclude these files'),
|
| 19 |
'#default_value' => trim(variable_get('auditfiles_exclude_files', '.htaccess')),
|
| 20 |
'#description' => t('Enter a list of files to exclude, separated by spaces.'),
|
| 21 |
);
|
| 22 |
|
| 23 |
$form['exclusions']['auditfiles_exclude_extensions'] = array(
|
| 24 |
'#type' => 'textfield',
|
| 25 |
'#title' => t('Exclude these extensions'),
|
| 26 |
'#default_value' => trim(variable_get('auditfiles_exclude_extensions', '')),
|
| 27 |
'#description' => t('Enter a list of extensions to exclude, separated by spaces. Do not
|
| 28 |
include the leading dot.'),
|
| 29 |
);
|
| 30 |
|
| 31 |
$form['exclusions']['auditfiles_exclude_paths'] = array(
|
| 32 |
'#type' => 'textfield',
|
| 33 |
'#title' => t('Exclude these paths'),
|
| 34 |
'#default_value' => trim(variable_get('auditfiles_exclude_paths', 'color')),
|
| 35 |
'#description' => t('Enter a list of paths to exclude, separated by spaces. Do not
|
| 36 |
include the leading slash. Paths are relative to %directorypath',
|
| 37 |
array('%directorypath' => file_directory_path())),
|
| 38 |
);
|
| 39 |
|
| 40 |
$form['domains'] = array(
|
| 41 |
'#type' => 'fieldset',
|
| 42 |
'#title' => t('Domains'),
|
| 43 |
'#collapsible' => TRUE,
|
| 44 |
'#collapsed' => FALSE,
|
| 45 |
);
|
| 46 |
|
| 47 |
$form['domains']['auditfiles_include_domains'] = array(
|
| 48 |
'#type' => 'textfield',
|
| 49 |
'#title' => t('Include references to these domains'),
|
| 50 |
'#default_value' => trim(variable_get('auditfiles_include_domains', '')),
|
| 51 |
'#size' => 80,
|
| 52 |
'#maxlength' => 1024,
|
| 53 |
'#description' => t('Enter a list of domains (e.g., www.example.com) pointing
|
| 54 |
to your website, separated by spaces. When scanning content for file references (such as <img>
|
| 55 |
tags), any absolute references using these domains will be included and rewritten
|
| 56 |
to use relative references. Absolute references to domains not in this list will
|
| 57 |
be considered to be external references and will not be audited or rewritten.'),
|
| 58 |
);
|
| 59 |
|
| 60 |
return system_settings_form($form);
|
| 61 |
}
|