Joomla! Tips

Joomla! 1.5 Development Cookbook

Written by Phil Snell Friday, 08 January 2010 11:57

If you're a Web Developer interested in developing extensions for Joomla!, there's a great new book by James Kennard called Joomla! 1.5 Development Cookbook.   It's published by Packt Publishing, which is an excellent resource for Joomla! books.  This book is aimed at experienced PHP developers, who have some knowledge about Joomla!.  It doesn't try to explain all about how Joomla! works, it assumes you know that fairly well.  What is does is provide many real world, practical solutions that you will be able to use on a regular basis when developing for Joomla!.

Read more: Joomla! 1.5 Development Cookbook

0 Comments

   
Joomla! Environment Variables in CSS and Javascript

Written by Phil Snell Tuesday, 08 December 2009 15:19

Here's something I use in templates so that it's easy to apply special styles or effects to certain pages based on the Joomla! environment variables...

$Itemid = JRequest::getInt( 'Itemid', 0 );
$option = JRequest::getCmd( 'option', 'none' );
$view = JRequest::getCmd( 'view', 'none' );
$id = JRequest::getInt( 'id', 0 );
echo "<body id='Itemid_{$Itemid}' class='option_{$option} view_{$view} id_{$id}'>";

Read more: Joomla! Environment Variables in CSS and Javascript

0 Comments

   
Automatic Image Padding in Joomla!

Written by Phil Snell Tuesday, 15 September 2009 08:00

The wysiwyg editors in Joomla! offer the option to align an image left or right in your article. However, by default these images will not have padding around them, and the may look squished against the text. Here's a solution I use the help deal with this issue...

Read more: Automatic Image Padding in Joomla!

2 Comments

   
Joomla! Module Administrator Parameters - Multiple Select Lists

Written by Phil Snell Monday, 24 August 2009 08:29

Joomla! provides an easy way to add parameters to modules in the administrator control panel. Each module has its own folder inside the modules/ directory. In this directory, an xml file describes the admin control panel parameter options. The file name is modules/mod_YOURMODULENAME/mod_YOURMODULENAME.xml. It's possible to customize these options, create new options, or even create your own custom module, with its own xml parameter file.

The parameters available to you in modules are the ones found in libraries/joomla/html/parameter/element/. The files in this directory all correspond to parameter types you can use in your module xml file. You can also define your own module parameter types, to give you different html list behaviors, or custom data. I recommend packaging these custom elements with the module in the directory modules/mod_YOURMODULENAME/elements/, but you can put them anywhere you want. Perhaps you will have several modules using these resources, in which case you may want to create a system plugin to include your custom library files. In any case, a example of a file in elements/ would look something like this...

Read more: Joomla! Module Administrator Parameters - Multiple Select Lists

2 Comments

   
Joomla! Module Chrome

Written by Phil Snell Monday, 24 August 2009 08:29

Joomla! 1.5 module chrome offers web designers a flexible way to manipulate the output of modules. The built in chrome functions can be found in templates/system/html/modules.php. These functions can be accessed with the tag in your template. For example, the tag has the style "xhtml", so Joomla! will look for the function modChrome_xhtml(), and use this to generate the output for the module.

You can use these functions as a guide, and make your own chrome. To do this, create a file in your template at templates/YOUR_TEMPLATE_NAME/html/modules.php. Any functions you add to this will be available to use in your template. Just make sure you follow the examples for the naming convention, and to know the variables you have available.

Read more: Joomla! Module Chrome

0 Comments