I've moved! I've moved my online home to mikejolley.com, and thats where I'll be blogging primarily. This site will stay live for archive purposes :)

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 70953 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. traxen says:

    Yes, that did it, thank you very much

    Love this plugin so I’m so grateful for your fast response ;)

    P.s It’s line 633 :D

    Comment made on May 18, 2007 at 1:04 pm

  2. danielgc says:

    Hello! Great plugin!
    I was wondering if there is another option other than upload the files using the web browser. I have some files and it would take some time to reupload them. Besides, I have some files larger than the limit (Max. filesize = 1048576 bytes.). Basically I am trying to make a “downloads” page where I will show all the files (all I have made) I want to share with visitors. Thx in advance!

    Comment made on May 21, 2007 at 7:29 pm

  3. Mike Jolley says:

    daniel, upload them via ftp then use the “add existing download” option and input the url you uploaded to

    Comment made on May 21, 2007 at 9:34 pm

  4. danielgc says:

    Plz forgive me, I didn’t see the “Either choose to upload your file from your hard disk (max 10MB) by using the ‘Upload file’ input OR enter the url of an already existing file in the ‘Download URL’ input (e.g http://www.blue-anvil.com/download.zip).”

    A template showing automatically the list of all files with size, name and hits would be nice ;)

    Comment made on May 22, 2007 at 2:29 am

  5. Mike Jolley says:

    O, I don’t think you have the latest version; it has a button on the main page for it…

    Comment made on May 22, 2007 at 7:36 am

  6. danielgc says:

    I have the latest one, Mike. Is there an option to show all downloads? or you mean showing the most popular? I see the button with the option [download#id#image], but that will show one big button for each file, or am I wrong? THx again for your great work!

    Comment made on May 24, 2007 at 2:48 am

  7. Mike Jolley says:

    I was talking about the “add existing” button, see screenshot in post to see what i mean.

    It doesn’t show a page no, this may be a future addition.

    Comment made on May 24, 2007 at 5:41 am

  8. Nathan says:

    Nice plugin :) The only thing that keeps me from replacing the current script im using is that it’s not showing when the last download took place (eg. xx minutes ago), also some more information about who is downloading it would be awesome.

    Comment made on May 24, 2007 at 7:03 pm

  9. Bronze says:

    Hey there Mike! Back on comment 44 what i was trying to say is that when we link the file through the plugin, if you click “save target as” you get an option to save the script file, not the download related to it.

    I wanted to have something like you have down there on the “Top 5 Downloads”

    And then it hit me…
    It’s about using the “Custom Download URL” already on the plugin! Thank you SO MUCH!
    Now i can get back to recording my download count.
    And I’m sorry i hadnt realised that earlier. :)

    Comment made on May 24, 2007 at 9:25 pm

  10. Bronze says:

    ps: i was messing around with the plugin now and tried the “Most downloaded” template tag.
    It gave me a php strtotime error.

    I went to the wp-downloadMonitor.php and on line1073 changed strtotime($D->postDate)) to strtotime($d->postDate)).
    *note the capital D before*
    Now it works just fine.
    Just thought i’d let you know :) and maybe it can help someone else.

    Cheers!

    Comment made on May 24, 2007 at 10:15 pm

  11. Mike Jolley says:

    Thanks guys

    Comment made on May 28, 2007 at 4:01 pm

  12. Mohammad says:

    Hi there,

    I’ve installed the plugin, added the download links, but can’t seem to make the thing work.
    for instance, I have inserted [download#9] in the page (I did this both in WYSIWYG mode and HTML mode, but it just keeps on showing the same [download#9].
    I have defined a custom directory (downloads) for my downloads instead of the default “download”, I have enabled write permission for user_uploads and have updated permalinks.
    What is the problem?
    Here’s the page I inserted the tag in:
    http://www.musavis.com/publications/dream-home-checklist/

    Comment made on May 28, 2007 at 11:26 pm

  13. Patrick Haney says:

    One thing of note is that when I download a file to test it out (to make sure my .htaccess is working properly, for instance), the download count goes up. It would be nice if WordPress could prevent me from inadvertently updating the download count while I’m logged in, if I’m an administrator.

    Comment made on May 29, 2007 at 4:12 am

  14. Dan Bishop says:

    Wow great plugin, thanks!

    Comment made on May 29, 2007 at 8:17 am

  15. Dan Bishop says:

    Oh… I take it back, just saw the licence :(

    Comment made on May 29, 2007 at 8:38 am

  16. Mike Jolley says:

    @Patrick – Thats a good idea, its on the todo list thanks.

    @Dan – Whats wrong with the licence? I know next to done about licences, I put that in stop theifs, suggestions on a better licence, as I have no real gripes with people modding it (as long as they dont take credit for my work).

    @Mohammad – You are using the script inside a PAGE or inside a POST?

    Comment made on May 29, 2007 at 9:12 am

  17. Mohammad says:

    I’m using the script in a page! Thanks!

    Comment made on May 30, 2007 at 8:30 am

  18. Sander Schutten says:

    Hi Mike,

    I’ve got the same problem as described in a couple of replies. It seems on Windows machines the plugin isn’t working properly and the tag isn’t substituted for the download link (e.g. [download#1]).

    I’ve figured out what’s causing this problem. In the function wp_dlm_ins($data) you’re doing a compare on the table name with the name of the in the tables collection. This comparison is done using the equals sign (==). This makes the comparison case sensitive. In my case the table name in code is upper case, but the table name in my sql database is lowercase. I simply made the following change:

    before:
    if ( $value == $wp_dlm_db ) $wp_dlm_db_exists = true;

    after:
    if ( strcasecmp($value, $wp_dlm_db) == 0 ) $wp_dlm_db_exists = true;

    Now it works like a charm!

    Comment made on May 30, 2007 at 12:13 pm

  19. Mike Jolley says:

    Thanks! Im now working on vesion 1.6, Ill defo include this :)

    Comment made on May 30, 2007 at 1:47 pm

  20. Dan Bishop says:

    Oh, that’s ok then, just at the moment it says “All rights reserved.” so no-one can legally/technically modify it. Maybe a creative commons licence, or better still license it under the GPL :)

    See: http://www.creativecommons.org – no one can take credit for your work with this licence, but can still build upon it so long as they credit you.

    As for the GPL, I think, though I am not sure, that people CAN use your work without crediting you, but i think it is very unlikely anyone would, most people make every effort to credit original authors and inform them of the developments they’ve made to their code.

    Comment made on May 30, 2007 at 4:18 pm

  21. Mohammad says:

    Good idea from Dan.
    My work is all (cc) too. Much easier, less fuss! Still you feel good about owning your rights as the author, at the same time giving users more freedom to get their hands dirty with your code. (The good old spirit of open source)

    Comment made on June 1, 2007 at 11:02 pm

  22. Chimentira says:

    I change my server and the last download file dont work, hes ther but dont come.
    http://psp.chimenti.com.br/index.php/2007/06/03/sport/surfs-up/
    The old files works great…
    Sorry for my bad english, i hope you understand.

    Comment made on June 5, 2007 at 1:24 am

  23. Chimentira says:

    One more thing… This only happens with Firefox. And again, only the last file i have uploaded to the new server. Thanks.

    Comment made on June 5, 2007 at 12:09 pm

  24. Mike Jolley says:

    Hmm, for some reason the url is incorrect. Try rebuilding your sites permalinks? Options > Permalinks > then save.

    Not sure what else would cause that error, I don’t think its the plugins fault.

    Comment made on June 5, 2007 at 5:49 pm

  25. Chimentira says:

    Mike, i rebuild the permalinks but the error continues. I re-uploaded the file too. I dont know what is the problem, i think i will re-install the plugin and edit all posts

    Comment made on June 5, 2007 at 6:02 pm

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 »
MiniCard Theme for WordPress
  • Featured work - More

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

    • @pippinsplugins Thanks. We're rewriting all those queries anyway (queryposts uh oh)
  • Out of the blue - More

    • Download Monitor 3.3.5 Tagged for release

      The latest update to Download Monitor for WordPress has been released; this version comes with a many fixes and some new features, such as improved sorting. For full details view the readme; you can grab the plugin here.

    • Closing the Forums

      Just posting to let current users know that I’m closing the forum on Blue-Anvil. This is mainly due to spam-registrations getting out of hand and being a general nuisance. I will be posting good topics as FAQ items within posts if applicable.

      Please note that you can still post and get help for my plugins/themes by posting on the wordpress.org website.

    • Show off your MiniCard!

      Are you a user of the WordPress MiniCard theme? Its been downloaded over 14,000 times so far!

      If you have used it as-is, made your own child-theme or done something creative with it, please show off your MiniCard’s in the comments, I’d love to see how the theme is being used!

    • Spam Stopper updated for WordPress 3.0

      My Spam Stopper plugin has been updated for WordPress 3.0 (version 3.1.3) – you can grab it here. Sorry this update took longer than my other plugins but this one gets less lovin’ – if you want to change that feel free to donate, spread the word, or rate it on the WordPress.org plugin page.