WordPress User Private Files plugin

User Private Files

User Private Files plugin

First step, download User Private Files and copy into your plugins folder then active it.

[update 1.1 now has a single page view for the attached file where you can have description and other fields.]

Download User Private Files On GitHub

Second, create a page which I will just name “My Dashboard”, then paste: [userfiles]. The uploaded files will show on this page.

User Private Files Back-end

user-private-files

The back-end is intuitive and the admin has options such as file upload for specific user, category assignment, user email notifications and multilingual support.

User Files Front-End

With some CSS enhancements this is how our page “My Dashboard” should look like:

user-private-files-dashboard

As you can see the plugin can filter the uploaded files by year or by the category assigned. Pretty cool isn’t it?

Limitations

Currently the only allowed files are the PDF’s but that can be easily modified so the admin can upload other files types such as images, documents, zips, html etc.

Go in plugins folder, user-private-files/user_private_files.php then find following line:

// Setup the array of supported file types. In this case, it's just PDF.
$supported_types = array('application/pdf');

Here is a full list of supported files:

		"pdf" => "application/pdf",
		"txt" => "text/plain",
		"html" => "text/html",
		"htm" => "text/html",
		"exe" => "application/octet-stream",
		"zip" => "application/zip",
		"doc" => "application/msword",
		"xls" => "application/vnd.ms-excel",
		"ppt" => "application/vnd.ms-powerpoint",
		"gif" => "image/gif",
		"png" => "image/png",
		"jpeg" => "image/jpg",
		"jpg" =>  "image/jpg",
		"php" => "text/plain"

Now you can enable more file types like so:

$supported_types = array('application/pdf','image/png','application/zip');

Final thoughts

This plugin was custom developed for a client project as at the moment I couldn’t find any good plugins that meet these specific requirements. Feel free to use and modify it for your projects.

Comments are closed.