Everyone with a lot of searchable modules on his site knows this problem. For every module the name is displayed plus the information that nothing was found inside this module. Why not displaying search results a different way? Only showing links in a module where results occur? Here a how-to to remove the negative information for the modules with no results. Open xoopsroot/search and make some changes. Look for the
first appearance of
include XOOPS_ROOT_PATH."/header.php";
and insert after this this line:
$nothingthere = 1;
Look for the
first appearance of
<h4>...
and delete the line. Two lines later delete this line:
One line later
after } else {
insert the following lines:
$nothingthere++;
echo ""
.$myts->makeTboxData4Show($module->getVar('name'))."";
Look for the first appearance of:
include "include/searchform.php";
and insert the following lines
before the above line:
if ($nothingthere == '1') {
echo ""
._SR_NOMATCH."";
}
Now save the file and Voila! Now the search results page is tidied up. There is one tiny HTML-bug inside search.php. Look for line:
and replace with:
Cleaning up search results
This looks like a very useful hack, thanks for your input. I'm looking forward to trying this one. Has it been submitted for future feature requests?