The file to alter is /plugins/search/content.php
Two options are available depending on how you wish to manage your site
If you store all your standalone pages in uncategorised section then proceed as follows
Find the code below at around line 56
Comment out the line with
$sUncategorised = $pluginParams->get( 'search_uncategorised', 1 ); as indicated belwo
Code: Select all
// load plugin params info
$plugin =& JPluginHelper::getPlugin('search', 'content');
$pluginParams = new JParameter( $plugin->params );
$sContent = $pluginParams->get( 'search_content', 1 );
// $sUncategorised = $pluginParams->get( 'search_uncategorised', 1 );
$sArchived = $pluginParams->get( 'search_archived', 1 );
$limit = $pluginParams->def( 'search_limit', 50 );
Code: Select all
$wheres = array();
switch ($phrase) {
case 'exact':
$text = $db->getEscaped($text);
$wheres2 = array();
$wheres2[] = "LOWER(a.title) LIKE '%$text%'";
$wheres2[] = "LOWER(a.introtext) LIKE '%$text%'";
$wheres2[] = "LOWER(a.`fulltext`) LIKE '%$text%'";
$wheres2[] = "LOWER(a.metakey) LIKE '%$text%'";
$wheres2[] = "LOWER(a.metadesc) LIKE '%$text%'";
$wheres2[] = "LOWER(a.metakey) NOT LIKE '%{nosearch}%'";
$where = '(' . implode( ') OR (', $wheres2 ) . ')';
break;