Wordpress Download Monitor Plugin v1.6

March 10, 2007 | Published in: Wordpress & plugins | Tags: , , , , , 218

This plugin has now been replaced by an updated version which you can find here.


Wordpress Download Monitor PluginThe Download Monitor plugin has been updated with some tasty new features, and since I’m releasing this as a new version rather than a new build, also I decided to make it its own post.

Download Monitor is a plugin for uploading and managing downloads, tracking download hits, and displaying links. The download link on this page, and even the downloads in the website footer, are all powered by it.

Admin Screenshot:

Admin screenshot

Read more for more information, installation instructions, and of course, the download link in all its glory!

Wordpress Download Monitor Plugin v1.6 Build 20070812

By Mike Jolley ( http://www.blue-anvil.com )

Index

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

New Features

  • Re-upload files, handy for updating versions!
  • Change hits, just in case you change servers or import old downloads that already have stats
  • URL hider using mod_rewrite
  • Sorting and pagination of downloads in admin
  • New ‘image’ display mode (show a link like the download link image on this page!)

Older Features include:

  • Admin page for uploading/linking to downloads, and specifying information (title and version).
  • Records download hits.
  • Does not count downloads by wordpress admin users.
  • 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 file
  • wp-downloadMonitor/download.php — Links to your downloads, recording the hit.
  • wp-downloadMonitor/css/wp-downloadMonitor.css — Admin interface styling.
  • wp-downloadMonitor/img — Admin images.
  • wp-downloadMonitor/upload_class — Upload class by Olaf Lederer.

Plugin History

  • 8th December 2007V1.6WP B20070812 -
    1. Bug fixes galore
  • 10th March 2007 – V1.5WP B20070310 -
    1. New version released!
    2. Insert box now shows on new posting- thanks Sheri!
    3. No issues known.
  • 8th March 2007 – V1.5WP B20070308 -
    1. Beta test.
    2. No issues known.
  • 12th Jan 2007 – V1.0WP B20070112 -
    1. First release
    2. No issues known.

So, what are you waiting for? Download it now!

| Index |

Get it now!

Download the Download Monitor Plugin - version 1.6 - Dec 2007

Downloaded a total of 68256 times

| Index |


Installation Instructions

Installation is fast and easy. The following steps will guide get you started:

  1. Unpack the *.zip file and extract the /wp-downloadMonitor/ folder and the files.
  2. Using an FTP program, upload the /wp-downloadMonitor/ folder to your WordPress plugins
    directory (Example: /wp-content/plugins).
  3. 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.
  4. 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.
  5. Once activated, go to the Manage > Downloads.
  6. That’s it, you’re done. You can now add downloads.

| Index |

Tags

To show download links, use the following tags:

  1. Link/hits[Download id not defined] Output example: <a href="download.php?id=1" title="Version 1 downloaded 10 times">Download title (10)</a>
  2. 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>
  3. URL only[Download id not defined] Output example: download.php?id=1
  4. Hits only[Download id not defined] Output example: 10
  5. Link with image[Download id not defined] Output example: Download Download Monitor Version 3.x *note you can style this using the classes “dlimg” and “dlstat”!

There are a few other template tags to use in your wordpress templates. Replace ‘$no’ with the amount of downloads to show.

  1. Most downloaded<?php wp_dlm_show_downloads(1,$no); ?>
  2. Most recent<?php wp_dlm_show_downloads(2,$no); ?>
  3. Random<?php wp_dlm_show_downloads(3,$no); ?>

Licence

Wordpress Download Monitor Plugin v1.6WP © 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.

| Index |

Found this post useful? Why not buy me a coffee!

Related Entries

218 Responses to “Wordpress Download Monitor Plugin v1.6”

RSS feed for comments on this post.

1 2 3 ... 9
  1. tony says:

    Is it possible to include a IP Log?

    Please advise. Thanks for a nice plugin.

    Comment made on March 11, 2007 at 11:17 am

  2. Mike Jolley says:

    There are no plans to add an IP log at this time

    Comment made on March 11, 2007 at 11:47 am

  3. matt Rutherford says:

    Fantastic plugin – just what I’m looking for, however – can I change the maximum size of an upload – currently showing 1048576 bytes

    Comment made on March 12, 2007 at 2:49 pm

  4. Mike Jolley says:

    Sure, there are two lines in the main plugin file (wp-downloadmonitor.php) both of which read:
    $max_size = 1024*1024; // the max. size for uploading

    Just increase that to the value you want (in bytes) e.g for 20mb change it to 1024*2048

    Comment made on March 12, 2007 at 3:17 pm

  5. Dave says:

    The plugin is activated, but when I use the [download] tags, they aren’t replaced by the files in the download>manage admin page. They just come out like [download#1].

    Any ideas what I should check on?

    Comment made on March 13, 2007 at 2:18 am

  6. Mike Jolley says:

    Hmm your the first to have a prob, what version of wordpress are you using, and what is the path to the download monitor plugin? it should be in a folder called wp-downloadMonior, in your plugins folder

    Comment made on March 13, 2007 at 7:06 am

  7. Dave says:

    It’s WordPress version 2.1.0.

    The plugin is in the correct folder. It shows up in the plugins option page and download>manage is modified with the new functionality when I enable it (and the new options there are functional).

    Could it have anything to do with me running on a Windows 2003 server? That is probably the most significant difference between my setup and the norm.

    Comment made on March 13, 2007 at 1:15 pm

  8. Mike Jolley says:

    Hmm Im not sure what the problem could be, only other thing is are you sure the ID is right in the tag, because It will show the tag if the id is not found in the database.

    Comment made on March 13, 2007 at 1:51 pm

  9. Mike Cherim says:

    Hey Mike, very slick and professional. Nice work! I’m impressed with the admin interface and all the features.

    I would like to post a short warning to users, though, and maybe this is something you can address in a future build. Setting folder/directory permissions to 777 is extremely dangerous. Directories with this setting can be cracked and users might end up hosting a PayPal look-a-like or some porn site.

    The best way to address this, for current users, is to keep CHMOD to 755 and either change it when you want to upload (then change it back), or upload to the folder via the server admin or FTP. Or create the uploads directory using the function in WP. You only have to do it once so no functionality should be lost.

    The way to address this for the plugin build is to add the functionality to create the folder instead of providing it and uploading it. To do this you temporarily set the parent folder permissions to 777, then using PHP, create the directory that way using the mkdir() function. Then set the parent folder back to 755. This is how the WP uploads directory does it (though they don’t tell you to change the parent back). Doing this changes the folder’s owner from Apache (or your server name) to PHP (?) and makes it safer. WP’s uploader (and backup plugin) creates the new folder with 777 permissions, but a new owner (which will suffice). The best thing to do, and what I’d really like to see (from WP too), is to create the new folder with 755 permissions and a new owner. This should still allow it to be uploaded to while blocking the public and group users. This is the safest way.

    Anyway, that said, I’m still very impressed with what you’ve made. Helluva good job, Mike.

    Comment made on March 14, 2007 at 1:52 pm

  10. Mike Cherim says:

    Weird. F T P was turned into a link. I didn’t do that.

    Comment made on March 14, 2007 at 1:53 pm

  11. peter says:

    Nice plugin Mike, I’m very new to word press,I don’t understand 2 things

    once I upload a file how do I know the url id? Or If I change it to use title, I’m not sure what to do in the htaccess, would there be any chance you checking it out for me and get it working,I would be happy to pay for this. Or alternatively possibly give me some help through email If that suits you better.

    Comment made on March 15, 2007 at 11:36 am

  12. Mike Jolley says:

    The id is shown on the list of downloads, far left col.

    And when you change it to use titles, it will tell you what to do :)

    Comment made on March 15, 2007 at 2:06 pm

  13. Steve Weintraub says:

    On top of what M.Cherim says, if you were to address these file permission/security issues, I would love to see the option to choose an existing downloads folder..it would be one less hack I have to do to the plugin :)

    Comment made on March 15, 2007 at 10:34 pm

  14. Dean says:

    This plugin looks like it could solve my download manager problems, yay!

    Also like steve said, the option of using the existing uploads/downloads folder would be good. Not that it really matter though, because I went through and modified the code anyway, but might be something to consider for a future revision.

    keep up the good work.

    Comment made on March 17, 2007 at 7:00 am

  15. Zap says:

    I have tried to install your plugin and get it working.
    I am using WP 2.1.2 and everything looks like it should be working, but it isn’t.
    The link points to the correct download file in the file system.
    The download file is present in the file system.
    If I browse to the download file in a browser, it downloads just fine.

    But, when I click on the image from your plugin, WP just hangs. And, while it is hanging, it is adding numbers to the download count for that file. So, for example, I set the counter on a file to zero, I click on the download image and count 10 seconds before clicking “stop” on my browser. I refresh the page and it tells me the file has been downloaded 48 times and the download never starts.

    Would you have any idea what I might be doing wrong?

    Comment made on March 17, 2007 at 9:17 pm

  16. Mike Jolley says:

    When you say image, you mean the output from [download#1#image]?

    Comment made on March 18, 2007 at 9:46 am

  17. abs says:

    Cool plug-in, will give it a try.

    Comment made on March 19, 2007 at 12:16 am

  18. Zap says:

    Yes. The image shows in the post correctly. And, when I hover over it, it displays the correct location for the file. But, when I click on it, it hangs (all the while, the counter is increasing) until I click the stop button for my browser.
    Have you ever heard of this before? Do you know what it could be? I also had some completely unrelated images in that same directory (for the downloads) and they would not display in the web page until I moved the images out of that directory. Should I have set some special permissions on the download directory or something? :|

    Comment made on March 19, 2007 at 1:11 am

  19. Mike Jolley says:

    Im really not sure, can I have the url?

    Comment made on March 19, 2007 at 7:39 am

  20. Mike Stephenson says:

    I like the plugin but I’m still using the old “download manager” from guff because this one shows the folder location where the download file is coming from. The older plugin hides the url path by replacing the file location with “http://siteName/?dl=fileName.ext” In my opinion this is better because if you have content limited to members the download location stays hidden. For example, if a member emailed their friend the file location from the URL properties, this new version would allow the NON-member to download the file – to understand just type this:

    http://blue-anvil.com/download/Download_Monitor.zip

    into any browser address bar and you’ll get the file… the Download Monitor does not restrict it, anyone can grab it. try it.

    Guff’s download manager denies access to a URL link to the download path if the user is not logged in. If you add this type of support, I would definitely check out your plugin.

    Comment made on March 20, 2007 at 10:37 pm

  21. Zap says:

    Sure.

    It’s http://www.phpld-themes.com

    But, I’ve disabled the plugin for the time being because I wanted people to be able to download the themes I am providing. I will put up a link along side the existing links for you to see. Check the lime green theme at the bottom of the index page for the plugin link. :)

    Thanks in advance for any insight you might be able to provide. And, thanks for providing the plugin.

    OK. Strangest thing just happened… I re-enabled the plugin and it seems to allow the download now. But, when I download the file, it is not updating the counter.

    Comment made on March 21, 2007 at 12:01 am

  22. Mike Jolley says:

    DO you know how to get into phpMyAdmin? If so, check the tables have been created in the wordpress database….

    Comment made on March 21, 2007 at 1:33 am

  23. Mike Jolley says:

    @Mike Stephenson – If guff meets your needs then you don’t need to look at my plugin ;)

    btw the file is not actually at http://blue-anvil.com/download/Download_Monitor.zip , thats a generated url using htaccess.

    Comment made on March 21, 2007 at 9:43 am

  24. Jeroen Onstenk says:

    Hi Mike,

    I have a minor problem with the tamplate tag “Most recent”:
    When I insert this into the sidebar it shows the first download I created and it gives the date of the latest download I created.

    Is this a known bug? And/or is this already fixed? I’m using version v1.0 B20070112 now.

    Comment made on March 21, 2007 at 9:42 pm

  25. Mike Jolley says:

    I wasent aware of it. When you say “I’m using version v1.0 B20070112 now.” do you mean the bug is there, or with the latestversion 1.5?

    Comment made on March 22, 2007 at 12:13 am

