Feel free to fork the repo and make your own changes!
List Yo’ Files for WordPress allows users to easily display lists of files in their pages and posts. Supply the folder and various options and you can generate a list of files with hyperlinks to each file making it downloadable. Extensive options let you sort and filter files. You can include file size, date, and even an icon as part of the file list. You can even display lists of MP3s in popular audio players. The plugin admin pages also allow you to conveniently upload and delete files. This is a easy way for organizations, groups, and clubs to share files with members. For example, Home Owner Associations have used this plugin to list their minutes. Music websites use this plugin to allow their users to show off their music.
Watch the following video for a visual overview of the 1.0 version of List Yo’ Files. Read on for further details.
To use, add the List Yo’ Files shortcode (“listyofiles”) enclosed in brackets to the text of your page or post and specify the folder name with the “folder” directive. For example:
Note: Be sure to enclose the above example in [brackets]! Also, do not include opening or closing slashes.
The plugin will then generate a list of files with a link to each so that every file is downloadable. You can also specify file filters (what types of files to display), sort options, and display options (icons, filesize, date, and more). You can even use special display options to show lists of files within popular music players for WordPress like WPAudio and AudioPlayer.
List Yo’ Files Options:
- sort – include one of the following: “alphabetic”, “reverse_alphabetic”, “filesize”, “reverse_filesize”, “date”, or “reverse_date”. The default is “alphabetic” and is used if “sort” isn’t specified. Example usage: folder=”wp-content/gallery/my-new-gallery” sort=”reverse_filesize”
- filter – include a list of extensions (no period) separated by commas to only display
matching files. For example, folder=”wp-content/gallery/my-new-gallery” filter = “mp3,wav,aif” will only display audio files in your file list. Not including this option will list all files in the specified folder.
- options- A list of comma-separated options to further customize your file list. Supported options:
- table – Renders your file list as a table (no border, though your CSS may override this).
- filesize – Includes the file size in the list.
- date – Includes the file modified date in the list.
- new_window – Will open links in a new window.
- hide_extension – Hides file extensions.
- icon – Works only with the table option. This option displays a file icon to the left of the filename. If you want to support additional file types, you can upload a 16×16 png file for the file type that you’d like to support. The name of the file needs to match the extension that you want to display. All letters should be lowercase. For example, if you want to provide an icon for mp3 files, you would need to upload a file called “mp3.png” to the plugin’s “icons” folder.
- wpaudio – Requires the WPAudio plugin. This option transforms the filename from a download link into an mp3 player. Note: Use a filter to restrict files to mp3s.
- wpaudiodownloadable – Requires the WPAudio plugin. This option only works if wpaudio is also specified. It adds a download link for the song. You can also use the “download” option as well for the same result.
- audioplayer – Requires the Audio Player plugin. This option transforms the filename from a download link into the WPAudio mp3 player. If you specify table, then each song will display in an individual player. Otherwise, the songs will appear as a group in a single player. Note: Use a filter to restrict files to mp3s.
About User Folders:
List Yo’ Files 1.0 introduced the concept of “user folders”. If you have a site where users regularly log on and post material, you can use List Yo’ Files to allow them to upload files and display them as lists. This feature is enabled when you check the “Enable user folders” checkbox in the Administer admin menu.
When enabled, non-admin users, who meet the minimum user level requirements specified by the admin (see the “Administration” panel screen shot below), will only see the “Usage”, “Upload”, and “Delete” menu items under the main “List Yo’ Files” menu. These pages are simplified for non-admins, requiring no typing other than naming subfolders. Users are only allowed to upload files to subfolders under their user folder which is automatically created for them (underneath a special folder in ‘wp-content’). They are also allowed basic file and folder management; they can create folders, upload files, delete files, and delete folders – again, only within their personal user folder.
As admin, you have control over the following:
- Restricting the quantity of subfolders that the user can create.
- Enforcing a global size quota (in megabytes) per user.
- Selecting the minimum WordPress role that has access to the List Yo’ Files software.
- Showing simplified help, which is intended to not overwhelm users with too many options.
Non-admin users also have simplified shortcode options which allows them to easily display their files:
- To display a list of playable mp3s, add the special showmp3s code to the page or post where you want to display the files. For example: showmp3s folder=’mruser/mymp3s’. Requires the WPAudio plugin
- To simplify showing files, use the showfiles code to the page or post where you want to display the files. For example: showfiles folder=’mruser/somepdfs’.
Public Upload Form:
To allow your users to upload files, please use the shortcode:
- show_size_warnings – shows the user how many files and the size restrictions.
(above) The List Yo’ Files Administer page showing User Folders enabled.(above) The admin “List Yo’ Files” upload page. This page allows you to upload files to the folder of your choosing. We recommend uploading files to the “wp-content” folder. (above) The admin List Yo’ Files Delete page. You can use this panel as a rough substitute for FTP. If you upload the wrong file, or just want to clean some out, you can come here to do it. It’s certainly not as powerful as FTP, but it’ll get the job done! As always, be careful when deleting files.
View the online FAQ here.
Do you want to help direct the development of List Yo’ Files or is there a feature that you need ASAP? If so, consider sponsorship.
Request a Feature or Get Help:
New requested features and bug fixes:
- Add the ability to hide the extension.
- Add a “recursive” option so that lists can render file lists recursively through sub-folders.
- Expand filters to include the names of files, like “a*.*,A*.*” (all files that start with an “a” or “A”)
- Add the ability to create common folders accessible by non-admin users.
- Add the notion of a default folder so that folks don’t need to type in a folder every time.
- Expand the number of user folders by using custom fields to save those folder locations.
- Support this: listyofiles folder=”wp-content/users/%
- Provide admin widgets that show folder contents.
- Align file size (and date, etc) to the right when using “table” view mode. Even better: apply a dummy class tag to each table column, so that I can specify my own css rules in my theme!
- Checkbox option to shade alternative rows of a table different colors for better contrast.
- Integrate the date with the language settings of WordPress.
- Add a simple header to table-based lists.
- Add a basic folder browser for folders on the system to upload to.
- Place checkboxes next to files in the Delete admin page. Let users select files to delete.
- Add more filters to filter to max size, date periods.
- Add the URL of files uploaded to the email notification.
- Figure out a way to add a description for files.
- Leverage ID3 tags for additional data.
- Force automatic downloads.
- Render file lists in a sidebar widget.
- Render a list of files into a combo (select) box. Users can download the selected file by pressing a “Download” button.
- Let admins rename the base user folder.
- Let users rename files.
- Support UTF8 filenames.
- Support pagination for folders with lots of files.
- Allow front end uploads for logged in users.
- Support AutoIndex (SourceForge) to count downloads.
- Add option to add a date to filenames.
- Investigate a file search feature.
- Improve the documentation. For example, “listyofiles_uploadform” isn’t explained.
- Add simple icons next to file names.
- Add file sorting based on alphabet, file size, date, and so on.
- Upload function becomes available for editors on their dashboard.
- Option to open link in new window
- Several file-lists on same page causes a non-valid html code, id=’filelist’ should be modified to something dynamic (eg. folder name).
- Integrate List Yo’ Files with file protection offered by s2Member.
- Reduce plugin conflicts.
Before you ask for help, be sure to take a look at the FAQ above. If your question is not answered there, feel free to send an email:
- The List Yo Files page on WordPress.org.