Monday, February 28, 2011

modal window with lightbox - native joomla javascript

Joomla's native modal.js ("squeezebox") is really easy to use to pop up a modal window with a lightbox overlay. You can popup images, hidden divs, internal and external urls.

It just takes one line of code in your component's template file, or in index.php if you want it site-wide.

Saturday, March 27, 2010

joomla module chrome - advanced styling

The normal way of styling Module Headers is to add a Module Class Suffix in
Extensions > Modules > YourModule
and then pick it up in the template css file using a selector like moduletable-moduleclasssuffix. But what if you want to do more? What if you want a module header where the H3 color is gray, but the first word is blue? Or the last word is blue?

This article will show you how to modify h3 titles using Joomla's template overrides with module chrome and a bit help from the preg_replace function.

Friday, March 19, 2010

TinyMCE Strips Out Code in Joomla

I like the TinyMCE editor except for the fact that it strips out some code when you edit HTML. Like you go to the trouble of adding something like:
<div class="mystyle">text</div>
you save it, and return to find that TinyMCE has stripped out the class attribute leaving you with:
<div>text</div>
The good news is that we can fix all that by using Extended Valid Elements.

Sunday, March 7, 2010

Dependent Selects using Joomla's javascript library – changeDynaList()

Dependent selects can be created using Joomla's built-in javascript library
(see includes > js > joomla.javascript.js )
using the changeDynaList() function.
 
So what I want to achieve here is that by selecting a Department, the Subdepartment dropdown gets dynamically populated.

Friday, March 5, 2010

domains and subdomains on apache localhost windows

Its frustrating when you need to test how htaccess is going to work against domains and subdomains on your windows localhost (apache-mysql-php), when all you have to work with is a uri like:
http://127.0.0.1/etc or
http://localhost/etc
On windows you can create domains and subdomains to show up instead.