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

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 9th, 2003, 04:09 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
A News Script with Multiple Pages -- In Need of one Help!

Does anyone know of a news script that gives you the option to post articles with multiple pages.

Example:

News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here. News article here.

Next page link>>>


Anyone?

Thanks!

Reply With Quote
  #2  
Old February 10th, 2003, 05:26 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Do you have the database set up and a way for users (or you) to submit the articles to the database. If so, this is really really simple to do...
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #3  
Old February 10th, 2003, 06:09 AM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m
Reputation Power: 7
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
I believe mytch wrote an article about this... you might wanna do an article search on the main site.
__________________




"Only Linux users see the end of crashes."
- Pl4t0

Reply With Quote
  #4  
Old February 10th, 2003, 04: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
No, I don't have nothing set up yet. I'm just looking for the right program, or perhaps a way I can do it my self.

Reply With Quote
  #5  
Old February 10th, 2003, 05:17 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
Hey, I found that article and it worked great. However, I can't get my articles to appear with the newest post on top. Know how I can get that to work? Also, I would need a script that can show the date and authors.

Last edited by banx : February 10th, 2003 at 05:51 PM.

Reply With Quote
  #6  
Old February 10th, 2003, 06:28 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Quote:
Hey, I found that article and it worked great. However, I can't get my articles to appear with the newest post on top. Know how I can get that to work? Also, I would need a script that can show the date and authors.

Ok - I am guessing now that you have your DB setup and everything. I am not sure how the DB/Table structure is in that article, but if you have a date field, you can use

ORDER BY date DESC

in your query to retrieve the results by date, with the latest being first in the result set...

Reply With Quote
  #7  
Old February 10th, 2003, 09:56 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
and where do I put this?

With the script that Mytch wrote up, there's no date in the script. So when I post, it doesn't show the date of when the post was made.

Last edited by banx : February 10th, 2003 at 09:59 PM.

Reply With Quote
  #8  
Old February 10th, 2003, 10:34 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Post a link to the article please so I can have a looksy at the structure. Thanks You.

Reply With Quote
  #9  
Old February 10th, 2003, 11:27 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

Reply With Quote
  #10  
Old February 11th, 2003, 01:50 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
I actually meant a link to the article by mitch.....

Reply With Quote
  #11  
Old February 11th, 2003, 04:18 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
Talking


Reply With Quote
  #12  
Old February 12th, 2003, 06:20 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
You told me there was no date field but there is
Code:
create table articles 
( 
articleId int auto_increment not null primary key, 
title varchar(250), 
summary text, 
datePublished timestamp, 
unique id(articleId) 
);

The timestamp or datePublished is a date field.

Ok, where this line of code is
PHP Code:
 $result mysql_query("select * from articles order by articleId asc");
/* Change To */
$result mysql_query("select * from articles order by datePublished desc"); 

That should give you the results with the latest one first.

Reply With Quote
  #13  
Old February 12th, 2003, 07:39 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
I see, thanks man I really appreciate it this.

And this will also make the date appear as well?

Sorry about the constant nagging lol... but I've been looking for a script like this for nearly two years.

Two more questions...

Is there a way I can have the author of the post displayed?

Could I have images posted with my articles?

Thanks soooo much

Reply With Quote
  #14  
Old February 12th, 2003, 04:23 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
Is there a way I can have the author of the post displayed?


Simply add a author field to your table, and echo it.


Could I have images posted with my articles?


Get yourself a fileupload class, and store the path in a field, echo that too and your done.

Reply With Quote
  #15  
Old February 12th, 2003, 05:34 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. Do you know a tutorial or something that show me how to do all these things, because I'm new to all of this.

Reply With Quote
  #16  
Old February 12th, 2003, 07:46 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
Quick and dirty

first do sql:

ALTER TABLE `articles` ADD `author` VARCHAR( 30 ) NOT NULL ;
------------------------------------------------------
then:
add a form field to your backend html were it looks nice:

<input name="author" type="text" maxlength="20" value="">
--------------------------------------------------------------
Next:
Update your mysql querie

@mysql_query("insert into articles(title, summary) values('$articleTitle', '$articleSummary')") or die("Couldn't add article: " . mysql_error());

to:

@mysql_query("insert into articles(title, summary, author) values('$articleTitle', '$articleSummary','$author' )") or die("Couldn't add article: " . mysql_error());

----------------------------------------------------
next:

update:

<font face="Verdana" size="4"><b><?php echo $row["title"]; ?></b></font><br><br>
<font face="Verdana" size="2">
<?php echo $row["summary"]; ?><br><br>
<a href="fullarticle.php?articleId=<?php echo $row["articleId"]; ?>">Read More...</a>

to:

<font face="Verdana" size="4"><b><?php echo $row["title"]; ?></b></font>
<font face="Verdana" size="-1">by <b><?php echo $row["author"]; ?></b></font>
<br><br>
<font face="Verdana" size="2">
<?php echo $row["summary"]; ?><br><br>
<a href="fullarticle.php?articleId=<?php echo $row["articleId"]; ?>">Read More...</a>

-------------------------------------------------
Get the trick?
If you did you can easly do the same with the date.
-------------------------------------------
Note that echo "$row["datePublished"]"; wount do it.
make
$time=$row["datePublished"];
$date = date("F Y, l d @ H:i",$time);
echo "$date";

Or format it in a other way (www.php.net ---> look up "date" )
------------------------------------------------------------
About the images i am working on a gallerie, with upload and insert into textarea. Perhaps i#ll post that tomorrow.
Perhaps because the code(wysiwyg js) i am doing wount work easly with yours.

Have fun

Reply With Quote
  #17  
Old February 13th, 2003, 03:36 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
I was able to add the author names, and that works great. Haven't gotten the date up but I'm working on it.

Thanks for all your help.


I was thinking of adding perhaps a drop down menu, which could generate the image code into the text area. Don't quite know how to go about doing that though.