Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How to give limited access to file downloads based on file categories?
Say you have a website for a school with several courses.
Students who have attended the course X can only download files belonging to the category X; students attending Y can only download files from the category Y… and so on.
I would like to create a section with limited access, using a different password based on the relevant attended course (or something similar).
Every password should show you just the list of files pertaining to a certain category.
It’s possible?
Any suggestions?
Offline
Re: How to give limited access to file downloads based on file categories?
It can be done if you register students to txp and then use the rvm_privileged plugin which could only make the content accessible to them.
I am not sure though if the downloads can be reached to people who locate their URIs.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2015-07-03 11:08:03
- ax
- Plugin Author
- From: Germany
- Registered: 2009-08-19
- Posts: 165
Re: How to give limited access to file downloads based on file categories?
You can use the smd_access_keys plugin to generate unique download links. For example, a file download list can be generated using a specific category:
<txp:file_download_list category='<txp:category />' form="files" sort="description" wraptag="ul" break="li" limit="99" />
and the form “files” would make tokenized links, like so:
<txp:variable name="key">
<txp:smd_access_key url='<txp:file_download_link />' trigger="file_download" />
</txp:variable>
<p><a href="<txp:variable name='key' />"><txp:file_download_name title="1" /> [<txp:file_download_size format="auto" decimals="1" />]</a><br /><txp:file_download_description /></p>
Then, access to the files would only possible via the secured links in the password-protected sections.
Last edited by ax (2015-07-03 11:09:07)
Offline
Re: How to give limited access to file downloads based on file categories?
Hello ax,
Your suggestion sounds promising.
I am going to study the plugin and give it a try.
Thanks to all
P.S. Textpattern (and the community) never let you down
Offline