How to link download file on the picture ?

Phoca Download - download manager
AlainR
Phoca Enthusiast
Phoca Enthusiast
Posts: 52
Joined: 24 Jul 2018, 16:33

How to link download file on the picture ?

Post 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

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

Re: How to link download file on the picture ?

Post 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
If you find Phoca extensions useful, please support the project
AlainR
Phoca Enthusiast
Phoca Enthusiast
Posts: 52
Joined: 24 Jul 2018, 16:33

Re: How to link download file on the picture ?

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

Re: How to link download file on the picture ?

Post 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
If you find Phoca extensions useful, please support the project
AlainR
Phoca Enthusiast
Phoca Enthusiast
Posts: 52
Joined: 24 Jul 2018, 16:33

Re: How to link download file on the picture ?

Post by AlainR »

OKay, thank you, I'll see & try.
It's on a category view.
Last edited by AlainR on 25 Oct 2018, 16:27, edited 1 time in total.
AlainR
Phoca Enthusiast
Phoca Enthusiast
Posts: 52
Joined: 24 Jul 2018, 16:33

Re: How to link download file on the picture ?

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

Re: How to link download file on the picture ?

Post by Jan »

Ok, great to hear it.

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