concrete5: Beginner's Guide - Remo Laubacher - E-Book

concrete5: Beginner's Guide E-Book

Remo Laubacher

0,0
34,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

concrete5 is an open source content management system (CMS) for publishing content on the World Wide Web and intranets. concrete5 is designed for ease of use, and for users with limited technical skills. It enables users to edit site content directly from the page. It provides version management for every page and allows users to edit images through an embedded editor on the page.
concrete5 Beginner's Guide shows you everything you need to get your own site up and running in no time. You will then learn how to change the look of it before you find out all you need to add custom functionality to concrete5.
concrete5 Beginner's Guide starts with installation, then you customize the look and feel and continue to add your own functionality. After you've installed and configured your own concrete5 site, we'll have a closer look at themes and integrate a simple layout into concrete5. Afterwards, we're going to build a block from scratch which you can use to manage a news section. We're also going to add a button to our site which can be used to create a PDF document on the fly. This book also covers some examples that show you how to integrate an existing jQuery plugin.
concrete5 Beginner's Guide is a book for developers looking to get started with concrete5 in order to create great websites and applications.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 359

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

concrete5 Beginner's Guide
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
Time for action – heading
What just happened?
Pop quiz – heading
Have a go hero – heading
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Installing concrete5
Preparing for installation
Web browser
Text editor
Archive utility
FTP client
Installing Bitnami
Time for action – installing Bitnami WAMP stack
What just happened?
Pop quiz – requirements for concrete5
Downloading concrete5
Time for action – downloading the latest version
What just happened?
Creating an empty MySQL database
Time for action – creating a MySQL database
What just happened?
Installing concrete5
Time for action – installing concrete5
What just happened?
The configuration file
Pop quiz – the configuration file
Disabling caching
Time for action – disabling caching
What just happened?
Enabling pretty URLs
Time for action – enabling pretty URLs
What just happened?
File and directory structure of concrete5
Dispatcher process
Summary
2. Working with concrete5
Getting familiar with concrete5
Time for action – logging in to concrete5
What just happened?
Adding new blocks
Time for action – adding new blocks
What just happened?
Time for action – editing existing blocks
What just happened?
Have a go hero – adding more blocks
Time for action – exiting edit mode
Pop quiz – concrete5 inside the editing mode
Working with the dashboard
Time for action – changing the site's name
What just happened?
Adding more pages
Time for action – adding pages to create a news section
What just happened?
Time for action – adding blocks to a new page
What just happened?
Have a go hero – adding more pages
Managing page defaults
Time for action – adding default blocks to a page type
What just happened?
Adding blocks to existing pages
Time for action – adding blocks to existing pages
What just happened?
Moving and sorting pages
Time for action – moving and sorting your pages
What just happened?
Splitting content into columns
Time for action – creating a multi-column layout
What just happened?
Have a go hero – adding more columns and blocks
Copying blocks using the clipboard
Time for action – copying the block using the clipboard
What just happened?
Working with stacks
Time for action – working with stacks
What just happened?
Styling with design and CSS
Time for action – styling your blocks
What just happened?
Have a go hero – customizing more styles
Have a go hero – play around
Summary
3. Managing Permissions
Managing basic permissions
Adding users and groups
Time for action – adding groups
What just happened?
Group expiration options
Time for action – adding users
What just happened?
Working with user attributes
Granting sitemap and file manager permissions
Time for action – assigning sitemap permissions
What just happened?
Time for action – granting file manager permissions
What just happened?
Have a go hero – time restriction for permissions
Granting page editing permissions
Time for action – granting edit access
What just happened?
Managing edit access on a page by page basis
Creating a protected website section
Time for action – creating a protected website
What just happened?
Granting partial dashboard access
Time for action – granting partial dashboard access
What just happened?
Restricting block access
Time for action – restricting access to blocks
What just happened?
Working with the advanced permission mode
Time for action – activating the advanced permission mode
What just happened?
Managing advanced page permissions
Time for action – removing permissions to change permissions
What just happened?
Managing area permissions
Managing block permissions
Managing subpage permissions
Time for action – setting subpage permissions
What just happened?
Pop quiz – permissions in concrete5
Summary
4. Managing Add-ons
Introduction to add-ons
Installing add-ons from the marketplace
Time for action – installing an add-on
Time for action – uninstalling an add-on
What just happened?
Have a go hero – installing more add-ons
Manually installing an add-on
Time for action – installing an add-on manually
What just happened?
Working with theme add-ons
Parts of a theme
Theme file structure
Working with block add-ons
Block structure
Packages
Pop quiz – what's a package?
Summary
5. Creating Your Own Theme
Starting with a new layout
The HTML code
CSS rules
Converting HTML and CSS to a concrete5 theme
Time for action – creating the concrete5 theme header
What just happened?
Time for action – creating the concrete5 theme footer
What just happened?
Time for action – creating a page template
What just happened?
Time for action – creating more page templates
What just happened?
Pop quiz – what are page templates and page types?
Installing your theme
Time for action – installing theme
What just happened?
PHP constants and functions
Time for action – getting a list of available constants
What just happened?
Time for action – listing all available functions
What just happened?
Time for action – checking for edit mode
What just happened?
Time for action – hiding content from anonymous visitors
What just happened?
Time for action – restricting numbers of blocks per area
What just happened?
Time for action – inserting a block wrapper in an area
What just happened?
Working with page attributes
Time for action – using attributes to set background picture
What just happened?
Time for action – accessing attribute data from a template
What just happened?
Pop quiz – what are attributes?
Inserting blocks in templates
Time for action – replacing the header area with a template block
What just happened?
Time for action – finding autonav block properties
What just happened?
Time for action – specifying block templates in an area
What just happened?
Applying a theme to a single page
Time for action – creating a single page layout
What just happened?
Time for action – adding variables to handle login errors
What just happened?
Pop quiz – what's a single page?
Creating customizable themes
Time for action – creating a customizable theme
What just happened?
Have a go hero – adding more customizable styles
Summary
6. Customizing Block Layouts
Custom templates to modify a block layout
Thumbnails in a page list
Time for action – adding thumbnails to a page list
What just happened?
Time for action – restricting thumbnails to a custom dimension
What just happened?
Have a go hero – improving the thumbnail page list
Have a go hero – exploring concrete5 helpers
Block template folder
Time for action – creating a template folder
What just happened?
Pop quiz – how to include CSS and JavaScript files
Picture pop-ups in a content block
Time for action – building a lightbox gallery
What just happened?
Have a go hero – creating another JavaScript gallery
Adding a Gravatar picture in the guestbook
Time for action – adding a Gravatar picture to the guestbook
What just happened?
Avoiding duplicate code in a custom template
Time for action – including an existing template
What just happened?
Transforming a slideshow into a gallery
Time for action – creating a gallery template for a slideshow
What just happened?
Time for action – adding a slideshow gallery
What just happened?
Slideshow using file attributes
Time for action – adding file attributes to our slideshow
What just happened?
Time for action – using file attributes in the gallery
What just happened?
Using advanced tooltips in the content block
Time for action – creating advanced tooltips
What just happened?
Summary
7. Adding Site Navigation
Introducing the autonav block
Preparation
Time for action – undoing autonav block integration
What just happened?
Autonav options
Autonav page structure
Page order
Example 1 – showing all pages
Example 2 – showing relevant subpages
Example 3 – showing relevant subpages starting from the top
Autonav output
Adding navigation images
Time for action – creating page attributes for navigation pictures
What just happened?
Time for action – creating a block picture navigation template
Pop quiz – parts of image navigation
What just happened?
Adding a CSS3 hover effect
Time for action – creating a CSS3 transition autonav template
What just happened?
Have a go hero – create more transitions
Building a drop-down navigation
Time for action – creating a SooperFish template
What just happened?
Have a go hero – changing the SooperFish parameters
Have a go hero – including SooperFish themes
Sliding mobile navigation
Time for action – building a mobile navigation
What just happened?
Summary
8. Creating your Own Add-on Block
Building a product information block
Steps for creating a block
Adding the database schema
Time for action – creating the database structure
What just happened?
Time for action – creating the block controller
What just happened?
Time for action – creating the editing interface
What just happened?
Time for action – printing block output
What just happened?
Time for action – installing a block
What just happened?
Checking for mandatory fields
Time for action – adding a check for mandatory fields
What just happened?
Adding product categories
Time for action – adding product categories
What just happened?
Have a go hero – getting more information about blocks
Pop quiz – parts of a block
Building a product list
Handling multiple block versions
Time for action – handling multiple block versions
What just happened?
Creating a product list block
Time for action – creating the product list block
What just happened?
Have a go hero – extending the product list
Creating a picture magnifier
Time for action – creating the picture magnifier block
What just happened?
Creating a PDF-generating block
Time for action – creating the PDF generation block
What just happened?
Using generate_pdf.php
Using view.php
Creating a simple gallery
Time for action – creating the simple gallery block
What just happened?
Have a go hero – adding more gallery options
Summary
9. Everything in a Package
What's a package?
Package structure
The package controller
Time for action – creating the package controller
What just happened?
Pop quiz – what does a package do?
Moving templates into a package
Time for action – moving templates into a package
What just happened?
Moving a theme and blocks into a package
Time for action – uninstalling blocks
What just happened?
Time for action – moving the jQZoom block into a package
What just happened?
Time for action – moving the PDF block into a package
What just happened?
Have a go hero – moving more add-ons
Hooking into core events
Event types
Extending an event
Time for action – hooking into an event from a package
What just happened?
Pop quiz – what can you do with events?
Working with maintenance tasks and jobs
Time for action – executing concrete5 jobs periodically
What just happened?
Creating a new job
Time for action – creating a job to check for broken links
What just happened?
Injecting header items
Adding tooltips for every title tag
Time for action – creating global tooltips
What just happened?
JavaScript browser fixes
Time for action – integrating a CSS fix in a package
What just happened?
Pop quiz – benefits of addHeaderItem
Have a go hero – creating a new package
Summary
10. Dashboard Extensions
Working with the MVC pattern
Adding the broken link interface
Time for action – creating the broken links dashboard extension
What just happened?
Moving database access into a model
Time for action – creating a package model
What just happened?
Working with multiple controller methods
Time for action – adding a second controller method
What just happened?
Embedding a file editor in the dashboard
Time for action – creating the file editor add-on
What just happened?
Controllers without logic
Have a go hero – extending the file editor add-on
Pop quiz – concrete5 single pages
Summary
11. Deployment and Configuration
Deploying a concrete5 site
Preparations for deployment
Time for action – disabling pretty URLs and the cache
What just happened?
Transferring MySQL databases
Time for action – transferring MySQL databases
What just happened?
Transferring files to the server
Time for action – transferring files to the server
What just happened?
Time for action – updating the configuration file
What just happened?
Setting file permissions
Time for action – setting file permissions
What just happened?
Updating production configuration
Updating the configuration file
Base URL redirection
Changing the concrete5 language
Time for action – installing a translation file
What just happened?
Improving performance with a cache
Time for action – getting PHP information
What just happened?
Caching with APC
Measuring site performance
Time for action – measuring site performance
What just happened?
Pop quiz – concrete5 configuration
Where to go next
Summary
Pop Quiz Answers
Chapter 1, Installing concrete5
Pop quiz – requirements for concrete5
Pop quiz – the configuration file
Chapter 2, Working with concrete5
Pop quiz – concrete5 inside editing mode
Chapter 3, Managing permissions
Pop quiz – permissions in concrete5
Chapter 4, Managing Add-ons
Pop quiz – what's a package?
Chapter 5, Creating your Own Theme
Pop quiz – what are page templates and page types?
Pop quiz – what are attributes?
Pop quiz – what's a single page?
Chapter 6, Customizing Block Layouts
Pop quiz – how to include CSS and JavaScript files
Chapter 7, Adding Site Navigation
Pop quiz – parts of image navigation
Chapter 8, Creating Your Own Add-on Block
Pop quiz – parts of a block
Chapter 9, Everything in a Package
Pop quiz – what does a package do?
Pop quiz – what can you do with events?
Pop quiz – benefits of addHeaderItem
Chapter 10, Dashboard Extensions
Pop quiz – concrete5 single pages
Chapter 11, Deployment and Configuration
Pop quiz – concrete5 configuration
Index

concrete5 Beginner's Guide

Second Edition

concrete5 Beginner's Guide

Second Edition

Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: March 2011

Second Edition: April 2013

Production Reference: 1160413

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78216-931-4

www.packtpub.com

Cover Image by Jarek Blaminsky (<[email protected]>)

Credits

Author

Remo Laubacher

Reviewers

Ryan Hewitt

Šarūnas Narkevičius

Werner Nindl

John Steele

Acquisition Editor

Mary Nadar

Lead Technical Editor

Savio Jose

Technical Editors

Sharvari Baet

Ankita Meshram

Kirti Pujari

Project Coordinator

Abhishek Kori

Proofreaders

Maria Gould

Aaron Nash

Stephen Copestake

Indexer

Tejal Soni

Graphics

Sheetal Aute

Production Coordinator

Conidon Miranda

Cover Work

Conidon Miranda

About the Author

Remo Laubacher grew up in Central Switzerland in a small village surrounded by mountains and natural beauty. He started working with computers a long time ago and then, after various computer-related projects, focused on ERP and Oracle development. After completing his BSc in Business Administration, Remo became a partner at Ortic, his ERP and Oracle business, as well as a partner at Mesch web consulting and design GmbH. At Mesch—where he's responsible for all development-related topics—he discovered concrete5 as the perfect tool for their web-related projects and has since become a key member of the concrete5 community. You can find his latest publications on http://www.codeblog.ch/.

He has also authored concrete5 Beginner's Guide and Creating concrete5 Themes.

About the Reviewers

Ryan Hewitt has been a web developer for over 10 years and has worked extensively with concrete5, with it being his content management system of choice.

Ryan's background includes working for both large and small development companies, wading through oceans of code and fighting SQL beasts, PHP devils, and CSS nasties. He has written numerous custom online systems and scripts—finding solace in the advantages that well written frameworks and libraries such as CakePHP, jQuery, Boostrap Twitter, and concrete5 bring forth.

Ryan started his own web development business in 2011, with his partner Lelita Baldock, called Mesuva Web Development. From the beautiful coastal town of Goolwa, in South Australia, Ryan and Lelita build a wide range of websites and online shops using concrete5, often heavily customizing them with custom-built blocks and packages.

One of concrete5's greatest strengths as a CMS is its active online community, and Ryan takes pride in contributing answers and insights to the online forum, as well as providing free concrete5 packages and support.

The Mesuva website can be found at https://www.mesuva.com.au and Ryan can be contacted through it.

Werner Nindl is an Oracle Hyperion consultant by day and a concrete5 web developer by night. As a consultant, he has lived and worked in Europe, China, and the US. During his day job, Werner manages consulting programs for Financial Consolidation and Reporting.

Intrigued by the capabilities of concrete5, he has started to convert his clients' web sites to concrete5. Participating in the review of this book has helped him to plan for future enhancements. He believes that he can implement those enhancements now at a much lower resource cost then previously planned.

I want to thank the publishers for the opportunity to participate. First and foremost I want to compliment Remo on his tremendous insight into, and knowledge about, concrete5.

John Steele began teaching himself BASIC on a borrowed Atari. He purchased his first computer, the Timex Sinclair 1000, later trading it in on a Commodore 64. He then taught himself 6502 Assembly followed by the C language, creating a 3D wireframe program to design a hang-glider.

He was a Mathematics major, switching to Computer Science as soon as the degree program was available. He worked as a Systems Programmer at the IBM Almaden Research Center using C, Fortran, Pascal, and 8086 Assembly. Next, he worked as Systems Analyst and Lead Programmer for the largest selling POS software for video stores. He was a beta tester for every version of the Microsoft C compiler.

Fascinated by the Internet, he taught himself PHP3 and MySQL programming and started his business Steelesoft Consulting. He's used just about every Unix-based operating system since the DEC PDP-11 and owns the first version of Linux on CD.

He's also been a technical editor for two PHP4 books by Osborne-McGraw Hill.

I'd like to thank Remo and all the fine folks at concrete5.org and the wonderful people who help others on the Forums everyday.

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

concrete5 Beginner's Guide covers everything you need to build your own website with a number of customizations and add-ons built from scratch, for those who need a pretty site that also offers some slick functionality.

