=== Inline Upload === Contributors: nickboss Donate link: http://www.iptanus.com/?page_id=27 Tags: upload, upload file Requires at least: 2.9.2 Tested up to: 3.0.1 Stable tag: "trunk" Simple plugin to upload files from any page == Description == With this plugin you can upload files to your site from any page by using shortcodes. Simply put the shortcode [inline_upload] to the contents of any WordPress page and you will be able to upload files to any directory inside wp-contents of your WordPress site. The characteristics of the plugin are: * It does not use flash, so it can work in any browser, even in mobile phones. * You can have more than one instances of the shortcode in the same page. * It supports localization. * It is very small. * It integrates with WP-Filebase * It is highly customizable. Please visit the **Other Notes** section for customization options of this plugin. == Installation == 1. First copy inline_upload directory inside wp-contents/plugins directory of your wordpress site. 1. Activate the plugin from Plugins menu of your Dashboard. 1. In order to use the plugin simply put the shortcode [inline_upload] in the contents of any page. == Frequently Asked Questions == = Do I need to have Flash to use then plugin? = No, you do not need Flash to use the plugin. == Screenshots == 1. A screenshot of the plugin is shown below. == Changelog == = 1.2 = * Added notification by email when a file is uploaded. * Added the ability to upload to a variable folder, based on the name of the user currently logged in. = 1.1 = Added the option to allow anyone to upload files, by setting the attribute uploadrole to "all". = 1.0 = Initial version. == Upgrade Notice == = 1.2 = Optional upgrade in order to set additional capabilities. = 1.1 = Optional upgrade in order to set additional capabilities. = 1.0 = Initial version. == Attributes == The easiest way to use the plugin is to put the shortcode [inline_upload] in the page. In this case, the plugin will use the default functionality. If you want to customize the plugin (define the upload path, use file filter, change title and button text) then you can use the following attributes: * **uploadid:** This is the ID of every instance of the plugin inside the same page. Valid values are 1,2,3... Please use a different value for every instance. * **uploadtitle:** The title of the plugin. Default value is "Upload a file". * **selectbutton:** The title of the select button. Default value is "Select File". * **uploadbutton:** The title of the upload button. Default value is "Upload File". * **uploadrole:** This is the role that is allowed to upload files. Default role is "administrator". If you use another role, like "editor", then only users of this role and also of role "administrator" will be able to upload files. If you set uploadrole to "all" then all users, even guests, will be able to upload files. * **uploadpath:** This is the path of the upload directory. This directory must be inside the wp-contents folder of your WordPress site and the path must be relative to wp-contents. For instance, if your upload directory is "wp-contents/uploads/myuploaddir", then uploadpath must have the value "uploads/myuploaddir". The default value is "uploads", meaning that the files will be uploaded to wp-contents/uploads dir. If you put the variable "%username%" inside the uploadpath string, then this variable will be replaced by the username of the user currently logged in. * **createpath:** If this attribute is set to "true", the upload directory, defined by uploadpath, will be created in case it does not exist. Default value is "false". * **uploadpatterns:** This is the filter of the uploaded files. Default value is "*.*", meaning that all files can be uploaded. Use this attribute to restrict the types of files that can be uploaded. For instance, in order to upload only pdf files put "\*.pdf". You can use more that one filters, separated by comma, for instance "\*.pdf,\*.doc". * **maxsize:** This is the maximum size in MBytes of the uploaded files. Use this attribute to restrict the upload of files larger that this value. Default value is "10", meaning that you cannot upload files larger than 10MBytes. * **filebaselink:** This attribute defines if this plugin will be linked to wp-filebase plugin. Wp-filebase is another plugin with which you can upload files and then show them in your pages in a customizable way. If you set this attribute to "true", then you can upload files inside wp-filebase directories using inline_upload and then update the databases of wp-filebase, so that it is informed about the new uploads. The default value is "false". Please note that this attribute does not check to see if wp-filebase is installed and active, so be sure to have wp-filebase active if you want to use it. * **notify:** If this attribute is set to "true", then an email will be sent to the addresses defined by the attribute *notifyrecipients* to inform them that a new file has been uploaded. * **notifyrecipients:** This attribute defines the list of email addresses to receive the notification message that a new file has been uploaded. More that one address can be defined, separated by comma (,). * **notifysubject:** This attribute defines the subject for the notification message. Default value is "File Upload Notification". * **notifymessage:** This attribute defines the body text for the notification message. Default value is "Dear Recipient, this is an automatic delivery message to notify you that a new file has been uploaded. Best Regards". You can use any of these attributes to customize the plugin. The way to use these attributes is the following: `[inline_upload attribute1=value1 attribute2=value2]` Here are some examples: ` [inline_upload uploadtitle="Upload files to the Upload dir"] [inline_upload uploadtitle="Upload files to the Upload dir" uploadpath="uploads/myuploaddir"] [inline_upload uploadid="1" uploadpath="uploads/myuploaddir"] [inline_upload uploadpath="uploads/users/%username%" createpath="true"] [inline_upload uploadpath="uploads/myuploaddir" notify="true" notifyrecipients="name1@address1.com, name2@address2.com"] ` == Variables == From version 1.2 variables are supported inside attributes. A variable is a string surrounded by percent characters, in the form *%variable_name%*. This variable is replaced by another string whenever the plugin is executed. For instance, if the variable %username% is used inside *uploadpath* attribute, then it will be replaced by the username of the user who is currently logged in every time a file is uploaded. By this way, every user can upload files to a separate folder, without any additional programming. For the time being, only one variable is supported, *%username%* inside attribute *uploadpath*. == Requirements == The plugin requires to have Javascript enabled in your browser. For Internet Explorer you also need to have Active-X enabled.