I originally wrote this for a client as a way to get company logos to appear inside WordPress posts... easy you say huh? What about if we were dealing with people who had no idea what to do when looking at the standard Wordpress 'Add Media' or 'Add Image' page. It all seemed a bit too complicated for the average person so SB Uploader was born.
The idea of the plugin is that it means the act of uploading an image can be done on the same page as the Post/Page editor and there is no separate upload button, just the Save/Publish Post/Page button as normal. This ensures that as part of their blog post or copywriting process an image could be chosen before publishing.
This plugin lets you add as many images as you like to any WordPress object.. be it Posts, Pages, Categories, Tags, Custom Post Types or Custom Taxomonies. It optionally can set the WordPress Featured Image to take advantages of themes that use this feature. It also allows for a fallback image which will be provided in the event that an image was not uploaded. Shortcodes are created for each image so that you can upload images and use the resultant shortcode anywhere in your template/widget structure.
There is a fallback feature with each uploader to allow you to centrally specify the URL of an image to put in place when one is not uploaded to an object. There are always times when you don't want an image on a specific page so I have added a 'disable fallback' option to facilitate this.
I'm pretty sure that's all bases covered for now.. Do let me know if you want to see this plugin extended in ANY way.
This section describes how to install the plugin and get it working.
e.g.
- Upload the contents of the zip file to the
/wp-content/plugins/
directory
- Activate the plugin through the 'Plugins' menu in WordPress
- Configure the plugin using the 'Settings Menu'
Normal procedure really. See the other tabs in this page for more usage information.
More info here:
http://www.sean-barton.co.uk/sb-uploader/
1: Initial release, basic functionality
2: Added taxonomy support, added multiple instance support, added widgets, added shortcodes
2.1: Added image widget to allow the placement of an image into a sidebar without using HTML
2.2: Added uploaders for all post types instead of just post and page.
2.3: Fixed WP 3.2 compatibility problem
2.4: Added tags to the taxonomy support list
2.5: Added granularity for custom post types. You can now add X uploaders for each custom post type individually. Updated minimum uploaders to 0 from 1 in case they aren't required.
2.6: Fixed issues with custom post type uploads.
2.7: URLs now stored as relative to the site root as opposed to being fully absolute. This means that if you move server or use load balancing then the images are served from the same server as opposed to the original server they were uploaded to!
2.8: Fixed bug whereby uploaders were being shown despite 0 being selected from admin screen.
2.9: Fixed bug for sites that reside within a subdirectory.
3.0: Added option to switch from relative to absolute URLs. fixed a bug whereby you needed to click update settings twice for newly added uploaders to 'take'
3.1: Fairly major release. I have added a notification to tell you if the upload directory is not writeable. The file manager has been removed. The plugin gains an icon so it stands out in the admin menus. The plugin has a debug section on the admin page to help you work out where your images are going. The interface in the meta boxes is now more space efficient and gives the dimension and mime type. The shortcodes now support the width and height parameters to resize the images. Timthumb has been added for resizing of images on the front end and finally a few helper functions have been written to make adding images into your theme or site much easier.
3.2: Snagging release. Added some code to make sure that the uploader doesn't run more than once when saving. It now renames the uploaded file if the old file can't be deleted to save on upload errors. Now uses the page ID from $_POST if present in favour of the one passed as an argument to the save_post action. This will cut down on revision saves and fixes a conflict with another plugin I was experiencing.
3.3: Security release. An exploit was found and has been fixed. This is to do with people being able to upload whatever they wanted as opposed to certain file types. This has been resolved and replaced for image file types instead.
3.4: Modified to use the core WP uploader. This means native resizing and the ability to set the featured image. Also included legacy mode for people who would rather use the original uploader system.
3.5: Minor release.. removed the SB Uploader prefix in the meta boxes so that it feels more integrated and also removed the 'high' priority on the meta box too so it sits just under the publish box where it should be.
3.6: Minor release.. added add_theme_support('post-thumbnails'); as some themes didn't include it. Caused an error when trying to use the WP image
3.7: Minor release.. fixed bug whereby the passed post_id was being ignored for wordpress featured image requests
3.8: Minor release.. updated get_taxonomy_image to accept taxonomy name insead of assuming category. Second argument is now taxonomy name. Added sbu_get_the_taxonomy_image as template helper function sbu_get_the_taxonomy_image($custom_field_name, $taxonomy, $post_id=0);
3.9: Improved support for the taxonomy image whereby the taxonomy no longer need be specified. Also added support for timthumb resizing on the taxonomy image.
4.0: Removed jQuery to add Enctype and used the PHP filter instead. Added a remove checkbox to easily discard existing images.
4.1: Very Minor update. Added support for some video and audio formats for upload.
4.2: Split post and page uploaders for discrete control. Added a checkbox to remove an uploaded image. Moved uploader settings to the settings menu and deleted up arrow graphic from the package
4.3: Updated to set featured image by default for new installs. Added fallback image feature and tidied up the admin page. Removed the settings from the config page as rarely relevant. Tidied up the readme file
4.4: Bug fix whereby if the sbu_the_wp_image was used and no image was present it output an empty img tag. Also added a thumbnail to the listing admin page. This can be switched off using screen options. Only works with the featured image at the moment although I may extend to use all of the attached images per post type in later versions
4.5: Bug fix.. incorrect variable name breaks non featured image insert from last version onwards. Fixed this now.
4.6: Bug fix.. Validated around a foreach that was causing PHP notices to show on sites with error reporting levels set to high.
4.7: Fixed functionality.. thumbnail column added to post type. Shows featured image in 50x50 square. Will work with existing images also.
4.8: Bug fix.. When plugin is used in a shortcode and the fallback image is triggered it would get the incorrect post type. Now sorted.