Joomla Category
Facebook Like Button module
Please note: The button you see above the article ↑ is part of the new open graph plugin we are working on. The module demo is below. We will post about this soon!
In Facebook's bid to take over the world, they have introduced the Facebook Like Button. We decided that it might be useful to have a Joomla module that auto-generates the code for this button, so we set to work and in an hour we had assembled a first version that seems to run pretty well. We are assuming that the Like Button will change over time, so we are trying to keep our code as easy to change as possible. For a picture and some more information continue reading below.
A/B testing with modules
Recently one of our clients asked us if it was possible to try some A / B testing on some of their modules and the contents inside them. A cursory glance at the Joomla extensions directory revealed that no such module exists for Joomla. As a result we took it upon ourselves to create this module ourselves and adding a little twist. Instead of testing just one module, we decided it might be interesting if the client could test pools of modules against each other. So for example, custom HTML content vs. image galleries modules. In addition we wanted to put in a mechanism to control how often one pool is displayed so you could create a ratio analysis. For example a poll should be displayed 2/3 of the time vs. 1/3 of the time for the other pool. Below you will find a few screen shots of the administrative back end and version to download of the module.
Developing Mobile Skins for Joomla
The rapid proliferation of smart phones with full browser capability has unveiled a strange problem for website and content providers. On one hand it is desirable to be able to show a website in it's full glory and many new smart phones will do that, but on the other there is something to be said about a fast loading, easy to read version of a website that is both friendly on the smart phone screen real estate as well as a visitors mobile data package. Many website will therefore offer to provide two versions of the site, one optimized for mobile browsing and one for regular browsers. CNN.com is a great example where if you visit it from a smart phone, it will most likely take you to http://m.cnn.com, a mobile equivalent of their content. Now clearly, CNN has the resources to build a mobile version of their site with it's own template. Joomla users could do the same, install another instance of the Joomla software package, apply one of many mobile skins, and redirect all mobile users to that site. But that seems redundant to have to install another skin, or even just another instance of Joomla, including a mobile sub-domain name (m.cnn.com). In the following paragraphs we will explore the ways of building a simple component to produce great mobile skins of your site on the fly.
Including Modules as Part of an Articles' Content
One common question we have been getting in relation to our last blog post, Writing a Simple Joomla Module, is how we included the module as part of the article without just placing it into a module space specified in the template and appending it to the article itself. Joomla 1.5 has easily simplified this task by allowing the module system to declare custom spaces and have these be loaded through an included plugin. This may seem a little confusing at first but we hope we can clear it up below!
Writing a simple Joomla Module
Akin to extending an existing module in Joomla, it is also incredibly easy to writing your own. Using this post, we want to give a quick run through of how quick and painless it is to design your own modules to be included in various areas of your website. To provide a useful example, we will be leveraging Google's Books Search API to embed a preview of a book of our choosing based on it's ISBN number. This way we could, for example, feature recommended reading on a website by providing an interactive and rewarding experience. Lets jump right in!
Using jQuery in Joomla
jQuery is an advanced javascript library that greatly simplifies "HTML document traversing, event handling, animating, and Ajax interactions for rapid web development". However, jQuery is not the default javascript library choice in Joomla, which relies instead on MooTools. While the merits of one over the other can be discussed up and down the Internet, it leaves us with the problem that they are incompatible when both are invoked at the same time, as one will overwrite parts of the other. Fortunately, jQuery provides us with a no conflicts option that we can call upon to have jQuery play nice with the rest of Joomla.
Activating SEO friendly URLs in Joomla
There exists a significant debate about how effective search engine optimized (SEO) friendly URLs are in determining a website's rank in various search engines. However, little debate exists to how it aids in people navigating web pages and understand the content they are looking at. For example a url ending in this:
http://myjoomla.com/index.php?option=com_content&view=article&id=57&Itemid=272
makes a lot less sense than something like this:
http://myjoomla.com/foo/bar
Let's discuss how to activate these helpful SEO friendly URLs in Joomla.
Extending Joomla modules with parameters
One of the best features of Joomla is the ease with which you can extend existing functionality. One such example is how you can quickly change the parameters of a given module and how they are implemented. Using a standard Joomla module we will show how simple it is to modify and enhance existing code.
Counting active Joomla modules
Frequently in Joomla we want to show different layouts depending on if there are modules active in certain module spaces. Joomla has (used to have) it's own solution by allowing you to define separate templates for internal pages and the home page. However this is very inconvenient as it means that you have to maintain several templates. There is however a simple solution to ascertaining if there are modules active in a module space, thus rendering different template elements.
SS74NEN3G6XX