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

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

books-svg-icon Book
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    An Introduction to Mambo
About 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.
Publication date:
December 2006
Publisher
Packt
Pages
324
ISBN
9781904811626

 

Chapter 1. An Introduction to Mambo

Mambo is a free tool to manage the content of dynamic websites. To be more specific, Mambo is an open-source content management system. While that sounds nice, it probably doesn't answer the basic question of what it can actually do for you.

Mambo allows you to create a dynamic website with minimum effort and programming knowledge. To get the most out of Mambo, a knowledge of web development will prove to be useful, but even then, Mambo is written in the PHP scripting language, which is probably the most popular and straightforward language for creating websites and web applications.

In this chapter, we will take our first look at Mambo, understand what it can do, find out where to go for further resources, and discuss the site we will create in this book.

What Mambo Can Do for You

Put simply, Mambo helps you create websites easily. It provides a back end, a control area if you like, from where you add content and information to the site, configure the way things look, and also create a front-end public view of your site.

Maybe you want to create a site about wine making, flowers, programming, zombie films, or even dinosaurs. Maybe you want to create a site to promote your business and your products. Whatever type of site you want to create, Mambo helps you to structure the site to hold information relevant to your visitors; be it news stories about a forthcoming zombie film, links to other zombie sites, or even a gallery of stills from zombie films.

The best bit is, you don't have to be an expert programmer to achieve all this. With only rudimentary knowledge of HTML, you can engineer a unique-looking Mambo website, packed with the information you want for your site and your visitors.

The Visitor Experience

The standard installation of Mambo provides many features for its visitors. Some of them are:

  • Searchable content items (articles) organized into groups

  • Ability of visitors to create an account on the site, and log in to their own personal area

  • Ability of visitors to add comments about articles

  • Straw polls

  • A catalog of web links

  • RSS syndication of your articles to share your content with other sites

That's just some of the features of the standard installation. With a couple of clicks, you can install new features on the site, such as:

  • Discussion forums

  • Galleries of images

Mambo can be customized and extended easily, and there is a huge range of third-party customizations and extensions to be found on the Internet. Any of these can add to the range of features your site provides.

The Management Experience

As a potential 'manager' of a Mambo site, as you read through the list of features above, you may think they sound rather attractive, but might also wonder how you will handle all of that.

Mambo provides a web-based management interface. You, as the manager of the site, visit the site and log in with a special super user, or site administrator, account. After this, from the comfort of your web browser, you run the show. You can:

  • Add new information, edit, delete, or move existing pieces of information

  • Control how the site will look

  • Decide the features of the site

  • Add media (documents, images, sounds) directly to the site

  • Control what is displayed on the pages

  • Control who is able to see what

In fact, you don't need to do all of this yourself. You can set up accounts for other people to take over the running of various parts of the site, maybe adding or checking content, or maybe just making sure everything runs smoothly.

The power and flexibility Mambo offers you to manage a complex website would be difficult to achieve without many, many hours of careful programming.

 

What Mambo Can Do for You


Put simply, Mambo helps you create websites easily. It provides a back end, a control area if you like, from where you add content and information to the site, configure the way things look, and also create a front-end public view of your site.

Maybe you want to create a site about wine making, flowers, programming, zombie films, or even dinosaurs. Maybe you want to create a site to promote your business and your products. Whatever type of site you want to create, Mambo helps you to structure the site to hold information relevant to your visitors; be it news stories about a forthcoming zombie film, links to other zombie sites, or even a gallery of stills from zombie films.

The best bit is, you don't have to be an expert programmer to achieve all this. With only rudimentary knowledge of HTML, you can engineer a unique-looking Mambo website, packed with the information you want for your site and your visitors.

The Visitor Experience

The standard installation of Mambo provides many features for its visitors. Some of them are:

  • Searchable content items (articles) organized into groups

  • Ability of visitors to create an account on the site, and log in to their own personal area

  • Ability of visitors to add comments about articles

  • Straw polls

  • A catalog of web links

  • RSS syndication of your articles to share your content with other sites

That's just some of the features of the standard installation. With a couple of clicks, you can install new features on the site, such as:

  • Discussion forums

  • Galleries of images

Mambo can be customized and extended easily, and there is a huge range of third-party customizations and extensions to be found on the Internet. Any of these can add to the range of features your site provides.

The Management Experience

As a potential 'manager' of a Mambo site, as you read through the list of features above, you may think they sound rather attractive, but might also wonder how you will handle all of that.

Mambo provides a web-based management interface. You, as the manager of the site, visit the site and log in with a special super user, or site administrator, account. After this, from the comfort of your web browser, you run the show. You can:

  • Add new information, edit, delete, or move existing pieces of information

  • Control how the site will look

  • Decide the features of the site

  • Add media (documents, images, sounds) directly to the site

  • Control what is displayed on the pages

  • Control who is able to see what

In fact, you don't need to do all of this yourself. You can set up accounts for other people to take over the running of various parts of the site, maybe adding or checking content, or maybe just making sure everything runs smoothly.

The power and flexibility Mambo offers you to manage a complex website would be difficult to achieve without many, many hours of careful programming.

 

What Exactly is Mambo?


Mambo is a collection of PHP scripts that run on a web server, connect to a database, and display the retrieved data in a systematic way. In other words, Mambo is a data-driven PHP web application.

Mambo can be downloaded for free, and then installed to your local machine for testing and development. The files and the database can be uploaded to a web-hosting service, so that your site will be available to anyone on the Internet. There are even web-hosting services that offer Mambo installation at the click of a button.

Component-Based Architecture

Mambo is built around a 'core' set of functions, which perform mundane tasks such as selecting what part of the application the user should be shown, checking who the user is, and what they can do on the site. What makes Mambo exciting to the world is its support for components. These are extensions to the Mambo core, and provide the real functionality of your site. Mambo's support for managing content comes from the Content component, and there are components for displaying news feeds, discussion forums, and galleries among others. These extensions can be easily configured, and new extensions can be added to the system.

There is no shortage of third-party components on the Internet, and you can find a Mambo component for almost any imaginable purpose.

Templated Interface

The look of a Mambo site is controlled by a template. This is a collection of images, styles, and other resources, together with instructions that determine the layout of the page. A new template can be selected, and your site will be transformed immediately. In fact, you can even apply different templates to different parts of your site, so that your site can have different looks across different pages should you wish.

User and Permission Management

Mambo allows users to create their own account on the site, and takes care of boring details like making sure users can get a new password when they forget their current one. Pages on the site can be restricted so that only certain types of user get to see them, and also, certain users can be given certain permissions so that they can add or edit content themselves. Instead of you having to do everything yourself, you can set up other people to help with the running of the site.

 

Mambo as an Open-Source Content Management System


We used the expression 'open-source content management system' earlier in the chapter to describe Mambo. Let's take a closer a look at this term.

Open Source

Mambo is free, and it is also open source. After downloading Mambo, all the source code of the application is there in front of you. This means, if you are so inclined, you can dig around to see how it works, or check why something is not working as it should. Mambo is not a perfect application (what is?), and there will always be parts that do not work as they should. Since there are many people using Mambo on the Internet, the problem is usually spotted and the solution is posted on one of the Mambo forums.

Another advantage of having the source of the application (the code) available to you is that you can modify (hack!) it, or extend it in whichever way you choose.

Mambo is released under a license, the GNU General Public License (GPL). The GPL bestows much freedom in the way that you can work with Mambo, but it also brings along some restrictions. The ins and outs of the GPL are pretty complex, and we aren't even going to attempt an in-depth discussion of the consequences of this. For more information about the GPL visit http://en.wikipedia.org/wiki/GPL.

The GPL should always be respected. The GPL is one of the cornerstones of the free software movement, which was set up to promote rights to use, modify, and redistribute computer programs. The upshot of the license is that Mambo will not be going away. Even if some future version of it were to become completely commercial, the existing code could be taken and modified to create a new version, also released with a GPL license.

Content Management System

We have spoken a lot about adding and editing 'information' on a website. A broader term for information here would be 'content'. To summarize our earlier discussions of Mambo, it allows you to manage the content of your site. In other words, it's a content management system.

