SitePoint Sponsor

User Tag List

View Poll Results: Your views on this Thread.

Voters
13. You may not vote on this poll
  • Yes! This thread is useful for me.

    6 46.15%
  • Yes! This thread helps me to develop a new script.

    1 7.69%
  • Yes! This thread helps me to further develop my new script.

    1 7.69%
  • Yes! This thread allow me to learn another Language.

    1 7.69%
  • No! This thread did not help me at all.

    2 15.38%
  • No! This thread is just about another Content Management System in SitepointForums.

    2 15.38%
Page 1 of 2 12 LastLast
Results 1 to 25 of 40
  1. #1
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TOPIC: Step by Step, Building a Simple Content Management System Using Php and MySql

    MY COMMENT:
    Greeting Everybody,

    I am sure that those who have read Kevin's articles on how to build a database-driven site using PHP/MySQL will be facing some trouble and don't even know how to start it IF he/she don't even know what PHP and MYSQL are.

    And if you want to build one of such Simple Content Management System please follow this thread.
    (I mean really Simple CMS that can publish articles on the site, Arrange author, Date Stamp, Biograph and many more. Not as complex found on Cgi-resources, HotScripts.com or other places)

    As for those who know how or have even built a simple/complex CMS(Content Management System) can they try to give us advice and steps to be taken on the long journey on how to built a Simple CMS.

    If you want to read Kevin's articles
    CLICK HERE

    REQUIREMENT:
    Now let's start first with the requirement needed to start with the constructions:

    You do not need to have a hosting on the internet and this works in your own computer.(YES! your very own computer.)

    You need to download:

    PHP 4.04pl1
    Apache 1.3.19
    phpMyAdmin2.01
    MySQL 3.23 + win GUI

    To download all this Software(8.89MB) in one GO
    Please Click Here to download all the software.

    AFTER downloading it please follow:
    download and extract the zip file to c:/ the bundle is preconfigured for installation in c:/phpdev3/etc... if you extract to c: the zip file will take care of the rest - if you try and extract to c:/phpdev3 or c/unzipped/ or c:/temp etc - then it 'aint gonna work - start out by extracting to c:/ have a play and then later on you can move it elsewhere - noting that this means altering PHP's .ini file and Apaches httpd.conf files.
    This will be the first step on building the Simple CMS.

    Hope more people will join in this thread and together we built it.
    Join and help us build a simple
    Version of SitePoint CMS(Content Management System).

    Step by Step, Building a Simple Content
    Management System Using Php and MySql

  2. #2
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a very interesting concept for a thread. I've got quite a bit of experience with PHP content management now so I'll be happy to chip in with code snippets etc as we go along.

  3. #3

  4. #4
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By Skunk
    This is a very interesting concept for a thread. I've got quite a bit of experience with PHP content management now so I'll be happy to chip in with code snippets etc as we go along.
    Thank you for your support.

    Can you please tell us what shall we do after we have install the

    PHP 4.04pl1
    Apache 1.3.19
    phpMyAdmin2.01
    MySQL 3.23 + win GUI

    What do we have to do next.
    Join and help us build a simple
    Version of SitePoint CMS(Content Management System).

    Step by Step, Building a Simple Content
    Management System Using Php and MySql

  5. #5
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK I have 2 questions (second one is irrelevant if the answer to the first is a yes )

    1. I have my site hosted on W2K server running IIS, can I run PHP/MySQL on my site without getting my hosting Co. to install any software? If it can only be run if my host has software installed is there any way to (quickly) test a page.

    2. If the answer to question 1 is no, could somebody drum up an ASP guru to post alongside and take us through each step in asp and Vbscript.

    Hope this all makes sense

  6. #6
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To Be_Found,

    You can come up with a simple application, and how CMS applies to it.
    - What are the specifications, limitations, dos and don'ts
    - Sketch a system flow chart
    - Prepare fields, tables, database info

    A simple application that allows add, view, delete, modify info options. These are the 4 fundemental or basic actions.
    At this point, there is no coding happy - just write info on a scratch paper.
    John
    Last edited by johnn; May 10, 2001 at 23:11.

  7. #7
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am sure that many people were curious about Sitepoint CMS.
    And in this thread we will take SitePoint and it's network site.
    webmasterbase.com, ecommercebase.com, promotionbase.com
    to search for their Content Management System.

    This is my research result.

    This is only a rough strach about Sitepoint MySql table.
    But it should contain more than one table.

    For reference only:

    Site ID 1
    webmasterbase.com

    Site ID 2
    ecommercebase.com

    Site ID 3
    promotionbase.com

    Code:
    |  Article ID    |    Site ID      |    Sub-Site ID 
    --------------------------------------------------
                       |      1            |   1  Getting Started
    --------------------------------------------------
                      |       1           |   2  Coding
    --------------------------------------------------
                      |       1           |   3  Design
    --------------------------------------------------
                       |                   |   4  Deleted
    --------------------------------------------------
                       |        1          |   5  Reviews
    --------------------------------------------------
                       |       1           |   6  Manage Operations
    --------------------------------------------------
                       |                   |   7  Deleted
    --------------------------------------------------
                       |                   |   8  Deleted
    --------------------------------------------------
                       |         2         |   9  Success Stories
    --------------------------------------------------
                       |                   |   10  Deleted
    --------------------------------------------------
                       |        2          |   11  Getting Started
    --------------------------------------------------
                       |        2          |   12  Boosting Revenues
    --------------------------------------------------
                       |                   |   13  Deleted
    --------------------------------------------------
                       |                   |   14  Deleted
    --------------------------------------------------
                       |         3         |   15  Increase Traffic
    --------------------------------------------------
                       |         3         |   16  Link Swaps
    --------------------------------------------------
                       |          3        |   17  Community
    --------------------------------------------------
                       |         3         |   18  Tips & Tricks
    --------------------------------------------------
                       |         3         |   19  Reviews
    --------------------------------------------------
                       |                   |   20  Deleted
    --------------------------------------------------
                       |                   |   21  Deleted
    --------------------------------------------------
                       |         2         |   22  Manage Operations
    --------------------------------------------------
                       |         2         |   23  Affiliate Programs
    --------------------------------------------------
                       |          3        |   24  Search Engines
    --------------------------------------------------
                       |                   |   25  Deleted
    --------------------------------------------------
                       |                   |   26  Deleted
    --------------------------------------------------
                       |         1         |   27  On the Web
    --------------------------------------------------
    If anyone could draw more Better Please post here.
    Thanks.
    Last edited by Be_Found; May 10, 2001 at 08:46.
    Join and help us build a simple
    Version of SitePoint CMS(Content Management System).

    Step by Step, Building a Simple Content
    Management System Using Php and MySql

  8. #8
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good idea. To save re-creating Kevins article, it might be worth assuming everyone here has read it and use this thread to discuss problems that come up relating to it.

    For example I had particular problems providing online forms which would be used to update pages, via a database. One problem was understanding regular expressions. Also I found that submissions containing apostrophies: ' caused a MySQL error. The way I get round that now using replacing them with the equivalent HTML special character.

    This script (found at hotscripts.com) was useful for making submitted HTML "safe".

    http://www.halspastill.com/ymse/safehtml.phps



    Also it might be worth building a content management system online, using one of the free PHP/MySQL hosts like http://www.f2s.com or http://www.datablocks.net - we all chip in and build pages and you direct us.

  9. #9
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ReBrief again

    Step 1: Download: Software
    Step 2: Read: Building a Database-Driven Web Site Using PHP and MySQL
    Step 3: Building/Designing: Mysql table.

    Topic: What to include in the table.

    If we were going to follow SitePoint CMS then we will have feature like below and we will include some non-existing feature found in Sitepoint.

    - Article ID

    - Site ID
    -- Site Category ID

    - Author ID
    -- First Name
    -- Last Name
    -- Biograph
    -- Picture
    -- Primary E-mail
    -- Secondary E-mail
    -- Contact
    -- more coming...

    - Vote ID
    -- Author
    --- 1, 2, 3, .....9, 10
    -- Article
    --- 1, 2, 3, .....9, 10

    - Review ID
    -- Member ID


    That's all i can think of......for now...
    I will be adding more feature
    and if you want to take a look for the simple Mysql Click here to view
    Last edited by Be_Found; May 11, 2001 at 00:04.
    Join and help us build a simple
    Version of SitePoint CMS(Content Management System).

    Step by Step, Building a Simple Content
    Management System Using Php and MySql

  10. #10
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    by the looks of it you are requring registered users to vote. If you want to allow guests to vote as well you need to modify that table probably and record IP etc.

  11. #11
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sowen - you need to get your host to install PHP and mySQL unfortunately. If you want to test PHP pages you can install Apache, mySQL and PHP on your own windows desktop machine. Grab the development pack from here:

    http://www.firepages.com.au/devindex.htm

    Be_Found - before working out the database tables etc it is important to work out a specificaton of what the content management system will do. Forget about table design and concentrate on what kind of content will be stored, how it will be categorised etc.

  12. #12
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    skunk.

    thanks for the reply. What I was getting at is as I know nothing about php is there a simple 'hello world' bit of code I could stick into a page and upload to see if it works (ie the host already has PHP running/installed) the email support from them takes an age

  13. #13
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a very simple PHP script - save everything in the code block as phpinfo.php and upload it:
    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    If PHP is installed on your host that will display a hufe list of PHP's configuration settings. If PHP isn't installed you won't get anything. You could try saving it as .php3 instead of .php as well since some hosts still need PHP files to end in .php3.

  14. #14
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you want to test a few other more advanced things like database interaction, sending emails etc.. i recommend trying to install vb lite from www.vbulletin.com if you get that working you can do most things (but you will not necessarily be using php4).

  15. #15
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just a big ol' blank page. I have ASP for dummies so I guess it will be a good way of learning both at the same time follow this thread on my local machine and then try to convert it to ASP as I go.

    I think I shall book some long nights noe

  16. #16
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bugger, forgot to say - Thanks skunk

  17. #17
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Az
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Prior to the content management part, what about the initial page layout?

    I am not ready for the content part. However, I've got a question about page layout. I know I'll use content management in the future, but not there yet. For my site layout right now, as far as header, footer, left and right nav bars, should I use includes, or go learn about phpLib? The content on the pages for now is going to be static, I just need the ease of updating the nav bars in one spot and have it update each page.

    Thanks!!

  18. #18
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you are just using one nav bar (ie a footer and a header) than use includes. but phplib templte function rocks

  19. #19
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In a page,I use dreamweaver to insert 4 layers: top, bottom, left and right that act as header, footer, left and right navbars and turn all 4 layers into 4 tables using the dreamweaver feature "layers to tables". And each table is associated with a html file. So, you can do all of them with phplib template.
    Last edited by johnn; May 13, 2001 at 01:08.

  20. #20
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Skunk
    sowen - you need to get your host to install PHP and mySQL unfortunately. If you want to test PHP pages you can install Apache, mySQL and PHP on your own windows desktop machine. Grab the development pack from here:

    http://www.firepages.com.au/devindex.htm
    You can Just Click here to download Apache, mySQL and PHP. http://www.firepages.com.au/devtracker3.htm
    Be_Found - before working out the database tables etc it is important to work out a specificaton of what the content management system will do. Forget about table design and concentrate on what kind of content will be stored, how it will be categorised etc.
    Like i have said, we will be using Sitepoint.com CMS and adding some of our own feature. We will be storing articles, author profile and etc...
    Last edited by Be_Found; May 13, 2001 at 20:20.
    Join and help us build a simple
    Version of SitePoint CMS(Content Management System).

    Step by Step, Building a Simple Content
    Management System Using Php and MySql

  21. #21
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by padders
    by the looks of it you are requring registered users to vote. If you want to allow guests to vote as well you need to modify that table probably and record IP etc.
    There is three option available for us
    1. Anybody can vote and unlimited (No IP recorded and No register needed)
    2. Only allowed register member to Vote. (member Id = 1 Vote per articles)
    3. Record IP only whether a guest or member vote. (1 IP = I vote)

    Conclusion,
    1. The worst.
    2. Good if running a membership content.
    3. Good for general. (Like Sitepoint)
    Last edited by Be_Found; May 13, 2001 at 20:21.
    Join and help us build a simple
    Version of SitePoint CMS(Content Management System).

    Step by Step, Building a Simple Content
    Management System Using Php and MySql

  22. #22
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    A little tip about the voting, don't base it on IP addresses. Becuase this can potentially disallow millions of people from voting. People behind proxies liek AOL users will not be able to vote.

    SO In order to make the voting process available for more users, check based on OS, Browser, Browser Version and IP address all combined.

    Of course, a user could easily vote twice by using a different browser, but this acomodates for more people thus being an advantage.

    *Question for the Developers: You probably won't answer this, and I think I already know the answer but, Does each page have a separate record or do you have one record which you split up using [PAGEBREAK] or somehing similar.

    Thanks
    Peter

  23. #23
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by JohnAz
    Prior to the content management part, what about the initial page layout?

    I am not ready for the content part. However, I've got a question about page layout. I know I'll use content management in the future, but not there yet. For my site layout right now, as far as header, footer, left and right nav bars, should I use includes, or go learn about phpLib? The content on the pages for now is going to be static, I just need the ease of updating the nav bars in one spot and have it update each page.

    Thanks!!
    Let say this, in the real world. You need to invent a product first and then setup the images for your product.

    This is the same as in internet.

    You need to come out by having a good CMS. Only from there you will then need to design the Page Layout.
    (remember that, page layout/design need to change as time passes. Just like the fashion. As to kept updated.)
    Last edited by Be_Found; May 13, 2001 at 20:24.
    Join and help us build a simple
    Version of SitePoint CMS(Content Management System).

    Step by Step, Building a Simple Content
    Management System Using Php and MySql

  24. #24
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by petesmc
    Hi,

    A little tip about the voting, don't base it on IP addresses. Becuase this can potentially disallow millions of people from voting. People behind proxies liek AOL users will not be able to vote.

    SO In order to make the voting process available for more users, check based on OS, Browser, Browser Version and IP address all combined.
    So, in conclusion, Registered members is allowed to vote only.

    opt: check based on OS, Browser, Browser Version and IP address all combined.


    Of course, a user could easily vote twice by using a different browser, but this acomodates for more people thus being an advantage.

    Originally posted by petesmc
    *Question for the Developers: You probably won't answer this, and I think I already know the answer but, Does each page have a separate record or do you have one record which you split up using [PAGEBREAK] or somehing similar.

    Thanks
    Peter
    I really need to think as i am not a developer. I am only a starter on PHP and MySql.
    Last edited by Be_Found; May 13, 2001 at 20:26.
    Join and help us build a simple
    Version of SitePoint CMS(Content Management System).

    Step by Step, Building a Simple Content
    Management System Using Php and MySql

  25. #25
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Be_Found, the idea of the (quote) tag is you quote the other person, then close the quote and then adds your text afterwards. It is very confusing reading what you are writing.

    petesmc, i have just been working on that {page_break} thing and i did it by having just [page_break] added, a lot more efficient i think as you can then change where page_break goes, edit text all from one place, add in another page_break.

    I just split up the article based on something like ***break*** formed an array with the results and then dependant upon the query string set $article to the part of the array you want. Works nicely. You can then build next and previous links based on the difference between total array number and the number from the array you are using.


Bookmarks

Posting Permissions

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