1 2 3 ... 9

The comments are closed.

About this site

Blue Anvil is the online web design journal & portfolio of , a web designer from Norfolk, England. Read More »
ThemeSlice
  • Featured work - More

    • Beefjack
    • Integrity
    • theotaku.com
  • Latest Tweet - More

    • New blog post: MiniCard 1.1.7 Update http://blue-anvil.com/archives/minicard-1-1-7-update/
  • Out of the blue - More

    • MiniCard 1.1.7 Update

      I have just uploaded 1.1.7 of MiniCard here and to the WordPress theme directory. This updates includes:

      • New networks; xing, gowalla, yelp, foursquare, mobileme, google buzz
      • A way to change link text and define multiple links of the same network
      • A way to define your own custom links + icons
      • Improved admin panel

      Hope you like it, and don’t forget you can show your support by purchasing the premium pack from here.

    • Switched: From Shared to VPS

      It’s been about two weeks now since I made the transition from a shared reseller hosting account to a VPS (Virtual Private Server) account – impressions so far, excellent performance but fiddly to configure.

      The reason I wanted to change from shared hosting was the fact the server was always being hacked (even though ALL my scripts were secure), there was frequent downtime, support blamed me for problems every time, and it was slow as hell.

      Those used to a shared hosting environment would probably not know where to start when faced with configuring a VPS. Luckily, a lot of it was pre-configured when I received my account – certainly some of the major security holes were patched. I was not satisfied with those however. As a victim of hacking in the past (previous host swears it was not there fault, something I don’t believe) I took extra care to secure it as a much I could – configuring brute force detection, the firewall, installing mod security (excellent rules for that here: http://www.atomicorp.com/wiki/index.php/Atomic_ModSecurity_Rules) and going though multiple guides (like this one: http://www.webhostingtalk.com/showthread.php?t=468168) with a fine-tooth comb.

      The result? My pages are loading at least 6 times faster, I have had no down time (or at least have not noticed any), and I feel in control and happy. No longer am I at the mercy of shared hosts :)

      If your interested, I chose ServInt as my provider as they offered a great deal, as well as being a managed service (so I’m not on my own if I screw things up). I was tempted by the bells and whistles of Media Temple, but felt the ServInt service was better value.

    • Download Monitor 3.2.2 Maintenance Release

      Download Monitor has received some more love and has been updated. Here’s the change log from the new version:

      • Small bugfix in uploader.php – cat ID
      • Changed stats graph calculation – thanks lggemini
      • Changes to headers in download.php to avoid caching
      • File Browser fixes – $root was clashing with something….
      • exclude_cat works in all sections of download_page now
      • Removed hardcoding of /uploads/
      • Added action to download.php – should be able to use it to stop a download if you want – maybe limiting downloads per day or something? Whatever you want…
      • Made it so if you post new file on ‘edit’ screen, the post date is updated.
      • Fixed the ‘blank meta’ section which blanks out custom field values when nothing is set.
      • Moved ‘allow_url_fopen’ check.
      • Someone said downloads don’t work with spaces in the name. They do! Wasting my time sonny…
      • All work and no play make jolley a dull boy
      • Had to rename capabilities so they work. Apologies if you have to set this up again! Cheers to Mark Dingemanse.
      • {category_ID} custom format tag added. Useful if you want to send someone to its category on the DL page I guess. Also added {category_other} so when no category is set “other” is shown – this is because the download page can show an ‘other’ section if you want it to.
      • You can now manually edit the post date on the edit download screen.

      If you have edited capabilities for download monitor user permissions, you’ll have to again sorry! This is because I named them too long. Also, you should check your forced downloads still work because there was a logic error meaning they may not have been forced after-all…

      Enjoy.

    • Mahousive update to Download Monitor (3.2)

      Today I completed the update for the Wordpress Download Monitor Plugin – many tweaks, fixes, and features added. There were no changes to the database structure so people upgrading should be fine. Here is the list from the change log:

      • {user} tag added for custom formats
      • ‘autop’ option fix
      • Download page buttons applied with CSS so they are easier to customise/translate.
      • Fix for pagination bug after editing a download
      • Category output fix on edit downloads screen
      • Category urls on download page use ID rather than name to prevent errors when cats have the same names.
      • exclude_cat added to download_page shortcode
      • Localised ‘hits’ ‘date’ ‘title’ on download page
      • Option to disable the download logging
      • Read file ‘chunked’ some people found large files were corrupted so this should help (fingers crossed)
      • Added show_tags option to download page – displays x amount of tags on the download page.
      • File Browser root setting and download.php logic/mime types modified thanks to Jim Isaacs (jidd.jimisaacs.com)
      • Interface Improvements
      • Bulk edit categories, custom fields, tags, member only downloads
      • Added roles for download monitor admin – should be able to use with a role manager plugin if you want anyone other than admin to access the admin section e.g. http://wordpress.org/extend/plugins/capsman/
      • Change redirect after add
      • Edit Cat names/parents
      • Dedicated tags and thumbnails fields (they still use meta table though)

      And yes, those category link bugs are fixed at long last, and you can edit category names finally. Phew!