The first thing you need to do is to download a copy of File Thingie. It's compressed as a zip archive. After you've downloaded the zip file you should unzip it and open ft2.php in a text editor. You will need to change some settings to match your requirements.
Scrolling past the license and version information at the top will take you to the settings section. The first small section is the username and password:
define("USERNAME", "");
define("PASSWORD", "");
Simply enter the username and password you want between the second set of quotes. For example if you want the username "donald" and the password "duck":
define("USERNAME", "donald");
define("PASSWORD", "duck");
This is the very minimum you need to do to get File Thingie running. You can upload ft2.php to a folder on your server and it will work in that server.
Configuring settings
If the default settings is not what you want File Thingie is very flexible and can be configured in many creative ways. The settings begin under under the username and password and there is one setting on each line. Each setting follows this format:
$ft["settings"]["NAME"] = "VALUE";
Note that the settings that have TRUE or FALSE values should not have the quotes around the setting value.
Settings list
- DIR
- The directory used by File Thingie. By default this is "." - the directory you upload ft2.php to. The path is relative to the location of ft2.php and you should not add a trailing slash.
- LANG
- The language code for the interface language. You need to upload a language file before this has any effect.
- MAXSIZE
- The maximum file size you want to allow. The number is in bytes. Nb. Beware of other settings if you want to upload very large files.
- PERMISSION
- The file permission for uploaded files.
- LOGIN
- Change TRUE to FALSE if you want to disable the password protection. Use at your own risk!
- UPLOAD
- Change TRUE to FALSE if you want to disable the file upload and create directory features. You can also write a folder path here. In that case uploads are only allowed in that folder.
- FILEACTIONS
- Change TRUE to FALSE if you want to disable file renaming, moving, deletion, duplication and editing. You can also write a folder path here. In that case file actions are only allowed in that folder.
- HIDEFILEPATHS
- Change FALSE to TRUE if you want all files passed through File Thingie when they are downloaded. This allows you to mask the real location of a file or to set DIR to a folder outside your web root directory.
- FILEBLACKLIST
- A space seperated list of file names that should not be accessible to File Thingie. By default File Thingie will hide itself (ft2.php and filethingie.php)
- FOLDERBLACKLIST
- A space seperated list of folders that should not be accessible to File Thingie. Use paths and not just the name. E.g. "myfolder/hidden" to hide the "hidden" folder inside "myfolder".
- FILETYPEBLACKLIST
- A space seperated list of file extensions that should not be accessible to File Thingie. For security reasons php files are hidden by default.
- FILETYPEWHITELIST
- A space seperated list of file extensions. By default this is empty. If you add any file extensions to the list File Thingie will only display these file types and nothing else.
- ADVANCEDACTIONS
- Change FALSE to TRUE if you want to enable the advanced file actions: chmod and symlinks.
- LIMIT
- Sets a limit in bytes of the total usage in the directory File Thingie is using. When the combined amount of files take up more space than the limit the upload box is removed and no further uploads are allowed. Set to '0' to remove the limit completely (this is the default behavviour).
- REQUEST_URI
- This option should only be set for installations on Microsoft IIS servers where $_SERVER['REQUEST_URI'] is not being set. Set the value of this configuration option to the File Thingie installation path (e.g. /myfolder/ft2.php).
- HTTPS
- This option is used to toggle HTTPS support on and off. Set this to TRUE if you are using File Thingie under HTTPS. Otherwise leave it at FALSE.
- AUTOUPDATES
- The number of days between each check for new version. Set to 0 to turn off automatic updates.
- REMEMBERME
- Change FALSE to TRUE if you want to enable the "remember me" feature at login.
- PLUGINDIR
- The location of the folder where you keep File Thingie plugins.