前言介紹
- 這款 WordPress 外掛「WP Dropzone」是 2017-11-01 上架。
- 目前有 100 個安裝啟用數。
- 上一次更新是 2021-12-28,距離現在已有 1223 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
- 有 4 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
nazsabuz |
外掛標籤
media | dropzone | wpdropzone | wp dropzone | media upload |
內容簡介
可以使用 WP Dropzone 將 Dropzone 整合到 WordPress 網站中。 WP Dropzone 允許您從任何帖子/頁面將文件上傳到 WordPress 媒體庫。它具有大量的選項和功能。
功能:
- 可自定義介面
- 檔案大小限制
- 最大檔案限制
- 檔案擴展名驗證
- 圖像裁剪調整大小
- 圖像品質降低
- 限制訪客用戶
- 支援本地的 Dropzone 事件
使用指南:
在您的帖子/頁面中使用 [wp-dropzone] 短代碼以顯示上傳區域。您也可以在您的模板文件中使用 echo do_shortcode('[wp-dropzone]'); 。
此外,該外掛還提供以下屬性:
- id:給上傳表單分配 ID。如果該字段為空,則會自動生成一個 ID。ID 應僅包含字母(a-z,A-Z)和數字(0-9)。例如: [wp-dropzone id="myID123"]
- callback:使用本地的 Dropzone 事件。有關詳細信息,請參閱 Dropzone 事件。例如: [wp-dropzone callback="success: function(file, response) { console.log(file) }"]
- title:上傳工具的標題。例如:[wp-dropzone title="Drop Files Here"]
- desc:上傳工具的描述。例如:[wp-dropzone desc="Your file will be uploaded to media"]
- border-width:上傳區域的邊框寬度。默認為“2”。例如:[wp-dropzone border-width="2"]
- border-style:上傳區域的邊框樣式。可以是:none、hidden、dotted、dashed、double、groove、ridge、inset、outset、initial、inherit 等。默認為“solid”。例如:[wp-dropzone border-style="dashed"]
- border-color:上傳區域的邊框顏色。使用十六進制顏色代碼。默認值為“#B0B0B1”。例如:[wp-dropzone border-color="#dd102d"]
- background:上傳區域的背景顏色。使用十六進制顏色代碼。默認為“#fff”。例如:[wp-dropzone background="#fbfbfb"]
- margin-bottom:在上傳下方添加邊距。默認為“0”。例如:[wp-dropzone margin-bottom="10px"]
- max-file-size:限制最大檔案大小。默認值基於您的服務器設置(php.ini)。例如:[wp-dropzone max-file-size="2"] // 將最大檔案大小設置為2MB
- remove-links:添加文件刪除/取消按鈕。可以是「true」或「false」。默認值為「false」。例如:[wp-dropzone remove-links="true"]
- clickable:如果設置為 true,則可單擊上傳區域。如果設置為 false,則必須將文件拖到上傳區域才能上傳文件。默認值為「true」。例如:[wp-dropzone clickable="false"]
- accepted-files:指定上傳工具接受的檔案類型。一些有效的類型為:audio/ *、video/ *、image/ * 或檔案擴展名,例如:.gif、.jpg、.png、.doc。例如:[wp-dropzone accepted-files="image/*"] // 只接受影像檔案
- max-files:定義允許上傳的檔案數量。例如:[wp-dropzone max-files="1"] // 只允許上傳一個檔案
- max-files-alert:超出最大檔案限制時顯示警報。例如:[wp-dropzone max-files="1" max-files-alert="One file is enough!"] // 當超過一個文件時顯示警報
- auto-process:如果設置為 false,您必須單擊上傳按鈕才能上傳所選擇的檔案。默認值為「true」。例如:[wp-dropzone auto-process="false"]
- upload-button-text:設置上傳按鈕文本。
原文外掛簡介
Integrate Dropzone with your WordPress site. WP Dropzone will allow you to upload files into WordPress media library from any post/page. It comes with a large number of options and features.
Features
Customizable Interface
File size limit
Max file limit
File extension validation
Image resize with crop
Image quality reduction
Guest user restriction
Supports native dropzone events
Usage Guideline
use [wp-dropzone] shortcode in your post/page to show upload area. You may also use echo do_shortcode('[wp-dropzone]'); in your template file.
The plugin comes with the following attributes:
id: Assign an id to the uploader form. If empty an id will be generated automatically. ID should contain only letters(a-z, A-Z) and numbers(0-9). example: [wp-dropzone id="myID123"]
callback: Use native dropzone events. See Dropzone Events for details. example: [wp-dropzone callback="success: function(file, response) { console.log(file) }"]
title: Title of the uploader. example: [wp-dropzone title="Drop Files Here"]
desc: Description of the uploader. example: [wp-dropzone desc="Your file will be uploaded to media"]
border-width: Border width of the uploader area. Default ‘2’. example: [wp-dropzone border-width="2"]
border-style: Border style of the uploader area. Can be none, hidden, dotted, dashed, double, groove, ridge, inset, outset, initial, inherit. etc. Default ‘solid’. example: [wp-dropzone border-style="dashed"]
border-color: Border color of the uploader area. Use hex color code. Default value ‘#B0B0B1’. example: [wp-dropzone border-color="#dd102d"]
background: Background color of the uploader area. Use hex color code. Default ‘#fff’. example: [wp-dropzone background="#fbfbfb"]
margin-bottom: Add margin to bottom of the uploader. Default ‘0’. example: [wp-dropzone margin-bottom="10px"]
max-file-size: Limit maximum file size. Default value is based on your server settings(php.ini). example: [wp-dropzone max-file-size="2"] // set max file size to 2MB
remove-links: Add file remove/cancel button. Can be ‘true’ or ‘false’. Default ‘false’. [wp-dropzone remove-links="true"]
clickable: If set to true, the upload zone itself will be clickable, If false the upload zone will not be clickable, you have to drag file on the upload zone to upload file. Default value is ‘true’. example: [wp-dropzone clickable="false"]
accepted-files: Specify the types of files that the uploader accepts. Some valid types are: audio/*, video/*, image/*, or file extensions e.g.: .gif, .jpg, .png, .doc. example: [wp-dropzone accepted-files="image/*"] // only image files accepted
max-files: Define how many files are allowed to upload. example: [wp-dropzone max-files="1"] // only one file is allowed to uplaod
max-files-alert: Show an alert when max file limit is excedeed. example: [wp-dropzone max-files="1" max-files-alert="One file is enough!"] // show alert when more than one file
auto-process: When set to false, you have click on upload button in order to upload the selected files. Default value is ‘true’. example: [wp-dropzone auto-process="false"]
upload-button-text: Set upload button text. The button will be visible only if ‘auto-process’ is set to false. example: [wp-dropzone auto-process="false" upload-button-text="Click to Upload"]
dom-id: HTML dom id where to copy the uploaded file URL. This feature is useful when you want to integrate the file with any form. example: [wp-dropzone dom-id="returnUrl"] // the uploaded file url will be copied to '#returnUrl'
resize-width: If set, images will be resized to these dimensions before being uploaded. If only one, resize-width or resize-height is provided, the original aspect ratio of the file will be preserved. example: [wp-dropzone resize-width="800"]
resize-height: If set, images will be resized to these dimensions before being uploaded. If only one, resize-width or resize-height is provided, the original aspect ratio of the file will be preserved. example: [wp-dropzone resize-height="600"]
resize-quality: Set the quality of the resized images. Can be in a range between 0 and 1. example: [wp-dropzone resize-width="800" resize-height="600" resize-quality="0.8"]
resize-method: How the images should be scaled down in case both, resize-width and resize-height are provided. Can be either “contain” or “crop”. example: [wp-dropzone resize-width="800" resize-height="600" resize-method="crop"]
thumbnail-width: Resize the width of thumbnail. Default is 120. example: [wp-dropzone thumbnail-width="140" thumbnail-method="crop"]
thumbnail-height: Resize the height of thumbnail. Default is 120. example: [wp-dropzone thumbnail-width="140" thumbnail-height="140" thumbnail-method="crop"]
thumbnail-method: How the image thumnail should be scaled down. Can be either “contain” or “crop”. example: [wp-dropzone thumbnail-width="140" thumbnail-height="140" thumbnail-method="contain"]
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Dropzone」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。