Joomla! 1.5 Development Cookbook


Joomla! 1.5 Development Cookbook
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters

 

  • Simple but incredibly useful solutions to real world Joomla! 1.5 development problems
  • Rapidly extend the Joomla! core functionality to create new and exciting extension
  • Hands-on solutions that takes a practical approach to recipes - providing code samples that can easily be extracted

Book Details

Language : English
Paperback : 360 pages [ 235mm x 191mm ]
Release Date : September 2009
ISBN : 1847198147
ISBN 13 : 9781847198143
Author(s) : James Kennard
Topics and Technologies : All Books, CMS and eCommerce, Cookbooks, Content Management (CMS), Joomla!, Open Source

Back to BOOK PAGE

Table of Contents

Preface
Chapter 1: Development using JoomlaCode.org and SVN
Chapter 2: Keeping Extensions Secure
Chapter 3: Working with the Database
Chapter 4: The Session and the User
Chapter 5: Multilingual Recipes
Chapter 6: Interaction and Styling
Chapter 7: Customizing the Document
Chapter 8: Customizing the Backend
Chapter 9: Keeping it Extensible and Modular
Chapter 10: JObjects and Arrays
Chapter 11: Error Handling and Reporting
Chapter 12: Files and Folders
Index
  • Chapter 1: Development using JoomlaCode.org and SVN
    • Setting up a JoomlaCode.org project
    • Managing members of a JoomlaCode.org project
    • Setting up JoomlaCode.org Subversion
    • Understanding the Subversion skeleton
    • Understanding revisions in Subversion
    • Understanding the Subversion process
    • Checking out a Subversion repository using TortoiseSVN
    • Editing a working copy using TortoiseSVN
    • Inspecting changes using TortoiseSVN
    • Updating a working copy and resolving conflicts using TortoiseSVN
    • Committing changes using TortoiseSVN
    • Exporting a working copy using TortoiseSVN
  • Chapter 2: Keeping Extensions Secure
    • Writing SQL safe queries
    • Writing SQL-safe LIKE string comparison queries
    • Using the token
    • Making a filename safe
    • Making a directory path safe
    • Making a path safe
    • Safely retrieving request data
    • Getting a value from an array
  • Chapter 3: Working with the Database
    • Executing a query
    • Loading the first cell from the result of a query
    • Loading the first record from a query
    • Loading more than one record from a query
    • Handling DBO errors
    • Creating a JTable
    • Creating a new record using a JTable
    • Updating a record using a JTable
    • Reading an existing record using a JTable
    • Deleting a record using a JTable
    • Checking a record in and out (record locking) using a JTable
    • Modifying record ordering using a JTable
    • Publishing and unpublishing a record using a JTable
    • Incrementing a record hit counter using a JTable
  • Chapter 4: The Session and the User
    • Getting the session handler
    • Adding data to the session
    • Getting session data
    • Checking for session data
    • Checking the session token
    • Getting the user
    • Determining if the current user is a guest
    • Getting the user's name and username
    • Getting the user's group ID and type
    • Restricting a user's access using Public, Registered, and Special
    • Getting the user's parameters
    • Setting the user's parameters
    • Extending and editing user parameters
    • Sending an email to the user
  • Chapter 5: Multilingual Recipes
    • Creating a translation
    • Translating some text
    • Determining the character length of a UTF-8 string
    • Removing leading and trailing UTF-8 whitespace
    • Comparing UTF-8 strings
    • Finding a UTF-8 string in a UTF-8 string
    • Executing a regular expression on a UTF-8 string
    • Reversing a UTF-8 string
    • Extracting a substring from a UTF-8 string
    • Replacing occurrences of a UTF-8 string in a UTF-8 string
    • Accessing characters in a UTF-8 string by position
    • Converting a string from one encoding to another
    • Creating a UTF-8 aware database installation script
  • Chapter 6: Interaction and Styling
    • Getting page and component parameters
    • Adding CSS to a page
    • Overriding component templates
    • Adding JavaScript to a page
    • Creating a modal window
    • Generating modal content
    • Updating an element using Ajax and MooTools
    • Updating an element based on a form using Ajax and MooTools
    • Providing an Ajax response from a component
    • Enabling pagination in a list of items
  • Chapter 7: Customizing the Document
    • Setting the document title
    • Setting the document generator
    • Setting the document description
    • Adding metadata to the document
    • Changing the document character set
    • Changing the document MIME type
    • Controlling client caching of responses
    • Creating a PDF in a component
    • Creating an RSS or Atom feed in a component
    • Outputting a RAW document from a component
    • Using a custom JDocument in a component (PHP 5 only)
  • Chapter 8: Customizing the Backend
    • Disabling the menu bar
    • Setting the toolbar title and icon
    • Adding common item manipulation buttons to the toolbar
    • Adding common itemized manipulation buttons to the toolbar
    • Adding custom buttons to the toolbar
    • Adding spacers and dividers to the toolbar
    • Adding a help system to a component
    • Creating a filter header for tabular data in an MVC component
    • Filtering tabular data in an MVC component
    • Creating toggle-enabled order column headers for tabular data in an MVC component
    • Ordering tabular data in an MVC component
  • Chapter 9: Keeping it Extensible and Modular
    • Loading plugins
    • Invoking a plugin
    • Creating a Joomla! search plugin
    • Creating your own library and import function
    • Installing a plugin programmatically during a component installation
    • Managing categories the easy way
    • Defining JParameters using XML
    • Creating a JParameter object
    • Rendering a JParameter object
    • Saving JParameter data
    • Getting and setting values in a JParameter object
    • Defining your own JParameter type
  • Chapter 10: JObjects and Arrays
    • Getting a JObject property
    • Getting all of the public JObject properties
    • Setting a JObject property
    • Setting a batch of JObject properties
    • Reporting an error in a JObject
    • Getting an error from a JObject
    • Getting all errors from a JObject
    • Converting an object to an array
    • Converting an array to an object
    • Getting a column from a multidimensional array
    • Getting a value from an array
    • Casting all elements of an array to integers
    • Sorting an array of objects
    • Imploding an array
  • Chapter 11: Error Handling and Reporting
    • Raising an error-level J!error
    • Raising a warning-level J!error
    • Raising a notice-level J!error
    • Enqueuing a message
    • Changing the default J!error handling
    • Handling and raising a bespoke J!error
    • Logging errors and events using JLog
    • Throwing exceptions with PHP 5
    • Catching exceptions with PHP 5
  • Chapter 12: Files and Folders
    • Checking whether a file or folder exists
    • Reading a file
    • Deleting a file or folder
    • Copying a file or folder
    • Moving and renaming files and folders
    • Creating a folder
    • Uploading files to Joomla!
    • Reading a directory structure
    • Changing file and folder permissions
