Go Back   PHP Link Directory Forum > PHP Link Directory (phpLD) > Mods and contribution Discussion

Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum.

Closed Thread
 
topic widgets
Old 09-30-2005   #1
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default Show Listing Dates

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:

Code:
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}
__________________
Dan

phpLD Mods :: phpLD_Vault
Webmaster Resources Directory
phpLD_Vault Support

IMPORTANT NOTE:
phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions!
VSDan is offline  
Old 09-30-2005   #2
yktan
 
Join Date: Jun 2005
Posts: 350
Default

I think [php] should read {PHP} instead.

VSDan are you using Windows? I need something like this instead:
Code:
Content visible to registered users only.
__________________
Greatest fear in a coder\'s world: A minute bug with correct syntax.
Math Captcha - Database Backup Tool - PHP Background Image
yktan is offline  
Old 09-30-2005   #3
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default

[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).
__________________
Dan

phpLD Mods :: phpLD_Vault
Webmaster Resources Directory
phpLD_Vault Support

IMPORTANT NOTE:
phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions!
VSDan is offline  
Old 09-30-2005   #4
suzkaw
 
Join Date: Sep 2005
Posts: 13
Default

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/lang...ate.format.php
Code:
Content visible to registered users only.
suzkaw is offline  
Old 10-02-2005   #5
ing
 
Join Date: Sep 2005
Posts: 90
Default

Thanks Eric,

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

Cheers
__________________
Work At Home Directory
ing is offline  
Old 10-02-2005   #6
Ap0s7le
 
Join Date: Jun 2005
Location: The world
Posts: 813
Default

I thought the same thing suzkaw, also using {php} tags in a template are frowned upon

later

-Casey
__________________
Casey Wilson / Ap0s7le
Freelance Programmer
Need help with PHPLD? PM me
Ap0s7le is offline  
Old 11-25-2005   #7
thompson
Supporter
 
Join Date: Oct 2005
Posts: 540
Default

Code:
Content visible to registered users only.
where must i add this code ? (and can i change it in german ?)
thompson is offline  
Old 12-12-2005   #8
thompson
Supporter
 
Join Date: Oct 2005
Posts: 540
Default

*push* i dont understand where the smarty code comes into.

is that the complete code ?
thompson is offline  
Old 12-12-2005   #9
Ap0s7le
 
Join Date: Jun 2005
Location: The world
Posts: 813
Default

thompson,

Where do you want it to show?

-Casey
__________________
Casey Wilson / Ap0s7le
Freelance Programmer
Need help with PHPLD? PM me
Ap0s7le is offline  
Old 12-13-2005   #10
Sxperm
Supporter
 
Join Date: Dec 2005
Posts: 153
Default

Hi all, I edited following your instruction but no date appeared to my links. What I did wrong? ops:
Sxperm is offline  
Old 12-13-2005   #11
thompson
Supporter
 
Join Date: Oct 2005
Posts: 540
Default

Code:
Content visible to registered users only.
behind the links of each category.
thompson is offline  
Old 12-13-2005   #12
ing
 
Join Date: Sep 2005
Posts: 90
Default

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..
Code:
Content visible to registered users only.
Change it to..

Code:
Content visible to registered users only.
Hope that helps.

__________________
Work At Home Directory
ing is offline  
Old 12-13-2005   #13
thompson
Supporter
 
Join Date: Oct 2005
Posts: 540
Default

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 ?
thompson is offline  
Old 12-14-2005   #14
Ap0s7le
 
Join Date: Jun 2005
Location: The world
Posts: 813
Default

Try this
Code:
Content visible to registered users only.
-Casey
__________________
Casey Wilson / Ap0s7le
Freelance Programmer
Need help with PHPLD? PM me
Ap0s7le is offline  
Old 12-14-2005   #15
thompson
Supporter
 
Join Date: Oct 2005
Posts: 540
Default

thanks casey, it works.
thompson is offline  
Old 12-14-2005   #16
Ap0s7le
 
Join Date: Jun 2005
Location: The world
Posts: 813
Default

That's great thompson.

Best of luck

-Casey
__________________
Casey Wilson / Ap0s7le
Freelance Programmer
Need help with PHPLD? PM me
Ap0s7le is offline  
Old 01-01-2006   #17
thompson
Supporter
 
Join Date: Oct 2005
Posts: 540
Default

how does it works on other pages than link.tpl ?

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

||solved
__________________
many thanks.

thompson.
thompson is offline  
Old 03-10-2006   #18
posiver
 
Join Date: Mar 2006
Posts: 1
Default So you can add date in details

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
posiver is offline  
Old 07-06-2006   #19
CyberGrenade
 
Join Date: Jul 2006
Posts: 13
Default Thanks

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!
__________________
I also enjoy photography.
CyberGrenade is offline  
Old 07-15-2006   #20
Jama62
Supporter
 
Jama62's Avatar
 
Join Date: Feb 2006
Location: South Cali
Posts: 156
Default

Thanks for the mod
Jama62 is offline  
Closed Thread

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
topic widgets



All times are GMT +1. The time now is 06:01 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.