registerFunction( 'onSearch', 'botLinksSearch' ); function botLinksSearch( $ret_array ,$text,$search_op) { global $conn; $rs=$conn->Execute("SELECT id,title,name,description FROM #__categories WHERE section='com_weblinks' AND published=1"); if($rs && $rs->RecordCount()>0 && $rsa=$rs->GetArray() ) { foreach($rsa as $row) { if(search_ext($row['title'].$row['name'].$row['description'],$text,$search_op)) { $st_arr['link']="index.php?option=weblinks&catid=".$row['id']; $st_arr['title']=$row['title']; $st_arr['desc']=$row['description']; $ret_array[]=$st_arr; } } } $rs=$conn->Execute("SELECT id,title,description FROM #__weblinks WHERE published=1"); if($rs && $rs->RecordCount()>0 && $rsa=$rs->GetArray() ) { foreach($rsa as $row) { if(search_ext($row['title'].$row['description'],$text,$search_op)) { $st_arr['link']="index.php?option=weblinks&task=visit&id=".$row['id']; $st_arr['title']=$row['title']; $st_arr['desc']=$row['description']; $ret_array[]=$st_arr; } } } } ?>