According to Wikipedia, a Content Management System (CMS) is a 'system used to organize and facilitate collaborative creation of documents and other content' (http://en.wikipedia.org/wiki/Content_management_system).

Well, it is difficult to define content management system and avoid the words 'a system for managing content'!

You can think of a content management system as playing three roles:

  • Capturing content

  • Maintaining and Organizing content

  • Serving content

Capturing the content is usually done by users entering data in forms in a web browser. This content is then stored in a database for later retrieval. Serving the content allows the right data to be selected, sorted, and ordered, and then displayed to the visitor in a coherent and consistent way.

Mambo achieves all of these. Users with special accounts can input content from either the administrative part of the site, or even the front end of the site. This content can be maintained and organized from the web-based administration interface by the site administrator. When a visitor requests a page from the site, Mambo will determine which content should be displayed and how it should be ordered. It then handles the output of the content, along with the rest of the page.

 

Getting Help in the Mambo Community


Mambo has a substantial user base. There is a large group of people who run Mambo sites, develop extensions to Mambo, and create visual customizations, among other activities. In addition to these people, there is also a team of developers that work on the Mambo code. All of this adds up to a vibrant community that pushes the product forward, helps to address the problems faced by people working with Mambo, and offers support and encouragement to users.

There are a number of sites dedicated to Mambo that contain a range of Mambo resources, such as add-ons, bug fixes and patches, tutorials, and so on. You will also find the option of paid support for Mambo, and since Mambo is such a popular and widespread application, it will not be difficult to find a PHP developer who has experience of working with Mambo.

Each of these sites is well worth a visit to see what they offer:

  • http://www.mamboserver.com: This is the home of Mambo. This site is your first stop for news of the latest offerings from the Mambo community. Here you will also find links to the Mambo Developers Network, a list of Mambo developers worldwide, offering their products and services.

  • http://www.mamboxchange.com: The MamboXChange. This is a recepticle for Mambo software that can be downloaded for free. In addition to being the home of a multitude of extensions for Mambo, it is also the place from where you will download the source of Mambo itself.

  • http://forum.mamboserver.com: The Mambo forums. Here you will find many posts about problems encountered by Mambo users like yourself, along with tips and answers to solve the most common (and sometimes uncommon!) problems. If you find yourself with a problem, then the Mambo forums are a good bet to find a solution.

  • http://templates.mamboserver.com/: This site provides a number of free Mambo templates you can download and use to give your site a different look.

Any of the Mambo sites will have links to other recommended Mambo sites. In addition to providing valuable resources and information, all these sites will give you a good idea of what it is possible to accomplish on a Mambo site.

 

Forks, the Mambo Foundation, and Joomla!


Mambo has had a rather chequered history in recent times. Mambo was originally created by an Australian company, Miro,www.miro.com.au, and an open-source version was released in 2002, under the name of "Mambo Open Source". Since then, Mambo has continued to be developed by a group of developers from around the world.

In August 2005, the Mambo Foundation was set up by Miro to govern the future direction of the product. The purpose of this foundation is "to provide support and protection for the development of the Mambo software system" (www.mambo-foundation.org).

However, following the setup of the Mambo Foundation, many of the core developers resigned from the project, and began to work on a new product based on the existing codebase of Mambo. In the world of open source, such a new venture is called a "fork". (Remember we said that the GPL means that the code can't go away? Well this is exactly the kind of thing that can happen!) The new product the developers began work on later became Joomla! (www.joomla.org). Both Mambo and Joomla! continue to develop, with the developers of each system having different views on the direction of the respective products.

Whatever the cause of the split, Mambo is still going strong, with the August 2006 release of version 4.6 being the first major new release in over two years.

 

Zak Springs Golf Club Website


We're going to create an example site, "Zak Springs Golf Club", as we move through the book. Rather than just arbitrarily adding features to an empty Mambo installation, we will see how the list of requirements described below translate into actual actions for configuring Mambo, and the kind of decisions that need to be made to complete the site.

Zak Springs Golf Club is a rather colorful client. Before we get started with Mambo itself, let's take a moment to understand the site we're going to build.

The Client

Zak Springs Golf Club is located near the Skull Mountains, and boasts two 18-hole golf courses, practice facilities, and extensive hospitality facilities. The Golf Club was recently bought by a mysterious businessman, Otto Simplex, who now runs the club as General Manager. The club had fallen into disrepair over the last 10 years, beset by a number of mysterious incidents and unfortunate accidents. The club was founded 12 years ago, built on land cheaply bought from the military, following the immediate and uncommented closure of the top-secret Nemesis Project. The history of the club is still evident today, since the tougher of the two courses is in fact called Nemesis. The other course is the Sinistra course. Both are now in excellent condition, and present a formidable challenge for even the lowest-handicap golfer.

The Club is looking to expand its membership, and welcome new members from a number of the large metropolises that skirt the Skull mountains.

The Club currently has no website, but Mr. Simplex views the site as key to recruiting new members to the club, and also providing a community for the members of the Club, many of whom live far from the club. In addition to securing new members, retaining the existing members is key to the growth of the Club, and Mr. Simplex feels that keeping the members remotely involved in the club, in addition to providing excellent service and facilities at the Club itself, will go some way to ensuring this.

The Club also has no dedicated IT support person, but the Assistant to the Club Secretary is regarded as the "go-to" person when there is a technical problem.

Staff

The senior staff of the Club are:

President

Otto Simplex

Administrative Staff
  • General Manager: Marie Flame

  • Club Secretary: Audrey Pores

  • Assistant to the Club Secretary: Edgar Hooch

  • Marketing Manager: Brad Visionary

Golf Staff
  • Director of Golf and Club Professional: Neil Vortex

  • Assistant Golf Professional: Dax Carew

  • Head Green Keeper: Cuthbert Cutty Cuthbertson

Hospitality
  • Executive Chef: Bunsen Honeydew

  • Assistant Food and Beverage Manager: Betty Book

  • Assistant Food and Beverage Manager: Chuck Spung

  • Receptionist and Guest Relations: Mya Lop

Requirements

From detailed meetings with the clients, the following list of objectives and functionality of the site was arrived at. Note that none of these relate specifically to Mambo. Fitting these requirements into Mambo will be the challenge of the later chapters. It is entirely possible that not all of the requirements will be achievable within our first attempt at putting the site together.

Key Objectives of the Site

  • Promote the club and its objectives

  • Publish information to attract new players and members

  • Provide online services to build community and retain members

General Functionality of the Site

  • All content to be managed in-house without technical skills

  • Intuitive and easy-to-use browser-based administration interface

  • Multiple users with different permission levels and publication rights

  • Consistent presentation for all content

  • Site search facility

  • Optimized for search-engine finding

Specific Functionality of the Site

  • Categorized news publishing; course news, membership information, competition results

  • Image gallery for showcasing holes on the courses

  • Calendar for forthcoming competitions and other course events

  • Discussion forum for members to interact

  • Members-only areas

  • Staff contacts

  • Information on local accommodation and leisure partners

  • Course scorecards

  • Weblog for Club Professionals, offering equipment and game tips

  • Weblog for Club President

  • Newsletter

  • Content for hospitality facilities

  • Course rates

  • Membership application forms, membership conditions, club rules

  • Contact Details

Permissions and Privileges Required

  • Administrative Staff to be able to publish and amend news items

  • Hospitality staff to be able to publish and amend content for hospitality facilities

  • Marketing Manager to be able to amend any content on the site

  • Nominated member of Administrative Staff to have full control over site

  • Ability to amend these permissions in future

  • Club President to have full control over site

Curiously, that last requirement was added in handwriting by the president himself, and did not appear in any earlier document.

Might Have... One day

The Club President has an ambitious vision for the site. However, in the first version of the site, there are some things that we have postponed. Some of these include:

  • E-commerce Features for the Professional's shop

  • Online Handicap register

  • Competition charts

This is a pretty extensive list of requirements to be going on with, so let's not hang around, since rumor has it that Otto Simplex is not a patient man.

 

Summary


This chapter has introduced Mambo. Mambo is an open-source content management system; you can also think of it as a free tool for managing the content of websites.

We looked at what Mambo offers in terms of a visitor experience, and also what this will mean for the person who is in charge of maintaining the site. Mambo has functionality to make site maintenance easy, and the site can be run from a web-based interface. We found out about the Mambo community, and where to go for help or further Mambo resources.

The chapter concluded with a quick description of Zak Springs Golf Club—the site we are going to create in this book.

We are ready to begin on this journey, so the next step is to actually get Mambo up and running.

Learning Mambo: A Step-by-Step Tutorial to Building Your Website
Unlock this book and the full library FREE for 7 days
Start now