Hi,
In the Icon field you can use "phocathumbnail-" string so the system knows that it's not an icon next to the file but an image thumbnail above the file name.
Is it possible to separate the functions with two different fields in the backend? One for the main icon and one for the thumbnail image?
In this case there would be no need to insert the string. There can be websites that contain several hundreds of downloadable files with thumbnail images. Renaming each files and copying the string into each file name can be very frustrating and annoying. A separate function with its own field would be a neat solution.
Thanks a lot.
Best regards,
mentalhacker
Main icon and thumbnail image
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Main icon and thumbnail image
Hi, there is an "image" field so you can use the image field for this 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 26
- Joined: 14 Jun 2016, 14:28
Re: Main icon and thumbnail image
Yes, there is an image field, but that image is only displayed in the details view when you hover the mouse over the Detail button. Unfortunately that is not a permanent thumbnail image. Or do I use this field in the wrong way?
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Main icon and thumbnail image
See, you can display images or YouTube videos in file list (category view):
https://www.phoca.cz/joomlademo/phoca-download-youtube
Jan
https://www.phoca.cz/joomlademo/phoca-download-youtube
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 26
- Joined: 14 Jun 2016, 14:28
Re: Main icon and thumbnail image
Hey, did I miss something?
Did you use only the Image field on this demo page, and you didn't use the Icon field with the 'phocathumbnail-' string?
If yes, I'm a bit confused because I've read all the documentation, and in 3.1.2 the only option to display thumbnail image is using the Icon field with 'phocathumbnail-' string before the file name. Using the Image field for this purpose doesn't work.
If it works for thumbnails, it's fantastic,
but please help, how to use it properly?
Thanks a lot,
mentalhacker
Did you use only the Image field on this demo page, and you didn't use the Icon field with the 'phocathumbnail-' string?

If yes, I'm a bit confused because I've read all the documentation, and in 3.1.2 the only option to display thumbnail image is using the Icon field with 'phocathumbnail-' string before the file name. Using the Image field for this purpose doesn't work.


Thanks a lot,
mentalhacker
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Main icon and thumbnail image
Hi, on the site, the layout is build with the layout, so the image is added to the site with the layout.
You can even customize it per template or in default view, the image is in this variable:
components\com_phocadownload\views\category\tmpl\default_files.php
Jan
You can even customize it per template or in default view, the image is in this variable:
Code: Select all
if ($v->image_download != '') {
echo '<div class="pd-image">'.$l->getImageDownload($v->image_download).'</div>';
}
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 26
- Joined: 14 Jun 2016, 14:28
Re: Main icon and thumbnail image
Hi Jan,
Thanks for the code. It works, but it needed some modifications because in this form the image is displayed outside the filenamebox. When I put it inside the filenamebox, the image is displayed perfectly. I used this code:
This part contains both main icon with 'phocathumbnail-' string and thumbnail image using 'Image' field. The editor can choose which he/she wants to use for displaying an image. Both types of image are linked.
Thanks a lot,
mentalhacker
Thanks for the code. It works, but it needed some modifications because in this form the image is displayed outside the filenamebox. When I put it inside the filenamebox, the image is displayed perfectly. I used this code:
Code: Select all
$pdFile .= '<div class="pd-filename">' .$linkDownloadB . $imageFileName['filenamethumb'] .'</div>' .$linkDownloadE
. '<div class="pd-image">' .$linkDownloadB .$l->getImageDownload($v->image_download) .'</div>' .$linkDownloadE
. '<div class="pd-document'.$this->t['file_icon_size'].'" '
. $imageFileName['filenamestyle'].'>';
Thanks a lot,
mentalhacker
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Main icon and thumbnail image
Ok
If you find Phoca extensions useful, please support the project