万本电子书0元读

万本电子书0元读

顶部广告

concrete5 Cookbook电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:David Strack

出  版  社:Packt Publishing

出版时间:2013-07-26

字       数:130.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
The Cookbook-style recipes allow you to go both directly to your topic of interest or follow topics throughout a chapter to gain in-depth knowledge. This practical Cookbook will cater to the needs of both intermediate and advanced concrete5 developers.This book is geared towards intermediate to advanced PHP developers who would like to learn more about the concrete5 content management system. Developers already familiar with concrete5 will learn new time-saving tricks and will find the book to be a great reference tool.
目录展开

concrete5 Cookbook

Table of Contents

concrete5 Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers and more

Why Subscribe?

Free Access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Pages and Page Types

Introduction

A note about the code in this chapter

Create a custom debugging function

Getting the current Page object

How to do it...

How it works...

There's more...

See also

Getting a Page object by its ID

Getting ready

How to do it...

How it works...

See also

Getting a Page object by its path

Getting ready

How to do it...

How it works...

There's more...

See also

Getting a page type by its ID

Getting ready

How to do it...

How it works...

See also

Getting a page type by its handle

Getting ready

How to do it...

How it works...

There's more...

See also

Getting a page type's ID

Getting ready

How to do it...

How it works...

See also

Getting a page type's name

Getting ready

How to do it...

How it works...

See also

Getting a page type's handle

Getting ready

How to do it...

How it works...

See also

Getting the icon for a page type

Getting ready

How to do it...

How it works...

There's more...

See also

Getting a list of pages that belong to a page type

Getting ready

How to do it...

How it works...

See also

Creating a page type

Getting ready

How to do it...

How it works...

There's more...

See also

Updating a page type

How to do it...

How it works...

See also

Deleting a page type

Getting ready

How to do it...

How it works...

See also

Creating a page type

Getting ready

How to do it...

How it works...

There's more...

See also

Updating an existing page

Getting ready

How to do it...

How it works...

There's more...

See also

Setting page attributes

Getting ready

How to do it...

How it works...

There's more...

See also

Getting a page attribute

Getting ready

How to do it...

How it works...

See also

Getting a page's ID

Getting ready

How to do it...

See also

Getting a page's path

How to do it...

See also

Getting a page's handle

How to do it...

See also

Getting a page's name

How to do it...

See also

Getting a page's description

Getting ready

How to do it...

See also

Getting a page's page type ID

How to do it...

See also

Getting a page's page type handle

How to do it...

See also

Getting a page's theme object

How to do it...

See also

Getting the children below a page

How to do it...

How it works...

Moving a page

Getting ready

How to do it...

How it works...

See also

Deleting a page (and its children)

Getting ready

How to do it...

How it works...

There's more...

See also

Getting a list of pages

Getting ready

How to do it...

How it works...

There's more...

Adding a page selector field to a form

Getting ready

How to do it...

How it works...

There's more...

2. Working with Blocks

Introduction

Creating a custom block type

Getting ready

How to do it...

How it works...

See also

Using block controller callback functions

Getting ready

How to do it...

How it works...

There's more...

See also

Sending variables from the controller to the view

Getting ready

How to do it...

See also

Adding items to the page header and footer from the block controller

Getting ready

How to do it...

How it works...

See also

Creating custom block templates

Getting ready

How to do it...

There's more...

See also

Including JavaScript in block forms

Getting ready

How to do it...

How it works...

See also

Including JavaScript in the block view

Getting ready

How to do it...

How it works...

See also

Including CSS in the block view

Getting ready

How to do it...

How it works...

See also

Loading a block type by its handle

Getting ready

How to do it...

How it works...

Adding a block to a page

Getting ready

How to do it...

How it works...

See also

Getting the blocks from an area

Getting ready

How to do it...

How it works...

3. Files and File Sets

Introduction

A note about the code in this chapter

Loading a file by its ID

Getting ready

How to do it...

How it works...

Getting a file's path

Getting ready

How to do it...

How it works...

There's more...

See also

Getting a list of files

Getting ready

How to do it...

How it works...

There's more...

See also

Uploading a file to the file manager

Getting ready

How to do it...

How it works...

See also

Loading a file set by its ID

Getting ready

How to do it...

How it works...

There's more...

See also

Adding a file to a file set

Getting ready

How to do it...

How it works...

There's more...

See also

Removing a file from a file set

Getting ready

How to do it...

How it works...

See also

Checking if a file is part of a file set

Getting ready

How to do it...

How it works...

See also

Getting all of the files in a file set

Getting ready

How to do it...

How it works...

See also

Duplicating a file

Getting ready

How to do it...

How it works...

Deleting a file

Getting ready

How to do it...

How it works...

Reindexing a file's search attributes

Getting ready

How to do it...

How it works...

Setting passwords on file objects

Getting ready

How to do it...

How it works...

There's more...

See also

Setting permissions on files

Getting ready

How to do it...

There's more...

See also

Getting the download URL for a file

Getting ready

How to do it...

How it works...

See also

Getting the download statistics for a file

Getting ready

How to do it...

How it works...

Adding a file picker to a form

Getting ready

How to do it...

How it works...

There's more...

See also

4. Using the Core Helpers

Introduction

A note about the code in this chapter

Loading a helper class

How to do it...

How it works...

There's more...

Using the Date helper

Getting ready

How to do it...

How it works...

Using the Encryption helper

Getting ready

How to do it...

How it works...

See also

Loading an RSS feed with the Feed helper

How to do it...

How it works...

There's more...

Managing files and directories with the File helper

Getting ready

How to do it...

How it works...

There's more...

See also

Creating custom forms with the Form helper

Getting ready

How to do it...

How it works...

There's more...

See also

Including a WYSIWYG editor on a form

Getting ready

How to do it...

How it works...

See also

Generating HTML code with the HTML helper

Getting ready

How to do it...

How it works...

See also

Generating and caching thumbnails with the Image helper

Getting ready

How to do it...

How it works...

There's more...

See also

Encoding and decoding JSON with the JSON helper

How to do it...

How it works...

See also

Sending e-mails with the Mail helper

How to do it...

How it works...

There's more...

See also

Determining the MIME type of a file extension using the MIME helper

How to do it...

How it works...

There's more...

See also

Getting page URLs and breadcrumbs with the Navigation helper

Getting ready

How to do it...

How it works...

See also

Working with strings using the Text helper

How to do it...

How it works...

There's more...

See also

Generating URLs with the URL helper

How to do it...

How it works...

There's more...

See also

Validating input data using the Validation helpers

Getting ready

How to do it...

How it works...

There's more...

See also

Preventing spam using the Captcha helper

Getting ready

How to do it...

How it works...

See also

Getting a list of countries

How to do it...

How it works...

See also

Getting a list of states and provinces

How to do it...

How it works...

There's more...

See also

Showing a color picker on a form

Getting ready

How to do it...

How it works...

See also

Showing a date/time selector on a form

Getting ready

How to do it...

How it works...

There's more...

See also

Showing a rating widget on a form

How to do it...

How it works...

There's more...

See also

Using the banned words list

How to do it...

How it works...

There's more...

See also

Reading and writing to the system cache

Getting ready

How to do it...

How it works...

There's more...

See also

Writing to the debug log

How to do it...

Reading and writing to the configuration registry

How to do it...

How it works...

5. Working with Databases and Models

Introduction

Configuring database credentials

How to do it...

How it works...

Loading the database object

How to do it...

How it works...

There's more...

Retrieving data from the database

Getting ready

How to do it...

How it works...

There's more...

See also

Writing data to the database

Getting ready

How to do it...

How it works...

There's more...

Guarding against SQL injections using prepared statements

Getting ready

How to do it...

How it works...

There's more...

See also

Creating a custom model class

Getting ready

How to do it...

How it works...

There's more...

See also

Reading from the database with active record

Getting ready

How to do it...

How it works...

See also

Writing to the database with active record

Getting ready

How to do it...

How it works...

See also

Updating a database record with active record

Getting ready

How to do it...

How it works...

See also

Searching the database using active record

Getting ready

How to do it...

How it works...

There's more...

See also

Deleting objects using active record and model classes

Getting ready

How to do it...

How it works...

See also

Defining relationships with active record

Getting ready

How to do it...

How it works...

There's more...

See also

6. Creating CRUD Interfaces

Introduction

A note about the data in this chapter

Creating controller files for single pages on the dashboard

Getting ready

How to do it...

How it works...

See also

Creating view files for single pages on the dashboard

Getting ready

How to do it...

How it works...

See also

Adding single pages to the dashboard

Getting ready

How to do it...

How it works...

See also

Creating a form to create items

