Joomla! How-To's: Development
How to track your Joomla! project with Git
July 05, 2010 | by Joseph LeBlancIf you’ve ever worked on an existing website, chances are you’ve run into a directory listing like the following:
Copy of index.html
about.html
contact.html
favicon.ico
index.html
index.html.bak
index.html.bak2
index.html.old
pricing.html
It’s also quite possible you are responsible for having created a mess like this. We’re always told to make backups of our files, and so we make them, often right next to the files of a live site. While it’s a good idea to make a backup of your code before changing something that already works, .bak, .old, and .other files can accumulate very quickly.
Made-up extensions like .bak tell us (let alone others) very little about the significance of each change. It would be nice if there were some way of keeping a history of every change made to a file. Better still, tracking who made each change would be useful. And a way of combining changes from two different copies of the same file would be fantastic.
Fortunately, such systems already exist.
Add a commentUTF-8 in Joomla
April 18, 2010 | by James KennardHave you ever browsed to a website only to find that half the content is unreadable? Or that certain characters are being displayed in strange and mysterious ways? Or perhaps you wanted to enter a foreign or unusual character but found that the result was a garbled mess.
The chances are you have been subject to poorly managed character encodings. Joomla! extensions are no exception to these occurrences, but with a little bit of effort and some help from the Joomla! framework, we can avoid these problems with relative ease.
Add a commentHow to Use Sessions in Joomla!
March 08, 2010 | by Brian EdgertonSession storage is a very important aspect of web applications. In its simplest form, a PHP session allows data to be stored temporarily on the server and accessed throughout a user's time on the site. When that user leaves the site or is inactive for a certain amount of time, the data is destroyed. While anonymous sessions are common, sessions are usually associated with user logins. When a correct username/password combination is entered, a session is created around that user's access information and then read and checked every time that user loads a page. As a developer, you can access this session functionality to enhance your extensions.
Add a commentHow to debug your Joomla code with FirePHP
February 22, 2010 | by Joseph LeBlancDebugging PHP applications has always been a bit of a challenge, as the environment is so distributed. At the minimum, there is a web server, the PHP interpreter, and the web browser. While there are tools that add debugging environments to PHP (such as XDebug), you don’t always have access to install them on the server you’re working with.
Fortunately, you can gain some reasonable debugging capabilities through FirePHP. When you want to dump objects or variables back to your browser without having to do so in your HTML, FirePHP is ready for the task. It can also be used to handle code traces and PHP errors.
FirePHP is both a Firebug extension and a PHP library. When the PHP library is in place, special HTTP headers containing JSON objects are created. Firebug reads the HTTP headers, decodes the JSON, then shows the variables in the console. Since the output body is unaffected, it is extremely useful for debugging XML, JSON, PDFs, images, or other non-HTML output generated in PHP.
Add a commentHow to Use Dynamic CSS in Your Joomla Extension
February 09, 2010 | by Brian EdgertonSomething I have run into frequently during module development is the need to allow multiple instances of that module on a single page. Joomla!, of course, handles 99% of the work involved, but there are a few tricky aspects to making this work. One is the need to eliminate styling conflicts, especially in themed modules. If you only use generic classes and then load multiple theme/color stylesheets, the end result can be unpredictable to say the least.
Add a commentPage 1 of 2






