Testing our new SS-Downloads plugin. It basically will require an email address before serving a specified file. Right now, I’m using a zip of the pre-release plugin for testing. I will update this to point to the latest version once it’s ready.

Should see a form or download link here.

Enter your email address to download ss-downloads.zip

Future plans:

  • Option to require account creation (instead of just an email address). Done
  • Option to email file as attachment instead of showing a link. Done
  • Icons for files in template.

FAQ

Q: My downloads are incomplete, corrupt, or otherwise not downloading… especially large files.
A: This may be caused by a low memory issue or some other issue with serving the file through the getfile.php script. You can configure the plugin to simply redirect to the chosen file rather than serving it through the script by editing /ss-downloads/includes/setup.php and setting the GETFILE_REDIRECT value to true. The file will have to be served in a public web folder, and 733t hackers will be able to see the actual URL of the file.
Note: I’ve changed the GETFILE_REDIRECT to default to true. But if you have the inverse problem (the download is working, but you want to make it more secure by avoiding the redirect — which savvy users might be able to watch to get the URL of the file) you can set that value to false.
Edit:
Bob at 2bretired.com has a good writeup of how to clear out the download stats for your files if you want to do that sort of thing.

169 Responses to “SS-Downloads WordPress Plugin”

  1. Brett says:

    This plugin still seems to haev some bugs unfortuantely. specifically Firefox Browser bugs?

    When trying to set up an mp3 for download – it works in IE (althought it always downloads as ‘getfile.mp3′ instead of the name of the file itself. But on Firefox, the site usually crashes when clicking the download link – or sometimes it downloads about 6 seconds of the mp3 – not the whole file. Any ideas? Would really love to get this working.

    • jason says:

      Sounds like a server/memory issue. Try the GETFILE_REDIRECT fix described in the update of this post.

  2. Lagarrigue says:

    Hi Jason, if one does want to put 5 different links on the same page they function all together, how to separate the links?

    • jason says:

      Lagarrigue, others have requested various features to address this. I have not figured out an elegant solution. In the meantime you can make one page that links to subpages with 1 download form each. This may be a cleaner setup for you.

      If you are a coder, you can take a stab at editing the files in the templates and services folders to show the forms differently. You may want to pass an extra parameter after getting the email to tell the page which form submitted, and then have that template highlighted, etc.

      If you have a more specific request, let me know.

  3. eNCarolina says:

    Hi Jason,

    I love your plugin, however I am not able to get the Download Full Report feature to work for the download stats. When I click the link it takes to a “Nothing Found” 404 page.

    Any suggestions / ideas ?

    Thanks!

  4. Kammie says:

    Fantastic plugin! I’ve installed the plugin and everything seems to be working fine except that the “File Downloads” fields are not populating with any download details. However, the email addresses are showing up just fine in the “Collected Email Addresses” field.

    Is there a setting that needs to be set for the report to work?

    • jason says:

      Hi, guys. I’m working on this problem and hope to have an update in the plugins repo soon. Thanks.

  5. Bob says:

    The original errors I was getting was due to testing on my wamp localhost.
    On my actual site I noticed once you submit your email the page remains with your “download is ready box”. Can this be reset.
    Also during testing both “collected email address” and “file downloads” areas need to be cleared how do you clear these 2 box’s

    Otherwise it works great,
    Thanks, Bob

    • jason says:

      You address your second question in your follow up. Thanks for that.

      RE the “download is ready box”, you can change the content of that box by editing the files in the template folder of the plugin. It uses a session variable to figure out if you have already submitted your email address (and so won’t ask for it again). So you have to close your browser and come back to retest the form.

      If you want to show the download link only once per session, you’ll need to add code somewhere to unset that variable (I’d have to look up what it’s called).

  6. jason says:

    FYI, I pushed version 1.3.3 to the WP repository and it should be available shortly. This update fixes an issue with changing the “download” shortcode and also sets the GETFILE_REDIRECT constant to true by default.

    This last change has security impacts on the locations of your files. So you may want to add this code to your functions.php file or similar:
    define(“GETFILE_REDIRECT”, false);

  7. Bob says:

    Jason,
    After playing around with this plugin the “collect email” and “file download” needed to be cleaned out to start fresh I created a small post explaining to beginners how to use PHPmyadmin to clear these 2 tables at http://2bretired.com/wordpress/?p=1153

  8. Jack says:

    hey jason,

    great work on this plugin. i’m having a slight issue. The plugin works great when I set it to display the download link, but if I set it up to email the link, whenever you click that link in the email you just get this:

    “This file is protected. You need to enter an email address to gain access. Please contact us if this is unexpected. Back to homepage.”

    I had multiple people test and it happens to everyone. I saw someone posted about this above, but didn’t follow up with any resolution.

    Any ideas?

    • jason says:

      @Jack, one thing to note is that you have to use the same browser as the one you clicked on to open the file (it’s still looking for that session). If you turn off the GET FILE option in the settings, it should work in any browser then (because it won’t be sending traffic through the getfile.php script.)

  9. hugo says:

    hi, i m looking for W.P. function, like ” download before click AD”, the closest one I found is SS-Downloads. Will you add the function in the future? thx.

    • jason says:

      @Hugo, do you mean something like “click this ad to download _____”? I’m not a fan of that kind of trickery. The ad providers don’t like when you encourage false clicks like that. I don’t think I’ll be adding that feature any time soon.

    • admin says:

      Hugo, do you want to show an ad to click on before downloading? That’s against most ad service TOS, so I wouldn’t program that. You might be able to figure out how to tweak this plugin to do that if you have some coding skillz.

  10. Vee says:

    Hi. I’m looking for a plugin where a customer can download/and print an order form to order products via snail mail. It sounds like your plugin would would do that?

    • jason says:

      It should work. But I would just put a link to the catalog unless you think it’s more valuable for your business to capture an email address than to get a catalog out.

  11. Vee says:

    I’m gettig this error on the download page:

    Warning: file_get_contents(http://mysite.com/wp-content/plugins/ss-downloads/templates/emailform.php?file=4v-zR6fc6f%2F9vaROBr%2FRtBct_hh.vBx&title=Order+Form&postid=321&ssdmsg=) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/site/public_html/wp-content/plugins/ss-downloads/ss-downloads.php on line 165

    • jason says:

      Check the /includes/setup.php file in the plugin and manually set the plugin directory constants.

  12. Mark says:

    Hi, I’d love to give this a try. Looks very simple, easy to use. Problem is, when I activate it it appears to break the CSS on my blog–everything goes askew. Any hints on this?

    • jason says:

      @Mark, can you link to your site that is broken? Or let me know what theme you are using? Thanks.

  13. Omar says:

    I was testing out the Plug-in and it worked fine until I started to test it with different e-mails. It seems that it stores the e-mail that was put in first, so when I try to input a different e-mail I can’t. Even when I clear all history on my browser and go back, the download box still says “your download is ready”…Does this plug-in only allow one e-mail per computer? Anyways to fix this issue?

    • jason says:

      It uses PHP sessions to save that an email was already provided. This is so it only asks users once. To test it multiple times, you’ll have to kill all of your browser windows to clear the session. Then visit the site an try again.

  14. JeLBee says:

    i can download the file even if i input a wrong email. It is much better to send the download link to the email provided or it is very much appreciated if you can make a “Subscribe RSS to Download”.

    • jason says:

      Yeah, we check for a valid format, but you can’t really validate the email unless you use the “send link to email” mode. Find that in the plugin settings.

  15. nuzly says:

    Is it possible to show a counter stats on the frontend??

    • admin says:

      Great idea. You could do this by editing the template (see the FAQ of 1.4.1). Insert the download counter like this (didn’t test): get_var(“SELECT COUNT(*) FROM $wpdb->ss_downloads WHERE file = ‘” . $wpdb->escape($file) . “‘”)?>

  16. Paul Zagoridis says:

    Jason thanks for the easy-to-use plugin. I know some people have problems with it, but for emailing a file to an email address it is perfect under FF, Chrome and Safari.

    A feature requests

    1) Can you increment the “Files downloads” section for email delivery too please? Emailing a file should count as a download.especially if there are 2 or more files available from a site. The wp_ss_download table should also populated so full report works.

    2) Can you make the settings individually configurable via the shortcode? i.e. make some files available as email delivery [download "FileA.pdf" title="File A" delivery="email"] and other files delivered via email link [download "FileB.mp3" title="My audio gift" delivery="email-link"] and others via download [download "FileC.mp4" title="My video presentation" delivery="link-file"]

    It makes sense to be able to over-ride every option from the config in the shortcode.

    • admin says:

      RE #1 Good point.

      RE #2 Good idea.

      Not sure when I can get around to these.

  17. Paul Zagoridis says:

    After submitting an email address for send a link to file by email, the form resets to “Enter your email address to download …” Shouldn’t that say “Check your inbox for the link to download …”

    • admin says:

      I’m hoping the new version fixes these. Could be some kind of server/plugin conflict (lots of them with this plugin). :) Let me know if you still see them, and we’ll try to chat offline about what the cause might be.

  18. Scott says:

    Is perfect for 1 file, but when trying to collect different email lists for different files, it can’t help me. It would be great if it had tabs to separate different files.

    • admin says:

      Right. I haven’t figured out how I would want to do that. You’ll need to either keep each file on its own page or use a more robust plugin like http://www.paidmembershipspro.com to manage your subscriptions and file downloads.

  19. Brian says:

    Hi,

    I was wondering if you could check this page:

    http://www.microtissues.com/blog/download-cell-types-white-paper/

    Everytime I type in an email it just brings me back to the page asking for my email. Then after a couple times of plugging in random emails I can get the download link. Seems like something funky is going on. Any thoughts?

    -Brian

    • admin says:

      The plugin uses session variables to tell if an email has been entered. This is commonly available on most hosts, but maybe not on yours. This link might help you figure out a way to enable it. You can check your phpinfo(); to see if this is really what is going on too.

      http://support.qualityunit.com/knowledgebase/general-questions/how-to-enable-session-support-for-php.html

    • Brian says:

      Any idea what I need to add to php.ini to get this to work?

      That article was not that clear what I needed to add.

      All I have in php.ini now is memory=20mb

      I am using 1and1 as well.

      Thank you for helping.

  20. Paul Zagoridis says:

    In case my website link is stopping my comments, I’ve removed it.

    I was using 1.3.3 but have just updated to 1.4.1.

    I’ll rerun the tests when I get a chance

    • admin says:

      I’m behind on moderation. Thanks for trying 1.4.1.

  21. Alfie says:

    Nobody else seem to have this fundamental error – I have the plugin installed, add the shortcode into the page (tried html and visual) but all I see on the finished web page is the text. The plug in definitely is activated, and i have deactivated all other plug ins, changed the theme and tried on 2 different servers – am i using it incorrectly? http://www.just-worldwide.com/portfolio-item/european-payers/

    • jason says:

      Sometimes when you cut and paste [download file="http://www.arealurl.com"] the URL part becomes an tag link, which would break that.

      Your example page is down for me or I might have more input.

    • Alfie says:

      Here’s another demo page I’ll leave up with the shortcode added and the result. Any advice greatly appreciated. As aforementioned, have tried this on different themes, stripped away all the other plug ins, but still no joy.

      http://www.just-worldwide.com/demo-page/

    • Alfie says:

      Aha! seems obvious now, but for some reason the default shotcode had been changed to so i simply changed it to ‘download’ again and all is well. Great plugin!

  22. Evan says:

    I installed this plugin in the sidebar of my wordpress site and everything works fine. The one issue I have noticed is that when you submit an email address it loads in a different page of my website before giving me the file download button. Is this a known issue and/or fixable?

    • jason says:

      Hmmm. Some browsers do that.

      You can move the download.php template into your theme folder. Then fix the require there to point to your wp-load.php. Then remove the target=”_blank” in the link.

  23. Joe says:

    Is there any Chance to add some more Fields to the Form, just to get a liitle bit more Details about WHO is requesting this Information?

    I am using the FS Contactform right now, but i am missing your Functionality about the attached File.
    So a mix of both would be FANTASTIC.

    But some more Fields in your Plugin would be FANTASTIC as well.

    Many Thanks in Advance,
    Joe

    • jason says:

      I’ll consider that for a future version, but don’t forsee having a lot of time to work on that. With a little php knowledge it would be an easy tweak for someone willing to do it. If someone does. I’ll post it here or (better yet) include it in the plugin.

  24. jose says:

    Hi Jason,

    I installed your plugin and everything seems to work fine until I click to download the file, it gives me a 403 Forbidden error.
    I tried with two different files (one on the same server and the other in a different hosting location).

    Here is a link where I’m testing it:

    http://missionsbox.org/ss-download/

    I tried adding both code suggestions into the funtions.php (one at the time), but it didn’t seem to make any difference. Currently everything is back to the original settings. If also tried changing the template method and the same error displays.

    One more question, is it possible to add another field to the form (i.e. “name”).

    Thanks

    • jason says:

      Jose, check the file permissions on ss-downloads/services/getfile.php. It should be executable by the web server. Also, check that the file you are trying to serve is readable by the web server user.

      You’ll want to look into using chmod and/or chown on the files on the server.

      I hope that makes sense. I can’t get more specific without knowing your hosting setup. But that error message is pretty clear that either (1) the getfile.php script is not readable/executable or (2 – more likely) the files you are serving aren’t readable by the user apache uses to execute the getfile.php script.

    • jose says:

      Hi Jason, I figured it out, its a .htaccess firewall I’m using that was blocking something, now its working, but it seem like there is an issue with link that have blank spaces (%20)…

  25. jose says:

    One more question, is it possible to add another field to the form (i.e. “name”).

  26. car says:

    Where are the emails stored? Can they be used for promotion for some newsletter plugin. Can emails be exported?

    • jason says:

      Goto Tools –> SS Downloads in your admin and you should see a list of email addresses. You can copy and paste the comma-separated list or export the full report to CSV and copy the email column, etc.

  27. Geoffrey says:

    As with Jose, I would also like to have the option of a Name field. It will add a lot more leverage to marketing potential. Thanks.

    • jason says:

      Not timeline yet, but I’d like to get this out at some point. Might be a premium plugin.

  28. joel says:

    How does the script send out emails? Would this count towards a hosting accounts emails sent on say GoDaddy?

    • jason says:

      It uses the mail function. May update this to use wp_mail, which you can use other plugins to make work with any POP/SMTP server (e.g. Google Mail). As written, it would count toward your limit.

  29. joel says:

    I used your plugin for a new song release on Five Iron Frenzy’s website and after about 3k downloads I got this error:

    “Could not instantiate mail function.
    Warning: Cannot modify header information – headers already sent by (output started at /home/content/69/8479569/html/sites/fiveironfrenzy.com/site/wp-includes/class-phpmailer.php:586) in /home/content/69/8479569/html/sites/fiveironfrenzy.com/site/wp-includes/pluggable.php on line 934″

    It gives me this same error on all the pages I try and use the plugin on. Any idea on what might be the problem?

    • jason says:

      Sounds like you hit some kind of email limit on your server.

  30. Jeff says:

    Two questions:

    1) Can I deliver (image) files *without* requiring a user to be signed in or enter an email address? I really don’t care if they are. I simply want to offer a download link (might require user verification later).

    2) Will the shortcode work in an image lightbox? (My initial test indicates no, but hoping there’s a way to make it work?)

    P.S. I’m particularly trying to get this to work with NGG (adding a download link in the image lightbox).

  31. Mark says:

    very nice plugin thanks

  32. Julia says:

    Hi, Do you have any plans for updating this plugin for wordpress 3.3? It looks like exactly what I need, but I am unable to get it to work on my website.

    • jason says:

      I’ll test this out in 3.3 and try to get an update out there. Maybe this week. Thanks.

    • jason says:

      So I’ve tested on my 3.3 installs, and the plugin is working. If you give me some more information, I might be able to figure out what is going on.

    • Julia says:

      Hi Jason, I was delighted to see you updated this plug-in, but I still am having no success. I’m using WordPress 3.3.1. My shortcode is set for download, I am using the following syntax: [download file="htt://onecallonesolution.com/wp-content/uploads/2012/03/College-Students-Identity-Theft.pdf" title="CollegeStudents"] Where you have “filename.txt” in your instructions, I am putting the file URL of the media in my library–is that correct? There is nothing visible on my page: http://onecallonesolution.com/college-students-and-identity-theft/. I have tried changing every setting I am able. I am willing to purchase a plug-in, I would just really like to capture email addresses with my free downloads. thank you for any assistance.

    • jason says:

      You have a bad URL in the shortcode there, but I am not sure if that’s just a typo in the comment here. It should work with a full file URL to your media folder, e.g. I see you have other download related plugins installed. You might want to change the shortcode from “download” to something else via the SS Downloads settings page and try that.

    • Julia says:

      One more thing: I have also deleted and re-installed the plugin.

    • Julia says:

      Jason, thank you for your input. I have changed the download shortcode five times and I still see nothing on my post page. I’ve checked the URL multiple times. Should I give up?

  33. Casandra says:

    Hello Jason,

    I’ve been trying to get this plugin to work on this site. (http://www.byot.nl/scriptie/)

    but it just won’t show! I don’t understand because I tested it on my local webserver and that worked perfectly. I did exactly the same online and now it doesnt work (its just blank..), do you have any ideas?

    Hope to hear from you soon.

  34. Lisa says:

    I’d like to implement this on a template so the authors don’t have to use a shortcode – only upload the pdf via a custom form field (that I’ve already set up). Is this possible?

    • jason says:

      Should be. You’d have something like this in your template where you want the form to show:

      $file = get_post_meta($post->ID, “file”, true);
      echo do_shortcode(“[download file='" . $file . "']“);

  35. Venture Proof says:

    Please tell me how to change the appearance of the boxes and the size of the text. They are just too big at the moment on our website, but changing the code doesn’t seem to have had any effect.

    Thank you!

    • admin says:

      You should be able to do it through CSS. Find the style.css of your active theme and add lines like this to it:

      #ss-downloads {padding: 2px;}
      #ss-downloads h3 {font-size: 1em;}

  36. Venture Proof says:

    I’ve tried to do that but it hasn’t had any effect on the boxes that are displayed. They just look very out of place on my website at the moment, and need to be smaller and styled a bit differently.

    Please can you run me through the steps of doing this. I’m useing pagelines framework, and can therefore add code to Custom Code.

    • jason says:

      Try using the !important flag like this:

      #ss-downloads {padding: 2px !important;}
      #ss-downloads h3 {font-size: 1em !important;}

      There may be a custom.css or similar in that theme where you should place it instead of style.css. I’m not familiar with that theme.

      Without seeing the actual site, I can’t give you more detailed help. If you link to the form on your site, I might be able to give you the CSS to try.

  37. alaiksander says:

    Hi Jason, I really love your plugin. But currently I’m using wordpress 3.3.1 and I still get the getfile.php problems for my downloaded files. I can simply rename the downloaded files to its real name and they do work, but It’ll confuse my average visitors. I did the fix, but it failed me. My files are in exe, zip, pdf, doc and rar. Thanks

    • jason says:

      Sorry, I can’t understand your problem. Can you paste the error you are getting?

  38. Ian says:

    Can you explain how to work with files located outside the web directory?

    I have made a new folder called ‘files’ that’s at the same level as ‘public_html’ and put my download ‘script.pdf’ in it.

    What do I put in the shortcode for this to work?

    • jason says:

      Not possible in this version. I will take it into consideration for a future version. The plugin is due for a rewrite.

  39. buddha says:

    This plugin kicks ASS!!!! So simple yet perfectly formed. You have saved us a ton of money by having this functionality on our websites as opposed to signing up for an email harvesting platform like topspin. Please send me a donation link if you have one. thanks again!

  40. Aby says:

    Thanks for such a wonderful plugin. I could customize it for the way we want http://www.embeddedmachines.com/products/gtrack/
    . Please send me a donation link

  41. Richie David says:

    Nice plugin. This is a great tool to collect emails from your visitors and no one get to download without dropping an email.
    Thanks bro

  42. gg says:

    where’s the live demo? ((

    • Jason Coleman says:

      Sorry about that. We had the plugin deactivated. The live demo is back.

  43. ryan says:

    thanks the plugn ….. simple

  44. Stranger Studios Blog | Tips and Tricks for Stranger Studios-coded Themes Pingback

    [...] your site is equipped with the SS-Downloads plugin, click here for a tutorial on how to use that functionality. The SS-Downloads plugin allows you to hide a downloadable file behind a required email capture on [...]

  45. links for 2011-04-08 Pingback

    [...] Stranger Studios Blog | SS-Downloads WordPress Plugin A simple form for WordPress where a reader must submit an email address before they're allowed to download a file. [...]

* Required
* Required, Private