34,79 €
If you are a Joomla! site owner, you must already be aware of how this robust, easy to use, open source content management system can help you build a great looking site instantly. You must also be aware of the many problems that it can throw up from time to time. Find the solutions to all your basic and advanced Joomla! queries, so you don't have to wait for someone on the forums to help you out every time.The Joomla! 1.5 Cookbook will provide you with quick and direct solutions to the most common and uncommon problems faced by you, the Joomla! site owner, sidestepping all the theoretical fuss.Joomla! is the insanely popular, award winning content management system which helps you build professional looking websites, even if you don't have any HTML programming experience or design skills.Although, sometimes you might trip over some common pitfalls which would slow the progress of your website down. This book will help you find a direct and quick way through these common problems which can be easily avoided with a few tips and tricks. It starts of with solutions the most common queries that you might face during the installation and setup for Joomla! 1.5 moving on swiftly to guide you through Joomla! templates, modules, security, managing your users and much more. So the next time when things go wrong with your Joomla! site and you are wondering, for example, how to work with your site's database; just pick up this book and quickly find your way through this.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 283
Veröffentlichungsjahr: 2010
Copyright © 2010 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: October 2010
Production Reference: 1191010
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-849512-36-7
www.packtpub.com
Cover Image by Javier Barria (<[email protected]>)
Author
Tom Canavan
Reviewer
Eric Brown
Saidur Rahman Bijon
Tahsin Hasan
Acquisition Editor
Douglas Paterson
Development Editor
Tariq Rakhange
Technical Editor
Gauri Iyer
Indexer
Tejal Daruwale
Editorial Team Leader
Mithun Sehgal
Project Team Leader
Priya Mukherjee
Project Coordinator
Shubhanjan Chatterjee
Proofreader
Stephen Silk
Graphics
Nilesh Mohite
Production Coordinator
Melwyn D'sa
Cover Work
Melwyn D'sa
Tom Canavan has been in the Computer and IT industry for 20+ years where he spent several years as a Systems Consultant to many Fortune 100 clients and other global companies.
Canavan is considered a top security and disaster recovery expert in the Joomla! world. He is the author of the Packt Publishing book Joomla! Web Security.
He is a former CIO and is currently the co-founder of SalvusAlerting.com. Canavan contributes articles on security and disaster recovery to several websites.
It's often difficult for me, as an author to write the acknowledgements of a book. Not because I feel there's no one to thank, but because there are so many.
Firstly, I thank Jesus Christ, my Lord and Savior. Without his help, I would not have had the courage to strike out on yet another book. My deepest gratitude and thanks goes to my wife, who put up with me writing another book. Special thanks to Mike Carson of JoomlaShowroom.com for his assistance with understanding K2. Thanks go to Alexis at Freakedout.co, for helping me through some rough spots in the technology. Learning the Joomla! 1.6 ACL was no small feat and special thanks go to Jen Kramer for educating me on it. Thank you to the hardworking editors and staff at Packt who put up with multiple delays, and rewrites from me. I know there are many others who helped me and please forgive me if you didn't get a direct mention. I am very grateful for your assistance and help.
Most especially, thank you dear reader for purchasing this book. God bless you.
Eric Brown, who was born and raised in California, joined the U.S. Navy at the age of 17 and became a Preventive Medicine Technician. Upon exiting military service, he left the medical field behind and moved to Nebraska and entered into college studying art and design which resulted in a Bachelor of Science degree in Graphic Design from Wayne State College in Nebraska. Eric has since then branched out by teaching himself (or learning from others) various aspects of HTML, CSS, and PHP as well as a variety of other code languages and web marketing strategies and tools. He currently owns his own design and development business located in Curtis, NE. where he lives with his wife and pets.
Over the years, Eric has worked for a local design and development firm in Nebraska on such projects as the Golden Spike Tower website aimed at tourist traffic centered on the Union Pacific's Bailey Yard and with a premier pet industry design and development firm as a project manager. He has also written for such prestigious publications as Trafficology (a purchased print publication on web marketing read by over 80,000 world-wide), CMSWire.com (a leader in content management news), Revenues.com (a highly rated site on various aspects of marketing), and Gadgetell.com (a well-known gadget news site).
Eric was a reviewer for Joomla! 1.5 Javascript jQuery book from Packt Publishing. He has also been involved in other books as well as providing editing, image touch-up, and custom hand-drawn maps for Tagging Along (a Neville Family retrospective) and editing, layout, cover art, and image touch-up on My Life and Community (Biography of Ken Huebner).
I would like to thank any and all who have helped to bring my career to this point, but most of all I would like to thank my wife Jaime and two children Ariel and Autumn for all their patience and understanding as my career and business underwent their developmental stages.
Saidur Rahman Bijon is an open-source enthusiast from Bangladesh. He is a computer science graduate from BRAC University. He has been developing web applications since 2005. During this time, he developed e-commerce, web 2.0, social networking, and micro-blogging applications and he worked on Joomla!, Zend Framework, Drupal, and WordPress. He is also a Zend-certified engineer. He shares his knowledge and ideas at http://saidur.wordpress.com.
He started his career by developing a large-scale application for the Bangladesh Navy with a Japanese and US-based offshore company. Currently, he is working in Blueliner Marketing, LLC (http://www.bluelinerny.com/), an US-based company as a senior software engineer.
Saidur was a reviewer for Codeigniter 1.7 book from Packt Publishing.
I appreciate Packt Publishing for giving me the opportunity to review this book. I really am thankful to my family, friends, and colleagues for their help.
Tahsin Hasan is a software engineer. He has passed the Zend Certification Examination on 09, August, 2009 and has become the seventeenth Zend Certified Engineer (ZCE) from Bangladesh. This is the top-most certification on PHP from Zend, the developer of this outstanding scripting language. He is a tech enthusiast and always keeps himself well-equipped with latest technologies. He has completed his M.Sc. and B.Sc. in Computer Science and Engineering from Jahangirnagar University.
Tahsin Hasan has profound knowledge on LAMP environment. His advanced understanding of database environments and Apache web server is an asset. He has proficiency in scalability and optimizing server performance. He has worked with Zend Framework, CakePHP, Codeigniter, and Symfony.
This book is dedicated to my best friend in the world, Carol Ann.
If you are a Joomla! site owner, you must already be aware of how this robust, easy to use, open source content management system can help you build a great looking site instantly. You must also be aware of the many problems that it can throw up from time to time. Find the solutions to all your basic and advanced Joomla! queries, so you don't have to wait for someone on the forums to help you out every time.
The Joomla! 1.5 Cookbook will provide you with quick and direct solutions to the most common and uncommon problems faced by you, the Joomla! site owner, sidestepping all the theoretical fuss.
Joomla! is the insanely popular, award winning content management system which helps you build professional looking websites, even if you don't have any HTML programming experience or design skills.
Normally, sometimes you might trip over some common pitfalls which would slow the progress of your website down. This book will help you find a direct and quick way through common problems which can be easily avoided with a few tips and tricks. It starts off with solutions to the most common queries that you might face during the installation and set up for Joomla! 1.5, then moving on swiftly to guide you through Joomla! templates, modules, security, managing your users, and much more. So the next time things go wrong with your Joomla! site and you are wondering, for example, how to work with your site's database; just pick up this book and quickly find your way through.
Find the easiest solutions to many pitfalls that might fall in the way of your Joomla! site.
Chapter 1, Installing Joomla!: This chapter covers the important process of installation. In this chapter, you will learn how to install and use the FTP program FileZilla. Using this you will then learn how to transfer Joomla! up to your server and ensure permissions are correct. There are several different hosting platforms you can choose, but many of them run an application known as cPanel®. Another hosting platform is from the company GoDaddy.com®. You will learn how to use both of these popular systems to install your database and configure it. The last item is a cheat sheet for you to record all the particulars for your host.
Chapter 2, Working with phpMyAdmin: As you learn in Chapter 1, Joomla! is a database-driven system that renders the content on the screen from database queries. In this chapter, you will learn how to export (backup) and import (restore) a database. The database is comprised of "rows" and "tables", working with those you can get fine-grained control over your systems. Lastly, you'll learn how to remove a database table or simply empty out the data.
Chapter 3, Templates: Joomla! has a special extension known as a Template. The Template is what gives the the look to the external part of your book. Using a template requires that be installated. In this chapter you will learn how to install and assign a template as your default one. Of course, templates, like the rest of Joomla!, have a bit of management that goes on and ensuring you know that will give you a sharp-looking site.
The back-end of Joomla! has a template too, known as the administrator template. This template can be replaced with any number of third-party templates available for this purpose. You will learn how to install and assign that one as well.
There are times when you want to use more than one template; this will be covered along with learning how to change a logo (graphics) in a template. Finally, templates use a 'module' position to determine where to show content. You'll wrap up this chapter with knowing how to determine a template's MODULE positions.
Chapter 4, Editing Content and Menus: Joomla! is a Content Management System, and thus has a host of things such as an editor, sections for content, and putting content into categories. You will learn in this chapter how to install an editor, set up, and define the sections and categories that match your needs. Creating an article is the heart of Joomla! - that is - providing something for your visitors to read or interact with. We cover this as well as setting up menus to display the content.
You may want to use Joomla! for a blog site. Joomla! is perfect for this and we wrap this chapter up with instructions on setting up a blog site on Joomla! and learning how to add an extension menu.
Chapter 5, Managing Links, Users and Media: With your Joomla! site you will likely be managing users. This chapter covers all the administrative detail such as adding, deleting, and suspending users. It covers how to take your users and assign them into Groups. You can change or edit the login for your users to match your business requirements.
You're likely to have a need for your clients to reach out to you. Publishing your e-mail is unsafe due to spammers gathering it. Joomla! has provided a means to create a contact using specific users. You'll go through the steps to set up and configure this user.
Adding in links to your site from external sources gives you a great source of extra content. This process is known as using Web Link manager.
Finally, should you ever find yourself having lost your admin password or been locked out of your administrator console, you'll need to manually reset the password for your database. We wrap up this chapter with a simple and quick means to do so.
Chapter 6, Managing Modules and Components: Joomla! can be extended via the use of "Extensions". These extensions fall into three categories: Components, Modules, and Plugins. This chapter covers the installation and management of components and modules. Additionally, you will learn how to create the necessary menu items to drive these applications.
Occasionally, you will need to enable, disable, or uninstall an extension. This step is simple and is covered in a brief recipe.
Lastly you will learn how to change the menu order of components.
Chapter 7, Managing Articles Using the K2 Content Construction Kit: K2 is a wonderful content creation kit from Joomlaworks.gr. K2 gives you the ability to manage content in an extremely powerful way. In this recipe, you'll learn how to install and configure K2. Using a short cut known as a 'master category', you can templatize your settings in K2 and greatly ease your administration time.
K2 offers some great extras such as connections for YouTube and PhotoGalleries as well.
If you add K2 to an existing Joomla! site, you don't have to recreate all the articles. K2 offers an import feature and you'll become very familiar with it here.
Like Joomla!, K2 also offers categories, except that it removes the concept of Sections. What that opens up is Categories, within Categories, within Categories. This is known as Nested Categories. This recipe will show you how to set up and configure your categories for maximum use.
Tag Clouds are a popular means to display descriptions about your content and help with your Search Engine Efforts. You'll learn how to use this powerful tag cloud system.
The final two recipes cover configuration and moderation of comments in K2 as well as some tips and tricks to enhance your K2 experience.
Chapter 8, Installing Third-party Extensions: In this recipe, you'll be introduced to a few popular third-party extensions. The extensions are: eXtplorer, the Content Upload extension, JomCalendar, and CompoJoom comment system for Joomla! Each of these adds a unique level of functionality that rounds out your site.
Chapter 9, Troubleshooting: You will run into trouble from time to time with your Joomla! site or server. This chapter helps you with establishing a good and well-known troubleshooting process and offers some assistance on specific problems such as connecting to your database.
Chapter 10, Securing your Joomla! Site: Security is one task you should spend an appropriate amount of time and not skip. This set of recipes will assist you through the proper setting of permissions - a common trouble spot. You will learn how to patch, or in other words update your code. Apache web server provides a special setting file called .htaccess that allows you change and configure many important parts of your site. You'll learn how to use .htaccess to protect your site.
From time to time you may have a directory that you wish to keep private, free from prying eyes. In the recipe, Preventing Unauthorized Directory Viewing, you'll learn how to stop access to unauthorized persons.
Hackers love sites that give lots of error information, this helps them learn what your site is running and potentially gives them a clue on breaking in. You'll build a universal error page that gives the information on errors to your visitors that prevents hackers from learning too much.
Rounding out the security chapter, you'll discover how to disable your servers "banner", (a means to divulge important) information, block IP's and evil bots as well as adding protection for PHP, the language Joomla! is written in.
Chapter 11, Joomla! 1.6: Joomla 1.6 is the newest (and at this time, still beta) version of Joomla!. This is essentially a new version from the ground up. There are many new and powerful features in 1.6, such as the Access Control Level system or ACL. You'll spend time learning how to set up and configure this as well as establishing certain ways to restrict content.
Users and groups have changed a bit in 1.6 from the previous version and getting familiar with them will help you adopt v1.6.
The next two recipes are on learning to control access on a per article basis and using the new category manager. Lastly, there have been a great number of improvements in the extension manager and you'll discover those in the final recipe of this chapter.
You will need your desktop or notebook computer with an Internet Browser. You'll need to have or obtain a FTP client program, such as FileZilla. It will be beneficial to download the application known as NotePad+. This is a Windows application that replaces the normal notepad application.
The other technologies used in this book include the Linux operating system, MySQL database, PHP, and the Apache Web Server. You will only need a web hosting account with those installed on this.
The final piece is the most recent version of the Joomla! 1.5.xx family and optionally the latest version of Joomla 1.6!.
If you are a Joomla! site owner and have some problems that you want to get rid of quickly; or you just want to get particular things working or improved, this is the book for you. HTML, CSS, or programming knowledge is not required.
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.
Code words in text are shown as follows: "If you see this on your particular setup be sure and upload the files into the folder called public_html."
A block of code is set as follows:
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click the New Site button".
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
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 via 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 e-mail <[email protected]>.
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.
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 this book
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.
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/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
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.
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.
In this chapter, we will cover:
Installation of Joomla! 1.5 is typically very simple. While there are very few choices in hosting you need to make to install Joomla!, many users are tripped up by some common pitfalls. This chapter will help you avoid those. This chapter will show you how to install Joomla! on two different but common types of hosting platform.
We will look at setting up the database on two common hosting platforms, cPanel® and GoDaddy.com®. Both of the hosting systems offer various and important features, yet each accomplishes setup of your database in a different manner.
In this chapter we will be covering:
The first host type we'll cover is a cPanel® based host, which is found in many, many hosting platforms. The examples we use are from the popular host http://www.rochenhost.com/ which hosts Joomla.org
The other hosting platform we discuss is GoDaddy.com®.
Each approaches the task of the database setup very differently, yet they accomplish the same goal - setting up your database for Joomla!.
Once you get past the hurdle of setting up the database on the host, then the steps to install Joomla! are the same. This chapter will show you how to install an FTP client, set up each host, and then how to setup Joomla! 1.5.
Our first recipe is setting up the FTP (File Transfer Protocol) using an Open source application called FileZilla. You will use the FTP program to transfer the Joomla! 1.5 source files from your local machine to your server.
There are a few decisions you will need to make and space has been provided in this chapter to record your settings for future reference.
If you write down your settings be sure and keep this manual in a safe place. Loss or exposure of these settings could result in your site being damaged or attacked by a third party. Think of your ATM PIN - this is just as important.
Joomla! has a few requirements such as username, passwords, language, and whether or not you wish to implement the FTP layer.
Getting it wrong the first time is not the end of the world and is easily fixed by reinstalling or by correcting the install. See the chapter on Troubleshooting for more information.
Downloading the source for Joomla! should only take a few minutes and opening it is easy on most any Modern Windows® or Macintosh® Machine.
Grab a pencil and paper and let's get started.
Please note GoDaddy.com® is a registered trademark of GoDaddy.com, Inc. & cPanel® is a registered trademark of cPanel, Inc. Rochenhost.com is trademark Rochen Ltd.
In this task we will gather the required materials for installation. You will need an FTP program, such as FileZilla, to upload Joomla! and other items.
If you are on a Macintosh please locate the appropriate FTP transfer program.
Versions may vary
However, by the time this book went to print the current version is 1.5.21. You will see the .15 version in some graphics. Do not be concerned as they operate the same. Be sure and download the latest version for the 1.5.xx family available.
Security Tip
If you cannot keep this book in a safe place do not write your production settings in here. If someone gains access to your settings you wrote down, it could result in someone gaining unauthorized access. A full sheet has been provided in the appendix for you to fill in and tear out should you need to.
For convenience you may record those settings here:
FTP SERVER OR IP ADDRESS: ____________________
FTP USER: __________________________________
FTP PASSWORD: ______________________________
FTP PORT (OPTIONAL): ________ (typically PORT: 21)
For convenience you may record those settings here:
Admin: The default user name is ADMIN - for installation that is what you will use.
Password: ________________
eMail account: _____________________________
Did you know..
FTP is not considered the most secure means to communicate with your server. In the chapter on security you will be introduced to a more secure means of communication called SSH.
Depending on your host once you set up and login with FTP you may have to navigate to the website directory (known often as public_html). Ask your host to set up your FTP account to point to the path to the web sites root directory as default.
FileZilla is very self explanatory and accepting the defaults is the best method to get it installed and working.
Once installed, it will launch and you should see this screen:
We will need to set up your FileZilla client to talk to your server.Click File | Site Manager
You will now see the following screen:
Setting up Site ManagerThis will open up the configuration for a new HOST entry.
Click the New Site button