Wordpress Download Monitor Plugin
Whilst posting bits and bobs on my blog, I’ve never had a consistent way of linking to files and recording download hits.
Therefore, I have created the ‘Wordpress Download monitor plugin, to handle uploading, links, and to monitor download hits.
There is a newer version of this plugin, view its page here!
Wordpress Download Monitor Plugin v1.0 Build 20070112
By Mike Jolley ( http://www.blue-anvil.com )
Index
- What is it?
- Features
- Files in the zip
- Plugin History
- Get it now!
- Installation Instructions
- Tags
- Licence
- Support my sweat, blood and tears
What is it?
The whole idea to this plugin is to keep your website downloads organised, and provide means to monitor the amount of downloads a file has, along with an easy method of linking to those files using its own tags.
On installation, this plugin only uses 1 database table to store download information, uploaded downloads are stored in their own directory. Don’t want to upload? You can add links to existing downloads, and track them, also.
By adding a simple tag to a wordpress page you can show the link, with or without hits displayed.
Basic Documentation is shown in your wordpress control panel too, under Manage > Downloads.
I’d like to thank Mike Cherim at http://green-beast.com/ for part of this script and the idea.
Features
Featured include:
- Admin page for uploading/linking to downloads, and specifying information (title and version).
- Records download hits.
- Template tags for showing popular, recent, and random downloads in your web site’s sidebar.
- Post tags for outputting download links e.g [Download id not defined]
- Drop-down menu in non-rich text wordpress editor for adding links.
Files In the zip
The following files are provided with the download:
wp-downloadMonitor/user_uploads— Directory for uploads. Must have 777 permissions (via CHMOD)wp-downloadMonitor/index.php— Prevents snoops looking at the files…wp-downloadMonitor/wp-downloadMonitor.php— Main plugin filewp-downloadMonitor/download.php— Links to your downloads, recording the hit.wp-downloadMonitor/css/wp-downloadMonitor.css— Admin interface styling.
Plugin History
- 12th Jan 2007 – V1.0WP B20070112 -
- First release
- No issues known.
So, what are you waiting for? Download it now!
| Index |
Get it now!
Downloaded a total of 68260 times
| Index |
Installation Instructions
Installation is fast and easy. The following steps will guide get you started:
- Unpack the *.zip file and extract the
/wp-downloadMonitor/folder and the files. - Using an FTP program, upload the
/wp-downloadMonitor/folder to your WordPress plugins
directory (Example:/wp-content/plugins). - In the directory,
/wp-downloadMonitor/, using FTP or your server admin panel,
change the permission of the user_uploads directory to 777, or you will not be able to upload files. - Open your WordPress Admin panel and go to the Plugins page (link on the
top menu). Locate the “Wordpress Download Monitor” plugin and
click on the “Activate” link. - Once activated, go to the Manage > Downloads.
- That’s it, you’re done. You can now add downloads.
| Index |
Tags
To show download links, use the following tags:
- Link/hits –
[Download id not defined]Output example:<a href="download.php?id=1" title="Version 1 downloaded 10 times">Download title (10)</a> - Link w/o hits –
[Download id not defined]Output example:<a href="download.php?id=1" title="Version 1 downloaded 10 times">Download title</a> - URL only –
[Download id not defined]Output example:download.php?id=1 - Hits only –
[Download id not defined]Output example:10
There are a few other template tags to use in your wordpress templates. Replace ‘$no’ with the amount of downloads to show.
- Most downloaded –
<?php wp_dlm_show_downloads(1,$no); ?> - Most recent –
<?php wp_dlm_show_downloads(2,$no); ?> - Random –
<?php wp_dlm_show_downloads(3,$no); ?>
Licence
Wordpress Download Monitor Plugin v1.0WP © Copyright 2007-current. All rights reserved.
Mike Jolley
You are free to use this application but may not redistribute it without written permission.
Use of this application will be at your own risk. No guarantees or warranties are made directly or implied.
The creators cannot and will not be liable or held accountable for damages, direct or consequential.
| Index |
Support my sweat, blood and tears
I know, that sounds gross, but we really did put ALOT of effort in to this plugin. If you like this plugin, or it has benefited you, please make a donation via paypal! Any amounts are welcome, your support is much appreciated.











Mike Cherim says:
Hey cool man. Does this use that script I gave you for recording download hits in a log file? (Though it probably records to a DB table now, right?) If so, nice, glad you made it into a plugin… it’ll make it easier to use.
Comment made on February 12, 2007 at 10:04 am
Mike J says:
I used 1 line from your script, the header() line, because I never knew it existed until i saw yours
Comment made on February 12, 2007 at 10:04 am
Anthony Brewitt says:
Nice Plugin, I just need something to let peeps download!
Comment made on February 12, 2007 at 10:06 am
Tim Wheatley says:
Thanks very much. Best download plugin I found after a long while searching!
Comment made on February 12, 2007 at 10:06 am
Chero07 says:
Nice Plugin, but I´m wondering if there is some “php” line or command to show all the downloads in one page of my blog?
Comment made on February 12, 2007 at 10:09 am
Anthony Brewitt says:
Just checked out the plugin for the second time and I must say its great!
Comment made on February 12, 2007 at 10:10 am
Mike J says:
There is no way to show all downloads on a page, yet, this may be implemented in the future.
Comment made on February 12, 2007 at 10:11 am
Adam S says:
For whatever reason, when I try to add a file, i get the following error:
Warning: move_uploaded_file(../wp-content/plugins/wp-downloadMonitor/user_uploads/raidquote.doc) [function.move-uploaded-file]: failed to open stream: No such file or directory in /path/to/wordpress/wp-content/plugins/wp-downloadMonitor/wp-downloadMonitor.php on line 313
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/tmp/phpgulL6I’ to ‘../wp-content/plugins/wp-downloadMonitor/user_uploads/raidquote.doc’ in /path/to/wordpress/wp-content/plugins/wp-downloadMonitor/wp-downloadMonitor.php on line 313
I made the change to the users_upload directory.
Any ideas?
Comment made on February 13, 2007 at 11:21 pm
Mike Jolley says:
Hi Im not really sure about this, I did a quick google search and some people have problems with this due to their host.
Any a quick idea, open up wp-downloadmontior.php in a text editor and look for the line
$destination = '../wp-content/plugins/wp-downloadMonitor/user_uploads/';Try replacing that with:
$destination = get_bloginfo('wpurl').'/wp-content/plugins/wp-downloadMonitor/user_uploads/';Which should with any luck, make the taget directory more accurate.
This is just a guess mind you. If that fails tell me your host and wordpress version please.
Comment made on February 13, 2007 at 11:37 pm
Mike Jolley says:
also try (another guess):
$destination = $_SERVER['DOCUMENT_ROOT'].'/wp-content/plugins/wp-downloadMonitor/user_uploads/';Comment made on February 13, 2007 at 11:40 pm
Adam S says:
I have my own host, and the wordpress version is 2.1.
Ok, I figured out the issue. Whenever I unzipped the plugin, I do so into my wp-content/plugins folder. It created wp-downloadMonitor folder which contained another wp-downloadMonitor folder and the wp-downloadMonitor.php file. Your code is wanting to to upload the file to “wp-content/plugins/wp-downloadMontior/user_uploads” when the file structure is “wp-content/plugins/wp-downloadMonitor/wp-downloadMonitor/user_uploads”.
Not sure if I did something wrong or if it is a bug, but chaning that fixed my issues.
Comment made on February 14, 2007 at 3:11 am
Adam S says:
actually, if you just move the wp-downloadMonitor.php file into the other directory and move that directory down one level it will work flawlessly.
Another question for you, is there a way to get this plugin to have the image download button like you have on this site, just above?
Comment made on February 14, 2007 at 3:16 am
Mike Jolley says:
Great to see it working.
The image? What ive done is just used an image surrounded by an anchor with the link using the download url tag so something like:
Hope that helps
Comment made on February 14, 2007 at 8:01 am
Adam S says:
Thanks for your help Mike. The image that you are using above, is that copyrighted or under any license? I would like to modify it and use it if you don’t mind.
Comment made on February 14, 2007 at 5:34 pm
Mike Jolley says:
go ahead i dont mind. a link back would be nice though
Comment made on February 14, 2007 at 7:43 pm
DibS says:
I had the same problem Mike had. Seems to be in the way your archive is structured. I did exactly what he did, and I still can’t upload. It just seems to hang. Any thoughts?
Comment made on February 16, 2007 at 5:14 am
Mike Jolley says:
the structure should be wp-content/plugins/wp-download-monitor/
Then inside that folder, CHMOD the upload_files directory to 755 or 777.
Do you get an error message or anything?
Comment made on February 16, 2007 at 9:53 am
Chero07 says:
So, do we have any idea of how to insert donwloads in one page automaticaly?
Comment made on February 20, 2007 at 3:40 pm
Mike Jolley says:
No, this plugin is not for that. ALthough if your feeling adverturous you could always use a mysql query to get the downloads…
Comment made on February 20, 2007 at 3:50 pm
Alfredo says:
This is a really neat piece of plugin! Does this include image downloaded from my pages? thanks!
Comment made on February 21, 2007 at 1:05 pm
Mike Jolley says:
“Does this include image downloaded from my pages?” – Do you mean can you allow images to be downloaded? If so I don’t see why not.
Comment made on February 21, 2007 at 2:19 pm
Steve Weintraub says:
GREAT plugin! I’ve dropped you an email, as my questions require more space than would be fair here.
Comment made on February 21, 2007 at 10:24 pm
Dave Forde says:
Looks like a great plugin, I managed to get it to upload a file and used “Download title” but when I went to view that post I got a 404 error.
What is the right code that I’d use to have a link to a file and not publically show any stats, and just the link oto the file.
Comment made on March 3, 2007 at 9:44 pm
David says:
This looks really handy and I can view my post correctly but I get a 404 error when I try and download the uploaded file itself. The upload folder permissions are correct. Any ideas what I can do to fix this?
Comment made on March 5, 2007 at 9:44 am
Mike Jolley says:
Can you show me the link to the file it is producing? It may be the wrong path.
Comment made on March 5, 2007 at 11:23 am