Foundation Joomla! B.M. Harwani Foundation Joomla! Copyright © 2009 by B. M. Harwani All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-2375-7 ISBN-13 (electronic): 978-1-4302-2376-4 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit www.springeronline.com. For information on translations, please e-mail [email protected], or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at http://www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is freely available to readers at www.friendsofed.com in the Downloads section. Credits Lead Editor: Production Editor: Ben Renow-Clarke Brigid Duffy Technical Reviewer: Proofreader: Ian Piper Patrick Vincent Editorial Board: Indexers: Clay Andres, Steve Anglin, Mark Beckner, Ewan Ann Rogers/Ron Strauss Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Cover Image Designer: Corné van Dooren Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Interior and Cover Designer: Anna Ishchenko Project Managers: Beth Christmas and Candace English Manufacturing Director Tom Debolski Copy Editor: Damon Larsen iii Dedicated to my mother, Mrs. Nita Harwani, and Peter Norton, the producer of one of the most popular PC tools, Norton Utilities. My mother is next to God for me. Whatever I am today is just because of the moral values taught by her. I have been highly impressed by Peter Norton ever since I took a computer engineering course. I was fascinated by his amazing tool, Norton Utilities. He is also author of many successful books and a great programmer, and he is an inspiration for me. iv Contents at a Glance About the Author......................................................................................................................xii About the Technical Reviewer................................................................................................xiii About the Cover Image Designer............................................................................................xiv Acknowledgments.....................................................................................................................xv Introduction..............................................................................................................................xvi Chapter 1: Introduction to Joomla!..........................................................................................1 Chapter 2: Installing Joomla!..................................................................................................11 Chapter 3: Your First Steps in Joomla!..................................................................................67 Chapter 4: Managing Images and Banners..........................................................................115 Chapter 5: Creating Users and Contacts..............................................................................155 Chapter 6: Creating Interaction............................................................................................187 Chapter 7: Dealing with Menus.............................................................................................205 Chapter 8: Modules.................................................................................................................295 Chapter 9: Adding Extensions...............................................................................................347 Chapter 10: Making It Global...............................................................................................413 Index.........................................................................................................................................473 v Contents About the Author......................................................................................................................xii About the Technical Reviewer................................................................................................xiii About the Cover Image Designer............................................................................................xiv Acknowledgments.....................................................................................................................xv Introduction..............................................................................................................................xvi Chapter 1: Introduction to Joomla!..........................................................................................1 What is a CMS?...............................................................................................................................................1 Why are CMSs so popular?.......................................................................................................................3 What is Joomla!?.............................................................................................................................................3 Structure of a Joomla website..................................................................................................................4 Characteristicsof Joomla!.............................................................................................................................5 Advantages of Joomla!...................................................................................................................................7 Summary........................................................................................................................................................8 Chapter 2: Installing Joomla!..................................................................................................11 Prerequisites to installing Joomla! on the local server..............................................................................11 Web request life cycle.............................................................................................................................12 XAMPP.....................................................................................................................................................13 XAMPP installation............................................................................................................................13 phpMyAdmin..........................................................................................................................................28 Creating a database...........................................................................................................................32 Requiring user authentication..........................................................................................................34 Installing Joomla! locally.............................................................................................................................39 Installing Joomla! on a remote server........................................................................................................55 Summary......................................................................................................................................................64 Chapter 3: Your First Steps in Joomla!..................................................................................67 The elements of the Administrator interface............................................................................................69 The Control Panel...................................................................................................................................70 vi Using the Section, Category, Article, and Menu Item Managers.............................................................73 Creating a section (Section Manager)...................................................................................................75 Creating a category (Category Manager)..............................................................................................81 Creating an article (Article Manager) and publishing it in a category................................................84 Creating a menu item to access the section.........................................................................................89 Viewing the Contents.............................................................................................................................96 The Other Control Panel Managers..........................................................................................................101 Front Page Manager.............................................................................................................................101 Media Manager.....................................................................................................................................101 LanguageManager...............................................................................................................................103 User Manager........................................................................................................................................103 Global Configuration............................................................................................................................104 Working with the front page.....................................................................................................................105 Applying a different template...................................................................................................................108 Summary....................................................................................................................................................113 Chapter 4: Managing Images and Banners..........................................................................115 What is the Media Manager?.....................................................................................................................115 Creatinga folder...................................................................................................................................118 Uploading a file.....................................................................................................................................120 Displayinga banner ad........................................................................................................................122 Displaying a client’s banners....................................................................................................................123 Uploading the client’s banner image file............................................................................................123 Creating a category for the banner using the Banner Category Manager........................................125 Creating a banner client using the Banner Client Manager..............................................................130 Creating a banner using the Banner Manager...................................................................................133 Using the Banners module to display the banner on the website....................................................142 Details section..................................................................................................................................144 Menu Assignment section..............................................................................................................145 Parameters section..........................................................................................................................145 Displayingthe banner.....................................................................................................................146 Displaying banners on the basis of content............................................................................................146 Summary....................................................................................................................................................152 vii Chapter 5: Creating Users and Contacts..............................................................................155 What is a contact?......................................................................................................................................156 Working with the User Manager...............................................................................................................156 Different types of user groups.............................................................................................................157 Creatingusers.......................................................................................................................................157 Creating a Contact category.....................................................................................................................163 Creating contacts.......................................................................................................................................167 Creating menu items to link to contacts..................................................................................................176 Summary....................................................................................................................................................184 Chapter 6: Creating Interaction............................................................................................187 News feeds.................................................................................................................................................187 Creating categories for news feeds......................................................................................................187 Creating news feeds...................................................................................................................................191 Creating polls.............................................................................................................................................195 Summary....................................................................................................................................................203 Chapter 7: Dealing with Menus.............................................................................................205 Creatinga menu........................................................................................................................................208 Creating menu items.................................................................................................................................210 Articles........................................................................................................................................................212 Archived ArticleList.............................................................................................................................213 Moving menu items........................................................................................................................217 Making menu items visible.............................................................................................................219 Doing the groundwork for the other menu item types.................................................................221 ArticleLayout........................................................................................................................................227 Article Submission Layout...................................................................................................................230 Category Blog Layout...........................................................................................................................234 Category List Layout.............................................................................................................................238 Front Page Blog Layout........................................................................................................................241 Section Blog Layout..............................................................................................................................245 Section Layout......................................................................................................................................248 viii Explanation of Parameters sections (Advanced, Component, and System).........................................252 Parameters(Advanced)........................................................................................................................252 Parameters (Component)....................................................................................................................255 Parameters(System)............................................................................................................................257 Contacts.....................................................................................................................................................258 News Feeds................................................................................................................................................259 Category List Layout.............................................................................................................................261 CategoryLayout....................................................................................................................................264 Single Feed Layout...............................................................................................................................265 Poll..............................................................................................................................................................266 Search.........................................................................................................................................................269 User.............................................................................................................................................................271 Default Login Layout............................................................................................................................272 Default Registration Layout.................................................................................................................274 Default Remind.....................................................................................................................................275 Default Reset Layout............................................................................................................................276 Default User Layout..............................................................................................................................278 User Form Layout.................................................................................................................................278 Web Links...................................................................................................................................................279 Web Link Category List Layout............................................................................................................283 Category List Layout.............................................................................................................................283 Web Link Submission Layout..............................................................................................................284 Wrapper......................................................................................................................................................285 External Link..............................................................................................................................................288 Separator....................................................................................................................................................290 Alias............................................................................................................................................................291 Summary....................................................................................................................................................293 Chapter 8: Modules.................................................................................................................295 The Module Manager................................................................................................................................295 Details section.......................................................................................................................................300 Menu Assignment section...................................................................................................................302 Archive........................................................................................................................................................303 ix Banners......................................................................................................................................................304 Breadcrumbs..............................................................................................................................................308 Feed Display...............................................................................................................................................309 Footer.........................................................................................................................................................313 LatestNews................................................................................................................................................313 Login Form.................................................................................................................................................315 Main Menu.................................................................................................................................................318 Popular.......................................................................................................................................................320 Newsflash...................................................................................................................................................322 Polls............................................................................................................................................................326 RandomImage..........................................................................................................................................327 Related Items.............................................................................................................................................328 Search.........................................................................................................................................................333 Sections......................................................................................................................................................336 Statistics.....................................................................................................................................................336 Syndication................................................................................................................................................338 Who’s Online.............................................................................................................................................340 Wrapper......................................................................................................................................................341 Summary....................................................................................................................................................344 Chapter 9: Adding Extensions...............................................................................................347 Extension Manager....................................................................................................................................348 Installingextensions.............................................................................................................................349 Package file.......................................................................................................................................350 Install directory................................................................................................................................350 Install URL........................................................................................................................................350 Installing new templates...........................................................................................................................350 Adding e-commerce..................................................................................................................................354 Installing an RSS feed reader....................................................................................................................383 Adding a chat feature to your Joomla! website........................................................................................390 Summary....................................................................................................................................................411 x