Drupal search on content from username
I have a drupal site (d6) where the client would like to be able to search for content from a given user - at the moment a search for "Fred" will turn up any nodes that mention Fred, but none that are by him.
There don't seem to be a lot of options on the search config screen, and while I am fairly experienced with writing drupal modules, I don't have a very solid grasp of the search hooks and whatnot.
Is there a simple way to include the开发者_开发技巧se results in the search?
Using views and exposing the author field seems like the easiest way to do this.
The default search is very clunky and rigid. Alternatively, you could implement your own hook_search(), but it's essentially coding a special case of views, without all the flexibility that views brings.
To do something like that, you could just use views and exposed filters. Then they can search either by keyword or author.
精彩评论