Automatic preview ?
-
- Phoca Newbie
- Posts: 6
- Joined: 22 Apr 2014, 15:05
Automatic preview ?
Hello and congratulations for this useful component. I wanted to ask if I set the preview image automatically with the same picture of the download. Having many images is not easy to set them all one at a time, thank you!
- Jan
- Phoca Hero
- Posts: 48568
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Automatic preview ?
Hi, for now there is no such option, so this needs to be customized directly - to have such feature 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 22 Apr 2014, 15:05
Re: Automatic preview ?
Ok thank you!
Can you explain to me what I need to change to get a preview to download the same file? thanks
Can you explain to me what I need to change to get a preview to download the same file? thanks
-
- Phoca Newbie
- Posts: 6
- Joined: 22 Apr 2014, 15:05
Re: Automatic preview ?
tell me you know the administration file with form fields?
- Jan
- Phoca Hero
- Posts: 48568
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Automatic preview ?
Hi, sorry I don't understand?
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 22 Apr 2014, 15:05
Re: Automatic preview ?
Hi,
I found the solution.
With this change, If you upload a file in the Specific Icon1, the system loads the specific icon1 that you put in field.
If you have not entered any icon Specification file1, the system inserts the file preview... the "specific icon1" will always be equal to the file preview.
In the code bottom, I have eliminated the icon specific2.
The insert if it helps someone:
File: components/com_phocadownload/views/category/tmpl/default_files.php
Change line 62:
WITH:
Bye
I found the solution.
With this change, If you upload a file in the Specific Icon1, the system loads the specific icon1 that you put in field.
If you have not entered any icon Specification file1, the system inserts the file preview... the "specific icon1" will always be equal to the file preview.
In the code bottom, I have eliminated the icon specific2.
The insert if it helps someone:
File: components/com_phocadownload/views/category/tmpl/default_files.php
Change line 62:
Code: Select all
//Specific icons
if (isset($v->image_filename_spec1) && $v->image_filename_spec1 != '') {
$pdFile .= '<div class="pd-float2">'.$l->getImageDownload($v->image_filename_spec1).'</div>';
}
if (isset($v->image_filename_spec2) && $v->image_filename_spec2 != '') {
$pdFile .= '<div class="pd-float2">'.$l->getImageDownload($v->image_filename_spec2).'</div>';
}
Code: Select all
if (isset($v->image_filename_spec1) && $v->image_filename_spec1 != '') {
$pdFile .= '<div class="pd-float2">'.$l->getImageDownload($v->image_filename_spec1).'</div>';
}
else if (isset($v->filename_preview) && $v->filename_preview != '') {
$filePath = PhocaDownloadPath::getPathSet('filepreview');
$filePath = str_replace ( '../', JURI::base(true).'', $filePath['orig_rel_ds']);
$previewLink = $filePath . $v->filename_preview;
$pdFile .= '<div class="pd-float2"><img src="'.$previewLink.'"> </div>';
}
//if (isset($v->image_filename_spec2) && $v->image_filename_spec2 != '') {
// $pdFile .= '<div class="pd-float2">'.$l->getImageDownload($v->image_filename_spec2).'</div>';
// }
- Jan
- Phoca Hero
- Posts: 48568
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Automatic preview ?
Ok, thank you for the guide.
Jan
Jan
If you find Phoca extensions useful, please support the project