Forums / Setup & design / Files' published date indication

Files' published date indication

Author Message

Franck T.

Tuesday 02 May 2006 5:39:14 am

As asked in a previous topic, i'd like to remove the size indication in files view line. This is OK (thanks to Lukasz Serwatka) but now I fail adding the published date.
Here is my override of design/standard/templates/content/datatype/view/ezbinaryfile.tpl :

{section show=$attribute.content}
<a href={concat( 'content/download/', $attribute.contentobject_id, '/', $attribute.id, '/file/', $attribute.content.original_filename|urlencode)|ezurl}>{$attribute.content.original_filename|wash( xhtml )}</a>&nbsp;( {$node.object.published|l10n('shortdatetime')} )
{/section}

Let me say I way surprised to see that there was no date/time attribute for file objects (see http://ez.no/doc/ez_publish/technical_manual/3_6/reference/objects/ezbinaryfile) .
It's why I use <i>{$node.object.published|l10n('shortdatetime')}</i> but it returns: <b>( 01/01/1970 1:00 am ) </b>.
Any idea ?

Pascal France

Tuesday 02 May 2006 10:55:55 am

Hi Franck,

I did the same thing about published date with:

{$node.object.published|datetime('custom', '%l %j %F à %Hh%i' )}

and I don't know why, but I had to remove l10n operator.

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Franck T.

Wednesday 03 May 2006 12:04:32 am

Thanks Pascal, but it still returns the same date <b> 'Jeudi 1 Janvier à 01h00' </b> (french format) for <b>all</b> my files. As if the actual published date was ignored ...

Nabil Alimi

Wednesday 03 May 2006 2:54:41 am

Hi Franck,

Once "in" the override of your datatype, you no longer have <i>directly</i> access to the $node var.
Instead, you should use something like <b>{$attribute.object.published}</b> to get access to your object published date.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Franck T.

Wednesday 03 May 2006 5:19:41 am

Thanks Nabil.
Now it works fine.

Sujit Sth

Tuesday 04 January 2011 8:18:39 pm

Hi,

For published date of an article:

{$node.object.published|l10n(date)}

for all other date format click link below:

http://blog.developeronhire.com/tag/published-date/

Thank you

eZ debug

Timing: Jan 18 2025 01:14:25
Script start
Timing: Jan 18 2025 01:14:25
Module start 'content'
Timing: Jan 18 2025 01:14:27
Module end 'content'
Timing: Jan 18 2025 01:14:27
Script end

Main resources:

Total runtime1.2966 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 587.7266180.8359
Module start 'content' 0.00651.1203 768.5625646.9531
Module end 'content' 1.12680.1697 1,415.5156337.0859
Script end 1.2965  1,752.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3160210.0002
Check MTime0.00150.1163210.0001
Mysql Total
Database connection0.00110.082610.0011
Mysqli_queries1.204392.88002070.0058
Looping result0.00280.21332050.0000
Template Total1.261197.320.6305
Template load0.00220.172320.0011
Template processing1.258897.089720.6294
Template load and register function0.00020.017910.0002
states
state_id_array0.00150.112410.0015
state_identifier_array0.00130.102620.0007
Override
Cache load0.00190.1499340.0001
Sytem overhead
Fetch class attribute can translate value0.00170.130950.0003
Fetch class attribute name0.00150.116380.0002
XML
Image XML parsing0.00400.306350.0008
class_abstraction
Instantiating content class attribute0.00000.001480.0000
General
dbfile0.00670.5145330.0002
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs