30-Apr-2013

Increasing the search size of Joomla's search field

To comply with a usability report done on www.rinet.com.au at Powermapper the search string size for Joomla had to be increased from the default 20 characters to 35 or 40.

To do this simply edit your file [root]/language/[your language]/[your language].localise.php.

For Rinet IT being in English (GB) the path is [root]/language/en-GB/en-GB.localise.php.

At about line 63, for Joomla 2.5 look for the following code.

public static function getUpperLimitSearchWord() {
return 40;
}

Change the highlighted figure to your desired value, 35 to 40 is recommended.

Setting the box size

If desired set the search box size to match the maximum value. If you don't the user will have to scroll the field which can be annoying for them.

To do this go to Administrator/Extensions/Module Manager, and then "Search" from the Type drop down box.

Click on the search module. Under Basic Options the Box Width can be set.

Leave a Reply

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram