Cristián Lávaque wrote:That's a file uploader that is not part of s2Member, so you'll need to customize it to integrate with s2Member's file protection. First learn how to protect files with s2Member without that uploader, so you learn it well, then you'll know what the uploader would need to do so the files are protected.
Jason created a video explaining download protection, but new features were added since, so I recommend you read all the documentation on it too.
http://www.s2member.com/file-download-options-video/WP Admin -> s2Member -> Downloads Options
WP Admin -> s2Member -> API / Scripting -> Custom Capability & Member Level FilesI hope that helps.
Hi Christian,
I have studied all the documentation and have no problems creating the custom capabilities and download protections for individual members manually.
So if it was just me adding files for the students on their own individual pages I'd have no problems protecting these files for individuals on the same level - in this case level 2.- and inserting a download link like this:
<a href="http://mysite.com/?s2member_file_download=reports-mike.pdf&
s2member_file_download=<?php echo s2member_file_download_key("reports-mike.pdf"):?>">Download
reports-mike.pdf</a>
As I need the facility for teachers to upload files to individual students I am wondering if there is some sort of hook I can use to assign the uploader to a specific account within:
Sub-Directory: /s2member-files/access-s2member-level2/school-reports/username/
Currently I have the short codes set for the front end uploader in the template page "Portal-For"
[ffm-upload]
[ffm-list type=any count=10 parent=null downloadable=true pagination=bottom]`
and;
[ffm-upload] is set to upload to: /wp-content/plugins/s2member-files/access-s2member-level2/school-reports/username/
I have given all the level2 students ccap "school-reports"
The only way I can see to direct the uploader to a specific username is within the file being uploaded ie;
mike.pdf, mike.jpg, mike.zip etc.
The uploader has a category dropdown box which I have set to "school-reports"
So I need to set up something that will direct the front end uploader to upload to "username.*file" within the protected directory?
Or another option is for s2member to only permit file downloads that were uploaded from a particular users portal.
In other words the teacher can only upload files from within the students portal and only that student out of all the level2 students with ccap "school_reports" can view their own files.
I feel it just needs a hack, hook or filter - that is out of my scope.
I would be happy to pay for your help on this - truly desperate - hope you can help.
Cheers,
Kitty.