display date in file view
-
- Phoca Member
- Posts: 11
- Joined: 02 Jul 2014, 17:22
display date in file view
is this somehow possible ? I have tried all settings, but no way... pls for complete tutorial if this possible. thanks
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: display date in file view
Hi, yes, date can be displayed in File view.
The date is displayed there as default, see Benno's site - File View as example:
http://www.reisefotografien.eu/download ... j25-j3-zip
Customize the output:
https://www.phoca.cz/documents/17-phoca- ... load-theme
Jan
The date is displayed there as default, see Benno's site - File View as example:
http://www.reisefotografien.eu/download ... j25-j3-zip
Customize the output:
https://www.phoca.cz/documents/17-phoca- ... load-theme
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 02 Jul 2014, 17:22
Re: display date in file view
I dont get what is on bennos site, I cant see date displayed there. But anyway I cant speak German.
I have tried to customize output, but cant find variable for date and correct line, where to insert it.
I think default.php or default_files.php in components/com_phocadownload/views/category/tmpl should be updated.
Could you pls paste me here what and where to overwrite to see date displayed in front of file name ?
thanks a lot
I have tried to customize output, but cant find variable for date and correct line, where to insert it.
I think default.php or default_files.php in components/com_phocadownload/views/category/tmpl should be updated.
Could you pls paste me here what and where to overwrite to see date displayed in front of file name ?
thanks a lot
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: display date in file view
Hi, I still don't understand you problem, it is not needed to speak German, I just wanted to display, that the date is set in File view as default, there is no need to customize something, the date is just displayed there 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 02 Jul 2014, 17:22
Re: display date in file view
hmm, but link heads to phoca deutche sprachpakete, I cant see any examples there... And default view is from my point of view without date, I see only pdf icon, pdf title and then details and download button
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: display date in file view
Are you using standard output of the component (not overwritten by template, not set in layout)?
In File view, there is:
Jan
In File view, there is:
Code: Select all
$pdFileDate = '';
$fileDate = $l->getFileDate($v->filename, $v->date);
if ($fileDate != '') {
$pdFileDate .= '<div class="pd-date-txt">'.JText::_('COM_PHOCADOWNLOAD_DATE').':</div>';
$pdFileDate .= '<div class="pd-fl-m">'.$fileDate.'</div>';
}
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 02 Jul 2014, 17:22
Re: display date in file view
Great Jan,
this is correct.
And additional question ? what is the correct code to display upload date also in plugin view ({phocadownload view=filelist|id=7|target=b|limit=10}) ?
And is there possibility to set upload date via upload page in front end ? not in administration
Thanks
Laco
this is correct.
And additional question ? what is the correct code to display upload date also in plugin view ({phocadownload view=filelist|id=7|target=b|limit=10}) ?
And is there possibility to set upload date via upload page in front end ? not in administration
Thanks
Laco
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: display date in file view
Hi, both features need to be customized:
- in plugin, the date needs to be loaded and set to html output
- in upload - the form with date needs to be set (maybe with calender) and the managing this form input needs to be set in controller and model
Jan
- in plugin, the date needs to be loaded and set to html output
- in upload - the form with date needs to be set (maybe with calender) and the managing this form input needs to be set in controller and model

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 02 Jul 2014, 17:22
Re: display date in file view
Hi, yes in plugin I set the output, but when I use $pdFileDate, I get current date, not the upload date. Which variable is correct ?
In upload, I created calendar field - but also cant find which variable should take the date (I tried $now - as I assumed it takes current time).
Can you help on it ?
In upload, I created calendar field - but also cant find which variable should take the date (I tried $now - as I assumed it takes current time).
Can you help on it ?
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: display date in file view
Hi, just print_r the variables to get information about them.
Yes, $now is the varible which get current time and add it to database:
$row->date = $now;
There are different variables for displaying date:
date, publish up, publish down, etc.
in foreach you can get the item which is an object and you can select right value form the object
Jan
Yes, $now is the varible which get current time and add it to database:
$row->date = $now;
There are different variables for displaying date:
date, publish up, publish down, etc.
in foreach you can get the item which is an object and you can select right value form the object

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