[WordPress] 外掛分享: Mmm Simple File List

WordPress 外掛 Mmm Simple File List 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Mmm Simple File List」是 2014-09-17 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 2000 個安裝啟用數。
  • 上一次更新是 2022-02-28,距離現在已有 1161 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.4 以上版本才可以安裝。
  • 有 19 人給過評分。
  • 論壇上目前有 1 個提問,問題解答率 0%

外掛協作開發者

mmanifesto |

外掛標籤

File List | shortcode |

內容簡介

這是一個簡單的外掛,使用簡碼 [MMFileList /] 列出指定目錄中的文件。

參數:

folder:相對於 WordPress 安裝的基本上傳目錄 (例如 siteurl.com/wp-content/uploads/mm/yy/、siteurl.com/wp-content/ 或 siteurl.com/media)。您可以從 WordPress 控制台的「設定」-「媒體」中檢查媒體設置。如果您將上傳文件組織在 WordPress 默認的按月/年的基本文件夾中,則應在上傳文件之前在此字段前添加「/../../」或禁用該設置。
format:表格格式 (format=”table”)、無序列表格式 (format=”li”)、逗號分隔格式 (format=”comma”)、圖像無序列表格式 (format=”img” 注:這樣會將所有文件都放在 img 標籤中) 或自定義格式 (format=”custom”,可使用簡碼內容創建自定義模板,請參閱下面的自定義格式部分以瞭解更多信息)。
types:僅列出指定文件類型 (例如 types=”pdf,doc,txt”),如果未指定類型,則將列出目錄中的所有文件。
class:僅用於「li」、「img」和「table」格式,將一個給定的類應用於簡碼輸出 (例如

    ,有關樣式的更多信息,請查看常見問題)。
    limit:默認值將列出目錄中的所有文件。您可以添加您選擇的正數,並顯示該數量的文件。
    orderby:當前參數可以是「name」(默認值) 或「date」,根據修改日期對文件進行排序,因為創建日期似乎時好時壞。
    order:默認情況下,列表的順序是按照從最高值到最低值 (desc) 的方式進行排序,其中「value」是由「orderby」屬性決定的。按日期排序會顯示最新的文件,按名稱排序會遞歸地列出,反轉這兩個默認值只需將 order=”desc” 添加到簡碼參數中。
    target:此參數可讓您為列出的文件連結設置「目標」(通常用於在新窗口中打開文件)。
    prettyname:此功能將底線和破折號替換為空格,並從文件名中刪除文件擴展名。
    removesize:此功能從默認輸出中刪除文件大小。
    removeextension:此功能刪除文件擴展名 (保留底線和破折號)。
    regexstrip:像巫師一樣神嗎?何不輸入自己的正則表達式以刪除您想要的內容 (不提供保修,使用正確的格式,例如 regexstrip=”/e/” 將替換文件名中的所有 e!)。
    regexreplace:想將該內容替換為其他內容而不是空格?在這裡添加您想使用的任何內容以與 regexstrip 函數一起使用。
    regexfilter:過濾掉與給定的正則表達式模式匹配的文件名 (有關更多信息,請參閱使用示例)。
    regexfilterinclusive:不是挑選幾個要排除的文件,您可以使用此參數來包括任何您想要包括的文件(有關更多信息,請參閱使用示例)。
    dateformat:調整自定義模板中的 {date} 變量的格式。
    headings:透過輸入逗號分隔列表調整表格格式的標題。
    usecwd:如果無法使 wp_upload_dir() 文件夾正常工作,可以嘗試將其設置為 true,以使用當前工作目錄,而當前工作目錄應該是您的 public_html 文件夾。

    輸出:

    對於所有 HTML 格式,您可以期望看到以下包裝在可樣式化的容器中的輸出:

    文件名 (連接到文件 URL)

    原文外掛簡介

    This is a simple plugin to list files in a given directory using this shortcode: [MMFileList /].
    Parameters:

    folder: Relative to the base uploads directory of your wordpress install (e.g. siteurl.com/wp-content/uploads/mm/yy/ or siteurl.com/wp-content/ or siteurl.com/media). You can check your media settings from your WordPress dashboard in Settings -> Media. If you organize your uploads in the WordPress default month / year base folder you should either prepend this field with “/../../” or disable that setting before uploading files.
    format: Tabular (format=”table”) or Unordered list (format=”li”) or comma-delimited (format=”comma”) or Unordered List of Images (format=”img” Note: this will put all files in tags) or Custom (format=”custom”) for using the Shortcode content to create a custom template (see Custom Formats section below for more information)
    types: Only list given file types (e.g. types=”pdf,doc,txt”), If no types are specified then all files in the directory will be listed.
    class: Only used for the “li”, “img” and “table” formats, applies a given class to the shortcode output (e.g.

      / for more information on styling check out the FAQ)
      limit: The default value will list all files in the directory. You can add a positive number of your choice and that amount of files will be displayed.
      orderby: Current params can be either “name” (default) or “date” which sorts the files by date modified since date created seems to be hit and miss.
      order: By default the order of the list is sorted descending (desc) from the highest value to lowest where value is determined by the “orderby” attribute. Ordering by date results in a list being displayed as newest to oldest and ordering by name results in a list descending through the alphabet (a-z). To reverse either of these defaults simply add order=”desc” into the shortcode parameters
      target: This parameter lets you set a “target” for the links to the listed files (This is typically used to open the files in a new window)
      prettyname: This replaces underscores and dashes with spaces and removes the file extension from the filename.
      removesize: This removes the filesize from the default output
      removeextension: This removes the file extension (leaving underscores and dashes)
      regexstrip: Feeling like a wizard? Why not put in your own regex to strip out whatever you want from the filenames (no warranty provided, use proper formatting e.g. regexstrip=”/e/” will replace all e’s in the filename!)
      regexreplace: Want to replace that content with something other than a blank space? Add whatever you want here to work with the regexstrip function
      regexfilter: Filter out filenames that match a given regex pattern (See usage examples for more info)
      regexfilterinclusive: Instead of picking out a few files to exclude you can use this to parameter to include anything that you want (See usage examples for more info)
      dateformat: Adjust the format of the {date} variable in custom templates
      headings: Adjust the headings of the table format by entering a comma delimited list
      usecwd: If you can’t get the wp_upload_dir() folder to work you can try setting this to true to use your current working directory instead which should be your public_html folder

      Output:
      For all html formats you can expect to see the following output wrapped in styleable containers:

      Filename (linked to the File Url)
      File Size

      At this point “comma” is the only available text output and it only outputs the url to the file in a comma delimited list (no links – just text).
      If the folder you’ve entered isn’t found or there are no files with the extensions you’ve listed there will be some warning text output to let you know. This text is wrapped in a “mmm-warning” class in case you want to style it out (for more information on styling check out the FAQ)
      Usage Examples:
      Let’s say you’re using the default WordPress Media settings so we can expect your uploads folder to be in /wp-content/uploads/mm/yy/ with this in mind the shortcode “folder” attribute will look in a directory relative to this. With this base directory say we want to list “png” files in the folder “/wp-content/uploads/cats/” we would use the following shortcode:
      [MMFileList folder=”/../../cats/” format=”table” types=”png” /]
      If you have you disabled the setting to store uploads in the /mm/yy/ folder structure (you can do this within Settings -> Media) and wanted to display that same file you would use this shortcode:
      [MMFileList folder=”/cats/” format=”table” types=”png” /]
      This will result in a tabular list of all .png files in the /wp-content/uploads/cats/ folder.
      Custom Formats
      The “li” and “custom” formats allow you to define a template using the content portion of the shortcode. The difference between these two output formats is that “li” will still wrap all the output in a

        tag and each file will be wrapped in a
      • tag. Here is an example of how to create a custom template:
        [MMFileList folder=”/cats/” format=”li”]

        [/MMFileList]
        Variables that can be used with the custom templates are as follows:

        {name} – This will output the filename
        {size} – This will output the filesize
        {url} – This will output the file url
        {date} – This will ouput the file’s last modified date (use the format parameter to customize how this looks!)
        If you would like more information available to be output don’t hesitate to a send in a request via the support forum

        Regex and List Filtering
        Regex or Regular Expressions are a really powerful tool but can seem intimidating at first. If you’re uncomfortable or having trouble feel free to reach out on the forums. For testing / trying to build your own pattens I recommend using https://regex101.com/ – it’s my goto. As a general rule for this plugin the pattern needs to be written with slashes /likethis/ for it to work. With regex the general rule is to try to keep things simple.
        Using the regexfilter parameter you can exclude or include only specified files.
        Let’s say you have a list of cat pics you want to share but you have both dog and cat photos in the same folder. Luckily for you – they’re still labeled name-cat.jpg or name-dog.jpg. You can use the regexfilter feature to help with your predicament.
        The following will EXCLUDE all files with the word doc in them.
        [MMFileList folder=”/myanimalpics/” regexfilter=”/dog/” /]
        Another feature is the regexfilterinclusive option. Say for some reason your cousin Larry added a bunch of dog and frog photos to the folder but didn’t follow your naming conventions (dangit Larry!) well – have no fear. As long as you have a patten that matches your cat photos you can use this regexfilterinclusive toggle to show only those files.
        [MMFileList folder=”/myanimalpics/” regexfilter=”/cat/” regexfilterinclusive=”1″ /]
        Note: that regexfilter is done before regexstrip and another filename changes (e.g. pretty name, file size/file name removal etc…) so if you’re having trouble this might be part of the issue. Base your pattern on the original filename and you should be good.
        Using regexstrip allows you to remove text that matches a given pattern and regexreplace allows you to put in other text instead of just blank space. These are fairly advanced so I wouldn’t recommend using them unless you really know what you’re doing.

        各版本下載點

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

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


        0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 1.0 | 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 2.0 | 2.1 | 2.2 | 2.3 | 0.1a | 0.6a |

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

        • Simple File List 》簡單檔案清單是一款免費的WordPress外掛,非常適合當你需要提供檔案清單(公開或只給登入用戶)時使用。只需使用簡單的shortcode,就可以將檔案清單放在網站...。
        • FileBird Document Library 》FileBird Document Library是一款免費的輕量級外掛程式,可以在Gutenberg編輯器和FileBird文件夾中協助您建立和發佈文件圖庫。它提供2種佈局風格,並允許您使...。
        • Medialist 》Medialist 外掛旨在讓顯示文章或附帶的頁面多媒體、文件等更加容易。上傳您的內容,將其附加到頁面上,然後放置 medialist shortcode 以顯示整潔的項目列表。...。
        • Library Viewer 》揭密:, LIBRARY VIEWER FILE MANAGER ADD-ON已經發佈了!來看看吧 😉, 使用 Library Viewer,你可以顯示你的 (FTP) 伺服器某個「特定資料夾」的包含檔案和資...。
        • 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