External files in Media Library

外掛說明

請前往 [媒體]→[新增媒體檔案] 新增一或多個檔案的網址,使用者便能使用這種方式將這些外部檔案新增至媒體庫如同媒體庫中的其他檔案一樣,並可用於全站任何位置。

嵌入 YouTube、Vimeo、FTP、伺服器本機路徑或其他可用來源的檔案,並能在偏好使用的編輯器中使用這類檔案。這個外掛支援區塊編輯器、Elementor、Divi、傳統編輯器、WPBakery 等多種編輯器。

自動對媒體庫及外部檔案進行同步處理。

支援的其他外掛

在 WooCommerce 商店中使用商品圖片的外部資料來源。

在 CatFolders、Filebird 及 Folderly 中對資料夾中的外部檔案進行排序,或在 Enhanced Media Library 中對外部檔案進行分類。

批次匯入

使用者可以頭過支援的 TCP 通訊協定匯入完整目錄,僅需將目錄輸入為匯入路徑,這個外掛便會匯入支援的檔案。針對超大型資料夾,也會進行自動處理佇列。

TCP 通訊協定

網站管理員可以使用下列 TCP 通訊協定將外部檔案匯入至媒體庫:

  • http://
  • https://
  • ftp://
  • ftps://
  • sftp://
  • ssh://
  • file://

以上某些通訊協定需要憑證,而憑證對 HTTP(S) 通訊協定為選用項目。

定期檢查

這個外掛會自動定期檢查網站上所儲存的外部代管且網站已使用的檔案是否仍然可供使用。

存放庫、線上說明及可靠性

請前往這裡閱讀線上說明。

開發用存放庫代管於 GitHub

這個外掛僅會在符合以下條件時,才會發佈新版本:

  • PHPStan 檢查出潛在的程式碼錯誤
  • 符合 WordPress 程式碼撰寫標準

螢幕擷圖

  • 用於新增外部檔案的欄位 (位於 [媒體]→[新增媒體檔案])
  • 新增外部檔案網址的對話方塊

安裝方式

  1. 將壓縮檔解壓縮所得的 external-files-in-media-library 資料夾上傳至 /wp-content/plugins/ 目錄中。
  2. 在 WordPress 管理後台的 [外掛] 選單中啟用外掛。

常見問題集

是否可以不讓其他 WordPress 使用者新增外部網址檔案?

是。網站管理員可以在 [設定]→[External files in Media Library] 中設定哪些使用者角色可以新增外部網址檔案。

是否可以嵌入受密碼保護的外部檔案?

是,但這類檔案會整合在伺服器本機,而非透過原始的外部網址,這樣網站訪客才能無縫存取這些檔案。

是否能嵌入 FTP 的檔案?

是,請參考這份線上說明

是否能匯入完整的目錄?

是,僅需輸入要匯入的目錄路徑。

是否能從伺服器本機匯入檔案?

