|
|
|
|
|
|
![]() |
#1 |
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
|
Php problem - ...
ok here goes again
my script list all the links by a- b- c ect. so its impossible to tell what link is new and what link is old. any way to add a lille line that puts a "new" after a link that has been added lastest.. or something ? I know some of you are very bright in here so I hope i can get some help. My free linklist script isnt that good but I really dont have any money to invest in a script... so i guess i have to manage cheers noooze
__________________
The godess of fortune have never smiled at me - but she has often had a good laugh |
![]() |
![]() |
![]() |
#2 |
Trying is the first step towards failure
|
If your database has a field for date added then you can, otherwise i'd say you're in trouble...
Without looking at what you've got you'll need to do three things: 1. check the date of the link addition. how you do it depends on whether you're using a database or txt file. 2. check the current date eg: $current_date = gmstrftime('%m/%d/%y', strtotime("0 days")); that needs to be modified depend on how the date is recorded for the added links. 3. create an if statement to compare the two dates and check if the date is within a certain timeframe eg. 7 days. Unfortunately it's not going to be that easy for you to implement something like that nooze... Good Luck! Matt
__________________
Link List Land - Linklist Creation, Design and Implementation. |
![]() |
![]() |
![]() |
#3 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
I wish I know a whole lot more PHP. At most I can go in and change a few things on a script.
Anyway, a long time ago I had a tiny bit of php code that would display an image for a certain amount of days and then expire. You could put it on anything, like new links, and set it to expire after so many days just by changing a number in it. It was just one short line of code. |
![]() |
![]() |
![]() |
#4 |
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
|
see that wouldt be nice!
You dont remember where and when cleo ?
__________________
The godess of fortune have never smiled at me - but she has often had a good laugh |
![]() |
![]() |
![]() |
#5 |
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
|
Ok - Cleo seems not to remember where so did find that code so here a question to you very gifted programmers.
How do I put a new after a new submission? Is there a way to add a little code that adds a "new" or a gif after a listing and then count like 4 days or 7 days and then remove it ? My mind tells me that it couldt be done, but as i only remember very little of my programming skills, and I only learned java, I have NO idea how please help me out here cheers noooze
__________________
The godess of fortune have never smiled at me - but she has often had a good laugh |
![]() |
![]() |
![]() |
|
|