Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Due to public holidays and vacations, longer response times can be expected for inquiries in the forum between May 18, 2024 and June 2, 2024.

how to create download link

More
10 years 8 months ago #188 by toonytoony2004
how to create download link was created by toonytoony2004
how to create download link from file?

when i create form and use file upload field in my form . i test upload file and show all detail by use module. the module show all detail and show file uploaded.

how to create download link from file that i uploaded, Because the file can show path store only.

Thanks

A Friend Never Forget

More
10 years 8 months ago #189 by Administrator AV
Replied by Administrator AV on topic Re:how to create download link
Hi,

the upload field is meant to give the user of your website the opportunity to upload a file with the form (to attach a document). This uploaded file is just for you, the administrator of the website. Therefore there is no download link in the detail view, but just a path. And the admin would download the files via ftp.

Why do you want to create a download link? Which type of documents are uploaded to your website. Maybe there is an other solution for the download.

Maybe I can change that in the next revision, but I will have to think about security risks first.

Kind Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
10 years 8 months ago #190 by toonytoony2004
Replied by toonytoony2004 on topic Re:how to create download link
Thank you Very much Administrator ..


For idea to create like file uploaded..

In my case, i want to show the report to the teacher with link for download file

The files are PDF files and it 's my report

:) :) :) :)

A Friend Never Forget

More
10 years 8 months ago #191 by Administrator AV
Replied by Administrator AV on topic Re:how to create download link
Hi,

insert in file yourWebsite/components/com_visforms/views/visformsdata\tmpl/detail.php after

if ($rowField->typefield == 'text') {
if ($t_texttype == 'email') {
$texte = '<a href="mailto:'.$texte.'">'.$texte.'';
}
}

(it's about line 80)
the following code

if ($rowField->typefield == 'fileupload') {
$base = JPATH_BASE . DS;
$base = explode('\\', $base);
$path= implode('\\\\', $base);
$pattern = '#' . $path . '#';
$texte = preg_replace( $pattern, JURI::base(), $texte);
$texte = preg_replace ('#\\\\#', '/', $texte);
$texte = '<a href="'.$texte.'" target="_blank">'.$texte.'</a>';
}

If you are not familiar with this, please send me your e-mail adress (my adress is below the forum) and I can send you the changed file.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
10 years 8 months ago #192 by toonytoony2004
Replied by toonytoony2004 on topic Re:how to create download link
:) :) :)

Oh thank you very much. it's wonderful, I add code and it's work.

Thanks again and love Visforms so much. :) :) :) :)

Toon,
Bangkok, Thailand

A Friend Never Forget

More
10 years 6 months ago #268 by Sienco
Replied by Sienco on topic Re:how to create download link
Hi, is there a way to remove the upload path from displaying in the email? The file is automatically attached to the email, so I'd rather hide the upload path from the email for better security, is this possible?

I have checked the com_visforms/views/visformsdata/tmpl/details.php as described as part of the solution for turning the path to a downloadable link, but cannot find the defined path in this file.

Thanks

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum