Book Image

CMS Design Using PHP and jQuery

By : Kae Verens
Book Image

CMS Design Using PHP and jQuery

By: Kae Verens

Overview of this book

<p>PHP and JQuery are two of the most famous open source tools used for web development. This book will explain how to leverage their power by building a core CMS, which can be used for most projects without needing to be changed, and how to add custom plugins that can then be tailored to the individual project.<br /><br />This book walks you through the creation of a CMS core, including basic page creation and user management, followed by a plugin architecture, and example plugins. Using the methods described in this book, you will find that you can create 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.<br /><br />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, template-driven site design, and an installer.<br />Each chapter walks you through the problems of various aspects of CMS design and their solutions, with example code and explanation provided for the chosen solutions.</p> <p>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.<br />By the end of the book, you will have developed a full CMS, which can be used to create a large variety of different site designs and capabilities.</p>
Table of Contents (19 chapters)
CMS Design Using PHP and jQuery
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
11
Panels and Widgets — Part Two

Roles


The solution is not to use flags, but to use "roles" (also called "groups").

A role is a group of permissions which you can assign to a user. I will use the words "role" and "group" interchangeably in the book—they essentially mean the same thing when speaking of user rights.

For example, you might have a role such as "page editor", which includes the following permissions:

  • Can create pages

  • Can delete pages

  • Can edit pages

You might have a user who is allowed to edit pages and also to edit online store products, in which case you need to either have a single group which covers all those permissions, or two groups ("page editor" and "online store editor"), and the user is a member of both.

The latter case, multiple groups, is much easier to manage, and is in fact necessary; as the number of possible combinations of permissions grows exponentially, more roles are created.

Another important question is, where do these role names come from? Does an administrator create them?

It's an interesting...