Page 1 of 1
File type icon frontend upload
Posted: 20 Nov 2019, 17:47
by Astrid
Is there a possibility to add the file type icon to the frontend list user upload? Now it only shows the filename.
Re: File type icon frontend upload
Posted: 21 Nov 2019, 22:46
by Jan
Hi, not sure, If I understand what do you exactly mean?
Jan
Re: File type icon frontend upload
Posted: 21 Nov 2019, 23:10
by Astrid
When frontend upload is enabled and user chooses a category a list of files is shown (if he has already uploaded files in that category). I would like to see the file type icon (pdf, xls etc.) before or after the filename.
Re: File type icon frontend upload
Posted: 22 Nov 2019, 00:28
by Jan
Now I understand, unfortunately, there is no such option yes, so this needs to be customized directly in the code
Jan
Re: File type icon frontend upload
Posted: 22 Nov 2019, 10:28
by Astrid
Thx. At least I know now that I did not miss a setting.
Re: File type icon frontend upload
Posted: 23 Nov 2019, 21:42
by Jan
Hi, this can be customized in the code:
components\com_phocadownload\views\user\tmpl\default_files.php
FROM:
Code: Select all
<td><?php echo $row->title;?> </td>
TO:
Code: Select all
<td><?php
$icon = PhocaDownloadFile::getMimeTypeIcon($row->filename);
echo $icon . ' ' . $row->title;?> </td>
Jan
Re: File type icon frontend upload
Posted: 25 Nov 2019, 10:38
by Astrid
Thank you!
Re: File type icon frontend upload
Posted: 02 Dec 2019, 19:00
by Jan
Ok
Re: File type icon frontend upload
Posted: 17 Apr 2020, 22:38
by Jan
Re: File type icon frontend upload
Posted: 17 Apr 2020, 22:49
by Astrid
Thx!