Combine FEU and downloadmanager [solved]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
vhaakman
Forum Members
Forum Members
Posts: 35
Joined: Fri Oct 05, 2012 7:59 am

Combine FEU and downloadmanager [solved]

Post by vhaakman »

Hi there,

I want to use downloadmanager in combination with FEU, so that a logged in person gets his own downloads. I mean personal files here, which may vary per user.

Now this - I think - isnt possible out of the box. If I give each user his own group within FEU, it seems possible, but besides that's not really wanted, it shows all files to all, the restriction is you can only download it, if it's yours. I don't want the others to see it.

So I thought of this. What if I make a field in FEU, the value I give that field, will be the same as the categoriename in Downloadmanager. That would solve it, and make a nice clean solution.

The only thing is, how do I call Downloadmanager from a page, so it shows the category equal to the value in the field of the logged in user?

Any help would be very much appreciated. Other working solutions are very welcome as well.

Thanks, Vincent
Last edited by vhaakman on Wed Apr 17, 2013 9:58 pm, edited 1 time in total.
vhaakman
Forum Members
Forum Members
Posts: 35
Joined: Fri Oct 05, 2012 7:59 am

Re: Combine FEU and downloadmanager

Post by vhaakman »

So what I want is something like this:

{cms_module module='DownloadManager' alias='$smarty->get_template_vars('username')'}

So I wrote a utd like this:

$username = $smarty->get_template_vars('username');
$smarty->assign('username', $username);

and placed this on my page:

{get_user_email}
{$username}
{cms_module module='DownloadManager' alias=$username}

Next to that I made a categorie with the emailaddres of the user.

The result is Downloadmanager stating that there is no such categorie, and above that the emailaddres, which is the same as the categoryname. So the UTD works. How to get alias to work?

Any help would be appreciated.
vhaakman
Forum Members
Forum Members
Posts: 35
Joined: Fri Oct 05, 2012 7:59 am

Re: Combine FEU and downloadmanager

Post by vhaakman »

Found the solution, in the alias the @ and . were replaced by -
Did the same in UDT, and it works:

$username = $smarty->get_template_vars('username');

$username = str_replace("@", "-", $username);
$username = str_replace(".", "-", $username);

$smarty->assign('username', $username);

Hope this helps someone else as well.
Post Reply

Return to “Modules/Add-Ons”