是,僅需輸入 file 通訊協定的絕對路徑 (例如 file:///var/www/path/to/file.png),另請參閱這份線上說明

是否能匯入 WooCOmmerce 的外部商品圖片?

是,僅需前往 [設定]→[External files in Media Library]→[WooCommerce] 啟用相關設定。WooCommerce 已經實作這項功能,因此僅需在要匯入的 CSV 檔案中新增圖片的外部網址即可,這個外掛自會將這些檔案處理為外部檔案。這也代表網站管理員可以使用這個外掛支援的通訊協定匯入這些檔案。

這個外掛是否有 WP CLI 命令?

有。請參閱這份線上說明,便能了解關於 WP CLI 的選項。

在連接至 Google 雲端硬碟時,Google 顯示訊息告知 App 尚未經過驗證,是什麼原因?

依據 Google 的規範,用於連接至 Google Drive API 的應用程式,只有超過 100 個活躍使用者才會進行檢查及驗證。只要透過這個外掛使用這個功能的使用者仍低於 100 個,就始終會顯示這個訊息。請點擊「不安全」進行確認,仍可將 WordPress 網站連接至 Google 雲端硬碟。

使用者評論

2024 年 10 月 2 日 5 則留言
Hi there,Wanted to give it a try but it took my site down![29-Sep-2024 09:00:07 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string & int in /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php:1036Stack trace:#0 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php(1410): WP_Rewrite->generate_rewrite_rules()#1 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php(1509): WP_Rewrite->rewrite_rules()#2 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php(1884): WP_Rewrite->refresh_rewrite_rules()#3 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/rewrite.php(282): WP_Rewrite->flush_rules()#4 /home/xxxxxxxxxxxxx.com/public_html/wp-content/plugins/external-files-in-media-library/classes/eml/Controller/class-proxy.php(225): flush_rewrite_rules()#5 [internal function]: threadi\eml\Controller\Proxy::do_refresh()#6 /home/xxxxxxxxxxxxx.com/public_html/wp-content/plugins/external-files-in-media-library/classes/eml/class-transient.php(186): call_user_func()#7 /home/xxxxxxxxxxxxx.com/public_html/wp-content/plugins/external-files-in-media-library/classes/eml/class-transients.php(152): threadi\eml\Transient->display()#8 /home/xxxxxxxxxxxxx.com/public_html/wp-content/plugins/external-files-in-media-library/inc/admin.php(1241): threadi\eml\Transients->check_transients()#9 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-hook.php(324): eml_admin_notices()#10 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#11 /home/xxxxxxxxxxxxx.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()#12 /home/xxxxxxxxxxxxx.com/public_html/wp-admin/admin-header.php(303): do_action()#13 /home/xxxxxxxxxxxxx.com/public_html/wp-admin/plugins.php(624): require_once(‘/home/1340234.c…’)#14 {main}thrown in /home/xxxxxxxxxxxxx.com/public_html/wp-includes/class-wp-rewrite.php on line 1036
2024 年 8 月 1 日 1 則留言
Highly recommend this plugin for anyone looking to enhance their media management with ease!
2024 年 4 月 12 日
This plugin simply does what it says it does.This allows me to have images hosted on a Discord channel directly on my Wordpress website without having to host a single one of them. If I could find just one little thing to add, it would be to see in real time which link is being processed. Bravo to the developer, great work !
閱讀全部 3 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈External files in Media Library〉的開發相關工作。

參與者

〈External files in Media Library〉外掛目前已有 4 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈External files in Media Library〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

4.0.0

  • Added option to synchronize directories with files on every supported protocol
  • Added support for the plugins CatFolders, Filebird and Folderly to import files in specific folders of this plugins
  • Added support for the plugin Enhanced Media Library to add imported files to their categories
  • Added wrapper for all settings of this plugin for easier management in the future
  • Added custom intervals for any cron event this plugin delivers
  • Added option for import local files from chosen directory via queue (for very large directories)
  • Added support to add external SVG files
  • PHP 8.1 is now minimum requirement
  • Optimized styling of list of directory services
  • Optimized handling of import through directory services
  • Moved import tasks from general Files in own object Import which is now also a directory listing object
  • Multiple code optimizations
  • Extended support for YouTube channel imports
  • Extended help for using Imgur images
  • Renamed Directory Credentials to Directory Archive
  • Optimized hint if PHP-module zip is missing for the ZIP service
  • More hooks
  • Fixed error on import on any files from local hosting
  • Fixed to early loading of translations
  • Fixed error on GoogleDrive import which would break if a duplicate is detected
  • Fixed potential error of sodium encryption is used and failed
  • Fixed faulty check for existing schedules
  • Fixed missing check for duplicate YouTube videos during import of them
  • Fixed preview of files in FTP service (which also prevents the usage of FTP-files as service)
  • Fixed wrong “Go to logs” URL if import failed
  • Fixed typos

older changes