Sandbox Manual
Installation
- Unzip all of the files to somewhere on your computer. It should cleanly unzip to a single folder named sb.
- [Optional] Use an editor and open up index.php. From there, you might want to edit lines 13-21 (the Variable section) to further customize the Sandbox. Documentation is included there. The default values, however, are perfectly fine.
- Using an FTP program or by some other means, upload the sb folder to your / directory.
- Within the sandbox directory, create a folder named f and a folder named b. If you want to use other folders, please see the configuration section below.
- Your directory structure should look like the following:
/
|-/sb/
|-/sb/f/ (Where your files will be stored by default.)
|-/sb/b (Where files will be backed up to.)
|-/sb/fat.js (Adam Michela's awesome "Fade Anything Technique" script.)
|-/sb/index.php (The Sandbox software.)
|-/sb/style.css (The stylesheet. Feel free to edit this and make new schemes for yourself!) - Using an FTP manager or other such software, CHMOD (change permissions) of /sb/index.php to 755 (also known as 0755).
- Go to http://yourdomain.com/sb/index.php and everything should work! If you have changed the directories in which you want to work in, please se the next section for configuration before anything else. There are also several other optional variables to change.
Configuration
Configuration of the sandbox is very simple. There are 7 variables that you can change to configure the Sandbox. Open up the index.php file with the editor of your choice. For Windows, I highly recommend the Syn Text Editor. The variable $fd (line 13) is the directory that the Sandbox will have access to. By default it is f/, meaning that all the files you work with will be stored in that folder. You can change this folder to anything you want. Please ensure that a forward slash (/) is placed at the end of the folder. The next variable, $bd (line 14), is the directory that you will store your backups in. Backups are created automatically while editing a file. Please choose a special directory just for storing backups. The variable $ieHeight (line 15) is for setting the height of the edit box in Internet Explorer, which, at the moment, doesn't seem to allow for automatic resizing of the edit box. Note that this number is not in quotes. $autosaveInterval (line 16) specifies how quickly (in milliseconds) to automatically save your file when editing it. So, setting the variable to 30000 would mean that it would save every 30 seconds. Note that this value does not have qutoes around it. $maxFileSize (line 17) is for setting the maximum size of a file, in bytes. Note that this value also doesn't have quotes around it. $newPerm (line 18) is for setting the permissions of a newly created file. It follows standard CHMOD permission rules. Please put the number in quotes and make sure that the 0 is in front of your number. For example, "0755" is an acceptable value, but 0755, "755", and 755 are not. The last variable, $uplPerm (line 19), is for setting the permissions of an uploaded file automatically. Please follow the same rules as for entering the permissions for $newPerm. The default configuration of the Sandbox should work just fine (assuming you have created the f and b directories within the sb directory). Now, you are ready to use your Sandbox!
Use
Using the Sandbox is fairly straightforward. Thanks to lots of JavaScript, this program will save you some time by automatically handling things that would otherwise take more mouse clicks (and make you lazier too!). Here are a couple of notes that you should pay attention to.
When CHMODding a file, you should always put a 0 before the number (in the style of strict CHMOD rules). For example, 0755 is an acceptable value but 755 is not.
Make sure to read the security warning at the Sandbox page. It is extremely important that you do so.
