-
- 3 Posts
Hello All,
I have a question and I am new to MODx so here it goes. I have a site that was developed for a client. In the site there are multiple links to download PDFs (assets/downloads/pdfs) across a wide range of pages. The client wants to set it up so when a user clicks to download the PDF he/she gets a simple form with a login, password, and email. After the form is completed they will be redirected to the PDF they were going after. Or at the very least be redirected back to the page they were on and allowed to then download the file. What is the best way to go about this? I have searched around and have seen a couple answers but have not found anything definitive. I would really like to implement one login page that would work dynamically for all the PDFs in the site.
I only want the user to have to fill out the form once, and then from there they can download as many files as they want. Any help would be greatly appreciated. THANKS!
-
- 24,544 Posts
I think your best bet is to make all the download links mini-forms (they don't have to look like forms). They would have a hidden field with the name of the PDF file (but not it's real path). The form's action would be the URL of a generic download page containing a snippet tag.
The snippet would check the user's login status. If logged in and qualified, the snippet would calculate the real URL (perhaps with a secret key appended) and they'd be instantly forwarded to the true URL of the download page (maybe a static resource with a link to the PDF file).
If they were not logged in, they'd see a login form and/or a link to a register form page.
I don't know if you want to set a cookie to let people be permanently logged in or not.
You might take a look at the Subscribe extra. I'm not sure if it would meet your needs or not.
You would do better to either
1. Post your questions in English
2. Post in the Russian-language section of the forums - look in "MODx Around the World".
-
- 211 Posts
valeras10, your pages are missing the head section, so there is no css file...
Check your templates.
-
- 2 Posts
hello to all,
iam rajneesh tripathi. newbie here from india
-
- 1 Posts
Hello,
My ongoing issue is my Wordpress websites are unable to connect to the FTP server.
Getting this error:- ftp.###.co.nz:21 when trying to connect to FTP.
Thanks in advance,
Tyler
[ed. note: markh last edited this post 10 years ago.]
-
- 14 Posts
Double check your ftp details with your hosting people or in your control panel if you have one with them and try again.
If you still have problems:
Can you elaborate I bit more on the error message?
What ftp client are you using or are you trying this from Wordpress backend?
[ed. note: MorneB last edited this post 10 years, 1 month ago.]
-
- 1 Posts
Hi...I'm new to MODx. Can modx work with costume APIs. For example...member login from a API. If so can you please direct me to a article or tutorial were I can read about it.