Page 1 of 1
Automatic preview ?
Posted: 22 Apr 2014, 15:09
by Webbolo
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!
Re: Automatic preview ?
Posted: 25 Apr 2014, 23:36
by Jan
Hi, for now there is no such option, so this needs to be customized directly - to have such feature
Jan
Re: Automatic preview ?
Posted: 26 Apr 2014, 09:24
by Webbolo
Ok thank you!
Can you explain to me what I need to change to get a preview to download the same file? thanks
Re: Automatic preview ?
Posted: 18 Jun 2014, 10:08
by Webbolo
tell me you know the administration file with form fields?
Re: Automatic preview ?
Posted: 22 Jun 2014, 22:33
by Jan
Hi, sorry I don't understand?
Re: Automatic preview ?
Posted: 26 Jun 2014, 18:13
by Webbolo
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:
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>';
}
WITH:
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>';
// }
Bye
Re: Automatic preview ?
Posted: 27 Jun 2014, 17:14
by Jan
Ok, thank you for the guide.
Jan