[SOLVED] FEU - Unique File Download per User
-
mr.bacan
[SOLVED] FEU - Unique File Download per User
Hi everyone, I'll try to explain what I need to accomplish. I have a list of 700+ users in FEU, each of them has their own unique access. They need to be able to download a personalized Participation Certificate PDF. So what I need is to have a download page featuring a certificate for the logged user.
Is there a way to automate this?
I'm using:
CMSMS 1.11.6
CustomContent 1.6
FEU 1.21.15
CGExtensions 1.33
Thanks in advance for any help on this.
Is there a way to automate this?
I'm using:
CMSMS 1.11.6
CustomContent 1.6
FEU 1.21.15
CGExtensions 1.33
Thanks in advance for any help on this.
Last edited by mr.bacan on Tue Aug 20, 2013 12:31 am, edited 1 time in total.
Re: FEU - Unique File Download per User
Are the files named as the FEU, or maybe you can use a new field in FEU to have the same name as user or a unique name for it and the user then add that filed as part of the link to it...
Re: FEU - Unique File Download per User
Dear mr.bacan,
Seems like a lot of work and i haven't done this myself yet but... you should be able to directly generate custom PDF's containing the FEU user's information by creating a UDT that generates the PDF's using http://www.fpdf.org/
http://www.techrepublic.com/article/gen ... -and-fpdf/
Or (again, untested...)
You could generate regular pages they can print or export as PDF using something like http://code.google.com/p/wkhtmltopdf/
Greetings,
Manuel
Seems like a lot of work and i haven't done this myself yet but... you should be able to directly generate custom PDF's containing the FEU user's information by creating a UDT that generates the PDF's using http://www.fpdf.org/
http://www.techrepublic.com/article/gen ... -and-fpdf/
Or (again, untested...)
You could generate regular pages they can print or export as PDF using something like http://code.google.com/p/wkhtmltopdf/
Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
-
mr.bacan
Re: FEU - Unique File Download per User
Thank you both for you replies. I'm not a programmer, and your PDF solution would be great Manuel, but I'll need expert assistance to accomplish that.
Meanwhile what I've tried is generating each certificate with an ID, ex. certificate-1.pdf, certificate-2.pdf, etc, in which the number is the user ID. So I've tried this: But no matter which user is logged in, it always put 1 as the ID. Obviously I'm not getting the user ID right, but I have no idea how to do that.
Do you have any ideas?
Thanks again.
Meanwhile what I've tried is generating each certificate with an ID, ex. certificate-1.pdf, certificate-2.pdf, etc, in which the number is the user ID. So I've tried this:
Code: Select all
{$feu_smarty->get_user_properties($uid,'uinfo')}
<a href="uploads/certificates/cert-{$uinfo|@print_r}.pdf">Download Certificate</a>Do you have any ideas?
Thanks again.
Re: FEU - Unique File Download per User
Do you have {FEU} in that page anywhere else, there is a call for it that has silent as part of the parameter in help that may help you, also try {get_template_vars} to see if uid is available...
-
mr.bacan
Re: FEU - Unique File Download per User
Thanks. I've used the {get_template_vars} and there's no uid nor any user id available. No matter which user is logged in, the info is all the same, so there's no way to have a unique idDr.CSS wrote:Do you have {FEU} in that page anywhere else, there is a call for it that has silent as part of the parameter in help that may help you, also try {get_template_vars} to see if uid is available...
Re: FEU - Unique File Download per User
You checked the Help for {FEU action=silent}..?
-
mr.bacan
Re: FEU - Unique File Download per User
I did and it's {FrontEndUsers form="silent"} but it doesn't throw any results. I then tried {FrontEndUsers action='viewuser'} and it shows the user id, name, email, etc. but as a whole so I have no idea how to get just the id.Dr.CSS wrote:You checked the Help for {FEU action=silent}..?
Re: FEU - Unique File Download per User
It doesn't throw any results... thats what silent mean... however:mr.bacan wrote:I did and it's {FrontEndUsers form="silent"} but it doesn't throw any results. I then tried {FrontEndUsers action='viewuser'} and it shows the user id, name, email, etc. but as a whole so I have no idea how to get just the id.Dr.CSS wrote:You checked the Help for {FEU action=silent}..?
if you try a {get_template_vars} right after you will have something to work with. For instance you'll notice that the feu_smarty object is listed. if you use {$feu_smarty|@print_r} while logged in on the Frontend you will have a long list of properties and methods (actually the whole FEU module as an object can be accessed this way).Help wrote:silent = Display nothing, but export properties and other smarty variables for the currently logged in user. If no user is logged in, then no variables are exported.
However, I usually find that using the CustomContent module is usually easier, for a not too advanced use, and gives a lot of control on FEU and FEU specific content.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
-
mr.bacan
Re: FEU - Unique File Download per User
Thanks Jo Morg. I'm sorry for being such a neophyte in this matter, but you led me to a solution that seems to work, at least temporarily.
What I did is:And now I can have each user's PDF stored on a folder and call just the logged user's file.
I know is not the perfect solution but it works right now. I'm planning to work with a programmer to develop Manuel's solution, so that way you can automate the whole process.
Thanks all for your advices.
What I did is:
Code: Select all
{FrontEndUsers form='silent'}
<a href="uploads/cert/cert-{$userid}.pdf">Download PDF</a>I know is not the perfect solution but it works right now. I'm planning to work with a programmer to develop Manuel's solution, so that way you can automate the whole process.
Thanks all for your advices.