Getting ready

How to do it...

How it works...

There's more...

See also

Saving data to the database from a controller

Getting ready

How to do it...

How it works...

There's more...

See also

Creating a view to display a list of database items

Getting ready

How to do it...

How it works...

See also

Adding editing capabilities to create a form

Getting ready

How to do it...

How it works...

There's more...

See also

Creating a delete action

Getting ready

How to do it...

How it works...

There's more...

See also

7. Working with Users and Permissions

Introduction

Checking if the current user is logged in

How to do it...

How it works...

Getting the currently logged-in user

Getting ready

How to do it...

How it works...

See also

Loading a user by its ID

How to do it...

How it works...

See also

Loading a user by its username

How to do it...

How it works...

See also

Getting a user's info

Getting ready

How to do it...

How it works...

See also

Setting a user's attributes

Getting ready

How to do it...

How it works...

See also

Retrieving a user's attributes

Getting ready

How to do it...

How it works...

There's more...

See also

Loading a group by its ID

How to do it...

How it works...

See also

Loading a group by its name

How to do it...

How it works...

See also

Adding a user to a group

How to do it...

How it works...

See also

Getting all of the users from a group

How to do it...

How it works...

See also

Checking if a user is a member of a group

How to do it...

How it works...

See also

Removing a user from a group

How to do it...

How it works...

See also...

Logging out a user

How to do it...

How it works...

See also

Deleting a user

How to do it...

How it works...

See also

Getting the permission object

How to do it...

How it works...

There's more...

See also

Checking if a user can read a page

How to do it...

How it works...

There's more...

See also

Checking if a user can edit a page

How to do it...

How it works...

There's more...

See also

Checking a user's file permissions

How to do it...

How it works...

There's more...

8. Working with Themes and Add-ons

Introduction

Creating a custom theme

Getting ready

How to do it...

How it works...

There's more...

See also

Including the concrete5 required scripts and styles

Getting ready

How to do it...

How it works...

There's more...

See also

Defining editable content areas

Getting ready

How to do it...

How it works...

There's more...

See also

Creating page type templates

Getting ready

How to do it...

How it works...

There's more...

See also

Using elements for repeated portions of HTML

Getting ready

How to do it...

How it works...

See also

Customizing system pages

Getting ready

How to do it...

How it works...

See also

Creating a custom add-on package

Getting ready

How to do it...

How it works...

There's more...

See also

Using the package controller to execute custom code

Getting ready

How to do it...

How it works...

See also

9. System Events and Advanced Configuration

Introduction

About the code in this chapter

Declaring advanced configuration variables

How to do it...

How it works...

Enabling events in concrete5

How to do it...

How it works...

There's more...

See also

Listening to system events

Getting ready

How to do it...

How it works...

See also

Passing parameters to event handlers

Getting ready

How to do it...

How it works...

See also

Defining a page type event

Getting ready

How to do it...

How it works...

There's more...

See also

Sending an e-mail when a user creates an account

Getting ready

How to do it...

How it works...

See also

Sending an e-mail when a file has been uploaded

How to do it...

How it works...

See also

Creating a custom scheduled job

Getting ready

How to do it...

How it works...

There's more...

Making your add-on translation ready

How to do it...

How it works...

Rebranding concrete5 as a white label CMS

Getting ready

How to do it...

How it works...

There's more...

See also

Changing the dashboard background image

Getting ready

How to do it...

How it works...

There's more...

See also

A. Blueprint – Creating an Image Gallery Add-on

Before we begin...

Creating the package controller

Creating the block type

The block's controller

The database XML file

The block type's view files

Installing the block type with the package

Installing the package in concrete5

Creating a page for the gallery

Giving life to the block

Filling out the add and edit view files

Creating the gallery view file

Trying out the block

Wrap-up

B. Blueprint – Creating an Events Calendar Add-on

Before we begin...

Creating the package

The package controller

The package database XML file

The model

Single page controllers

Single page views

The event list block type

The block's database XML file

The block view files

Installing the package

Installing the package to the dashboard

Creating the list single page

Creating the list view

Creating the add form single page

The form view file

Adding events to the database

Adding a delete confirmation

Creating the custom block type

Adding the block to a page

Wrapping up

C. Submitting an Add-on Package to the concrete5 Marketplace

The rules

The process

The Peer Review Board

Selling your add-on

Once the add-on is approved...

Official resources

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部