File type icon frontend upload

Phoca Download - download manager
Astrid
Phoca Member
Phoca Member
Posts: 42
Joined: 19 Dec 2007, 21:10
Location: Netherlands
Contact:

File type icon frontend upload

Post by Astrid » 20 Nov 2019, 17:47

Is there a possibility to add the file type icon to the frontend list user upload? Now it only shows the filename.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41852
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File type icon frontend upload

Post by Jan » 21 Nov 2019, 22:46

Hi, not sure, If I understand what do you exactly mean?

Jan
If you find Phoca extensions useful, please support the project

Astrid
Phoca Member
Phoca Member
Posts: 42
Joined: 19 Dec 2007, 21:10
Location: Netherlands
Contact:

Re: File type icon frontend upload

Post by Astrid » 21 Nov 2019, 23:10

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.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41852
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File type icon frontend upload

Post by Jan » 22 Nov 2019, 00:28

Now I understand, unfortunately, there is no such option yes, so this needs to be customized directly in the code :-(

Jan
If you find Phoca extensions useful, please support the project

Astrid
Phoca Member
Phoca Member
Posts: 42
Joined: 19 Dec 2007, 21:10
Location: Netherlands
Contact:

Re: File type icon frontend upload

Post by Astrid » 22 Nov 2019, 10:28

Thx. At least I know now that I did not miss a setting.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41852
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File type icon frontend upload

Post by Jan » 23 Nov 2019, 21:42

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>
Image

Jan
If you find Phoca extensions useful, please support the project

Astrid
Phoca Member
Phoca Member
Posts: 42
Joined: 19 Dec 2007, 21:10
Location: Netherlands
Contact:

Re: File type icon frontend upload

Post by Astrid » 25 Nov 2019, 10:38

Thank you!

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41852
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File type icon frontend upload

Post by Jan » 02 Dec 2019, 19:00

Ok
If you find Phoca extensions useful, please support the project

Post Reply