PDA

View Full Version : Publishing date and time



Khaled Chammout
July 6, 2015, 12:18 AM
Hello!
How can I show the publishing date and time in my listings. Like Today 14:15, Yesterday 14:15, 10 July 14:15. Flynax 4.4, auto wide template. Thank you /Khaled

Curtis
July 6, 2015, 06:33 AM
Hello!
How can I show the publishing date and time in my listings. Like Today 14:15, Yesterday 14:15, 10 July 14:15. Flynax 4.4, auto wide template. Thank you /Khaled

Hello Khaled Chammout,

You can use the following smarty modifier for it, for ex. on listing details page: {$listing_data.Date|date_format:$smarty.const.RL_D ATE_FORMAT}

Khaled Chammout
July 6, 2015, 04:24 PM
Hello Khaled Chammout,

You can use the following smarty modifier for it, for ex. on listing details page: {$listing_data.Date|date_format:$smarty.const.RL_D ATE_FORMAT}

Thank you Curits for fast reply.
Can you please tell me where to put the code. for ex. in listing details page.

Thank you
Khaled Chammout

Curtis
July 7, 2015, 08:12 AM
Thank you Curits for fast reply.
Can you please tell me where to put the code. for ex. in listing details page.

Thank you
Khaled Chammout

So, if you want use it in the listing details page, that you can add it anywhere in file /templates/your_template/tpl/controllers/listing_details.tpl

Khaled Chammout
July 10, 2015, 01:31 PM
So, if you want use it in the listing details page, that you can add it anywhere in file /templates/your_template/tpl/controllers/listing_details.tpl

I did put the code in listing_details.tpl and it worked. But I can't figure out were to put the code to show the date on every listing in list or gallery view. Like these pictures.
13761377

Thank you
Khaled Chammout

Giuseppe Mollo
May 9, 2016, 01:47 PM
I have the same problem...works great in listing_details.tpl, but not in listing.tpl, like Khaled Chammout said. Can anyone help me? Thanks!

Wei Hong
May 10, 2016, 04:32 AM
It should work OK if you install the latest version of the software. May I have a look at your website please?

Giuseppe Mollo
May 10, 2016, 07:28 AM
I have 4.4.1 version. I can't install the latest version because i'm afraid that many things could suffer modifications and it's no time for that. When i put the code, {$listing_data.Date|date_format:$smarty.const.RL_D ATE_FORMAT} in listing_details.tpl work, but when i try same code in gallery view, like the pictures above, nothing happens. How to look at my website? Thanks!

i finally solved it, i use this code: {$listing.Date|date_format:$smarty.const.RL_DATE_F ORMAT}. Thanks!

Fadil Asani
August 7, 2016, 10:03 PM
how about epiration date. My listings have 7, 14 and 30 days active. How to add the date it expires below the date it was created. I need the code for expired date.

Viktor
August 9, 2016, 09:36 AM
Hello Fadil.

But this code already exist. You can find it on page My Listings Below line: Added. In right side of listings.