Last modified: 2012-05-08 13:55:04 UTC
Currently you can perform searches like these: *incategory:"Heads of state" incategory:"YYYY deaths" *fish incategory:"Chefs" *intitle:"John" incategory:"American comedy writers" Well, suppose you insert this code in [[Category:Heads of state]] or any other 'people' category page: <inputbox> type=search boolean=incategory:"{{PAGENAME}}" incategory:"$1 deaths" width=4 searchbuttonlabel=Find {{PAGENAME}} dead in a given year </inputbox> Or this simpler one in any category page: <inputbox> type=search boolean= $1 incategory:"{{PAGENAME}}" searchbuttonlabel=Find a word in this category </inputbox> Where 'boolean' is the requested new parameter with a unique wildcard (ie. $1 or %s). Using the 'default' parameter to define a boolean search results in an annoying *visible* text in the input box.
Note that this *almost* works: <inputbox> type=search prefix="" incategory:"{{PAGENAME}}" incategory:"$1 deaths" width=4 searchbuttonlabel=Find {{PAGENAME}} dead in a given year </inputbox> The stuff in the 'prefix' value gets stuffed into the query with a magic 'prefix:' prepended to it; alas searching a blank prefix doesn't work. :( This system could use some general improvement as well, it's a bit of a hack at the moment -- see bug 30229.
If you're looking for a hack, I think 'default' parameter is better than 'prefix'. Both these work fine: <inputbox> type=fulltext default=" your phrase here " incategory:"{{PAGENAME}}" searchbuttonlabel=Search for a phrase in this category width=18 break=no </inputbox> <inputbox> type=fulltext default=your words here incategory:"{{PAGENAME}}" searchbuttonlabel=Search some words in this category width=15 break=no </inputbox> Note that box width is short enough to hide the expressions on the right. But cannot still insert a string in the middle of more complex boolean expressions.