This email address is being protected from spambots. You need JavaScript enabled to view it.

Joomla - How to extend search box max length

Default Joomla installation (1.5x) version does not give option to extend maximum number of characters of the search input box. Default value is only 20 characters which is not enough for most search queries. To enable search input box to accept 100 characters, three files must be changed. For lazy ones (like I'm), I've assembled small zip files with modified files incl. full path. You only need to upload to your Joomla root installation directory, unzip and overwrite old files.

Download changed files (extends search box max char to 100) (tested on 1.5.21 Joomla)

 

For those that are willing to change files for them selves or to set different maximum, change files (tested on 1.5.21 Joomla):

  1. administrator/components/com_search/helpers/search.php change line 66 (if ( JString::strlen( $searchword ) > 100) ) and 67 ( $searchword     = JString::substr( $searchword, 0, 99 ); )
  2. components/com_search/views/search/tmpl/default_form.php line 12 (maxlength="100")
  3. modules/mod_search/mod_search.php line 25 ($maxlength  = $width > 100 ? $width : 100;)

 

More on this topic on Joomla forum