-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
42 lines (32 loc) · 1.49 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Secure Downloads - a WordPress Plugin to restrict downloads to specific user levels.
Author: f00f
Website: http://github.com/f00f/secure-downloads
Version: 0.1
Date: 2012-03-10
== Specification ==
The plugin ``Secure Downloads'' provides functionality for private downloads.
Only logged-in users are be able to download files. A minimum user level can
be defined on a per-folder basis.
Features:
- The download files are stored in a folder outside of the web-root.
- Each subfolder contains a config file which defines the minimum required WP user level.
- Shortcode to list files of a download folder on a WP page (if allowed)
- Download links begin with the prefix ``SD_DL_BASEURL'' which is redirected to dl.php
- dl.php checks permissions, sends headers, and file content for download
- Shortcode to embed contents of a file in a download folder (if allowed)
== Shortcodes ==
[list_dir dir="<relpath>"]
[show_file file="<relpath>"]
Notes:
- <relpath> is relative to SD_DL_ROOT
- Message, when not logged in: login
- Message, when logged in: insufficient permissions
== Configuration ==
SD_DL_ROOT = root directory of downloads (outside web-root)
SD_DL_BASEURL = URL prefix for all downloads (e.g. /downloads/)
File in folder to config permission level (see ``Permissions File'')
== Permissions File ==
Each downloads folder contains a file with the permissions required to access
the files in it. It defines the minimum WordPress user level.
File name: .permissions.php
File content: <?php $sd_min_level = 1; ?>