Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9

Thread: php news portal

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Posts
    4
    Member #
    12143
    Hi, I'm using dreamweaver to create my own website and really want to create one of those iframes containing updateable text (see www.newstoday.com), I'm just a beginner and need to know where to start...please help!

  2.  

  3. #2
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Hey,
    Well you actually don't need any PHP for that - all you need is some CSS OR an iframe.
    With an iframe you can have your news in a seperate html file and just load it into a scrolling iframe. You would do something like
    HTML Code:
    <iframe src="news.html"></iframe>
    I believe that's the syntax but I'm not totally sure, you'd have to look it up.
    OR, you can use CSS just to make it scroll. Have all your news text in a div, and make the div scroll with css. Like this:
    HTML Code:
    <style>
    .news{
      overflow: auto;
      width: 200px;
      height: 200px;
    }
    </style>
    <div class="news">news text here</div>
    (You can change the width and height to whatever you want it to be) ... Again, I'm not sure about the syntax, you'd have to look it up.
    Hope that helped!
    Heather
    choosy developers choose gif!
    website | paintings | blog

  4. #3
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,656
    Member #
    1234
    Liked
    137 times
    If the news is from other sites you don't control, then you would need to parse an RSS feed. The RSS feed is the news feed from the other source, and parsing just means integrating it into your site.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  5. #4
    Junior Member
    Join Date
    Dec 2005
    Posts
    4
    Member #
    12143
    Thank you!

    Quote Originally Posted by raspberryh
    Hey,
    Well you actually don't need any PHP for that - all you need is some CSS OR an iframe.
    With an iframe you can have your news in a seperate html file and just load it into a scrolling iframe. You would do something like
    HTML Code:
    <iframe src="news.html"></iframe>
    I believe that's the syntax but I'm not totally sure, you'd have to look it up.
    OR, you can use CSS just to make it scroll. Have all your news text in a div, and make the div scroll with css. Like this:
    HTML Code:
    <style>
    .news{
      overflow: auto;
      width: 200px;
      height: 200px;
    }
    </style>
    <div class="news">news text here</div>
    (You can change the width and height to whatever you want it to be) ... Again, I'm not sure about the syntax, you'd have to look it up.
    Hope that helped!
    Heather
    Thank you I will do that for sure. I want to understand how to use PHP so that my clients can add their own updates from their computer...but for now I can at least have my site look the way I want
    Thanks

  6. #5
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Oh, okay! I've done some of those before... It's really easy. Have you done any database stuff before?
    You can create a database and keep the news in it - have a table for news and have columns like "article", "date", "headline"... etc.
    Then, inside your iframe or scrolling div, you can just loop through all of the news items in your news table (selected in order by date) and in your little div, display the date, headline, and also you can display like the first 50 characters of the article or something if you want. And make it so when they click on it, you display the whole article (make the link like "article.php? articleid=5", etc.)
    Then after you get that working, you can make your admin section. You can have a login for your user, and list all the news items, and then they can click on one, and you'll have an html form field displayed where they can edit the news info. Also you can have an "add news item" with the html form field and they fill everything out.
    Then they will click submit and your php script will perform a sql update or insert query.
    Does that help?
    choosy developers choose gif!
    website | paintings | blog

  7. #6
    Junior Member
    Join Date
    Dec 2005
    Posts
    4
    Member #
    12143
    you rock!

    Yes! That's exactly what I was talking about...now I just have to go through the steps that you have outlined starting with the MySQL database. I am using a mac so I know that it comes with PHP and MySQL I just don't know what I'm supposed to do with it! Is there a tutorial I can do or something? How did you learn how to do this?

  8. #7
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Well, starting with the database... I don't know what you mean by your mac coming with PHP and MySQL, as I have always just used the PHP and MySQL on the actual webserver whereever the website is being hosted.
    Does your webhost provide a database and php for you?
    And do they have PHPMyAdmin? That's the easiest way to set the database up - through PHPMyAdmin. Or if they have a similar admin for the database.
    As for a tutorial, I'm not sure, I'd have to look later, after work (I'm at work now). How I learned to do this, is, just gradually, starting from small database projects and then eventually to bigger ones... Oh yeah also, I use www.php.net a LOT, you can search for anything you want to do, as far as functions and stuff. It's super helpful. I don't know what I'd do without it :P
    choosy developers choose gif!
    website | paintings | blog

  9. #8
    Junior Member
    Join Date
    Dec 2005
    Posts
    4
    Member #
    12143
    Quote Originally Posted by raspberryh
    Well, starting with the database... I don't know what you mean by your mac coming with PHP and MySQL, as I have always just used the PHP and MySQL on the actual webserver whereever the website is being hosted.
    Does your webhost provide a database and php for you?
    And do they have PHPMyAdmin? That's the easiest way to set the database up - through PHPMyAdmin. Or if they have a similar admin for the database.
    As for a tutorial, I'm not sure, I'd have to look later, after work (I'm at work now). How I learned to do this, is, just gradually, starting from small database projects and then eventually to bigger ones... Oh yeah also, I use www.php.net a LOT, you can search for anything you want to do, as far as functions and stuff. It's super helpful. I don't know what I'd do without it :P
    I meant that my computer's local host has PHP and MySQL, from what you have shown me I think I should be able to put something together using Dreamweaver's tutorials. I will let you know how it goes. I saw your website it is really inspiring. I studied fine arts as well and am trying to learn as much as I can about web design out of necessity. Thanks again you have been super helpful!

  10. #9
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Okay, cool - let me know if you need any help!
    choosy developers choose gif!
    website | paintings | blog


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:55 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com