mysite_type_hook_autocomplete($string)
API.php, line 465
AJAX autocomplete for aggregator titles.
Since plugins don't have their own menu items, we pass all autocomplete requests through mysite_autocomplete, which then invokes this internal hook.
See http://drupal.org/node/42552 for additional information about AJAX autocomplete.
Invoked by mysite_autocomplete().
$string The search string entered by the user.
An array of items that matched the search routine.
| Name | Description |
|---|---|
| MySite Hooks | Internal module hooks used by MySite includes. |
function mysite_type_hook_autocomplete($string) {
$matches = array();
$result = db_query_range("SELECT id, title FROM {mytable} WHERE title LIKE LOWER('%s%%')", $string, 0, 10);
while ($data = db_fetch_object($result)) {
$matches[$data->title] = check_plain($data->title);
}
return $matches;
}