Page 1 of 1

FileSize at the title

Posted: 12 May 2018, 18:52
by Nissepuk
Hello!

I would like to write the FileSize for each document behind the title - not as Popup like the original Layout. For example:

• Protokoll 2-2018 (768 kb) [Download]

I´m looking at the database - this row "filesize" at [###_phocadownload] is empty ?!?!?!

This is the code from the "com_phocadownload/views/category/default_files.php".

Code: Select all

$pdFileSize = '';
                        $fileSize = $l->getFilesize($v->filename);
                        if ($fileSize != '') {
                                $pdFileSize .= '<div class="pd-filesize-txt">'.JText::_('COM_PHOCADOWNLOAD_FILESIZE').':</div>';
                                $pdFileSize .= '<div class="pd-fl-m">'.$fileSize.'</div>';
                                $d .= $pdFileSize;
                        }
I would like to copy this part to this

Code: Select all

// pdfile
                        if ($v->filename != '') {
                                $imageFileName = $l->getImageFileName($v->image_filename, $v->filename);

                                $pdFile = '<div class="pd-filenamebox">';
                                if ($this->t['filename_or_name'] == 'filenametitle') {
                                        $pdFile .= '';
                                }

                                $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->title) .$linkDownloadE;
                                $pdFile .= '
                                </div>';
Is it possible?

Best whises
Nissepuk

Re: FileSize at the title

Posted: 14 May 2018, 22:36
by Jan
Hi, you can copy it everywhere you need but you need to be in the foreach of the files so the variables exist :idea:

Jan