Hi,
I want add to "Thumbnail's page", the following display order: Thumb image + Image name + Creation Date.
I've made changes to the "thumbnails.tpl" file adding this code:
<span class="thumbLegend">
<span class="thumbName">{$thumbnail.FILE_CREATED}
{if isset($thumbnail.NAME)}{$thumbnail.NAME}<br />{'Created on'|@translate}{/if}</span>
But, doesn't show the date, only text (see attachment).
What changes should i do to resolve this issue?
Piwigo version: 2.5.3
PHP version: 5.3.3
MySQL version: 5.1.71
Piwigo URL: http://localhost...
Last edited by rfreitaz (2014-02-18 13:45:55)
Offline
Hi
where did you get "FILE_CREATED" ?
it's "date_creation" (lower case)
ps: of you are building your site you should use the last version of Piwigo
Offline
mistic100 wrote:
Hi
where did you get "FILE_CREATED" ?
it's "date_creation" (lower case)
ps: of you are building your site you should use the last version of Piwigo
I made the change, like you said, and works fine.
But, creates a new "issue", because is displaying the date and time that photo was taken, but I'd like to add only the date, without hour.
How can i do this? Can you help me with this?
PS: I'm not using the last Piwigo version, because the most extensions i need aren't compatible.
Thank you mistic100
Last edited by rfreitaz (2014-02-18 14:11:25)
Offline
you will have to use Smarty featrues http://www.smarty.net/docs/en/index.tpl like http://www.smarty.net/docs/en/language. … uncate.tpl for instance
Offline
flop25 wrote:
you will have to use Smarty featrues http://www.smarty.net/docs/en/index.tpl like http://www.smarty.net/docs/en/language. … uncate.tpl for instance
Can you help me work with Smarty in this case?
Offline
hello
you can try this
i store in the variable creat_dat
substr will extract from the caracter 0 to 10 from the date and time text
after i use the variable in the html
<span class="thumbLegend">
{assign var="creat_dat" value=$thumbnail.date_creation|substr:0:10}
<span class="thumbName">{$creat_dat}
{if isset($thumbnail.NAME)}{$thumbnail.NAME}<br />{'Created on'|@translate}{/if}</span>
patounet37 wrote:
hello
you can try this
i store in the variable creat_dat
substr will extract from the caracter 0 to 10 from the date and time text
after i use the variable in the html
<span class="thumbLegend">
{assign var="creat_dat" value=$thumbnail.date_creation|substr:0:10}
<span class="thumbName">{$creat_dat}
{if isset($thumbnail.NAME)}{$thumbnail.NAME}<br />{'Created on'|@translate}{/if}</span>
<span class="thumbLegend">
<span class="thumbName">{$thumbnail.date_creation|substr:0:10}
{if isset($thumbnail.NAME)}{$thumbnail.NAME}<br />{'Created on'|@translate}{/if}</span>
;)
Offline