General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 18th, 2003, 09:39 PM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Question I have a PHP News Board -- Anyone know How I can have the date news was posted on it?

I thought I'd try this question here. Using a script Mitch developped (Click here for more info), I made this news script for my site. However, I cannot get the date that posts were made to show up. I am completely stumpped! Any suggestions?

Thanks!

Reply With Quote
  #2  
Old February 19th, 2003, 03:17 AM
timepoint5 timepoint5 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: bayern
Posts: 17 timepoint5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
post your code please

Reply With Quote
  #3  
Old February 19th, 2003, 03:59 AM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
What code exactly?

Reply With Quote
  #4  
Old February 19th, 2003, 04:05 AM
timepoint5 timepoint5 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: bayern
Posts: 17 timepoint5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i think the file were you tried your date stuff should be enough and the query.
Didnt the php.net help you?
what do you get if you echo your date var?

Last edited by timepoint5 : February 19th, 2003 at 11:16 AM.

Reply With Quote
  #5  
Old February 19th, 2003, 04:32 PM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
PHP.net did help me get the date on there, but it was the exact same date, and it woould change to the current date, everyday.

The only think I echoed was the 'datePublished' field. That too changed with the days.

200302191372

that's how today's date would look when I echoed that.

I need it so that it displays the date the article was published.

Reply With Quote
  #6  
Old February 20th, 2003, 02:50 AM
timepoint5 timepoint5 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: bayern
Posts: 17 timepoint5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
that is the date, in secounds counted from 1970( unix time)

try this:

$date = date("F Y, l d @ H:i",$time);
echo "$date";

$time is my var filled with the mysql query

Reply With Quote
  #7  
Old February 20th, 2003, 03:22 PM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Okay. Where is the correct place to put this? Should I add it just as I added the 'author' field?

Reply With Quote
  #8  
Old February 20th, 2003, 04:34 PM
timepoint5 timepoint5 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: bayern
Posts: 17 timepoint5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
you echo it were you want to place it

f.e


echo "$artikel";
echo "<br>";
echo "$date";

makes


Arktikel bla bla bal

date

Reply With Quote
  #9  
Old February 20th, 2003, 05:35 PM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
When I do that, it places the current date on each and every post. I was looking to have the date articles were posted.

Reply With Quote
  #10  
Old February 20th, 2003, 05:58 PM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
actually, nothing shows at all.

Reply With Quote
  #11  
Old February 20th, 2003, 06:05 PM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
actually, I got it to work where posters can pick the date off of a drop down menu. But the thing is they have to look for the exact date, everyday. Do you know how I can get the date to show up automatically on the drop down menu? Kind of like the SiteWorksPro drop down menu.

Reply With Quote
  #12  
Old February 21st, 2003, 05:16 AM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
great news! and this time its true!

I got the date to show up like I wanted it.

One problem though, perhaps someone will know what the problem is.

For some reason, the script will not seporate my paragraphs.

For example, I type out:

The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here.

The article text here. The article text here. The article text here. The article text here. The article text here.

The article text here. The article text here. The article text here. The article text here. The article text here.


But the script displays it like this

The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here. The article text here.

Just in one paragraph. Odd, I know.

Any ideas why this may be happening?

Thanks!

Reply With Quote
  #13  
Old February 23rd, 2003, 01:20 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
If you use the nl2br() function, it will display it the way you type it into your textarea!
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #14  
Old February 23rd, 2003, 03:16 PM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Sorry, when I checked out that link, all I got was confusion ...

Could you possibly show me what I need to do directly? Where or how I need to add that code?

ANYONE?

Thanks

Last edited by banx : February 23rd, 2003 at 03:22 PM.

Reply With Quote
  #15  
Old February 24th, 2003, 04:08 PM
banx banx is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 33 banx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Never mind, got it all worked out.

THANK YOU SO MUCH!

if any wants to see the board in action, just check out my site...

TheWrestleHolics.com

Thanks again guys.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > I have a PHP News Board -- Anyone know How I can have the date news was posted on it?


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |