Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Default Search Type?

Hi,

How do I change the Search type default to "comments"? I suspect controls\search.php but I don't know enough about php to decipher how to do a default checked radio option.

Thanks!

Comments

  • Options
    MarkMark Vanilla Staff
    Actually, there isn't a way to do that right now without getting into the code. You should add this to the feature request list on the wiki (check out the bugs page)
  • Options
    What about removing the search type? It's unnecessary, I think. Reason: when you type a keyword, it's quite obvious what you're searchin for. The keywords for user names and discussion content don't uverlap much. Let's consider few search scenarios and expected results: “Whisper� -- I expect discussions with “Whisper� in the discussion topic at the top. Discussions with “Whisper� in comments should also appear, as the next results. “Mark� -- I expect user “Mark� appear at the very top. Then discussions with “Mark� in the topic. Then “Mark� in comments. “Stripe� -- users “3stripe� and “3stripe@work� appears at the top. It's not what I was looking for, because I was looking for a background with stripes, but since it's just 2 users, I don't mind it. Then “Stripe� in topics, then “Stripe� in comments. If you don't want to use weights, you can just merge results: First show user search. Second topic search. Comments search as the third. When you want to find all users, you can always use the “advanced� search. So, what about removing the search type from the basic search form?
  • Options
    blizeHblizeH ✭✭
    It's a nice idea in principle but I really don't think it'd work, on a forum with loads of members it'd cause problems, as would searching for common words that you want to view the comments from, you'd have to scroll past countless discussions beforehand!
  • Options
    With such forum and such needs, there's always the advanced search at hand. I don't really see the point of searching for commond words. You always search for something specific.

    The point of merging the search types is to help the inexperienced users. Remember the old search engines? They would give you lots of options on how and where to search. And then came Google...
  • Options
    lechlech Chicagoland
    When you specify the type of search, it tells Vanilla exactly what rows to run the search through, making the search much faster, and removes the need to search the ENTIRE database. Otherwise, things would get bogged down with dozens if not hundreds of irrelevant search results thus making it pointless to run searches in the first place. In short, the search is fine as it is.
  • Options
    lechlech Chicagoland
    Although, an optional "Search through All" would be nice if you've completely misplaced something.
  • Options
    Yeah. Perhaps if the radio buttons were tickboxes instead..?
  • Options
    Not really relevant to the post but, I ask one thing.... I know on some forums and software when doing a search that includes a "common word" or a word in the "do not search for" type of lists, the search just quits. There is usually no error message, and if there is, the message does not tell you what happened. I know from way back in my phpbb days, searching their forum was horrible. Most of the time the page just wouldn't load, or it pops out some funky error that doesn't shed any light on what happened. So please, pretty please, if something like this ever is to happen, make a nice error message stating why the search was not performed. And maybe, even have the list of non-searchable / search-stopping words viewable by the user.
  • Options
    Minisweeper: Yes, the tickboxes instead, then turn them all on by default and hide them. Show them when user clicked “advanced�. :)
  • Options
    ToivoToivo New
    edited June 2006
    "The point of merging the search types is to help the inexperienced users. Remember the old search engines? They would give you lots of options on how and where to search. And then came Google..." you will find the following categories on the googles homepage. web - images - groups - news - froogle - blog search ...
  • Options
    OK, let me narrow it down to the topic / comment choice. This is really unnecessary. I don't have to select “in title� or “in the page body� radiobuttons in Google, do I? I'd like to have the same in Vanilla... :)
  • Options
    ToivoToivo New
    edited June 2006
    yes. mark could replace these with topic: comment: user: So the query would look like "+swell user:mark" I dont know how hard it is to implement.
  • Options
    There should be some weighting in the query--if the keyword appears in the title, its more likely a thread related to that keyword and should be ranked higher than something that appears in the body. Don't know how hard this would be to implement. Maybe my next project would be an search and indexing extension. Ha! As if I have enough time to finish my first.
This discussion has been closed.