SnellCode

Joomla! CMS Solutions Specialist

 
  • Increase font size
  • Default font size
  • Decrease font size

Joomla! Web Designer / Developer

Do you have a Joomla! emergency? Don't know where to turn? Contact me today!

I've used many of the major CMS platforms. Joomla! has become my favorite, because it's all about ease of use, and offers powerful tools for developers. Take a look at a few of my examples.

 

SC jQuery - System Plugin for Joomla! 1.5

E-mail Print PDF

This plugin is used to load jQuery javascript library, and set "no conflict" mode to allow usage with mootools, and other libraries. No conflict mode removes the "$" operator from jQuery, allowing other libraries to use that operator. To use jQuery code with this plugin, you must wrap your code in a function like this...

<script>
jQuery(function($) {
  $('body').css('color','red');
});
</script>

You may add as many lines of code as you need, but you must wrap the whole thing in the protected function. This is just one method of using jQuery in no conflict mode, for other methods, see: Using jQuery with Other Libraries

Thank you for trying this plugin, don't forget to 'publish' it. If you have questions, please email me at This e-mail address is being protected from spambots. You need JavaScript enabled to view it

download

Last Updated ( Thursday, 04 June 2009 19:00 )
 

Joomla! Module Administrator Parameters - Multiple Select Lists

E-mail Print PDF

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...

Last Updated ( Sunday, 23 November 2008 00:38 ) Read more...
 

Joomla! Module Chrome

E-mail Print PDF

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 <jdoc> tag in your template. For example, the tag <jdoc:include type="modules" name="left" style="xhtml" /> 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.

Here's a module chrome I made to give me more flexible module style options. I wanted a way to add numbered css class names to each published module in the given position, and also to easily identify the first and last module in css. This way, no matter what modules may be published, my template can adapt automatically.

Here's the <jdoc> tag I use: <jdoc:include type="modules" name="right" style="count" />

This means that all the modules in the "right" position will refer to the "count" function in my custom module chrome. And here's the corresponding function, that will calculate the information about the modules being displayed, and add appropriate css class names.

*NOTE: You must clear the module cache if you change the order of your modules that use this function, or they will not have the correct css class names assigned. Once the module cache is cleared, it should regenerate the correct css classes.


function modChrome_count($module, &$params, &$attribs)
{
	if (!empty ($module->content)) : 
		$document = &JFactory::getDocument();
		static $modulenumber = 1;
		$class = $params->get('moduleclass_sfx');
		$class .= ' module-number-'.$modulenumber;
		if( $modulenumber == 1 ) {
			$class .= ' first';
		} else if ( $modulenumber == $document->countModules( $attribs['name'] ) ) {
			$class .= ' last';
		}
		$modulenumber++;
		?>
		<div class="moduletable<?php echo $class; ?>">
		<?php if ($module->showtitle != 0) : ?>
			<h3><?php echo $module->title; ?></h3>
		<?php endif; ?>
			<?php echo $module->content; ?>
		</div>
	<?php endif;	
}

Last Updated ( Wednesday, 27 August 2008 14:37 )
 

Joomla! Module Parameters

E-mail Print PDF

I could go on and on about what a great job the Joomla! developers have done… so I will! I’m going to share with you some of my insights into the inner working of Joomla! module parameters.Ingenuously simple, yet effective, all module parameters are defined in an XML file for each module.

Last Updated ( Thursday, 25 June 2009 13:47 ) Read more...