Is there a smarty short code for displaying age of listing.
eg: if the listing was listed an hour ago it will say 1 hour.
Thanks
Is there a smarty short code for displaying age of listing.
eg: if the listing was listed an hour ago it will say 1 hour.
Thanks
Hello Niall,
Smarty doesn't have such modifier by default but I found some solutions in the web:
- https://github.com/nZEDb/nZEDb/blob/...er.timeago.php
- https://gist.github.com/dodyrw/4943269
- http://www.smarty.net/forums/viewtopic.php?p=61841
You should create file (modifier) in this dir: /libs/smarty/plugins/modifier.MODIFIER_NAME.php
and past the modifier code from the sample to the file. After that you may use the modifier as:
{$listing.Date|MODIFIER_NAME}
I hope it was clear explanation, let me know if not.
John
Hello Nail,
You can try to use this code:
in file: ftp://templates>>your_template>>tpl>>blocks>>listing.tplCode:Only registered members can view the code.
Viktor,
Flynax technical department,
Best wishes.
That code did not work sorry Viktor..
I like where you going with this
http://www.smarty.net/forums/viewtopic.php?p=61841 seems to be the best option but Im lost on how to implement this ie how does the modifier script know the age of the listing... Could you please please please help me out on this one. Im sure you could use this feature in your next update.
Sorry that last message is for john
Just to let you guys know I paid for support so if you want I can put this in a ticket.
But maybe the forum is better so other customers can get the benefit.
Thanks
Aiden
Lads I would be very grateful if you could help me implement the discussed function.
PLEASE PLEASE Im under a bit of pressure to complete the job..
Hi,
You're support that you paid is just for help with bugs,or problem's of the script.
What you're asking is customization, and has nothing to do with support.
If it's not a big deal, they are happy to help, but as John say's
In that case you must open a ticket and probably pay for it.Smarty doesn't have such modifier by default but I found some solutions in the web:
- https://github.com/nZEDb/nZEDb/blob/...er.timeago.php
- https://gist.github.com/dodyrw/4943269
- http://www.smarty.net/forums/viewtopic.php?p=61841
Yes Stephane right. If your customization take more then 1 hour will cost you extra. But if it will be small changes and take less then 1 hour we will release it for free.
Viktor,
Flynax technical department,
Best wishes.