Picturebox Manual

Installation

  1. Unzip all of the files to somewhere on your computer. It should cleanly unzip to a single folder named p.
  2. [Optional] Use an editor and open up index.php. From there, you might want to edit lines 19-22 (the Variable section) to further customize the Sandbox. Documentation is included there. The default values, however, are perfectly fine.
  3. Using an FTP program or by some other means, upload the p folder to the directory that you want to work in. For example, if you want to manage the pictures in the /mypictures/ directory, upload the entire p folder to /mypictures/p/. See the configuration section below if you want to something different, although this method is preferred.
  4. Your directory structure should look like the following:
              /somefolder/
              |-/somefolder/p/
                 |-/somefolder/p/f.png (The folder icon.)
                 |-/somefolder/p/index.php (The Picture software.)
                 |-/somefolder/p/style.css (The stylesheet. Feel free to edit this and make new schemes for yourself!)
  5. Using an FTP manager or other such software, CHMOD (change permissions) of /sb/index.php to 755 (also known as 0755).
  6. Go to http://yourdomain.com/somefolder/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 Picturebox is very simple. There are 4 variables that you can change. Open up the index.php file with the editor of your choice. For Windows, I highly recommend the Syn Text Editor. The variable $basedir (line 19) is the directory that the Picturebox will have access to. By default it is ../, meaning that all the files you work with will be stored in the previous folder. This way, you can just go to http://yourdomain.com/somefolder/p to manage your pictures.. You can change this folder to anything you want. Please ensure that a forward slash (/) is placed at the end of the folder. Please do not use absolute directories! Use relative ones. The next variable, $thisDir (line 20), is the directory that the Picturebox is stored in. It is used to prevent that directory from being shown. If you are using something like ../ for $basedir, please set this to the name of the directory (without any slashes) that the Picturebox is stored in. In the example above, the variable should be set to p. If isn't ../ or something like it, set the variable to {-N/A-}. $maxFileSize (line 21) is for setting the maximum size of a file, in bytes. Note that this value also doesn't have quotes around it. $ftypes (line 22) is an array of extensions to let the Picturebox read. The default values should be fine, but if you need to add any, please follow the model of the others. Now, you are ready to use your Picturebox!

 

Use

Using the Picturebox is easy! Here are a couple of notes that you should pay attention to.

There's no support for thumbnails, yet. In the future, I might make support for them. For now, it resizes the image, but does not make the image any smaller in size. While this takes load off of the CPU, it can increase bandwidth usage.

Make sure to read the security warning at the Picturebox page. It is extremely important that you do so.