Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2003-09-25, 11:50 AM   #1
noooze
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
Join Date: Aug 2003
Location: aarhus - denmark
Posts: 155
Send a message via ICQ to noooze
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
noooze is offline   Reply With Quote
Old 2003-09-25, 08:05 PM   #2
matt
Trying is the first step towards failure
 
Join Date: Apr 2003
Location: Australia
Posts: 123
Send a message via ICQ to matt
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.
matt is offline   Reply With Quote
Old 2003-09-25, 08:28 PM   #3
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
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.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-09-26, 02:46 AM   #4
noooze
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
Join Date: Aug 2003
Location: aarhus - denmark
Posts: 155
Send a message via ICQ to noooze
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
noooze is offline   Reply With Quote
Old 2003-09-27, 10:06 AM   #5
noooze
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
Join Date: Aug 2003
Location: aarhus - denmark
Posts: 155
Send a message via ICQ to noooze
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
noooze is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:37 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc