Support Forums

add the word 'new' to adverts placed with in a time frame

This is a discussion on add the word 'new' to adverts placed with in a time frame within the Templates, HTML, CSS, and Design Help forums, part of the General category; Hi all, What I would like to add to my showlistings.tpl is the word 'new' to listing placed with in ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 04-11-2010, 10:53 PM   #1
Customer
 
jason1971's Avatar
 
Join Date: Jan 2009
Location: England
Posts: 147
Rep Power: 13
jason1971 is on a distinguished road
Default add the word 'new' to adverts placed with in a time frame

Hi all,

What I would like to add to my showlistings.tpl is the word 'new' to listing placed with in the last 24 hours, is this possible ? if so anybody have any ideas about doing it.

Many thanks for your time

Jason
__________________
v4.1.8 Hosted - using Templatecodes neo2- green template
jason1971 is offline   Reply With Quote
Old 04-12-2010, 08:25 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

The smarty array passed to showlistings is called {$results} which has an element in it named "dateadded" and displays the date added in the following format "2010-04-06 09:30:33".

You should be able to use smarty and compre the date posted to current date and add an image based on if its less than 24 hours old but your going to have to decide where ya want the image displayed etc. Working with dates can be a bit tricky if you dont know what your doing.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 04-12-2010, 08:29 AM   #3
Customer
 
jason1971's Avatar
 
Join Date: Jan 2009
Location: England
Posts: 147
Rep Power: 13
jason1971 is on a distinguished road
Default

Quote:
Originally Posted by Lhotch
Working with dates can be a bit tricky if you dont know what your doing.
that lets me out then larry cos I havent got a clue what I am doing back to the drawing board..
__________________
v4.1.8 Hosted - using Templatecodes neo2- green template
jason1971 is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modified Date and Time changing on multiple listings at the same time MrGForce Technical Support 10 09-04-2009 08:19 PM
i frame problem ericbuff Off Topic 1 08-10-2009 12:29 PM
Install Time Frame bjdarv Installation Problems 4 05-06-2009 10:34 PM
losing the header frame when ad is being placed paultime Technical Support 0 01-16-2009 12:17 AM
404 adverts going live CHRD Technical Support 4 06-21-2008 11:39 AM


All times are GMT -4. The time now is 04:45 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0