+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Make Your Own CMS

  1. #1
    o0slowpaul0o's Avatar
    o0slowpaul0o is offline x10 Sophmore o0slowpaul0o is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    127

    Make Your Own CMS

    In this tutuorial I will show you how you can make your own basic but easy to update CMS. It will include making navigation, site stats, login system, news and whatever you want as extra on the side (such as a shoutbox or an affiliate rotator). First we will be making the .inc (include files) which will be used on pretty much every page, I am making them in .inc files so you don't have to go through 30 long pages of code just to change a spelling error!

    1. Since this is a PHP tutorial, I'm not going to be making a CMS that is really graphical and fancy. First we will be setting up the MySQL database to take in the stats like hits, vistor's IP, people online and also a section for the news that will be shown on the front page. So first create a database called cmstut or whatever you want to call the database as long as you change which database it selects on each page. This first table will set up the stats and will be a modification of what we did in this tutorial, Site Stats. This will be called statscreate.php.

    Code:
    <?php
    // set your infomation.
    $dbhost='localhost';
    $dbusername='username';
    $dbuserpass='password';
    $dbname='cmstut';
    
    // connect to the mysql database server.
    mysql_connect ($dbhost, $dbusername, $dbuserpass);
    //select the database
    mysql_select_db($dbname) or die('Cannot select database');
    
    //create the table, customize it if you want
    $query = 'CREATE TABLE stats(
    id INT NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(id),
    ip VARCHAR(255) NOT NULL,
    hits INT(20) NOT NULL,
    activity DATETIME NOT NULL,
    user_agent VARCHAR(255) NOT NULL)';
    $result = mysql_query($query);
    echo "Table Created!";
    ?>
    The next table we will create is peep_online so you can call this file peep_onlinecreate.php.

    Code:
    <?php
    // set your infomation.
    $dbhost='localhost';
    $dbusername='username';
    $dbuserpass='password';
    $dbname='cmstut';
    
    // connect to the mysql database server.
    mysql_connect ($dbhost, $dbusername, $dbuserpass);
    //select the database
    mysql_select_db($dbname) or die('Cannot select database');
    
    //create the table, customize it if you want
    $query = "CREATE TABLE peep_online(
    activity DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    member ENUM('y','n') NOT NULL DEFAULT 'n',
    ip_address VARCHAR(255) NOT NULL,
    refurl VARCHAR(255) NOT NULL,
    user_agent VARCHAR(255) NOT NULL)";
    $result = mysql_query($query);
    echo "Table Created!";
    ?>
    The last table we will create for now, is the news section which is very simple. Call this file mainnewscreate.php.

    Code:
    <?php
    // set your infomation.
    $dbhost='localhost';
    $dbusername='username';
    $dbuserpass='password';
    $dbname='cmstut';
    
    // connect to the mysql database server.
    mysql_connect ($dbhost, $dbusername, $dbuserpass);
    //select the database
    mysql_select_db($dbname) or die('Cannot select database');
    
    //create the table, customize it if you want
    $query = 'CREATE TABLE mainnews(
    id INT NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(id),
    date TIMESTAMP NOT NULL,
    post VARCHAR(100) NOT NULL,
    news TEXT NOT NULL,
    title VARCHAR(30) NOT NULL)';
    $result = mysql_query($query);
    echo "Table Created!";
    ?>
    Now we should have three tables in our database:
    mainnews
    peep_online
    stats
    These are all the tables we need for now until we set up the login system.

    2. Now we will need a basic design for our site, you can make one yourself but it may be a bit confusing for the less advanced. You can view the layout I made here. To use it to work with this tutorial you can go here to download it (includes the .psd's).

    3. Basically we will be arranging it into 7 different .inc files, which will be made up of the basics shown on each page. These will include a header.inc (banner, <head>, and column headers), navigation.inc (add/remove new pages in the navigation area), user.inc (this will be the user login area or the user stats if they are logged in), affiliate.inc (this will list the affiliates which you can either make to store them manually or you can make it list from a MySQL database), stats.inc (this will show the site statistics such as hits or unique hits, you will not be changing this manually but it's .inc file because you may want to add a stat), other.inc (this is for whatever you want to put in the "other" column), and finally footer.inc (this is basically the copyright, but it will be a .inc file incase you change domains or want to add an ad down there, it just makes life a whole lot easier).

    PLease NOTE: Lost the other part of the Tutorial, i'll post it when i find it. Hope you understand my stupidity.
    Last edited by o0slowpaul0o; 07-27-2005 at 04:12 PM.

  2. #2
    MicrotechXP's Avatar
    MicrotechXP is offline x10 Spammer MicrotechXP is an unknown quantity at this point
    Join Date
    Feb 2005
    Location
    USA,California
    Posts
    3,822

    Re: Make Your Own CMS

    Very Nice tutoraial! I am shure this will help people that wanat to make there own.

  3. #3
    o0slowpaul0o's Avatar
    o0slowpaul0o is offline x10 Sophmore o0slowpaul0o is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    127

    Re: Make Your Own CMS

    Quote Originally Posted by Auvee
    Good tutorial slowpaul. I've noticed you've been making lots of tutorials for the community here, I was wondering if you would be interested in becoming a tutorial writer for ElementFx (a new project of mine)?

    -Auvee B.
    Sure thing, life abit sucky right now, but I can come on every now and then....Hoping to be mod of this place. >.<;;; Nah, joking. Sure I'll do it and thanks for the comments. Oh yeah just call me Pauly, Paul-O or Paul. ^.^;;

  4. #4
    n4tec's Avatar
    n4tec is offline Lord Of The Keys n4tec is an unknown quantity at this point
    Join Date
    Feb 2005
    Location
    GeT NOTICED via n4tec
    Posts
    1,656

    Re: Make Your Own CMS

    really nice tutorial you have there.. Keep up your good work..
    .::: Regards, n4tec :::.


  5. #5
    dipeshsilwal1's Avatar
    dipeshsilwal1 is offline x10Hosting Member dipeshsilwal1 is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    HELL
    Posts
    92

    Re: Make Your Own CMS

    good tutorial i might use it.

  6. #6
    Brandon Guest

    Re: Make Your Own CMS

    Please find the rest

  7. #7
    Arucard98's Avatar
    Arucard98 is offline x10 Sophmore Arucard98 is an unknown quantity at this point
    Join Date
    Jul 2005
    Location
    Arizona USA
    Posts
    160

    Re: Make Your Own CMS

    Thx! This will definately help me out with what I want to do with my website!

    Bookmarked!

  8. #8
    saulito Guest

    Re: Make Your Own CMS

    ooOoooo...I have been looking for a tutorial like this! please finish!

  9. #9
    Burak is offline x10 Sophmore Burak is an unknown quantity at this point
    Join Date
    Jul 2005
    Posts
    129

    Re: Make Your Own CMS

    Good for starters, thank u

  10. #10
    Lukasz's Avatar
    Lukasz is offline x10 Sophmore Lukasz is an unknown quantity at this point
    Join Date
    Aug 2005
    Posts
    150

    Smile Re: Make Your Own CMS

    hey how are ya o0slowpaul0o
    yes indeed it is a very nice tutorial :blink:

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Make these pictures look catoonish
    By SEŅOR in forum The Marketplace
    Replies: 10
    Last Post: 03-08-2006, 11:02 AM
  2. Can anyone make me a banner?
    By MicrotechXP in forum The Marketplace
    Replies: 62
    Last Post: 01-02-2006, 09:56 PM
  3. Can anyone make me a banner or two
    By Kay in forum The Marketplace
    Replies: 12
    Last Post: 12-22-2005, 08:11 PM
  4. Make A Cool Advanced Brushed Sig
    By redtailblackshark in forum Tutorials
    Replies: 34
    Last Post: 10-22-2005, 07:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers