Maybe allow user to enter directories separated by a comma, or multiple text input fields?
This module is what I have been looking for! Thanks!
* Administration form
*/
function contentprotector_admin_form() {
$form = array();
$form['contentprotector_directory'] = array(
'#type' => 'textfield',
'#title' => t('Directory to protect'),
'#description' => t('The path of the directory to protect, relative to the root of your Drupal installation.'),
'#default_value' => variable_get('contentprotector_directory', ''),
);
$form['contentprotector_submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}
Comments
Comment #1
aidanlis commentedHi,
At the moment it only supports a single directory.
What I plan to do is change the module to allow different permissions, roles or users to be assigned to different directories.
For the moment, to protect multiple directories you'll have to create a duplicate of the module and rename it to contentprotector2.
Cheers,
Comment #2
vacilando commentedSubscribing
Comment #3
aidanlis commentedComment #4
aidanlis commentedI don't have time to implement this at the moment. The way I'd want it to work is a set of rules:
this directory ____ needs these rules ____ to view the files.