CMS Design Using PHP and jQuery potx

340 819 0
CMS Design Using PHP and jQuery potx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... distinctly different websites and web projects using one codebase, web design templates, and custom-written plugins for any site-specific differences Example code and explanation is provided for the entire project This book describes how to use PHP, MySQL, and jQuery to build an entire CMS from the ground up, complete with plugin architecture, user management, templatedriven site design, and an installer Each... /ww.incs /j /ww .php_ classes /ww.plugins /ww.skins # # # # # # # # # # # web root configuration directory admin area CMS caches admin-uploaded file resources CMS images CMS function libraries CMS JavaScript files CMS PHP class files CMS plugins templates There are only two files kept in the web root All others are kept in whichever directory makes the most sense for them [ 13 ] CMS Core Design The two... requester The CMS version of this is: The website is sent a HTTP request This request is parsed by the CMS engine, and any required plugins are initialized and run with the HTTP parameters Then the plugins are finished, they return their results to the CMS, which then renders the results using an HTML template, and sends the result of that back to the browser And a real-life example: The CMS is asked... problems and solutions to various aspects of CMS design, with example code and explanation provided for the chosen solutions A plugin architecture is explained and built, which allows you to enhance your own CMS by adding site-specific code that doesn't involve "hacking" the core CMS By the end of this book, you will have developed a full CMS which can be used to create a large variety of different site designs... use the name "cmsdb" for the database, with the username "cmsuser" and the password "cmspass" You can use phpMyAdmin or some other similar tool to create the database I prefer to do it using the MySQL console itself mysql> create database cmsdb; Query OK, 1 row affected (0.00 sec) mysql> grant all on cmsdb.* to cmsuser@localhost identified by 'cmspass'; Query OK, 0 rows affected (0.00 sec) mysql> flush... all of this manually In your web root, create a directory and call it private This directory will hold the config file Create the file private/config .php and add a basic config (tailored to your own settings): < ?php $DBVARS=array( 'username'=>'cmsuser', 'password '=>'cmspass', 'hostname'=>'localhost', 'db_name' =>'cmsdb' ); This will be expanded throughout the book as we add new capabilities to the... http://www.packtpub.com/support This book's CMS is based on a previously written one called WebME (Website Management Engine), which has many more plugins written for it than are described in this book—you can download that version of the project here: https://code.google.com/p/webworks-webme/ CMS Core Design The CMS' s private and public areas A CMS consists of the management area (admin area), and the publicly visible... difference between CMS and non -CMS sites is their treatment of a "web page" In a non -CMS website, when you request a certain URL from the web server, the web server sees if the requested file exists, and if it does, it returns it Very simple This is because there is a very clear definition of what is a web page, and that is tied explicitly to the URL http://example.com/page1.html and http://example... different site designs and capabilities What this book covers Chapter 1, CMS Core Design, discusses how a content management system works, and the various ways to administrate it, followed by code which allows a page to be retrieved from a database based on the URL requested Preface Chapter 2, User Management, expands on the CMS to build an administration area, with user authentication, and finish with a... /news?page=2 The CMS realizes /news uses the "news" plugin and starts that up, passing it the "page=2" parameter The plugin grabs the information it needs from the database and sends its result back to the CMS The CMS then creates HTML by passing it all through the template, and sends that back to the browser This, in a nutshell, is exactly how the public side (the front-end) of our CMS will work So, . class="bi x0 y0 w0 h0" alt="" CMS Design Using PHP and jQuery Build and improve your in-house PHP CMS by enhancing it with jQuery Kae Verens BIRMINGHAM. d f r o m W o w ! e B o o k < w w w.woweb o o k . c o m > CMS Design Using PHP and jQuery Copyright © 2010 Packt Publishing All rights reserved. No

Ngày đăng: 15/03/2014, 19:20

Từ khóa liên quan

Mục lục

  • Cover

  • Copyright

  • Credits

  • About the Author

  • Acknowledgement

  • About the Reviewers

  • Table of Contents

  • Preface

  • Chapter 1: CMS Core Design

    • The CMS's private and public areas

      • The front-end

      • The admin area

      • Plugins

      • Files and databases

        • Directory structure

        • Database structure

        • The configuration file

        • Hello World

          • Setup

          • Front controller

          • Reading page data from the database

          • Summary

          • Chapter 2: User Management

            • Types of users

            • Roles

Tài liệu cùng người dùng

Tài liệu liên quan