Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Joomla! 3 Extension Development

You're reading from   Learning Joomla! 3 Extension Development If you have ideas for additional Joomla 3! features, this book will allow you to realize them. It's a complete practical guide to building and extending plugins, modules, and components. Ideal for professional developers and enthusiasts.

Arrow left icon
Product type Paperback
Published in Jul 2013
Publisher Packt
ISBN-13 9781782168379
Length 458 pages
Edition 3rd Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Timothy John Plummer Timothy John Plummer
Author Profile Icon Timothy John Plummer
Timothy John Plummer
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Learning Joomla! 3 Extension Development
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Before you Start 2. Getting Started with Plugin Development FREE CHAPTER 3. Getting Started with Module Development 4. Getting Started with Component Development 5. Backend Component Development – Part 1 6. Backend Component Development – Part 2 7. Frontend Component Development 8. Security – Avoiding Common Vulnerabilities 9. Packing Everything Together 10. Extending your Component with Plugins and Modules Index

Upgrading a Joomla! 2.5 component to make it Joomla! 3 compatible


If anyone has told you that all you need to do to upgrade an extension from Joomla! 2.5 to Joomla! 3 is do a find-and-replace for the new legacy classes, then they were lying, or didn't know what they were talking about. This may be true for very simple extensions that are already following best practices, but in reality there is a lot more work involved. There were a number of functions that were deprecated or changed, and with the introduction of Bootstrap, the backend interface has undergone some significant changes. So to make the extension work well on Joomla! 3, there is a bit of work involved.

The following section details a lot of the changes you will need to make to get your extension working in Joomla! 3:

http://docs.joomla.org/Potential_backward_compatibility_issues_in_joomla_3.0_and_Joomla_Platform_12.1

Some of the changes are quite subtle, such as changing the nameQuote to QuoteName, but some require a bit more work than just finding and replacing, such as the changes from getTableFields to getTableColumns. One change I'd like to highlight is the removal of DS that was commonly used for the directory slashes in previous Joomla! versions. Now you should use / instead. For example, JPATH_COMPONENT.DS.'controller.php' would now be written as JPATH_COMPONENT.'/controller.php'. Although you could define a DS constant to avoid having to change your code, I would recommend that you make the effort and update your code.

For plugins and modules, this is probably all you need to do to them and they will work, but for components it is not quite that easy. Even after you've made all these changes, although your extension may work in Joomla! 3, it may not look very pretty. You will see an example of this in the following screenshot, where there are unnecessary bullet points and a field that is only partially showing:

Since Joomla! 3 now uses Bootstrap and is mobile-ready, there is a bit of work required to make the extension look and behave like the core extensions, as there are a number of visual changes such as the introduction of tabs. All the detailed changes necessary to convert a Joomla! 2.5 component to a fully Joomla! 3 native component are outside the scope of this book, but you will be able to compare your code to our Joomla! 3 examples to get an idea of what you need to change, or you could also have a look at com_weblinks. The following screenshot shows the same form as shown in the previous screenshot, however this one has been fully updated to support Joomla! 3:

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime