Over 140 recipes to help you develop websites using the concrete5 content management system
Overview
In Detail
concrete5 is an increasingly popular open source content management system because of its incredible and easy-to-use interface. But, it also comes complete with a robust PHP framework, allowing web developers to create custom websites and applications with ease.
"concrete5 Cookbook" is a practical collection of solutions to tasks that both novice and experienced concrete5 developers face on a regular basis. Readers will learn multiple subjects, including full blueprints for developing an event calendar add-on and an image gallery block. Developers new to concrete5 will quickly learn how to customize concrete5 to their needs, and seasoned pros will find it an excellent quick reference for performing specific tasks.
"concrete5 Cookbook" will transform ordinary PHP developers into concrete5 experts capable of bending concrete5 to their will and unleashing the true power of this up-and-coming content management system. Throughout the course of over 140 recipes and 3 bonus project blueprint chapters, PHP developers will learn how to create custom blocks and dashboard interfaces as well as programmatically work with pages, files, users, permissions, and more. Discover the built-in Active Record support that makes working with databases simple and maintainable. Readers will also learn how to take advantage of the numerous helper classes included in concrete5, and will dive deep into the concrete5 MVC framework to create powerful custom websites and applications. Tie together all of the concepts learned in the recipes with 3 bonus chapters featuring complete blueprints to create a calendar add-on, an image gallery block type, and tips on how to sell your themes and add-ons for money!
"concrete5 Cookbook" is a complete collection of recipes to solve the most common (and some not-so-common) tasks that concrete5 developers will face on a regular basis.
What you will learn from this book
Approach
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.
Who this book is written for
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.
Le informazioni nella sezione "Riassunto" possono far riferimento a edizioni diverse di questo titolo.
David Strack
David Strack has been a software engineer for over 10 years. With a strong background in HTML, PHP, and JavaScript, he has developed websites for dozens of companies, large and small. David currently works for a small startup in California creating energy analytics software. He lives in Milwaukee, Wisconsin, with his wife, Sarah, and their crazy dog, Brewski. David can usually be found hacking away with JavaScript, designing mobile apps, watching pro football, and drinking craft beer.
Chapter 1: Pages and Page Types
Chapter 2: Working with Blocks
Chapter 3: Files and File Sets
Chapter 4: Using the Core Helpers
Chapter 5: Working with Databases and Models
Chapter 6: Creating CRUD Interfaces
Chapter 7: Working with Users and Permissions
Chapter 8: Working with Themes and Add-ons
Chapter 9: System Events and Advanced Configuration
Appendix A: Blueprint – Creating an Image Gallery Add-on
Appendix B: Blueprint – Creating an Events Calendar Add-on
Appendix C: Submitting an Add-on Package to the concrete5 Marketplace
Index
Preface
Up
Chapter 1: Pages and Page Types
Introduction
Create a custom debugging function
Getting the current Page object
Getting a Page object by its ID
Getting a Page object by its path
Getting a page type by its ID
Getting a page type by its handle
Getting a page type's ID
Getting a page type's name
Getting a page type's handle
Getting the icon for a page type
Getting a list of pages that belong to a page type
Creating a page type
Updating a page type
Deleting a page type
Creating a page type
Updating an existing page
Setting page attributes
Getting a page attribute
Getting a page's ID
Getting a page's path
Getting a page's handle
Getting a page's name
Getting a page's description
Getting a page's page type ID
Getting a page's page type handle
Getting a page's theme object
Getting the children below a page
Moving a page
Deleting a page (and its children)
Getting a list of pages
Adding a page selector field to a form
Up
Chapter 2: Working with Blocks
Introduction
Creating a custom block type
Using block controller callback functions
Sending variables from the controller to the view
Adding items to the page header and footer from the block controller
Creating custom block templates
Including JavaScript in block forms
Including JavaScript in the block view
Including CSS in the block view
Loading a block type by its handle
Adding a block to a page
Getting the blocks from an area
Up
Chapter 3: Files and File Sets
Introduction
Loading a file by its ID
Getting a file's path
Getting a list of files
Uploading a file to the file manager
Loading a file set by its ID
Adding a file to a file set
Removing a file from a file set
Checking if a file is part of a file set
Getting all of the files in a file set
Duplicating a file
Deleting a file
Reindexing a file's search attributes
Setting passwords on file objects
Setting permissions on files
Getting the download URL for a file
Getting the download statistics for a file
Adding a file picker to a form
Up
Chapter 4: Using the Core Helpers
Introduction
Loading a helper class
Using the Date helper
Using the Encryption helper
Loading an RSS feed with the Feed helper
Managing files and directories with the File helper
Creating custom forms with the Form helper
Including a WYSIWYG editor on a form
Generating HTML code with the HTML helper
Generating and caching thumbnails with the Image helper
Encoding and decoding JSON with the JSON helper
Sending e-mails with the Mail helper
Determining the MIME type of a file extension using the MIME helper
Getting page URLs and breadcrumbs with the Navigation helper
Working with strings using the Text helper
Generating URLs with the URL helper
Validating input data using the Validation helpers
Preventing spam using the Captcha helper
Getting a list of countries
Getting a list of states and provinces
Showing a color picker on a form
Showing a date/time selector on a form
Showing a rating widget on a form
Using the banned words list
Reading and writing to the system cache
Writing to the debug log
Reading and writing to the configuration registry
Up
Chapter 5: Working with Databases and Models
Introduction
Loading the database object
Retrieving data from the database
Writing data to the database
Guarding against SQL injections using prepared statements
Creating a custom model class
Reading from the database with active record
Writing to the database with active record
Updating a database record with active record
Searching the database using active record
Deleting objects using active record and model classes
Defining relationships with active record
Up
Chapter 6: Creating CRUD Interfaces
Introduction
Creating controller files for single pages on the dashboard
Creating view files for single pages on the dashboard
Adding single pages to the dashboard
Creating a form to create items
Saving data to the database from a controller
Creating a view to display a list of database items
Adding editing capabilities to create a form
Creating a delete action
Up
Chapter 7: Working with Users and Permissions
Introduction
Checking if the current user is logged in
Getting the currently logged-in user
Loading a user by its ID
Loading a user by its username
Getting a user's info
Setting a user's attributes
Retrieving a user's attributes
Loading a group by its ID
Loading a group by its name
Adding a user to a group
Getting all of the users from a group
Checking if a user is a member of a group
Removing a user from a group
Logging out a user
Deleting a user
Getting the permission object
Checking if a user can read a page
Checking if a user can edit a page
Checking a user's file permissions
Up
Chapter 8: Working with Themes and Add-ons
Introduction
Creating a custom theme
Including the concrete5 required scripts and styles
Defining editable content areas
Creating page type templates
Using elements for repeated portions of HTML
Customizing system pages
Creating a custom add-on package
Using the package controller to execute custom code
Up
Chapter 9: System Events and Advanced Configuration
Introduction
Declaring advanced configuration variables
Enabling events in concrete5
Listening to system events
Passing parameters to event handlers
Defining a page type event
Sending an e-mail when a user creates an account
Sending an e-mail when a file has been uploaded
Creating a custom scheduled job
Making your add-on translation ready
Rebranding concrete5 as a white label CMS
Changing the dashboard background image
Up
Appendix A: Blueprint – Creating an Image Gallery Add-on
Before we begin...
Creating the package controller
Creating the block type
Installing the block type with the package
Giving life to the block
Wrap-up
Up
Appendix B: Blueprint – Creating an Events Calendar Add-on
Before we begin...
Creating the package
Installing the package
Creating the list single page
Creating the add form single page
Adding events to the database
Adding a delete confirmation
Creating the custom block type
Adding the block to a page
Wrapping up
Up
Appendix C: Submitting an Add-on Package to the concrete5 Marketplace
The rules
The process
Official resources
Le informazioni nella sezione "Su questo libro" possono far riferimento a edizioni diverse di questo titolo.
EUR 28,88 per la spedizione da Regno Unito a U.S.A.
Destinazione, tempi e costiEUR 3,41 per la spedizione in U.S.A.
Destinazione, tempi e costiDa: Lucky's Textbooks, Dallas, TX, U.S.A.
Condizione: New. Codice articolo ABLIING23Mar2912160158157
Quantità: Più di 20 disponibili
Da: Best Price, Torrance, CA, U.S.A.
Condizione: New. SUPER FAST SHIPPING. Codice articolo 9781782164548
Quantità: 2 disponibili
Da: California Books, Miami, FL, U.S.A.
Condizione: New. Codice articolo I-9781782164548
Quantità: Più di 20 disponibili
Da: PBShop.store US, Wood Dale, IL, U.S.A.
PAP. Condizione: New. New Book. Shipped from UK. THIS BOOK IS PRINTED ON DEMAND. Established seller since 2000. Codice articolo L0-9781782164548
Quantità: Più di 20 disponibili
Da: PBShop.store UK, Fairford, GLOS, Regno Unito
PAP. Condizione: New. New Book. Delivered from our UK warehouse in 4 to 14 business days. THIS BOOK IS PRINTED ON DEMAND. Established seller since 2000. Codice articolo L0-9781782164548
Quantità: Più di 20 disponibili
Da: Books Puddle, New York, NY, U.S.A.
Condizione: New. pp. 296 Index. Codice articolo 2697211111
Quantità: 4 disponibili
Da: Majestic Books, Hounslow, Regno Unito
Condizione: New. Print on Demand pp. 296 3:B&W 7.5 x 9.25 in or 235 x 191 mm Perfect Bound on White w/Gloss Lam. Codice articolo 96267576
Quantità: 4 disponibili
Da: Ria Christie Collections, Uxbridge, Regno Unito
Condizione: New. In. Codice articolo ria9781782164548_new
Quantità: Più di 20 disponibili
Da: Chiron Media, Wallingford, Regno Unito
Paperback. Condizione: New. Codice articolo 6666-IUK-9781782164548
Quantità: 10 disponibili
Da: Biblios, Frankfurt am main, HESSE, Germania
Condizione: New. PRINT ON DEMAND pp. 296. Codice articolo 1897211117
Quantità: 4 disponibili