ex: I have the searchalldefaulttab tweak set to categories, so categories always show first on a search. But sometimes there may be no category match, but several link matches. In this case, the tab for link matches shows up, but the actual link listings remain hidden. It'd be nice if your default tab has no results, than listings of other types would become the new default. I fixed that in searchallfilled.php by changing the code bit to: // add template javascript for the new tabbing options if (tweakisset('searchalldefaulttab')) $default = tweakvalue('searchalldefaulttab'); else $default = 'categories'; if ($numcatresults == 0) { $extradocreadystuff .= " $('#links').show0); $('#categories').hide(0); $('#comments').hide(0); $('#members').hide(0); $('#".$default."').hide(0); "; } else { $extradocreadystuff .= " $('#links').hide(0); $('#categories').hide(0); $('#comments').hide(0); $('#members').hide(0); $('#".$default."').show(0); "; } But I'm sure there's a better way that would be universal for everyone, no matter what their default tab is. |