From f58d22d15392e9df3ccd4708a37371d039191575 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Robert=20Stojni=C4=87?= Date: Wed, 22 Oct 2008 23:08:07 +0000 Subject: [PATCH] Redesign Special:Search: * remove all horrible long messages that just kept being sticked on the search page. There is no reason to show long messages on *every search* to *everyone*, use the Help link instead * organize search options into a straighforward menu on right side of search box * Search box now comes with a header for quickly switching between typical namespace groups: - Articles - wgNamespacesToBeSearchedDefault namespaces, default for anons - Articles/Project - wgNamespacesToBeSearchedDefault + wgNamespacesToBeSearchedProject, default for logged-in users. Contains namespaces like main, user, project, etc.. - Images - local/commons images - Everything - quick link to search *all* namespaces - Advanced - this will show our powerbox, which is now not shown on every page Preferences change: * logged-in users by default search more namespaces than anons, this relies on assumption that logged in users are more likely to be regular contributors in a community, and thus be interested in community stuff as well as articles * bug 14609, if users leave their namespaces settings on default, changing default search namespaces will change users namespaces as well Images: * bug 5101. Don't hide commons images as broken links if search backend is smart enough to return them. --- includes/DefaultSettings.php | 15 ++ includes/SearchEngine.php | 63 ++++++- includes/specials/SpecialPreferences.php | 11 +- includes/specials/SpecialSearch.php | 215 +++++++++++++++++++---- languages/messages/MessagesEn.php | 25 ++- maintenance/language/messages.inc | 23 ++- skins/common/shared.css | 5 + skins/monobook/main.css | 4 + 8 files changed, 306 insertions(+), 55 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 6607e4d37c..3278219ea2 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1865,10 +1865,25 @@ $wgNamespacesWithSubpages = array( NS_CATEGORY_TALK => true ); +/** Default search for anonymous users */ $wgNamespacesToBeSearchedDefault = array( NS_MAIN => true, ); +/** + * Additional namespaces to those in $wgNamespacesToBeSearchedDefault that + * will be added to default search for logged-in users. + * + * Same format as $wgNamespacesToBeSearchedDefault + */ +$wgNamespacesToBeSearchedProject = array( + NS_USER => true, + NS_PROJECT => true, + NS_HELP => true, + NS_CATEGORY => true, +); + + /** * Site notice shown at the top of each page * diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index 1856b9e57a..6b77bb0103 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -43,6 +43,11 @@ class SearchEngine { return null; } + /** If this search backend can list/unlist redirects */ + function acceptListRedirects() { + return true; + } + /** * If an exact title match can be find, or a very slightly close match, * return the title. If no match, returns NULL. @@ -228,6 +233,10 @@ class SearchEngine { */ public static function userNamespaces( &$user ) { $arr = array(); + // for logged-in users use predefined defaults + if( $user->isLoggedIn() && $user->getOption( 'defaultusersearch', true ) ) + return SearchEngine::projectNamespaces(); + foreach( SearchEngine::searchableNamespaces() as $ns => $name ) { if( $user->getOption( 'searchNs' . $ns ) ) { $arr[] = $ns; @@ -262,7 +271,38 @@ class SearchEngine { return array_keys($wgNamespacesToBeSearchedDefault, true); } - + + /** + * Get a list of namespace names useful for showing in tooltips + * and preferences + * + * @param unknown_type $namespaces + */ + public static function namespacesAsText( $namespaces ){ + global $wgContLang; + + $formatted = array_map( array($wgContLang,'getFormattedNsText'), $namespaces ); + foreach( $formatted as $key => $ns ){ + if ( empty($ns) ) + $formatted[$key] = wfMsg( 'blanknamespace' ); + } + return $formatted; + } + + /** + * An array of "project" namespaces indexes typically searched + * by logged-in users + * + * @return array + * @static + */ + public static function projectNamespaces(){ + global $wgNamespacesToBeSearchedDefault, $wgNamespacesToBeSearchedProject; + + return array_keys( $wgNamespacesToBeSearchedDefault + + $wgNamespacesToBeSearchedProject, true); + } + /** * Return a 'cleaned up' search string * @@ -347,6 +387,7 @@ class SearchEngine { else return $wgServer . $wgScriptPath . '/api.php?action=opensearch&search={searchTerms}&namespace={namespaces}'; } + } /** @@ -483,11 +524,17 @@ class SearchResultTooMany { */ class SearchResult { var $mRevision = null; + var $mImage = null; function SearchResult( $row ) { $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title ); - if( !is_null($this->mTitle) ) + if( !is_null($this->mTitle) ){ $this->mRevision = Revision::newFromTitle( $this->mTitle ); + if($this->mTitle->getNamespace() == NS_IMAGE) + $this->mImage = wfFindFile( $this->mTitle ); + } + + } /** @@ -509,7 +556,7 @@ class SearchResult { * @access public */ function isMissingRevision(){ - if( !$this->mRevision ) + if( !$this->mRevision && !$this->mImage ) return true; return false; } @@ -534,7 +581,10 @@ class SearchResult { */ protected function initText(){ if( !isset($this->mText) ){ - $this->mText = $this->mRevision->getText(); + if($this->mRevision != null) + $this->mText = $this->mRevision->getText(); + else + $this->mText = ''; } } @@ -594,7 +644,10 @@ class SearchResult { * @return string timestamp */ function getTimestamp(){ - return $this->mRevision->getTimestamp(); + if($this->mRevision != null) + return $this->mRevision->getTimestamp(); + else + return ''; } /** diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index b18a9fa0b9..9e43055d42 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -67,6 +67,7 @@ class PreferencesForm { $this->mWatchlistDays = $request->getVal( 'wpWatchlistDays' ); $this->mWatchlistEdits = $request->getVal( 'wpWatchlistEdits' ); $this->mDisableMWSuggest = $request->getCheck( 'wpDisableMWSuggest' ); + $this->mDefaultUserSearch = $request->getVal( 'wpUserSearch' ) != 'wpCustomUserSearch'; $this->mSaveprefs = $request->getCheck( 'wpSaveprefs' ) && $this->mPosted && @@ -289,6 +290,7 @@ class PreferencesForm { $wgUser->setOption( 'underline', $this->validateInt($this->mUnderline, 0, 2) ); $wgUser->setOption( 'watchlistdays', $this->validateFloat( $this->mWatchlistDays, 0, 7 ) ); $wgUser->setOption( 'disablesuggest', $this->mDisableMWSuggest ); + $wgUser->setOption( 'defaultusersearch', $this->mDefaultUserSearch ); # Set search namespace options foreach( $this->mSearchNs as $i => $value ) { @@ -503,7 +505,7 @@ class PreferencesForm { return Xml::tags( 'tr', null, $td1 . $td2 ). $td3 . "\n"; } - + /** * @access private */ @@ -1048,11 +1050,16 @@ class PreferencesForm { $wgOut->addHtml( '' ); # Search + $defaultNs = SearchEngine::namespacesAsText( SearchEngine::projectNamespaces() ); $mwsuggest = $wgEnableMWSuggest ? $this->addRow( Xml::label( wfMsg( 'mwsuggest-disable' ), 'wpDisableMWSuggest' ), Xml::check( 'wpDisableMWSuggest', $this->mDisableMWSuggest, array( 'id' => 'wpDisableMWSuggest' ) ) ) : ''; + $userDefaultSearch = '

'.Xml::radioLabel(wfMsg('prefs-search-nsdefault'),'wpUserSearch','wpDefaultUserSearch','wpDefaultUserSearch',$this->mDefaultUserSearch). + '

'.implode(', ', $defaultNs).'

'. + Xml::radioLabel(wfMsg('prefs-search-nscustom'),'wpUserSearch','wpCustomUserSearch','wpCustomUserSearch',!$this->mDefaultUserSearch). + '

'; $wgOut->addHTML( // Elements for the search tab itself Xml::openElement( 'fieldset' ) . @@ -1079,7 +1086,7 @@ class PreferencesForm { // Elements for the namespace options in the search tab Xml::openElement( 'fieldset' ) . Xml::element( 'legend', null, wfMsg( 'prefs-namespaces' ) ) . - wfMsgExt( 'defaultns', array( 'parse' ) ) . + $userDefaultSearch. $ps . Xml::closeElement( 'fieldset' ) . // End of the search tab diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 3ee0bf11fa..c22bccde39 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -69,6 +69,7 @@ class SpecialSearch { } $this->searchRedirects = $request->getcheck( 'redirs' ) ? true : false; + $this->searchAdvanced = $request->getVal('advanced'); } /** @@ -108,13 +109,6 @@ class SpecialSearch { } } - $wgOut->wrapWikiMsg( "==$1==\n", 'notitlematches' ); - if( $t->quickUserCan( 'create' ) && $t->quickUserCan( 'edit' ) ) { - $wgOut->addWikiMsg( 'noexactmatch', wfEscapeWikiText( $term ) ); - } else { - $wgOut->addWikiMsg( 'noexactmatch-nocreate', wfEscapeWikiText( $term ) ); - } - return $this->showResults( $term ); } @@ -129,14 +123,55 @@ class SpecialSearch { $sk = $wgUser->getSkin(); $this->setupPage( $term ); - - $wgOut->addWikiMsg( 'searchresulttext' ); + $this->searchEngine = SearchEngine::create(); + + $t = Title::newFromText( $term ); + + // add a table since it's difficult to stack divs horizontally nicely + // left - search box, right - search menu + + $wgOut->addHtml( + Xml::openElement('table', array( 'border'=>'0' ) ). + Xml::openElement('tr'). + Xml::openElement('td') + ); + + + if( $this->searchAdvanced ){ + $wgOut->addHTML( $this->powerSearchBox( $term ) ); + $showMenu = false; + } else { + $wgOut->addHTML( $this->shortDialog( $term ) ); + $showMenu = true; + } + + $wgOut->addHtml( Xml::closeElement('div'). + Xml::closeElement('td')); + + + $wgOut->addHtml( Xml::openElement('td', array( 'id' => 'mw-search-menu' )) ); + + if( $showMenu ){ + if( $t!=null && $t->quickUserCan( 'create' ) && $t->quickUserCan( 'edit' ) ) { + if( $t->exists() ){ + $wgOut->addWikiMsg( 'searchmenu-exists', wfEscapeWikiText( $term ) ); + } else { + $wgOut->addWikiMsg( 'searchmenu-new', wfEscapeWikiText( $term ) ); + } + } + } + $wgOut->addWikiMsg( 'searchmenu', wfEscapeWikiText( $term ) ); + + + $wgOut->addHtml( + Xml::closeElement('td'). + Xml::closeElement('tr'). + Xml::closeElement('table') + ); + if( '' === trim( $term ) ) { // Empty query -- straight view of search form - $wgOut->setSubtitle( '' ); - $wgOut->addHTML( $this->powerSearchBox( $term ) ); - $wgOut->addHTML( $this->powerSearchFocus() ); wfProfileOut( $fname ); return; } @@ -165,9 +200,7 @@ class SpecialSearch { return; } - $wgOut->addHTML( $this->shortDialog( $term ) ); - - $search = SearchEngine::create(); + $search = $this->searchEngine; $search->setLimitOffset( $this->limit, $this->offset ); $search->setNamespaces( $this->namespaces ); $search->showRedirects = $this->searchRedirects; @@ -178,14 +211,13 @@ class SpecialSearch { // Sometimes the search engine knows there are too many hits if ($titleMatches instanceof SearchResultTooMany) { $wgOut->addWikiText( '==' . wfMsg( 'toomanymatches' ) . "==\n" ); - $wgOut->addHTML( $this->powerSearchBox( $term ) ); - $wgOut->addHTML( $this->powerSearchFocus() ); wfProfileOut( $fname ); return; } $textMatches = $search->searchText( $rewritten ); - + + // did you mean... suggestions if($textMatches && $textMatches->hasSuggestion()){ $st = SpecialPage::getTitleFor( 'Search' ); @@ -198,8 +230,8 @@ class SpecialSearch { $textMatches->getSuggestionSnippet().''; $wgOut->addHTML('
'.wfMsg('search-suggest',$suggestLink).'
'); - } - + } + // show number of results $num = ( $titleMatches ? $titleMatches->numRows() : 0 ) + ( $textMatches ? $textMatches->numRows() : 0); @@ -264,12 +296,11 @@ class SpecialSearch { } if ( $num == 0 ) { - $wgOut->addWikiMsg( 'nonefound' ); + $wgOut->addWikiMsg( 'search-nonefound' ); } if( $num || $this->offset ) { $wgOut->addHTML( "

