Page 1 of 1

How to link download file on the picture ?

Posted: 25 Oct 2018, 11:36
by AlainR
Hello.
I set up your component on a new site and, with every document to download (PDF), we added an image.
The users, seeing the image, have the reflex to click above to download the document. So, I looked at the code, but I do not how see returning this clickable image towards the download, e.g. as a replacement of the download button.

Could you help me, please?
Thank you in advance.
Best regards

Re: How to link download file on the picture ?

Posted: 25 Oct 2018, 14:09
by Jan
Hi, sorry, not sure If I understand correctly. What you exactly mean with "So, I looked at the code, but I do not how see returning this clickable image towards the download, e.g. as a replacement of the download button."?

Jan

Re: How to link download file on the picture ?

Posted: 25 Oct 2018, 14:18
by AlainR
How to add picture ?
Here vous are : https://framapic.org/DEzpHtWezHUi/xieoTBhYmVCB.png

PhocaDownload allows to show a button of download and a link of download on the title or the name of the document.

When I added a file, I also assigned a picture.
How to return this clickable image? (in French, because I don't know if translation is correct : Comment rendre cette image cliquable ?)

Re: How to link download file on the picture ?

Posted: 25 Oct 2018, 14:41
by Jan
Hi, there is no such option, so this needs to be directly modified in the php code :idea:
Depends on if the button is displayed with component or plugin, depend on in which view it is displayed.

Jan

Re: How to link download file on the picture ?

Posted: 25 Oct 2018, 15:19
by AlainR
OKay, thank you, I'll see & try.
It's on a category view.

Re: How to link download file on the picture ?

Posted: 25 Oct 2018, 16:27
by AlainR
Top! I create a template substitution and change line 202 in /html/com_phocadownload/category/default_files.php file with :

Code: Select all

$pdImage .= '<div class="pd-image">'.$linkDownloadB.$l->getImageDownload($v->image_download).$linkDownloadE.'</div>';

Re: How to link download file on the picture ?

Posted: 26 Oct 2018, 14:28
by Jan
Ok, great to hear it.

Jan