PDA

View Full Version : How To Automatically Display The Date Posted?



Daniel
June 9, 2010, 11:29 AM
For realty or even auto and boat software, I believe it is important to automatically display the date the ad is posted.

How to do this without having to create a date field that user has to manually fill in?

Mike
June 9, 2010, 11:39 AM
Hello Daniel,

You need to make few changes in template.

open file templates/your_template/blocks/listing.tpl

find code

{rlHook name='listingAfterFields'}
and add following lines of code above this code

<tr>
<td align="{$text_dir_rev}"><span class="field">{$lang.added}:</span></td>
<td align="{$text_dir}"><span class="value">{$listing.Date|date_format:$smarty.const.RL_DATE_F ORMAT}</span></td>
</tr>

so it will looks like below


<tr>
<td align="{$text_dir_rev}"><span class="field">{$lang.added}:</span></td>
<td align="{$text_dir}"><span class="value">{$listing.Date|date_format:$smarty.const.RL_DATE_F ORMAT}</span></td>
</tr>

{rlHook name='listingAfterFields'}