Inline Upload free WordPress plugin
Description
Inline Upload free WordPress plugin
With this plugin you can upload files to your site from any page by using shortcodes.
THIS PLUGIN HAS BEEN REPLACED BY WordPress File Upload plugin and is no longer supported.
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 shows an upload progress bar (in browsers supporting HTML5)
It supports localization.
It integrates with WP-Filebase.
It is highly customizable.
It produces notification messages and e-mails.
You can send additional text information along with the uploaded file
Please visit the Other Notes section for customization options of this plugin.
THIS PLUGIN HAS BEEN REPLACED BY WordPress File Upload plugin and is no longer supported.
Attributes
THIS PLUGIN HAS BEEN REPLACED BY WordPress File Upload plugin and is no longer supported.
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”.
singlebutton: If this attribute is set to “true”, only Upload Button will be shown and file will be automatically uploaded when selected. Default value is “false”.
uploadrole: This is the roles that are allowed to upload files. Default role is “administrator”. If you use other roles, like “editor”, then only users of this role and also of role “administrator” will be able to upload files. You can set multiple roles, separated by comma, e.g. “editor, author”. 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. The path must be relative to wp-content folder of your WordPress website. For instance, if your upload directory is “wp-content/uploads/myuploaddir”, then uploadpath must have the value “uploads/myuploaddir”. The default value is “uploads”, meaning that the files will be uploaded to wp-content/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. If you want to upload files outside wp-content folder, then put a double dot (..) at the beginning of your uploadpath value.
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.
accessmethod: This attributes defines the method to create directories and upload files. Default value is “normal”. If it is set to “ftp”, then the plugin will attempt to create directories and upload files using ftp access. In order to do this, the attribute ftpinfo must also be filled with valid ftp access information. Use this attribute when you cannot upload files, access uploaded files or cannot copy or delete uploaded files because of SAFE MODE restrictions, or because the owner of the file is the domain administrator.
ftpinfo: This attribute defines the ftp access information. It has the syntax username:password@domain. If username, password or domain contains the characters (:) or (@), then replace them with (:) and (@) in order to avoid misreading of the attribute.
useftpdomain: This attribute is used when the ftp domain used to upload files is in different domain than WordPress installation. If it is set to “true” (and also uploadmethod is “ftp”), then the domain that will be used to upload files will be the one defined in ftpinfo attribute. Default value is “false”.
dublicatespolicy: This attribute defines what to do when the upload file has the same name with another file inside target directory. If it is set to “overwrite” then the upload file will replace the existing file. If it is set to “reject” then the upload operation will be cancelled. If it is set to “maintain both” then the upload file will be saved inside the target directory with another name, in order to keep both files. Default value is “overwrite”.
uniquepattern: This attribute defines how to save the upload file when a file with the same name already exists inside the target directory. If it is set to “index” then the upload file will be saved with a numeric suffix, like (1), (2) etc. in order to keep the name of the uploaded file unique. If it is set to “datetimestamp”, then the suffix will be an encoded datetime of the upload operation. The plugin ensures that the name of the uploaded file will be unique, in order to avoid accidental replacement of existing files. Default value is “index”.
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 (,). You can use variables inside this attribute, as explained below.
notifysubject: This attribute defines the subject for the notification message. Default value is “File Upload Notification”. You can use variables inside this attribute, as explained below.
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 variables inside this attribute, as explained below.
notifyheaders: This attribute defines additional headers to be included in the notification email (e.g. set “From”, “Cc” and “Bcc” parameters or use HTML code instead of text). Default value is “”. For example, in order to send HTML email please set this attribute to “Content-type: text/html”.
attachfile: This attribute defines if the uploaded file will be attached to the notification email. Default value is “false”.
redirect: This attribute defines if the user will be redirected to another web page when the file is uploaded successfully. Default value is “false”.
redirectlink: This attribute defines the url of the redirection page. Please use the prefix “http://” if the redirection page is in another domain, otherwise the server will assume that the url is relative to the server path.
adminmessages: This attribute offers the option to administrator users to receive additional information about upload errors. These messages will be visible only to administrators. Default value is “false”.
successmessage: This attribute defines the message to be shown upon successfull upload. Default value is “File %filename% uploaded successfully”. You can use the variables %filename% and %filepath% inside the message, as explained below.
successmessagecolors: This attribute defines the colors of the message shown upon successfull upload. Default value is “#006600,#EEFFEE,#006666”. The first value is the text color, the second the background color and the third the border color.
failmessagecolors: This attribute defines the colors of the message shown upon failure to upload. Default value is “#660000,#FFEEEE,#666600”. The first value is the text color, the second the background color and the third the border color.
showtargetfolder: This attribute defines if a message with the upload directory will be shown. Default value is “false”.
targetfolderlabel: This attribute defines the text for the message for the upload directory. Default value is “Upload Directory”.
askforsubfolders: This attribute defines if the user can select a subfolder to upload the file. Default value is “false”. If set to “true”, then the user is able to select a subfolder of the path, defined by the attribute uploadpath, to upload a file through a drop down list. This attributed is used together with attribute subfoldertree, which defines the subfolders.
subfoldertree: This attribute defines the structure of the subfolders that the user can select to upload a file. Default value is “”. The format of this attribute is as follows: the subfolders are separated by commas (,), e.g. “subfolder1, subfolder2”. It is possible to use nested subfolders (a folder inside another folder). To do this place stars (*) before the name of the subfolder. The number of stars determines nesting level, e.g. “subfolder1, *nested1, *nested2, **nested3”. Please note that the first subfolder must be the name of the folder defined by attribute *uploadpath* (only the last part) without any stars, while all the next subfolders must have at least one star. The user has also the capability to use a different name (from the actual subfolder name) to be shown in the drop down list for every subfolder, by separating the actual and shown name using the slash (/) symbol, e.g. “subfolder1, *subfolder2/shownname2, *subfolder3/shownname3”.
forceclassic: This attribute defines if the plugin will use the old classic functionality to upload files (using forms) or ajax functionality (supported in HTML5). Default value is “false”. Please note that if your browser does not support HTML ajax functionality, then the plugin will automatically switch to classic one.
testmode: This attribute defines if the plugin will be shown in test mode. Default value is “false”. If it is set to “true”, then the plugin will obtain a “dummy” functionality (it will not be able to upload files) and it will appear showing all of its objects (the selection of subfolders, progress bar, a test message), while the buttons will show a “Test Mode” message when pressed. This option can be used to configure the dimensions of the individual objects of the plugin more easily.
widths: This attribute can be used to define the width of every individual object of the plugin. Default value is “”. To define the width of an individual object, simply put the name of the object and the width, separated by the (:) character (e.g. “title:100px”). To define more than one objects separate them with comma (,). The name of every individual object is shown below.
heights: This attribute can be used to define the height of every individual object of the plugin. Default value is “”. To define the height of an individual object, simply put the name of the object and the height, separated by the (:) character (e.g. “title:20px”). To define more than one objects separate them with comma (,). The name of every individual object is shown below.
placements: This attribute can be used to change the placement of the objects of the plugin. Default value is “title/filename+selectbutton+uploadbutton/subfolders/userdata/progressbar/message”. Every line is separated by a slash (/). To put more than one objects to the same line, separate them with a plus (+). The name of every object is shown below.
userdata: This attribute defines if additional text information will be requested by the user. If set to “true”, then an additional textbox will appear, prompting the user to put text data. These data will be sent to email recipients, if email notification has been activated and %userdata% variable exists inside notifymessage attribute. Default value is “false”.
userdatalabel: This attribute defines the labels of the userdata fields. Separate each field with slash “/”. If you want a field to be required, then preceed an asterisk () before the label. Example to create 2 fields, an optional Name and a required Email field: userdatalabel=”Name/Email (required)”. Default value is “Your message”.
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=”../myuploaddir”]/> [inline_upload uploadpath=”uploads/users/%username%” createpath=”true”] [inline_upload uploadpath=”uploads/myuploaddir” notify=”true” notifyrecipients=”name1@address1.com, name2@address2.com”] [inline_upload uploadpath=”/uploads/myuploaddir” askforsubfolders=”true” subfoldertree=”myuploaddir/My Upload Directory,*subfolder1/Subfolder1 Inside myuploaddir,**inner/2nd Level Nested Dir, *reports/Reports”] [inline_upload uploadrole=”all” uploadpath=”/uploads/filebase/%username%” createpath=”false” notify=”true” notifyrecipients=”myname@domain.com” notifysubject=”A new file has been uploaded!” attachfile=”true” askforsubfolders=”true” subfoldertree=”admin/Administrator,*root/Root Folder,**inner, *reports/Reports” filebaselink=”true” widths=”filename:150px, selectbutton:80px, uploadbutton:80px, progressbar:220px, message:368px, subfolders_label:100px, subfolders_select:125px” placements=”title/filename+subfolders/selectbutton+uploadbutton+progressbar/message”] [inline_upload uploadpath=”uploads/myuploaddir” notify=”true” notifyrecipients=”name1@address1.com, name2@address2.com” notifymessage=”File %filename% has been received, together with fields Name:%userdata0%, Email:%userdata1%” userdata=”true” userdatalabel=”Name/*Email (required)”] [inline_upload uploadpath=”uploads/myuploaddir” notify=”true” notifyrecipients=”name1@address1.com, name2@address2.com” notifymessage=”This is a test HTML message body.
This word is italic and this is bold.” notifyheaders=”Content-type: text/html”] 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, the following attributes are supported: %username%: Is replaced by the username of the current user. Can be used inside attributes uploadpath, notifysubject and notifymessage. %useremail%: Is replaced by the email of the current user. Can be used inside attributes notifyrecipients, notifysubject and notifymessage. %filename%: Is replaced by the filename (not including path information) of the uploaded file. Can be used inside attributes notifysubject, notifymessage, successmessage and redirectlink. %filepath%: Is replaced by the filepath (full path and filename) of the uploaded file. Can be used inside attributes notifysubject, notifymessage and successmessage. %blogid%: Is replaced by the blog_id of the current site. Can be used inside attribute uploadpath. %userdataXXX%: Is replaced by the additional message that the user has sent together with the file upload. XXX is the number of the field (starting from 0). The shortcode attribute userdata must have been set to “true”. Can be used inside attributes notifysubject, notifymessage. Requirements THIS PLUGIN HAS BEEN REPLACED BY WordPress File Upload plugin and is no longer supported. The plugin requires to have Javascript enabled in your browser. For Internet Explorer you also need to have Active-X enabled. In order to have ajax HTML5 functionality (no page reload during file upload, progress bar), a browser supporting HTML5 must be used.
This word is italic and this is bold.” notifyheaders=”Content-type: text/html”] 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, the following attributes are supported: %username%: Is replaced by the username of the current user. Can be used inside attributes uploadpath, notifysubject and notifymessage. %useremail%: Is replaced by the email of the current user. Can be used inside attributes notifyrecipients, notifysubject and notifymessage. %filename%: Is replaced by the filename (not including path information) of the uploaded file. Can be used inside attributes notifysubject, notifymessage, successmessage and redirectlink. %filepath%: Is replaced by the filepath (full path and filename) of the uploaded file. Can be used inside attributes notifysubject, notifymessage and successmessage. %blogid%: Is replaced by the blog_id of the current site. Can be used inside attribute uploadpath. %userdataXXX%: Is replaced by the additional message that the user has sent together with the file upload. XXX is the number of the field (starting from 0). The shortcode attribute userdata must have been set to “true”. Can be used inside attributes notifysubject, notifymessage. Requirements THIS PLUGIN HAS BEEN REPLACED BY WordPress File Upload plugin and is no longer supported. The plugin requires to have Javascript enabled in your browser. For Internet Explorer you also need to have Active-X enabled. In order to have ajax HTML5 functionality (no page reload during file upload, progress bar), a browser supporting HTML5 must be used.