This is method 3 to offer downloads to your members. There are two other methods you may wish to use. You can view them all and decide which is best for your particular needs.
Method 3: Extra Files Method - creating your own links
This method is completely different to methods 1 and 2, and is designed for those times when don't want to add all of your downloads as new products in DLGuard.
For example, you may have so many files that you don't want to spend time adding them all to DLGuard, or you may simply want to offer specific download links for certain files, or just wanted to add a quick download link.
Basically the way this method works is you specify a folder in DLGuard where you'll keep all of the files you're offering for download, and you then simply create your own download links, specifying the file to be downloaded in the actual link.
Firstly, we need to set up the Extra File details in your Edit Group page.
In DLGuard, go to the "Memberships" tab, and click on the name of the group you're dealing with.
Near the bottom of the screen is the "Extra File Download Details" section.
There are two boxes to fill out:
Folder where extra download files are kept: In this box, enter the URL to where you'll be keeping your files on your website. Make sure the folder name is a randomly generated name, such as: "j4rhui4ostsda"
That will stop people guessing the file location.
(Advanced Users: For extra security, you can use your hosting control panel to put a password on the folder where you'll keep your downloads)
For example: http://www.example.com/j4rhui4ostsda/
This folder needs to be on the same website as DLGuard.
The next box is labelled:
File extensions allowed for extra download files: This allows you to specify which kinds of files your customers are allowed to download. You add as many as you like, seperating them with commas.
So for example, if you're offering some ZIP downloads, as well as a few PDF ebooks, then you'd enter: zip,pdf
Make sure you don't add file extensions that could pose a security risk, such as "php", for example. DLGuard will automatically block attempts to download files from other folders, so only the files in the folder you specify will be accessible.
Save your Group.
Next, open one of your membership pages in your website editing software (or whatever you use to edit and create your web pages).
On the page where you wish to add a download link, paste this code into the Source Code view (ie. the view where you can see all of the HTML code):
<a href="<?php echo $pathToDLG;?>members/getfile.php?f=file.zip">Download File</a>
Notice in the middle of this link: f=file.zip
This is how you specify which file will be downloaded. You can change file.zip to any other file that you have uploaded into the folder you specified on the Edit Group page above.
So for example, if you have a file in there called myebook.pdf, to create a link for that you'd use:
<a href="<?php echo $pathToDLG;?>members/getfile.php?f=myebook.pdf">Download File</a>
The change above is coloured in black, so you can easily see it.
Save your file, and upload it to your website.
Login to your membership area, and view this page. You will now see a download link for your "myebook.pdf" file.
You can create as many links like this as you wish, and you can paste them anywhere inside your members area.