PDA

View Full Version : Show Listing Dates


VSDan
09-30-2005, 09:30 AM
This mod will allow you to show [Added Date] and/or [Last Modified Date] for listings:

At the top of templates/link.tpl, add the following:

Content visible to registered users only.

[Added Date] can be called in the template using {$date_added}
[Last Modified Date] can be called in the template using {$date_modified}

yktan
09-30-2005, 11:35 AM
I think [PHP] should read {PHP} instead.

VSDan are you using Windows? I need something like this instead:
Content visible to registered users only.

VSDan
09-30-2005, 05:37 PM
[quote="yktan"]I think [PHP] should read {PHP} instead.

Good eye, thanks for the correction!

I thought about adding time, but decided to stick with just date. Hmm, was not aware of the 'sscanf' PHP function. Much better =) Thanks! I'm more of a CGI programmer (date functions are more limited in CGI-Perl - although external modules open the doors more).

suzkaw
09-30-2005, 08:50 PM
Hey guys why not just use the smarty date_format? It would save you from having to do all that coding to format the date.
http://smarty.php.net/manual/en/language.modifier.date.format.php
Content visible to registered users only.

ing
10-02-2005, 06:43 AM
Thanks Eric,

I just tried adding the code you suggested to my site and it works great.

Cheers :)

Ap0s7le
10-02-2005, 04:53 PM
I thought the same thing suzkaw, also using {php} tags in a template are frowned upon ;)

later

-Casey

thompson
11-25-2005, 11:05 PM
Content visible to registered users only.

where must i add this code ? (and can i change it in german ?)

thompson
12-12-2005, 07:37 PM
*push* i dont understand where the smarty code comes into.

is that the complete code ?

Ap0s7le
12-12-2005, 09:08 PM
thompson,

Where do you want it to show?

-Casey

Sxperm
12-13-2005, 07:07 AM
Hi all, I edited following your instruction but no date appeared to my links. What I did wrong? :oops:

thompson
12-13-2005, 08:50 AM
Content visible to registered users only.

behind the links of each category.

ing
12-13-2005, 09:42 AM
Hi,

You can add that code into link.tpl wherever you want it to appear.

For example, if you want the date to appear on a new line below the link description and have the words "Date Added:" or "Added:" before the date, you would do this..

Find..
Content visible to registered users only.

Change it to..

Content visible to registered users only.

Hope that helps.

:)

thompson
12-13-2005, 08:11 PM
thanks it works.

but the date format is english ( Monday, November 28, 2005 )

in german there is Montag 28. November 2005 better 28.11.2005

can you change this ?

Ap0s7le
12-14-2005, 06:04 AM
Try this
Content visible to registered users only.

-Casey

thompson
12-14-2005, 06:18 PM
thanks casey, it works.

Ap0s7le
12-14-2005, 09:05 PM
That's great thompson.

Best of luck

-Casey

thompson
01-01-2006, 02:07 PM
how does it works on other pages than link.tpl ?

i build it in another page, but it didn´t work.

||solved

posiver
03-10-2006, 11:59 AM
Hello,

i have found this directory last night, and it is wonderfull.

You must add the follwing in your details.php

Find this:
$data['RATE_ENABLED'] = $rdata['RATE_ENABLED'];

After it in a new line add this:
$data['DATE_ADDED'] = $rdata['DATE_ADDED'];



Add this where you will lokk the date:
{$DATE_ADDED|date_format:"%d.%m.%Y"}</td>


That is all. The date is in german style

For english date use this line:
{$DATE_ADDED|date_format:"%A, %B %e, %Y"}

Have a lot of fun :wink:
Posiver

CyberGrenade
07-06-2006, 07:48 PM
Thanks for the Mod. This has lead to a lot of changes for my site. I used this to add a NEW icon to listings that have been added in the last 14 days.

Thanks!

Jama62
07-15-2006, 10:04 PM
Thanks for the mod

ajun
07-19-2006, 08:42 PM
Thanks! ^^

anon
07-19-2006, 09:08 PM
{$link.DATE_ADDED}
{$link.DATE_MODIFIED}

shadav
06-16-2007, 06:53 PM
yeah i know it's an old thread, but i just now found it :D

lol Dan you still missed one :)

corrected code should be
Content visible to registered users only.thnx posilver
going off of your post i added the date modified as well to detail page
in detail.php after
Content visible to registered users only.add
Content visible to registered users only.in detail.tpl wherever you want it to be displayed add something like
Content visible to registered users only.

CassyHold
12-13-2007, 12:39 AM
Content visible to registered users only.
My turn to say: “Yeah, I know it’s an old thread” :D…just got on this forum…Thank you for your correction Shadav. Helped me a lot!:p;)
Cassy Ada