download image not showing

Phoca Download - download manager
grafica
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 07 Feb 2014, 15:35

download image not showing

Post by grafica »

Hi, I have some trouble displaying download's image in the front-end.
the default layout should already show it as there's the parameter for it

Code: Select all

{pdimage} {pdfile} {pdfilesize} {pdversion} {pdlicense} {pdauthor} {pdauthoremail} {pdfiledate} {pddownloads} {pddescription} {pdfeatures} {pdchangelog} {pdnotes}
{pdmirrorlink2} {pdmirrorlink1}
{pdreportlink}
{pdrating}
{pdtags}
I have set an image for the download (the default png made from the first page of the PDF) but I don't see it.

any help?

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

Re: download image not showing

Post by Jan »

Hi, which view you are setting, which Phoca Download version?

Jan
If you find Phoca extensions useful, please support the project
grafica
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 07 Feb 2014, 15:35

Re: download image not showing

Post by grafica »

Hi, thanks for reply.

Phoca Download v. 2.1.9 (I believe it's the latest).

I'm trying to configure the file list view, once you browse folders in a page created with a "Phoca Download » List Of Categories (Categories View)" menu item.
grafica
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 07 Feb 2014, 15:35

Re: download image not showing

Post by grafica »

Hi I would also like to know if it is possible to have Details printed directly below filename, and hide the "Deatils" button.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: download image not showing

Post by Jan »

Hi, testing now 2.1.9, working normally for me :idea: - did you set the image in "image" parameter in file edit?

Details below - for this you need to customize the output directly in php code :idea:

Jan
If you find Phoca extensions useful, please support the project
mentalhacker
Phoca Member
Phoca Member
Posts: 26
Joined: 14 Jun 2016, 14:28

Re: download image not showing

Post by mentalhacker »

Hi Jan,

I have the same problem with Phoca Download file images.
If I add an image to a file, it doesn't display on the website. If I add an icon, it works well (but an icon is not linked).
I use the latest version of Phoca Download (3.1.2)
The files are usually pdf files, and the first page of the pdf is converted into jpg or png, and then resized in order to use it as an icon image. I want to add these images to the Phoca Download files in file edit to use them as download images, that is, if someone clicks on them, it should be the same result as clicking on the Download button. But the images don't even show up.

Do you have any idea what the problem is?

Thanks,
mentalhacker
mentalhacker
Phoca Member
Phoca Member
Posts: 26
Joined: 14 Jun 2016, 14:28

Re: download image not showing

Post by mentalhacker »

OK, I realized that the image added to a file shows up only in the details view. (I don't use the Details button on the website but I would need linked images.)

Then I would like to post a feature request. Is it possible to add an option to icons so that the user could choose if the added icon is linked or not. The icon link may point either to direct download or to preview mode. So actually this feature means two options.

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

Re: download image not showing

Post by Jan »

Hi, image you can display in case it gets right name, see:
https://www.phoca.cz/documents/17-phoca- ... -file-name

Linking the icons - added to feature request.

Jan
If you find Phoca extensions useful, please support the project
mentalhacker
Phoca Member
Phoca Member
Posts: 26
Joined: 14 Jun 2016, 14:28

Re: download image not showing

Post by mentalhacker »

Hi Jan,

Thank you, I tried the phocathumbnail string. It works well, and it's also good for the purpose such as the main icon. But unfortunately the icons are not linked.
I tried to dive into the core files, and in default_files.php I found this (from line 51):

Code: Select all

$pdFile .= '<div class="pd-filename">'. $imageFileName['filenamethumb']
		. '<div class="pd-document'.$this->t['file_icon_size'].'" '
		. $imageFileName['filenamestyle'].'>';
														
	$pdFile .= '<div class="pd-float">';
	$pdFile .= $linkDownloadB .$l->getName($v->title, $v->filename) .$linkDownloadE;
	$pdFile .= '</div>';
The pd-float element is between $linkDownloadB and $linkDownloadE, so it is linked.
Is it possible to put the thumbnail image between $linkDownloadB and $linkDownloadE, and if yes, what is the correct syntax?

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

Re: download image not showing

Post by Jan »

Hi, see line 59 in this file, there the variable $linkDownloadB gets all the content - it is a link for download the file.
The pd-float element is between $linkDownloadB and $linkDownloadE, so it is linked
Not sure if I understand correctly? the pd-float element is not between $linkDownloadB and $linkDownloadE it is over it - if you will paste the image here, it will be a part of the link to download.

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