KPS Knowledge Sharing

To see when new knowledge is shared by KPS, follow Patrick Jackson on twitter or subscribe to the RSS feed for this page.

Put your Label in the input box

Joomla > RSForms

Often in Joomla, real estate on the screen can end up at a premium.

Putting forms in modules is not uncommon, but to further reduce space, putting the label for the field into the field itself can save valuable pixels.

 

The little things you can do to make Joomla SEO friendlier...

Joomla > SEO

After reading Stephanie Chang's SEOMoz blog on CMS Tips for Large Enterprises, and having had a few clients this week all very keen to get blogging, I thought I'd start a list of tips on how you can make sure your Joomla Articles are as SEO friendly from the moment you start typing them.

 

Change a hidden field on a form based on dropdown value

Joomla > RSForms

As always, necessity can be the mother of invention. And as is becoming more often, I'm writing another blog post mainly so I can come back and find the answer next time I need it, as well as share it with anyone else that it might assist.

Today I needed to setup an RSForm!Pro form to do the following:

  • Select the subject type from a dropdown
  • Based on the subject type, set the email addresses to send the form result through to.

Change this:
to Change this:

 

Is that a real email address? From a real domain?

Joomla > RSForms

In RSForms the out of the box validation for email fields checks that the value being submitted is just a correctly formatted email address. However, ID-10-T errors can sometimes mean that though the address is valid with the default check, it's not actually a valid address due to:

  • dropping a dot in the email suffix is valid, but the domain may not be. eg @kpsystems.comau vs @kpsystems.com.au
  • prefix being the wrong length or containing invalid characters
  • suffix being the wrong length or containing invalid characters

So to fix it, what's needed is a better validation routine for email.

 

Fixing Joomla 1.0 for php 5.3.x

Joomla > Core

Joomla 1.0 has a few things that break under PHP 5.3.x, as a number of users have found over time.

Obviously, it's recommended that developers now take the time to upgrade their Joomla sites to 1.5 at least, and ideally now Joomla 1.6 as Joomla 1.5 has reached it's end of development life, and most major components are now available for Joomla 1.5.

Following upgrading my version of PHP recently, I needed to do my homework, and have found a few simple workarounds to get Joomla 1.0 functioning on PHP 5.3.x until I can get to the stage where I can update the last few sites I have in Joomla 1.0.

 

Tweaking Joomla 1.5 for PHP 5.3.x

Joomla > Core

Joomla 1.0 has a few things that break under PHP 5.3.x, as a number of users have found over time. How to fix them are found in my other article on the topic but there's also some issues that may pop up in Joomla 1.5 due to timezone changes with PHP 5.3

 

Captcha for Kunena - preventing spammers

Joomla > Extensions

At the Melbourne Joomla User Group in May 2010 there was a discussion about ways to prevent spam on Kunena forum component.

Kunena captcha setting is a setting that only effects the system when public posting is allowed (which in most forums is not recommended). So to fix it, Captcha needs to be implemented at the user registration level. Kunena uses the main Joomla login to register users, so you need to change the registration page for Joomla to fix it.

 

In need of validation...

Joomla > RSForms

KPS use RSForms Pro to create a variety of forms for clients. These have included to date contact forms, application forms, registration forms and forms for competition entries.

Customers often require extra validation on fields to ensure that what's being collected is correct.

The RSForms Documentation gives some details as how you can add custom validation rules to your RSForms installation.

In order to add a new validation rule, navigate in your Joomla file list, go to components/com_rsform/helpers/validation.php*. In this file you will find all the validation rules defined. In order to add a new validation rule, edit the file validation.php in the following manner:

  1. Add a new function that allows only one parameter. The name of the function will be the name of the validation rule, as displayed when adding a new component.
  2. On success, the function should return true. On fail, the function should return false.
 

SEF Presentation from Melbourne Joomladay 2010

Joomla > SEO

 Patrick Jackson presented a session at Melbourne Joomladay 2010 on Search Engine Friendly URLS and basic Joomla search engine optimisation.