Downloads Manager

The Downloads Manager plugin lets you attach files to subscription plans. Subscribers with an active subscription to a plan can download the plan's files from their profile. You can also email the files to new subscribers, log every download, and use the plugin as a Joomla update server for extensions you sell.

Set Up the Plugin

  1. Go to System -> Plugins, find Membership Pro - Documents and enable it.
  2. Open the plugin and review its settings (see below).
  3. Go to Membership Pro -> Subscription Plans and edit a plan. Open the new Downloads Manager tab.
  4. Add a row for each file. For each row, enter a Title and either upload a file or pick one that is already in the documents folder. Rows keep the order in which you list them.
  5. To reuse a file that belongs to another plan, select it in Choose Existing Documents.
  6. Save the plan.

Downloads Manager tab of a plan

After a user subscribes, the files appear in the My Downloads tab of the user profile. The tab shows only files for the plans the user currently has an active subscription to.

My Downloads tab in the profile

You can also give subscribers a standalone page of their downloads. Create a menu item of type User's Documents (Membership Pro). It has an Intro Text option and a Show Modified Date option.

Plugin Settings

  • Document Paths: the folder where documents are stored, as an absolute path or a path relative to your site root. Default media/com_osmembership/documents. The folder must exist, otherwise the plugin raises an error.
  • Send Documents Via Email: if Yes, the plan's files are attached to the new subscription, renewal, upgrade and approval emails of paid subscriptions. Default No. Use it only when the files are small and few, so that the emails can be delivered.
  • Send Documents For Pending Offline Payments: shown when Send Documents Via Email is Yes. If Yes, files are also attached when the subscription is still pending because of an offline payment. They are not sent again when the subscription is approved. Default No.
  • Show Modified Date: if Yes, the profile tab shows the last modified date of each file. Default No.
  • Log Downloads: if Yes, every download is recorded. Default No. See Download Logs.
  • Show On Frontend: if Yes, the Downloads Manager tab is also available on the frontend plan add/edit form. Default No.

Download Logs

When Log Downloads is enabled, you can review downloads in the administrator area:

  • Membership Pro -> Tools -> Download Logs: the download date and the user for each document. You can search by username, name, email or document title.
  • Membership Pro -> Tools -> Download Statistics: the total downloads per plan and per document.

Implement the Joomla Update System

Use this section only if you sell Joomla extensions with Membership Pro and want your customers to update them from the Joomla administrator area. Otherwise, skip it. The sample files joomla_update_skeleton.zip and updates.xml show the structure.

With this setup, a customer enters a Download ID in the update site of your extension. When you release a new version, Joomla offers the update, and the download works only while the customer has an active subscription to the plan that contains the file.

Set Update Packages for Your Extensions

  1. Create a folder named update_packages inside your documents folder. By default this is media/com_osmembership/documents/update_packages.
  2. Upload the update packages of your extensions to that folder, for example by FTP.
  3. Edit your plan. In the Downloads Manager tab, each row now has an Update Package list. Select the update package for the row.

Select the update package

If a row has no update package, the update download serves the row's regular document instead.

Define an Update Server

For background, read the Joomla documentation about update servers. You need to do two things.

  1. Create an XML file with the update information of your extension. See the sample updates.xml. Note the following:
    • element: the installed name of the extension. For a package named osmembership, the manifest file is pkg_osmembership.xml, the packagename tag is <packagename>osmembership</packagename>, and the element tag must be <element>pkg_osmembership</element>.
    • downloadurl: use the format https://www.domain.com/index.php?option=com_osmembership&amp;task=download_update_package&amp;document_id=58. Replace https://www.domain.com with the URL of your site, and 58 with the ID of the document. The ID is shown in the first column of the Downloads Manager tab.
  2. Edit the XML manifest of your extension package and add the update server:
<updateservers>
    <server type="extension" priority="1" name="Membership Pro Extension">https://www.domain.com/updates.xml</server>
</updateservers>
<dlid prefix="dlid="/>

Let Customers Manage Download IDs

Create a menu item of type Download Ids (Membership Pro). Customers use it to generate Download IDs for their account (1 to 5 at a time) and delete the ones they no longer need. The menu item has a Show Domain option. Set it to No if you do not need the Domain column.

Download IDs work as follows:

  • Each customer can generate several Download IDs. Only users with an active subscription can generate them.
  • Each Download ID is tied to one website. The first time the Download ID is used with a domain, that domain is saved. After that, other domains are refused. A customer with several websites needs one Download ID per website.
  • One Download ID covers all your extensions on that website.
  • You can see and manage all Download IDs under Membership Pro -> Tools -> Download ID.

To release an update, upload the new package, then change the version value in updates.xml. Customers enter their Download ID in the Download Key field of the update site (System -> Update Sites). From then on, Joomla can update the extension while their subscription is active.