I’m working on a site for a client who wants to have a client access page. He wants to be able to give a client a password where he or she will be able to review and download .jpgs and video files. How best do I accomplish this? I was thinking of creating a weblog called “clients” where he could post an entry that would contain links to the files for review/download. Then each new client would be an entry in the “clients” weblog. How do I go about limiting access to a specific entry for a specific client/member in a way that would be easy for my client to enable?
Instead of a weblog for clients, just hold them in a new ‘Clients’ member group, and only allow that group access to the template. You could also use robin’s Download Lock module tied in with the downloads weblog to ensure that only members in that group can download the files.
To restrict entries to individual members, you could ensure that the client group is in the multi-author list for that weblog, and set the intended recipient as the author, then on template use the {logged_in_member_id} variable inside the author_id=”” weblog entries parameter.
This will mean that it will ONLY show entries that the client has faux-authored, but there is nothing stopping you from adding an additional weblog entries tag with an author_id=”” parameter that is set to your clients superadmin account, that way generic downloads can be handled also.
Edit: You could even, instead of using your clients superadmin member id in this second tag, create a fake member in the clients member group called something like ‘Generic Client Download’ or something to that effect, this might be slightly easier to understand from your clients point-of-view.
Thanks for the great info. I knew there was an easier way, I’ve been wracking my brain trying to figure this out. I’ll give your ideas a shot. Thanks again!
To restrict entries to individual members, you could ensure that the client group is in the multi-author list for that weblog, and set the intended recipient as the author, then on template use the {logged_in_member_id} variable inside the author_id=”” weblog entries parameter.
This seems interesting. Could you clarify what “client group is in the multi-author list for that weblog, and set the intended recipient as the author” means? I’m not sure I know where this is located.
Well, it seems I got confused. The ‘Include user in PUBLISH page multi-author list?’ setting is actually per member, and can be found in the member administration section of the member’s preferences pane.
Since this is going to be a private feature, ticking this box for each client I don’t see being too much pain - if it was public then yes, no good.
Perhaps this should be a per group default setting also?
I believe the logic will work but now we’re running into a parse order issue. Parameters cannot contain variables unless I’m mistaking? Nothing is rendered when I use the above tag. If I hard code the member group ID, it works great, so the logic is fine. Trying to make the group_id dynamic with a variable won’t work.
I’ve tried group_id, member_id, logged_in_member_id, dynamic variables, segment variables, etc… all within group_id=”” with no luck. Since this is proving to be a parse order issue, can you think of any other solutions for limiting the weblog entries to a specific group?
Haven’t really delved into this thread so this is just off the top…
Could you append the identifier to the end of the URL (segment) and use that instead. So, if a client is logged in, all their links have their group or member id in the links.
Could you give me a high level explanation of what PHP on input is? I’m no PHP guru, but I’m finding out very quickly that I need to learn it. Is PHP on input something I could read about and implement not having the PHP knowledge that I should?
On input or output really isn’t a PHP thing, it’s strictly how EE treats, or more appropriatly, parses the PHP. It’s in the template preferences. If you need to pass a variable from some PHP to EE so it can use it, you set the preference on “input”. If on the other hand, you need the opposite, EE to pass something to PHP, you use on “output”.
Well with some trial and error I came up with this:
I used butcher’s idea about creating a member in a “client” member group, clicking the “Include user in PUBLISH page multi-author list?” for that particular member, creating a new entry and selecting the particular member in the author list. Then instead of using “{logged_in_member_id} variable inside the author_id=”” weblog entries parameter”, I just used “username=“CURRENT_USER”” parameter in the weblog entries tag in the “client_access” template group I set up to show the clients files. This template group can only be accessed by those in the “client” member group. Now when a user/client/member logs in they only see entries that are authored by the respective user/client/member. This seems to work for me pretty well. Hope this might help someone in this thread.