Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts

    My CMS - How is my structure?

    Hey, I'm making a very simple CMS to practice my PHP and MySQL. Please let me know if you think I am heading in the right direction & give suggestions.

    Database:
    I have tables for: Header, Sidebar, Navigation, Page1 content, Page2 content, ext...

    each table stores the output. For example the navigation talbe is made up of 3 fields: ID. URL, Anchor Text.

    I then insert PHP into the website that retrieves the info from my database and inserts it into the HTML. I use loops so it will output all rows.

    I then made ADMIN area that allows the user to update/delete or add information into the database.

  • #2
    New Coder
    Join Date
    Nov 2007
    Posts
    12
    Thanks
    0
    Thanked 1 Time in 1 Post
    header, sidebar, navigation, pages
    ... those are your tables

    I think you are doing a good job
    and hopefully those will work without any future changes in DB

    Regards
    echo "PHP 5.2.5";
    exit ( "Script End" );

  • #3
    Senior Coder
    Join Date
    Jul 2005
    Location
    UK
    Posts
    1,051
    Thanks
    6
    Thanked 13 Times in 13 Posts
    You certainly shouldn't need individual tables for page content, and I'm dubious about individual tables for headers, navigation etc... though it does depend on the applications of the final CMS.

  • #4
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts
    Thanks for the suggestion, I tried to improve my structure.

    I put Header/Navigation/Sidebar all in to one table: "staic_element" (because they stay the same on every page)

    I then made a table for storing content:"page_content". Store the title, sub title, page to published on, ID. (will add more as my CMS advances)

    And I made a "config" table to set up all the basic stuff and constants.

  • #5
    New Coder
    Join Date
    Sep 2007
    Location
    Hanoi, Vietnam
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Good Idea, and you make a breakthough, at least I see your desire .

    I see your CMS structure, it's good. But it's only for a small CMS. if you want a stronger CMS, you have to think about a more total solution. Header/Navigation/Sidebar.. is only the HTML Module and it should not be a "physical" module. A suggest, you can learn from a bit from Joomla/Mamboo's CMS Enginerring, and this is my Raaapid CMS (developing) structure:

    - a "web page" generated by complex of it's components, modules, bots (just like joomla, it's a very smart way)
    - Classify "modules" into 2 types: HTML Block (only HTML codes) and PHP (include phpfile and return HTML codes to combine with global HTML Templates...)
    - the "bots" used to render, optimize your HTML Codes generated before..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •