Book Image

Learning Mambo: A Step-by-Step Tutorial to Building Your Website

Book Image

Learning Mambo: A Step-by-Step Tutorial to Building Your Website

Overview of this book

Mambo is a mature and fully featured open-source Content Management System (CMS). Mambo is easy to use at the entry level for creating basic websites, while having the power and flexibility to support complex web applications. Mambo implements the core requirements of a full-featured CMS. It has a powerful and extensible templating system, user access control, content approval, rich administrative control, and content display scheduling. New features and extensions are added to the core system, with many more being available and supported by the community. This book targets the 4.6 release of Mambo, and takes you through creating an example website. Beginning with a discussion of the requirements for the example site, the site unfolds as you progress through the chapters, learning more about Mambo, and how to complete the tasks needed to build the site. You'll see the basic configuration options for setting up your site, and learn about Mambo's main elements as you work your way around its web-based administration area. As soon as you're familiar with the general principles and behavior of Mambo, it's time to pile on the features for your site; adding modules and components, uploading images and other resources, and managing templates. You will learn to use Mambo's powerful Universal Installer to effortlessly install add-ons that are not part of the standard distribution. The pages on your site, how they are displayed, and who can see them, are determined by Mambo's menu system. With many examples of the different types of menu items, the book will lead you through the important tasks of creating menu items, and help you understand how these choices structure the pages on your site and ease your visitors' navigation. You will see how to organize and enter your content into Mambo, and how to manage and edit this organization and your pieces of content. As we tackle user management, you will see how Mambo allows you to set up user accounts with different permissions, including a set of special users who can author or edit content. We also take a detailed look at the notifications that occur when content is submitted by these users. This analysis reveals how the Mambo publishing workflow process works, and how you can exploit it effectively. Moving on from the standard Mambo features, we look at some third-party extensions that add powerful discussion forum, event scheduling, and image gallery features to your site. To create a new look for your site, you create a new template. We cover this, and even if you're no expert in web design, you will be taken through a number of basic tasks to create an impressive new design for your site.
Table of Contents (18 chapters)
Learning Mambo : A Step-by-Step Tutorial to Building Your Website
Credits
About the Author
About the Reviewer
Preface
Installing XAMPP

Preface

Mambo is a free tool to manage the content of dynamic websites. To be more specific, Mambo is an open-source content management system, written in the PHP scripting language which is probably the most popular and straightforward language for creating websites and web applications. Mambo allows you to create a powerful, dynamic website with minimum effort and programming knowledge.

As one of the most popular applications on the Internet, Mambo has grown into a complex, powerful tool with an impressive range of features, and a loyal community of supporters.

This book targets the 4.6 release of Mambo, and it'll take you through creating an example website. The book is packed with practical steps for you to learn how to build your own website, beginning with a discussion of the requirements for the example site. The site unfolds as you progress through the chapters, learning more about Mambo.

What This Book Covers

Chapter 1 introduces us to Mambo, and what it can do for us. The chapter concludes with a discussion of the Zak Springs Golf Club example site, including a list of the requirements for the site.

Chapter 2 takes you through installing Mambo on a local machine for development purposes.

In Chapter 3, we take our first look at the main elements of a Mambo site, meeting menus, modules, components, templates, and having a quick look at the arrangement of content on a Mambo site. We also take our first steps in the administration area, and are introduced to the important concepts of publishing and access restrictions, and the HTML editor that will be used to enter most of the content on our site. We conclude the chapter with some basic changes to the front page of the site.

We start our Zak Springs example site in Chapter 4 by creating a fresh, empty installation of Mambo. Then we look at the fundamental configuration options available to our site, such as setting up the system to send mail. We also take a look at the Private Messages component in this chapter, which provides us with a quick test of our mail server setup.