{$prevnext}

\n" ); } - $wgOut->addHTML( $this->powerSearchBox( $term ) ); wfProfileOut( $fname ); } @@ -285,8 +316,6 @@ class SpecialSearch { $wgOut->setPageTitle( wfMsg( 'searchresults') ); $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'searchresults-title', $term) ) ); } - $subtitlemsg = ( Title::newFromText( $term ) ? 'searchsubtitle' : 'searchsubtitleinvalid' ); - $wgOut->setSubtitle( $wgOut->parse( wfMsg( $subtitlemsg, wfEscapeWikiText($term) ) ) ); $wgOut->setArticleRelated( false ); $wgOut->setRobotPolicy( 'noindex,nofollow' ); } @@ -320,6 +349,8 @@ class SpecialSearch { $opt['ns' . $n] = 1; } $opt['redirs'] = $this->searchRedirects ? 1 : 0; + if( $this->searchAdvanced ) + $opt['advanced'] = $this->searchAdvanced; return $opt; } @@ -599,14 +630,18 @@ class SpecialSearch { Xml::closeElement( 'span' ) . "\n"; } - $redirect = Xml::check( 'redirs', $this->searchRedirects, array( 'value' => '1', 'id' => 'redirs' ) ); - $redirectLabel = Xml::label( wfMsg( 'powersearch-redir' ), 'redirs' ); + if( $this->searchEngine->acceptListRedirects() ){ + $redirect = Xml::check( 'redirs', $this->searchRedirects, array( 'value' => '1', 'id' => 'redirs' ) ); + $redirectLabel = Xml::label( wfMsg( 'powersearch-redir' ), 'redirs' ); + } else{ + $redirect = ''; + $redirectLabel = ''; + } $searchField = Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'powerSearchText' ) ); $searchButton = Xml::submitButton( wfMsg( 'powersearch' ), array( 'name' => 'fulltext' ) ) . "\n"; $searchTitle = SpecialPage::getTitleFor( 'Search' ); $out = Xml::openElement( 'form', array( 'id' => 'powersearch', 'method' => 'get', 'action' => $wgScript ) ) . - Xml::fieldset( wfMsg( 'powersearch-legend' ), Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . "

