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:
  #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: 16
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: 16
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 50 sec
Reputation Power: 17
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: 16
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: 16
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: 16
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: 16
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: 16
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: 16

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: 16
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: 16
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: 16
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: 16
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
Registered User
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: 16
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
Registered User
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: 16
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.

Reply With Quote
  #18  
Old February 14th, 2003, 03:04 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: 16
could anyone add more detail or appoint me to a tutorial that can show how to have the date posts were made for this script?

Reply With Quote
  #19  
Old February 16th, 2003, 12:21 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,240 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 18
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Hey Banx,

One of the best sources for date manipulation is the PHP manual... Check out this link. It'll show you everything you can do with the date.

If you have any problems, let me know...
__________________
____________________________________________
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
  #20  
Old February 16th, 2003, 07:37 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: 16
Thanks for the link!

Finally, got it all up.

But when I alter any of the tables, it messes up my article pages. Any ideas?

Reply With Quote
  #21  
Old February 17th, 2003, 03:44 AM
timepoint5 timepoint5 is offline
Registered User
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 have to check your Mysql querys, f.e. If you work with arrays and your alter your table, then you f*ck up your results. I made that misstake on saturday

Reply With Quote
  #22  
Old February 17th, 2003, 02:28 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: 16
Yeah, shortly after my post, I figured it out.

I finally got it all to work. Along with images, dates, and author names!

Thank you all for you help! I've been looking for a news board like this since 2001, never thought I'd end up making one.

Reply With Quote
  #23  
Old February 17th, 2003, 03:00 PM
timepoint5 timepoint5 is offline
Registered User
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
How did you do the image thing?

Reply With Quote
  #24  
Old February 18th, 2003, 01:40 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: 16
The same way you explained how to add the "author" field. Except on the posting page I added a drop down menu. With this...

<option value="<img src="http://www.ImageURL.gif" align="left">">Image Name</option>

Then I edited the "pages" table, adding the new field.

Last edited by banx : February 18th, 2003 at 01:42 PM.

Reply With Quote
  #25  
Old February 18th, 2003, 09:33 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: 16
Looks like I spoke too soon. I got it so that the date shows up, but its today's date on every post.

I need it so that it shows the date the article was posted. Like a news board... Any suggestions?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > A News Script with Multiple Pages -- In Need of one Help!


Developer Shed Advertisers and Affiliates


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap