Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

71 users online



Shiver7 News

Shiver7 News

Currently viewing this thread: 1 (0 members and 1 guests)


Shahrukh

Shahrukh

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 Smile

Rad

Rad

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.

SEXYBeast

SEXYBeast

Status: Offline!

the cosmetic part is just html.

Shahrukh

Shahrukh

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 Smile

SEXYbeast, can you show me a small example of how I would combine HTML with PHP to display the images using tables please? Wink

army

army

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:

<?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:

<?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

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0078 seconds.