54 return '<div class="mw-search-form-wrapper">' .
58 'id' => $isPowerSearch ?
'powersearch' :
'search',
63 '<div id="mw-search-top-table">' .
66 "<div class='mw-search-visualclear'></div>" .
67 "<div class='mw-search-profile-tabs'>" .
69 "<div style='clear:both'></div>" .
92 'dataLocation' =>
'content',
98 'label' => $this->specialSearch->msg(
'searchbutton' )->text(),
99 'flags' => [
'progressive',
'primary' ],
106 if ( $this->specialSearch->getPrefix() !==
'' ) {
107 $html .= Html::hidden(
'prefix', $this->specialSearch->getPrefix() );
110 if ( $totalResults > 0 && $offset < $totalResults ) {
114 'class' =>
'results-info',
115 'data-mw-num-results-offset' => $offset,
116 'data-mw-num-results-total' => $totalResults
118 $this->specialSearch->msg(
'search-showingresults' )
119 ->numParams( $offset + 1, $offset + $numResults, $totalResults )
120 ->numParams( $numResults )
126 Html::hidden(
'title', $this->specialSearch->getPageTitle()->getPrefixedText() ) .
127 Html::hidden(
'profile', $profile ) .
128 Html::hidden(
'fulltext',
'1' );
144 $lang = $this->specialSearch->getLanguage();
146 foreach ( $this->profiles as $id => $profileConfig ) {
147 $profileConfig[
'parameters'][
'profile'] = $id;
148 $tooltipParam =
isset( $profileConfig[
'namespace-messages'] )
149 ?
$lang->commaList( $profileConfig[
'namespace-messages'] )
151 $items[] = Xml::tags(
153 [
'class' => $profile === $id ?
'current' :
'normal' ],
156 $this->specialSearch->msg( $profileConfig[
'message'] )->text(),
157 $this->specialSearch->msg( $profileConfig[
'tooltip'], $tooltipParam )->text(),
158 $profileConfig[
'parameters']
163 return "<div class='search-types'>" .
164 "<ul>" . implode(
'', $items ) .
"</ul>" .
175 $parts = explode(
':',
$term );
176 return count( $parts ) > 1
200 'href' => $this->specialSearch->getPageTitle()->getLocalURL(
$params ),
219 if ( $isPowerSearch ) {
223 Hooks::run(
'SpecialSearchProfileForm', [
224 $this->specialSearch, &$form, $profile,
$term, []
240 $activeNamespaces = $this->specialSearch->getNamespaces();
241 $langConverter = $this->specialSearch->getLanguage();
242 foreach ( $this->searchConfig->searchableNamespaces() as $namespace => $name ) {
243 $subject = MWNamespace::getSubject( $namespace );
245 $rows[$subject] =
"";
248 $name = $langConverter->convertNamespace( $namespace );
249 if ( $name ===
'' ) {
250 $name = $this->specialSearch->msg(
'blanknamespace' )->text();
258 "mw-search-ns{$namespace}",
259 in_array( $namespace, $activeNamespaces )
267 foreach (
$rows as $row ) {
268 $tableRows[] =
"<tr>{$row}</tr>";
270 $namespaceTables = [];
271 foreach (
array_chunk( $tableRows, 4 ) as $chunk ) {
272 $namespaceTables[] = implode(
'', $chunk );
276 'namespaceTables' =>
"<table>" . implode(
'</table><table>', $namespaceTables ) .
'</table>',
278 Hooks::run(
'SpecialSearchPowerBox', [ &$showSections,
$term, &$opts ] );
281 foreach ( $opts as $key =>
$value ) {
282 $hidden .= Html::hidden( $key,
$value );
285 $divider =
"<div class='divider'></div>";
288 $user = $this->specialSearch->getUser();
290 if ( $user->isLoggedIn() ) {
291 $remember = $divider . Xml::checkLabel(
292 $this->specialSearch->msg(
'powersearch-remember' )->text(),
294 'mw-search-powersearch-remember',
298 [
'value' => $user->getEditToken(
300 $this->specialSearch->getRequest()
305 return "<fieldset id='mw-searchoptions'>" .
306 "<legend>" . $this->specialSearch->msg(
'powersearch-legend' )->escaped() .
'</legend>' .
307 "<h4>" . $this->specialSearch->msg(
'powersearch-ns' )->parse() .
'</h4>' .
309 '<div id="mw-search-togglebox">' .
310 '<label>' . $this->specialSearch->msg(
'powersearch-togglelabel' )->escaped() .
'</label>' .
311 '<input type="button" id="mw-search-toggleall" value="' .
312 $this->specialSearch->msg(
'powersearch-toggleall' )->escaped() .
'"/>' .
313 '<input type="button" id="mw-search-togglenone" value="' .
314 $this->specialSearch->msg(
'powersearch-togglenone' )->escaped() .
'"/>' .
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
This class is a collection of static functions that serve two purposes:
This is a utility class with only static functions for dealing with namespaces that encodes all the "...
Configuration handling class for SearchEngine.
implements Special:Search - Run text & title search and display the output
Module of static functions for generating XML.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction $rows
whereas SearchGetNearMatch runs after $term
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
if(!isset( $args[0])) $lang