rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: ipaidthebills on April 23, 2009, 04:47:04 PM

Title: PLS Help with "Real Folder Restrictions!"
Post by: ipaidthebills on April 23, 2009, 04:47:04 PM
OK Here is my example!
Currently I have a Download folder "CREATED AS "REAL FOLDER"!",
There are multiple sub directories that I wish to make Available.
My problem is- I'd like the contents viewable for all to browse,

 BUT I wish to "LOCK" Specific folder(s) So only Registered users can download the contents, Yet allowing ALL USERS to at least VIEW the contents.

Did I just Confuse the hell outta ya??? :'(
"ULTIMATE GOAL"= My intention is to make everything viewable but make specific downloads Require log in!

Thanks in advance for any suggestions ;D
Title: Re: PLS Help with "Real Folder Restrictions!"
Post by: bacter on April 23, 2009, 08:55:35 PM
if you understand by 'making viewable' that you only want to show the filenames, disable in the file-section the links with plain text, with  macros:

before: 

<a href=%item-url%">   . . .   </a>

with macro that creates link only if user is logged in:

{.if|%user%|{:<a href=%item-url%">:}.} . . . {.if|%user%|{:<a>:}.}

So downloadlink is only created when user is logged in.
Title: Re: PLS Help with "Real Folder Restrictions!"
Post by: rejetto on April 24, 2009, 01:20:27 AM
at the moment bacter's solution is good.
in the future i will differentiate the "access" permission in "list" and "download", as for seeing the filename, and downloading the file.
so you would be able to give "list" to "anyone", and "download" permission to "any account".