" . wfMsgExt( 'powersearch-ns', array( 'parseinline' ) ) . @@ -620,10 +655,10 @@ class SpecialSearch { " " . $searchField . " " . - $searchButton ) . + $searchButton. ""; - return $out; + return $this->formHeader($term).$out; } function powerSearchFocus() { @@ -634,11 +669,126 @@ class SpecialSearch { "});" . ""; } + + /** Make a search link with some target namespaces */ + function makeSearchLink($term, $namespaces, $label, $tooltip, $params=array()){ + $opt = $params; + foreach( $namespaces as $n ) { + $opt['ns' . $n] = 1; + } + $opt['redirs'] = $this->searchRedirects ? 1 : 0; + + $st = SpecialPage::getTitleFor( 'Search' ); + $stParams = wfArrayToCGI( array( + 'search' => $term, + 'fulltext' => wfMsg('search')), + $opt); + + return Xml::element('a', + array('href'=> $st->getLocalURL($stParams), 'title' => $tooltip), + $label); + + } + + /** Check if query starts with image: prefix */ + function startsWithImage($term){ + global $wgContLang; + + $p = explode(':',$term); + if( count($p)> 1 ){ + return $wgContLang->getNsIndex($p[0]) == NS_IMAGE; + } + return false; + } + + /** Check if query begins with all: magic prefix */ + function startsWithAll($term){ + global $wgContLang; + + $p = explode(':',$term); + return count($p) > 1 && $p[0]==wfMsg('searchall'); + } + function formHeader($term) { + global $wgContLang; + + $sep = '   '; + $out = Xml::openElement('div', array('style'=>'padding-bottom:0.5em;')); + + $bareterm = $term; + if($this->startsWithAll($term) || $this->startsWithImage($term)) + $bareterm = substr( $term, strpos($term,':')+1 ); // delete all/image prefix + + // figure out the active search profile header + if( $this->searchAdvanced ) + $active = 'advanced'; + else if( $this->namespaces == NS_IMAGE || $this->startsWithImage($term) ) + $active = 'images'; + elseif( $this->startsWithAll($term) ) + $active = 'all'; + elseif( $this->namespaces == SearchEngine::defaultNamespaces() ) + $active = 'default'; + elseif( $this->namespaces == SearchEngine::projectNamespaces() ) + $active = 'project'; + else + $active = 'advanced'; + + + // search profiles headers + $m = wfMsg('searchprofile-articles'); + $tt = wfMsg('searchprofile-articles-tooltip', + implode(', ', SearchEngine::namespacesAsText( SearchEngine::defaultNamespaces() ))); + if( $active == 'default' ){ + $out .= Xml::element('strong', array('title'=>$tt), $m); + } else + $out .= $this->makeSearchLink( $bareterm, SearchEngine::defaultNamespaces(), $m, $tt ); + + $out .= $sep; + + $m = wfMsg('searchprofile-project'); + $tt = wfMsg('searchprofile-project-tooltip', + implode(', ', SearchEngine::namespacesAsText( SearchEngine::projectNamespaces() ))); + if( $active == 'project' ){ + $out .= Xml::element('strong', array('title'=>$tt), $m); + } else + $out .= $this->makeSearchLink( $bareterm, SearchEngine::projectNamespaces(), $m, $tt ); + + $out .= $sep; + + $m = wfMsg('searchprofile-images'); + $tt = wfMsg('searchprofile-images-tooltip'); + if( $active == 'images' ){ + $out .= Xml::element('strong', array('title'=>$tt), $m); + } else + $out .= $this->makeSearchLink( $wgContLang->getFormattedNsText(NS_IMAGE).':'.$bareterm, array() , $m, $tt ); + + $out .= $sep; + + $m = wfMsg('searchprofile-everything'); + $tt = wfMsg('searchprofile-everything-tooltip'); + if( $active == 'all' ){ + $out .= Xml::element('strong', array('title'=>$tt), $m); + } else + $out .= $this->makeSearchLink( wfMsg('searchall').':'.$bareterm, array() , $m, $tt ); + + $out .= $sep; + + $m = wfMsg('searchprofile-advanced'); + $tt = wfMsg('searchprofile-advanced-tooltip'); + if( $active == 'advanced' ){ + $out .= Xml::element('strong', array('title'=>$tt), $m); + } else + $out .= $this->makeSearchLink( $bareterm, array() , $m, $tt, array( 'advanced' => '1') ); + + $out .= Xml::closeElement('div') ; + + return $out; + } + function shortDialog($term) { global $wgScript; - - $out = Xml::openElement( 'form', array( + + $out = Xml::openElement( 'form', array( 'id' => 'search', 'method' => 'get', 'action' => $wgScript @@ -646,6 +796,7 @@ class SpecialSearch { $searchTitle = SpecialPage::getTitleFor( 'Search' ); $out .= Xml::hidden( 'title', $searchTitle->getPrefixedText() ); $out .= Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'searchText' ) ) . ' '; + foreach( SearchEngine::searchableNamespaces() as $ns => $name ) { if( in_array( $ns, $this->namespaces ) ) { $out .= Xml::hidden( "ns{$ns}", '1' ); @@ -654,6 +805,6 @@ class SpecialSearch { $out .= Xml::submitButton( wfMsg( 'searchbutton' ), array( 'name' => 'fulltext' ) ); $out .= Xml::closeElement( 'form' ); - return $out; + return $this->formHeader($term).$out; } } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1821ef41d6..6a321f03b2 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1417,12 +1417,6 @@ Note that using the navigation links will reset this column.', # Search results 'searchresults' => 'Search results', 'searchresults-title' => 'Search results for $1', -'searchresulttext' => 'For more information about searching {{SITENAME}}, see [[{{MediaWiki:Helppage}}|{{int:help}}]].', -'searchsubtitle' => 'You searched for \'\'\'[[:$1]]\'\'\' ([[Special:Prefixindex/$1|all pages starting with "$1"]] | [[Special:WhatLinksHere/$1|all pages that link to "$1"]])', -'searchsubtitleinvalid' => "You searched for '''$1'''", -'noexactmatch' => "'''There is no page titled \"\$1\".''' -You can [[:\$1|create this page]].", -'noexactmatch-nocreate' => "'''There is no page titled \"\$1\".'''", 'toomanymatches' => 'Too many matches were returned, please try a different query', 'titlematches' => 'Page title matches', 'notitlematches' => 'No page title matches', @@ -1431,6 +1425,21 @@ You can [[:\$1|create this page]].", 'prevn' => 'previous $1', 'nextn' => 'next $1', 'viewprevnext' => 'View ($1) ($2) ($3)', +'searchmenu-exists' => "*Article '''[[$1]]'''\n", +'searchmenu-new' => "*Create article '''[[$1]]'''\n", +'searchmenu' => "*[[Special:AllPages/$1|Index]]\n*[[{{ns:project}}:Searching|{{int:help}}]]\n", +'searchprofile-articles' => 'Articles', +'searchprofile-project' => 'Articles/Project', +'searchprofile-images' => 'Images', +'searchprofile-everything' => 'Everything', +'searchprofile-advanced' => 'Advanced', +'searchprofile-articles-tooltip' => 'Search in $1', +'searchprofile-project-tooltip' => 'Search in $1', +'searchprofile-images-tooltip' => 'Search for images', +'searchprofile-everything-tooltip' => 'Search all of content (including talk pages)', +'searchprofile-advanced-tooltip' => 'Search in custom namespaces', +'prefs-search-nsdefault' => 'Search using defaults:', +'prefs-search-nscustom' => 'Search custom namespaces:', 'search-result-size' => '$1 ({{PLURAL:$2|1 word|$2 words}})', 'search-result-score' => 'Relevance: $1%', 'search-redirect' => '(redirect $1)', @@ -1449,8 +1458,7 @@ You can [[:\$1|create this page]].", 'showingresults' => "Showing below up to {{PLURAL:$1|'''1''' result|'''$1''' results}} starting with #'''$2'''.", 'showingresultsnum' => "Showing below {{PLURAL:$3|'''1''' result|'''$3''' results}} starting with #'''$2'''.", 'showingresultstotal' => "Showing below {{PLURAL:$4|result '''$1''' of '''$3'''|results '''$1 - $2''' of '''$3'''}}", -'nonefound' => "'''Note''': Only some namespaces are searched by default. -Try prefixing your query with ''all:'' to search all content (including talk pages, templates, etc), or use the desired namespace as prefix.", +'search-nonefound' => "There were no results matching the query.", 'powersearch' => 'Advanced search', 'powersearch-legend' => 'Advanced search', 'powersearch-ns' => 'Search in namespaces:', @@ -1540,7 +1548,6 @@ please see math/README to configure.', 'allowemail' => 'Enable e-mail from other users', 'prefs-searchoptions' => 'Search options', 'prefs-namespaces' => 'Namespaces', -'defaultns' => 'Search in these namespaces by default:', 'default' => 'default', 'files' => 'Files', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 7bc735ff10..ae5a0f7ce1 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -757,11 +757,6 @@ $wgMessageStructure = array( 'search' => array( 'searchresults', 'searchresults-title', - 'searchresulttext', - 'searchsubtitle', - 'searchsubtitleinvalid', - 'noexactmatch', - 'noexactmatch-nocreate', 'toomanymatches', 'titlematches', 'notitlematches', @@ -788,7 +783,7 @@ $wgMessageStructure = array( 'showingresults', 'showingresultsnum', 'showingresultstotal', - 'nonefound', + 'search-nonefound', 'powersearch', 'powersearch-legend', 'powersearch-ns', @@ -797,6 +792,19 @@ $wgMessageStructure = array( 'search-external', 'searchdisabled', 'googlesearch', + 'searchmenu-exists', + 'searchmenu-new', + 'searchmenu', + 'searchprofile-articles', + 'searchprofile-project', + 'searchprofile-images', + 'searchprofile-everything', + 'searchprofile-advanced', + 'searchprofile-articles-tooltip', + 'searchprofile-project-tooltip', + 'searchprofile-images-tooltip', + 'searchprofile-everything-tooltip', + 'searchprofile-advanced-tooltip', ), 'opensearch' => array( 'opensearch-desc', @@ -862,7 +870,8 @@ $wgMessageStructure = array( 'allowemail', 'prefs-searchoptions', 'prefs-namespaces', - 'defaultns', + 'prefs-search-nsdefault', + 'prefs-search-nscustom', 'default', 'files', ), diff --git a/skins/common/shared.css b/skins/common/shared.css index 9ce28a1ff1..7a258a6a67 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -112,6 +112,11 @@ div.searchresult { font-size: 97%; } +td#mw-search-menu { + padding-left:6em; + font-size:85%; +} + div#mw-search-interwiki { float: right; width: 18em; diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 8bd925254a..6bf98add7f 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -1409,6 +1409,10 @@ div#searchTargetHide { padding:2px; } +#powersearch p { + margin-top:0px; +} + div.multipageimagenavbox { border: solid 1px silver; padding: 4px; -- 2.20.1