
May 20th, 2004
08:56 AM
Neverside Newbie
Status: Offline!
Shiver7 News
Hey guys, I'd like to ask how the news script was made on Shiver7. I can make a really basic news script in php using mySQL but don't know how to have it show up in a new content box each time. I've gotten as far as having it show up with a linebreak at the end of each post, but in plain text with no images.
Also, I've not used any id thing to have each news article unique to the others, how would I go about doing this?
Finally the third question I have is how to implement a commenting system in the news script. I know as much as I will be needing the id feature in my table to make such a thing.
The tutorial I followed to make my news script is from oxyscripts, which you can find here. It's really basic but it has got me started with PHP and I really like it so far 

May 20th, 2004
09:51 AM
thinking of something witty to put here
Status: Offline!
Your best bet for now is to use WordPress or Textpattern. That news script isn't anything special, and WP/Txp will do that easily.

May 20th, 2004
10:14 AM
the cosmetic part is just html.

May 20th, 2004
05:15 PM
Neverside Newbie
Status: Offline!
Thanks Radley, I have actually used Wordpress before but the thing is i'm a bit of a n00bie with PHP, so I'm aiming to learn gradually this way 
SEXYbeast, can you show me a small example of how I would combine HTML with PHP to display the images using tables please? 

May 20th, 2004
05:55 PM
Neverside Peacekeeping Forces
Status: Offline!
i'll try to explain just the concept:
if you're going to fetch the data, youre going to use some method like this:
<?php
$query = "SELECT * FROM your_table_name;";
$result = mysql_fetch_array($query);
while ($fetch = mysql_fetch_array($result)) {
echo "$fetch[your_table_column]";
echo "<br />"
}
?>
that way, you are going to have <br /> (newline) after each post.
if you use this:
<?php
$query = "SELECT * FROM your_table_name;";
$result = mysql_fetch_array($query);
while ($fetch = mysql_fetch_array($result)) {
echo "<img src="your_image_file" />";
echo "$fetch[your_table_column]";
echo "<br />"
}
?>
then you're gonna have an image at each post.
think that's the way s7 uses for their news script.
to make the box like you see on shiver7 i think just made em in html, and then poste it on the while { } statement :P
___________________
"The only thing i hate about Sunday is that because tomorrow is Monday"
army