PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Advanced downloads

s2Member Plugin. A Membership plugin for WordPress®.

Advanced downloads

Postby mannclann » June 5th, 2011, 4:18 pm

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
User avatar
mannclann
Registered User
Registered User
 
Posts: 6
Joined: August 19, 2010

Re: Advanced downloads

Postby Cristián Lávaque » June 6th, 2011, 3:33 am

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. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests

cron