Kae Verens | CMS Design Using PHP and jQuery [2010] [En] [PDF]
Автор: Kae Verens
Название: CMS Design Using PHP and jQuery
Год: 2010
Издательство: Packt Publishing Ltd.
ISBN: 978-1-849512-52-7
Отрасль (жанр): Веб-дизайн и программирование
Язык: Английский
Формат: PDF
Качество: Изначально электронное (ebook)
Описание:PHP и jQuery являются двумя самыми востребованными и основными стандартами разработки web сайтов. Эта книга прежде всего подойдет уже освоившимся в PHP разработчикам и расскажет о особенностях создания собственной CMS. Прочитав данную книгу вы сможете разработать свою CMS в функционал которой будет входить: написание статей, вывод их на сайт, редактирование, создание расширений для CMS и все, что необходимо для нынешних потребностей в web'е.
В книге объясняются особенности использования PHP, MySQL и jQuery, их взаимодействие между собой.
После прочтения книги вы сможете создать собственную защищенную и гибкую CMS.
PHP and jQuery are two of the most famous open source frameworks 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 written, and how to add custom plugins that can then be tailored to the individual project. 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.
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. Each chapter walks you through the 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 and capabilities.
Table of Contents
Preface 1
Chapter 1: CMS Core Design 7
The CMS's private and public areas 8
The front-end 8
The admin area 10
Plugins 11
Files and databases 12
Directory structure 12
Database structure 14
The configuration file 15
Hello World 16
Setup 16
Front controller 20
Reading page data from the database 23
Summary 32
Chapter 2: User Management 33
Types of users 33
Roles 34
Database tables 36
Admin area login page 38
Logging in 47
Logging out 53
Forgotten passwords 55
User management 60
Deleting a user 63
Creating or editing a user 64
Summary 67
[ ii ]
Chapter 3: Page Management – Part One 69
How pages work in a CMS 69
Listing pages in the admin area 70
Hierarchical viewing of pages 73
Moving and rearranging pages 77
Administration of pages 78
Filling the parent selectbox asynchronously 87
Summary 89
Chapter 4: Page Management – Part Two 91
Dates 91
Saving the page 94
Creating new top-level pages 98
Creating new sub-pages 100
Deleting pages 101
Rich-text editing using CKeditor 103
File management using KFM 107
Summary 113
Chapter 5: Design Templates – Part One 115
How do themes and templates work? 115
File layout of a theme 118
Setting up Smarty 120
Front-end navigation menu 126
Summary 132
Chapter 6: Design Templates – Part Two 133
Adding jQuery to the menu 133
Preparing the Filament Group Menu 134
Integrating the menu 137
Choosing a theme in the administration area 141
Choosing a page template in the administration area 147
Running Smarty on page content 150
Summary 152
Chapter 7: Plugins 153
What are plugins? 153
Events in the CMS 154
Page types 155
Admin sections 155
Page admin form additions 155
Example plugin configuration 156
Enabling plugins 158
Handling upgrades and database tables 163
Custom admin area menu 166
Adding an event to the CMS 173
Adding tabs to the page admin 179
Summary 185
Chapter 8: Forms Plugin 187
How it will work 187
The plugin config 188
Page types in the admin 190
Adding custom content forms to the page admin 194
Defining the form fields 200
Showing the form on the front-end 206
Handling the submission of the form 211
Sending by e-mail 214
Saving in the database 215
Exporting saved data 217
Summary 219
Chapter 9: Image Gallery Plugin 221
Plugin configuration 222
Page Admin tabs 223
Initial settings 224
Uploading the Images 226
Handling the uploads 228
Adding a kfmget mod_rewrite rule 229
Deleting images 230
Front-end gallery display 232
Settings tab 235
Grid-based gallery 239
Summary 243
Chapter 10: Panels and Widgets – Part One 245
Creating the panel plugin 245
Registering a panel 248
The panel admin area 251
Showing panels 252
Creating the content snippet plugin 255
Adding widgets to panels 256
Showing widgets 257
Dragging widgets into panels 258
Saving panel contents 261
Showing panels on the front-end 264
Summary 266
Chapter 11: Panels and Widgets – Part Two 267
Widget forms 267
Saving the snippet content 274
Renaming widgets 276
Widget header visibility 277
Disabling widgets 279
Disabling a panel 280
Deleting a panel 282
Panel page visibility – admin area code 283
Panel page visibility – front-end code 289
Widget page visibility 289
Summary 291
Chapter 12: Building an Installer 293
Installing a virtual machine 294
Installing VirtualBox 294
Installing the virtual machine 295
Installing the CMS in the VM 300
Creating the installer application 302
Core system changes 302
The installer 303
Checking for missing features 304
Adding the configuration details 309
Summary 315
Index 317
Примеры страниц:
Время раздачи: С 10:00 до 24:00 (24/7 - круглосуточно)