+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Display age of listing

  1. #1

    Display age of listing

    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

  2. #2
    Flynax developer John's Avatar
    Join Date
    Oct 2009
    Posts
    606
    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

  3. #3
    Hello Nail,

    You can try to use this code:

    Code:
    Only registered members can view the code.
    in file: ftp://templates>>your_template>>tpl>>blocks>>listing.tpl
    Viktor,
    Flynax technical department,
    Best wishes.

  4. #4
    That code did not work sorry Viktor..

  5. #5
    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.

  6. #6
    Sorry that last message is for john

  7. #7
    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

  8. #8
    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..

  9. #9
    Senior Member
    Join Date
    Dec 2014
    Location
    Germany
    Posts
    199
    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
    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
    In that case you must open a ticket and probably pay for it.

  10. #10
    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.

+ Reply to Thread