Chapter 5 continues the theme of site configuration, by looking at module and component management. These are the main functional elements of your site, and in the chapter we look first at module management, choosing how and where, and on which pages to display them. We walk through the creation of simple RSS and HTML modules from the administration area. To get modules and components into your Mambo system there is a "Universal Installer", that allows you to effortlessly install any kind of Mambo add-on. In the chapter we download and install a third-party calendar add-on. We also have a look at managing media, whereby you can upload resources such as images or documents directly onto the Mambo server, to be used in your content.

Chapter 6 is about menus and templates. Without menus, visitors would have great difficulty in finding anything on your site. A menu is made up of menu items. Menu items point to pages on your site, and also define how the target page should be displayed. In the chapter we walk through creating menu items. We also consider the different types of menu items that are available, and the consequences of these choices for the target page. Templates control the look and feel of your site. A new look for your site can be selected by assigning a new template. We look at the basics of managing templates in this chapter, including how to apply different templates to different pages on the site, so that your site does not look "uniform".

Your site is created for people to visit, and in Chapter 7, we walk through the basics of managing user accounts. Visitors are able to create an account on your site, and in this chapter, we look at what this process involves, and also at some other ways in which user accounts can be created. Users can be put into groups, to which permissions can be assigned. Different types of administrators can be created, as well as different types of front-end users. We look at all this, and create some of these different user types for our Zak Springs site.

In Chapter 8, we finally come to content management in Mambo. The Content component is the main content engine of Mambo, and in this chapter, we look at the organization of content into sections and categories. After creating some of these, we proceed to enter content and examine the options available for entering and controlling the display of our content. We also see how to create menu items that point to our pieces of content, and examine the different views of content provided by the menus, which can display the content as a single item, or list items with a different layout and format.

You can create special users that can add, edit, or publish content from the front end of the site, and in Chapter 9, we look at this. We also look at the publishing workflow this involves, whereby notifications are sent to various administrators to advise them of content submission that requires their approval. The notification system is not entirely straightforward, and we take a careful look at the process, and suggest some solutions to produce a more usable system.

In Chapter 10, we explore some more of the standard components that come with Mambo, and install and walk through the use of some third-party components for adding discussion forums, event scheduling, and a gallery of images.

In Chapter 11, we look at the details of customizing a template to produce a new-looking site. We start with one of the standard Mambo templates, and make changes to the stylesheet and background images to gradually produce a different-looking set of pages.

In Chapter 12, we look at the steps required to deploy our local Mambo site to a remote web server. We also tackle setting file-system permissions for various operations of Mambo to function properly on the remote server. We conclude with a look at restricting access to your administration area using HTTP Authentication.

Appendix A has a walkthrough of installing the XAMPP package, which provides a working installation of PHP, MySQL, and Apache, ready configured for you to test your Mambo site on.

What You Need for This Book

To use this book, you will need the latest version of Mambo, which can be freely downloaded from http://mamboxchange.com/frs/?group_id=5. The steps to get Mambo up and running are detailed in Chapter 2.

To get Mambo running, you need a working Apache/MySQL/PHP (AMP) environment on your local machine. The detailed installation of the latest XAMPP package is covered in Appendix A.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

There are three styles for code. Code words in text are shown as follows: "Once you've copied that folder, rename it to mambo, and we're ready to go."

A block of code will be set as follows:

[default]
$mosConfig_host = 'localhost';
$mosConfig_user = 'mamboer';
$mosConfig_password = 'mamb071Passv0rd';
$mosConfig_db = 'mambo';
$mosConfig_dbprefix = 'mos_';

When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be made bold:

[default]
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/.htpasswds

Require valid-user

Any command-line input and output is written as follows:

htpasswd c "c:\passwords\mypasswords" secretuser

New terms and important words are introduced in a bold-type font. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "Once you've entered your database details here, click the Next button to continue."

Note

Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

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 drop an email to , making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email .

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 for the Book

Visit http://www.packtpub.com/support, and select this book from the list of titles to download any example code or extra resources for this book. The files available for download will then be displayed.

The downloadable files contain instructions on how to use them.

Errata

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

Questions

You can contact us at if you are having a problem with some aspect of the book, and we will do our best to address it.