Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra login checkbox #20

Open
funkyduke opened this issue Dec 26, 2020 · 2 comments
Open

Extra login checkbox #20

funkyduke opened this issue Dec 26, 2020 · 2 comments

Comments

@funkyduke
Copy link

Hey Vitaly,

I hope you understand English. I do not speak Russian.

I have made a small adjustment to FileAttach Modx and I think it’s a great added value to the tool. Can you please consider in implementing it?

I wanted to transform the tool so that the admin can choose if a file is public or not. So I made an extra checkbox “login”. (see screenshot below, “Aanmelden” is Dutch for login)

When the box is checked there’s a message on the website that only logged in people can see it. (see screenshot below)

In combination with the addon Personalize the admin can check if the document can be showed or not (other ways are also possible of course):

[[!Personalize? &yesChunk=`fileprivate` &noChunk=`filenormal`]]
[[+login:eq=`1`:then=`html-code`]]

The new code: FileAttach-26-12-2020-extra-login-checkbox.zip

Another suggestion would be to ad a date-picker, to show the customer how old the document is (instead of upload date). Now I have used the tag-field for that.

afbeelding
afbeelding
afbeelding

@13hakta
Copy link
Owner

13hakta commented Jan 22, 2021

Hello. Extension implements public/private mode for files. For private modes you may set access with specified user groups, which for sure requires user registration.
For adding auth message you may use conditional markup on your page, kind of:
[[!+modx.user.id:isloggedin:is=1:then=[[!FileAttach]]:else=<p>Please login to view files</p>]]

Please describe scenarios in which addition would be useful.

@funkyduke
Copy link
Author

funkyduke commented Jan 24, 2021

There are a lot of scenarios where my update would be useful. The most important is to show the list of downloads, but make it only downloadable if you are logged in. The way you suggest just hides the files complete, but I want to show them to the customer in a list, just like you see in my third screenshot. Another advantage is that I can mix up files that are OK for free download and others you need to login for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants