PEAR Articles
  Home arrow PEAR Articles arrow Building a Content Management System w...
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PEAR ARTICLES

Building a Content Management System with PEAR
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-10-01

    Table of Contents:
  • Building a Content Management System with PEAR
  • The database structure
  • Tables
  • The PEAR::DB connection

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building a Content Management System with PEAR


    (Page 1 of 4 )

    In the previous articles we looked at what PEAR is, how it works and how to install packages. We also explored various packages that we installed. One of these packages was called PEAR::DB. We will be using this database abstraction layer to build a CMS in the next couple of articles.

    Overview of CMS

    The CMS works like this: several authors will send in articles which are then processed, stored and displayed in the CMS. It follows these rules:

    • Anyone who wants to use the CMS must be authenticated. This ensures that only users that have the right to use the system are using it.

    • Different users will have different clearance levels. Some will have admin rights and others will not.

    • The CMS home page will display the latest five stories. Users can click on them to view the stories or articles in detail.

     

    The authentication section will consist of two scripts:

    Login.php - This script is responsible for authenticating a user; in other words, logging a user into the CMS system.

    Logout.php - This script is responsible for ending a user session, which basically means logging a user out of the CMS system.

    The main CMS section will contain the following four scripts:

    main.php - This script acts as the "door" to the CMS application. It is the first page that you will see when accessing the Content Management System.

    view.php - This script displays a user-selected article in full.

    authors.php - This script lists all the authors in the system. It also provides links to articles written by the author.

    authart.php - This script list all the articles written by a particular author.

    The admin section contains four scripts:

    Add_auth.php - This script adds a new author to the system.

    Delete.php - This script deletes an author from the system, including all articles written by the particular author.

    Index.php - This script displays a welcome message. It is the first screen that you will encounter when accessing the admin area.

    Listauth.php - This script displays the names of the authors that are in the system. It also provides a facility to remove authors from the system. When removing an author, all the articles that he or she wrote are also automatically removed.

    Other application-wide scripts include:

    pear.css - This script contains the styles for the site.

    main.dwt.php - This item provides the template for the entire Content Management System

    connx.php - This script contains the connection credentials of the application.

    More PEAR Articles Articles
    More By David Web


       · This is what pear.php.net says about the DB Package:This package has been...
     

    PEAR ARTICLES ARTICLES

    - Deleting Authors from a PEAR Content Managem...
    - PEAR CMS: Index and Delete Scripts
    - Listing Articles for a PEAR Content Manageme...
    - Building an Authors Page for a PEAR CMS
    - Building the View Details Page in a PEAR CMS
    - Creating the Main Pages of a PEAR CMS
    - Completing the Login Script for a PEAR CMS
    - User Authentication for a PEAR CMS
    - A PEAR CMS: Examining the Code
    - Building a Content Management System with PE...
    - Installing a PEAR Package
    - My PEAR: The Beginning
    - Using XML_RPC2 with PEAR
    - Using Web Service APIs (Amazon and Yahoo!) w...
    - Database Abstraction with MDB2 from PEAR





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT