| 1 |
<?php |
<?php |
| 2 |
// $Id: filerequest.module,v 1.2.2.2 2006/03/26 15:08:08 elmuerte Exp $ |
// $Id: filerequest.module,v 1.4 2006/07/03 14:03:54 elmuerte Exp $ |
| 3 |
|
|
| 4 |
function filerequest_help($section) { |
function filerequest_help($section) { |
| 5 |
switch ($section) { |
switch ($section) { |
| 65 |
$form['settings']['filereq_antileech_image_file'] = array( |
$form['settings']['filereq_antileech_image_file'] = array( |
| 66 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 67 |
'#title' => t('Image file'), |
'#title' => t('Image file'), |
| 68 |
'#default_value' => variable_get('filereq_antileech_image_file', ""), |
'#default_value' => variable_get('filereq_antileech_image_file', "modules/filerequest/watermark.png"), |
| 69 |
'#size' => 72, |
'#size' => 72, |
| 70 |
'#maxlength' => 65535, |
'#maxlength' => 65535, |
| 71 |
'#description' => t('The image to used when special image handling is enabled. This path is relative to the drupal base directory. <br />In case of the watermark mode the image has to be a 24 bit PNG file. Hint: make use of the alpha channels for PNGs.'), |
'#description' => t('The image to used when special image handling is enabled. This path is relative to the drupal base directory. <br />In case of the watermark mode the image has to be a 24 bit PNG file. Hint: make use of the alpha channels for PNGs.'), |
| 78 |
); |
); |
| 79 |
|
|
| 80 |
$form['config'][] = array( |
$form['config'][] = array( |
| 81 |
'#value' => "<textarea rows=\"7\" cols=\"72\" readonly=\"readonly\" wrap=\"off\"><?php\n\$config[\"filereq_antileech_enabled\"] = ".variable_get('filereq_antileech_enabled', true).";\n\$config[\"filereq_antileech_regex\"] = \"".addslashes(variable_get('filereq_antileech_regex', preg_quote($_SERVER["HTTP_HOST"])))."\";\n\$config[\"filereq_fspath\"] = \"".addslashes(file_create_path())."\";\n\$config[\"filereq_antileech_image_mode\"] = ".variable_get('filereq_antileech_image_mode', 0).";\n\$config[\"filereq_antileech_image_file\"] = \"".addslashes(variable_get('filereq_antileech_image_file', "modules/filerequest/watermark.png"))."\";\n?></textarea>" |
'#value' => "<textarea rows=\"7\" cols=\"72\" readonly=\"readonly\" wrap=\"off\"><?php\n\$config[\"filereq_antileech_enabled\"] = ".variable_get('filereq_antileech_enabled', true).";\n\$config[\"filereq_antileech_regex\"] = \"".addslashes(variable_get('filereq_antileech_regex', preg_quote($_SERVER["HTTP_HOST"])))."\";\n\$config[\"filereq_fspath\"] = \"".addslashes(file_create_path())."\";\n\$config[\"filereq_antileech_image_mode\"] = ".variable_get('filereq_antileech_image_mode', 0).";\n\$config[\"filereq_antileech_image_file\"] = \"".addslashes(variable_get('filereq_antileech_image_file', "modules/filerequest/watermark.png"))."\";\n</textarea>" |
| 82 |
); |
); |
| 83 |
|
|
| 84 |
return $form; |
return $form; |