Image Upload Version: 0.2 Author: Nick Ramsay Created: 2010/06 Last Updated: 2010/11/19 Tested on: Hotaru 1.4.0 ~ 1.4.2 Plugins Required: Tim Thumb Plug & Play: Yes Supported: No Description This plugin enables the post submitter to upload an image from his or her computer to attach to the post. See the Magazine demo here. Features: - Adds option to attach an uploaded image to new and old posts - Includes the ability to remove an attachment - Creates an "uploads" folder if one doesn't already exist - Stores images in folders organized by site id and date - Displays thumbnails on list pages and embeds a larger image on post pages - Uses the Tim Thumb plugin for thumbnail creation and caching - Uses the Thickbox plugin for displaying images when thumbnails are clicked - Options to resize thumbnails and embedded images - Option to set the maximum filesize for images that can be uploaded - Advanced function for overriding size settings within templates NOTE: This plugin only allows a single image per post. The position of the image is determined by where you put the plugin hook in your template, and is the same for every post. Image Upload was designed to make article posting as quick as possible. You type your text, upload an image and you're finished. See the Magazine Demo as an example of how effective this fixed position, single image concept is. If you want to control the sizes, position and number of images per post, this plugin is not for you. Instructions 1. Upload the "image_upload" folder to your plugins folder. 2. Install it from Plugin Management in Admin. 3. Edited image sizes in Admin -> Plugin Settings -> Image Upload 4. Add this plugin hook to submit2.php and submit_edit.php on the line AFTER the last closing </form> tag: PHP: <?php $h->pluginHook('image_upload'); ?> By default, thumbnail and embedded images are displayed via the "show_post_content_list" and "show_post_content_post" plugin hooks in bookmarking_list.php and bookmarking_post.php respectively (or their equivalent templates in the Magazine plugin). Advanced Usage You can prevent the default behavior by excluding the image_upload plugin from the show_post hooks, i.e.: PHP: <?php $h->pluginHook('show_post_content_list', '', array(), array('image_upload')); ?> PHP: <?php $h->pluginHook('show_post_content_post', '', array(), array('image_upload')); ?> Then, as a replacement, use: PHP: <?php $h->pluginHook('show_post_image'); ?> Highly customized themes may need unique sizes per plugin hook. To specify them, set the image size like this: PHP: <?php $h->pluginHook('show_post_image', '', array('width'=>125, 'height'=>125)); ?> Revision History v.0.2 2010/11/11 - Nick - Upgrade attempts to move all files from "uploads/1" to "uploads" and remove "1" folder. v.0.1 2010/08/16 - Nick - Released first version Please click "Rate Thread" and give this plugin a rating. Thank you.