concrete5 is one of many CMS' out there, but it manags to shine with a number of ideas and impressive solutions. For example, there's a very intuitive in-site editing concept where you can manage the content of your site in the actual layout of it and don't have to understand a complicated backend. The book gives you a quick introduction about this concept, but is focused on developers with the intention to build websites and-applications.

You'll therefore need some experience as a web developer, if possible with the technologies used by concrete5: PHP, MySQL, and jQuery. Experience with concrete5 isn't necessary though. The book guides you step-by-step from installation to the customization, and even to the creation of add-ons.

As you'll see towards the end, the packaging system of concrete5 you use to build your add-ons is very powerful and, thanks to the marketplace, you can easily popularize your own work and, if you want, also get some money by selling your add-ons.

What this book covers

Chapter 1, Installing concrete5, helps you to get a test-site running on your local computer, from where we'll continue to work with concrete5.

Chapter 2, Working with concrete5, discusses the basics of concrete5 you need to know to manage the content of a site, basically a compression of an end-user manual.

Chapter 3, Managing Permissions, looks at the powerful permissions of concrete5. You'll learn how to restrict access to a part of your site as well as allowing editors to see parts of the managing interface of concrete5.

Chapter 4, Managing Add-ons, explains what an add-on is and how you can install them from the marketplace.

Chapter 5, Creating Your Own Theme, shows how to convert an existing HTML layout into a concrete5 theme.

Chapter 6, Customizing Block Layouts, looks at ways to customize block layouts—blocks are layout elements in concrete5—making them look well in your own theme.

Chapter 7, Adding Site Navigation, teaches you how to add a dynamic navigation to your website.

Chapter 8, Creating Your Own Add-on Block, teaches you to create your own block, and the content elements of concrete5 from scratch.

Chapter 9, Everything in a Package, discusses how packages make it easier to work with add-ons that contains different things. We'll wrap a few things we've created in the previous chapters into a package.

Chapter 10, Dashboard Extensions, teaches you how to extend the dashboard, which is the place in concrete5 where you manage users, settings, and a lot more.

Chapter 11, Deployment and Configuration, explains how to copy the site from the local computer to a live server and also explains a few configurations.

What you need for this book

You're almost free to use any kind of tool you want. The screenshots in this book were taken on a Windows computer but Mac OSX as well as Linux works fine as well. A text editor such as Notepad++, a web server such as Apache with PHP and MySQL, and an FTP client such as FileZilla are all you need.

Who this book is for

This book is aimed at developers, knowing the basic web technologies such as HTML, CSS, JavaScript, and PHP required to master the content of this book. Experience with concrete5 isn't necessary but it's helpful to have some experience with PHP and possibly other PHP CMS.

Conventions

In this book, you will find several headings appearing frequently.

To give clear instructions of how to complete a procedure or task, we use:

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the erratasubmissionform link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Installing concrete5

In this chapter, you'll learn what you need to get your own concrete5 site up and running on your local computer. You don't need to have a lot of experience with Apache, PHP, and MySQL configuration as we're going to use Bitnami, which will install all necessary components in almost no time.

Before you can start working with concrete5, you have to set up an environment, where you can test and play around with concrete5 to get used to it. If you have a web hosting account, you can install concrete5 there, but since that isn't always the case, we'll install everything concrete5 needs to work smoothly on your local Windows computer. We're assuming that you're working with Windows but instructions are available for those running Mac OS or Linux; most instructions work the same for all operating systems.

Bitnami installs a local web server, which we'll use to build and test the add-ons we're going to create. In the last chapter of this book, we're going to move the site from your local computer to a live web server.

Preparing for installation

There are a few tools you need, before you can start with the installation process. You probably already work with similar tools, but let's still make sure you've got everything before continuing.

Web browser

concrete5 supports all major browsers as long as you're working with an up-to-date version. Please note: you can create a website which is viewable with an outdated browser, but the in-context editing system won't work correctly, unless you're using a modern browser.

Whether you use Firefox, Chrome, Safari, or Internet Explorer doesn't really matter. concrete5 works with any recent browser with JavaScript capability, but it's recommended to use the latest browser version since most concrete5 community members test new releases with the newest browsers.

Text editor

Since we're going to edit PHP files you'll need a text editor. The requirements are quite small; you can pick almost any text editor you want. Just make sure it does support PHP syntax highlighting. Here are some possible editors:

