Announcement

#1 2014-02-18 13:42:02

rfreitaz
Member
2013-07-15
12

Thumbnail page with date and name/description

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

 

#2 2014-02-18 13:44:36

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Thumbnail page with date and name/description

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

 

#3 2014-02-18 13:51:51

rfreitaz
Member
2013-07-15
12

Re: Thumbnail page with date and name/description

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

 

#4 2014-02-18 16:27:34

flop25
Piwigo Team
2006-07-06
7037

Re: Thumbnail page with date and name/description


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2014-03-26 20:00:28

rfreitaz
Member
2013-07-15
12

Re: Thumbnail page with date and name/description

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

 

#6 2014-03-27 14:01:32

patounet37
Guest

Re: Thumbnail page with date and name/description

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>

 

#7 2014-03-27 15:53:12

flop25
Piwigo Team
2006-07-06
7037

Re: Thumbnail page with date and name/description

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>

;)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact