[WordPress] 外掛分享: Library Viewer

WordPress 外掛 Library Viewer 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Library Viewer」是 2019-07-07 上架。
  • 目前有 400 個安裝啟用數。
  • 上一次更新是 2025-02-25,距離現在已有 68 天。
  • 外掛最低要求 WordPress 3.0.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 有 13 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

pexlechris |

外掛標籤

ftp | File List | file manager | download manager |

內容簡介

揭密:
LIBRARY VIEWER FILE MANAGER ADD-ON已經發佈了!來看看吧 😉

使用 Library Viewer,你可以顯示你的 (FTP) 伺服器某個「特定資料夾」的包含檔案和資料夾給前端使用者查看。

與其他類似的插件相比,最大的不同是:
1. 你可以允許使用者查看檔案是否存在,但如果使用者未登錄 (或者不是管理員、作者等),就無法打開檔案。
2. 你可以允許使用者在自定義檢視器中查看檔案,或將其重新導向到你選擇的 RESTful 網路服務(下面有範例)。

範例

對於此插件(免費版本),「特定資料夾」是你的 httpdocs(yoursite.com/library) 中的「library」資料夾。
如果你想顯示不在 yoursit.com/library 中的其他資料夾(及其檔案),你需要使用Library Viewer Pro的路徑參數。

這個插件在 WordPress 網站中添加了 [library-viewer] 短碼!
所以,你只需要在帖子、頁面、小工具等中添加這個短碼,就可以在前端顯示資料夾和檔案。

[library-viewer] 短碼還有可選參數,可以擴展插件的功能:

參數說明

  參數文檔和使用案例

  LIBRARY VIEWER 的參數

have_file_access(have_file_access 參數用於決定哪些使用者可以查看檔案)
my_doc_viewer(my_doc_viewer 參數用於決定在哪個檢視器中打開檔案)
login_page(login_page 參數用於定義使用者必須登錄的登錄頁面-如果需要的話)

  LIBRARY VIEWER PRO 的參數

path(path 參數允許我們選擇要在前端顯示的資料夾。當我們說「資料夾」時,指的是該資料夾的內容,即包含此資料夾的資料夾和檔案)
waiting_seconds(waiting_seconds 參數設置使用者等待重新導向到登錄頁面並查看檔案的時間(0: 立即重新導向)。)
breadcrumb(breadcrumb 參數決定是否在前端的圖書館中顯示 breadcrumb 或不顯示。)
hidden_folders(hidden_folders 確定哪些資料夾不會在前端的圖書館中顯示,並且無法使用。)
shown_folders(shown_folders 參數確定哪些資料夾將在前端的圖書館中顯示,並且可以使用。)
hidden_files(hidden_files 參數決定哪些檔案不會在前端的圖書館中顯示,並且無法使用。)
shown_files(shown_files 參數確定哪些檔案將在前端的圖書館中顯示,並且可以使用。)
url_suffix(url_suffix 允許你在 URL 中添加後綴,這樣你就可以在同一頁面上多次使用 [library-viewer] 短碼。)

  LIBRARY VIEWER 文件管理器插件的參數

delete_folder(delete_folder 參數決定哪些使用者可以刪除資料夾。)
delete_file(delete_file 參數決定哪些使用者可以刪除檔案。)

原文外掛簡介

Spoiler:
LIBRARY VIEWER FOR WOOCOMMERCE ADD-ON has been released! Check it 😉
With Library Viewer, you can display the containing files and the containing folders of a “specific folder” of your (FTP) server to your users in the front-end.
The significant difference from other similar plugins is that:
1. You can allow users to view that the files exist, but cannot open them if they are not logged in (or if they are not administrators, or authors etc…).
2. You can allow users to view files in a custom viewer or redirect them through a RESTful web service of your choice(examples exists below).
DEMO
For this plugin (the free version), the “specific folder” is the folder
“library” of your httpdocs(yoursite.com/library).
If you want to display other folder (and its files) that isn’t contained in yoursite.com/library , you need to use the path parameter of Library Viewer Pro.
This plugin adds the [library-viewer] shortcode in your WordPress site!
So the only thing that you must do to display the folders and files in the front-end is to add this shortcode in a post, page, widget etc.
The [library-viewer] shortcode get optional parameters that extend the functionality of plugin:
Parameters Documentation
  PARAMETERS DOCUMENTATION AND USE CASES
  PARAMETERS OF LIBRARY VIEWER

have_file_access (have_file_access parameter determines which user have access to view the files.)
my_doc_viewer (my_doc_viewer parameter determines in which viewer the file will be opened.)
login_page (login_page parameter defines the login page that user will be redirected -if need it-, to log in.)

  PARAMETERS OF LIBRARY VIEWER FOR WOOCOMMERCE

have_file_access=”customer_with_folder_access” (The customer_with_folder_access value for the have_file_access parameter grants access to users who have purchased a product with folder access.)
sold_on (sold_on parameter specifies which product must be purchased in order to gain folder access.)

  PARAMETERS OF LIBRARY VIEWER PRO

