File type icon frontend upload

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

File type icon frontend upload

Post by Astrid »

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

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

Re: File type icon frontend upload

Post by Jan »

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

Jan
If you find Phoca extensions useful, please support the project
Astrid
Phoca Enthusiast
Phoca Enthusiast
Posts: 50
Joined: 19 Dec 2007, 21:10
Location: Netherlands
Contact:

Re: File type icon frontend upload

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File type icon frontend upload

Post by Jan »

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 Enthusiast
Phoca Enthusiast
Posts: 50
Joined: 19 Dec 2007, 21:10
Location: Netherlands
Contact:

Re: File type icon frontend upload

Post by Astrid »

Thx. At least I know now that I did not miss a setting.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File type icon frontend upload

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

Jan
If you find Phoca extensions useful, please support the project
Astrid
Phoca Enthusiast
Phoca Enthusiast
Posts: 50
Joined: 19 Dec 2007, 21:10
Location: Netherlands
Contact:

Re: File type icon frontend upload

Post by Astrid »

Thank you!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File type icon frontend upload

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: File type icon frontend upload

Post by Jan »

If you find Phoca extensions useful, please support the project
Astrid
Phoca Enthusiast
Phoca Enthusiast
Posts: 50
Joined: 19 Dec 2007, 21:10
Location: Netherlands
Contact:

Re: File type icon frontend upload

Post by Astrid »

Thx!
Post Reply