This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

SS Downloads

Description

Adds a short code like [download file=”path_to_file”] that embeds a form in the post asking for an email address before showing a link to a file for download. Great for promoting white papers and other digital assets on your site.

Live demo: http://www.strangerstudios.com/blog/2010/07/ss-downloads-wordpress-plugin/

The plugin works in 3 parts.

  1. The short code to add the form to your pages.

  2. The logic to check (using session variables) if the user has provided an email address before showing either the email capture form or the download link.

  3. A script to serve files securely. It checks for the same session variable before delivering the file. Files can be located outside the web directory or servered from the uploads folder, etc, with an obfuscated URL.

The look of the email and download forms can be changed by copying files from the /css/ and /templates/ folder of the plugin into your active theme folder. Rename the files ssd-original_file_name.php/css (e.g. ssd-download.php or ssd-ss-downloads.css) and edit as needed.

Screenshots

  • Email capture form.
  • Download link.
  • Addresses and stats in admin.

Installation

  1. Upload the ss-downloads directory to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Add shortcodes like [download file=”http://path_to_file” title=”optional title”] or [download file=”wp-content/uploads/2010/7/filename.ext”] to your blog posts and pages.
  4. Navigate to Tools –> SS Downloads to view a list of collected emails and stats on file downloads.
  5. You can also change the settings on that page to either require signups or to send the file (or a link to the file) by email.

FAQ

How can I better protect the location of my source files?

For compatibility reasons, the plugin now redirects file requests to the source file instead of serving the file via script. For most people, the defaults settings are good enough for protecting your downloads. However, l33t haXors may be able to note the true location of a download by spying in on this redirect process. For added security, you can use our “ssdownloads_getfile_redirect” hook to tell SS Downloads to serve files through a PHP script which will better mask the location of the source file, and even allow you to keep the source files outside of your sites root directory (so the URL of the file is not navigable at all). Note that there is no 100% solution to stop all pirating. (Every little bit helps though.)

To tell SS Downloads to serve files via PHP script, add code like the following to your functions.php file: (this code will not work on all servers, please test your setup after applying this code)

function my_ssdownloads_getfile_redirect($s)
{
return false; //tells SS Downloads to use the PHP script to serve the file instead of redirecting to the source file
}
add_action(“ssdownloads_getfile_redirect”, “my_ssdownloads_getfile_redirect”);

I get odd errors when browsing to a page with a shortcode on it.

You might be able to solve this by specifying “file_get_contents” or “cURL” as “Template Method” in the SS Downloads settings, although the “Let WordPress Choose” options should work best on most setups.

How can I change the look of the email or download forms?

To modify the templates:

  1. Copy the .php file of the template you would like to customize to your active theme folder.
  2. Name the file ssd-{template name}.php, e.g. ssd-download.php
  3. Change the file as needed.

You can also modify the CSS file:

  1. Copy the ss-downloads.css from the css folder of the plugin to your active theme folder.
  2. Name the file ssd-ss-downloads.css
  3. Change the file as needed.
I get “file not found” or other include/require errors when using the plugin.

The plugin is probably having trouble finding your plugins directory or other files. This happens sometimes if your WordPress install is in a sub folder, or your plugins directory is in a different spot.

First, let me know at jason@strangerstudios.com or on the WP forums. Others may be having the same problem, and I may be able to tweak the plugin to support your case.

Second, try overriding the SSD_PLUGIN_URL constant using our “ssdownloads_plugins_url” hook. Add this code to your functions.php:

function my_ssdownloads_plugins_url($url)
{
return “http://www.yoursite.com/wp-content/plugins/ss-downloads”; //change this to be the URL path to your ss-downloads plugin folder, no trailing slash
}
add_action(“ssdownloads_plugins_url”, “my_ssdownloads_plugins_url”);

Email me at jason@strangerstudios.com to ask a question

I will answer your question and post it here.

Reviews

just works: thanks!

very easy to install and to use.

I needed to keep track of the users (name and emails) that download my files without putting too much burden. enforcing a full registration to WP was too heavy, this simple form to give an email is perfect.

Please consider adding options for customizing the text tags displayed in both registration form and download link after (just like you already do for link title and description), eg to accommodate for specific usage conditions or different languages.

Thanks again.

Easy to Use

This works easier and requires way less than “Email Before Download”. It works exactly how it I expected and has all the things I require.

The design is a bit clunky but you can fix that with CSS.

Read all 10 reviews

Contributors & Developers

“SS Downloads” is open source software. The following people have contributed to this plugin.

Contributors

Translate “SS Downloads” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.5

  • Important update that fixes some cross site scripting vulnerabilities.

1.4.4.1

  • Forgot to include the exportemails.php file in the repo. So update to
    get that file to be able to export emails.

1.4.4

  • Added a “name and email” option to the “required” dropdown and a matching template file to collect name and email address.
  • Added a “name” column to the justemails (ironic, I know) and ss_downloads tables.
  • Added name column to download export.
  • Added names when available to the “Collected Emails Addresses” list.
  • Added an email export and clear table option.
  • Using plugin_url to get URLs for the exports now instead of get_bloginfo(‘url’)

1.4.3

  • Removed short tags (<?=) for greater compatibility across servers.

1.4.2

  • Renamed the mimetype class being used to avoid conflicts.

1.4.1

  • Fixed default values on plugin activation.

1.4

  • Now using the WordPress HTTP API to load the templates, which should work out of the box on all systems.
  • Updated template system to look for files in the current theme folder
  • Added hooks to set values in setup.php so changes aren’t overwritten in an upgrade
  • Added a way to show messages in the ss-downloads admin page (e.g. upgrade notes, or paidmembershipspro.com ads)
  • Added a link to clear download records on admin page.

1.3.3

  • Fixed changing the download shortcode.
  • IMPORTANT! Changed the GETFILE_REDIRECT constant to default to true. This means that there will be slightly less security when showing downloads, however the plugin will work across more systems out of the box. If you want that extra level of security (and your server can support) it, add – define(“GETFILE_REDIRECT”, true); – to your functions.php or somewhere else in your code to run downloads through the getfile.php script.

1.3.2

  • Fixed mimetype class conflict.

1.3.1

  • Fixed the GETFILE_REDIRECT use in getfile.php

1.3

  • Added cURL support and option
  • Added ability to change the shortcode
  • New “Email Sent” template
  • Added “reset” service
  • Added documentation on customizing setup.php

1.2.2

  • Fixed definitions in setup.php to work with more hosts

1.2.1

  • Fixed bug with echo statements in addemail.php
  • Fixed bug with links in email when sending link by email

1.2

  • Can change settings to require account creation (instead of just an email address).
  • Can change settings to email the file as attachment instead of showing a link.
  • Can also send a link to the file by email (instead of showing it on the site).

1.0

  • This is the launch version. No changes yet.