4
Make a backup of your site and database before making any changes.
It looks like there's a couple of problems in the ./include/search.inc.php file that should be 'fixed'.
1) Change line 46 from:
$sql .= "(l.title LIKE '%$queryarray[$i]%' OR c.title LIKE '%$queryarray[0]%' OR t.description LIKE '%$queryarray[$i]%')";
to
$sql .= "(l.title LIKE '%$queryarray[$i]%' OR c.title LIKE '%$queryarray[i]%' OR t.description LIKE '%$queryarray[$i]%')";
2) Change line 36 from:
$sql = "SELECT l.lid,l.cid,l.title,l.submitter,l.date,c.title,t.description FROM ".$xoopsDB->prefix("xdir_links")." l LEFT JOIN ".$xoopsDB->prefix("xdir_cat")." c ON c.cid=l.cid LEFT JOIN ".$xoopsDB->prefix("xdir_text")." t ON t.lid=l.lid WHERE status>0";
to
$sql = "SELECT l.lid,l.cid,l.title AS linktitle,l.submitter,l.date,c.title AS cattitle,t.description FROM ".$xoopsDB->prefix("xdir_links")." l LEFT JOIN ".$xoopsDB->prefix("xdir_cat")." c ON c.cid=l.cid LEFT JOIN ".$xoopsDB->prefix("xdir_text")." t ON t.lid=l.lid WHERE status>0";
3) Change line 57 from:
$ret[$i]['title'] = $myrow['title'];
to
$ret[$i]['title'] = $myrow['linktitle'];
This should improve your search results and also display the business name instead of the category title.