com_search :: increase the search string limit to 200 chars

Joomla! components modifications

com_search :: increase the search string limit to 200 chars

Postby anvj » Sat Feb 06, 2010 2:59 am

Increase the search string maximum limit from 20 to 200.

Modify the file administrator/components/com_search/helpers/search.php as follows:

From:
Code: Select all
// limit searchword to 20 characters
if ( JString::strlen( $searchword ) > 20 ) {
       $searchword    = JString::substr( $searchword, 0, 19 );
       $restriction    = true;
}


To:
Code: Select all
// limit searchword to 200 characters
if ( JString::strlen( $searchword ) > 200 ) {
       $searchword     = JString::substr( $searchword, 0, 199 );
       $restriction     = true;
}


Modify the messages within the language file (for English) language/en-GB/en-GB.com_search.ini as follows:
From:
Code: Select all
SEARCH_MESSAGE=Search term must be a minimum of 3 characters and a maximum of 20 characters.

To:
Code: Select all
SEARCH_MESSAGE=Search term must be a minimum of 3 characters and a maximum of 200 characters.
anvj
Site Admin
 
Posts: 7
Joined: Thu Feb 04, 2010 4:21 pm
Location: Inside of Joomla!

Return to Components

Who is online

Users browsing this forum: No registered users and 1 guest

cron