MIG BUDDY aka kmb - Keith's MIG BUDDY CHANGES ================================================== 04/27/05...added javascript (blech) window indicating that ...uploading is in progress. 03/14/05...added feature - ability to preview pics in outbound ...directory by clicking - they open in new window. ...also added rotate 180 degrees (upside down) ...added version beneath "links" 03/13/05...added feature - visual indication in inbound ...list of current/displayed image 11/21/04...fixed problem - probably with newer version ...of Imagemagick that was hosing up thumbs 08/25/04...added new functionality: ...1) write_log function to log stuff ...2) inbound list improvements; parsing or ... deleting file moves to next instead of ... first one by default. Doing last moves to ... next-to-last. 08/19/04...added Utils (backup,restore,purge) 08/18/04...added Uploader 08/11/04...added outbound overwrite protection and image creation status below logo WHAT THIS IS ================================================== This is a web-based image pre-processor to be used in conjunction with MIG - My Image Gallery - http://mig.sourceforge.net I built this as a way to view, resize, rename, rotate if necessary raw pictures from my digital camera to be uploaded into a MIG gallery. Previously, I had to manually resize, rename, etc. Using this, I can preview, rename, resize, etc. THIS IS NOT ITSELF a gallery package, just a simple web utility to process images for use in MIG (or possibly others) web galleries, and to upload them to a server. REQUIREMENTS: ================================================== This doesn't really require MIG, but was designed for use with it: http://mig.sourceforge.net This requires a web browser. I like Opera: http://www.opera.com This also requires a web server and PHP. My setup is Apache, running on localhost. This also requires Imagemagick: http://www.imagemagick.com This is usually installed with Linux. To see if you have it, try: 'which convert' at the shell prompt. PHP NOTES: 1. On my setup, I found it necessary to set register_global=On in the php.ini. 2. To use the uploader, PHP must be built with --enable-ftp option. For further assistance with Apache and PHP, please see the documentation on THEIR websites, as I'm not interested in supporting those apps. User/Security: I built and run this as root on my Slackware laptop. Your mileage may vary as non-root. It's probably a good idea not to run this on a live, internet- connected production machine, as I put little thought into security. I did this because I run it on my laptop, which is fairly secure and doesn't act as a web- server other than on localhost for my own use. INSTALLATION/CONFIGURATION: ================================================== Extract *tar.gz package into your MIG directory. // for example cp kmb.tar.gz to $webroot/mig/ // go into mig directory cd $webroot/mig/ // unzip/tar package (name probably differs from // this example gzip -dc kmb.tar.gz|tar -xv // change group/ownership recursively on kmb directory chgrp -R users kmb/ chown -R nobody kmb/ // edit phpvars.php // you must provide valid info in phpvars.php // to use the uploader. That should be all you need to do to set it up. USE: ================================================== READ CAREFULLY. >>> COPY <<< your images to the inbound directory. Make sure they exist elsewhere because when you delete them, you won't be warned. This is because it's troublesome to have to answer confirmation dialogs for every image. 1. copy raw images into the inbound directory 2. open browser, go to 127.0.0.1/mig/kmb/kmp.php 3. you might want to bookmark that By default, make thumbnail is checked. You can change this if you wish. By default, resize is set to 800x600 because that's what I use By default, no rotation, because most of the time my raw pictures are already "landscape" (ie, camera wasn't turned sideways). By default, Rename populates with the current name of the file. If you wish to rename the file, type something there. It would probably be a good idea to keep the same file extension. Click OK to process the image and continue. When you do this, the original is deleted from the inbound directory, and the finished image is put into the outbound directory. The thumbnail is put under the outbound/thumbs directory. The file name vanishes from the list. Click DELETE! to delete the image. You're not prompted to verify the deletion, so it's wise to make sure you have another copy of the source images somewhere. The file name will vanish from the list. Click link to Uploader to go to the Uploader page. Here you'll see a list of all the outbound files, some basic FTP information, and a button to click to upload the files. If the upload fails, it's likely because you don't have the variables set up correctly in phpvars.php, and/or you didn't specify a correct album name in the text box. DISPLAY NOTE: ================================================== This is set up such that if a source image is wider than 800, the displayed dimensions are 800x600. If not, the original dimensions are used. This could cause confusion using odd-sized images, say 800x200. But, I'm only interested in processing my digial camera images, which are normal sized. This will shrink portrait type pictures to 600x800 if they're wider than 800. This stuff might not work great on a monitor set to 640x480, but I really don't care. MISC INFO: ================================================== The directory structure is like this: $webroot/ |-mig/ |--/albums/ |--/utilities/ |--(other MIG subdirs) |--/kmb/ -- main kmb directory |---/inbound/ -- dir for raw images |---/outbound/ -- dir for processed images |----/thumbs/ -- dir for thumbnails of processed images FILES IN KMB DIRECTORY ================================================== kmb.php This is the main php file kmb.png This is the amazing MIG Buddy logo image. phpfuncs.php This contains some key php functions used by kmb.php phpvars.php This contains a few variables uploader.php This is the ftp uploader ================================================== CONTACT INFO: MIG BUDDY by Keith Blackwell... Aug 2004 keith@mzla.com THIS IS FREE. Use at your own risk. If you find this useful and wish to express gratitude, please make a donation via paypal at http://www.mzla.com/keith Thanks!