PSPad (Windows only, free), http://www.pspad.com. A simple text editor with in-built FTP support. This can make a quick fix on your website even quicker.TextWrangler (Mac OS only, free), http://www.barebones.com/products/textwrangler/. A very slick and clean text editor with extensive FTP support.Notepad++ (Windows only, free),http://notepad-plus-plus.org/. A small and fast replacement for Windows notepad.

There are a lot more text editors, as mentioned previously; you can use almost any editor you want. If you're familiar with another product, just go with it. You won't find anything in this book where you need a special text editor feature.

Archive utility

The same with the file archive utility, there are plenty of tools out there and if you want, you can use the in-built extraction utility of Windows or Mac OS. If you're looking for something more advanced, you can go with 7-Zip at http://www.7-zip.org/ orIZArc at http://www.izarc.org/; both are free and do a good job.

FTP client

Once more, there are lots of choices. You'll have to change file permissions later, so make sure your FTP client includes this option. A powerful and well known client is FileZilla, http://filezilla-project.org/. It's free as well and has a lot more features than we need.

Installing Bitnami

If you think you've found all the tools you'd like to use to create your website, you're ready to install Bitnami. Bitnami is a WAMP stack which provides a lot of different tools needed to run your favorite open source web application on your computer. WAMP is the short form for: Windows, Apache, MySQL, and PHP. The more common term is LAMP and describes the same, but for Linux. It's basically a combination of different applications.

There's a stack for concrete5 that installs everything including concrete5 in no time, but since we want to have a look at the process of installing concrete5 as well, we're going to use the WAMP stack. If you're working with Mac OS or Linux, check Bitnami MAMP, or LAMP; the process is pretty much the same for all the operating systems.

Downloading concrete5

Your local web server is running, there's nothing else to prepare, and you are now ready to install concrete5. There are just a few more steps till you can log in to concrete5.

Time for action – downloading the latest version

Before we can install anything we have to get the latest concrete5 version from this URL: http://www.concrete5.org/developers/downloads/. After downloading the zip archive for concrete5, follow these steps:

Remove all the files and directories from Bitnami in the directory at C:\BitNami\wampstack-5.4.10-0\apache2\htdocs.Open the ZIP archive, open the first directory in it, and extract all the files to C:\BitNami\wampstack-5.4.10-0\apache2\htdocs.After you've extracted the ZIP file you should see a structure like that shown in the following screenshot:

Note

At the time of writing, concrete5 5.6.1 was the latest version. You can download a newer version if available; changes in the installation process should be minor if there are any at all.

What just happened?

You've downloaded and extracted the concrete5 CMS files. Depending on your archive utility it might have happened that empty folders like updates, files, and others haven't been created. Make sure your structure looks like the one shown in the preceding screenshot.

Before we continue, a few words about the file structure you've just created. It's important that you understand the structure of concrete5 before you start working with it. It's helpful to have a clear understanding about the structure so you can find your files easily. You'll later see that all add-ons in the marketplace follow this structure. Using the suggested structure helps to keep the structure clean, no matter who builds the concrete5 site or add-on.

It might look a bit bulky to have so many folders in the root of your website, but you'll realize that it makes perfect sense to have this structure the more you work with concrete5. We'll have a closer look at some of the directories later in this chapter.

Creating an empty MySQL database

You must create an empty SQL database before you can install concrete5.

Time for action – creating a MySQL database

Use phpMyAdmin, which is included in the Bitnami stack, to create the database:

Open http://localhost/phpmyadmin/ in your web server and you should see the following page:Log in with the user root and the password you've entered during the installation process of Bitnami.Click on the Users tab and then on Add user and enter the following values:Make sure you remember the password as you'll need it later when we install concrete5. Also make sure you select the radio button Create database with same name and grant all privileges. Click on Add user to confirm all values and continue creating the users and database.We just created a new user called concrete5 as well as a database with the same name. There's one more change we have to make before we can use the new database for concrete5. In the left-hand column, select the new database and then click on Operations:Change the value for Collation to utf8_general_ci and confirm the change by clicking on Go. With this step, we made sure that our database and therefore concrete5 can work with non-Latin characters such as umlauts and even Japanese or Chinese characters.

What just happened?

All the components