Page 1 of 1

Advanced downloads

PostPosted: June 5th, 2011, 4:18 pm
by mannclann
Hi,

I have been working for hours it seems trying to get this darn thing to work correctly. I have looked a posts here on the forum and still have been unable to get a download to work for "anyone," not just a member.

I have the link on a unprotected "page" on the site and I have tried both ways listed below and neither one seem to work:
Code: Select all
<a href="http://mysite.com/?s2member_file_download=filename.zip<?php echo s2member_file_download_key("filename.zip"); ?">Link Name</a>

<a href="http://mysite.com/?s2member_file_download=filename.zip&s2member_file_download_key=<?php echo s2member_file_download_key("filename.zip"); ?">Link Name</a>



The download file is in the root of the s2member-files directory.

Does anyone see anything wrong with this?

Thanks

Rick

Re: Advanced downloads

PostPosted: June 6th, 2011, 3:33 am
by Cristián Lávaque
The first one is wrong, second one is almost right: the PHP closing tag is incomplete.

Here it's fixed

Code: Select all
<a href="http://mysite.com/?s2member_file_download=filename.zip&s2member_file_download_key=<?php echo s2member_file_download_key("filename.zip"); ?>">Link Name</a>


I hope that helps. :)