path (path determines which folder to display in the Library on the front end. When we refer to a “folder,” we mean the folder’s contents, including any subfolders and files within it.)
guest_view_access (guest_view_access determines if guest users can view folder contents. By default, all users can see folder contents, but they cannot open files.)
waiting_seconds (waiting_seconds parameter sets the seconds of user is waiting the redirection to login and see the file (0: for instant redirect).)
breadcrumb (breadcrumb parameter determines if breadcrumb will be displayed in the Library in front-end or not.)
hidden_folders (hidden_folders determines which folders will not be displayed and will not be accessible by Library in the front-end.)
shown_folders (shown_folders parameter determines which folders will be displayed and will be accessible by Library in the front-end.)
hidden_files (hidden_files determines which files will not be displayed and will not be accessible by Library in the front-end.)
shown_files (shown_files parameter determines which files will be displayed and will be accessible by Library in the front-end.)
url_suffix (url_suffix allow you to add a suffix in the URL, so you can use the [library-viewer] shortcode more than one time in the same page.)

  PARAMETERS OF LIBRARY VIEWER FILE MANAGER ADD-ON

delete_folder (delete_folder parameter determines which user can delete a folder.)
delete_file (delete_file parameter determines which user can delete a file.)
rename_folder (rename_folder parameter determines which user can rename a folder.)
rename_file (rename_folder parameter determines which user can rename a file.)
create_folder (create_folder parameter determines which user can create a folder.)
upload_file (upload_file parameter determines which user can upload a file.)
unzip_file (unzip_file parameter determines which user can unzip a zip file.)
download_folder (download_folder parameter determines which user can download a folder as a zip file.)
download_file (download_file parameter determines which user can download a file.)

 
PARAMETERS DOCUMENTATION AND USE CASES
 
Hooks Documentation
From 2.0.0 version and then, there are many hooks that you can customize the functionality of this plugin.
You can read more in HOOKS DOCUMENTATION
Read also how to add PHP hooks in your WordPress Site in my blog
Other Details

The algorithm does not show in the front-end folders that contains in their name the string “hidden-folder”.
Also does not show .php , .ini files and files that contains in their name the string “hidden-file”.
So if you don’t want to display an existing folder or file, you can rename it appropriately!
In addition, With Library Viewer Pro, you can set the names that you don’t (and you do) want to be displayed in the front-end using appropriate shortcode parameters.
If you want to add text above the front-end folders or below the front-end files, view more in the FAQ below.
In addition, with the LIBRARY VIEWER PRO you can,

customize the URLs of library viewer, with the hooks and the parameters.
you can display folders & files of a directory (in FTP) of your choice, not only library directory (yoursite.com/library)
you can hide the breadcrumb with just a shortcode parameter.
you can show/hide the folders and files of your choice.

Also, with the LIBRARY VIEWER FOR WOOCOMMERCE ADD-ON you can,

give the ability to you users to gain folder access to a Library (to a page with the Library Viewer shortcode installed), just buying a virtual/with-folder-access product.

Finally, with the LIBRARY VIEWER FILE MANAGER ADD-ON you can,

give the ability to your users to have their own library and to upload and edit files.
use the library as file manager for your admins (you may need also Library Viewer Pro, and to restrict the WP page from other users)

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Library Viewer」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.1.0 | 1.1.1 | 1.1.2 | 1.2.1 | 1.2.2 | 1.2.3 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.0.6 | 2.0.7 | 2.0.8 | 2.0.9 | 3.0.0 | 3.0.1 | 3.0.2 | 3.0.3 | 3.0.4 | trunk | 2.0.10 | 2.0.6.1 | 2.0.6.2 | 2.0.6.3 | 2.0.6.4 |

延伸相關外掛(你可能也想知道)

  • Simple File List 》簡單檔案清單是一款免費的WordPress外掛,非常適合當你需要提供檔案清單(公開或只給登入用戶)時使用。只需使用簡單的shortcode,就可以將檔案清單放在網站...。
  • FileBird Document Library 》FileBird Document Library是一款免費的輕量級外掛程式,可以在Gutenberg編輯器和FileBird文件夾中協助您建立和發佈文件圖庫。它提供2種佈局風格,並允許您使...。
  • Mmm Simple File List 》這是一個簡單的外掛,使用簡碼 [MMFileList /] 列出指定目錄中的文件。, 參數:, , folder:相對於 WordPress 安裝的基本上傳目錄 (例如 siteurl.com/wp-cont...。
  • Medialist 》Medialist 外掛旨在讓顯示文章或附帶的頁面多媒體、文件等更加容易。上傳您的內容,將其附加到頁面上,然後放置 medialist shortcode 以顯示整潔的項目列表。...。
  • Simple File List Media 》總結:Simple File List 是一個免費的 WordPress 外掛程式,可以提供公開或私人使用者下載檔案的列表,並加入音訊和視訊播放器來播放多媒體檔案,而不會在瀏...。
  • TTC WordPress Tripwire Tool 》這是 WordPress 的三部分安全套件中的第二部分。此外掛作為一個 tripwire 來使用,可以標註在過去1至99天中所更改過的所有檔案。您只需選擇要回溯的天數,它...。
  • DTC Documents 》一款可以輕鬆上傳文件、建立自定義分類並儲存檔案、顯示自訂的檔案清單、產生文字或可自訂按鈕的外掛程式。此外掛還允許在您的選單項目中建立 shortcode!, ,...。
  • Front-End Managed Files Block 》客戶管理網站時可能會遇到困難,尤其是在處理文件上傳和混亂的媒體庫時。使用 Front-End Managed Files Block 外掛程式,您可以製作文件列表,並讓客戶能夠透...。

文章
Filter
Apply Filters
Mastodon