[WordPress] 外掛分享: Library Viewer

首頁外掛目錄 › Library Viewer
WordPress 外掛 Library Viewer 的封面圖片
400+
安裝啟用
★★★★★
5/5 分(13 則評價)
67 天前
最後更新
問題解決
WordPress 3.0.0+ PHP 7.0+ v3.2.0 上架:2019-07-07

內容簡介

揭密:
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 參數決定哪些使用者可以刪除檔案。)

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.2.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Library Viewer」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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)

延伸相關外掛

文章
Filter
Apply Filters
Mastodon