// ##########################
// REQUIREMENTs
// ##########################

- PHP
- MySQL
- GD > 2.0.28 (compiled with php)
- Javascript on the client!

// ##########################
// INSTALLATION INSTRUCTIONS
// ##########################

1. Copy the iwimg folder to your tinyMCE plugins directory.
2. Create a folder to store your images in (chmod 777/755). I usually call this "wysiwyg_images" and put it in the same location as the website.
3. Create a mysql database and run image.sql (in INSTALL FILES folder) to create the tables with demo data.
4. Open conf.inc.php and change the variables for your setup.
5. Add the plugin "iwimg" to list of plugins and on a button row in your tinyMCE init code.
6. A "thumbs" and "originals" folder 'should' be created automatically on upload of your first file under your image path. If you get errors, and they aren't there, create them manually (755/777).

For example:
plugins : "fullscreen,iwimg",
theme_advanced_buttons1_add : "forecolor,backcolor,separator,iwimg",

6. Click on the iwimg button and all should work.

// ##########################
// UPGRADE INSTUCTIONS
// ##########################

1. You should probably back everything up.
2. Replace your iwimg plugins folder with the new set of files.
3. Change the settings in conf.inc.php again.
4. All done.

// ####################
// CHANGE LOG
// ####################

> V 1.1 = > V 1.2
- Added duplicate image support. Each image size inserted into the editor creates a new file. This stops
  problems when you want to use the same image on different pages at different sizes. It could become a little
  heavy on diskspace so I have kept the old functionality in place. Just choose what you want in the conf file
  under $config[duplicates]. Default is on.
- Made a lot of changes to files to stop NOTCIES from appearing for people that leave them on.
- Added the ability to set the quality of a JPEG file on resize. Default is 90%, recommeded by a user on 
  sourceforge.

> V 1.0.1 = > V 1.1
- Put in support for GIF and PNG files
- Image resize now uses ImageCopyResampled rather than Resized to make a better image quality
- Fixed the "Not a valid JPEG error"
- Fixed current language file issues
- Thumbs and originals folders created automatically
- Added delete.gif to images folder
- Removed examples images from image.sql

// ####################
// NOTE
// ####################

This plugin was made for very specific purposes and so does not use
many standard tinyMCE functions. Other than the init and return of code
the system is completely seperate.

The plugin does not support languages at the moment but there is little
text anyway. If you would like to make this plugin a whole lot better
then it would be great to hear from you.

// #################
// HOW IT WORKS
// #################

Images can be stored either in one large folder or in a number of seperate 
folders, all one level.

On selecting a folder the thumbnail view is updated to show all of the images
in the particular folder.

On selecting an image its details are loaded into the large box. By clicking
on the buttons to the right of the large thumbnail you can change the size
of the image using GD (html resize is rubbish).

Restore image returns the image that was originally uploaded, a very useful
function. The GD image resize is also done off of the original image incase
the user makes the image really small and than wants it bigger again.

clicking insert image will return the very simply img tag with the alt text.
To cancel, don't click on any update buttons, just close the window.