Back to BOOK PAGE

James Kennard

James Kennard is a computer programmer. He has worked with various PHP and MySQL applications, since 2002. He quickly discovered Mambo/Joomla! because of its flexible extension manager. James currently maintains one open-source Joomla! component, which has been translated into over fifteen languages. Moreover, he has plans to build two more open-source components. Examples of his work can be found on his personal website www.webamoeba.co.uk.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 2 submitted: last submission 04 Mar 2013

Errata type: Technical | Page number: 109

Administrator (25) should be: Administrator (24)

 

Errata type: Code | Page number: 83

$table =& $this->getModel('Foobar'); should be $table =& $this->getTable('Foobar');

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Joomla! 1.5 Development Cookbook +    Documentum 6.5 Content Management Foundations =
50% Off
the second eBook
Price for both: $44.10

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

 

  • Make your extensions extensible, add extensions points to allow third parties to customize your extension
  • Create international extensions by enabling multilingual capabilities
  • Build more than just HTML pages - create PDF documents, Atom Feeds, and more!
  • Improve the user experience by adding Ajax
  • Create Atom and RSS feeds to keep users up-to-date
  • Utilize the power of Subversion to maintain your source code
  • Execute database queries and handle returned data in order to access and modify your data
  • Dynamically extend your database tables using JParameter to make your extensions more flexible
  • Keep your gremlins at bay by handling errors the Joomla! way
  • Work with the file system, interrogate existing files and folders and store data in the file system
  • Take control of your workflows by using JoomlaCode.org to manage your Joomla! projects

In Detail

Joomla! is the world's hottest open-source content management system. Out of the box, Joomla! does a great job of managing the content needed to make your website sing. Many Joomla! developers face common implementation hurdles, some might want to rapidly extend the Joomla! core functionality or might want to create new and exciting extensions.

This book has a "wealth" of solutions for problems that Joomla! developers face regularly. It provides step-by-step mini examples which show how to overcome common design and implementation problems when creating Joomla! extensions. It will help you setup a sustainable collaborative development environment using the powerful free services offered by JoomlaCode.org.

This book can be used in different ways. It can be used by the pro Joomla! developer looking for a specific solution to a problem and can also be used by a novice developer looking for an insight into an area of common problems, such as effectively handling errors in Joomla! Readers who choose to read an entire chapter will first be given a brief overview of the topic in hand and its role and importance when developing for Joomla! The Recipes contained within the chapter will introduce the reader to specific problems and provide hands-on solutions. It provides solutions for core design topics including security, data access, users, sessions, and multilingual capabilities.

This practical book, packed with plenty of code samples, and tips and tricks, will help you to quickly implement solutions for common Joomla! 1.5 programming design problems.

Approach

This book contains recipes which define common problems and provide suggested solutions. This is not a book to read from cover-to-cover, it is hands-on solutions book that takes a practical approach to recipes - providing code samples that can easily be extracted and modified to suit the needs of the reader. Each recipe is presented as a separate entity and prior reading of other recipes is not required. Chapters provide categorization of recipes and give an introduction to the subject area with reference to the recipes contained within.

Who this book is for

This book is for PHP developers who have experience of developing for Joomla! It does not introduce developing extensions for Joomla!, it is assumed that the reader has prior knowledge of the subject and is looking for a quick guide to solve common problems quickly which commonly occur when developing for Joomla! It does not matter if you are an accomplished Joomla! developer or just starting out. For each scenario that this book addresses, there is an introductory explanation of the problem and an easy to implement solution. For the more accomplished developers recipes also include a discussion of the solution explaining how it works and how it can be further enhanced or customized.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software