Technology Behind

Discussion in 'Web Design and Development' started by newtito, Nov 14, 2008.

  1. newtito macrumors member


    Nov 6, 2006
    Hello all,

    I am looking to create a website that updates its main page automatically depending on the article that I create, much like does. What technology is behind this? Is it PHP linked with MySQL? What would be the best way of doing this?

    Thanks for your help,
  2. rdowns macrumors Penryn


    Jul 11, 2003
    Powered by vBulletin® Version 3.6.10
    Copyright ©2000 - 2008, Jelsoft Enterprises Ltd
  3. newtito thread starter macrumors member


    Nov 6, 2006

    Sorry if I wasn't specific enough, but I did not mean the Forum area of Macrumors. I meant the home page of Macrumors. More specifically, I am trying to create a page for my family's web site where if I create a new post on the "Blog" page, for example, the post's title and a snippet of its contents are automatically posted on the home page.

    Thanks again,
  4. angelwatt Moderator emeritus


    Aug 16, 2005
    I don't know about Mac Rumors specifically, but that type of page would usually be done with PHP and MySQL. It could also be done with other server side languages like Ruby on Rails, Java Server Pages, ASP, C# .Net, etc. If you're pulling stuff from a blog, it'll depend on how the blog stores things for how these other languages will access it. If it stores it in a database then the languages will access it that way, or if it's flat files (plain text), then they'll be accessing from there. There's literally dozens of ways to do things here.

    Let us know more about your setup and we might be able to give a little more concrete examples of things to look at and where to head next, but it'll likely to be to tutorials or maybe some developed solutions you can use.
  5. Cabbit macrumors 68020


    Jan 30, 2006
    I think i get it, he wants a website that has a blog page and displays snippets of the latest blog articles on his home page a bit like the bar for the forum on the right hand side of this site.

    That can be done with php and mySql though it will need a little bit of coding, the home page link is basically calling the database entries from the blog table with your rules such as the newest 10 posts and then formating the data with css to make it fit your home page.

    This can be very difficult if you have limited knowledge of SQL and PHP and to date i have never found anything off the shelf that will work. Though a starting point is the actual code for the blog page as you are creating a condensed version of that on your home page.
  6. newtito thread starter macrumors member


    Nov 6, 2006

    Thanks for the feedback. I know this will require some work, I just need to know where to get started. Here goes a very simple mockup of what I want to achieve. I want to be able to post a poem, for example, and have the main page reflect the new addition. Any other suggestions would be great.

    Thanks again,

    Attached Files:

  7. angelwatt Moderator emeritus


    Aug 16, 2005
    How are you currently doing your blog? Are you using WordPress, Blogger, a custom blog, etc.? Need to know so we know what technology is behind it. Also is the blog a part of your current domain or is it hosted on another web site?

    Edit: Also, what is your skill level with PHP, MySQL? This will help determine what level of a solution to give (so we don't talk over your head), though if you don't know how to work with these technologies much we probably can't give too much help as we would need to know a lot about your setup, though can definitely give theoretical advice on how to proceed. In that case you may want a more pre-built system like a CMS, which Dejavu is suggesting below.
  8. Dejavu macrumors regular


    Jun 24, 2008
    You're looking for a Content Management System (CMS). There are several: Joomla and Drupal being the two popular ones. MacRumors, I believe, runs off custom code or it's heavily modified. Maybe if you get arn drunk or greased up, he might provide it for you. :D
  9. newtito thread starter macrumors member


    Nov 6, 2006
    I currently do not have a blog as all of this is in a pre-production stage. I would probably be doing a custom blog or using wordpress (i don't know the pros and cons of either other than ease of use and ease of setup).

    The purpose of the site is not simply a blog, but a place where relatives can go to look at new pictures, read about a vacation, etc.


    Thanks, I'll look into that (not the getting arn drunk part :D)
  10. lucidmedia macrumors 6502a

    Oct 13, 2008
    Wellington, New Zealand
    you can do what you are looking to do using a quality open-source content management system without knowing a lot of PHP. THE CMS will handle the calls to mySQL for you, unless you are doing MAJOR modifications.
  11. themoonisdown09 macrumors 601


    Nov 19, 2007
    Georgia, USA
    I don't know if this will help you, but there is an open source PHP framework called CodeIgniter. They have a video tutorial on their website that shows you how to build a very basic blog in 20 minutes using it (video tutorial link).
  12. wheelhot macrumors 68020

    Nov 23, 2007
    Wow thanks for the tip and links guys, to the OP, I'm looking into building the same thing like what you wanted.

    I use wordpress so far but no luck into doing like what I wanted (which is the same as what you wanted). Anyone know a good site to learn doing something like the OP wants but using Wordpress?
  13. Sun Baked macrumors G5

    Sun Baked

    May 19, 2002
    I thought it was powered by two hamsters and a radio shack remote control robot.
  14. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Personally I would have gone with the getting drunk option, but if you prefer the greased up option that's your business :D.
  15. wheezy macrumors 65816


    Apr 7, 2005
    Alpine, UT
    I did this a few versions ago on my own website, my home page pulled my latest wordpress post and latest pixelpost image to display on the home page. I used just a simple script from dynamic drive:

    RSS Display Box

    You don't need to know MySQL or PHP, just follow the instructions on that and you should be good. As long as your blog has an RSS feed you'll be good.

    Oh, I just remembered I set it up for this website:

    Stock Investor Newsletter

    Each section of the newsletter has its own independent Wordpress install, each writer blogs for each section. Every Tuesday the main admin publishes the individual sections and the feed gets updated on the link above so it never changes. So that page is running 6 scripts of that RSS Display box.

    PM me if you need any help. To me this would be easiest for you.
  16. angelwatt Moderator emeritus


    Aug 16, 2005
    I put together some pieces of PHP/MySQL that shows the flow of what you need. This is not complete code on its own, it's as an example. I repeat: This is not copy and paste code! There's not a whole lot to it, the hard part will be gathering the needed information from the blog database.

    // connect to db
    $dbhost 'localhost';
    $dbuser 'root';
    $dbpass 'password';

    $conn mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to mysql');

    $dbname 'petstore'// this would be whatever name the blog database is

    // Query for latest blog entries
    // You'll need to update query for your database names and column names
    // The first row returned will be the newest in the blog.
    $query "SELECT * FROM entries ORDER BY date DESC";
    $result mysql_query($query);

    // Display blog entry as you want it. This will show the 2 latest blog entries
    $entries_to_display 2;
    $shown 0;
    $row mysql_fetch_array($resultMYSQL_ASSOC)
      || ++
    $shown >= $entries_to_display)
    // Your output format can be whatever and you'll need to update column names
      //  used below.
    print "<h1>{$row['title']}</h1>" .
    This page is a good one for a quick tutorial on MySQL and using PHP to connect and use it.
  17. newtito thread starter macrumors member


    Nov 6, 2006


    Thanks for all of the excellent replies! I am thinking about using Joomla but will definitely keep all of the other suggestions in mind. As far as my level of expertise with PHP and MySQL, I have used it for a couple of websites (maintaining a database of MP3's for my church's website, etc.) so I am knowledgeable with the coding.

    Once again, thanks for all the great responses.


Share This Page