O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning Joomla! 1.5 Extension Development

Book Description

A practical tutorial for creating your first Joomla! 1.5 extensions with PHP, written and tested against the final release of Joomla! 1.5

  • Program your own Joomla! extensions

  • Master Model-View-Controller design

  • Build configurable site modules to show information on every page

  • Use built-in HTML and JavaScript functions

In Detail

Joomla! is the world's hottest open-source content management system, and the winner of the 2006 Open Source CMS Prize.

While Joomla! is packed with features, its greatest quality is that it is extremely extensible, allowing any number of complex applications to be cleanly integrated. Shopping carts, forums, social networking profiles, job boards, and real estate listings are all examples of extensions developers have written for Joomla!. All of these can run off one Joomla! site, while only one database, template, and core need to be maintained. When you build an extension to Joomla!, it will inherit the look and feel of the overall site.

If you're eager to start creating extensions for Joomla!, this book is for you. Walk through the development of complete Joomla! 1.5 components and modules with this tutorial for PHP programmers. Written for Joomla! version 1.5 and tested against the final release, this book will get you started coding your first extensions as quickly as possible, and adds the features that will make your work look professional! This book is the most up-to-date introduction to creating Joomla! extensions available.

The book will show you how to use the Model-View-Controller design pattern, pull in common HTML elements, use JavaScript frameworks, manage users, build configuration panels, internationalize interfaces, and manage database records. General knowledge of PHP is assumed, but previous Joomla! programming experience is not.

Table of Contents

  1. Learning Joomla! 1.5 Extension Development
    1. Learning Joomla! 1.5 Extension Development
    2. Credits
    3. About the Author
    4. About the Reviewer
    5. Preface
      1. What this book covers
      2. Who is this book for
      3. Conventions
      4. Reader feedback
      5. Customer support
        1. Downloading the example code for the book
        2. Errata
        3. Piracy
        4. Questions
    6. 1. Joomla! Extension Development: An Overview
      1. Why extend Joomla!?
        1. Customization versus extension
      2. How to extend Joomla!
        1. Components
        2. Modules
        3. Plug-ins
      3. Topic overview
        1. Creating toolbars and list screens
        2. Maintaining a consistent look, and reducing repetitive code by using HTML functions
        3. Accessing the database and managing records
        4. Security, and the preferred way of getting request variables
        5. Menu item control
        6. Controlling the logic flow within a component
        7. Configuration through XML parameters
        8. Packaging and distributing
      4. Our example project
      5. Summary
    7. 2. Getting Started with Component Development
      1. Joomla!'s component structure
        1. Executing the component
      2. Joomla!'s division of frontend and backend
      3. Registering your component in the database
      4. Creating toolbars
        1. Creating a second toolbar
        2. Available toolbar buttons
      5. Summary
    8. 3. Backend Development
      1. Creating the database table
        1. Creating a table class
      2. Coding with MVC
      3. Creating the review form
      4. Processing the data
      5. Creating a list screen
      6. Editing records
      7. Summary
    9. 4. Frontend Development
      1. Listing the reviews
      2. Displaying a review
      3. Generating search-engine-friendly links
        1. Building URL segments
        2. Parsing URL segments
      4. Adding comments
      5. Displaying comments
      6. Summary
    10. 5. JTable, JHTML, and JUser
      1. Overriding JTable methods
        1. Adding a check() function
        2. Overriding the bind() function
      2. Adding ordered records
      3. Recording traffic
      4. Checking out and checking in records
      5. Getting user information
      6. Generating elements with JHTML
        1. Pre-filled lists
        2. Running content plug-ins
        3. Using JHTML in the backend
        4. Setting access
      7. Setting ordering
      8. Summary
    11. 6. Module Development
      1. Registering the module in the database
      2. Creating and configuring a basic module
      3. Recruiting some helpers
      4. Trying some different layouts
      5. Mixing it up
      6. Summary
    12. 7. Expanding the Project
      1. Publishing records
        1. Unpublishing reviews
      2. Deleting records
      3. Adding Apply
      4. Requiring specific fields
      5. Using pagination to break up long lists
      6. Searching
        1. Adjusting the model
        2. Adjusting the view
      7. Migrating toolbars to views
      8. Managing comments
        1. Linking the comments controller
      9. Summary
    13. 8. Using JavaScript Effects
      1. Modal boxes
        1. Configuring the modal box
        2. The raw format and MVC
      2. Tool tips
      3. Sliding panes
      4. Customizing Google Maps
        1. Interactive maps
      5. Using jQuery
        1. Writing jQuery code
        2. Using jQuery with MooTools
        3. Always load MooTools first
      6. Summary
    14. 9. Behind the Scenes: Plug-ins
      1. Database queries
      2. A simple link plug-in
      3. What events can be registered?
          1. System
          2. Search
          3. Authentication
          4. User
          5. Editor-xtd
          6. Editor
          7. Content
      4. An information box plug-in
      5. Searching the reviews
      6. Summary
    15. 10. Configuration Settings
      1. Adding parameters to extensions
      2. Parameters for modules
        1. What parameters are available for use?
      3. Parameters for plug-ins
      4. Parameters for components
        1. Adding parameters to the list view
        2. Adding parameters to the single view
        3. Adding component global parameters
      5. Summary
    16. 11. Email, Languages, and JFile
      1. Sending emails
        1. Linking the form
        2. Sending email
        3. Adding a success message
      2. Managing languages
      3. Creating translations
        1. Debugging languages
        2. Translating the frontend
      4. Handling file uploads
        1. Using the original filename
      5. Summary
    17. 12. Packing Everything Together
      1. Listing all of the files
      2. Packaging the module
      3. Packaging the plug-ins
      4. Packaging the component
      5. Including SQL queries
      6. Creating backend menu items
      7. Extra installation scripts
      8. Distribution
      9. Summary